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