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