ce218564f3bb5e077d691fe1a321d6f2f579e0c2
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2013-06-17  Beth Dakin  <bdakin@apple.com>
2
3         PageBanners appear over HTML5 video when media element is in full screen mode
4         https://bugs.webkit.org/show_bug.cgi?id=117721
5         -and corresponding-
6         <rdar://problem/13686998>
7
8         Reviewed by Sam Weinig.
9
10         When an element enters fullscreen, hide the banners. Show them again when the 
11         element exits fullscreen.
12         * WebProcess/FullScreen/WebFullScreenManager.cpp:
13         (WebKit::WebFullScreenManager::willEnterFullScreen):
14         (WebKit::WebFullScreenManager::willExitFullScreen):
15
16         Handle hiding and showing by removing or re-creating a parent layer for m_layer.
17         * WebProcess/WebPage/PageBanner.cpp:
18         (WebKit::PageBanner::hide):
19         (WebKit::PageBanner::showIfHidden):
20         * WebProcess/WebPage/PageBanner.h:
21         * WebProcess/WebPage/mac/PageBannerMac.mm:
22         (WebKit::PageBanner::PageBanner):
23         (WebKit::PageBanner::hide):
24         (WebKit::PageBanner::showIfHidden):
25         (WebKit::PageBanner::mouseEvent):
26         * WebProcess/WebPage/WebPage.cpp:
27         (WebKit::WebPage::hidePageBanners):
28         (WebKit::WebPage::showPageBanners):
29         * WebProcess/WebPage/WebPage.h:
30
31 2013-06-17  Ruth Fong  <ruth_fong@apple.com>
32
33         REGRESSION: Important controls are missing from <video> element UI, when compared to QuickTime
34         https://bugs.webkit.org/show_bug.cgi?id=20599
35
36         Add a "Download Video"/"Download Audio" context menu item to download media
37         elements.
38
39         Reviewed by Beth Dakin.
40
41         * Shared/API/c/WKContextMenuItemTypes.h: Updated to include
42         an enum type for the "Download Video/Audio" context menu item.
43
44         * Shared/API/c/WKSharedAPICast.h: Updated to associate
45         the enums in WebKit and WebCore that handle the "Download Video/Audio"
46         context menu item.
47
48         * UIProcess/API/efl/ewk_context_menu.cpp:
49         * UIProcess/API/efl/ewk_context_menu_item.cpp:
50         * UIProcess/API/efl/ewk_context_menu_item.h:
51         Updated to include new EWK enum type for "Download Video/Audio" context menu item.
52
53         * UIProcess/WebPageProxy.cpp: Updated to 
54         handle the "Download Video/Audio" context menu item mouse click
55         and download the media item in the UI process.
56
57 2013-06-17  Ralph Thomas  <ralpht@gmail.com>
58
59         [CoordinatedGraphics][CSS Shaders] Use forwarding header for TextureMapperPlatformCompiledProgram.h
60         https://bugs.webkit.org/show_bug.cgi?id=117712
61
62         Reviewed by Noam Rosenthal.
63
64         * Shared/CoordinatedGraphics/WebCustomFilterProgramProxy.h:
65
66 2013-06-17  Mark Rowe  <mrowe@apple.com>
67
68         <rdar://problem/13145014> Allow CoreIPC messages to transmit importance boosts
69
70         Transmitting the importance boost from the UI process to the web process is particularly
71         important when disabling process suppression on a web process, as it will minimize the
72         delays that can occur before the message instructing process suppression to be disabled
73         is processed by the web process.
74
75         We keep the importance boost alive for the duration of the CoreIPC message handler. We
76         achieve this by having an ImportanceAssertion object that owns the assertion, and whose
77         lifetime is tied to that of the MessageDecoder.
78
79         Reviewed by Anders Carlsson.
80
81         * Platform/CoreIPC/MessageDecoder.cpp:
82         (CoreIPC::MessageDecoder::setImportanceAssertion): Associate an importance assertion
83         with this message.
84         * Platform/CoreIPC/MessageDecoder.h:
85         * Platform/CoreIPC/mac/ConnectionMac.cpp:
86         (CoreIPC::Connection::open): Mark our receive port as allowing importance boosts to be received.
87         (CoreIPC::Connection::receiveSourceEventHandler):
88         * Platform/CoreIPC/mac/ImportanceAssertion.h:
89         (CoreIPC::ImportanceAssertion::create):
90         (CoreIPC::ImportanceAssertion::~ImportanceAssertion): Release the assertion.
91         (CoreIPC::ImportanceAssertion::ImportanceAssertion): Take an assertion if a boost was present in
92         the Mach message.
93
94 2013-06-17  Mark Rowe  <mrowe@apple.com>
95
96         <rdar://problem/14051357> Web processes sometimes remain in a suppressed
97         state after their window is unoccluded.
98
99         The code in WKView that responds to occlusion notifications was incorrectly
100         treating the window's occlusion state as being an enum rather than the set of
101         flags that it is.
102
103         Reviewed by Oliver Hunt.
104
105         * UIProcess/API/mac/WKView.mm:
106         (-[WKView _windowDidChangeOcclusionState:]): Test only the visibility state.
107         (-[WKView setWindowOcclusionDetectionEnabled:]): Ditto.
108
109 2013-06-17  Michael Brüning  <michael.bruning@digia.com>
110
111         [Qt] Remove Qt specific QTKIT flagged code.
112         https://bugs.webkit.org/show_bug.cgi?id=117635
113
114         Reviewed by Simon Hausmann.
115
116         Due to disabling QTKIT for Qt in r151546, the
117         code the flags that are not taken into account
118         anymore and the code that has been rendered
119         unreachable by this are removed.
120
121         * Target.pri:
122         * UIProcess/qt/WebContextQt.cpp:
123         (WebKit::WebContext::platformInitializeWebProcess):
124         * WebProcess/WebCoreSupport/qt/WebSystemInterface.h: Removed.
125         * WebProcess/WebCoreSupport/qt/WebSystemInterface.mm: Removed.
126         * WebProcess/WebPage/WebPage.cpp:
127         (WebKit::WebPage::updatePreferences):
128         * WebProcess/qt/WebProcessMainQt.cpp:
129         (WebKit::WebProcessMainQt):
130
131 2013-06-17  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
132
133         Unreviewed, rolling out r151632.
134         http://trac.webkit.org/changeset/151632
135         https://bugs.webkit.org/show_bug.cgi?id=117585
136
137         Debug build error ASSERT(WTF_USE_GRAMMAR_CHECKING) for non MAC
138         platforms
139
140         * Shared/API/c/WKSharedAPICast.h:
141         (WebKit::toAPI):
142         (WebKit::toImpl):
143         * UIProcess/API/efl/ewk_context_menu_item.cpp:
144         (getEwkActionFromWKTag):
145         * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:
146         (onContextMenuShow):
147         (TEST_F):
148         * UIProcess/API/gtk/WebKitContextMenuActions.cpp:
149         (webkitContextMenuActionGetActionTag):
150         (webkitContextMenuActionGetForContextMenuItem):
151         (webkitContextMenuActionGetLabel):
152         * UIProcess/WebPageProxy.cpp:
153         (WebKit::WebPageProxy::contextMenuItemSelected):
154
155 2013-06-14  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
156
157         Context menu grammar checking items are available when GRAMMAR_CHECKING macro is off
158         https://bugs.webkit.org/show_bug.cgi?id=117585
159
160         Reviewed by Anders Carlsson.
161
162         Add GRAMMAR_CHECKING guard to the context menu grammar items.
163
164         * Shared/API/c/WKSharedAPICast.h:
165         (WebKit::toAPI):
166         (WebKit::toImpl):
167         * UIProcess/API/efl/ewk_context_menu_item.cpp:
168         (getEwkActionFromWKTag):
169         * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:
170         (checkSpellingItemsAvailability):
171         Change callback name, to be consistent with a newly added.
172
173         (checkSpellingAndGrammarSubmenuAvailability):
174         (checkGrammarWithSpellingItemAvailability):
175         Add two unit tests for EFL to check whether context menu grammar items are
176         available only when GRAMMAR_CHECKING macro is enabled.
177
178         * UIProcess/API/gtk/WebKitContextMenuActions.cpp:
179         (webkitContextMenuActionGetActionTag):
180         (webkitContextMenuActionGetForContextMenuItem):
181         (webkitContextMenuActionGetLabel):
182         * UIProcess/WebPageProxy.cpp:
183         (WebKit::WebPageProxy::contextMenuItemSelected):
184
185 2013-06-14  Dean Jackson  <dino@apple.com>
186
187         Crash in supportsSnapshotting
188         https://bugs.webkit.org/show_bug.cgi?id=117670
189         <rdar://problem/14059711>
190
191         Reviewed by Darin Adler.
192
193         Speculative fix for deferencing a null RefPtr in supportsSnapshotting.
194         It seems like it was possible to get in a state where the plugin machinery
195         would fire up and attempt to get a screenshot before there was an active
196         connection to the plugin process (usually under periods of high load, such
197         as opening a lot of tabs at once). In this case we're now returning false
198         from supportsSnapshotting, which will trigger the plugin to restart, but
199         that's better than requesting a snapshot on something that doesn't yet exist.
200
201         * WebProcess/Plugins/PluginProxy.cpp:
202         (WebKit::PluginProxy::supportsSnapshotting): Guard for an empty connection object.
203
204 2013-06-14  Enrica Casucci  <enrica@apple.com>
205
206         WKPageFindStringMatches ignores the kWKFindOptionsBackwards option.
207         https://bugs.webkit.org/show_bug.cgi?id=117647
208         <rdar://problem/13881024>
209
210         Reviewed by Darin Adler.
211         
212         The API returns the matched ranges in the DOM order regardless of the
213         find direction, but the index of the first match after the user selection
214         should take the find direction into account.
215
216         Extended existing test in TestWebKitAPI.
217
218         * Shared/API/c/WKFindOptions.h: Added enum for the case where there are
219         no matches after the user selection in the direction of the find.
220
221 2013-06-14  Andres Gomez  <agomez@igalia.com>
222
223         [GTK] Compilation problems - hb.h not found
224         https://bugs.webkit.org/show_bug.cgi?id=117636
225
226         Unreviewed GTK+ build fix.
227
228         * GNUmakefile.am: Added freetype cflags for WebKit2 GTK+ Platform
229         library.
230
231 2013-06-13  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
232
233         [EFL][WK2] Wrong context menu and popup menu positions when scroll is applied
234         https://bugs.webkit.org/show_bug.cgi?id=116610
235
236         Reviewed by Noam Rosenthal.
237
238         WebKit2 EFL uses fixed layout - because of this ScrollView::contentsToWindow, does
239         not take scroll into account, as it is meant to be handled by UI application.
240         When popup and context menu are created, after calling contentsToWindow their position
241         are not adjusted to page scroll.
242         Added two functions to EwkView and WKView, converting contents position to user viewport
243         coordinates, to adjust popup and context menu positions.
244
245         * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
246         (WKViewContentsToUserViewport):
247         * UIProcess/API/C/CoordinatedGraphics/WKView.h:
248         * UIProcess/API/efl/EwkView.cpp:
249         (EwkView::showContextMenu):
250         (EwkView::requestPopupMenu):
251         * UIProcess/CoordinatedGraphics/WebView.cpp:
252         (WebKit::WebView::contentsToUserViewport):
253         * UIProcess/CoordinatedGraphics/WebView.h:
254
255 2013-06-12  Anders Carlsson  <andersca@apple.com>
256
257         Remove the notion of inactive plug-ins
258         https://bugs.webkit.org/show_bug.cgi?id=117570
259         <rdar://problem/13484213>
260
261         Reviewed by Tim Horton.
262
263         Remove code that deals with inactive plug-ins. We still keep around the kWKPluginLoadPolicyInactive API enum for now.
264
265         * Shared/Plugins/PluginModuleInfo.h:
266         * UIProcess/API/C/WKAPICast.h:
267         (WebKit::toWKPluginLoadPolicy):
268         (WebKit::toPluginModuleLoadPolicy):
269         * UIProcess/Plugins/PluginInfoStore.cpp:
270         * UIProcess/Plugins/PluginInfoStore.h:
271         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
272         (WebKit::PluginInfoStore::shouldUsePlugin):
273         (WebKit::PluginInfoStore::defaultLoadPolicyForPlugin):
274         * UIProcess/WebPageProxy.cpp:
275         (WebKit::WebPageProxy::findPlugin):
276         (WebKit::WebPageProxy::unavailablePluginButtonClicked):
277         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
278         (WebKit::WebChromeClient::shouldUnavailablePluginMessageBeButton):
279         (WebKit::WebChromeClient::unavailablePluginButtonClicked):
280         * WebProcess/WebPage/WebPage.cpp:
281         (WebKit::WebPage::createPlugin):
282
283 2013-06-12  Hugo Parente Lima  <hugo.lima@openbossa.org>
284
285         [GTK] Explicit include glib.h to avoid compilation errors if libsoup isn't used.
286         https://bugs.webkit.org/show_bug.cgi?id=117564
287
288         Reviewed by Martin Robinson.
289
290         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
291
292 2013-06-12  Zan Dobersek  <zdobersek@igalia.com>
293
294         [GTK] Move more build targets for source code that's free of layer violations into libPlatform
295         https://bugs.webkit.org/show_bug.cgi?id=115936
296
297         Reviewed by Martin Robinson.
298
299         * GNUmakefile.am: Add GStreamer dependency's CFLAGS to the list of libPlatformGtk2 CPPFLAGS.
300
301 2013-06-12  Ruth Fong  <ruth_fong@apple.com>
302
303         "Open Video in New Window" doesn't make sense in fullscreen
304         https://bugs.webkit.org/show_bug.cgi?id=117556
305
306         Reviewed by Beth Dakin.
307
308         Adds method mediaIsInFullscreen() that checks if a media element is in
309         fullscreen mode, which is needed to decide when to display the
310         "Open Video in New Window" context menu item.
311
312         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
313         (WKBundleHitTestResultMediaIsInFullscreen): Added.
314         Hooks into new InjectedBundleHitTestResult::mediaIsInFullscreen() method.
315         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
316         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
317         (WebKit::InjectedBundleHitTestResult::mediaIsInFullscreen): Added.
318         Checks if media element is in fullscreen.
319         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
320
321 2013-06-12  Ruth Fong  <ruth_fong@apple.com>
322
323         Allow for toggling fullscreen on <video> elements
324         https://bugs.webkit.org/show_bug.cgi?id=117220
325
326         Reviewed by Dean Jackson.
327
328         * Shared/API/c/WKContextMenuItemTypes.h:
329         * Shared/API/c/WKSharedAPICast.h:
330         Added variables to support the toggle-ability of the fullscreen
331         video context menu item.
332
333 2013-06-12  Carlos Garcia Campos  <cgarcia@igalia.com>
334
335         [GTK] Invalidate the ProcessLauncher when the process is terminated before it has finished launching
336         https://bugs.webkit.org/show_bug.cgi?id=117412
337
338         Reviewed by Anders Carlsson.
339
340         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
341         (WebKit::ProcessLauncher::terminateProcess): If process is still
342         launching just invalidate the launcher. Reset the process
343         identifier after killing the process.
344
345 2013-06-12  Jae Hyun Park  <jae.park@company100.net>
346
347         [Coordinated Graphics] Remove unused headers in CoordinatedLayerTreeHostProxy
348         https://bugs.webkit.org/show_bug.cgi?id=117539
349
350         Reviewed by Noam Rosenthal.
351
352         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
353         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
354
355 2013-06-12  Zan Dobersek  <zdobersek@igalia.com>
356
357         [GTK] Remove the WebCoreLayer(Gtk2).a archives before regenerating them
358         https://bugs.webkit.org/show_bug.cgi?id=116723
359
360         Reviewed by Carlos Garcia Campos.
361
362         * GNUmakefile.am: When generating the WebCoreLayerGtk2.a archive from all the dependency archives, remove the
363         current archive (if any). Updating an existent archive in an incremental build is not bulletproof and can lead
364         to corrupt archives and subsequent build failures. On the other hand, the archive generation is not expensive
365         and produces a working archive without problems even on incremental builds.
366
367 2013-06-12  Zan Dobersek  <zdobersek@igalia.com>
368
369         Unreviewed GTK build fix.
370
371         * GNUmakefile.list.am: Adding missing build targets to the plugin process after r151480.
372
373 2013-06-11  Gavin Barraclough  <barraclough@apple.com>
374
375         Add NSSupportsAppNap keys to WebProcess, PluginProcess
376         https://bugs.webkit.org/show_bug.cgi?id=117528
377
378         Reviewed by Mark Rowe.
379
380         * PluginProcess/EntryPoint/mac/LegacyProcess/Info.plist:
381         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
382         * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist:
383         * WebProcess/EntryPoint/mac/LegacyProcess/Info.plist:
384         * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info.plist:
385         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist:
386             - add NSSupportsAppNap key.
387
388 2013-06-11  Oliver Hunt  <oliver@apple.com>
389
390         Make sure we aren't throttling plugin timers during initialisation and destruction
391         https://bugs.webkit.org/show_bug.cgi?id=117522
392
393         Reviewed by Darin Adler.
394
395         Add a new ActivityAssertion RAII class to handle allowing/disallowing
396         timer throttling.  Then make use of it during plugin initialisation
397         and destruction, as well as any synchronous messages (on the basis
398         that if another process is waiting for the plugin we shouldn't be
399         throttling timers).
400
401         * CMakeLists.txt:
402         * GNUmakefile.list.am:
403         * PluginProcess/WebProcessConnection.cpp:
404         (WebKit::WebProcessConnection::didReceiveSyncMessage):
405         (WebKit::WebProcessConnection::destroyPlugin):
406         (WebKit::WebProcessConnection::createPlugin):
407         * Shared/ActivityAssertion.cpp: Added.
408         (WebKit::ActivityAssertion::ActivityAssertion):
409         (WebKit::ActivityAssertion::~ActivityAssertion):
410         * Shared/ActivityAssertion.h: Added.
411         * Target.pri:
412         * WebKit2.xcodeproj/project.pbxproj:
413
414 2013-06-06  Timothy Hatcher  <timothy@apple.com>
415
416         Update the framework bundle identifier for the Web Inspector.
417
418         Reviewed by Mark Rowe.
419
420         * UIProcess/mac/WebInspectorProxyMac.mm:
421         (WebKit::inspectorReallyUsesWebKitUserInterface):
422         (WebKit::WebInspectorProxy::inspectorPageURL):
423         (WebKit::WebInspectorProxy::inspectorBaseURL):
424         * WebProcess/WebPage/mac/WebInspectorMac.mm:
425         (WebKit::inspectorReallyUsesWebKitUserInterface):
426         (WebKit::WebInspector::localizedStringsURL):
427
428 2013-06-11  Jer Noble  <jer.noble@apple.com>
429
430         Do not filter cookies requested through the CookieStorageShim.
431         https://bugs.webkit.org/show_bug.cgi?id=117511
432         <rdar://problem/13603433>
433
434         Reviewed by Beth Dakin.
435
436         Since the shim function is called when the underlying media engine is
437         creating an HTTPRequest, use CookieRequestHeaderFieldValue (which does
438         not filter out HTTP-only cookies) rather than CookiesForDOM (which does).
439
440         * Shared/mac/CookieStorageShim.cpp:
441         (WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL):
442
443 2013-06-11  Seokju Kwon  <seokju.kwon@gmail.com>
444
445         Remove leftover wxWebkit code
446         https://bugs.webkit.org/show_bug.cgi?id=117471
447
448         Reviewed by Andreas Kling.
449
450         * Scripts/generate-forwarding-headers.pl:
451
452 2013-06-11  Changhyup Jwa  <ch.jwa@samsung.com>
453
454         [EFL][WK2] Add fallback for EWK2UnitTestBase if opengl is not available.
455         https://bugs.webkit.org/show_bug.cgi?id=117504
456
457         Reviewed by Christophe Dumez.
458
459         There're many fails on efl webkit2 unit test if opengl is not available.
460         So, add fallback to non-opengl evas engine.
461
462         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
463         (EWK2UnitTest::EWK2UnitTestBase::SetUp):
464
465 2013-06-11  Csaba Osztrogonác  <ossy@webkit.org>
466
467         Make WTR use its own temporary directory for application cache
468         https://bugs.webkit.org/show_bug.cgi?id=117143
469
470         Reviewed by Alexey Proskuryakov.
471
472         * UIProcess/API/C/WKContext.cpp:
473         (WKContextSetApplicationCacheDirectory):
474         * UIProcess/API/C/WKContextPrivate.h:
475         * UIProcess/WebContext.cpp:
476         (WebKit::WebContext::applicationCacheDirectory):
477         * UIProcess/WebContext.h:
478         (WebKit::WebContext::setApplicationCacheDirectory):
479         * UIProcess/efl/WebContextEfl.cpp:
480         (WebKit::WebContext::platformDefaultApplicationCacheDirectory):
481         * UIProcess/gtk/WebContextGtk.cpp:
482         (WebKit::WebContext::platformDefaultApplicationCacheDirectory):
483         * UIProcess/mac/WebContextMac.mm:
484         (WebKit::WebContext::platformDefaultApplicationCacheDirectory):
485         * UIProcess/qt/WebContextQt.cpp:
486         (WebKit::WebContext::platformDefaultApplicationCacheDirectory):
487
488 2013-06-11  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
489
490         [EFL][WK2] Fix test_ewk2_context_menu
491         https://bugs.webkit.org/show_bug.cgi?id=116601
492
493         Reviewed by Gyuyoung Kim.
494
495         test_ewk2_context_menu is always passing, it does not test any context menu feature
496         as it ends before context menu is called.
497         One single test was divided into two tests: testing WebKit2 created context menu and
498         testing menus and items created by application.
499
500         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
501         (EWK2UnitTest::EWK2UnitTestBase::waitUntilTrue): added function introducing internal loop until boolean value is changed to true
502         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
503         * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:
504         (customItemSelected):
505         (showContextMenu):
506         (showContextMenuForRemoveAndAppend):
507         (showContextMenuForSubmenu):
508         (hideContextMenu):
509         (TEST_F):
510
511 2013-06-11  Ryuan Choi  <ryuan.choi@samsung.com>
512
513         [EFL][WK2] Add ewk_view_navigate API
514         https://bugs.webkit.org/show_bug.cgi?id=117467
515
516         Reviewed by Christophe Dumez.
517
518         The applications will use this API to navigate history more than one step.
519
520         * UIProcess/API/efl/ewk_back_forward_list_item_private.h:
521         (EwkBackForwardListItem::wkItem): Return WKBackForwardListItemRef for page to navigate.
522         * UIProcess/API/efl/ewk_view.cpp:
523         (ewk_view_navigate_to): Added new API.
524         * UIProcess/API/efl/ewk_view.h:
525         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
526         (TEST_F): Added more test case for navigation.
527
528 2013-06-10  Jae Hyun Park  <jae.park@company100.net>
529
530         [CoordinatedGraphics] Typos in custom shader support
531         https://bugs.webkit.org/show_bug.cgi?id=117413
532
533         Reviewed by Noam Rosenthal.
534
535         Wrong keyframe is passed when assigning filterValue.
536
537         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
538         (WebKit::CoordinatedLayerTreeHost::prepareCustomFilterProxiesIfNeeded):
539
540 2013-06-10  Seokju Kwon  <seokju.kwon@gmail.com>
541
542         [Qt][GTK] Build fix after r151403
543         https://bugs.webkit.org/show_bug.cgi?id=117452
544
545         Reviewed by Csaba Osztrogonác.
546
547         * UIProcess/API/gtk/PageClientImpl.cpp:
548         (WebKit::PageClientImpl::preferencesDidChange):
549         * UIProcess/API/gtk/PageClientImpl.h:
550         * UIProcess/API/qt/raw/qrawwebview_p_p.h:
551         (QRawWebViewPrivate::preferencesDidChange):
552         * UIProcess/qt/QtPageClient.h:
553         (WebKit::QtPageClient::preferencesDidChange):
554
555 2013-06-10  Commit Queue  <commit-queue@webkit.org>
556
557         Unreviewed, rolling out r151411.
558         http://trac.webkit.org/changeset/151411
559         https://bugs.webkit.org/show_bug.cgi?id=117453
560
561         because it is duplicated with Bug 117441 (Requested by
562         gyuyoung_ on #webkit).
563
564         * UIProcess/efl/WebViewEfl.cpp:
565         * UIProcess/efl/WebViewEfl.h:
566
567 2013-06-10  Jaehun Lim  <ljaehun.lim@samsung.com>
568
569         Fix build error and warning
570         https://bugs.webkit.org/show_bug.cgi?id=117441
571
572         Reviewed by Anders Carlsson.
573
574         * UIProcess/CoordinatedGraphics/WebView.cpp:
575         (WebKit::WebView::preferencesDidChange): Added.
576         (WebKit::WebView::createPopupMenuProxy): Remove 'page'.
577         * UIProcess/CoordinatedGraphics/WebView.h:
578
579 2013-06-10  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
580
581         Unreviewed, EFL Build fix after r151403.
582
583         Added preferencesDidChange to WebViewEfl.
584
585         * UIProcess/efl/WebViewEfl.cpp:
586         (WebKit::WebViewEfl::preferencesDidChange):
587         * UIProcess/efl/WebViewEfl.h:
588
589 2013-06-10  Anders Carlsson  <andersca@apple.com>
590
591         Crash in StorageAreaMap::applyChange when clearing local storage in another web process
592         https://bugs.webkit.org/show_bug.cgi?id=117440
593         <rdar://problem/13961548>
594
595         Reviewed by Tim Horton.
596
597         Add an early return so we won't try to look up a null key in the m_pendingValueChanges map.
598         Also, fix an assertion - it's fine for m_storageMap to be null in applyChange.
599
600         * WebProcess/Storage/StorageAreaMap.cpp:
601         (WebKit::StorageAreaMap::applyChange):
602
603 2013-06-10  Sergio Correia  <sergio.correia@openbossa.org>
604
605         [WK2][CoordinatedGraphics] Add default case to switches to fix strict build
606         https://bugs.webkit.org/show_bug.cgi?id=117416
607
608         Reviewed by Noam Rosenthal.
609
610         This patch fixes a strict build by asserting on the default case of two
611         switch statements where gcc was previously complaining of unhandled cases.
612
613         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
614         (CoreIPC::::encode):
615         (CoreIPC::::decode):
616
617 2013-06-10  Anders Carlsson  <andersca@apple.com>
618
619         -[WKView _updateWindowAndViewFrames] should avoid updating the view frame in window coordinates if we don't have plugins
620         https://bugs.webkit.org/show_bug.cgi?id=117420
621         <rdar://problem/14073034>
622
623         Reviewed by Tim Horton.
624
625         If plug-ins are disabled there's no need for the web process to know about the view frame in window coordinates so only
626         send it when plug-ins are enabled. In addition, if accessibility is disabled we don't need to send a message at all.
627
628         * UIProcess/API/mac/PageClientImpl.h:
629         * UIProcess/API/mac/PageClientImpl.mm:
630         (WebKit::PageClientImpl::preferencesDidChange):
631         Call through to -[WKView _preferencesDidChange].
632
633         * UIProcess/API/mac/WKView.mm:
634         (-[WKView _updateWindowAndViewFrames]):
635         Don't compute viewFrameInWindowCoordinates or accessibilityPosition unless they're required. If neither are required,
636         don't even send a message to the web process.
637
638         (-[WKView _preferencesDidChange]):
639         Update _needsViewFrameInWindowCoordinates and call -[WKView _updateWindowAndViewFrames] if needed.
640
641         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
642         Set _needsViewFrameInWindowCoordinates based on whether plug-ins are enabled or not.
643
644         * UIProcess/WebPageProxy.cpp:
645         (WebKit::WebPageProxy::preferencesDidChange):
646         Call the page client.
647
648 2013-06-10  Bear Travis  <betravis@adobe.com>
649
650         [CSS Shapes][CSS Exclusions] Split CSS Exclusions and CSS Shapes code
651         https://bugs.webkit.org/show_bug.cgi?id=117162
652
653         Reviewed by Alexandru Chiculita.
654
655         Adding the WebCore/rendering/shapes directory to the include list.
656
657         * CMakeLists.txt:
658
659 2013-06-10  Iago Toral Quiroga  <itoral@igalia.com>
660
661         Use Cairo implementation of the WidgetBackingStore instead of X11 when running on Wayland
662         https://bugs.webkit.org/show_bug.cgi?id=116717
663
664         Reviewed by Martin Robinson.
665
666         Decide which implementation of WidgetBackingStore to use (X11 or Cairo)
667         depending on whether we are running on X11 or not. Select Cairo
668         implementation when not running in X11.
669
670         * UIProcess/cairo/BackingStoreCairo.cpp:
671         (WebKit):
672         (WebKit::createBackingStoreForGTK):
673         (WebKit::BackingStore::incorporateUpdate):
674
675 2013-06-09  Jae Hyun Park  <jae.park@company100.net>
676
677         [CoordinatedGraphics] Typo in argument decoder for CoordinatedGraphicsState
678         https://bugs.webkit.org/show_bug.cgi?id=117384
679
680         Reviewed by Noam Rosenthal.
681
682         For CSS Shaders, it must decode state.customFiltersToRemove instead of
683         state.updateAtlasesToRemove.
684
685         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
686         (CoreIPC::::decode):
687
688 2013-06-08  Jae Hyun Park  <jae.park@company100.net>
689
690         [Coordinated Graphics] Pass the ownership of GraphicsSurface explicitly
691         https://bugs.webkit.org/show_bug.cgi?id=117379
692
693         Reviewed by Noam Rosenthal.
694
695         When creating WebCoordinatedSurface with GraphicsSurface, it is clearer
696         to pass the ownership of the created GraphicsSurface explicitly.
697
698         * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
699         (WebKit::WebCoordinatedSurface::create):
700
701 2013-06-07  Anders Carlsson  <andersca@apple.com>
702
703         Coalesce multiple calls to WebPageProxy::windowAndViewFramesChanged
704         https://bugs.webkit.org/show_bug.cgi?id=117364
705         <rdar://problem/14042099>
706
707         Reviewed by Geoffrey Garen.
708
709         -[WKView _updateWindowAndViewFrames] can be called many times per run loop iteration so coalesce calls
710         to WebPageProxy::windowAndViewFrames using dispatch_async.
711
712         * UIProcess/API/mac/WKView.mm:
713         (-[WKView _updateWindowAndViewFrames]):
714
715 2013-06-07  Thomas Deniau  <deniau@apple.com>
716
717         Reproducible crash with triple-finger-tap "define word" gesture on a Netflix video
718         https://bugs.webkit.org/show_bug.cgi?id=117020
719
720         Reviewed by Ryosuke Niwa.
721
722         * WebProcess/WebPage/mac/WebPageMac.mm:
723         (WebKit::WebPage::performDictionaryLookupAtLocation):
724         Don't invoke the Dictionary lookup when we failed to extract the range of the token
725         surrounding the tapped position.
726
727 2013-06-07  Enrique Ocana Gonzalez  <eocanha@igalia.com>
728
729         [GTK] Weird behaviour and no clues to the user when the shared memory file can't be opened
730         https://bugs.webkit.org/show_bug.cgi?id=117063
731
732         Reviewed by Anders Carlsson.
733
734         Log error message when the shared memory file can't be opened in
735         Unix platform using a release build
736
737         * Platform/unix/SharedMemoryUnix.cpp:
738         (WebKit::SharedMemory::create):
739
740 2013-06-07  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
741
742         [EFL][WK2] Context menu spellchecking items are not available when "Check Spelling While Typing" is off
743         https://bugs.webkit.org/show_bug.cgi?id=117190
744
745         Reviewed by Christophe Dumez.
746
747         Context menu items (suggestions, learn and ignore word) are not available
748         due to missing dictionary. To get the suggestions for the misspelled word,
749         the dictionary has to be loaded first.
750
751         WebKit loads the default dictionary when check spelling while typing is being enabled.
752         However, context menu spellchecking items should be present even if this setting is off.
753
754         * UIProcess/API/efl/ewk_context.cpp:
755         (EwkContext::EwkContext):
756         Load the user's default dictionary to ensure context menu spellchecking items.
757         The dictionary is loaded asynchronously so it shouldn't delay application.
758
759         * UIProcess/API/efl/ewk_text_checker.h:
760         Update doc. Spelling suggestions, learn and ignore word should be available
761         independently of checking spelling while typing setting.
762
763         * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:
764         (onContextMenuShow):
765         (TEST_F):
766         Add two unit tests to check whether the default dictionary is loaded and
767         whether the context menu spelling items are available.
768
769         * UIProcess/efl/TextCheckerEfl.cpp:
770         (WebKit::TextChecker::setContinuousSpellCheckingEnabled):
771         (WebKit::TextChecker::continuousSpellCheckingEnabledStateChanged):
772         Not set the default dictionary while enabling the setting, it's already loaded.
773
774 2013-06-07  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
775
776         [EFL][WK2] Implement customContextMenuItemSelected
777         https://bugs.webkit.org/show_bug.cgi?id=117298
778
779         Reviewed by Christophe Dumez.
780
781         When custom context menu item is selected using ewk API, the feedback is not
782         sent back to application, as customContextMenuItemSelected was unimplemented in
783         contextMenuClientEfl.
784
785         * UIProcess/API/efl/EwkView.cpp:
786         (EwkView::customContextMenuItemSelected):
787         * UIProcess/API/efl/EwkView.h:
788         * UIProcess/API/efl/ewk_view.h: added custom_item_selected callback.
789         * UIProcess/efl/ContextMenuClientEfl.cpp:
790         (customContextMenuItemSelected):
791         (ContextMenuClientEfl::ContextMenuClientEfl):
792
793 2013-06-06  Oliver Hunt  <oliver@apple.com>
794
795         Completely initialize ChildProcess state on launch
796         https://bugs.webkit.org/show_bug.cgi?id=117328
797
798         Reviewed by Sam Weinig.
799
800         Use setProcessSuppressionEnabledInternal to avoid setProcessSuppressionEnabled
801         "optimizing" our initialization away.
802
803         * Shared/mac/ChildProcessMac.mm:
804         (WebKit::ChildProcess::platformInitialize):
805
806 2013-06-06  Rafael Brandao  <rafael.lobo@openbossa.org>
807
808         [Gtk] Connection is leaking when WebProcess is terminated
809         https://bugs.webkit.org/show_bug.cgi?id=117293
810
811         Reviewed by Martin Robinson.
812
813         Connection is leaking because WorkQueue::SocketEventSource inherits from
814         WorkQueue::EventSource but when it is destroyed, the actual destructor running
815         is the one from base class; however, subclass contains a function binded from
816         Connection (m_closeFunction) and we need to do this extra cleanup, otherwise
817         WorkQueue will keep Connection alive. A better explanation of this fix is provided
818         on http://stackoverflow.com/questions/461203/when-to-use-virtual-destructors
819
820         A quick way to see the leak is to change WK2 test "ReloadPageAfterCrash" to terminate
821         WebProcess N times and add a printf on Connection destructor.
822
823         * Platform/gtk/WorkQueueGtk.cpp:
824         (WorkQueue::EventSource::~EventSource): Adds a virtual destructor to enable
825         the subclass to do its own cleanup.
826
827 2013-06-06  Jae Hyun Park  <jae.park@company100.net>
828
829         Coordinated Graphics : Refactor CoordinatedSurface to manage the lifecycle of GraphicsContext
830         https://bugs.webkit.org/show_bug.cgi?id=108899
831
832         Reviewed by Noam Rosenthal.
833
834         This is a preparation patch for Threaded Coordinated Graphics.
835
836         This patch changes CoordinatedSurface to be responsible for the
837         lifecycle of GraphicsContext used in Coordinated Graphics System.
838         CoordinatedImageBacking and UpdateAtlas do not ask for the ownership
839         of GraphicsContext anymore. Instead, those classes use client pattern to
840         ask the CoordiantedSurface to paint to the GraphicsContext.
841
842         This refactoring is needed to implement CoordinatedSurface for Threaded
843         Coordinated Graphics.
844
845         * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
846         (WebKit::WebCoordinatedSurface::paintToSurface):
847         * Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
848         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
849         (WebKit::CoordinatedLayerTreeHost::paintToSurface):
850         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
851
852 2013-06-05  Kangil Han  <kangil.han@samsung.com>
853
854         [EFL][WK2] Fix test_ewk2_view unit test timed out issue
855         https://bugs.webkit.org/show_bug.cgi?id=117251
856
857         Reviewed by Christophe Dumez.
858
859         'ewk_view_contents_size_changed' unit test case has been timed out since r150802 because
860         same size is filtered by WebView class. So create one different test html string that has
861         different size to continue unit tests.
862
863         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
864         (onContentsSizeChangedPortrait):
865         (onContentsSizeChangedLandscape):
866         (TEST_F):
867
868 2013-06-05  Bear Travis  <betravis@adobe.com>
869
870         [CSS Exclusions][CSS Shapes] Split CSS Exclusions & Shapes compile & runtime flags
871         https://bugs.webkit.org/show_bug.cgi?id=117172
872
873         Reviewed by Alexandru Chiculita.
874
875         Adding the CSS_SHAPES compile flag.
876
877         * Configurations/FeatureDefines.xcconfig:
878
879 2013-06-05  Anders Carlsson  <andersca@apple.com>
880
881         Crash if an IPC connection is invalidated before it's completely set up
882         https://bugs.webkit.org/show_bug.cgi?id=117274
883         <rdar://problem/13319035>
884
885         Reviewed by Andreas Kling.
886
887         Resume our dispatch sources on the connection queue so we won't get invalidation callbacks before
888         all sources have been set up.
889
890         * Platform/CoreIPC/mac/ConnectionMac.cpp:
891         (CoreIPC::Connection::open):
892         (CoreIPC::Connection::sendOutgoingMessage):
893         (CoreIPC::Connection::initializeDeadNameSource):
894         (CoreIPC::Connection::receiveSourceEventHandler):
895
896 2013-06-05  Tim Horton  <timothy_horton@apple.com>
897
898         [wk2] WebProcess' page-in-window count can be wrong
899         https://bugs.webkit.org/show_bug.cgi?id=117106
900         <rdar://problem/14040991>
901
902         Reviewed by Anders Carlsson.
903
904         If we're using a single WebProcess and a window is closed, we were
905         not decrementing the page-in-window count (because we apparently don't
906         setIsInWindow(false) a WebPage in a closing window before tearing it down).
907
908         Turn the page-in-window count into a HashSet of pageIDs instead.
909
910         * WebProcess/WebPage/WebPage.cpp:
911         (WebKit::WebPage::WebPage):
912         (WebKit::WebPage::setIsInWindow):
913         Send the pageID instead (this change is just so that I don't need to
914         fetch the WebPage in WebProcess::removeWebPage).
915
916         * WebProcess/WebProcess.cpp:
917         (WebKit::WebProcess::WebProcess):
918         Remove m_inWindowPageCount.
919
920         (WebKit::WebProcess::removeWebPage):
921         Ensure that WebPages being torn-down are removed from the in-window WebPage set.
922
923         (WebKit::WebProcess::pageDidEnterWindow):
924         (WebKit::WebProcess::pageWillLeaveWindow):
925         Use our new HashSet instead of a count.
926
927         (WebKit::WebProcess::nonVisibleProcessCleanupTimerFired):
928         Make sure that we don't have any visible pages before doing cleanup.
929
930         * WebProcess/WebProcess.h:
931         Remove m_inWindowPageCount.
932         Add m_inWindowPageSet.
933         Make pageDidEnterWindow/pageWillLeaveWindow take pageID instead of WebPage.
934
935 2013-06-05  Tim Horton  <timothy_horton@apple.com>
936
937         REGRESSION (r148713): Crash under waitForDidUpdateInWindowState
938         https://bugs.webkit.org/show_bug.cgi?id=117268
939         <rdar://problem/13822353>
940
941         Reviewed by Anders Carlsson.
942
943         Check if the WebProcess is valid before waiting for a message from it.
944         Reset the bool that tells us that we have an outstanding didUpdateInWindowState message if the WebProcess quits.
945
946         * UIProcess/WebPageProxy.cpp:
947         (WebKit::WebPageProxy::waitForDidUpdateInWindowState):
948         (WebKit::WebPageProxy::resetStateAfterProcessExited):
949
950 2013-06-05  Gwang Yoon Hwang  <ryumiel@company100.net>
951
952         [Coordinated Graphics] Prevent a recursive painting in CoordinatedGraphicsLayer
953         https://bugs.webkit.org/show_bug.cgi?id=117222
954
955         Reviewed by Noam Rosenthal.
956
957         CoordinatedGraphicsLayer::flushCompositingState() will cross frame
958         boundaries if the GraphicsLayers are connected. In this case,
959         updateContentBuffers will invoke a painting of a sub-frame that causes
960         flushCompositingState recursively.
961
962         To prevent this behavior this patch extracts updateContentBuffers from
963         flushCompositingState, and places it in
964         updateContentBuffersIncludeSublayers, which traverses the tree
965         separately from flushing the state for painting.
966
967         No new tests, covered by existing tests.
968
969         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
970         (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges):
971
972 2013-06-05  Gwang Yoon Hwang  <ryumiel@company100.net>
973
974         [Coordinated Graphics] Rename client classes for CoordinatedImageBacking and UpdateAtlas.
975         https://bugs.webkit.org/show_bug.cgi?id=111948
976
977         Reviewed by Noam Rosenthal.
978
979         This patch renames CoordinatedImageBacking::Coordinator to
980         CoordinatedImageBacking::Client, and UpdateAtlasClient to
981         UpdateAtlas::Client for naming consistency and clarification.
982
983         No new tests, covered by existing tests.
984
985         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
986
987 2013-06-05  Gwang Yoon Hwang  <ryumiel@company100.net>
988
989         [Coordinated Graphics] Unify messages related object's lifecycles into CoordinatedGraphicsState.
990         https://bugs.webkit.org/show_bug.cgi?id=111919
991
992         Reviewed by Noam Rosenthal.
993
994         CoordinatedLayerTreeHostProxy has several methods, which simply passes
995         these calls to CoordinatedGraphicsScene.
996
997         This patch removes methods in CoordinatedLayerTreeHostProxy just for
998         message chaining. Instead of that, messages for creation/deletion of objects
999         (Layers, CustomFilters, UpdateAtlas, and ImageBacking) are unified into
1000         CommitCoordinatedGraphicsState.
1001
1002         And this patch also removes codes for WebCoordinatedSurface in
1003         CoordinatedLayerTreeHost, except for a factory method.
1004         CoordinatedGraphicsArgumentCoders [en|de]codes CoordinatedSurface itself
1005         using WebCoordinatedSurface.
1006
1007         No new tests, covered by existing tests.
1008
1009         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
1010         (CoreIPC::encodeCoordinatedSurface):
1011         (CoreIPC::decodeCoordinatedSurface):
1012         (CoreIPC::::encode):
1013         (CoreIPC::::decode):
1014         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
1015         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
1016         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in:
1017         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1018         (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges):
1019         (WebKit::CoordinatedLayerTreeHost::clearPendingStateChanges):
1020         (WebKit::CoordinatedLayerTreeHost::checkCustomFilterProgramProxies):
1021         (WebKit::CoordinatedLayerTreeHost::removeCustomFilterProgramProxy):
1022         (WebKit::CoordinatedLayerTreeHost::detachLayer):
1023         (WebKit::CoordinatedLayerTreeHost::createImageBacking):
1024         (WebKit::CoordinatedLayerTreeHost::updateImageBacking):
1025         (WebKit::CoordinatedLayerTreeHost::clearImageBackingContents):
1026         (WebKit::CoordinatedLayerTreeHost::removeImageBacking):
1027         (WebKit::CoordinatedLayerTreeHost::createGraphicsLayer):
1028         (WebKit::CoordinatedLayerTreeHost::createUpdateAtlas):
1029         (WebKit::CoordinatedLayerTreeHost::removeUpdateAtlas):
1030         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
1031
1032 2013-06-04  Simon Cooper  <scooper@apple.com>
1033
1034         Tighten plugin sandbox profiles against symlink attacks
1035         https://bugs.webkit.org/show_bug.cgi?id=117219
1036         <rdar://problem/13044569>
1037
1038         Reviewed by Sam Weinig.
1039
1040         This inserts deny rules for creating symbolic links. The rules are
1041         inserted at the end of sandbox profile compilation by overriding the
1042         finalizer.  The initial value of %finalize must be the last function
1043         called.
1044
1045         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
1046
1047 2013-06-04  Chris Fleizach  <cfleizach@apple.com>
1048
1049         AX: WK2: accessibility position is calculated every time window frame is updated
1050         https://bugs.webkit.org/show_bug.cgi?id=117201
1051
1052         Reviewed by Tim Horton.
1053
1054         Only calculate the AX position if AX has already been enabled when updating the
1055         WKView's window and frame.
1056
1057         * UIProcess/API/mac/WKView.mm:
1058         (-[WKView _updateWindowAndViewFrames]):
1059         (-[WKView _accessibilityRegisterUIProcessTokens]):
1060             Don't call accessibilityAttributeValue: here because it could enable accessibility prematurely.
1061         (-[WKView enableAccessibilityIfNecessary]):
1062             After enabling AX for the first time, also update the frame so that the AX position is correct.
1063         (-[WKView accessibilityFocusedUIElement]):
1064         (-[WKView accessibilityHitTest:]):
1065         (-[WKView accessibilityAttributeValue:]):
1066             Tell the AXObjectCache that AX is now enabled.
1067
1068 2013-06-04  Mark Rowe  <mrowe@apple.com>
1069
1070         REGRESSION (r151043): Frequent crashes inside WebPageProxy::getPlugInInformation
1071         <http://webkit.org/b/117180>
1072
1073         Reviewed by Brady Eidson.
1074
1075         * UIProcess/mac/WebPageProxyMac.mm:
1076         (WebKit::WebPageProxy::getPlugInInformation): Return early when plugInProcessProxy is null
1077         since there's nothing we can do.
1078
1079 2013-06-04  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
1080
1081         [EFl][WK2] Sub menu items should be of EWK_SUBMENU_TYPE and not checkable
1082         https://bugs.webkit.org/show_bug.cgi?id=116959
1083
1084         Reviewed by Gyuyoung Kim.
1085
1086         Currently using ewk API it is possible to create a sub menu item which is not an EWK_SUBMENU_TYPE
1087         or set checkable flag for it, while it is not possible for items created by WebKit. 
1088         This patch changes ewk context menu API to match WebKit2 behaviour, by creating sub menus with
1089         proper type and checkable flags.
1090
1091         * UIProcess/API/efl/ewk_context_menu_item.cpp:
1092         (ewk_context_menu_item_new_with_submenu):
1093         * UIProcess/API/efl/ewk_context_menu_item.h:
1094         * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:
1095         (showContextMenu):
1096
1097 2013-06-04  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
1098
1099         [EFL][WK2] Custom context menu items cannot be selected
1100         https://bugs.webkit.org/show_bug.cgi?id=116830
1101
1102         Reviewed by Gyuyoung Kim.
1103
1104         Custom item added using ewk_context_menu_item_append had no
1105         pointer to parent menu, and custom submenu added using with the
1106         the same function had no pointer to EwkView. Both issues
1107         prevented items to be selected.
1108
1109         * UIProcess/API/efl/ewk_context_menu.cpp:
1110         (EwkContextMenu::appendItem):
1111         (EwkContextMenu::contextMenuItemSelected):
1112         (ewk_context_menu_item_append):
1113         (ewk_context_menu_item_select):
1114         * UIProcess/API/efl/ewk_context_menu_private.h:
1115         (EwkContextMenu):
1116         (EwkContextMenu::setEwkView):
1117
1118 2013-06-03  Simon Cooper  <scooper@apple.com>
1119
1120         Unable to play videos in Safari using QuickTime plug-in until I've played those videos in Chrome first
1121         https://bugs.webkit.org/show_bug.cgi?id=117174
1122         <rdar://problem/13711687>
1123
1124         Reviewed by Alexey Proskuryakov.
1125
1126         Pull in fixes that allow https connections within the plugin
1127         environment.
1128
1129         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
1130
1131 2013-06-03  Marcelo Lira  <marcelo.lira@openbossa.org>
1132
1133         [WK2] REGRESSION(r150798): scrolling coordinator is not being enabled when WebPage is set to use fixed layout
1134         https://bugs.webkit.org/show_bug.cgi?id=117163
1135
1136         Reviewed by Darin Adler.
1137
1138         Moved call to WebPage::settings()->setScrollingCoordinatorEnabled()
1139         from CoordinatedLayerTreeHost constructor to WebPage::setUseFixedLayout().
1140         The scrolling coordinator must be enabled or disabled following the
1141         WebPage's use of fixed layout.
1142
1143         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1144         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
1145         * WebProcess/WebPage/WebPage.cpp:
1146         (WebKit::WebPage::setUseFixedLayout):
1147
1148 2013-06-03  Anders Carlsson  <andersca@apple.com>
1149
1150         Send mouse events to the banner for as long as the mouse button is down
1151         https://bugs.webkit.org/show_bug.cgi?id=117161
1152         <rdar://problem/13821220>
1153
1154         Reviewed by Beth Dakin.
1155
1156         Keep track of whether the mouse was pressed in a banner and keep sending mouse events to it,
1157         even if they are outside the banner's bounds for as long as the mouse is down.
1158
1159         * WebProcess/WebPage/PageBanner.h:
1160         * WebProcess/WebPage/mac/PageBannerMac.mm:
1161         (WebKit::PageBanner::PageBanner):
1162         (WebKit::PageBanner::mouseEvent):
1163
1164 2013-06-03  Sergio Correia  <sergio.correia@openbossa.org>
1165
1166         [EFL][WK2] Process launcher uses system() for wrapping the WebProcess when using WEB_PROCESS_CMD_PREFIX
1167         https://bugs.webkit.org/show_bug.cgi?id=105156
1168
1169         Reviewed by Christophe Dumez.
1170
1171         When using WEB_PROCESS_CMD_PREFIX - which allows us for instance to analyze
1172         WebProcess under tools like valgrind or gdb -, the ProcessLauncher would
1173         spawn the new process using system(), which would, among other things, keep
1174         an extra UIProcess waiting and executing the shell.
1175
1176         This patch handles the normal case and the case where we have something to
1177         prefix WebProcess (i.e., by using WEB_PROCESS_CMD_PREFIX in a debug build)
1178         the same way, through a call to execvp().
1179
1180         To achieve this a function was introduced to create an array with the given
1181         arguments to the full command to be executed, to be used by execvp(). We use
1182         a Vector<OwnArrayPtr<char>>, so that we can take advantage of the destructor
1183         of OwnArrayPtr to handle the memory deallocation when it goes out of scope.
1184
1185         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
1186         (WebKit::createArgsArray):  This function creates the array to be used by
1187         execvp(), out of the Strings given as arguments.
1188         (WebKit::ProcessLauncher::launchProcess): Rework the logic to accomodate
1189         both the cases with and without WEB_PROCESS_CMD_PREFIX. The execl() call
1190         was replaced with an execvp() call, since now we should deal with having
1191         a variable number of arguments (WEB_PROCESS_CMD_PREFIX) as well.
1192
1193 2013-06-02  Arunprasad Rajkumar  <arurajku@cisco.com>
1194
1195         [Qt] Move Qt port off legacy clipboard
1196         https://bugs.webkit.org/show_bug.cgi?id=116416
1197
1198         Reviewed by Darin Adler.
1199
1200         * WebProcess/WebCoreSupport/qt/WebDragClientQt.cpp:
1201         (WebKit::WebDragClient::startDrag):
1202
1203 2013-06-02  Sergio Correia  <sergio.correia@openbossa.org>
1204
1205         [WK2][CoordinatedGraphics]: Use a properly initialized WebPage when creating a PageClient
1206         https://bugs.webkit.org/show_bug.cgi?id=117116
1207
1208         Reviewed by Tim Horton.
1209
1210         Valgrind reported a "conditional jump or move depends on uninitialised value"
1211         at WebPageProxy constructor, when checking the m_isVisible variable inside
1212         the ENABLE(PAGE_VISIBILITY_API) guard.
1213
1214         The issue was tracked down to the WebView constructor, which was creating a
1215         WebKit::PageClient* making use of `this' before having initialized all of its
1216         attributes.
1217
1218         The solution was to move the initialization of the `page' member to inside the
1219         constructor itself - out of the initialization list -, where we can guarantee
1220         all the relevant stuff has already been properly initialized.
1221
1222         Here's the relevant valgrind trace for reference:
1223
1224         Conditional jump or move depends on uninitialised value(s)
1225             at 0x65A35A4: WebKit::WebPageProxy::WebPageProxy(WebKit::PageClient*,
1226                           WTF::PassRefPtr<WebKit::WebProcessProxy>,
1227                           WebKit::WebPageGroup*, unsigned long) (WebPageProxy.cpp:322)
1228             by 0x65A2BA2: WebKit::WebPageProxy::create(WebKit::PageClient*,
1229                           WTF::PassRefPtr<WebKit::WebProcessProxy>,
1230                           WebKit::WebPageGroup*, unsigned long) (WebPageProxy.cpp:233)
1231             by 0x65E94BB: WebKit::WebProcessProxy::createWebPage(WebKit::PageClient*,
1232                           WebKit::WebContext*, WebKit::WebPageGroup*)
1233                           (WebProcessProxy.cpp:172)
1234             by 0x6570957: WebKit::WebContext::createWebPage(WebKit::PageClient*,
1235                           WebKit::WebPageGroup*, WebKit::WebPageProxy*)
1236                           (WebContext.cpp:735)
1237             by 0x67673E3: WebKit::WebView::WebView(WebKit::WebContext*,
1238                           WebKit::WebPageGroup*) (WebView.cpp:52)
1239             by 0x6775F18: WebKit::WebViewEfl::WebViewEfl(WebKit::WebContext*,
1240                           WebKit::WebPageGroup*) (WebViewEfl.cpp:54)
1241             by 0x6775EB4: WebKit::WebView::create(WebKit::WebContext*,
1242                           WebKit::WebPageGroup*) (WebViewEfl.cpp:49)
1243             by 0x673E13D: WKViewCreate (WKView.cpp:33)
1244             by 0x6763ECE: EWKViewCreate (ewk_view.cpp:92)
1245
1246         * UIProcess/CoordinatedGraphics/WebView.cpp:
1247         (WebKit::WebView::WebView):
1248
1249 2013-05-31  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1250
1251         [EFL][WK2] Add a null checking condition to in hide() of EwkContextMenu
1252         https://bugs.webkit.org/show_bug.cgi?id=117014
1253
1254         Reviewed by Christophe Dumez.
1255
1256         m_viewImpl is able to be null. So, we need to protect this function against such case.
1257
1258         * UIProcess/API/efl/ewk_context_menu.cpp:
1259         (EwkContextMenu::hide):
1260         (ewk_context_menu_hide):
1261         * UIProcess/API/efl/ewk_context_menu_private.h:
1262         (EwkContextMenu):
1263
1264 2013-05-31  Oliver Hunt  <oliver@apple.com>
1265
1266         Fix bug in active page tracking that lead to plugins hanging during destruction
1267         https://bugs.webkit.org/show_bug.cgi?id=117099
1268
1269         Reviewed by Anders Carlsson.
1270
1271         NPRuntimeObjectMap no longer keeps its own reference to the
1272         throttler, and no longer reports activity during destruction.
1273
1274         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
1275         (WebKit::NPRuntimeObjectMap::NPRuntimeObjectMap):
1276         (WebKit::NPRuntimeObjectMap::evaluate):
1277         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
1278         * WebProcess/Plugins/PluginView.cpp:
1279         (WebKit::PluginView::PluginView):
1280
1281 2013-05-31  Tim Horton  <timothy_horton@apple.com>
1282
1283         [wk2] All intrinsic content size changes should go through the 0-delay timer
1284         https://bugs.webkit.org/show_bug.cgi?id=117058
1285         <rdar://problem/13935042>
1286
1287         Reviewed by Anders Carlsson.
1288
1289         In r146913, I added a 0-delay timer so that we'd coalesce intrinsic
1290         content size changes. However, didUpdateGeometry was still immediately
1291         invalidating the intrinsic content size without coalescing.
1292
1293         Move that update to the WebProcess to share the timer.
1294
1295         * UIProcess/DrawingAreaProxy.h:
1296         (WebKit::DrawingAreaProxy::didUpdateGeometry):
1297         * UIProcess/DrawingAreaProxy.messages.in:
1298         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
1299         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
1300         (WebKit::TiledCoreAnimationDrawingAreaProxy::didUpdateGeometry):
1301         Remove the newIntrinsicContentSize argument, and don't invalidate intrinsic
1302         content size inside didUpdateGeometry.
1303
1304         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1305         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
1306         Start the intrinsic content size update timer when we finish updateGeometry.
1307
1308 2013-05-31  Alexey Proskuryakov  <ap@apple.com>
1309
1310         Sandbox violations when trying to access fonts in non-standard locations
1311         https://bugs.webkit.org/show_bug.cgi?id=117097
1312         <rdar://problem/9264746>
1313
1314         Reviewed by Anders Carlsson.
1315
1316         The issue was that lack of a main xib was resulting in font machinery being
1317         initialized too early, before we entered sandbox.
1318
1319         * Resources/WebContentProcess.xib: Added.
1320         * WebKit2.xcodeproj/project.pbxproj:
1321         * WebProcess/EntryPoint/mac/LegacyProcess/Info.plist:
1322         * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info.plist:
1323         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist:
1324
1325 2013-05-31  Alexey Proskuryakov  <ap@apple.com>
1326
1327         <rdar://problem/14036464> Sandbox violation when using Web SpeechSynthesis
1328
1329         Reviewed by Anders Carlsson
1330
1331         * WebProcess/com.apple.WebProcess.sb.in: Allow com.apple.speech.synthesis.console.
1332
1333 2013-05-31  Jessie Berlin  <jberlin@apple.com>
1334
1335         Need the ability to get the information for a plug-in with a particular process id that may
1336         be running on a page
1337         https://bugs.webkit.org/show_bug.cgi?id=117090
1338
1339         Rubber-stamped by Anders Carlsson.
1340
1341         Follow-up to r151043 incorprating some feedback I got from Darin after I had already
1342         committed the patch.
1343
1344         * UIProcess/API/C/mac/WKPagePrivateMac.cpp:
1345         (callGetPlugInInformationBlockAndDispose):
1346         Renamed to be less wordy.
1347         (WKPageGetPlugInInformation):
1348         Ditto.
1349         * UIProcess/API/C/mac/WKPagePrivateMac.h:
1350         Ditto.
1351
1352         * UIProcess/Plugins/PluginProcessManager.h:
1353         * UIProcess/Plugins/mac/PluginProcessManagerMac.mm:
1354         (WebKit::PluginProcessManager::findPlugInProcessByID):
1355         Renamed to not use "Cocoa method style" in non-Cocoa functions.
1356         (WebKit::PluginProcessManager::findPlugInProcessByToken):
1357         Ditto.
1358
1359         * UIProcess/WebPageProxy.h:
1360         * UIProcess/mac/WebPageProxyMac.mm:
1361         (WebKit::WebPageProxy::getPlugInInformation):
1362         Reduce ref count churn and fix a variable name.
1363         Updated for the change to findPlugInProcessByID.
1364         (WebKit::WebPageProxy::containsPlugInCallback):
1365         Updated for the change to findPlugInProcessByToken.
1366
1367         * WebProcess/Plugins/PDF/SimplePDFPlugin.h:
1368         Move the override of a virtual function to the private section.
1369
1370 2013-05-31  Jessie Berlin  <jberlin@apple.com>
1371
1372         Need the ability to get the information for a plug-in with a particular process id that may
1373         be running on a page
1374         https://bugs.webkit.org/show_bug.cgi?id=117090
1375
1376         Reviewed by Anders Carlsson.
1377
1378         * UIProcess/API/C/mac/WKPagePrivateMac.cpp:
1379         (callGetInformationForPlugInWithProcessIDBlockAndDispose):
1380         Get the block from the context, invoke it with the result, and dispose of it.
1381         (WKPageGetInformationForPlugInWithProcessID):
1382         Ask the WebPageProxy and provide it with a dictionary callback that uses the
1383         above function to invoke the passed in block.
1384         * UIProcess/API/C/mac/WKPagePrivateMac.h:
1385         Add WKPageGetInformationForPlugInWithProcessID and a typedef for the callback block.
1386
1387         * UIProcess/Plugins/PluginProcessManager.h:
1388         Add ways to get the PluginProcessProxy associated with a process id or process token.
1389         * UIProcess/Plugins/mac/PluginProcessManagerMac.mm:
1390         (WebKit::PluginProcessManager::plugInProcessWithProcessID):
1391         Return the first PluginProcessProxy with the passed in process ID.
1392         (WebKit::PluginProcessManager::plugInProcessWithToken):
1393         Return the first PluginProcessProxy with the passed in process token.
1394
1395         * UIProcess/WebPageProxy.cpp:
1396         (WebKit::WebPageProxy::close):
1397         Invalidate any outstanding requests for plug-in information.
1398         * UIProcess/WebPageProxy.h:
1399         Keep track of the callbacks for the requests for plug-in information.
1400         * UIProcess/WebPageProxy.messages.in:
1401         * UIProcess/mac/WebPageProxyMac.mm:
1402         (WebKit::WebPageProxy::getInformationForPlugInWithProcessID):
1403         If there are no known plug-ins with the provided process ID, invoke the callback with a null
1404         dictionary of plug-in information.
1405         Otherwise, keep track of the callback and send a message to the web process asking for the
1406         information.
1407         (WebKit::WebPageProxy::containsPlugInCallback):
1408         If the page did not contain the plug-in, invoke the callback with a null dictionary of
1409         plug-in information.
1410         Invoke the callback with a dictionary containing the PlugInModuleInfo.
1411
1412         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1413         Return 0 for the plugInProcessToken.
1414         * WebProcess/Plugins/PDF/SimplePDFPlugin.h:
1415         Ditto.
1416         * WebProcess/Plugins/Plugin.h:
1417         Add a pure virtual method for plugInProcessToken so it can be accessed from from the Plugin
1418         on the PluginView.
1419         * WebProcess/Plugins/PluginProxy.h:
1420         Return the actual plug-in process token.
1421
1422         * WebProcess/Plugins/PluginView.h:
1423         (WebKit::PluginView::plugIn):
1424         Make it possible to get at the plug-in process token through the Plugin.
1425
1426         * WebProcess/WebPage/WebPageMac.mm:
1427         (WebKit::WebPage::containsPluginViewsWithPluginProcessToken):
1428         If there is an instance of the plug-in with that token, send a confirmation to the ui
1429         process.
1430         * WebProcess/WebPage/WebPage.h:
1431         * WebProcess/WebPage/WebPage.messages.in:
1432
1433 2013-05-31  Alexey Proskuryakov  <ap@apple.com>
1434
1435         REGRESSION (r141445): MPEG-4 videos do not play on certain hardware configurations
1436         https://bugs.webkit.org/show_bug.cgi?id=117089
1437         <rdar://problem/13839717>
1438
1439         Reviewed by Mark Rowe.
1440
1441         * Configurations/WebContentProcess.xcconfig: Statically link to a framework that
1442         uses an XPC service to work around a libxpc limitation on Lion.
1443
1444 2013-05-31  Dean Jackson  <dino@apple.com>
1445
1446         Don't create an accelerated compositing layer unless we have to for snapshotting plug-ins
1447         https://bugs.webkit.org/show_bug.cgi?id=117076
1448         <rdar://problem/14030364>
1449
1450         Reviewed by Beth Dakin and Anders Carlsson.
1451
1452         If a plug-in can support software snapshotting, then don't create an
1453         accelerated compositing layer for it while in snapshot mode. This is a
1454         better user experience -- otherwise the page/plug-in looks like it broke.
1455
1456         * WebProcess/Plugins/PluginView.cpp:
1457         (WebKit::PluginView::isAcceleratedCompositingEnabled): If we are in snapshotting mode
1458         and we are a Flash plugin (the only one that supports software snapshots at the moment)
1459         then do not create an accelerated compositing layer.
1460
1461 2013-05-30  Tim Horton  <timothy_horton@apple.com>
1462
1463         It's easy to hit ASSERT_NOT_REACHED in WKDOMNodeClass
1464         https://bugs.webkit.org/show_bug.cgi?id=117051
1465
1466         Reviewed by Anders Carlsson.
1467
1468         Re-add the ASSERT_NOT_REACHED, and return [WKDOMNode class] in the case
1469         where we don't have a specific subclass.
1470
1471         * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
1472         (WebKit::WKDOMNodeClass):
1473
1474 2013-05-31  Stephanie Lewis  <slewis@apple.com>
1475
1476         Update low memory handler to use new memory pressure notifications on new OS versions.
1477         <rdar://problem/14027095>
1478
1479         Reviewed by Mark Rowe.
1480
1481         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1482         (InitWebCoreSystemInterface):
1483
1484 2013-05-30  Tim Horton  <timothy_horton@apple.com>
1485
1486         Remove ASSERT_NOT_REACHED from WKDOMNodeClass
1487         https://bugs.webkit.org/show_bug.cgi?id=117051
1488
1489         Reviewed by Anders Carlsson.
1490
1491         It's easy to fail this assertion in seemingly-legitimate cases.
1492
1493         * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
1494         (WebKit::WKDOMNodeClass):
1495
1496 2013-05-29  Jeffrey Pfau  <jpfau@apple.com>
1497
1498         [Mac] Enable cache partitioning and the public suffix list on 10.8
1499         <rdar://problem/13679019>
1500
1501         Rubber-stamped by David Kilzer.
1502
1503         * Configurations/FeatureDefines.xcconfig:
1504
1505 2013-05-30  Andreas Kling  <akling@apple.com>
1506
1507         Fix double hash lookup in WebPage::determinePrimarySnapshottedPlugIn() loop.
1508         <http://webkit.org/b/117032>
1509
1510         Reviewed by Anders Carlsson.
1511
1512         * WebProcess/WebPage/WebPage.cpp:
1513         (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
1514
1515 2013-05-29  Tim Horton  <timothy_horton@apple.com>
1516
1517         Expose incrementalRenderingSuppressionTimeout via WK2
1518         https://bugs.webkit.org/show_bug.cgi?id=117015
1519         <rdar://problem/13992853>
1520
1521         Reviewed by Darin Adler.
1522
1523         * Shared/WebPreferencesStore.h:
1524         * UIProcess/API/C/WKPreferencesPrivate.h:
1525         Add IncrementalRenderingSuppressionTimeout preference.
1526
1527         * UIProcess/API/C/WKPreferences.cpp:
1528         (WKPreferencesSetIncrementalRenderingSuppressionTimeout): Added.
1529         (WKPreferencesGetIncrementalRenderingSuppressionTimeout): Added.
1530
1531         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1532         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1533         (WebKit::WebFrameLoaderClient::forcePageTransitionIfNeeded): Added.
1534         Call didCompletePageTransition, which un-freezes the layer tree.
1535
1536         * WebProcess/WebPage/WebPage.cpp:
1537         (WebKit::WebPage::didCompletePageTransition):
1538         Fix some indentation.
1539
1540         (WebKit::WebPage::updatePreferences):
1541         Forward the timeout value through to WebCore.
1542
1543 2013-05-29  Simon Fraser  <simon.fraser@apple.com>
1544
1545         Fix paint-related milestones to not fire when the layer tree is frozen
1546         https://bugs.webkit.org/show_bug.cgi?id=117012
1547
1548         Reviewed by Tim Horton.
1549         
1550         Implement ChromeClient::layerTreeStateIsFrozen() to return
1551         the frozen state of the drawing area.
1552
1553         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1554         (WebKit::WebChromeClient::layerTreeStateIsFrozen):
1555         * WebProcess/WebCoreSupport/WebChromeClient.h:
1556         (WebChromeClient):
1557
1558 2013-05-29  Anders Carlsson  <andersca@apple.com>
1559
1560         WebKit should expose HSTS APIs to determine whether a host is in the HSTS cache and to reset HSTS policies
1561         https://bugs.webkit.org/show_bug.cgi?id=117010
1562         <rdar://problem/13689666>
1563
1564         Reviewed by Tim Horton.
1565
1566         * UIProcess/API/C/mac/WKContextPrivateMac.h:
1567         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
1568         * UIProcess/API/C/mac/WKPagePrivateMac.cpp:
1569         * UIProcess/API/C/mac/WKPagePrivateMac.h:
1570         * UIProcess/WebContext.h:
1571         (WebContext):
1572         * UIProcess/mac/WebContextMac.mm:
1573         (WebKit):
1574         (WebKit::privateBrowsingSession):
1575         (WebKit::WebContext::isURLKnownHSTSHost):
1576         (WebKit::WebContext::resetHSTSHosts):
1577
1578 2013-05-29  Tim Horton  <timothy_horton@apple.com>
1579
1580         WKViews using shouldClipToVisibleRect=YES should respect prepareContentInRect: if called
1581         https://bugs.webkit.org/show_bug.cgi?id=116989
1582         <rdar://problem/14007440>
1583
1584         Reviewed by Anders Carlsson.
1585
1586         * UIProcess/API/mac/WKView.mm:
1587         (-[WKView prepareContentInRect:]):
1588         If prepareContentInRect: is called, save the rect and set a flag so we know we should use it.
1589
1590         (-[WKView _updateViewExposedRect]):
1591         Give the WebPage (and later the DrawingArea) the union of the rect handed to prepareContentInRect:
1592         and the WKView's visibleRect, if we're in that mode, so that applications that do their own scrolling
1593         can cause tiles to be created in currently offscreen views (for overdraw).
1594
1595         (-[WKView setFrameSize:]):
1596         (-[WKView _updateWindowAndViewFrames]):
1597         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
1598         (-[WKView enableFrameSizeUpdates]):
1599         (-[WKView setShouldClipToVisibleRect:]):
1600         (-[WKView forceAsyncDrawingAreaSizeUpdate:]):
1601         Use [_updateViewExposedRect].
1602
1603 2013-05-28  Oliver Hunt  <oliver@apple.com>
1604
1605         Add more accurate activity state tracking
1606         https://bugs.webkit.org/show_bug.cgi?id=116893
1607
1608         Reviewed by Gavin Barraclough.
1609
1610         This extends the logic in WebCore from a Page to Process
1611         granularity, so we will avoid lowering the child process
1612         priority if there is active content.  This also plumbs in
1613         the logic to allow plugins to report that they have done
1614         something "interesting".  Currently this is somewhat conservative
1615         but even this is sufficient to fix some stuttering issues
1616         that we've seen.
1617
1618         * Shared/ChildProcess.cpp:
1619         (WebKit::ChildProcess::ChildProcess):
1620         * Shared/ChildProcess.h:
1621         (ChildProcess):
1622         (WebKit::ChildProcess::processSuppressionEnabled):
1623         (WebKit::ChildProcess::incrementActiveTaskCount):
1624         (WebKit::ChildProcess::decrementActiveTaskCount):
1625         * Shared/mac/ChildProcessMac.mm:
1626         (WebKit):
1627         (WebKit::ChildProcess::setProcessSuppressionEnabledInternal):
1628         (WebKit::ChildProcess::setProcessSuppressionEnabled):
1629         (WebKit::ChildProcess::incrementActiveTaskCount):
1630         (WebKit::ChildProcess::decrementActiveTaskCount):
1631         (WebKit::ChildProcess::suspensionHysteresisTimerFired):
1632         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
1633         (WebKit::NPRuntimeObjectMap::NPRuntimeObjectMap):
1634         (WebKit::NPRuntimeObjectMap::evaluate):
1635         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
1636         (WebCore):
1637         (NPRuntimeObjectMap):
1638         * WebProcess/Plugins/PluginView.cpp:
1639         (WebKit::PluginView::PluginView):
1640         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1641         (WebKit::WebChromeClient::incrementActivePageCount):
1642         (WebKit):
1643         (WebKit::WebChromeClient::decrementActivePageCount):
1644         * WebProcess/WebCoreSupport/WebChromeClient.h:
1645         (WebChromeClient):
1646
1647 2013-05-29  Anders Carlsson  <andersca@apple.com>
1648
1649         Return earlier if there's no session storage namespace
1650         https://bugs.webkit.org/show_bug.cgi?id=116984
1651         <rdar://problem/13976781>
1652
1653         Reviewed by Tim Horton.
1654
1655         If we can't find a session storage namespace, return before creating an entry in the m_storageAreasByConnection
1656         hash map since then we'll crash trying to remove it later.
1657
1658         * UIProcess/Storage/StorageManager.cpp:
1659         (WebKit::StorageManager::createSessionStorageMap):
1660
1661 2013-05-29  Martin Robinson  <mrobinson@igalia.com>
1662
1663         Fix more CMake GTK+ build issues after r150336
1664
1665         * CMakeLists.txt: We need to allow for setting the WebProcess output name, since
1666         WebKitGTK+ expects it to be called WebKitWebProcess.
1667         * PlatformGTK.cmake: No longer set WebProcess_EXECUTABLE_NAME as it's been replaced
1668         by WebKit2_WebProcess_OUTPUT_NAME.
1669
1670 2013-05-29  Marcelo Lira  <marcelo.lira@openbossa.org>
1671
1672         [WK2][CoordinatedGraphics][EFL] WKViewUserViewportToContents() function doesn't do what it says
1673         https://bugs.webkit.org/show_bug.cgi?id=116683
1674
1675         Reviewed by Noam Rosenthal.
1676
1677         WKViewUserViewportToContents now converts WebView coordinates to
1678         page contents coordinates, taking into account factors as content
1679         scale and scroll, and also device scale.
1680
1681         The function WKViewUserViewportToScene was added to convert WebView
1682         coordinates to the coordinates of the canvas/scene where the view
1683         is drawn, and EwkView was fixed to use it, instead of
1684         WKViewUserViewportToContents.
1685
1686         * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
1687         (WKViewUserViewportToScene):
1688         * UIProcess/API/C/CoordinatedGraphics/WKView.h:
1689         * UIProcess/API/efl/EwkView.cpp:
1690         (EwkView::createGLSurface):
1691         * UIProcess/CoordinatedGraphics/WebView.cpp:
1692         (WebKit::WebView::userViewportToContents):
1693         (WebKit):
1694         (WebKit::WebView::userViewportToScene):
1695         (WebKit::WebView::transformToScene):
1696         * UIProcess/CoordinatedGraphics/WebView.h:
1697         (WebView):
1698
1699 2013-05-29  Carlos Garcia Campos  <cgarcia@igalia.com>
1700
1701         Unreviewed. Fix make distcheck.
1702
1703         * GNUmakefile.am: Add WebCoreLayerGtk2.a to DISTCLEANFILES.
1704
1705 2013-05-29  Seokju Kwon  <seokju.kwon@gmail.com>
1706
1707         [GTK] Clean up WebKit2 GNUmakefile.am
1708         https://bugs.webkit.org/show_bug.cgi?id=116907
1709
1710         Reviewed by Martin Robinson.
1711
1712         Removed WebNotificationManagerProxy.messages.in after r150785.
1713
1714         * GNUmakefile.am:
1715
1716 2013-05-28  Alexey Proskuryakov  <ap@apple.com>
1717
1718         Freeze when loading a particular page on washingtonpost.com with NetworkProcess enabled
1719         https://bugs.webkit.org/show_bug.cgi?id=116887
1720         <rdar://problem/12965959>
1721
1722         Reviewed by Darin Adler.
1723
1724         * Shared/cf/ArgumentCodersCF.cpp:
1725         (CoreIPC::encode):
1726         (CoreIPC::decode):
1727         Fix for the bug: use good shared WebCore code to manipulate CFURLs. Also, added
1728         a FIXME about empty URLs.
1729
1730         * Shared/API/c/cf/WKURLCF.cpp: (WKURLCreateWithCFURL): Fixed to not use
1731         CFURLGetString, as that could prevent loading certain resources, like ones with
1732         curly braces in resource specifiers. We want KURL normalization, not CFURL one.
1733
1734 2013-05-28  Tim Horton  <timothy_horton@apple.com>
1735
1736         Rendering suppression extension tokens shouldn't be 0, should handle overflow
1737         https://bugs.webkit.org/show_bug.cgi?id=116886
1738         <rdar://problem/14004474>
1739
1740         Reviewed by Darin Adler.
1741
1742         Don't use invalid HashSet values as tokens, and ensure that
1743         we're not already using a token before returning it.
1744
1745         * WebProcess/WebPage/WebPage.cpp:
1746         (WebKit::WebPage::extendIncrementalRenderingSuppression):
1747
1748 2013-05-28  Lauro Neto <lauro.neto@openbossa.org>
1749
1750         [GTK] Connection issues in repeated WebProcess crash/reloads.
1751         https://bugs.webkit.org/show_bug.cgi?id=115880
1752
1753         Reviewed by Anders Carlsson.
1754
1755         When stressing the WebProcess creation/destruction, WebKitGTK can
1756         often run into socket issues like bad file descriptor errors or
1757         polling a socket indefinitely.
1758
1759         Currently WebKitGTK has three places where a socket can be
1760         closed.
1761
1762         - childFinishedFunction (in ProcessLauncherGtk.cpp)
1763         - Connection::platformInvalidate (in ConnectionUnix.cpp)
1764         - WorkQueue EventSource destruction (in WorkQueueGtk.cpp)
1765
1766         To avoid these race conditions, socket closing will be handled
1767         by the event source callback in WorkQueueGtk.cpp.
1768
1769         * Platform/CoreIPC/unix/ConnectionUnix.cpp:
1770         (CoreIPC::Connection::platformInvalidate): Do not close the socket
1771         when the connection is invalidated, the socket event source is
1772         unregistered in this method and the socket is closed when the
1773         GSocket associated to the event source is destroyed.
1774         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
1775         (WebKit::ProcessLauncher::launchProcess): Do not monitor child
1776         process to close the connection on termination. This was needed in
1777         the past when we used DGRAM sockets, we currently use always
1778         connection oriented sockets, so that when the other end closes
1779         the connection we are notified and the connection is invalidated.
1780
1781 2013-05-28  Martin Robinson  <mrobinson@igalia.com>
1782
1783         Fix GTK+ CMake build
1784
1785         * PlatformGTK.cmake: After r150336, the name of the WebKit2
1786         library target is simply "WebKit2."
1787
1788 2013-05-28  Marcelo Lira  <marcelo.lira@openbossa.org>
1789
1790         [WK2][CoordinatedGraphics] DrawingArea's visible content area must be updated when contents size changes
1791         https://bugs.webkit.org/show_bug.cgi?id=116845
1792
1793         Reviewed by Noam Rosenthal.
1794
1795         * UIProcess/CoordinatedGraphics/WebView.cpp:
1796         (WebKit::WebView::didChangeContentsSize):
1797
1798 2013-05-28  Noam Rosenthal  <noam@webkit.org>
1799
1800         [Qt] REGRESSION(r149292): broke scrolling in Qt WK2 desktop mode
1801         https://bugs.webkit.org/show_bug.cgi?id=116597
1802
1803         ScrollingCoordinatorCoordinatedGraphics is tailored specifically for
1804         fixedLayout mode. When fixedLayout is not set, it should be turned off.
1805
1806         Reviewed by Allan Sandfeld Jensen.
1807
1808         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1809         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
1810
1811 2013-05-28  Andreas Kling  <akling@apple.com>
1812
1813         Document::setFocusedNode() should be setFocusedElement().
1814         <http://webkit.org/b/116857>
1815
1816         Reviewed by Antti Koivisto.
1817
1818         * WebProcess/Plugins/PluginView.cpp:
1819         (WebKit::PluginView::focusPluginElement):
1820         * WebProcess/WebPage/WebPage.cpp:
1821         (WebKit::WebPage::focusedPluginViewForFrame):
1822         (WebKit::WebPage::setInitialFocus):
1823
1824 2013-05-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1825
1826         [EFL][WK2] Clean up duplicated include files.
1827         https://bugs.webkit.org/show_bug.cgi?id=116851
1828
1829         Reviewed by Christophe Dumez.
1830
1831         Remove some of duplicated include file in ewk files.
1832
1833         * UIProcess/API/efl/EwkView.h:
1834         * UIProcess/API/efl/ewk_color_picker.cpp:
1835         * UIProcess/API/efl/ewk_context_menu.cpp:
1836         * UIProcess/API/efl/ewk_security_origin_private.h:
1837
1838 2013-05-28  Ryuan Choi  <ryuan.choi@samsung.com>
1839
1840         [EFL] pc files should have harfbuzz dependency.
1841         https://bugs.webkit.org/show_bug.cgi?id=116852
1842
1843         Reviewed by Gyuyoung Kim.
1844
1845         * efl/ewebkit2.pc.in: Added harfbuzz as Required package.
1846
1847 2013-05-27  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1848
1849         [EFL][WK2] Remove unneeded WebCore namespace use in ewk
1850         https://bugs.webkit.org/show_bug.cgi?id=116707
1851
1852         Reviewed by Christophe Dumez.
1853
1854         * UIProcess/API/efl/ewk_security_origin.cpp: Remove "using namespace WebCore".
1855         * UIProcess/API/efl/ewk_text_checker.cpp: ditto.
1856
1857 2013-05-26  Jon Lee  <jonlee@apple.com>
1858
1859         [WK2] Notifications clobber each other with multiple processes
1860         https://bugs.webkit.org/show_bug.cgi?id=116428
1861         <rdar://problem/13935191>
1862
1863         Reviewed by Darin Adler.
1864
1865         With multiple processes, the notification IDs, when passed up to the UI process, can clobber
1866         each other. To fix this, we need to maintain a global map of notification IDs. This map is
1867         keyed by its own unique notification ID, and maps to a pair containing the web page ID and that
1868         web page's ID for the notification.
1869
1870         Now that we maintain groups of notifications based on the web page, we no longer send IPC messages
1871         from WebNotificationManager to WebNotificationManagerProxy; instead we send messages to the
1872         WebPageProxy. This removes the need for WebNotificationManagerProxy to be a message receiver.
1873
1874         When a page closes, all of the web notifications are cleared out. However, by the time the
1875         WebPage::close() is called, the connection between WebPage and WebPageProxy is destroyed. Since
1876         the WebPage is told to close from the UI process anyway, we clear out the notifications separately,
1877         instead of waiting for a message from the WebPage.
1878
1879         * UIProcess/Notifications/WebNotificationManagerProxy.h: Update to take into account the
1880         notification's web page. Remove inheritance of CoreIPC::MessageReceiver. Expose the original message
1881         handlers as public functions, since they will be called from WebPageProxy. Add a new map that
1882         associates a global ID with a notification ID that came from a web page.
1883             There are now two flavors of clearNotifications(). One clears out all notifications associated
1884         with a web page. This is called when the page is closed. The other clears out a subset of
1885         notifications associated with a web page. This is called when notifications associated with a sub-frame
1886         is closed.
1887         * UIProcess/Notifications/WebNotificationManagerProxy.messages.in: Removed. All messages from
1888         the web process go to WebPageProxy now.
1889
1890         * UIProcess/Notifications/WebNotificationManagerProxy.cpp: Update to take into account the
1891         notification's web page.
1892
1893         (WebKit::generateGlobalNotificationID): The manager proxy now maintains its own global notification
1894         ID generator.
1895         (WebKit::WebNotificationManagerProxy::WebNotificationManagerProxy): The proxy is no longer a
1896         message receiver. Remove code that registers it as such.
1897
1898         (WebKit::WebNotificationManagerProxy::show): Refactor to differentiate between the notification ID
1899         that came from the web process, and the global notification ID the proxy maintains. Add the mapping
1900         from the global ID to the (web page ID, notification ID) pair.
1901         (WebKit::WebNotificationManagerProxy::cancel): Refactor to take into consideration the web page.
1902         (WebKit::WebNotificationManagerProxy::didDestroyNotification): Refactor to take into consideration
1903         the web page. Fixes a leak where we did not remove the item from the maps. This function is called
1904         from the web process, when the ScriptExecutionContext is destroyed, so we remove it from our maps
1905         before we pass the message along to the provider.
1906
1907         Helper functions that evaluate when a given notification in the map matches the desired parameters.
1908         (WebKit::pageIDsMatch): The notification is associated with the provided page.
1909         (WebKit::pageAndNotificationIDsMatch): The notification is associated with the provided page and is
1910         contained within the list of provided notifications.
1911
1912         (WebKit::WebNotificationManagerProxy::clearNotifications): Changed to only remove notifications
1913         associated with the provided web page, and could include a specific list of notifications. This latter
1914         situation occurs if notifications were associated with an iframe, and that iframe was removed.
1915         There is an O(n) walk that could be make more efficient using another hash map, but that's overhead
1916         for a map that should be small in size anyway.
1917
1918         (WebKit::WebNotificationManagerProxy::providerDidShowNotification): Refactor to take into
1919         consideration the web page.
1920         (WebKit::WebNotificationManagerProxy::providerDidClickNotification): Refactor to take into
1921         consideration the web page.
1922         (WebKit::WebNotificationManagerProxy::providerDidCloseNotifications): Now we need to comb through
1923         the list of global IDs and put them in buckets based on the notification's web pages. After that
1924         is done we can send the DidCloseNotifications() to those pages' processes. There is a possible
1925         extra optimization here where we group based on the page's process instead, to reduce the number
1926         of messages sent to processes.
1927
1928         * UIProcess/WebPageProxy.cpp:
1929         (WebKit::WebPageProxy::close): When a web page is closed, we clear the notifications associated
1930         with the page.
1931         (WebKit::WebPageProxy::cancelNotification): Forward call to WebNotificationManagerProxy.
1932         (WebKit::WebPageProxy::clearNotifications): Ditto.
1933         (WebKit::WebPageProxy::didDestroyNotification): Ditto.
1934         * UIProcess/WebPageProxy.h:
1935         * UIProcess/WebPageProxy.messages.in:
1936
1937         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
1938         * WebProcess/Notifications/WebNotificationManager.cpp:
1939         (WebKit::WebNotificationManager::cancel):
1940         (WebKit::WebNotificationManager::clearNotifications):
1941         (WebKit::WebNotificationManager::didDestroyNotification):
1942         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp: Remove extraneous include.
1943
1944         * CMakeLists.txt: Remove WebNotificationManagerProxy.messages.in and related files.
1945         * DerivedSources.pri: Ditto.
1946         * DerivedSources.make: Ditto.
1947         * GNUmakefile.list.am: Ditto.
1948         * WebKit2.xcodeproj/project.pbxproj: Ditto.
1949
1950 2013-05-27  Tim Horton  <timothy_horton@apple.com>
1951
1952         Unreviewed build fix take 2.
1953
1954         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1955
1956 2013-05-27  Tim Horton  <timothy_horton@apple.com>
1957
1958         Unreviewed build fix.
1959
1960         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1961
1962 2013-05-27  Tim Horton  <timothy_horton@apple.com>
1963
1964         PDFPlugin: Main-frame PDFPlugin Accessibility
1965         https://bugs.webkit.org/show_bug.cgi?id=116563
1966         <rdar://problem/13458534>
1967
1968         Reviewed by Sam Weinig.
1969
1970         * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h:
1971         Forward-declare a variety of accessibility methods.
1972
1973         * WebProcess/Plugins/PDF/PDFPlugin.h:
1974         Add convertFromPDFViewToScreen, boundsOnScreen, accessibilityObject, and
1975         storage for our accessibility wrapper.
1976         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1977         Add WKPDFPluginAccessibilityObject.
1978
1979         (-[WKPDFPluginAccessibilityObject accessibilityIsIgnored]):
1980         We want to be included in the accessibility tree.
1981
1982         (-[WKPDFPluginAccessibilityObject accessibilityAttributeValue:]):
1983         (-[WKPDFPluginAccessibilityObject accessibilityAttributeValue:forParameter:]):
1984         Grab values for accessibility attributes from the relevant sources
1985         (mostly from PDFLayerController).
1986
1987         (-[WKPDFPluginAccessibilityObject readingModel]): Ditto.
1988         (-[WKPDFPluginAccessibilityObject accessibilityAttributeNames]):
1989         (-[WKPDFPluginAccessibilityObject accessibilityParameterizedAttributeNames]):
1990         (-[WKPDFPluginAccessibilityObject accessibilityActionNames]):
1991         Return the set of accessibility attributes, actions, and parameterized
1992         attributes that we support.
1993
1994         (-[WKPDFPluginAccessibilityObject accessibilityIsAttributeSettable:]):
1995         (-[WKPDFPluginAccessibilityObject accessibilitySetValue:forAttribute:]):
1996         Forward some other accessibility methods to PDFLayerController.
1997
1998         (-[WKPDFPluginAccessibilityObject accessibilityFocusedUIElement]):
1999         (-[WKPDFPluginAccessibilityObject accessibilityHitTest:]):
2000         We have no children, so if a hit test makes it to us, it's ours.
2001
2002         (WebKit::PDFPlugin::PDFPlugin):
2003         Make a WKPDFPluginAccessibilityObject and hook it up.
2004         [FIXME: this could use some de-crapifying]
2005
2006         (WebKit::PDFPlugin::convertFromPluginToPDFView):
2007         Transform a point from plugin space to PDFLayerController space.
2008
2009         (WebKit::PDFPlugin::convertFromPDFViewToRootView):
2010         (WebKit::PDFPlugin::convertFromPDFViewToScreen): Added.
2011         (WebKit::PDFPlugin::boundsOnScreen):
2012         Return the PDFPlugin's frame in screen coordinates.
2013
2014         (WebKit::PDFPlugin::accessibilityObject):
2015         Return our accessibility wrapper.
2016
2017         * WebProcess/Plugins/PDF/SimplePDFPlugin.h:
2018         * WebProcess/Plugins/Plugin.h:
2019         (WebKit::Plugin::accessibilityObject):
2020         * WebProcess/Plugins/PluginView.cpp:
2021         (WebKit::PluginView::accessibilityObject):
2022         * WebProcess/Plugins/PluginView.h:
2023         Add accessibilityObject(), to acquire accessibility wrappers from plugins.
2024
2025         * WebProcess/WebPage/WebPage.h:
2026         (WebPage): Add accessibilityObjectForMainFramePlugin();
2027         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
2028         (-[WKAccessibilityWebPageObject accessibilityRootObjectWrapper]):
2029         If the main frame has a PluginDocument that has an accessibilityObject,
2030         use that one instead of the WebPage's.
2031
2032         * WebProcess/WebPage/mac/WebPageMac.mm:
2033         (WebKit::WebPage::accessibilityObjectForMainFramePlugin):
2034         Return the accessibilityObject from the main-frame PluginDocument, if
2035         there is one.
2036
2037 2013-05-27  Marcelo Lira  <marcelo.lira@openbossa.org>
2038
2039         [WK2][CoordinatedGraphics] Misuse of DrawingAreaProxy::setVisibleContentsRect() in WebView::updateViewportSize()
2040         https://bugs.webkit.org/show_bug.cgi?id=116688
2041
2042         Reviewed by Noam Rosenthal.
2043
2044         Visible contents area passed to DrawingAreaProxy::setVisibleContentsRect()
2045         must be calculated including the page scale factor and avoid crossing the
2046         boundaries of the page contents size. In other words the DrawingArea
2047         must know the actual dimensions of what it being drawn. If the
2048         DrawingArea thinks the visible rectangle is bigger than it is, the
2049         contents will be drawn pixelated and blurry.
2050
2051         * UIProcess/CoordinatedGraphics/WebView.cpp:
2052         (WebKit::WebView::didChangeContentsSize):
2053         (WebKit::WebView::updateViewportSize):
2054         (WebKit::WebView::visibleContentsSize):
2055         (WebKit):
2056         * UIProcess/CoordinatedGraphics/WebView.h:
2057         (WebKit::WebView::contentsSize):
2058         (WebView):
2059
2060 2013-05-27  Carlos Garcia Campos  <cgarcia@igalia.com>
2061
2062         [GTK] WebKitWebView child widgets are not rendered with recent GTK+
2063         https://bugs.webkit.org/show_bug.cgi?id=116794
2064
2065         Reviewed by Xan Lopez.
2066
2067         Since rev d22fd7223c75f4720ddb982c659efb0d8d7543c4 of GTK+ expose
2068         events are not propagated to child GdkWindows anymore, and child
2069         widgets are rendered via gtk_container_propagate_draw(). Since all
2070         our children have its own GdkWindow (auth widget, inspector view
2071         and windowed plugins) we don't propagate the draw signal making
2072         them invisible with current GTK+.
2073
2074         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2075         (webkitWebViewBaseDraw): Chain up to the parent draw(), so it's
2076         propagated to the children. This shouldn't have any effect in
2077         previous versions of GTK+ because gtk_container_propagate_draw()
2078         returned early when the child widget had its own GdkWindow.
2079
2080 2013-05-27  Xan Lopez  <xlopez@igalia.com>
2081
2082         Reset all clients on WebPage close
2083         https://bugs.webkit.org/show_bug.cgi?id=112334
2084
2085         Reviewed by Anders Carlsson.
2086
2087         We do not reset the clients on WebPage::close(), so there's a
2088         small chance that someone will try to access them after that. This
2089         won't work and will generally cause runtime warnings, crashes or
2090         other issues. Reset them all to null to prevent this situation.
2091
2092         * WebProcess/WebPage/WebPage.cpp:
2093         (WebKit::WebPage::close):
2094
2095 2013-05-27  Manuel Rego Casasnovas  <rego@igalia.com>
2096
2097         [GTK] Notify WebProcess in WebKitURISchemeRequest when we fail to read the user InputStream
2098         https://bugs.webkit.org/show_bug.cgi?id=114347
2099
2100         Reviewed by Carlos Garcia Campos.
2101
2102         While processing a WebKitURISchemeRequest if there is any error reading
2103         the InputStream provided by the user (for example the stream is already
2104         closed) we have to notify the WebProcess that the request has failed.
2105
2106         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
2107         (webkitURISchemeRequestReadCallback): Get the error from
2108         g_input_stream_read_finish() and use it to call
2109         webkit_uri_scheme_request_finish_error() in order to finish the failing
2110         WebKitURISchemeRequest properly.
2111         * UIProcess/API/gtk/tests/TestWebKitWebContext.cpp:
2112         (testWebContextURIScheme): Modify test to check the new situation using
2113         an already closed InputStream.
2114
2115 2013-05-27  Carlos Garcia Campos  <cgarcia@igalia.com>
2116
2117         Unreviewed. Fix make distcheck.
2118
2119         * GNUmakefile.list.am: Add missing header file.
2120
2121 2013-05-26  Changhun Kang  <temoochin@company100.net>
2122
2123         The public WK header file should not include WKAPICast.h
2124         https://bugs.webkit.org/show_bug.cgi?id=115230
2125
2126         Reviewed by Darin Adler.
2127
2128         Otherwise, WebKit internal headers are exposed.
2129         No new tests. No change in behavior.
2130         * UIProcess/API/C/soup/WKSoupRequestManager.h:
2131         * UIProcess/soup/WebSoupRequestManagerClient.h:
2132
2133 2013-05-26  Andreas Kling  <akling@apple.com>
2134
2135         FocusController::setFocusedNode() should be setFocusedElement().
2136         <http://webkit.org/b/116780>
2137
2138         Reviewed by Antti Koivisto.
2139
2140         * WebProcess/Plugins/PluginView.cpp:
2141         (WebKit::PluginView::focusPluginElement):
2142
2143 2013-05-25  Andreas Kling  <akling@apple.com>
2144
2145         PluginDocument::pluginNode() should be pluginElement() instead.
2146         <http://webkit.org/b/116774>
2147
2148         Reviewed by Anders Carlsson.
2149
2150         * WebProcess/WebPage/WebPage.cpp:
2151         (WebKit::WebPage::focusedPluginViewForFrame):
2152
2153 2013-05-25  Simon Fraser  <simon.fraser@apple.com>
2154
2155         Unprefix Page Visibility API
2156         https://bugs.webkit.org/show_bug.cgi?id=102340
2157
2158         Reviewed by Tim Horton.
2159         
2160         Renaming of the "preview" state to "unloaded".
2161
2162         * Shared/API/c/WKPageVisibilityTypes.h:
2163         * Shared/API/c/WKSharedAPICast.h:
2164         (WebKit::toPageVisibilityState):
2165
2166 2013-05-25  Andreas Kling  <akling@apple.com>
2167
2168         Move Node::isMouseFocusable() to Element.
2169         <http://webkit.org/b/116762>
2170
2171         Reviewed by Anders Carlsson.
2172
2173         * WebProcess/WebPage/WebPage.cpp:
2174         (WebKit::WebPage::highlightPotentialActivation):
2175
2176             Check that the potentially activated Node is an Element before asking if it's mouse-focusable.
2177
2178 2013-05-25  Andreas Kling  <akling@apple.com>
2179
2180         REGRESSION: WebProcess is terminated when all Safari windows are closed.
2181         <rdar://problem/13990901>
2182         <http://webkit.org/b/116766>
2183
2184         Reviewed by Alexey Proskuryakov.
2185
2186         When closing the last page, only disconnect the web process if we're using a network process.
2187         Otherwise there might be session state in the web process getting lost.
2188
2189         * UIProcess/WebProcessProxy.cpp:
2190         (WebKit::WebProcessProxy::removeWebPage):
2191
2192 2013-05-25  Santosh Mahto  <santosh.ma@samsung.com>
2193
2194         WebFrameProxy::didFailLoad clears frame title for no apparent reason
2195         https://bugs.webkit.org/show_bug.cgi?id=116655
2196
2197         Reviewed by Alexey Proskuryakov.
2198
2199         * UIProcess/WebFrameProxy.cpp:
2200         (WebKit::WebFrameProxy::didFailLoad):
2201
2202 2013-05-24  Seokju Kwon  <seokju.kwon@gmail.com>
2203
2204         [Qt][GTK] Build fix after r150669
2205         https://bugs.webkit.org/show_bug.cgi?id=116751
2206
2207         Reviewed by Christophe Dumez.
2208
2209         * GNUmakefile.list.am:
2210         * Target.pri:
2211         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
2212         (WebKit::WebEditorClient::getEditorCommandsForKeyEvent):
2213
2214 2013-05-24  Seokju Kwon  <seokju.kwon@gmail.com>
2215
2216         [EFL] Build fix after r150669
2217         https://bugs.webkit.org/show_bug.cgi?id=116750
2218
2219         Reviewed by Anders Carlsson.
2220
2221         * CMakeLists.txt:
2222         * WebProcess/Battery/WebBatteryManager.cpp:
2223         (WebKit::WebBatteryManager::registerWebPage):
2224         (WebKit::WebBatteryManager::unregisterWebPage):
2225         * WebProcess/NetworkInfo/WebNetworkInfoManager.cpp:
2226         (WebKit::WebNetworkInfoManager::registerWebPage):
2227         (WebKit::WebNetworkInfoManager::unregisterWebPage):
2228         (WebKit::WebNetworkInfoManager::bandwidth):
2229         (WebKit::WebNetworkInfoManager::metered):
2230         * WebProcess/WebCoreSupport/WebVibrationClient.cpp:
2231         (WebKit::WebVibrationClient::vibrate):
2232         (WebKit::WebVibrationClient::cancelVibration):
2233         * WebProcess/soup/WebSoupRequestManager.cpp:
2234         (WebKit::WebSoupRequestManager::didReceiveURIRequestData):
2235         (WebKit::WebSoupRequestManager::send):
2236
2237 2013-05-24  Anders Carlsson  <andersca@apple.com>
2238
2239         MessageSender shouldn't be a class template
2240         https://bugs.webkit.org/show_bug.cgi?id=116743
2241
2242         Reviewed by Andreas Kling.
2243
2244         Change MessageSender to be a proper abstract base class. Subclasses of MessageSender must
2245         implement messageSenderConnection() as well as messageSenderDestinationID().
2246
2247         This reduces code size and will allow us to be more flexible with MessageSender in the future.
2248
2249         * NetworkProcess/NetworkResourceLoader.cpp:
2250         (WebKit::NetworkResourceLoader::sendAbortingOnFailure):
2251         (WebKit::NetworkResourceLoader::messageSenderConnection):
2252         (WebKit):
2253         (WebKit::NetworkResourceLoader::messageSenderDestinationID):
2254         * NetworkProcess/NetworkResourceLoader.h:
2255         (NetworkResourceLoader):
2256         * NetworkProcess/mac/DiskCacheMonitor.h:
2257         (DiskCacheMonitor):
2258         * NetworkProcess/mac/DiskCacheMonitor.mm:
2259         (WebKit::DiskCacheMonitor::messageSenderConnection):
2260         (WebKit::DiskCacheMonitor::messageSenderDestinationID):
2261         (WebKit):
2262         * Platform/CoreIPC/MessageSender.h:
2263         (CoreIPC):
2264         (MessageSender):
2265         (CoreIPC::MessageSender::send):
2266         (CoreIPC::MessageSender::sendSync):
2267         * Shared/ChildProcess.cpp:
2268         (WebKit::ChildProcess::messageSenderConnection):
2269         (WebKit):
2270         (WebKit::ChildProcess::messageSenderDestinationID):
2271         * Shared/ChildProcess.h:
2272         (ChildProcess):
2273         * Shared/Downloads/Download.cpp:
2274         (WebKit::Download::messageSenderConnection):
2275         (WebKit):
2276         (WebKit::Download::messageSenderDestinationID):
2277         * Shared/Downloads/Download.h:
2278         (Download):
2279         * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
2280         (WebKit::CustomProtocolManager::initialize):
2281         * Shared/WebConnection.h:
2282         (WebConnection):
2283         * Shared/mac/SecItemShim.cpp:
2284         (WebKit::sendSecItemRequest):
2285         * UIProcess/WebConnectionToWebProcess.cpp:
2286         (WebKit::WebConnectionToWebProcess::hasValidConnection):
2287         (WebKit::WebConnectionToWebProcess::messageSenderConnection):
2288         (WebKit::WebConnectionToWebProcess::messageSenderDestinationID):
2289         * UIProcess/WebConnectionToWebProcess.h:
2290         (WebConnectionToWebProcess):
2291         * WebKit2.xcodeproj/project.pbxproj:
2292         * WebProcess/Geolocation/WebGeolocationManager.cpp:
2293         (WebKit::WebGeolocationManager::registerWebPage):
2294         (WebKit::WebGeolocationManager::unregisterWebPage):
2295         * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
2296         (WebKit::WebIconDatabaseProxy::retainIconForPageURL):
2297         (WebKit::WebIconDatabaseProxy::releaseIconForPageURL):
2298         (WebKit::WebIconDatabaseProxy::synchronousIconForPageURL):
2299         (WebKit::WebIconDatabaseProxy::loadDecisionForIconURL):
2300         (WebKit::WebIconDatabaseProxy::setIconURLForPageURL):
2301         (WebKit::WebIconDatabaseProxy::setIconDataForIconURL):
2302         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2303         (WebKit::InjectedBundle::postMessage):
2304         (WebKit::InjectedBundle::postSynchronousMessage):
2305         * WebProcess/Network/WebResourceLoader.cpp:
2306         (WebKit::WebResourceLoader::messageSenderConnection):
2307         (WebKit::WebResourceLoader::messageSenderDestinationID):
2308         * WebProcess/Network/WebResourceLoader.h:
2309         (WebResourceLoader):
2310         * WebProcess/Notifications/WebNotificationManager.cpp:
2311         (WebKit::WebNotificationManager::show):
2312         (WebKit::WebNotificationManager::cancel):
2313         (WebKit::WebNotificationManager::clearNotifications):
2314         (WebKit::WebNotificationManager::didDestroyNotification):
2315         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2316         (WebKit::PDFPlugin::writeItemsToPasteboard):
2317         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
2318         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
2319         * WebProcess/Storage/StorageAreaMap.cpp:
2320         (WebKit::StorageAreaMap::StorageAreaMap):
2321         (WebKit::StorageAreaMap::~StorageAreaMap):
2322         (WebKit::StorageAreaMap::setItem):
2323         (WebKit::StorageAreaMap::removeItem):
2324         (WebKit::StorageAreaMap::clear):
2325         (WebKit::StorageAreaMap::loadValuesIfNeeded):
2326         * WebProcess/WebConnectionToUIProcess.cpp:
2327         (WebKit::WebConnectionToUIProcess::hasValidConnection):
2328         (WebKit::WebConnectionToUIProcess::messageSenderConnection):
2329         (WebKit::WebConnectionToUIProcess::messageSenderDestinationID):
2330         * WebProcess/WebConnectionToUIProcess.h:
2331         (WebConnectionToUIProcess):
2332         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2333         (WebKit::WebChromeClient::windowRect):
2334         (WebKit::WebChromeClient::focusedFrameChanged):
2335         (WebKit::WebChromeClient::createWindow):
2336         (WebKit::WebChromeClient::toolbarsVisible):
2337         (WebKit::WebChromeClient::statusbarVisible):
2338         (WebKit::WebChromeClient::menubarVisible):
2339         (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
2340         (WebKit::WebChromeClient::runJavaScriptAlert):
2341         (WebKit::WebChromeClient::runJavaScriptConfirm):
2342         (WebKit::WebChromeClient::runJavaScriptPrompt):
2343         (WebKit::WebChromeClient::shouldInterruptJavaScript):
2344         (WebKit::WebChromeClient::exceededDatabaseQuota):
2345         * WebProcess/WebCoreSupport/WebColorChooser.cpp:
2346         (WebKit::WebColorChooser::WebColorChooser):
2347         (WebKit::WebColorChooser::setSelectedColor):
2348         (WebKit::WebColorChooser::endChooser):
2349         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2350         (WebKit::WebFrameLoaderClient::dispatchDidReceiveIcon):
2351         (WebKit::WebFrameLoaderClient::updateGlobalHistory):
2352         (WebKit::WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
2353         (WebKit::WebFrameLoaderClient::setTitle):
2354         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2355         (WebKit::WebPlatformStrategies::populatePluginCache):
2356         (WebKit::WebPlatformStrategies::getTypes):
2357         (WebKit::WebPlatformStrategies::bufferForType):
2358         (WebKit::WebPlatformStrategies::getPathnamesForType):
2359         (WebKit::WebPlatformStrategies::stringForType):
2360         (WebKit::WebPlatformStrategies::copy):
2361         (WebKit::WebPlatformStrategies::changeCount):
2362         (WebKit::WebPlatformStrategies::uniqueName):
2363         (WebKit::WebPlatformStrategies::color):
2364         (WebKit::WebPlatformStrategies::url):
2365         (WebKit::WebPlatformStrategies::addTypes):
2366         (WebKit::WebPlatformStrategies::setTypes):
2367         (WebKit::WebPlatformStrategies::setBufferForType):
2368         (WebKit::WebPlatformStrategies::setPathnamesForType):
2369         (WebKit::WebPlatformStrategies::setStringForType):
2370         * WebProcess/WebCoreSupport/WebPopupMenu.cpp:
2371         (WebKit::WebPopupMenu::show):
2372         (WebKit::WebPopupMenu::hide):
2373         * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
2374         (WebKit::WebSearchPopupMenu::saveRecentSearches):
2375         (WebKit::WebSearchPopupMenu::loadRecentSearches):
2376         * WebProcess/WebPage/EventDispatcher.cpp:
2377         (WebKit::EventDispatcher::sendDidReceiveEvent):
2378         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2379         (WebKit::updateBackForwardItem):
2380         (WebKit::WebBackForwardListProxy::itemAtIndex):
2381         (WebKit::WebBackForwardListProxy::backListCount):
2382         (WebKit::WebBackForwardListProxy::forwardListCount):
2383         * WebProcess/WebPage/WebInspector.cpp:
2384         (WebKit::WebInspector::createInspectorPage):
2385         (WebKit::WebInspector::didClose):
2386         (WebKit::WebInspector::bringToFront):
2387         (WebKit::WebInspector::inspectedURLChanged):
2388         (WebKit::WebInspector::save):
2389         (WebKit::WebInspector::append):
2390         (WebKit::WebInspector::attachBottom):
2391         (WebKit::WebInspector::attachRight):
2392         (WebKit::WebInspector::detach):
2393         (WebKit::WebInspector::setAttachedWindowHeight):
2394         (WebKit::WebInspector::setAttachedWindowWidth):
2395         (WebKit::WebInspector::setToolbarHeight):
2396         (WebKit::WebInspector::updateDockingAvailability):
2397         (WebKit::WebInspector::sendMessageToRemoteFrontend):
2398         * WebProcess/WebPage/WebPage.cpp:
2399         (WebKit::WebPage::messageSenderConnection):
2400         (WebKit):
2401         (WebKit::WebPage::messageSenderDestinationID):
2402         * WebProcess/WebPage/WebPage.h:
2403         (WebPage):
2404         * WebProcess/WebPage/mac/WebPageMac.mm:
2405         (WebKit::WebPage::executeKeypressCommandsInternal):
2406         (WebKit::WebPage::handleEditingKeyboardEvent):
2407         * WebProcess/WebProcess.cpp:
2408         (WebKit::WebProcess::ensureNetworkProcessConnection):
2409         (WebKit::WebProcess::shouldTerminate):
2410
2411 2013-05-24  Tim Horton  <timothy_horton@apple.com>
2412
2413         Animated GIFs don't repaint after TiledCoreAnimationDrawingArea un-suspends painting
2414         https://bugs.webkit.org/show_bug.cgi?id=116744
2415         <rdar://problem/13973514>
2416
2417         Reviewed by Simon Fraser.
2418
2419         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2420         (WebKit::TiledCoreAnimationDrawingArea::resumePainting):
2421         Force WebCore to repaint animated images when painting is resumed.
2422
2423 2013-05-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2424
2425         Remove custom code for webkitAudioContext global constructor getter
2426         https://bugs.webkit.org/show_bug.cgi?id=116530
2427
2428         Reviewed by Geoffrey Garen.
2429
2430         Use RuntimeEnabledFeatures instead of WebCore Settings to toggle Web Audio support.
2431
2432         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2433         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2434         * WebProcess/WebPage/WebPage.cpp:
2435         (WebKit::WebPage::updatePreferences):
2436
2437 2013-05-24  Thomas Deniau  <deniau@apple.com>
2438
2439         Add more lines to the context during Dictionary lookups
2440         https://bugs.webkit.org/show_bug.cgi?id=115256
2441
2442         Reviewed by Ryosuke Niwa.
2443
2444         * WebProcess/WebPage/mac/WebPageMac.mm:
2445         (WebKit::WebPage::performDictionaryLookupAtLocation):
2446         Instead of using the current paragraph as the context (which stops at
2447         line breaks), get a few lines before and after the point, so that the
2448         context contains at least four lines in each direction.
2449         This way the Dictionary will be able to look up things that extend past
2450         the current line.
2451
2452 2013-05-24  Anders Carlsson  <andersca@apple.com>
2453
2454         Intermittent crash when typing in Address Bar
2455         https://bugs.webkit.org/show_bug.cgi?id=116728
2456         <rdar://problem/13976781>
2457
2458         Reviewed by Sam Weinig.
2459
2460         If a web process connection has been removed from the storage manager because we disconnected it
2461         since there were no more active pages associated with the web process, we'll fail to find it here
2462         so just return early instead of crashing.
2463
2464         * UIProcess/Storage/StorageManager.cpp:
2465         (WebKit::StorageManager::destroyStorageMap):
2466
2467 2013-05-24  Andreas Kling  <akling@apple.com>
2468
2469         Typing in Safari's unified field causes unnecessary web content repaints.
2470         <http://webkit.org/b/116703>
2471
2472         Reviewed by Andy Estes.
2473
2474         * WebProcess/WebPage/FindController.cpp:
2475         (WebKit::FindController::countStringMatches):
2476
2477             Call WebCore::Page::countMatchesForText() instead of markAllMatchesForText(). If the search string
2478             is found inside the page content, the renderer containing that text will no longer be repainted.
2479
2480 2013-05-23  Ryuan Choi  <ryuan.choi@samsung.com>
2481
2482         [WK2][EFL][QT] Build break after r150610
2483         https://bugs.webkit.org/show_bug.cgi?id=116699
2484
2485         Reviewed by Csaba Osztrogonác.
2486
2487         * UIProcess/WebPageProxy.cpp:
2488         (WebKit::WebPageProxy::findPlugin): Initialized pluginProcessSandboxPolicy.
2489
2490 2013-05-23  Anders Carlsson  <andersca@apple.com>
2491
2492         Shim Flash plug-in to allow its updater to run
2493         https://bugs.webkit.org/show_bug.cgi?id=116692
2494         <rdar://problem/13938510>
2495
2496         Reviewed by Sam Weinig.
2497
2498         * PluginProcess/PluginProcess.h:
2499         * PluginProcess/mac/PluginProcessMac.mm:
2500         (WebKit::replacedNSConcreteTask_launch):
2501         (WebKit::initializeCocoaOverrides):
2502         Patch -[NSConcreteTask launch] to call PluginProcess::launchProcess.
2503
2504         (WebKit::PluginProcess::launchProcess):
2505         Send a LaunchProcess message to the UI process.
2506
2507         * UIProcess/Plugins/PluginProcessProxy.cpp:
2508         * UIProcess/Plugins/PluginProcessProxy.h:
2509         Remove PluginProcessProxy::didReceiveMessage.
2510
2511         (PluginProcessProxy):
2512         * UIProcess/Plugins/PluginProcessProxy.messages.in:
2513         Add LaunchProcess message and remove LegacyReceiver attribute.
2514
2515         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
2516         (WebKit::isFlashUpdater):
2517         Helper function to determine whether the process is the flash updater.
2518
2519         (WebKit::shouldLaunchProcess):
2520         Return whether we should launch this process.
2521
2522         (WebKit::PluginProcessProxy::launchProcess):
2523         Determine if we should launch this process and then do so.
2524
2525 2013-05-23  Anders Carlsson  <andersca@apple.com>
2526
2527         Don't run all plug-ins unsandboxed
2528         https://bugs.webkit.org/show_bug.cgi?id=116690
2529         <rdar://problem/13975569>
2530
2531         Reviewed by Jessie Berlin.
2532
2533         Remove debugging code.
2534
2535         * UIProcess/WebPageProxy.cpp:
2536         (WebKit::WebPageProxy::findPlugin):
2537
2538 2013-05-23  Anders Carlsson  <andersca@apple.com>
2539
2540         Crash in convertMainResourceLoadToDownload when downloading file by option-return
2541         https://bugs.webkit.org/show_bug.cgi?id=116451
2542
2543         Reviewed by Andreas Kling.
2544
2545         If the main resource loader is null, create a new download instead since there's no existing loader to convert.
2546
2547         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2548         (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
2549         * WebProcess/WebPage/WebFrame.cpp:
2550         (WebKit::WebFrame::convertMainResourceLoadToDownload):
2551
2552 2013-05-22  Alexey Proskuryakov  <ap@apple.com>
2553
2554         <rdar://problem/13849260> Sandbox violations reading .CFUserTextEncoding
2555
2556         Reviewed by Dan Bernstein.
2557
2558         * WebProcess/com.apple.WebProcess.sb.in: Allow this.
2559
2560 2013-05-23  Gavin Barraclough  <barraclough@apple.com>
2561
2562         Move posix_spawn onto a zero delay timer
2563         https://bugs.webkit.org/show_bug.cgi?id=116682
2564
2565         Reviewed by Anders Carlson.
2566
2567         <rdar://problem/13973468>
2568
2569         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
2570         (ReexecInfo):
2571             - struct to hold info from the XPC message.
2572         (WebKit::reexec):
2573             - moved call to posix_spawn out to this helper.
2574         (WebKit::reexecCallBack):
2575             - calls reexec.
2576         (WebKit::XPCServiceEventHandler):
2577             - removed call to posix_spawn; schedule a call to reexecCallBack.
2578
2579 2013-05-23  Csaba Osztrogonác  <ossy@webkit.org>
2580
2581         [cmake] Fix generating-forwarding-headers rule after r150460
2582         https://bugs.webkit.org/show_bug.cgi?id=116659
2583
2584         Reviewed by Christophe Dumez.
2585
2586         * CMakeLists.txt: Typo fix.
2587
2588 2013-05-23  Anton Obzhirov  <a.obzhirov@samsung.com>
2589
2590         [GTK] Remote Web Inspector sometimes won't serve any content
2591         https://bugs.webkit.org/show_bug.cgi?id=116225
2592
2593         Reviewed by Gustavo Noronha Silva.
2594
2595         Added an option to use environment variable to set up path to
2596         inspector server files. Implementation is similar to InspectorClientGtk
2597         implementation.
2598
2599         * UIProcess/InspectorServer/WebInspectorServer.h:
2600         (WebInspectorServer):
2601         * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
2602         (WebKit::WebInspectorServer::platformResourceForPath):
2603         (WebKit::WebInspectorServer::inspectorServerFilesPath):
2604         (WebKit):
2605
2606 2013-05-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2607
2608         [EFL][WK2] Use WK2 C API in ewk_view_pagination_mode_set|get
2609         https://bugs.webkit.org/show_bug.cgi?id=116657
2610
2611         Reviewed by Christophe Dumez.
2612
2613         WKPageGet|SetPaginationMode APIs is present in WK2 C APIs. So, we need to use them for
2614         ewk_view_pagination_mode_set|get.
2615
2616         Besides we don't need to use WebCore namespace anymore.
2617
2618         * UIProcess/API/efl/ewk_view.cpp:
2619         (ewk_view_pagination_mode_set):
2620         (ewk_view_pagination_mode_get):
2621
2622 2013-05-23  Roland Takacs  <rtakacs@inf.u-szeged.hu>
2623
2624         Support frame instrumentation for coordinated graphics
2625         https://bugs.webkit.org/show_bug.cgi?id=115260
2626
2627         Reviewed by Andreas Kling.
2628
2629         Enabled supportsFrameInstrumentation on ports that use coordinated graphics
2630         by calling didBeginFrame().
2631
2632         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
2633         (WebKit::WebInspectorClient::supportsFrameInstrumentation):
2634         (WebKit):
2635         * WebProcess/WebCoreSupport/WebInspectorClient.h:
2636         (WebInspectorClient):
2637         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2638         (WebKit::CoordinatedLayerTreeHost::syncDisplayState):
2639
2640 2013-05-22  Dean Jackson  <dino@apple.com>
2641
2642         Don't snapshot plugins that can't be snapshotted
2643         https://bugs.webkit.org/show_bug.cgi?id=116490
2644
2645         Reviewed by Tim Horton.
2646
2647         Some plugins, such as QuickTime, don't support snapshotting. We're
2648         planning on another way to capture snapshots, but in the meantime make
2649         sure that they don't fail to initialise because they were told to
2650         not use accelerated rendering.
2651
2652         Expose a new message on the plugins so that they can tell the PluginView
2653         if they support snapshotting or not.
2654
2655         * PluginProcess/PluginControllerProxy.cpp:
2656         (WebKit::PluginControllerProxy::supportsSnapshotting): New method.
2657         * PluginProcess/PluginControllerProxy.h: Ditto.
2658         * PluginProcess/PluginControllerProxy.messages.in: Message signature.
2659
2660         * WebProcess/Plugins/Netscape/NetscapePlugin.h: Add supportsSnapshotting.
2661         * WebProcess/Plugins/PDF/SimplePDFPlugin.h: Ditto.
2662         * WebProcess/Plugins/Plugin.h: Ditto - pure virtual here.
2663
2664         * WebProcess/Plugins/PluginProxy.cpp:
2665         (WebKit::PluginProxy::supportsSnapshotting): Send the message to the plugin process and return the results.
2666         * WebProcess/Plugins/PluginProxy.h:
2667
2668         * WebProcess/Plugins/PluginView.cpp:
2669         (WebKit::PluginView::didInitializePlugin): If the snapshotting plugin has a layer, make
2670             sure to add it to the tree.
2671         (WebKit::PluginView::isAcceleratedCompositingEnabled): Snapshotting plugins can use
2672             accelerated compositing, just like normal plugins.
2673         (WebKit::PluginView::pluginSnapshotTimerFired): If the plugin doesn't allow snapshotting,
2674             immediately restart it.
2675
2676 2013-05-22  Anders Carlsson  <andersca@apple.com>
2677
2678         Fix crash when closing a page that's trying to access session storage
2679         https://bugs.webkit.org/show_bug.cgi?id=116634
2680         <rdar://problem/13904054>
2681
2682         Reviewed by Geoffrey Garen.
2683
2684         It is possible for the StorageManager to get messages from a web page that has already been closed by the UI process.
2685         If that happens, just ignore the messages.
2686
2687         * UIProcess/Storage/StorageManager.cpp:
2688         (WebKit::StorageManager::createSessionStorageMap):
2689         (WebKit::StorageManager::getValues):
2690         (WebKit::StorageManager::setItem):
2691         (WebKit::StorageManager::removeItem):
2692         (WebKit::StorageManager::clear):
2693         (WebKit::StorageManager::destroySessionStorageNamespaceInternal):
2694
2695 2013-05-22  Alexey Proskuryakov  <ap@apple.com>
2696
2697         Crashes in NetworkProcess due to incorrect private browsing session tracking
2698         https://bugs.webkit.org/show_bug.cgi?id=116628
2699
2700         Reviewed by Brady Eidson.
2701
2702         The current API for private browsing makes it extremely difficult to track sessions.
2703         Private browsing is enabled via WKPreferences, but the session is shared, so it
2704         has to be maintained while there is any chance that any page group anywhere still
2705         needs it.
2706
2707         This patch fixes some of the issues, but ultimately, I think that we'll just need
2708         to deprecate and replace the API.
2709
2710         * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::storageSession):
2711         There are valid scenarios where privateBrowsingEnabled is true, but there is no
2712         private browsing session. Handle that without crashing, although this unfortunately
2713         means that it will be harder to spot logic errors when using a wrong session.
2714         (WebKit::NetworkConnectionToWebProcess::registerBlobURL): Removed an obsolete FIXME.
2715
2716         * NetworkProcess/mac/RemoteNetworkingContext.h: Changed privateBrowsingSession()
2717         to return a pointer, as no caller could know when it was safe to call it.
2718
2719         * NetworkProcess/mac/RemoteNetworkingContext.mm:
2720         (WebKit::RemoteNetworkingContext::storageSession): Handle the case where private
2721         browsing session is unexpectedly missing without crashing.
2722         (WebKit::RemoteNetworkingContext::privateBrowsingSession): Changed to return a pointer.
2723
2724         * UIProcess/WebContext.cpp: (WebKit::WebContext::ensureNetworkProcess):
2725         Actually initialize privateBrowsingEnabled creation parameter. It would be very
2726         difficult to figure out 100% reliably whether NetworkProcess needs a private browsing
2727         session with the current API, but for existing clients, looking at
2728         m_privateBrowsingEnterCount is good enough. Certainly better than not initializing.
2729
2730         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2731         (WebKit::InjectedBundle::setPrivateBrowsingEnabled): Added a FIXME.
2732
2733 2013-05-22  Tim Horton  <timothy_horton@apple.com>
2734
2735         [wk2] Should be able to make tiled WKViews clip to the view's exposed rect without using autolayout
2736         https://bugs.webkit.org/show_bug.cgi?id=116625
2737         <rdar://problem/13962816>
2738
2739         Reviewed by Anders Carlsson.
2740
2741         The two modes are not dependent; it should be possible to enable
2742         clips-to-exposed-rect without using autolayout. This enables apps to
2743         make very large tiled WKViews that don't create tiles for the whole
2744         area of the view (and also disables scrolling, since that is currently
2745         incompatible with clipping to the exposed rect).
2746
2747         * UIProcess/API/mac/WKView.mm:
2748         (-[WKView setFrameSize:]):
2749         (-[WKView _updateWindowAndViewFrames]):
2750         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
2751         (-[WKView enableFrameSizeUpdates]):
2752         (-[WKView forceAsyncDrawingAreaSizeUpdate:]):
2753         Rename _expandsToFitContentViaAutoLayout to _clipsToVisibleRect for accuracy.
2754
2755         (-[WKView setMinimumWidthForAutoLayout:]):
2756         Factor clips-to-sisible-rect toggle out into setShouldClipToVisibleRect.
2757
2758         (-[WKView shouldClipToVisibleRect]):
2759         (-[WKView setShouldClipToVisibleRect:]):
2760         Allow setting clips-to-visible-rect without autolayout.
2761
2762         * UIProcess/API/mac/WKViewPrivate.h:
2763         Add shouldClipToVisibleRect property.
2764
2765 2013-05-22  Alexey Proskuryakov  <ap@apple.com>
2766
2767         Remove unused private browsing override support
2768         <rdar://problem/11969491>
2769
2770         Rubber-stamped by Sam Weinig.
2771
2772         Private browsing override is unused, and it complicates tracking of private
2773         browsing sessions in UI process (in fact, it doesn't plug into this tracking at all,
2774         so we would just assert if we used the API).
2775
2776         * Shared/WebPageCreationParameters.cpp:
2777         (WebKit::WebPageCreationParameters::encode):
2778         (WebKit::WebPageCreationParameters::decode):
2779         * Shared/WebPageCreationParameters.h:
2780         * UIProcess/API/C/WKPage.cpp:
2781         * UIProcess/API/C/WKPagePrivate.h:
2782         * UIProcess/WebPageProxy.cpp:
2783         (WebKit::WebPageProxy::WebPageProxy):
2784         (WebKit::WebPageProxy::creationParameters):
2785         * UIProcess/WebPageProxy.h:
2786         * WebProcess/WebPage/WebPage.cpp:
2787         (WebKit::WebPage::WebPage):
2788         (WebKit::WebPage::updatePreferences):
2789         * WebProcess/WebPage/WebPage.h:
2790         * WebProcess/WebPage/WebPage.messages.in:
2791
2792 2013-05-22  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
2793
2794         [EFL][WK2] Change Ewk_Context_Menu_Item's parent menu to raw pointer
2795         https://bugs.webkit.org/show_bug.cgi?id=116549
2796
2797         Reviewed by Christophe Dumez.
2798
2799         A context menu item should have only a pointer to parent menu instead
2800         of owning parent menu.
2801
2802         * UIProcess/API/efl/ewk_context_menu_item.cpp:
2803         (EwkContextMenuItem::EwkContextMenuItem):
2804         * UIProcess/API/efl/ewk_context_menu_item_private.h:
2805         (EwkContextMenuItem::create):
2806         (EwkContextMenuItem::parentMenu):
2807         (EwkContextMenuItem):
2808
2809 2013-05-22  Csaba Osztrogonác  <ossy@webkit.org>
2810
2811         [Qt][WK2] Unreviewed buildfix after r150484.
2812
2813         * UIProcess/Plugins/qt/PluginProcessProxyQt.cpp:
2814         (WebKit::PluginProcessProxy::platformGetLaunchOptions):
2815
2816 2013-05-21  Andreas Kling  <akling@apple.com>
2817
2818         REGRESSION(r150491): WebKit2.CloseThenTerminate asserting below WebContext::disconnectProcess().
2819         <http://webkit.org/b/116588>
2820
2821         Reviewed by Sam Weinig.
2822
2823         Do an early return from WebProcessProxy::requestTermination() if there is no child process
2824         connection to terminate.
2825
2826         * UIProcess/WebProcessProxy.cpp:
2827         (WebKit::WebProcessProxy::requestTermination):
2828
2829 2013-05-21  Mark Rowe  <mrowe@apple.com>
2830
2831         <rdar://problem/13915556> Sluggish scrolling in web content
2832
2833         Reviewed by Gavin Barraclough.
2834
2835         * Shared/mac/ChildProcessMac.mm:
2836         (WebKit::ChildProcess::setProcessSuppressionEnabled): When process suppression is disabled, low latency is important.
2837
2838 2013-05-21  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2839
2840         Fix build break after r150484
2841
2842         Unreviewed, fix build break on EFL, GTK.
2843
2844         * UIProcess/Plugins/PluginInfoStore.cpp:
2845         (WebKit::PluginInfoStore::defaultLoadPolicyForPlugin):
2846         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
2847         (WebKit::PluginProcessProxy::platformGetLaunchOptions):
2848
2849 2013-05-21  Andreas Kling  <akling@apple.com>
2850
2851         PPT: Closing tab that is hung or chewing 100% CPU leaves abandoned WebProcess.
2852         <http://webkit.org/b/116464>
2853         <rdar://problem/10103795>
2854
2855         Reviewed by Anders Carlsson.
2856
2857         Simplify the web process sacrifice ritual. Instead of murderizing the process when its last tab closes,
2858         just shut down the CoreIPC connection from the UI process. The web process, upon noticing this,
2859         will start a 10 second watchdog timer, and if it hasn't shut down by the time it fires, well, it'll shut down.
2860
2861         (WebKit::WebProcessProxy::removeWebPage):
2862
2863             When the last page is removed from a WebProcessProxy, disconnect the process so that it'll die off
2864             eventually, even if the WebPage::Close message never gets properly handled.
2865
2866         * Shared/ChildProcessProxy.h:
2867         * Shared/ChildProcessProxy.cpp:
2868         (WebKit::ChildProcessProxy::abortProcessLaunchIfNeeded):
2869
2870             Added a helper to abort any in-progress launch of a new web process. Otherwise we'll have a race
2871             where the exiting web process may get re-used for a new tab.
2872
2873         * UIProcess/WebProcessProxy.h:
2874         * UIProcess/WebProcessProxy.cpp:
2875         (WebKit::WebProcessProxy::WebProcessProxy):
2876         (WebKit::WebProcessProxy::enableSuddenTermination):
2877         (WebKit::WebProcessProxy::disableSuddenTermination):
2878
2879             Remove WebProcessProxy's sudden termination counter. The web process will do what it needs in
2880             response to the WebPage::Close message. We still forward these calls to NSProcessInfo on Mac though.
2881
2882 2013-05-21  Anders Carlsson  <andersca@apple.com>
2883
2884         Fix build.
2885
2886         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
2887         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
2888         Stop using lambdas :(
2889
2890 2013-05-21  Anders Carlsson  <andersca@apple.com>
2891
2892         Provide an API to run sandboxed plug-ins outside of their sandbox
2893         https://bugs.webkit.org/show_bug.cgi?id=116578
2894
2895         Reviewed by Andreas Kling.
2896
2897         * Platform/CoreIPC/HandleMessage.h:
2898         (CoreIPC::callMemberFunction):
2899         Add new overload.
2900
2901         * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
2902         (WebKit::PluginProcessMainDelegate::getExtraInitializationData):
2903         Handle "disable-sandbox".
2904
2905         * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
2906         (WebKit::PluginServiceInitializerDelegate::getExtraInitializationData):
2907         Handle "disable-sandbox".
2908         
2909         * PluginProcess/PluginProcess.h:
2910         Move Type to PluginProcessAttributes and remove hash traits for type.
2911         
2912         * PluginProcess/mac/PluginProcessMac.mm:
2913         (WebKit::PluginProcess::platformInitializePluginProcess):
2914         Update for new type name.
2915
2916         (WebKit::PluginProcess::initializeSandbox):
2917         Return early if the sandbox is disabled.
2918
2919         * Shared/Plugins/Netscape/PluginInformation.cpp:
2920         (WebKit::getPluginModuleInformation):
2921         PluginInfoStore::policyForPlugin has been renamed to PluginInfoStore::defaultLoadPolicyForPlugin.
2922
2923         * Shared/Plugins/PluginModuleInfo.h:
2924         Add PluginModuleLoadUnsandboxed.
2925
2926         * Shared/Plugins/PluginProcessAttributes.h: Added.
2927         Add new header with various plug-in process attributes.
2928
2929         * Shared/Plugins/PluginProcessCreationParameters.h:
2930         Change type enum.
2931
2932         * UIProcess/API/C/WKAPICast.h:
2933         (WebKit::toWKPluginLoadPolicy):
2934         (WebKit::toPluginModuleLoadPolicy):
2935         Handle the unsandboxed enum.
2936
2937         * UIProcess/API/C/WKPage.h:
2938         Add kWKPluginLoadPolicyLoadUnsandboxed.
2939
2940         * UIProcess/Plugins/PluginInfoStore.h:
2941         Rename policyForPlugin to defaultLoadPolicyForPlugin.
2942
2943         * UIProcess/Plugins/PluginProcessManager.cpp:
2944         (WebKit::PluginProcessManager::pluginProcessToken):
2945         Add new helper function for getting a token given plug-in attributes.
2946
2947         (WebKit::PluginProcessManager::getPluginProcessConnection):
2948         This now takes a pluginProcessToken.
2949
2950         (WebKit::PluginProcessManager::getSitesWithData):
2951         Make sure to call pluginProcessToken.
2952
2953         (WebKit::PluginProcessManager::clearSiteData):
2954         Ditto.
2955
2956         (WebKit::PluginProcessManager::getOrCreatePluginProcess):
2957         This now takes a token.
2958
2959         * UIProcess/Plugins/PluginProcessProxy.cpp:
2960         (WebKit::PluginProcessProxy::create):
2961         (WebKit::PluginProcessProxy::PluginProcessProxy):
2962         Pass the PluginProcessAttributes as well as the plug-in process token.
2963
2964         (WebKit::PluginProcessProxy::getLaunchOptions):
2965         Pass the plug-in process attributes to platformGetLaunchOptions.
2966
2967         (WebKit::PluginProcessProxy::didClose):
2968         Pass the token to PluginProcessCrashed.
2969
2970         (WebKit::PluginProcessProxy::didFinishLaunching):
2971         Update for type change.
2972
2973         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
2974         (WebKit::shouldBlockPlugin):
2975         (WebKit::PluginInfoStore::defaultLoadPolicyForPlugin):
2976         Rename policyForPlugin to defaultLoadPolicyForPlugin.
2977
2978         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
2979         (WebKit::PluginProcessProxy::platformGetLaunchOptions):
2980         Set the "disable-sandbox" data if needed.
2981
2982         (WebKit::PluginProcessProxy::platformInitializePluginProcess):
2983         (WebKit::PluginProcessProxy::openPluginPreferencePane):
2984         Get the module info from m_pluginProcessAttributes.
2985
2986         * UIProcess/WebPageProxy.cpp:
2987         (WebKit::WebPageProxy::findPlugin):
2988         This now returns a token.
2989
2990         * UIProcess/WebPageProxy.messages.in:
2991         FindPlugin now returns a token instead of the path.
2992
2993         * UIProcess/WebProcessProxy.cpp:
2994         (WebKit::WebProcessProxy::getPluginProcessConnection):
2995         Pass the token to the plug-in process manager.
2996
2997         * UIProcess/WebProcessProxy.messages.in:
2998         This now takes a token.
2999
3000         * WebKit2.xcodeproj/project.pbxproj:
3001         Add new files.
3002
3003         * WebProcess/Plugins/PluginProcessConnection.cpp:
3004         (WebKit::PluginProcessConnection::PluginProcessConnection):
3005         This now takes a token.
3006
3007         * WebProcess/Plugins/PluginProcessConnection.h:
3008         (WebKit::PluginProcessConnection::create):
3009         (WebKit::PluginProcessConnection::pluginProcessToken):
3010         Create this with a token instead of a path and process type.
3011
3012         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
3013         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
3014         This now takes a token.
3015
3016         (WebKit::PluginProcessConnectionManager::pluginProcessCrashed):
3017         Ditto.
3018
3019         * WebProcess/Plugins/PluginProcessConnectionManager.messages.in:
3020         PluginProcessCrashed now takes a token.
3021
3022         * WebProcess/Plugins/PluginProxy.cpp:
3023         (WebKit::PluginProxy::create):
3024         (WebKit::PluginProxy::PluginProxy):
3025         These now take tokens.
3026
3027         (WebKit::PluginProxy::initialize):
3028         Pass the token when getting the connection.
3029
3030         * WebProcess/WebPage/WebPage.cpp:
3031         (WebKit::WebPage::createPlugin):
3032         Get the token from the UI process and pass it to the PluginProxy.
3033
3034         (WebKit::WebPage::canPluginHandleResponse):
3035         Update now that FindPlugin returns a token.
3036
3037 2013-05-21  Martin Robinson  <mrobinson@igalia.com>
3038
3039         [GTK] [CMake] Add support for building WebKit2
3040         https://bugs.webkit.org/show_bug.cgi?id=116372
3041
3042         Reviewed by Gustavo Noronha Silva.
3043
3044         * CMakeLists.txt: Add common directories to the common include list and remove UIProcess/PageViewportController.cpp
3045         from the source list since it should only be compiled for WebKitEFL. Instead of taking explicit forwarding-header
3046         dependencies accept a list of "tacked-on" dependencies for WebKit2. This allows GTK+ to specify its extra fake
3047         installed header step.
3048         * PlatformEfl.cmake: Remove common include directories and add UIProcess/PageViewportController.cpp to the source
3049         list. Fix up forwarding header dependencies now.
3050         * PlatformGTK.cmake: Added.
3051         * config.h: First check whether this is a CMake build and then fall back to the autotools header.
3052
3053 2013-05-21  Zan Dobersek  <zdobersek@igalia.com>
3054
3055         [GTK] Compile everything in C++11 mode
3056         https://bugs.webkit.org/show_bug.cgi?id=116452
3057
3058         Reviewed by Anders Carlsson.
3059
3060         * GNUmakefile.am: Remove the -std=c++11 flags from the various CPPFLAGS lists, the mode is now specified
3061         by default for all the C++ source code in SetupCompilerFlags.m4.
3062
3063 2013-05-21  Jessie Berlin  <jberlin@apple.com>
3064
3065         Expose a way to know when forms are added to a page or when form controls are added to a form
3066         in the injected bundle
3067         https://bugs.webkit.org/show_bug.cgi?id=116334
3068
3069         Reviewed by Alexey Proskuryakov.
3070
3071         Add shouldNotifyOnFormChanges and didAssociateFormControls to the WKBundlePageFormClient.
3072
3073         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3074         Add the new callbacks as part of version 2 of the WKBundlePageFormClient.
3075
3076         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
3077         (WebKit::InjectedBundlePageFormClient::didAssociateFormControls):
3078         Pass the message along to the client if the client has a handler.
3079         (WebKit::InjectedBundlePageFormClient::shouldNotifyOnFormChanges):
3080         Ditto.
3081         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h:
3082
3083         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3084         (WebKit::WebChromeClient::didAssociateFormControls):
3085         Tell the injected bundle form client for the page.
3086         (WebKit::WebChromeClient::shouldNotifyOnFormChanges):
3087         Ditto.
3088         * WebProcess/WebCoreSupport/WebChromeClient.h:
3089
3090 2013-05-21  Michael Brüning  <michael.bruning@digia.com>
3091
3092         [Qt][WK2] Fix Mountain Lion builds after r150277.
3093         https://bugs.webkit.org/show_bug.cgi?id=116467
3094
3095         Reviewed by Jocelyn Turcotte.
3096
3097         * Shared/API/c/WKBase.h:
3098
3099 2013-05-20  Lucas Forschler  <lforschler@apple.com>
3100
3101     Rollout r150398.
3102
3103 2013-05-20  Zan Dobersek  <zdobersek@igalia.com>
3104
3105         [GTK] Fix concatenations of string literals that are not C++11-compliant
3106         https://bugs.webkit.org/show_bug.cgi?id=116449
3107
3108         Reviewed by Martin Robinson.
3109
3110         Fix the problematic concatenations of string literals so they are compilable under the C++11 standard. This
3111         is simply a matter of separating the string and the string literal that are being concatenated with a space.
3112
3113         * UIProcess/API/gtk/tests/TestPrinting.cpp:
3114         (testPrintOperationPrint):
3115         * UIProcess/API/gtk/tests/WebExtensionTest.cpp:
3116         (methodCallCallback):
3117
3118 2013-05-20  Commit Queue  <commit-queue@webkit.org>
3119
3120         Unreviewed, rolling out r150384.
3121         http://trac.webkit.org/changeset/150384
3122         https://bugs.webkit.org/show_bug.cgi?id=116513
3123
3124         Not ready for primetime. (Requested by kling on #webkit).
3125
3126         * UIProcess/WebProcessProxy.cpp:
3127         (WebKit::WebProcessProxy::WebProcessProxy):
3128         (WebKit::WebProcessProxy::removeWebPage):
3129         * UIProcess/WebProcessProxy.h:
3130         (WebProcessProxy):
3131
3132 2013-05-20  Martin Robinson  <mrobinson@igalia.com>
3133
3134         Remove SharedMemoryGtk.cpp
3135         https://bugs.webkit.org/show_bug.cgi?id=116457
3136
3137         Reviewed by Andreas Kling.
3138
3139         * Platform/gtk/SharedMemoryGtk.cpp: Removed.
3140
3141 2013-05-20  Jessie Berlin  <jberlin@apple.com>
3142
3143         Expose a way to know when forms are added to a page or when form controls are added to a form
3144         in the injected bundle
3145         https://bugs.webkit.org/show_bug.cgi?id=116334
3146
3147         Reviewed by Alexey Proskuryakov.
3148
3149         Add shouldNotifyOnFormChanges and didAssociateFormControls to the WKBundlePageFormClient.
3150
3151         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3152         Add the new callbacks as part of version 2 of the WKBundlePageFormClient.
3153
3154         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
3155         (WebKit::InjectedBundlePageFormClient::didAssociateFormControls):
3156         Pass the message along to the client if the client has a handler.
3157         (WebKit::InjectedBundlePageFormClient::shouldNotifyOnFormChanges):
3158         Ditto.
3159         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h:
3160
3161         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3162         (WebKit::WebChromeClient::didAssociateFormControls):
3163         Tell the injected bundle form client for the page.
3164         (WebKit::WebChromeClient::shouldNotifyOnFormChanges):
3165         Ditto.
3166         * WebProcess/WebCoreSupport/WebChromeClient.h:
3167
3168 2013-05-20  Tim Horton  <timothy_horton@apple.com>
3169
3170         Clients should have a way to extend rendering suppression
3171         https://bugs.webkit.org/show_bug.cgi?id=116463
3172         <rdar://problem/13738496>
3173
3174         Reviewed by Andy Estes.
3175
3176         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3177         (WKBundlePageExtendIncrementalRenderingSuppression): Added.
3178         (WKBundlePageStopExtendingIncrementalRenderingSuppression): Added.
3179         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
3180         These only have any effect if SuppressesIncrementalRendering is also enabled.
3181
3182         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3183         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
3184         Inform the FrameView if there are any outstanding rendering suppression tokens.
3185
3186         * WebProcess/WebPage/WebPage.cpp:
3187         (WebKit::WebPage::WebPage):
3188         (WebKit::WebPage::extendIncrementalRenderingSuppression):
3189         Return the next available rendering suppression token.
3190         Add it to the list of active tokens.
3191         Inform the FrameView that we want to suppress rendering.
3192
3193         (WebKit::WebPage::stopExtendingIncrementalRenderingSuppression):
3194         Remove the given token from the list of active tokens.
3195         Un-suppress rendering if appropriate.
3196
3197         * WebProcess/WebPage/WebPage.h:
3198         (WebKit::WebPage::shouldExtendIncrementalRenderingSuppression):
3199         Return if there are any active rendering suppression tokens.
3200
3201 2013-05-20  Andreas Kling  <akling@apple.com>
3202
3203         PPT: Closing tab that is hung or chewing 100% CPU leaves abandoned WebProcess.
3204         <http://webkit.org/b/116464>
3205         <rdar://problem/10103795>
3206
3207         Reviewed by Anders Carlsson.
3208
3209         Give the web process a 10 second chance to exit nicely after closing the last tab belonging to it.
3210         This code only runs if there was something on the page (e.g an unload/beforeunload event handler)
3211         preventing the UI process from killing it right away.
3212
3213         * UIProcess/WebProcessProxy.cpp:
3214         (WebKit::WebProcessProxy::WebProcessProxy):
3215         (WebKit::WebProcessProxy::removeWebPage):
3216         (WebKit::WebProcessProxy::forcefulTerminationTimerFired):
3217         * UIProcess/WebProcessProxy.h:
3218         (WebProcessProxy):
3219
3220 2013-05-20  Anders Carlsson  <andersca@apple.com>
3221
3222         Add helper function for converting a KeyedCodingValue to a CFTypeRef
3223         https://bugs.webkit.org/show_bug.cgi?id=116461
3224
3225         Reviewed by Tim Horton.
3226
3227         * Shared/cf/KeyedCodingValueCF.cpp: Added.
3228         * Shared/cf/KeyedCodingValueCF.h: Added.
3229
3230         * WebKit2.xcodeproj/project.pbxproj:
3231
3232 2013-05-20  Anders Carlsson  <andersca@apple.com>
3233
3234         Begin stubbing out a new KeyedEncoder class
3235         https://bugs.webkit.org/show_bug.cgi?id=116456
3236
3237         Reviewed by Sam Weinig.
3238
3239         This class (and it's coming counterpart, KeyedDecoder) will be used for serializing
3240         object graphs to a tree-like structure of dictionaries. It is up to individual ports to
3241         serialize them further (for example, on Mac they could be serialized to CFPropertyList objects).
3242         
3243         This will be used for serializing session storage state but I hope that it can be used for serializing
3244         back forward state in the future as our current implementation of back forward state serialization
3245         is fragile and depends on our IPC layer's binary encoding(!).
3246         
3247         * Shared/KeyedCodingValue.h: Added.
3248         * Shared/KeyedEncoder.cpp: Added.
3249         * Shared/KeyedEncoder.h: Added.
3250
3251         * WebKit2.xcodeproj/project.pbxproj:
3252
3253 2013-05-19  Sam Weinig  <sam@webkit.org>
3254
3255         Bump WKBundlePageLoaderClient version number so as not to break some clients
3256         https://bugs.webkit.org/show_bug.cgi?id=116426
3257
3258         Reviewed by Anders Carlsson.
3259
3260         * Shared/APIClientTraits.cpp:
3261         (WebKit):
3262         * Shared/APIClientTraits.h:
3263         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3264
3265 2013-05-19  Anders Carlsson  <andersca@apple.com>
3266
3267         Remove link prerendering code
3268         https://bugs.webkit.org/show_bug.cgi?id=116415
3269
3270         Reviewed by Darin Adler.
3271
3272         This code was only used by Chromium and is dead now.
3273
3274         * Configurations/FeatureDefines.xcconfig:
3275
3276 2013-05-18  Anders Carlsson  <andersca@apple.com>
3277
3278         Simplify the StorageArea setter functions
3279         https://bugs.webkit.org/show_bug.cgi?id=116402
3280
3281         Reviewed by Sam Weinig.
3282
3283         Remove security checking code that lives in Storage now.
3284
3285         * WebProcess/Storage/StorageAreaImpl.cpp:
3286         (WebKit::StorageAreaImpl::setItem):
3287         (WebKit::StorageAreaImpl::removeItem):
3288         (WebKit::StorageAreaImpl::clear):
3289         * WebProcess/Storage/StorageAreaImpl.h:
3290
3291 2013-05-18  Sam Weinig  <sam@webkit.org>
3292
3293         Fix some builds.
3294
3295         * UIProcess/API/mac/WKTypeRefWrapper.mm:
3296
3297 2013-05-18  Carlos Garcia Campos  <cgarcia@igalia.com>
3298
3299         REGRESSION(r150305): WebKit2 build broken with INDEXED_DATABASE enabled
3300         https://bugs.webkit.org/show_bug.cgi?id=116389
3301
3302         Reviewed by Martin Robinson.
3303
3304         There's no longer WebKeyValueStorageManager in the web process
3305         after r150305.
3306
3307         * WebProcess/WebPage/WebPageGroupProxy.cpp:
3308         (WebKit::WebPageGroupProxy::WebPageGroupProxy):
3309
3310 2013-05-17  Sam Weinig  <sam@webkit.org>
3311
3312         Add a way to pass WebKit2 WKTypeRefs in Objective-C style user data messages
3313         https://bugs.webkit.org/show_bug.cgi?id=116345
3314
3315         Reviewed by Anders Carlsson.
3316
3317         In order to efficiently send a WKImageRef to another process when using the
3318         Objective-C WKConnection (or other user data messages), we need a way to encode
3319         WKTypeRefs in the objective-c object graph. Thus was born WKTypeRefWrapper.
3320
3321         * Shared/mac/ObjCObjectGraphCoders.mm:
3322         (WebKit::typeFromObject):
3323         (WebKit::WebContextObjCObjectGraphEncoderImpl::encode):
3324         (WebKit::WebContextObjCObjectGraphDecoderImpl::decode):
3325         (WebKit::InjectedBundleObjCObjectGraphEncoderImpl::encode):
3326         (WebKit::InjectedBundleObjCObjectGraphDecoderImpl::decode):
3327         * UIProcess/API/mac/WKTypeRefWrapper.h: Added.
3328         * UIProcess/API/mac/WKTypeRefWrapper.mm: Added.
3329         (-[WKTypeRefWrapper initWithObject:]):
3330         (-[WKTypeRefWrapper object]):
3331         * WebKit2.xcodeproj/project.pbxproj:
3332
3333 2013-05-18  Anders Carlsson  <andersca@apple.com>
3334
3335         Simplify StorageArea getter functions
3336         https://bugs.webkit.org/show_bug.cgi?id=116399
3337
3338         Reviewed by Sam Weinig.
3339
3340         Remove security and private browsing checks.
3341
3342         * WebProcess/Storage/StorageAreaImpl.cpp:
3343         (WebKit::StorageAreaImpl::key):
3344         (WebKit::StorageAreaImpl::item):
3345         (WebKit::StorageAreaImpl::contains):
3346         * WebProcess/Storage/StorageAreaImpl.h:
3347
3348 2013-05-18  Patrick Gansterer  <paroga@webkit.org>
3349
3350         [CMake] Replace *_LIBRARY_NAME with *_OUTPUT_NAME
3351         https://bugs.webkit.org/show_bug.cgi?id=114554
3352
3353         Reviewed by Gyuyoung Kim.
3354
3355         Using variables as target names is very uncommon in CMake.
3356         The usual way to specify the name of the resulting binary
3357         is to set the OUTPUT_NAME target property.
3358
3359         * CMakeLists.txt:
3360         * PlatformEfl.cmake:
3361         * efl/ewebkit2.pc.in:
3362
3363 2013-05-18  Carlos Garcia Campos  <cgarcia@igalia.com>
3364
3365         [GTK] Move GTK port off legacy clipboard
3366         https://bugs.webkit.org/show_bug.cgi?id=116221
3367
3368         Reviewed by Martin Robinson.
3369
3370         * UIProcess/API/gtk/WebKitWebViewBase.cpp: Remove ClipboardGtk.h
3371         include.
3372         * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
3373         (WebKit::WebDragClient::startDrag): Get the DataObjectGtk from the
3374         Pasteboard associated to the given Clipboard.
3375
3376 2013-05-18  Jinwoo Song  <jinwoo7.song@samsung.com>
3377
3378         [EFL][WK2] Refactor ewk_view_custom_encoding_set/get API
3379         https://bugs.webkit.org/show_bug.cgi?id=116386
3380
3381         Reviewed by Christophe Dumez.
3382
3383         Refactor the API to handle 'const char*' parameter in right way and
3384         enable the unit test which was disabled in r136230 as there is no assertion now.
3385
3386         * UIProcess/API/efl/EwkView.cpp:
3387         (EwkView::setCustomTextEncodingName):
3388         * UIProcess/API/efl/EwkView.h:
3389         (EwkView::customTextEncodingName):
3390         (EwkView):
3391         * UIProcess/API/efl/ewk_view.cpp:
3392         (ewk_view_custom_encoding_set):
3393         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
3394         (TEST_F):
3395
3396 2013-05-18  Csaba Osztrogonác  <ossy@webkit.org>
3397
3398         [CMake] Unreviewed speculative build fix after r150305 and r150306.
3399
3400         * CMakeLists.txt:
3401
3402 2013-05-18  Csaba Osztrogonác  <ossy@webkit.org>
3403
3404         [Qt][WK2] Unreviewed build fix after r150305 and r150306.
3405
3406         * DerivedSources.pri:
3407         * Target.pri:
3408
3409 2013-05-18  Zan Dobersek  <zdobersek@igalia.com>
3410
3411         Unreviewed build fix for the GTK port after r150305 and r150306.
3412
3413         * GNUmakefile.list.am:
3414
3415 2013-05-17  Alexey Proskuryakov  <ap@apple.com>
3416
3417         <rdar://problem/13819878> Disable SharedWorker when in multiple web process model
3418         https://bugs.webkit.org/show_bug.cgi?id=116359
3419
3420         The condition was accidentally negated, fixing.
3421
3422         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3423         (WebKit::WebPlatformStrategies::isAvailable):
3424
3425 2013-05-17  Gavin Barraclough  <barraclough@apple.com>
3426
3427         Only allow 1 WebProcess to hold a PageCache
3428         https://bugs.webkit.org/show_bug.cgi?id=116368
3429         <rdar://problem/13392600>
3430
3431         Reviewed by Geoff Garen & Anders Carlson.
3432
3433         * UIProcess/WebContext.cpp:
3434         (WebKit::WebContext::WebContext):
3435         (WebKit::WebContext::processDidSaveToPageCache):
3436         (WebKit):
3437         (WebKit::WebContext::disconnectProcess):
3438         * UIProcess/WebContext.h:
3439             - Added m_processWithPageCache, only allow one process to keep a PageCache.
3440         (WebContext):
3441         * UIProcess/WebPageProxy.cpp:
3442         (WebKit::WebPageProxy::didSaveToPageCache):
3443         (WebKit):
3444         * UIProcess/WebPageProxy.h:
3445         (WebPageProxy):
3446         * UIProcess/WebPageProxy.messages.in:
3447             - Forward didSaveToPageCache to the WebProcessProxy.
3448         * UIProcess/WebProcessProxy.cpp:
3449         (WebKit::WebProcessProxy::addBackForwardItem):
3450         (WebKit::WebProcessProxy::didSaveToPageCache):
3451         (WebKit):
3452         (WebKit::WebProcessProxy::releasePageCache):
3453             - Forward releasePageCache to the WebProcess.
3454             - Forward didSaveToPageCache to the WebContext.
3455         * UIProcess/WebProcessProxy.h:
3456         (WebProcessProxy):
3457         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3458         (WebKit::WebFrameLoaderClient::didSaveToPageCache):
3459             - Forward didSaveToPageCache to the WebPageProxy.
3460         * WebProcess/WebProcess.cpp:
3461         (WebKit::WebProcess::releasePageCache):
3462         (WebKit):
3463         * WebProcess/WebProcess.h:
3464         (WebProcess):
3465         * WebProcess/WebProcess.messages.in:
3466             - Added 'ReleasePageCache' to instruct a web process to drop any cached pages.
3467
3468 2013-05-17  Anders Carlsson  <andersca@apple.com>
3469
3470         Share code between WebKit1 and WebKit2 StorageArea subclasses
3471         https://bugs.webkit.org/show_bug.cgi?id=116367
3472
3473         Reviewed by Andreas Kling.
3474
3475         * WebProcess/Storage/StorageAreaImpl.cpp:
3476         (WebKit::StorageAreaImpl::length):
3477         Remove code that's now in Storage::length.
3478
3479         (WebKit::StorageAreaImpl::storageType):
3480         Make this a virtual member function.
3481
3482         * WebProcess/Storage/StorageAreaImpl.h:
3483
3484 2013-05-17  Alexey Proskuryakov  <ap@apple.com>
3485
3486         <rdar://problem/13819878> Disable SharedWorker when in multiple web process model
3487         https://bugs.webkit.org/show_bug.cgi?id=116359
3488
3489         Reviewed by Anders Carlsson.
3490
3491         Implement SharedWorkerStrategy::isAvailable.
3492
3493         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3494         (WebKit::WebPlatformStrategies::isAvailable):
3495         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
3496
3497 2013-05-17  Beth Dakin  <bdakin@apple.com>
3498
3499         Headers and footers will sometimes disappear and re-appear during page loads
3500         https://bugs.webkit.org/show_bug.cgi?id=116336
3501         -and corresponding-
3502         <rdar://problem/13886753>
3503
3504         Reviewed by Simon Fraser.
3505
3506         This patch changes the WebCore-level API that WebKit uses to create a banner. 
3507         Specifically this patch removes FrameView::setWantsLayerForHeader(), which created 
3508         and returned a layer. Instead, WK2 will call Page::addHeaderWithHeight(). When the 
3509         layer has been created, it will call back into WK2 via ChromeClient. This will 
3510         allow WebCore to re-create the header/footer layers as needed whenever the 
3511         FrameView/RenderLayerCompositor have been destroyed and recreated.
3512
3513         Send the layers over to PageBanner.
3514         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3515         (WebKit::WebChromeClient::didAddHeaderLayer):
3516         (WebKit::WebChromeClient::didAddFooterLayer):
3517         * WebProcess/WebCoreSupport/WebChromeClient.h:
3518         (WebChromeClient):
3519
3520         PageBanner::addToPage() now does much less work since it can’t get the parent 
3521         layer right away. The work that is used to do once it had the parent layer is now 
3522         performed in didAddParentLayer()
3523         * WebProcess/WebPage/PageBanner.cpp:
3524         (WebKit::PageBanner::didAddParentLayer):
3525         * WebProcess/WebPage/PageBanner.h:
3526         * WebProcess/WebPage/mac/PageBannerMac.mm:
3527         (WebKit::PageBanner::addToPage):
3528         (WebKit::PageBanner::didAddParentLayer):
3529
3530 2013-05-17  Anders Carlsson  <andersca@apple.com>
3531
3532         Rename WebKeyValueStorageManagerProxy to WebKeyValueStorageManager
3533         https://bugs.webkit.org/show_bug.cgi?id=116361
3534
3535         Reviewed by Andreas Kling.
3536
3537         There's nothing proxy about this class anymore!
3538
3539         * UIProcess/API/C/WKAPICast.h:
3540         * UIProcess/API/C/WKContext.cpp:
3541         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
3542         * UIProcess/WebKeyValueStorageManager.cpp: Renamed from Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.cpp.
3543         * UIProcess/WebKeyValueStorageManager.h: Renamed from Source/WebKit2/UIProcess/WebKeyValueStorageManagerProxy.h.
3544         * WebKit2.xcodeproj/project.pbxproj:
3545
3546 2013-05-17  Anders Carlsson  <andersca@apple.com>
3547
3548         Remove dead local storage code
3549         https://bugs.webkit.org/show_bug.cgi?id=116360
3550
3551         Reviewed by Beth Dakin.
3552
3553         Storage is all handled in the UI process now so we no longer need a WebKeyValueStorageManager in the web process.
3554
3555         * DerivedSources.make:
3556         * UIProcess/WebKeyValueStorageManagerProxy.cpp:
3557         (WebKit::WebKeyValueStorageManagerProxy::WebKeyValueStorageManagerProxy):
3558         (WebKit):
3559         (WebKit::didGetKeyValueStorageOrigins):
3560         (WebKit::WebKeyValueStorageManagerProxy::getKeyValueStorageOrigins):
3561         * UIProcess/WebKeyValueStorageManagerProxy.h:
3562         (WebKeyValueStorageManagerProxy):
3563         * UIProcess/WebKeyValueStorageManagerProxy.messages.in: Removed.
3564         * WebKit2.xcodeproj/project.pbxproj:
3565         * WebProcess/Storage/WebKeyValueStorageManager.cpp: Removed.
3566         * WebProcess/Storage/WebKeyValueStorageManager.h: Removed.
3567         * WebProcess/Storage/WebKeyValueStorageManager.messages.in: Removed.
3568         * WebProcess/WebPage/WebPage.cpp:
3569         (WebKit::WebPage::updatePreferences):
3570         * WebProcess/WebProcess.cpp:
3571         (WebKit::WebProcess::WebProcess):
3572
3573 2013-05-17  Anders Carlsson  <andersca@apple.com>
3574
3575         Use the UI process storage manager for deleting local storage data
3576         https://bugs.webkit.org/show_bug.cgi?id=116358
3577         <rdar://problem/13852829>
3578
3579         Reviewed by Andreas Kling.
3580
3581         * Shared/WebSecurityOrigin.h:
3582         (WebKit::WebSecurityOrigin::protocol):
3583         (WebKit::WebSecurityOrigin::host):
3584         (WebKit::WebSecurityOrigin::databaseIdentifier):
3585         (WebKit::WebSecurityOrigin::toString):
3586         Remove unneeded consts.
3587
3588         (WebKit::WebSecurityOrigin::securityOrigin):
3589         Add getter.
3590
3591         * UIProcess/Storage/LocalStorageDatabase.cpp:
3592         (WebKit::LocalStorageDatabase::close):
3593         deleteEmptyDatabaseWithOrigin has been renamed to deleteDatabaseWithOrigin.
3594
3595         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
3596         (WebKit::LocalStorageDatabaseTracker::deleteDatabaseWithOrigin):
3597         Rename since this is no longer used only for empty databases.
3598
3599         (WebKit::LocalStorageDatabaseTracker::deleteAllDatabases):
3600         Loop over the tracker database and delete all database files.
3601
3602         * UIProcess/Storage/StorageManager.cpp:
3603         (WebKit::StorageManager::StorageArea::clear):
3604         Clear the map, close the database and tell all event listeners to reset their caches.
3605
3606         (WebKit::StorageManager::LocalStorageNamespace::clearStorageAreasMatchingOrigin):
3607         Loop over all storage areas and call clear on those matching the security origin.
3608
3609         (WebKit::StorageManager::LocalStorageNamespace::clearAllStorageAreas):
3610         Loop over all storage areas and call clear on them.
3611         
3612         (WebKit::StorageManager::deleteEntriesForOrigin):
3613         Dispatch deleteEntriesForOriginInternal on the work queue.
3614
3615         (WebKit::StorageManager::deleteAllEntries):
3616         Dispatch deleteAllEntriesInternal on the work queue.
3617
3618         (WebKit::StorageManager::deleteEntriesForOriginInternal):
3619         Call clearStorageAreasMatchingOrigin on all local storage namespaces and then delete the database.
3620
3621         (WebKit::StorageManager::deleteAllEntriesInternal):
3622         Call clearAllStorageAreas on all local storage namespaces and then delete all databases.
3623
3624         * UIProcess/WebKeyValueStorageManagerProxy.cpp:
3625         (WebKit::WebKeyValueStorageManagerProxy::deleteEntriesForOrigin):
3626         Call out to the storage manager.
3627
3628         (WebKit::WebKeyValueStorageManagerProxy::deleteAllEntries):
3629         Ditto.
3630
3631         * WebProcess/Storage/StorageAreaMap.cpp:
3632         (WebKit::StorageAreaMap::clearCache):
3633         Call resetValues which will null out the storage map.
3634
3635         * WebProcess/Storage/StorageAreaMap.messages.in:
3636         Add ClearCache message.
3637
3638 2013-05-17  Anders Carlsson  <andersca@apple.com>
3639
3640         Only import local storage items from the database once
3641         https://bugs.webkit.org/show_bug.cgi?id=116354
3642
3643         Reviewed by Andreas Kling.
3644
3645         We import items from the database over and over, when we only want to do it once. Use a 
3646         boolean flag to guard against doing it more than once. 
3647         
3648         Also, rename importItemsFromDatabase to openDatabaseAndImportItemsIfNeeded since it now
3649         also opens the database (even if it doesn't need to import anything). This is preparation for an
3650         upcoming patch where the database will be closed when it's cleared.
3651
3652         * UIProcess/Storage/StorageManager.cpp:
3653         (StorageManager::StorageArea):
3654         (WebKit::StorageManager::StorageArea::StorageArea):
3655         (WebKit::StorageManager::StorageArea::setItem):
3656         (WebKit::StorageManager::StorageArea::removeItem):
3657         (WebKit::StorageManager::StorageArea::clear):
3658         (WebKit::StorageManager::StorageArea::items):
3659         (WebKit::StorageManager::StorageArea::openDatabaseAndImportItemsIfNeeded):
3660
3661 2013-05-17  Alexey Proskuryakov  <ap@apple.com>
3662
3663         <rdar://problem/13869765> Lion: Crashes in islcCanLoadInputMethodFromBundleID.
3664
3665         Reviewed by Anders Carlsson.
3666
3667         * WebProcess/com.apple.WebProcess.sb.in: Allow text input directories.
3668
3669 2013-05-17  Anders Carlsson  <andersca@apple.com>
3670
3671         WKKeyValueStorageManagerGetKeyValueStorageOrigins should get origins from the UI process
3672         https://bugs.webkit.org/show_bug.cgi?id=116346
3673         <rdar://problem/13852829>
3674
3675         Reviewed by Andreas Kling.
3676
3677         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
3678         (WebKit::LocalStorageDatabaseTracker::origins):
3679         New helper function to return all the tracked origins.
3680
3681         * UIProcess/Storage/StorageManager.cpp:
3682         (WebKit::StorageManager::StorageManager):
3683         Initialize the UTF-8 encoding.
3684
3685         (WebKit::StorageManager::getOrigins):
3686         Call getOriginsInternal on our queue.
3687
3688         (WebKit::callCallbackFunction):
3689         Helper function for calling the callback function.
3690
3691         (WebKit::StorageManager::getOriginsInternal):
3692         Get the origins and make sure we call the callback with the given function dispatcher.
3693
3694         * UIProcess/WebKeyValueStorageManagerProxy.cpp:
3695         (WebKit::didGetKeyValueStorageOriginsCallback):
3696         Construct the array of WebSecurityOrigin objects and call the callback.
3697
3698         (WebKit::WebKeyValueStorageManagerProxy::getKeyValueStorageOrigins):
3699         Call StorageManager::getOrigins.
3700
3701 2013-05-16  Alexey Proskuryakov  <ap@apple.com>
3702
3703         Text input is largely broken when there are subframes loading
3704         http://bugs.webkit.org/show_bug.cgi?id=59121
3705         <rdar://problem/9320468>
3706
3707         Reviewed by Darin Adler.
3708
3709         * UIProcess/PageClient.h:
3710         * UIProcess/API/mac/PageClientImpl.h:
3711         * UIProcess/API/mac/PageClientImpl.mm:
3712         (WebKit::PageClientImpl::updateSecureInputState): Separated secure input state
3713         updating into a separate function. Removed updateTextInputState, we don't need
3714         to go through PageClient to implement its behavior at all.
3715         (WebKit::PageClientImpl::dismissDictionaryLookupPanel): Added a FIXME.
3716
3717         * UIProcess/API/mac/WKView.mm:
3718         * UIProcess/API/mac/WKViewInternal.h:
3719         Removed _updateTextInputStateIncludingSecureInputState.
3720
3721         * UIProcess/WebPageProxy.h: Added m_temporarilyClosedComposition, which helps
3722         to figure out that WebCore decided to close a composition. The issue is that WebCore
3723         would first send an EditorState with hasComposition set to false, and with
3724         shouldIgnoreCompositionSelectionChange set to true, at which time we forget the
3725         previous m_editorState, but can't make any decisions based on this transient state.
3726         We should find a way to simplify this (maybe not send these updates with
3727         shouldIgnoreCompositionSelectionChange at all?)
3728
3729         * UIProcess/WebPageProxy.cpp:
3730         (WebKit::WebPageProxy::WebPageProxy): Initialize m_temporarilyClosedComposition.
3731         (WebKit::WebPageProxy::didCommitLoadForFrame): Removed the code to kill a composition
3732         when any frame commits a load, which made no sense (along with surrounding code,
3733         which will unfortunately survive longer).
3734         (WebKit::WebPageProxy::editorStateChanged): Implemented state updating here,
3735         we don't need to go to WKView.mm to implement this logic. Figure out when WebCore
3736         discards a composition, and notify input methods about this.
3737         (WebKit::WebPageProxy::resetStateAfterProcessExited): Reset m_temporarilyClosedComposition.
3738         Added some FIXMEs.
3739
3740 2013-05-17  Manuel Rego Casasnovas  <rego@igalia.com>
3741
3742         [WK2] Add support for selectTrailingWhitespaceEnabled setting
3743         https://bugs.webkit.org/show_bug.cgi?id=112426
3744
3745         Reviewed by Ryosuke Niwa.
3746
3747         * Shared/WebPreferencesStore.h:
3748         (WebKit): Add macro for selectTrailingWhitespaceEnabled.
3749         * UIProcess/API/C/WKPreferences.cpp:
3750         (WKPreferencesSetSelectTrailingWhitespaceEnabled):
3751         (WKPreferencesGetSelectTrailingWhitespaceEnabled): Implement methods
3752         using the new setting.
3753         * UIProcess/API/C/WKPreferencesPrivate.h: Add new methods headers.
3754         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3755         (WebKit::WebEditorClient::isSelectTrailingWhitespaceEnabled): Implement
3756         method delegating in WebPage.
3757         * WebProcess/WebPage/WebPage.cpp:
3758         (WebKit::WebPage::updatePreferences): Set
3759         selectTrailingWhitespaceEnabled setting.
3760         (WebKit::WebPage::setSmartInsertDeleteEnabled): Set
3761         selectTrailingWhitespaceEnabled as they are mutually exclusive.
3762         (WebKit):
3763         (WebKit::WebPage::isSelectTrailingWhitespaceEnabled): Implement method
3764         using settings.
3765         (WebKit::WebPage::setSelectTrailingWhitespaceEnabled): Implement method
3766         using settings and set smartInsertDeleteEnabled as they are mutually
3767         exclusive.
3768         * WebProcess/WebPage/WebPage.h:
3769         (WebPage): Add new methods headers.
3770
3771 2013-05-17  Brady Eidson  <beidson@apple.com>
3772
3773         Fix crash introduced by http://trac.webkit.org/changeset/150282
3774         Followup to https://bugs.webkit.org/show_bug.cgi?id=116253
3775
3776         Reviewed by Andreas Kling.
3777
3778         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3779         (WebKit::WebChromeClient::focusedFrameChanged): Frame might be null.
3780
3781 2013-05-17  Brady Eidson  <beidson@apple.com>
3782
3783         Replace WebFrameLoaderClient static_casts with a function that might return null.
3784         https://bugs.webkit.org/show_bug.cgi?id=116253
3785
3786         The general approach here is:
3787         1 - Introduce a toWebFrameLoaderClient() function to convert FrameLoaderClients, and that may return null.
3788         2 - Adopt toWebFrameLoaderClient() everywhere we used to do a direct static_cast<WebFrameLoaderClient*>
3789         3 - In functions that already support a "return 0" scenario, a failed cast results in a return 0.
3790         4 - In other functions that assume no failure to get the WebFrameLoaderClient, add an ASSERT.
3791
3792         Reviewed by Alexey Proskuryakov.
3793
3794         Add the utility function to cast:
3795         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3796         (WebKit::toWebFrameLoaderClient):
3797
3798         Adopt it everywhere:
3799         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
3800         (WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):
3801
3802         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
3803         (WebKit::InjectedBundleNodeHandle::documentFrame):
3804         (WebKit::InjectedBundleNodeHandle::htmlFrameElementContentFrame):
3805         (WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame):
3806
3807         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3808         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
3809
3810         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
3811         (WebKit::InjectedBundleDOMWindowExtension::frame):
3812
3813         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
3814         (WebKit::InjectedBundleHitTestResult::frame):
3815         (WebKit::InjectedBundleHitTestResult::targetFrame):
3816
3817         * WebProcess/Network/WebResourceLoadScheduler.cpp:
3818         (WebKit::WebResourceLoadScheduler::scheduleLoad):
3819
3820         * WebProcess/Plugins/PluginView.cpp:
3821         (WebKit::webPage):
3822         (WebKit::PluginView::performFrameLoadURLRequest):
3823
3824         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3825         (WebKit::WebChromeClient::focusedNodeChanged):
3826         (WebKit::WebChromeClient::focusedFrameChanged):
3827         (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
3828         (WebKit::WebChromeClient::runJavaScriptAlert):
3829         (WebKit::WebChromeClient::runJavaScriptConfirm):
3830         (WebKit::WebChromeClient::runJavaScriptPrompt):
3831         (WebKit::WebChromeClient::print):
3832         (WebKit::WebChromeClient::exceededDatabaseQuota):
3833         (WebKit::WebChromeClient::runOpenPanel):
3834
3835         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3836         (WebKit::WebEditorClient::textFieldDidBeginEditing):
3837         (WebKit::WebEditorClient::textFieldDidEndEditing):
3838         (WebKit::WebEditorClient::textDidChangeInTextField):
3839         (WebKit::WebEditorClient::textDidChangeInTextArea):
3840         (WebKit::WebEditorClient::doTextFieldCommandFromEvent):
3841         (WebKit::WebEditorClient::textWillBeDeletedInTextField):
3842
3843         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3844         (WebKit::WebFrameLoaderClient::dispatchWillSendSubmitEvent):
3845         (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
3846
3847         * WebProcess/WebPage/WebFrame.cpp:
3848         (WebKit::WebFrame::contentsAsString):
3849         (WebKit::WebFrame::parentFrame):
3850         (WebKit::WebFrame::childFrames):
3851         (WebKit::WebFrame::frameForContext):
3852         (WebKit::WebFrameFilter::shouldIncludeSubframe):
3853
3854         * WebProcess/WebPage/WebPage.cpp:
3855         (WebKit::WebPage::mainFrameHasCustomRepresentation):
3856
3857 2013-05-17  Sam Weinig  <sam@webkit.org>
3858
3859         Expose new load-with-userData API to Objective-C
3860         https://bugs.webkit.org/show_bug.cgi?id=116335
3861
3862         Reviewed by Anders Carlsson.
3863
3864         - Adds loadRequest:userData:, loadFileURL:restrictToFilesWithin:userData:, loadHTMLString:baseURL:userData:
3865           loadData:MIMEType:textEncodingName:baseURL:, and loadData:MIMEType:textEncodingName:baseURL:userData.
3866         - Adds a WKObjCTypeWrapperRef (which is a ObjCObjectGraph under the covers) to allow the userData to be unwrapped
3867           in the injected bundles willLoadURLRequest and willLoadDataRequest C-SPI callbacks.
3868
3869         * Shared/API/c/WKBase.h:
3870         * Shared/API/c/WKSharedAPICast.h:
3871         * Shared/API/c/mac/WKBaseMac.h: Added.
3872         * Shared/API/c/mac/WKObjCTypeWrapperRef.h: Added.
3873         * Shared/API/c/mac/WKObjCTypeWrapperRef.mm: Added.
3874         (WKObjCTypeWrapperGetTypeID):
3875         (WKObjCTypeWrapperCreate):
3876         (WKObjCTypeWrapperGetObject):
3877         * UIProcess/API/mac/WKBrowsingContextController.h:
3878         * UIProcess/API/mac/WKBrowsingContextController.mm:
3879         (+[WKBrowsingContextController registerSchemeForCustomProtocol:]):
3880         (+[WKBrowsingContextController unregisterSchemeForCustomProtocol:]):
3881         (-[WKBrowsingContextController loadRequest:]):
3882         (-[WKBrowsingContextController loadRequest:userData:]):
3883         (-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]):
3884         (-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:userData:]):
3885         (-[WKBrowsingContextController loadHTMLString:baseURL:]):
3886         (-[WKBrowsingContextController loadHTMLString:baseURL:userData:]):
3887         (-[WKBrowsingContextController loadData:MIMEType:textEncodingName:baseURL:]):
3888         (-[WKBrowsingContextController loadData:MIMEType:textEncodingName:baseURL:userData:]):
3889         * WebKit2.xcodeproj/project.pbxproj:
3890
3891 2013-05-17  Sam Weinig  <sam@webkit.org>
3892
3893         Add WKPageLoadData and WKPageLoadDataWithUserData SPI to support loading arbitrary data blobs
3894         https://bugs.webkit.org/show_bug.cgi?id=116325
3895
3896         Reviewed by Simon Fraser.
3897
3898         * UIProcess/API/C/WKPage.cpp:
3899         (WKPageLoadData):
3900         (WKPageLoadDataWithUserData):
3901         Add new SPI.
3902
3903         * UIProcess/API/C/WKPage.h:
3904         * UIProcess/WebPageProxy.cpp:
3905         (WebKit::WebPageProxy::loadData):
3906         * UIProcess/WebPageProxy.h:
3907         Pipe through to the WebProcess.
3908
3909         * WebProcess/WebPage/WebPage.h:
3910         * WebProcess/WebPage/WebPage.messages.in:
3911         * WebProcess/WebPage/WebPage.cpp:
3912         (WebKit::WebPage::loadDataImpl):
3913         (WebKit::WebPage::loadData):
3914         (WebKit::WebPage::loadHTMLString):
3915         (WebKit::WebPage::loadAlternateHTMLString):
3916         (WebKit::WebPage::loadPlainTextString):
3917         (WebKit::WebPage::loadWebArchiveData):
3918         Rename existing loadData function to loadDataImpl (I hate it) to avoid overload conflict
3919         from IPC magic.
3920
3921
3922 2013-05-17  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
3923
3924         [EFL][WK2] Fix sub menu initialization in ewk_context_menu_item
3925         https://bugs.webkit.org/show_bug.cgi?id=116321
3926
3927         Reviewed by Christophe Dumez.
3928
3929         During sub menu creation, after initializing m_parentMenu, parentMenu
3930         pointer became null which may cause segfaults. This patch fixes it by
3931         using m_parentMenu.
3932
3933         * UIProcess/API/efl/ewk_context_menu_item.cpp:
3934         (EwkContextMenuItem::EwkContextMenuItem):
3935
3936 2013-05-17  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
3937
3938         [EFL][WK2] Support sub menu in ewk context menus
3939         https://bugs.webkit.org/show_bug.cgi?id=114729
3940
3941         Reviewed by Christophe Dumez.
3942
3943         Added submenu support in EwkContextMenu and an API function to receive
3944         Ewk_Context_Menu from submenu context menu item. A test case was added
3945         for new API function.
3946         EwkContextMenu is now an EwkObject allowing multiple instances of submenu
3947         to be used in different submenu type context menu items.
3948
3949         * UIProcess/API/efl/ewk_context_menu_item.cpp:
3950         (EwkContextMenuItem::EwkContextMenuItem):
3951         (ewk_context_menu_item_new):
3952         (ewk_context_menu_item_parent_menu_get):
3953         (ewk_context_menu_item_submenu_get):
3954         * UIProcess/API/efl/ewk_context_menu_item.h:
3955         * UIProcess/API/efl/ewk_context_menu_item_private.h:
3956         (EwkContextMenuItem::create):
3957         (EwkContextMenuItem::parentMenu):
3958         (EwkContextMenuItem::subMenu):
3959         (EwkContextMenuItem):
3960         * UIProcess/API/efl/ewk_context_menu_private.h:
3961         (EwkContextMenu::ewkView):
3962         (EwkContextMenu):
3963         * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:
3964         (showContextMenu):
3965
3966 2013-05-17  Zoltan Arvai  <zarvai@inf.u-szeged.hu>, Ádám Kallai  <kadam@inf.u-szeged.hu>
3967
3968         [Qt] Unreviewed build fix.
3969
3970         Add missing Qt specific initializer for willLoadURLRequest and willLoadDataRequest.
3971
3972         * WebProcess/qt/QtBuiltinBundlePage.cpp:
3973         (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):
3974
3975 2013-05-16  Beth Dakin  <bdakin@apple.com>
3976
3977         Remove WKBundlePageGetHeaderLayer/Footer SPI
3978         https://bugs.webkit.org/show_bug.cgi?id=116254
3979
3980         Reviewed by Benjamin Poulain.
3981
3982         We should remove the Remove WKBundlePageGetHeaderLayer/Footer SPI. It was only 
3983         recently added and have been replaced by WKBundlePageSetHeaderBanner/Footer.
3984
3985         * WebKit2.xcodeproj/project.pbxproj:
3986         * WebProcess/InjectedBundle/API/c/mac/WKBundlePagePrivateMac.h: Removed.
3987         * WebProcess/InjectedBundle/API/c/mac/WKBundlePagePrivateMac.mm: Removed.
3988         * WebProcess/WebPage/WebPage.h:
3989         (WebPage):
3990         * WebProcess/WebPage/mac/WebPageMac.mm:
3991         (WebKit):
3992         (WebKit::WebPage::updateHeaderAndFooterLayersForDeviceScaleChange):
3993
3994 2013-05-14  Sam Weinig  <sam@webkit.org>
3995
3996         Add variants of the loading APIs that take user data and a way for the injected bundle to find out about them
3997         https://bugs.webkit.org/show_bug.cgi?id=116132
3998
3999         Reviewed by Anders Carlsson.
4000
4001         Adds "WithUserData" versions of all the load APIs and two new WKBundlePageLoaderClient functions,
4002         willLoadURLRequest and willLoadDataRequest to let the bundle access them.
4003
4004         Adds WebKit2WillLoadTest.* API tests.
4005
4006         * UIProcess/API/C/WKPage.cpp:
4007         (WKPageLoadURLWithUserData):
4008         (WKPageLoadURLRequestWithUserData):
4009         (WKPageLoadFile):
4010         (WKPageLoadFileWithUserData):
4011         (WKPageLoadHTMLStringWithUserData):
4012         (WKPageLoadAlternateHTMLStringWithUserData):
4013         (WKPageLoadPlainTextStringWithUserData):
4014         (WKPageLoadWebArchiveDataWithUserData):
4015         * UIProcess/API/C/WKPage.h:
4016         * UIProcess/WebPageProxy.cpp:
4017         * UIProcess/WebPageProxy.h:
4018         (WebPageProxy):
4019         * WebKit2.xcodeproj/project.pbxproj:
4020         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
4021         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
4022         (WebKit::InjectedBundlePageLoaderClient::willLoadURLRequest):
4023         (WebKit::InjectedBundlePageLoaderClient::willLoadDataRequest):
4024         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
4025         (WebCore):
4026         (InjectedBundlePageLoaderClient):
4027         * WebProcess/WebPage/WebPage.cpp:
4028         * WebProcess/WebPage/WebPage.h:
4029         * WebProcess/WebPage/WebPage.messages.in:
4030
4031 2013-05-16  Manuel Rego Casasnovas  <rego@igalia.com>
4032
4033         [GTK] Fix memory leak in WebKitBackForwardList
4034         https://bugs.webkit.org/show_bug.cgi?id=116222
4035
4036         Reviewed by Carlos Garcia Campos.
4037
4038         Due to the use of leakRef() the ImmutableArray is not being released
4039         automatically. Adding a local variable in the methods to make sure that
4040         the ImmutableArray is freed.
4041
4042         * UIProcess/API/gtk/WebKitBackForwardList.cpp:
4043         (webkit_back_forward_list_get_back_list_with_limit): Add local variable
4044         RefPtr and pass the ImmutableArray to
4045         WebKitBackForwardList::webkitBackForwardListCreateList() using
4046         RefPtr::get().
4047         (webkit_back_forward_list_get_forward_list_with_limit): Ditto.
4048
4049 2013-05-16  Commit Queue  <commit-queue@webkit.org>
4050
4051         Unreviewed, rolling out r150034.
4052         http://trac.webkit.org/changeset/150034
4053         https://bugs.webkit.org/show_bug.cgi?id=116257
4054
4055         This work around doesn't work due to another bug NSUndoManager
4056         has (Requested by rniwa on #webkit).
4057
4058         * UIProcess/API/mac/PageClientImpl.mm:
4059         (WebKit::PageClientImpl::registerEditCommand):
4060
4061 2013-05-16  Tim Horton  <timothy_horton@apple.com>
4062
4063         PDFPlugins don't load when plugins are disabled, but they should
4064         https://bugs.webkit.org/show_bug.cgi?id=75790
4065         <rdar://problem/11650197>
4066
4067         Reviewed by Anders Carlsson.
4068
4069         Support loading "application" plug-ins even if plug-ins are explicitly disabled.
4070
4071         Make PDFPlugin and SimplePDFPlugin "application" plug-ins, so they can
4072         be loaded even if plug-ins are disabled.
4073
4074         * Platform/CoreIPC/HandleMessage.h:
4075         (CoreIPC::callMemberFunction):
4076         Add a 5-argument, 3-reply version of callMemberFunction.
4077
4078         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
4079         (WebKit::NetscapePluginModule::getPluginInfo):
4080         NPAPI plug-ins are not application plug-ins.
4081
4082         * Shared/WebCoreArgumentCoders.cpp:
4083         (CoreIPC::::encode):
4084         (CoreIPC::::decode):
4085         Encode/decode the new isApplicationPlugin field on PluginInfo.
4086
4087         * UIProcess/Plugins/PluginInfoStore.cpp:
4088         (WebKit::PluginInfoStore::findPluginForMIMEType):
4089         (WebKit::PluginInfoStore::findPluginForExtension):
4090         (WebKit::PluginInfoStore::findPlugin):
4091         * UIProcess/Plugins/PluginInfoStore.h:
4092         (PluginInfoStore):
4093         Give PluginInfoStore's findPlugin method and its private helper
4094         methods an argument allowing them to only match application plug-ins.
4095
4096         (WebKit::WebPageProxy::findPlugin):
4097         * UIProcess/WebPageProxy.h:
4098         (WebPageProxy):
4099         * UIProcess/WebPageProxy.messages.in:
4100         Add an argument allowing findPlugin to restrict its search to only application plug-ins.
4101
4102         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
4103         (WebKit::WebFrameLoaderClient::objectContentType):
4104         Previously, this caller depended on pluginData() returning null if
4105         plug-ins were disabled. Since that is no longer the case, we have to
4106         check if we can use plug-ins, and otherwise ignore non-application-plug-ins.
4107
4108         * WebProcess/WebPage/WebPage.cpp:
4109         (WebKit::WebPage::createPlugin):