REGRESSION(r173929): [GTK] TestInspector fails after r173929
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2014-09-30  Carlos Garcia Campos  <cgarcia@igalia.com>
2
3         REGRESSION(r173929): [GTK] TestInspector fails after r173929
4         https://bugs.webkit.org/show_bug.cgi?id=137247
5
6         Reviewed by Philippe Normand.
7
8         Add WebKitWebInspector:can-attach property to notify when the
9         inspector attach availability changes.
10
11         * UIProcess/API/C/gtk/WKInspectorClientGtk.h:
12         * UIProcess/API/gtk/WebKitWebInspector.cpp:
13         (webkit_web_inspector_class_init): Add WebKitWebInspector:can-attach property.
14         (didChangeAttachAvailability): Emit notify::can-attach.
15         (webkitWebInspectorCreate): Add implementation for didChangeAttachAvailability.
16         (webkit_web_inspector_get_can_attach): Return whether the inspector can be attached.
17         * UIProcess/API/gtk/WebKitWebInspector.h:
18         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add index of new symbols in 2.8.
19         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol.
20         * UIProcess/gtk/WebInspectorClientGtk.cpp:
21         (WebKit::WebInspectorClientGtk::didChangeAttachAvailability):
22         * UIProcess/gtk/WebInspectorClientGtk.h:
23         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
24         (WebKit::WebInspectorProxy::platformAttachAvailabilityChanged): Notify the client.
25
26 2014-09-30  Carlos Garcia Campos  <cgarcia@igalia.com>
27
28         [GTK] The remote web inspector shows the HTML content as plain text
29         https://bugs.webkit.org/show_bug.cgi?id=137250
30
31         Reviewed by Gustavo Noronha Silva.
32
33         Use GResource API directly to get the resource data, instead of
34         using the GFile API, and use g_content_type_guess() to get the
35         MIME Type.
36
37         * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
38         (WebKit::WebInspectorServer::platformResourceForPath):
39
40 2014-09-30  Carlos Garcia Campos  <cgarcia@igalia.com>
41
42         [GTK] Move GtkPopupMenu implementation to WebPopupMenuProxyGtk
43         https://bugs.webkit.org/show_bug.cgi?id=137193
44
45         Reviewed by Gustavo Noronha Silva.
46
47         GtkPopupMenu was in platform only to have a common implementation to
48         be shared with WebKit1. Now that it's only used by
49         WebPopupMenuProxyGtk in WebKit2, we can simplify the code by
50         merging the implementation directly into WebPopupMenuProxyGtk.
51
52         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
53         (WebKit::WebPopupMenuProxyGtk::WebPopupMenuProxyGtk):
54         (WebKit::WebPopupMenuProxyGtk::~WebPopupMenuProxyGtk):
55         (WebKit::WebPopupMenuProxyGtk::populatePopupMenu):
56         (WebKit::WebPopupMenuProxyGtk::showPopupMenu):
57         (WebKit::WebPopupMenuProxyGtk::hidePopupMenu):
58         (WebKit::WebPopupMenuProxyGtk::typeAheadFind):
59         (WebKit::WebPopupMenuProxyGtk::resetTypeAheadFindState):
60         (WebKit::WebPopupMenuProxyGtk::selectItemCallback):
61         (WebKit::WebPopupMenuProxyGtk::keyPressEventCallback):
62         * UIProcess/gtk/WebPopupMenuProxyGtk.h:
63         (WebKit::WebPopupMenuProxyGtk::setCurrentlySelectedMenuItem):
64
65 2014-09-29  Christophe Dumez  <cdumez@apple.com>
66
67         Use is<>() / downcast<>() for Document
68         https://bugs.webkit.org/show_bug.cgi?id=137221
69
70         Reviewed by Andreas Kling.
71
72         Use is<>() / downcast<>() for Document instead of isDocumentNode() /
73         toDocument().
74
75         * WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm:
76         (-[WKDOMDocument createElement:]):
77         (-[WKDOMDocument createTextNode:]):
78         (-[WKDOMDocument body]):
79
80 2014-09-29  Commit Queue  <commit-queue@webkit.org>
81
82         Unreviewed, rolling out r174045.
83         https://bugs.webkit.org/show_bug.cgi?id=137231
84
85         Introduced a crash during page loading tests on Mac (Requested
86         by rniwa on #webkit).
87
88         Reverted changeset:
89
90         "Replace OSObjectPtr with RetainPtr/adoptOS"
91         https://bugs.webkit.org/show_bug.cgi?id=137158
92         http://trac.webkit.org/changeset/174045
93
94 2014-09-29  Anders Carlsson  <andersca@apple.com>
95
96         Set the TBA versions based on the PLATFORM_NAME
97         https://bugs.webkit.org/show_bug.cgi?id=137226
98         Follow-up fix for <rdar://problem/17761459>.
99
100         Reviewed by Dan Bernstein.
101
102         * mac/rewrite-availability-macros.sh:
103         Turns out that MACOSX_DEPLOYMENT_TARGET is set even for iOS builds,
104         so set the versions based on the PLATFORM_NAME environment variable.
105
106 2014-09-29  Dan Bernstein  <mitz@apple.com>
107
108         Build fix.
109
110         * WebProcess/WebPage/ios/WebPageIOS.mm:
111         (WebKit::WebPage::performActionOnElement):
112
113 2014-09-27  Andy Estes  <aestes@apple.com>
114
115         [iOS] Add basic support for link navigation in WKPDFView
116         https://bugs.webkit.org/show_bug.cgi?id=137182
117
118         Reviewed by Tim Horton.
119
120         Teach WKPDFView to navigate to URLs when PDF link annotations are tapped.
121
122         * UIProcess/WebPageProxy.cpp:
123         (WebKit::WebPageProxy::navigateToURLWithSimulatedClick): Sent Messages::WebPage::NavigateToURLWithSimulatedClick.
124         * UIProcess/WebPageProxy.h:
125         * UIProcess/ios/WKPDFView.h:
126         * UIProcess/ios/WKPDFView.mm:
127         (-[WKPDFView _clearPages]): Removed self as the UIPDFAnnotationControllerDelegate.
128         (-[WKPDFView _revalidateViews]): Added self as the UIPDFAnnotationControllerDelegate.
129         (-[WKPDFView annotation:wasTouchedAtPoint:controller:]): Retrieved the URL from the touched annotation,
130         computed the touched point relative to the WKPDFView and to the screen, and called
131         navigateToURLWithSimulatedClick() after a 200 ms delay in order to show a soon-to-be-added tap highlight
132         (this value matches the delay in UIWebPDFView).
133         * WebProcess/WebPage/WebPage.cpp:
134         (WebKit::WebPage::navigateToURLWithSimulatedClick): Created a fake single-click MouseEvent and called
135         FrameLoader::urlSelected(). Creating a mouse event ensures that the navigation appears as a
136         NavigationTypeLinkClicked in navigation policy delegates.
137         * WebProcess/WebPage/WebPage.h:
138         * WebProcess/WebPage/WebPage.messages.in:
139
140 2014-09-29  Christophe Dumez  <cdumez@apple.com>
141
142         Use the new is<>() / downcast<>() for Text Nodes
143         https://bugs.webkit.org/show_bug.cgi?id=137188
144
145         Reviewed by Darin Adler.
146
147         Use the new is<>() / downcast<>() functions for Text Nodes instead of
148         isText() / toText().
149
150         * WebProcess/InjectedBundle/API/mac/WKDOMText.mm:
151         (-[WKDOMText data]):
152         (-[WKDOMText setData:]):
153
154 2014-09-29  Christophe Dumez  <cdumez@apple.com>
155
156         Make is<>() / downcast<>() work for HTMLDocument and its subclasses
157         https://bugs.webkit.org/show_bug.cgi?id=137169
158
159         Reviewed by Darin Adler.
160
161         Use is<>() / downcast<>() for HTMLDocument and its subclasses.
162
163         * WebProcess/WebPage/WebPage.cpp:
164         (WebKit::WebPage::pdfDocumentForPrintingFrame):
165
166 2014-09-29  Tibor Meszaros  <tmeszaros.u-szeged@partner.samsung.com>
167
168         Fix !ENABLE(INSPECTOR) build after r173929
169         https://bugs.webkit.org/show_bug.cgi?id=137210
170
171         Reviewed by Timothy Hatcher.
172
173         * UIProcess/WebProcessProxy.cpp:
174         (WebKit::WebProcessProxy::getLaunchOptions):
175
176 2014-09-29  Carlos Garcia Campos  <cgarcia@igalia.com>
177
178         REGRESSION(r172919): WebKitPluginProcess fails to scan GTK+2 plugins after r172919.
179         https://bugs.webkit.org/show_bug.cgi?id=137191
180
181         Reviewed by Philippe Normand.
182
183         In r172919 I moved the GTK+ symbols mix check earlier, before the
184         plugin is loaded and initialized. That made impossible to use the
185         GTK3 plugin process to scan gtk2 plugins, because we need to load
186         the plugin to get its metadata. But we don't need to initialize
187         the plugin to check if it requires GTK2, so we can do that check
188         in the UI process to decide which plugin process to use.
189
190         * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
191         (WebKit::NetscapePluginModule::getPluginInfoForLoadedPlugin):
192         Remove the requires GTK2 check.
193         (WebKit::NetscapePluginModule::scanPlugin): Don't write
194         requires-gtk2 to stdout.
195         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
196         (WebKit::pluginRequiresGtk2): Helper function to check if the
197         given plugin path requires GTK2.
198         (WebKit::PluginProcessProxy::scanPlugin): Check if the plugin path
199         requires GTK2 and use WebKitPluginProcess2 in such case, or return
200         early if GTK2 plugins are not enabled. Log error messages when
201         something fails scanning the plugin to make it easiert to debug
202         problems in the future.
203
204 2014-09-28  Myles C. Maxfield  <mmaxfield@apple.com>
205
206         Replace wkGetGlyphsForCharacters() with CGFontGetGlyphsForUnichars()
207         https://bugs.webkit.org/show_bug.cgi?id=137197
208
209         Reviewed by Alexey Proskuryakov.
210
211         No new tests because there is no behavior change.
212
213         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
214         (InitWebCoreSystemInterface):
215         * mac/WebKit2.order:
216
217 2014-09-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
218
219         Use std::unique_ptr for ContextMenuController
220         https://bugs.webkit.org/show_bug.cgi?id=137178
221
222         Reviewed by Darin Adler.
223
224         Switch to using std::unique_ptr instead of OwnPtr and PassOwnPtr
225         for ContextMenuController class. Inherited class is changed by this use as well.
226
227         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
228         (WebKit::WebContextMenuClient::customizeMenu):
229         * WebProcess/WebCoreSupport/WebContextMenuClient.h:
230
231 2014-09-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
232
233         Move ColorInputType class to std::unique_ptr
234         https://bugs.webkit.org/show_bug.cgi?id=137173
235
236         Reviewed by Darin Adler.
237
238         Replace uses of PassOwnPtr in code under ColorInputType class with std::unique_ptr.
239         Child classes follow this change as well.
240
241         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
242         (WebKit::WebChromeClient::createColorChooser):
243         * WebProcess/WebCoreSupport/WebChromeClient.h:
244
245 2014-09-26  Sam Weinig  <sam@webkit.org>
246
247         Replace OSObjectPtr with RetainPtr/adoptOS
248         https://bugs.webkit.org/show_bug.cgi?id=137158
249
250         Reviewed by Dan Bernstein.
251
252         * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm:
253         (DatabaseServiceInitializer):
254         * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
255         (WebKit::NetworkServiceInitializerDelegate::NetworkServiceInitializerDelegate):
256         (NetworkServiceInitializer):
257         * Platform/IPC/Connection.h:
258         (IPC::Connection::Identifier::Identifier):
259         * Platform/IPC/mac/ConnectionMac.mm:
260         (IPC::ConnectionTerminationWatchdog::createConnectionTerminationWatchdog):
261         (IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog):
262         * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
263         (WebKit::PluginServiceInitializerDelegate::PluginServiceInitializerDelegate):
264         (PluginServiceInitializer):
265         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
266         (WebKit::XPCServiceInitializerDelegate::XPCServiceInitializerDelegate):
267         (WebKit::XPCServiceInitializer):
268         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
269         (WebKit::XPCServiceInitializerDelegate::checkEntitlements):
270         (WebKit::XPCServiceInitializerDelegate::hasEntitlement):
271         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
272         (WebKit::XPCServiceEventHandler):
273         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
274         (WebKit::XPCServiceEventHandler):
275         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
276         (WebKit::connectToService):
277         (WebKit::connectToReExecService):
278         * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
279         (WebContentServiceInitializer):
280
281 2014-09-26  Christophe Dumez  <cdumez@apple.com>
282
283         Stop using legacy NODE_TYPE_CASTS() macro for HTML Elements
284         https://bugs.webkit.org/show_bug.cgi?id=137137
285
286         Reviewed by Benjamin Poulain.
287
288         Use is<>() / downcast<>() where appropriate.
289
290         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
291         (WebKit::PDFPluginTextAnnotation::value):
292         * WebProcess/Plugins/PluginView.cpp:
293         (WebKit::PluginView::initializePlugin):
294         (WebKit::PluginView::pluginSnapshotTimerFired):
295         (WebKit::PluginView::pluginDidReceiveUserInteraction):
296         * WebProcess/WebPage/WebPage.cpp:
297         (WebKit::WebPage::createPlugin):
298         * WebProcess/WebPage/ios/WebPageIOS.mm:
299         (WebKit::WebPage::performActionOnElement):
300
301 2014-09-26  Anders Carlsson  <andersca@apple.com>
302
303         Add API for loading local files
304         https://bugs.webkit.org/show_bug.cgi?id=137153
305         rdar://problem/17761459
306
307         Reviewed by Oliver Hunt.
308
309         * UIProcess/API/Cocoa/WKWebView.h:
310         * UIProcess/API/Cocoa/WKWebView.mm:
311         (-[WKWebView loadFileURL:allowingReadAccessToURL:]):
312         Load the file, wrapping the navigation ID in a WKNavigation using createLoadRequestNavigation.
313
314         * UIProcess/WebPageProxy.cpp:
315         (WebKit::WebPageProxy::loadFile):
316         * UIProcess/WebPageProxy.h:
317         Return the navigation ID (or 0 if the navigation failed).
318
319 2014-09-26  Timothy Hatcher  <timothy@apple.com>
320
321         Add WKInspector back function stubs that went missing from r173929.
322         My changes to WKDeprecatedFunctions.cpp got lost in the shuffle.
323
324         * Shared/API/c/WKDeprecatedFunctions.cpp:
325         (WKInspectorIsDebuggingJavaScript):
326         (WKInspectorToggleJavaScriptDebugging):
327         (WKInspectorIsProfilingJavaScript):
328         (WKInspectorToggleJavaScriptProfiling):
329
330 2014-09-26  Carlos Garcia Campos  <cgarcia@igalia.com>
331
332         REGRESSION(r173929): Web inspector doesn't work after r173929 when INSPECTOR_SERVER is enabled
333         https://bugs.webkit.org/show_bug.cgi?id=137150
334
335         Reviewed by Timothy Hatcher.
336
337         The inspector doesn't show any information about the inspected
338         page because it's sending messages to a remote frontend that is
339         not running.
340
341         * WebProcess/WebPage/WebInspector.cpp:
342         (WebKit::WebInspector::WebInspector): Initialize m_remoteFrontendConnected.
343         (WebKit::WebInspector::sendMessageToFrontend): Send
344         SendMessageToRemoteFrontend message to the UI process when remote
345         frontend is connected, or SendMessageToFrontend message to
346         WebInspectorUI otherwise.
347         (WebKit::WebInspector::remoteFrontendConnected): Set m_remoteFrontendConnected to true.
348         (WebKit::WebInspector::remoteFrontendDisconnected): Set m_remoteFrontendConnected to false.
349         * WebProcess/WebPage/WebInspector.h:
350
351 2014-09-26  Alberto Garcia  <berto@igalia.com>
352
353         [GTK] Don't include full path names in WebKitEnumTypes.h
354         https://bugs.webkit.org/show_bug.cgi?id=137148
355
356         Reviewed by Carlos Garcia Campos.
357
358         Replace @filename@ with @basename@ in the template, since we don't
359         want to include the full path name in the generated header.
360
361         * UIProcess/API/gtk/WebKitEnumTypes.h.template:
362
363 2014-09-25  Yusuke Suzuki  <utatane.tea@gmail.com>
364
365         Clean up unused parameter warnings
366         https://bugs.webkit.org/show_bug.cgi?id=137107
367
368         Reviewed by Benjamin Poulain.
369
370         * Scripts/webkit/messages.py:
371         (generate_message_handler):
372         Sometimes generated code doesn't use `connection` parameter. So `UNUSED_PARAM(connection)` is necessary.
373         * UIProcess/API/C/WKPage.cpp:
374         (WKPageIsPlayingAudio):
375
376 2014-09-25  Christophe Dumez  <cdumez@apple.com>
377
378         Use is<HTML*Element>() instead of isHTML*Element() - Part 2
379         https://bugs.webkit.org/show_bug.cgi?id=137103
380
381         Reviewed by Benjamin Poulain.
382
383         Use is<HTML*Element>() instead of isHTML*Element().
384
385         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
386         (WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame):
387         * WebProcess/WebPage/WebFrame.cpp:
388         (WebKit::WebFrame::containsAnyFormElements):
389         * WebProcess/WebPage/WebPage.cpp:
390         (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
391         * WebProcess/WebPage/ios/WebPageIOS.mm:
392         (WebKit::WebPage::getAssistedNodeInformation):
393
394 2014-09-25  Anders Carlsson  <andersca@apple.com>
395
396         Expand WK_MAC_TBA and WK_IOS_TBA to the current deployment target version (or NA).
397         https://bugs.webkit.org/show_bug.cgi?id=137127
398         Part of rdar://problem/17761459.
399
400         Reviewed by Dan Bernstein.
401
402         * mac/rewrite-availability-macros.sh:
403
404 2014-09-25  Tim Horton  <timothy_horton@apple.com>
405
406         CommitLayerTree decode fails in 32-bit apps on 64-bit devices (TransformationMatrix alignment differs)
407         https://bugs.webkit.org/show_bug.cgi?id=136444
408         <rdar://problem/17952526>
409
410         Reviewed by Anders Carlsson.
411
412         * Shared/WebCoreArgumentCoders.cpp:
413         (IPC::ArgumentCoder<TransformationMatrix>::encode):
414         (IPC::ArgumentCoder<TransformationMatrix>::decode):
415         Stop using SimpleArgumentCoder to encode/decode TransformationMatrix,
416         because the alignment of TransformationMatrix differs between architectures,
417         and there's no guarantee that both sides of a connection are the same architecture.
418
419 2014-09-25  Alberto Garcia  <berto@igalia.com>
420
421         Unreviewed typo fix.
422
423         * UIProcess/API/C/soup/WKContextSoup.cpp:
424
425 2014-09-25  Shivakumar JM  <shiva.jm@samsung.com>
426
427         [WebKit2] Fix build warning in WebKit2/WebProcess module.
428         https://bugs.webkit.org/show_bug.cgi?id=137105
429
430         Reviewed by Csaba Osztrogonác.
431
432         Fix build warning by removing unused parameter names
433
434         * WebProcess/WebPage/WebInspector.h:
435         (WebKit::WebInspector::didReceiveInvalidMessage):
436         * WebProcess/WebPage/WebInspectorUI.h:
437         (WebKit::WebInspectorUI::didReceiveInvalidMessage):
438
439 2014-09-24  Sam Weinig  <sam@webkit.org>
440
441         Remove incorrect use of the BKSProcessAssertionAllowSuspendOnSleep flag for process suspension in iOS WebKit2
442         <rdar://problem/18400566>
443         https://bugs.webkit.org/show_bug.cgi?id=137077
444
445         Reviewed by Anders Carlsson.
446
447         * UIProcess/ios/ProcessAssertionIOS.mm:
448         Remove use of the BKSProcessAssertionAllowSuspendOnSleep which does not do what we expect, and instead
449         causes processes to be suspended "forever" after sleep.
450
451 2014-09-24  Christophe Dumez  <cdumez@apple.com>
452
453         Use is<HTML*Element>() instead of isHTML*Element() - Part 1
454         https://bugs.webkit.org/show_bug.cgi?id=137068
455
456         Reviewed by Ryosuke Niwa.
457
458         Start using is<HTML*Element>() instead of isHTML*Element().
459         Remaining usages will be updated in a follow-up patch to
460         reduce the size of the change.
461
462         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
463         (WebKit::InjectedBundleNodeHandle::setHTMLInputElementValueForUser):
464         (WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutofilled):
465         (WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutofilled):
466         (WebKit::InjectedBundleNodeHandle::htmlInputElementLastChangeWasUserEdit):
467         (WebKit::InjectedBundleNodeHandle::htmlTextAreaElementLastChangeWasUserEdit):
468         (WebKit::InjectedBundleNodeHandle::isTextField):
469         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
470         (WebKit::WebChromeClient::focusedElementChanged):
471         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
472         (WebKit::WebEditorClient::textFieldDidBeginEditing):
473         (WebKit::WebEditorClient::textFieldDidEndEditing):
474         (WebKit::WebEditorClient::textDidChangeInTextField):
475         (WebKit::WebEditorClient::textDidChangeInTextArea):
476         (WebKit::WebEditorClient::doTextFieldCommandFromEvent):
477         (WebKit::WebEditorClient::textWillBeDeletedInTextField):
478         * WebProcess/WebPage/WebFrame.cpp:
479         (WebKit::WebFrame::containsAnyFormControls):
480         * WebProcess/WebPage/ios/WebPageIOS.mm:
481         (WebKit::WebPage::setAssistedNodeValue):
482         (WebKit::WebPage::setAssistedNodeValueAsNumber):
483         (WebKit::WebPage::setAssistedNodeSelectedIndex):
484
485 2014-09-23  Ada Chan  <adachan@apple.com>
486
487         Add stub implementation of WKPageIsPlayingAudio().
488         https://bugs.webkit.org/show_bug.cgi?id=137044
489
490         Reviewed by Anders Carlsson.
491
492         Also add an isPlayingAudioDidChange callback to WKPageUIClient.
493
494         * UIProcess/API/C/WKPage.cpp:
495         (WKPageIsPlayingAudio):
496         * UIProcess/API/C/WKPagePrivate.h:
497         * UIProcess/API/C/WKPageUIClient.h:
498
499 2014-09-21  Timothy Hatcher  <timothy@apple.com>
500
501         Make the Web Inspector use a separate web process.
502
503         https://bugs.webkit.org/show_bug.cgi?id=135120
504
505         Reviewed by Anders Carlsson.
506
507         * CMakeLists.txt:
508         * DerivedSources.make:
509         * PlatformEfl.cmake:
510         * PlatformGTK.cmake:
511         * WebKit2.xcodeproj/project.pbxproj:
512         Added new WebInspectorUI files and removed WebInspectorFrontendClient.cpp.
513
514         * Shared/APIObject.h: Added BundleInspectorUI.
515
516         * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.mm:
517         (WebKit::ChildProcessMainDelegate::getExtraInitializationData):
518         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
519         (WebKit::XPCServiceInitializerDelegate::getExtraInitializationData):
520         Add support for "inspector-process" data, a boolean that is used by
521         WebProcess::initializeProcessName.
522
523         * UIProcess/API/C/WKInspector.cpp:
524         (WKInspectorIsDebuggingJavaScript):
525         (WKInspectorToggleJavaScriptDebugging):
526         (WKInspectorIsProfilingJavaScript):
527         (WKInspectorToggleJavaScriptProfiling):
528         * UIProcess/API/C/WKInspector.h:
529         Stub out functions we don't support but need to keep for nightly compatibility.
530
531         * UIProcess/WebInspectorProxy.cpp:
532         (WebKit::WebInspectorPageGroups::createInspectorPageGroup):
533         (WebKit::WebInspectorProxy::WebInspectorProxy):
534         (WebKit::WebInspectorProxy::invalidate):
535         (WebKit::WebInspectorProxy::connect):
536         (WebKit::WebInspectorProxy::showConsole):
537         (WebKit::WebInspectorProxy::showResources):
538         (WebKit::WebInspectorProxy::showMainResourceForFrame):
539         (WebKit::WebInspectorProxy::attach):
540         (WebKit::WebInspectorProxy::detach):
541         (WebKit::WebInspectorProxy::inspectorContext):
542         (WebKit::WebInspectorProxy::dispatchMessageFromRemoteFrontend):
543         (WebKit::WebInspectorProxy::eagerlyCreateInspectorPage):
544         (WebKit::WebInspectorProxy::createInspectorPage):
545         (WebKit::WebInspectorProxy::open):
546         (WebKit::WebInspectorProxy::didClose):
547         (WebKit::WebInspectorProxy::attachAvailabilityChanged):
548         * UIProcess/WebInspectorProxy.h:
549         (WebKit::WebInspectorProxy::isConnected):
550         (WebKit::WebInspectorProxy::canAttach):
551         * UIProcess/WebInspectorProxy.messages.in:
552         * UIProcess/efl/WebInspectorProxyEfl.cpp:
553         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
554         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
555         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
556         (WebKit::WebInspectorProxy::platformAttach):
557         * UIProcess/mac/WebInspectorProxyMac.mm:
558         (-[WKWebInspectorProxyObjCAdapter close]):
559         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
560         (WebKit::WebInspectorProxy::platformDidClose):
561         (WebKit::WebInspectorProxy::platformHide):
562         (WebKit::WebInspectorProxy::platformSave):
563         (WebKit::WebInspectorProxy::platformAppend):
564         (WebKit::WebInspectorProxy::platformAttach):
565         Changed how the Inspector page is created by making it in a new WebContext for
566         the Inspector. This removes us from the main process pool and guarantees no process
567         sharing for our user interface. Also send new WebInspectorUI messages to the Inspector
568         page and not the inspected page when appropriate.
569
570         * UIProcess/WebProcessProxy.cpp:
571         (WebKit::WebProcessProxy::getLaunchOptions): Add "inspector-process" to extraInitializationData
572         if the context is the Inspector context. This is used by WebProcess::initializeProcessName.
573
574         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
575         (WebKit::WebInspectorClient::openInspectorFrontend):
576         (WebKit::WebInspectorClient::closeInspectorFrontend):
577         (WebKit::WebInspectorClient::bringFrontendToFront):
578         * WebProcess/WebCoreSupport/WebInspectorClient.h:
579         Remove the InspectorFrontendChannel class from WebInspectorClient and clean up a little.
580         InspectorFrontendChannel implementation moved to WebInspector.
581
582         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp: Removed. Superseded by WebInspectorUI.
583
584         * WebProcess/WebPage/WebInspector.cpp:
585         (WebKit::WebInspector::create):
586         (WebKit::WebInspector::WebInspector):
587         (WebKit::WebInspector::createInspectorPage):
588         (WebKit::WebInspector::closeFrontend):
589         (WebKit::WebInspector::openInNewTab):
590         (WebKit::WebInspector::showConsole):
591         (WebKit::WebInspector::showResources):
592         (WebKit::WebInspector::showMainResourceForFrame):
593         (WebKit::WebInspector::startPageProfiling):
594         (WebKit::WebInspector::stopPageProfiling):
595         (WebKit::WebInspector::canAttachWindow):
596         (WebKit::WebInspector::updateDockingAvailability):
597         (WebKit::WebInspector::sendMessageToBackend):
598         (WebKit::WebInspector::sendMessageToFrontend):
599         (WebKit::WebInspector::remoteFrontendConnected):
600         (WebKit::WebInspector::remoteFrontendDisconnected):
601         * WebProcess/WebPage/WebInspector.h:
602         (WebKit::WebInspector::didClose):
603         (WebKit::WebInspector::didReceiveInvalidMessage):
604         (WebKit::WebInspector::setAttached):
605         * WebProcess/WebPage/WebInspector.messages.in:
606         Stop taking an optional InspectorFrontendChannel and inherit it instead. Create a connection that
607         can be passed to the other web process for WebInspectorUI to use. Stop referencing Inspector's page
608         directly, since it is in another process now.
609
610         * WebProcess/WebPage/WebInspectorUI.cpp: Added.
611         (WebKit::WebInspectorUI::create):
612         (WebKit::WebInspectorUI::WebInspectorUI):
613         (WebKit::WebInspectorUI::establishConnection):
614         (WebKit::WebInspectorUI::windowObjectCleared):
615         (WebKit::WebInspectorUI::frontendLoaded):
616         (WebKit::WebInspectorUI::moveWindowBy):
617         (WebKit::WebInspectorUI::bringToFront):
618         (WebKit::WebInspectorUI::closeWindow):
619         (WebKit::WebInspectorUI::requestSetDockSide):
620         (WebKit::WebInspectorUI::setDockSide):
621         (WebKit::WebInspectorUI::changeAttachedWindowHeight):
622         (WebKit::WebInspectorUI::changeAttachedWindowWidth):
623         (WebKit::WebInspectorUI::setToolbarHeight):
624         (WebKit::WebInspectorUI::openInNewTab):
625         (WebKit::WebInspectorUI::save):
626         (WebKit::WebInspectorUI::append):
627         (WebKit::WebInspectorUI::inspectedURLChanged):
628         (WebKit::WebInspectorUI::showConsole):
629         (WebKit::WebInspectorUI::showResources):
630         (WebKit::WebInspectorUI::showMainResourceForFrame):
631         (WebKit::WebInspectorUI::startPageProfiling):
632         (WebKit::WebInspectorUI::stopPageProfiling):
633         (WebKit::WebInspectorUI::didSave):
634         (WebKit::WebInspectorUI::didAppend):
635         (WebKit::WebInspectorUI::sendMessageToFrontend):
636         (WebKit::WebInspectorUI::sendMessageToBackend):
637         (WebKit::WebInspectorUI::evaluateCommandOnLoad):
638         (WebKit::WebInspectorUI::evaluateExpressionOnLoad):
639         (WebKit::WebInspectorUI::evaluatePendingExpressions):
640         * WebProcess/WebPage/WebInspectorUI.h: Added.
641         (WebKit::WebInspectorUI::page):
642         (WebKit::WebInspectorUI::didClose):
643         (WebKit::WebInspectorUI::didReceiveInvalidMessage):
644         (WebKit::WebInspectorUI::attachedBottom):
645         (WebKit::WebInspectorUI::attachedRight):
646         (WebKit::WebInspectorUI::detached):
647         (WebKit::WebInspectorUI::evaluateCommandOnLoad):
648         * WebProcess/WebPage/WebInspectorUI.messages.in: Added.
649         * WebProcess/WebPage/efl/WebInspectorUIEfl.cpp: Added.
650         (WebKit::WebInspectorUI::canSave):
651         (WebKit::WebInspectorUI::localizedStringsURL):
652         * WebProcess/WebPage/gtk/WebInspectorUIGtk.cpp: Added.
653         (WebKit::WebInspectorUI::canSave):
654         (WebKit::WebInspectorUI::localizedStringsURL):
655         * WebProcess/WebPage/mac/WebInspectorUIMac.mm: Added.
656         (WebKit::WebInspectorUI::canSave):
657         (WebKit::WebInspectorUI::localizedStringsURL):
658         Implement the InspectorFrontendClient and handle a connection to the inspected page's WebInspector.
659
660         * WebProcess/WebPage/WebPage.cpp:
661         (WebKit::WebPage::WebPage):
662         (WebKit::WebPage::~WebPage):
663         (WebKit::WebPage::inspector):
664         (WebKit::WebPage::inspectorUI):
665         (WebKit::WebPage::didReceiveMessage):
666         Setup as a listener for WebInspectorUI messages.
667
668         * WebProcess/WebPage/WebPage.h:
669         (WebKit::WebPage::isInspectorPage): It is an Inspector page if we have a m_inspectorUI.
670
671         * WebProcess/cocoa/WebProcessCocoa.mm:
672         (WebKit::WebProcess::initializeProcessName):
673         Name the process "%@ Web Inspector" if it is an Inspector content process. Processes in that
674         context are not shared with multiple pages.
675
676 2014-09-24  Dean Jackson  <dino@apple.com>
677
678         Add a deprecated stub for WKPreferencesSetMultithreadedWebGLEnabled (and Get)
679         https://bugs.webkit.org/show_bug.cgi?id=137071
680
681         Reviewed by Brent Fulgham.
682
683         Put in stubs for WKPreferencesSetMultithreadedWebGLEnabled and
684         WKPreferencesGetMultithreadedWebGLEnabled. These were removed in
685         r173776 but are still needed for nightly builds to link
686         (or will be once Yosemite nightlies are available).
687
688         * Shared/API/c/WKDeprecatedFunctions.cpp:
689         (WKPreferencesSetMultithreadedWebGLEnabled):
690         (WKPreferencesGetMultithreadedWebGLEnabled):
691
692 2014-09-24  Daniel Bates  <dabates@apple.com>
693
694         [iOS] Fix the iOS build after <http://trac.webkit.org/changeset/173893>
695         (https://bugs.webkit.org/show_bug.cgi?id=137007)
696
697         Add closing parenthesis characters that were inadvertently removed in <http://trac.webkit.org/changeset/173893>.
698
699         * WebProcess/WebPage/ios/WebPageIOS.mm:
700         (WebKit::WebPage::setAssistedNodeSelectedIndex):
701         (WebKit::WebPage::getAssistedNodeInformation):
702
703 2014-09-23  Christophe Dumez  <cdumez@apple.com>
704
705         Unreviewed build fix after r173893.
706
707         Partial revert of r173893 to fix debug builds.
708
709         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
710         (WebKit::PDFPluginTextAnnotation::value):
711         * WebProcess/Plugins/PluginView.cpp:
712         (WebKit::PluginView::initializePlugin):
713         (WebKit::PluginView::pluginSnapshotTimerFired):
714         (WebKit::PluginView::pluginDidReceiveUserInteraction):
715         * WebProcess/WebPage/WebPage.cpp:
716         (WebKit::WebPage::createPlugin):
717
718 2014-09-23  Chris Dumez  <cdumez@apple.com>
719
720         Use downcast<HTML*Element>() instead of toHTML*Element()
721         https://bugs.webkit.org/show_bug.cgi?id=137007
722
723         Reviewed by Benjamin Poulain.
724
725         Use downcast<HTML*Element>() instead of toHTML*Element().
726
727         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
728         (WebKit::InjectedBundleNodeHandle::setHTMLInputElementValueForUser):
729         (WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutofilled):
730         (WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutofilled):
731         (WebKit::InjectedBundleNodeHandle::htmlInputElementLastChangeWasUserEdit):
732         (WebKit::InjectedBundleNodeHandle::htmlTextAreaElementLastChangeWasUserEdit):
733         (WebKit::InjectedBundleNodeHandle::isTextField):
734         (WebKit::InjectedBundleNodeHandle::htmlTableCellElementCellAbove):
735         (WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame):
736         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
737         (WebKit::PDFPluginChoiceAnnotation::commit):
738         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
739         (WebKit::PDFPluginTextAnnotation::createAnnotationElement):
740         (WebKit::PDFPluginTextAnnotation::value):
741         * WebProcess/Plugins/PluginView.cpp:
742         (WebKit::PluginView::initializePlugin):
743         (WebKit::PluginView::pluginSnapshotTimerFired):
744         (WebKit::PluginView::pluginDidReceiveUserInteraction):
745         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
746         (WebKit::WebChromeClient::focusedElementChanged):
747         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
748         (WebKit::WebEditorClient::textFieldDidBeginEditing):
749         (WebKit::WebEditorClient::textFieldDidEndEditing):
750         (WebKit::WebEditorClient::textDidChangeInTextField):
751         (WebKit::WebEditorClient::textDidChangeInTextArea):
752         (WebKit::WebEditorClient::doTextFieldCommandFromEvent):
753         (WebKit::WebEditorClient::textWillBeDeletedInTextField):
754         * WebProcess/WebPage/WebPage.cpp:
755         (WebKit::WebPage::createPlugin):
756         * WebProcess/WebPage/ios/WebPageIOS.mm:
757         (WebKit::WebPage::setAssistedNodeValue):
758         (WebKit::WebPage::setAssistedNodeValueAsNumber):
759         (WebKit::WebPage::setAssistedNodeSelectedIndex):
760         (WebKit::isAssistableNode): Deleted.
761         (WebKit::WebPage::getAssistedNodeInformation): Deleted.
762
763 2014-09-23  Jer Noble  <jer.noble@apple.com>
764
765         REGRESSION (r171197): Clip's content is drawn behind Safari window when entering Full Screen youtube html5 first time
766         https://bugs.webkit.org/show_bug.cgi?id=137029
767
768         Reviewed by Brent Fulgham.
769
770         In r171197, we ordered the full screen window on- and off-screen so that the fullscreen animation went to the
771         correct screen, which introduced a subtle glitch at the beginning and end of an animation. For entering, ensure
772         that the window is scaled to its starting size before ordering on-screen. For exiting, order the window off-
773         screen before resetting its clipping rect.
774
775         * UIProcess/mac/WKFullScreenWindowController.mm:
776         (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
777         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
778
779 2014-09-23  Joseph Pecoraro  <pecoraro@apple.com>
780
781         Web Inspector: Should be able to attach a debugger to a JSContext before anything is executed
782         https://bugs.webkit.org/show_bug.cgi?id=136893
783
784         Reviewed by Timothy Hatcher.
785
786         * WebProcess/WebPage/WebInspector.cpp:
787         (WebKit::WebInspector::remoteFrontendConnected):
788
789 2014-09-22  Daniel Bates  <dabates@apple.com>
790
791         [Cocoa] Add UI delegate callback when window.close() is called
792         https://bugs.webkit.org/show_bug.cgi?id=137008
793         <rdar://problem/17801001>
794
795         Reviewed by Anders Carlsson.
796
797         Implement support infrastructure to notify the UI client when window.close() is called.
798
799         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Added method declaration for -_webViewClose:.
800         * UIProcess/Cocoa/UIDelegate.h: Added override declaration for API::UIClient::close().
801         * UIProcess/Cocoa/UIDelegate.mm:
802         (WebKit::UIDelegate::setDelegate): Wire up delegate method to Objective-C selector, -[WKUIDelegatePrivate _webViewClose:].
803         (WebKit::UIDelegate::UIClient::close): Added; turns around and calls -[WKUIDelegatePrivate _webViewClose:] (if applicable).
804
805 2014-09-21  Chris Dumez  <cdumez@apple.com>
806
807         Generate Element casting helper functions
808         https://bugs.webkit.org/show_bug.cgi?id=136839
809
810         Reviewed by Darin Adler.
811
812         Use JSXXX::toWrapped() instead of toXXX() function.
813
814         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
815         (WebKit::InjectedBundleNodeHandle::getOrCreate):
816         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
817         (WebKit::InjectedBundleRangeHandle::getOrCreate):
818         * WebProcess/InjectedBundle/InjectedBundle.cpp:
819         (WebKit::InjectedBundle::webNotificationID):
820
821 2014-09-19  Ryosuke Niwa  <rniwa@webkit.org>
822
823         WebContent crash in WebKit::WebPage::expandedRangeFromHandle
824         https://bugs.webkit.org/show_bug.cgi?id=136969
825
826         Reviewed by David Kilzer.
827
828         The crash was caused by m_currentBlockSelection and frame.selection().selection().toNormalizedRange()
829         both being null and the subsequent lines of code assuming currentRange to be not null.
830
831         Replace the assertion by an early exit since the range could be null here.
832
833         In the future, we should figure out if there are other things we need to do in addition
834         to checking the nullity when this race condition is hit.
835
836         * WebProcess/WebPage/ios/WebPageIOS.mm:
837         (WebKit::WebPage::computeExpandAndShrinkThresholdsForHandle):
838
839 2014-09-19  Dean Jackson  <dino@apple.com>
840
841         Multithreaded WebGL is a bad idea - remove it
842         https://bugs.webkit.org/show_bug.cgi?id=136964
843         <rdar://problem/18399858>
844
845         Reviewed by Brent Fulgham.
846
847         Remove the setting to allow multithreaded WebGL.
848
849         * Shared/WebPreferencesDefinitions.h:
850         * UIProcess/API/C/WKPreferences.cpp:
851         (WKPreferencesSetMultithreadedWebGLEnabled): Deleted.
852         (WKPreferencesGetMultithreadedWebGLEnabled): Deleted.
853         * UIProcess/API/C/WKPreferencesRefPrivate.h:
854         * WebProcess/WebPage/WebPage.cpp:
855         (WebKit::WebPage::updatePreferences):
856
857 2014-09-19  Simon Fraser  <simon.fraser@apple.com>
858
859         Provide a default argument for the most commonly used HitTestRequest variant
860         https://bugs.webkit.org/show_bug.cgi?id=136653
861
862         Reviewed by Darin Adler.
863
864         Make the default HitTestRequest flags be ReadOnly | Active | DisallowShadowContent
865         and change call sites using the default flags to use a HitTestRequest temporary.
866
867         * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
868         (WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
869         * WebProcess/WebPage/ios/WebPageIOS.mm:
870         (WebKit::WebPage::dynamicViewportSizeUpdate):
871
872 2014-09-19  Daniel Bates  <dabates@apple.com>
873
874         Always assume internal SDK when building configuration Production
875         https://bugs.webkit.org/show_bug.cgi?id=136925
876         <rdar://problem/18362399>
877
878         Reviewed by Dan Bernstein.
879
880         As a side effect of this change we will always enable ENABLE_TOUCH_EVENTS, ENABLE_IOS_{GESTURE, TOUCH}_EVENTS,
881         and ENABLE_XSLT when either building configuration Production or building with the Internal SDK.
882
883         * Configurations/Base.xcconfig:
884
885 2014-09-19  Simon Fraser  <simon.fraser@apple.com>
886
887         Fix the Mac Mavericks build. Only iOS cares about fencing.
888
889         * Platform/mac/LayerHostingContext.h:
890         * Platform/mac/LayerHostingContext.mm:
891
892 2014-09-19  Carlos Garcia Campos  <cgarcia@igalia.com>
893
894         [GTK] Missing inspector files in the tarball
895         https://bugs.webkit.org/show_bug.cgi?id=136952
896
897         Reviewed by Gustavo Noronha Silva.
898
899         * PlatformGTK.cmake: Use APPEND instead of GLOB to add individual
900         and generated files to the list of inspector files.
901
902 2014-09-19  Carlos Garcia Campos  <cgarcia@igalia.com>
903
904         Webkitgtk 2.5.3: tarball contains APPLE LICENSE file - stating not distributable
905         https://bugs.webkit.org/show_bug.cgi?id=136632
906
907         Reviewed by Gustavo Noronha Silva.
908
909         * PlatformGTK.cmake: Use only the icons from the gtk directory since they are free.
910
911 2014-09-19  Carlos Garcia Campos  <cgarcia@igalia.com>
912
913         [GTK] generate-inspector-gresource-manifest.py should receive the list of files from the makefile
914         https://bugs.webkit.org/show_bug.cgi?id=136943
915
916         Reviewed by Philippe Normand.
917
918         * PlatformGTK.cmake: Fix the inspector file list and pass it to
919         the generate-inspector-gresource-manifest.py script.
920
921 2014-09-18  Carlos Garcia Campos  <cgarcia@igalia.com>
922
923         [GTK] Dot not allow to create delete-on-destroy GMainLoopSources
924         https://bugs.webkit.org/show_bug.cgi?id=136923
925
926         Reviewed by Gustavo Noronha Silva.
927
928         * Platform/gtk/WorkQueueGtk.cpp:
929         (WorkQueue::dispatch): Use GMainLoopSource::scheduleAndDeleteOnDestroy().
930         (WorkQueue::dispatchAfter): Use GMainLoopSource::scheduleAfterDelayAndDeleteOnDestroy().
931
932 2014-09-18  Ryuan Choi  <ryuan.choi@gmail.com>
933
934         [EFL][CoordinatedGraphics] Remove setBackgroundColor message
935         https://bugs.webkit.org/show_bug.cgi?id=136824
936
937         Reviewed by Gyuyoung Kim.
938
939         CoordinatedGraphics used setBackgroundColor() to draw the background of contents
940         although tiles are not ready.
941
942         This patch removes setBackgroundColor() and uses pageExtendedBackgroundColor()
943         which provides similar functionality.
944
945         * UIProcess/API/efl/EwkView.cpp:
946         Enables or disables WKPageSetBackgroundExtendsBeyondPage to use pageExtendedBackgroundColor()
947         (EwkView::EwkView):
948         (EwkView::setBackgroundColor):
949         * UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
950         (WebCore::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
951         (WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext): Passed pageExtendedBackgroundColor.
952         (WebCore::CoordinatedGraphicsScene::paintToGraphicsContext): Ditto.
953         (WebCore::CoordinatedGraphicsScene::setBackgroundColor): Deleted.
954         * UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.h:
955         (WebCore::CoordinatedGraphicsScene::setDrawsBackground): Deleted.
956         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
957         (WebKit::CoordinatedLayerTreeHostProxy::setBackgroundColor): Deleted.
958         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
959         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in:
960         * UIProcess/CoordinatedGraphics/WebView.cpp:
961         (WebKit::WebView::paintToCurrentGLContext):
962         * UIProcess/WebPageProxy.cpp:
963         (WebKit::WebPageProxy::pageExtendedBackgroundColorDidChange):
964         Refactored to use const reference for the Color parameter.
965         * UIProcess/WebPageProxy.h:
966         * UIProcess/efl/WebViewEfl.cpp:
967         (WebKit::WebViewEfl::paintToCairoSurface):
968         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
969         (WebKit::WebChromeClient::pageExtendedBackgroundColorDidChange):
970         Added PLATFORM(EFL) to pass PageExtendedBackgroundColorDidChange message.
971         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
972         (WebKit::CoordinatedLayerTreeHost::setBackgroundColor): Deleted.
973         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
974         * WebProcess/WebPage/LayerTreeHost.h:
975         (WebKit::LayerTreeHost::setBackgroundColor): Deleted.
976         * WebProcess/WebPage/WebPage.cpp:
977         (WebKit::WebPage::mainFrameDidLayout):
978
979 2014-09-18  Jeremy Jones  <jeremyj@apple.com>
980
981         Improve fullscreen video rotation animation.
982         https://bugs.webkit.org/show_bug.cgi?id=136870
983
984         Reviewed by Simon Fraser.
985
986         Remove WKCAContext from LayerHostingContext and use a fencePort to synchronize animation between processes.
987
988         * Platform/mac/LayerHostingContext.h: add setFencePort. Remove WKCAContext.
989         * Platform/mac/LayerHostingContext.mm:
990         (WebKit::LayerHostingContext::createForPort): Remove WKCAContext.
991         (WebKit::LayerHostingContext::createForExternalHostingProcess): ditto
992         (WebKit::LayerHostingContext::setRootLayer): ditto
993         (WebKit::LayerHostingContext::rootLayer): ditto
994         (WebKit::LayerHostingContext::contextID): ditto
995         (WebKit::LayerHostingContext::invalidate): ditto
996         (WebKit::LayerHostingContext::setColorSpace): ditto
997         (WebKit::LayerHostingContext::colorSpace): ditto
998         (WebKit::LayerHostingContext::setFencePort): added
999         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1000         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame): 
1001         * WebProcess/ios/WebVideoFullscreenManager.h:
1002         * WebProcess/ios/WebVideoFullscreenManager.messages.in: add fence port parameter
1003         * WebProcess/ios/WebVideoFullscreenManager.mm: ditto
1004         (WebKit::WebVideoFullscreenManager::didSetupFullscreen): ditto
1005         (WebKit::WebVideoFullscreenManager::setVideoLayerFrameFenced): ditto
1006
1007 2014-09-18  Simon Fraser  <simon.fraser@apple.com>
1008
1009         Avoid divide by zero when we get an empty rect while snapshotting a node
1010         https://bugs.webkit.org/show_bug.cgi?id=136932
1011         rdar://problem/18383473
1012
1013         Reviewed by Dean Jackson.
1014         
1015         renderer()->paintingRootRect() can return an empty rect for some inline configurations,
1016         for example an <a> containing a floated <span>
1017         
1018         When this occurs, avoid a divide by zero and return a null snapshot image.
1019
1020         * WebProcess/WebPage/WebPage.cpp:
1021         (WebKit::WebPage::snapshotNode):
1022
1023 2014-09-18  Carlos Garcia Campos  <cgarcia@igalia.com>
1024
1025         Incorrect pending API request URL when loading an HTML string
1026         https://bugs.webkit.org/show_bug.cgi?id=136913
1027
1028         Reviewed by Alexey Proskuryakov.
1029
1030         Use about:blank as pending API request URL when the given base URL
1031         is empty, otherwise use the given base URL.
1032
1033         * UIProcess/WebPageProxy.cpp:
1034         (WebKit::WebPageProxy::loadHTMLString):
1035
1036 2014-09-18  Tim Horton  <timothy_horton@apple.com>
1037
1038         Occasional unreproducible crashes in MessageReceiverMap::dispatchMessage
1039         https://bugs.webkit.org/show_bug.cgi?id=136909
1040         <rdar://problem/17758325>
1041
1042         Reviewed by Anders Carlsson.
1043
1044         * UIProcess/API/Cocoa/WKWebView.mm:
1045         (-[WKWebView dealloc]):
1046         We're seeing some messages dispatched on the WebContext that end up
1047         attempting to call dispatchMessage on a freed MessageReceiver.
1048         The WKRemoteObjectRegistry message receiver is added to the WebContext
1049         message receiver map, but never removed, despite the WebContext easily
1050         outliving the WKWebView that owns the remote object registry.
1051
1052 2014-09-17  Rohit Kumar  <kumar.rohit@samsung.com>
1053
1054         [EFL][WK2] Use the correct enum for control key in Ewk_Event_Modifiers in ewk_navigation_policy_decision.cpp
1055         https://bugs.webkit.org/show_bug.cgi?id=136740
1056
1057         Reviewed by Gyuyoung Kim.
1058
1059         * UIProcess/API/efl/ewk_navigation_policy_decision.cpp:
1060         (toEwkEventModifiers):
1061
1062 2014-09-17  Daniel Bates  <dabates@apple.com>
1063
1064         Unreviewed, rolling out r173695.
1065
1066         Broke building third-party Legacy WebKit apps; will
1067         investigate offline
1068
1069         Reverted changeset:
1070
1071         "[iOS] Make WebCore build with public iOS SDK"
1072         https://bugs.webkit.org/show_bug.cgi?id=136487
1073         http://trac.webkit.org/changeset/173695
1074
1075 2014-09-17  Simon Fraser  <simon.fraser@apple.com>
1076
1077         Fix an issue that caused video playback to not always use high resolution streams
1078         https://bugs.webkit.org/show_bug.cgi?id=136879
1079         rdar://problem/18316542
1080
1081         Reviewed by Eric Carlson.
1082         
1083         The underlying video framework expects to be able to use -[CALayer convertRect:toLayer:nil] on
1084         the video layer to obtain information about the display resolution of the video,
1085         including the device scale factor. This doesn't work for layers in the web process,
1086         which are remotely hosted into the UI process.
1087         
1088         For now, use a workaround which involves putting a scale transform equivalent to
1089         the device scale factor on the web process layer, and the inverse scale on the 
1090         hosting layer in the UI process.
1091         
1092         We have to do this in two places, for in-page video, and for fullscreen video.
1093
1094         * Shared/mac/RemoteLayerTreeTransaction.h: Add hostingDeviceScaleFactor to the LayerCreation
1095         properties.
1096         * Shared/mac/RemoteLayerTreeTransaction.mm:
1097         (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties):
1098         (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::encode):
1099         (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::decode):
1100         * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
1101         (-[WKRemoteView initWithFrame:contextID:hostingDeviceScaleFactor:]): Set the inverse scale
1102         transform on the layer.
1103         (WebKit::RemoteLayerTreeHost::createLayer):
1104         (-[WKRemoteView initWithFrame:contextID:]): Deleted.
1105         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
1106         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
1107         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1108         (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
1109         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
1110         (WebKit::PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
1111         * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
1112         (WebKit::RemoteLayerTreeContext::deviceScaleFactor):
1113         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
1114         (WebKit::RemoteLayerTreeContext::layerWasCreated):
1115         * WebProcess/ios/WebVideoFullscreenManager.mm:
1116         (WebKit::WebVideoFullscreenManager::enterFullscreenForNode):
1117         (WebKit::WebVideoFullscreenManager::didSetupFullscreen):
1118
1119 2014-09-17  Gavin Barraclough  <baraclough@apple.com>
1120
1121         Aways have a PageThrottler (sometimes have a UserActivity::Impl)
1122         https://bugs.webkit.org/show_bug.cgi?id=136892
1123
1124         Reviewed by Geoffrey Garen.
1125
1126         Some instances of Page have a PageThrottler to track activity on the Page, and some do not.
1127         (Specifically, those created from WebPage in WK2 do, those related to WK1, SVG & inspector do not).
1128
1129         We do this for three reasons:
1130             * We do not need to take AppNap assertions on WK1.
1131             * Some Pages do not track their visibility correctly, and would always claim to be visible.
1132             * Page VisibilityState is not set until after construction, so if we instantiate
1133
1134         Creating the entire PageThrottler lazily has the drawback that we have to check for its existence at
1135         numerous points throughout the code, and we'll miss activity that occurs between the Page being created
1136         & the PageThrottler added to it (really a theoretical problem right now, since they're currently always
1137         created pretty much back to back).
1138
1139         Instead, Page should always have a PageThrottler, & instead make the UserActivity::Impl on the
1140         PageThrottler be added later.
1141
1142         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
1143         (WebKit::NPRuntimeObjectMap::evaluate):
1144             - createPageThrottler -> enablePageThrottler
1145         * WebProcess/WebPage/WebPage.cpp:
1146         (WebKit::WebPage::WebPage):
1147         (WebKit::WebPage::mouseEvent):
1148         (WebKit::WebPage::wheelEvent):
1149         (WebKit::WebPage::keyEvent):
1150             - Page::pageThrottler now returns a reference rather than a pointer
1151
1152 2014-09-17  Daniel Bates  <dabates@apple.com>
1153
1154         [iOS] Make WebCore build with public iOS SDK
1155         https://bugs.webkit.org/show_bug.cgi?id=136487
1156
1157         Reviewed by David Kilzer.
1158
1159         Update WebKit2 source files to include the wrapper SPI headers instead of the corresponding
1160         actual SPI header(s).
1161
1162         * Platform/mac/SharedMemoryMac.cpp:
1163         * Shared/ios/NativeWebTouchEventIOS.mm:
1164         * Shared/mac/RemoteLayerBackingStore.mm:
1165         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
1166         * UIProcess/API/Cocoa/WKWebView.mm:
1167         * UIProcess/ios/WKPDFPageNumberIndicator.mm:
1168         * UIProcess/ios/WKScrollView.mm:
1169         * UIProcess/ios/WebMemoryPressureHandlerIOS.mm:
1170         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
1171         * WebProcess/WebPage/WebPage.cpp:
1172
1173 2014-09-17  Gavin Barraclough  <barraclough@apple.com>
1174
1175         DOM timer throttling for hidden plugins
1176         https://bugs.webkit.org/show_bug.cgi?id=136197
1177
1178         Reviewed by Geoff Garen & Andreas Kling.
1179
1180         For non-visible web pages we slow timers (since they can't be driving animations, etc).
1181         We should do the same for plugins.
1182
1183         * PluginProcess/WebProcessConnection.cpp:
1184         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
1185             - remove now redundant includes.
1186         * WebProcess/Plugins/PluginView.h:
1187             - audioHardwareActivity is now virtual, override.
1188
1189 2014-09-17  Carlos Garcia Campos  <cgarcia@igalia.com>
1190
1191         [GTK] WebKitWebView::load-failed-with-tls-errors should receive the failing URI instead of a host
1192         https://bugs.webkit.org/show_bug.cgi?id=136889
1193
1194         Reviewed by Gustavo Noronha Silva.
1195
1196         We were passing a host for two different reasons, first because
1197         it's more convenient to add an exception with
1198         webkit_web_context_allow_tls_certificate_for_host(), but also
1199         because we were assuming the active URI is the failing URI in case
1200         of failure. This assumption is correct because our current code
1201         does that, but I'm not sure we are doing it on purpose. That
1202         behaviour is not documented anywhere and it's not what WebKit2 does
1203         internaly.
1204
1205         * UIProcess/API/gtk/WebKitWebView.cpp:
1206         (webkit_web_view_class_init):
1207         (webkitWebViewLoadFailedWithTLSErrors):
1208         * UIProcess/API/gtk/WebKitWebView.h:
1209
1210 2014-09-16  Carlos Garcia Campos  <cgarcia@igalia.com>
1211
1212         [GTK] Fix layering violations in PasteboardGtk
1213         https://bugs.webkit.org/show_bug.cgi?id=136802
1214
1215         Reviewed by Darin Adler.
1216
1217         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
1218         (WebKit::WebEditorClient::updateGlobalSelection): Use new API to
1219         update the global selection.
1220
1221 2014-09-16  Carlos Garcia Campos  <cgarcia@igalia.com>
1222
1223         DragData should not depend on Clipboard, DocumentFragment, and Document
1224         https://bugs.webkit.org/show_bug.cgi?id=21358
1225
1226         Reviewed by Darin Adler.
1227
1228         * UIProcess/WebPageProxy.cpp:
1229         (WebKit::WebPageProxy::performDragControllerAction): Update to API
1230         change in DragData::asURL().
1231
1232 2014-09-16  Daniel Bates  <dabates@apple.com>
1233
1234         [iOS] Add iOS SDK name and version suffix to WebKitSystemInterface debug/release product name
1235         https://bugs.webkit.org/show_bug.cgi?id=136862
1236
1237         Reviewed by David Kilzer.
1238
1239         * Configurations/DebugRelease.xcconfig:
1240
1241 2014-09-16  Enrica Casucci  <enrica@apple.com>
1242
1243         Remove PLATFORM(IOS) from WebCore/editing (Part 3).
1244         https://bugs.webkit.org/show_bug.cgi?id=136474
1245
1246         Reviewed by Benjamin Poulain.
1247
1248         This is the updated version of the patch that was landed in r173340.
1249         This patch removes the use of PLATFORM(IOS) from TextAffinity.h
1250         and removes the assumption that EAffinity values match NSSelectionAffinity
1251         values. It also removes the includes in TextAffinity.h, creating the need to
1252         include explicitly the files when necessary.
1253
1254         * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
1255         * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
1256
1257 2014-09-16  Dan Bernstein  <mitz@apple.com>
1258
1259         Standardized the return type of a delegate method.
1260
1261         Rubber-stamped by Anders Carlsson.
1262
1263         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Changed a return type from bool to BOOL.
1264
1265 2014-09-16  Tomas Popela  <tpopela@redhat.com>
1266
1267         [GTK] Typo in  webkit_security_manager_register_uri_scheme_as_empty_document documentation
1268         https://bugs.webkit.org/show_bug.cgi?id=136852
1269
1270         Reviewed by Carlos Garcia Campos.
1271
1272         * UIProcess/API/gtk/WebKitSecurityManager.cpp:
1273
1274 2014-09-13  Gavin Barraclough  <baraclough@apple.com>
1275
1276         Should call [BKSProcessAssertion invalidate]
1277         https://bugs.webkit.org/show_bug.cgi?id=136804
1278         <rdar://problem/17897780>
1279
1280         Reviewed by Darin Adler.
1281
1282         We should invalidate the process assertion before releasing it. Fortunately this is really easy,
1283         since there is a simple 1:1 relationship with ProcessAssertion, with their lifetimes matching exactly.
1284
1285         * UIProcess/ProcessAssertion.cpp:
1286         (WebKit::ProcessAssertion::~ProcessAssertion):
1287             - no-op implementation.
1288         * UIProcess/ProcessAssertion.h:
1289             - added destructor.
1290         * UIProcess/ios/ProcessAssertionIOS.mm:
1291         (WebKit::ProcessAssertion::~ProcessAssertion):
1292             - destructor invalidates the BKSProcessAssertion.
1293
1294 2014-09-15  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1295
1296         REGRESSION(r170243): [EFL][WK2] Dirty image is shown when new page is loading on fixed layout 
1297         https://bugs.webkit.org/show_bug.cgi?id=136568
1298
1299         Reviewed by Csaba Osztrogonác.
1300
1301         r170243 landed wrong didCommitNewPage() since it always returns false. It cause that
1302         PageViewportControllerClientEfl::didChangeVisibleContents() continues to draw dirty image on 0,0 coordinate.
1303         This patch fixes the problem.
1304
1305         * UIProcess/API/efl/EwkView.h:
1306         (EwkView::waitingForNewPage):
1307         (EwkView::didCommitNewPage):
1308         * UIProcess/efl/PageViewportControllerClientEfl.cpp:
1309         (WebKit::PageViewportControllerClientEfl::didChangeVisibleContents):
1310
1311 2014-09-14  Chris Dumez  <cdumez@apple.com>
1312
1313         Rename Node::childNodeCount() to countChildNodes() and avoid inefficient uses
1314         https://bugs.webkit.org/show_bug.cgi?id=136789
1315
1316         Reviewed by Darin Adler.
1317
1318         Avoid calling slow Node::countChildNodes().
1319
1320         * WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp:
1321         (WebKit::WebPage::findZoomableAreaForPoint):
1322         Replace call to "node->parentNode()->childNodeCount() != 1" by
1323         "!node->parentNode()->hasOneChild()" which is equivalent but more
1324         efficient.
1325
1326 2014-09-10  Jon Honeycutt  <jhoneycutt@apple.com>
1327
1328         Re-add the request autocomplete feature
1329
1330         <https://bugs.webkit.org/show_bug.cgi?id=136730>
1331
1332         This feature was rolled out in r148731 because it was only used by
1333         Chromium. As we consider supporting this feature, roll it back in, but
1334         leave it disabled.
1335
1336         This rolls out r148731 (which removed the feature) with small changes
1337         needed to make the code build in ToT, to match modern style, to make
1338         the tests run, and to remove unused code.
1339
1340         Reviewed by Andy Estes.
1341
1342         * Configurations/FeatureDefines.xcconfig:
1343         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1344         (WebKit::WebFrameLoaderClient::didRequestAutocomplete):
1345         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1346
1347 2014-09-12  Tim Horton  <timothy_horton@apple.com>
1348
1349         Swiping back from a Twitter image to Twitter flashes to the wrong position
1350         https://bugs.webkit.org/show_bug.cgi?id=136798
1351         <rdar://problem/18324338>
1352
1353         Reviewed by Darin Adler and Sam Weinig.
1354
1355         * UIProcess/mac/ViewGestureController.h:
1356         * UIProcess/mac/ViewGestureControllerMac.mm:
1357         (WebKit::ViewGestureController::ViewGestureController):
1358         (WebKit::ViewGestureController::didFinishLoadForMainFrame):
1359         (WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
1360         Add a 250ms repeating timer that we start in didFinishLoadForMainFrame
1361         if we are for some reason still loading, and in didSameDocumentNavigationForMainFrame
1362         unconditionally, to match behavior of the old swipe implementation.
1363
1364         Also, do the active gesture check in both of those places so that we don't
1365         start the timer if we're in the middle of a live swipe or have already torn
1366         down the snapshot (removeSwipeSnapshotAfterRepaint does this as well, so
1367         this isn't really a behavior change).
1368
1369         (WebKit::ViewGestureController::activeLoadMonitoringTimerFired):
1370         Every time the timer fires, check if we're still loading; if not,
1371         tear down the swipe snapshot (after repainting).
1372
1373         (WebKit::ViewGestureController::removeSwipeSnapshotAfterRepaint):
1374         Stop the active load monitoring timer.
1375
1376 2014-09-12  Commit Queue  <commit-queue@webkit.org>
1377
1378         Unreviewed, rolling out r173575.
1379         https://bugs.webkit.org/show_bug.cgi?id=136790
1380
1381         Failing tests (Requested by enrica on #webkit).
1382
1383         Reverted changeset:
1384
1385         "Remove PLATFORM(IOS) from WebCore/editing (Part 3)."
1386         https://bugs.webkit.org/show_bug.cgi?id=136474
1387         http://trac.webkit.org/changeset/173575
1388
1389 2014-09-12  Enrica Casucci  <enrica@apple.com>
1390
1391         Remove PLATFORM(IOS) from WebCore/editing (Part 3).
1392         https://bugs.webkit.org/show_bug.cgi?id=136474
1393
1394         Reviewed by Benjamin Poulain.
1395
1396         This is the updated version of the patch that was landed in r173340.
1397         I changed the use of IntPoint to FloatPoint since it was causing tests
1398         to fail.
1399         This patch removes the use of PLATFORM(IOS) from TextAffinity.h
1400         and removes the assumption that EAffinity values match NSSelectionAffinity
1401         values. It also removes the includes in TextAffinity.h, creating the need to
1402         include explicitly the files when necessary. It also removes the unnecessary
1403         use of platform specific types, replacing them with WebCore types.
1404
1405         * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
1406         * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
1407         (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
1408
1409 2014-09-12  Dan Bernstein  <mitz@apple.com>
1410
1411         [Cocoa] Message generation scripts should be installed in WebKit.framework
1412         https://bugs.webkit.org/show_bug.cgi?id=136771
1413
1414         Reviewed by Anders Carlsson.
1415
1416         * DerivedSources.make: Updated for rename of Scripts/webkit2 to Scripts/webkit.
1417         * Scripts/generate-message-receiver.py:
1418         (main): Updated for rename from webkit2 to webkit.
1419         * Scripts/generate-messages-header.py:
1420         (main): Ditto.
1421         * Scripts/webkit: Renamed from Source/WebKit2/Scripts/webkit2.
1422         * Scripts/webkit/messages.py: Updated for rename.
1423         * Scripts/webkit/parser.py: Ditto.
1424         * WebKit2.xcodeproj/project.pbxproj: Moved the Copy Message Generation Scripts build phase
1425         from the WebKit2 target to the WebKit target and changed its destination to
1426         WebKit.framework/PrivateHeaders/Scripts/webkit. Removed the Remove Compiled Python Files
1427         build phase, since compiled files no longer get copied.
1428
1429 2014-09-12  Tim Horton  <timothy_horton@apple.com>
1430
1431         Flash of page scrolled to wrong origin before restoring scroll position after swiping back to CNN front page from an article
1432         https://bugs.webkit.org/show_bug.cgi?id=136788
1433         <rdar://problem/18314597>
1434
1435         Reviewed by Sam Weinig.
1436
1437         * UIProcess/mac/ViewGestureControllerMac.mm:
1438         (WebKit::ViewGestureController::didHitRenderTreeSizeThreshold):
1439         (WebKit::ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame):
1440         Always wait until didFinishLoadForMainFrame or didSameDocumentNavigationForMainFrame
1441         before removing the snapshot, because otherwise we don't know if the scroll
1442         position has been restored yet.
1443
1444         We should revisit this at some point, because it should be possible to
1445         determine if the scroll position has been restored appropriately, but for
1446         now it is safest to restore the antique behavior.
1447
1448 2014-09-12  Dan Bernstein  <mitz@apple.com>
1449
1450         Build fix.
1451
1452         Reverted r173564.
1453
1454         * DerivedSources.make:
1455         * Scripts/generate-message-receiver.py:
1456         (main):
1457         * Scripts/generate-messages-header.py:
1458         (main):
1459         * Scripts/webkit: Removed.
1460         * Scripts/webkit/LegacyMessageReceiver-expected.cpp: Removed.
1461         * Scripts/webkit/LegacyMessages-expected.h: Removed.
1462         * Scripts/webkit/MessageReceiver-expected.cpp: Removed.
1463         * Scripts/webkit/MessageReceiverSuperclass-expected.cpp: Removed.
1464         * Scripts/webkit/Messages-expected.h: Removed.
1465         * Scripts/webkit/MessagesSuperclass-expected.h: Removed.
1466         * Scripts/webkit/__init__.py: Removed.
1467         * Scripts/webkit/messages.py: Removed.
1468         * Scripts/webkit/messages_unittest.py: Removed.
1469         * Scripts/webkit/model.py: Removed.
1470         * Scripts/webkit/parser.py: Removed.
1471         * Scripts/webkit/test-legacy-messages.in: Removed.
1472         * Scripts/webkit/test-messages.in: Removed.
1473         * Scripts/webkit/test-superclass-messages.in: Removed.
1474         * Scripts/webkit2: Copied from Scripts/webkit2.
1475         * WebKit2.xcodeproj/project.pbxproj:
1476
1477 2014-09-11  Andy Estes  <aestes@apple.com>
1478
1479         [WebKit2] WKImageCreateCGImage crashes when passed a null WKImage
1480         https://bugs.webkit.org/show_bug.cgi?id=136768
1481
1482         Reviewed by Tim Horton.
1483
1484         WKImageCreateFromCGImage can return null, so it only seems fair that WKImageCreateCGImage should tolerate null.
1485
1486         * Shared/API/c/cg/WKImageCG.cpp:
1487         (WKImageCreateCGImage):
1488
1489 2014-09-12  Dan Bernstein  <mitz@apple.com>
1490
1491         [Cocoa] Message generation scripts should be installed in WebKit.framework
1492         https://bugs.webkit.org/show_bug.cgi?id=136771
1493
1494         Reviewed by Anders Carlsson.
1495
1496         * DerivedSources.make: Updated for rename of Scripts/webkit2 to Scripts/webkit.
1497         * Scripts/generate-message-receiver.py:
1498         (main): Updated for rename from webkit2 to webkit.
1499         * Scripts/generate-messages-header.py:
1500         (main): Ditto.
1501         * Scripts/webkit: Renamed from Source/WebKit2/Scripts/webkit2.
1502         * Scripts/webkit/messages.py: Updated for rename.
1503         * Scripts/webkit/parser.py: Ditto.
1504         * WebKit2.xcodeproj/project.pbxproj: Moved the Copy Message Generation Scripts build phase
1505         from the WebKit2 target to the WebKit target and changed its destination to
1506         WebKit.framework/PrivateHeaders/Scripts/webkit. Removed the Remove Compiled Python Files
1507         build phase, since compiled files no longer get copied.
1508
1509 2014-09-12  Michael Catanzaro  <mcatanzaro@igalia.com>
1510
1511         [GTK] Use a nicer HTTP authentication dialog
1512         https://bugs.webkit.org/show_bug.cgi?id=136615
1513
1514         Reviewed by Carlos Garcia Campos.
1515
1516         * UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:
1517         (webkitAuthenticationDialogInitialize): Use a nicer layout.
1518         (packTwoColumnLayoutInBox): Deleted.
1519         (createLabel): Deleted.
1520         (createEntry): Deleted.
1521
1522 2014-09-12  Carlos Garcia Campos  <cgarcia@igalia.com>
1523
1524         REGRESSION(r173423): CertificateInfo is never sent to the UI process when using shared secondary process model
1525         https://bugs.webkit.org/show_bug.cgi?id=136669
1526
1527         Reviewed by Antti Koivisto.
1528
1529         * WebProcess/Network/WebResourceLoadScheduler.cpp:
1530         (WebKit::WebResourceLoadScheduler::scheduleLoad): Use
1531         ResourceLoader::shouldIncludeCertificateInfo() to initialize
1532         needsCertificateInfo parameter.
1533
1534 2014-09-11  Ryuan Choi  <ryuan.choi@gmail.com>
1535
1536         [EFL][CoordinatedGraphics] Move CoordinatedGraphicsScene and CoordinatedBackingStore to WebKit2
1537         https://bugs.webkit.org/show_bug.cgi?id=136770
1538
1539         Reviewed by Gyuyoung Kim.
1540
1541         CoordinatedGraphicsScene and CoordinatedBackingStore is only for UIProcess.
1542         This patch moved them from WebCore to WebKit2/UIProcess/CoordinatedGraphics/.
1543
1544         * PlatformEfl.cmake:
1545         * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.cpp:
1546         * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp: Renamed from Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp.
1547         * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h: Renamed from Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStore.h.
1548         * UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: Renamed from Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp.
1549         * UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.h: Renamed from Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h.
1550         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
1551         * UIProcess/CoordinatedGraphics/WebView.cpp:
1552         * UIProcess/efl/WebViewEfl.cpp:
1553
1554 2014-09-11  Bear Travis  <betravis@adobe.com>
1555
1556         [CSS Font Loading] Enable CSS Font Loading on Mac
1557         https://bugs.webkit.org/show_bug.cgi?id=135473
1558
1559         Reviewed by Antti Koivisto.
1560
1561         Enable CSS Font Loading in FeatureDefines.
1562
1563         * Configurations/FeatureDefines.xcconfig:
1564
1565 2014-09-11  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1566
1567         [WK2] Authentication dialog is displayed for cross-origin XHR
1568         https://bugs.webkit.org/show_bug.cgi?id=131349
1569
1570         Reviewed by Alexey Proskuryakov.
1571
1572         Precomputing client credential policy in the Web Process before sending the resource load task to the Network Process.
1573
1574         * NetworkProcess/NetworkResourceLoader.cpp:
1575         (WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge): Added an ASSERT to ensure that credential policy is never set to DoNotAskClientForCrossOriginCredentials.
1576         * WebProcess/Network/WebResourceLoadScheduler.cpp:
1577         (WebKit::WebResourceLoadScheduler::scheduleLoad): Precomputing client credential policy to handle the case of cross-origin requests.
1578         * WebProcess/Network/WebResourceLoader.cpp:
1579         (WebKit::WebResourceLoader::willSendRequest): Added a TODO to check whether redirections need a specific handling.
1580
1581 2014-09-11  Carlos Garcia Campos  <cgarcia@igalia.com>
1582
1583         [GTK] Merge WebKitAuthenticationWidget into WebKitAuthenticationDialog
1584         https://bugs.webkit.org/show_bug.cgi?id=136700
1585
1586         Reviewed by Sergio Villar Senin.
1587
1588         Copy WebKitAuthenticationWidget implementation inside
1589         WebKitAuthenticationDialog using a normal GtkBox instead.
1590
1591         * UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:
1592         (okButtonClicked):
1593         (cancelButtonClicked):
1594         (packTwoColumnLayoutInBox):
1595         (createLabel):
1596         (createEntry):
1597         (webkitAuthenticationDialogInitialize): Remove the
1598         CredentialStorageMode parameter since it's now a member.
1599         (webkitAuthenticationDialogNew): Initialize the
1600         CredentialStorageMode member too.
1601         * UIProcess/API/gtk/WebKitAuthenticationDialog.h:
1602
1603 2014-09-10  Antti Koivisto  <antti@apple.com>
1604
1605         NetworkResourceLoader cleanups
1606         https://bugs.webkit.org/show_bug.cgi?id=136701
1607
1608         Reviewed by Darin Adler.
1609
1610         After smashing NetworkResourceLoader together with the clients it can be made nicer.
1611
1612         * NetworkProcess/NetworkResourceLoadScheduler.cpp:
1613         (WebKit::NetworkResourceLoadScheduler::scheduleLoader):
1614         (WebKit::NetworkResourceLoadScheduler::removeLoader):
1615         * NetworkProcess/NetworkResourceLoader.cpp:
1616         (WebKit::NetworkResourceLoader::SynchronousLoadData::SynchronousLoadData):
1617
1618             The original request is now part of the loader.
1619
1620         (WebKit::sendReplyToSynchronousRequest):
1621         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
1622
1623             Instead of copying everything out from NetworkResourceLoadParameters just include the whole thing as a const field.
1624             SanboxExtension construction moves to NetworkResourceLoadParameters::decode()
1625             Stuff that is related to starting the load moves to start().
1626
1627         (WebKit::NetworkResourceLoader::~NetworkResourceLoader):
1628         (WebKit::NetworkResourceLoader::start):
1629         (WebKit::NetworkResourceLoader::setDefersLoading):
1630
1631             Eliminate m_deferredRequest since we now always remember the original request.
1632
1633         (WebKit::NetworkResourceLoader::cleanup):
1634         (WebKit::NetworkResourceLoader::didConvertHandleToDownload):
1635         (WebKit::NetworkResourceLoader::abort):
1636         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
1637         (WebKit::NetworkResourceLoader::didFail):
1638         (WebKit::NetworkResourceLoader::willSendRequestAsync):
1639         (WebKit::NetworkResourceLoader::continueWillSendRequest):
1640
1641             Eliminate unnecessary m_suggestedRequestForWillSendRequest.
1642
1643         (WebKit::NetworkResourceLoader::wasBlocked):
1644         (WebKit::NetworkResourceLoader::cannotShowURL):
1645         (WebKit::NetworkResourceLoader::shouldUseCredentialStorage):
1646         (WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge):
1647         (WebKit::NetworkResourceLoader::receivedCancellation):
1648         (WebKit::NetworkResourceLoader::startBufferingTimerIfNeeded):
1649         (WebKit::NetworkResourceLoader::consumeSandboxExtensions):
1650         (WebKit::NetworkResourceLoader::invalidateSandboxExtensions):
1651         (WebKit::NetworkResourceLoader::sendAbortingOnFailure):
1652         * NetworkProcess/NetworkResourceLoader.h:
1653         (WebKit::NetworkResourceLoader::originalRequest):
1654         (WebKit::NetworkResourceLoader::currentRequest):
1655         (WebKit::NetworkResourceLoader::sessionID):
1656         (WebKit::NetworkResourceLoader::defersLoading):
1657         (WebKit::NetworkResourceLoader::isLoadingMainResource):
1658         (WebKit::NetworkResourceLoader::request): Deleted.
1659         (WebKit::NetworkResourceLoader::sendAbortingOnFailure): Deleted.
1660
1661             Made private and moved to cpp.
1662
1663         * NetworkProcess/mac/NetworkDiskCacheMonitor.mm:
1664         (WebKit::NetworkDiskCacheMonitor::NetworkDiskCacheMonitor):
1665
1666             Use original request instead of the current one. This might fix a bug where we didn't use file backing over redirects.
1667
1668         * Shared/Network/NetworkResourceLoadParameters.cpp:
1669         (WebKit::NetworkResourceLoadParameters::decode):
1670
1671             Decode to SanboxExtensions to the actual type rather than a handle.
1672
1673         * Shared/Network/NetworkResourceLoadParameters.h:
1674
1675 2014-09-10  Michael Catanzaro  <mcatanzaro@igalia.com>
1676
1677         [GTK] allow overwriting destination of download
1678         https://bugs.webkit.org/show_bug.cgi?id=136372
1679
1680         Reviewed by Carlos Garcia Campos.
1681
1682         * UIProcess/API/gtk/WebKitDownload.cpp:
1683         (webkitDownloadGetProperty): Added
1684         (webkit_download_class_init): Install webkitDownloadGetProperty
1685         (webkitDownloadDecideDestinationWithSuggestedFilename): Add
1686         allowOverwrite parameter and set it appropriately
1687         (webkit_download_get_allow_overwrite): Added
1688         (webkit_download_set_allow_overwrite): Added
1689         * UIProcess/API/gtk/WebKitDownload.h: New API
1690         * UIProcess/API/gtk/WebKitDownloadClient.cpp:
1691         (decideDestinationWithSuggestedFilename): Pass allowOverwrite to
1692         webkitDownloadDecideDestinationWithSuggestedFilename
1693         * UIProcess/API/gtk/WebKitDownloadPrivate.h: Add allowOverwrite
1694         parameter to webkitDownloadDecideDestinationWithSuggestedFilename
1695         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: New API
1696
1697 2014-09-10  Rohit Kumar  <kumar.rohit@samsung.com>
1698
1699         [GTK] Clean up the WebKit build from unused parameter warning in Webkit2/UIProcess module
1700         https://bugs.webkit.org/show_bug.cgi?id=136670
1701
1702         Reviewed by Martin Robinson.
1703
1704         * UIProcess/API/gtk/PageClientImpl.cpp:
1705         (WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame):
1706
1707 2014-09-09  Enrica Casucci  <enrica@apple.com>
1708
1709         REGRESSION (WebKit2): -webkit-touch-callout: none has no effect.
1710         https://bugs.webkit.org/show_bug.cgi?id=136685
1711         rdar://problem/17629840
1712
1713         Reviewed by Benjamin Poulain.
1714
1715         We need to check if the touch callout is enabled for the element before starting
1716         the long press gesture.
1717         The information about the touch callout is returned together with the rest of data
1718         returned by the InteractionInformationAtPosition.
1719
1720         * Shared/InteractionInformationAtPosition.cpp:
1721         (WebKit::InteractionInformationAtPosition::encode):
1722         (WebKit::InteractionInformationAtPosition::decode):
1723         * Shared/InteractionInformationAtPosition.h:
1724         (WebKit::InteractionInformationAtPosition::InteractionInformationAtPosition):
1725         * UIProcess/ios/WKContentViewInteraction.mm:
1726         (-[WKContentView _actionForLongPress]):
1727         * WebProcess/WebPage/ios/WebPageIOS.mm:
1728         (WebKit::WebPage::getPositionInformation):
1729
1730 2014-09-09  Benjamin Poulain  <bpoulain@apple.com>
1731
1732         Disable the "unreachable-code" warning
1733         https://bugs.webkit.org/show_bug.cgi?id=136677
1734
1735         Reviewed by Darin Adler.
1736
1737         * Configurations/Base.xcconfig:
1738
1739 2014-09-09  Dan Bernstein  <mitz@apple.com>
1740
1741         [Cocoa] -[WKBackForwardList backList] contains an unnecessary nil check
1742         https://bugs.webkit.org/show_bug.cgi?id=136680
1743
1744         Reviewed by Anders Carlsson.
1745
1746         * UIProcess/API/Cocoa/WKBackForwardList.mm:
1747         (-[WKBackForwardList backList]): Removed nil check.
1748         (-[WKBackForwardList forwardList]): Ditto.
1749
1750 2014-09-09  Tim Horton  <timothy_horton@apple.com>
1751
1752         Make DrawingArea a real MessageReceiver
1753         https://bugs.webkit.org/show_bug.cgi?id=136438
1754
1755         Reviewed by Darin Adler.
1756
1757         * WebProcess/WebPage/DrawingArea.cpp:
1758         (WebKit::DrawingArea::DrawingArea):
1759         (WebKit::DrawingArea::~DrawingArea):
1760         * WebProcess/WebPage/DrawingArea.h:
1761         * WebProcess/WebPage/DrawingArea.messages.in:
1762         * WebProcess/WebPage/WebPage.cpp:
1763         (WebKit::WebPage::WebPage):
1764         (WebKit::WebPage::~WebPage):
1765         (WebKit::WebPage::didReceiveMessage):
1766         Make DrawingArea a real MessageReceiver instead of a LegacyReceiver that
1767         jumps through WebPage to receive its messages.
1768
1769 2014-09-08  Antti Koivisto  <antti@apple.com>
1770
1771         Pass certificate info as part of ResourceResponse
1772         https://bugs.webkit.org/show_bug.cgi?id=136611
1773
1774         Reviewed by Darin Adler.
1775
1776         * NetworkProcess/NetworkResourceLoader.cpp:
1777         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
1778
1779             Initialize the certificate info only if requested.
1780
1781         * WebProcess/Network/WebResourceLoader.cpp:
1782         (WebKit::WebResourceLoader::didReceiveResponse):
1783         (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): Deleted.
1784
1785             Rename didReceiveResponseWithCertificateInfo -> didReceiveResponse as it is now part of the response.
1786
1787         * WebProcess/Network/WebResourceLoader.h:
1788         * WebProcess/Network/WebResourceLoader.messages.in:
1789         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1790
1791             Request certificate info for the main resource only.
1792
1793         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
1794         * WebProcess/WebPage/WebFrame.cpp:
1795         (WebKit::WebFrame::certificateInfo):
1796
1797 2014-09-08  Shivakumar JM  <shiva.jm@samsung.com>
1798
1799         [WebKit2] Fix build error in WebKit2/WebProcess module
1800         https://bugs.webkit.org/show_bug.cgi?id=136667
1801
1802         Reviewed by Darin Adler.
1803
1804         Fix the build error by handling default case.
1805
1806         * WebProcess/Network/WebResourceLoadScheduler.cpp:
1807         (WebKit::maximumBufferingTime):
1808
1809 2014-09-08  Simon Fraser  <simon.fraser@apple.com>
1810
1811         Fix the iOS build.
1812
1813         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
1814         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
1815
1816 2014-09-08  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
1817
1818         Remove FILTERS flag
1819         https://bugs.webkit.org/show_bug.cgi?id=136571
1820
1821         Reviewed by Darin Adler.
1822
1823         * Configurations/FeatureDefines.xcconfig:
1824
1825 2014-09-08  Antti Koivisto  <antti@apple.com>
1826
1827         Buffer images on web process side
1828         https://bugs.webkit.org/show_bug.cgi?id=136631
1829
1830         Reviewed by Darin Adler.
1831
1832         We can substantially reduce IPC and decoding time for large images by allowing some buffering.
1833
1834         This patch makes us buffer image data up to 0.5s before sending it over to the web process.
1835
1836         * NetworkProcess/NetworkResourceLoader.cpp:
1837         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
1838         (WebKit::NetworkResourceLoader::cleanup):
1839         (WebKit::NetworkResourceLoader::didReceiveBuffer):
1840
1841             Start the timer.
1842
1843         (WebKit::NetworkResourceLoader::didFinishLoading):
1844         (WebKit::NetworkResourceLoader::startBufferingTimerIfNeeded):
1845         (WebKit::NetworkResourceLoader::bufferingTimerFired):
1846         (WebKit::NetworkResourceLoader::sendBuffer):
1847
1848             Send the data when the timer fires or the load finishes, whichever happens first.
1849
1850         * NetworkProcess/NetworkResourceLoader.h:
1851         * Platform/IPC/ArgumentCoders.h:
1852
1853             Support encoding std::chrono::duration
1854
1855         * Shared/Network/NetworkResourceLoadParameters.cpp:
1856         (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
1857         (WebKit::NetworkResourceLoadParameters::encode):
1858         (WebKit::NetworkResourceLoadParameters::decode):
1859         * Shared/Network/NetworkResourceLoadParameters.h:
1860
1861             Pass maximimum buffering duration.
1862
1863         * WebProcess/Network/WebResourceLoadScheduler.cpp:
1864         (WebKit::maximumBufferingTime):
1865
1866             Deterimine duration from the resource type.
1867             Enabled full buffering for font resources. They are not decoded incrementally.
1868
1869         (WebKit::WebResourceLoadScheduler::scheduleLoad):
1870
1871 2014-09-08  Dan Bernstein  <mitz@apple.com>
1872
1873         HAVE(VOUCHERS) is not available outside of WebKit2
1874         https://bugs.webkit.org/show_bug.cgi?id=136637
1875
1876         Reviewed by Tim Horton.
1877
1878         * config.h: Moved the definition of HAVE_VOUCHERS from here to wtf’s Platform.h.
1879
1880 2014-09-08  Tim Horton  <timothy_horton@apple.com>
1881
1882         Try to fix the build after r173383, part 4.
1883
1884         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
1885         Machine finally caught up so I could actually test the fixes!
1886
1887 2014-09-08  Tim Horton  <timothy_horton@apple.com>
1888
1889         Try to fix the build after r173383, part 3.
1890
1891         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
1892
1893 2014-09-08  Dan Bernstein  <mitz@apple.com>
1894
1895         Build fix.
1896
1897         * Platform/IPC/Connection.h:
1898
1899 2014-09-06  Sam Weinig  <sam@webkit.org>
1900
1901         XPCPtr should be converted into an all purpose smart pointer for os_objects
1902         https://bugs.webkit.org/show_bug.cgi?id=136602
1903
1904         Reviewed by Darin Adler.
1905
1906         * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm:
1907         (DatabaseServiceInitializer):
1908         * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
1909         (WebKit::NetworkServiceInitializerDelegate::NetworkServiceInitializerDelegate):
1910         (NetworkServiceInitializer):
1911         * Platform/IPC/Connection.h:
1912         (IPC::Connection::Identifier::Identifier):
1913         * Platform/IPC/mac/ConnectionMac.mm:
1914         (IPC::ConnectionTerminationWatchdog::createConnectionTerminationWatchdog):
1915         (IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog):
1916         * Platform/IPC/mac/XPCPtr.h: Removed.
1917         * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
1918         (WebKit::PluginServiceInitializerDelegate::PluginServiceInitializerDelegate):
1919         (PluginServiceInitializer):
1920         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
1921         (WebKit::XPCServiceInitializerDelegate::XPCServiceInitializerDelegate):
1922         (WebKit::XPCServiceInitializer):
1923         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
1924         (WebKit::XPCServiceInitializerDelegate::checkEntitlements):
1925         (WebKit::XPCServiceInitializerDelegate::hasEntitlement):
1926         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
1927         (WebKit::XPCServiceEventHandler):
1928         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
1929         (WebKit::XPCServiceEventHandler):
1930         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1931         (WebKit::connectToService):
1932         (WebKit::connectToReExecService):
1933         * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
1934         (WebContentServiceInitializer):
1935         Update after the rename of XPCPtr to OSObjectPtr.
1936
1937 2014-09-06  Darin Adler  <darin@apple.com>
1938
1939         Make updates suggested by new version of Xcode
1940         https://bugs.webkit.org/show_bug.cgi?id=136603
1941
1942         Reviewed by Mark Rowe.
1943
1944         * Configurations/Base.xcconfig: Added CLANG_WARN_UNREACHABLE_CODE, COMBINE_HIDPI_IMAGES,
1945         and ENABLE_STRICT_OBJC_MSGSEND as suggested by the Xcode upgrade check.
1946
1947         * PluginProcess/mac/PluginProcessMac.mm:
1948         (WebKit::initializeCocoaOverrides): Changed NSConcreteTask_launch to use the same technique
1949         as the other functions in this file, doing the type casting right at the call to
1950         method_setImplementation so the global has a suitable type for making a function call,
1951         rather than relying on the abilty to call through a type without a specific argument list.
1952
1953         * UIProcess/Plugins/PluginInfoStore.cpp:
1954         (WebKit::pathExtension): Use size_t for the result of String::reverseFind rather than
1955         converting it to an int. Also don't rely on the fact that WTF's notFound becomes -1 when
1956         cast from size_t to int.
1957
1958         * WebKit2.xcodeproj/project.pbxproj: Let Xcode delete some orphaned items, and updated
1959         LastUpgradeCheck.
1960
1961 2014-09-06  Brian J. Burg  <burg@cs.washington.edu>
1962
1963         Web Inspector: convert DockSide to an enum class
1964         https://bugs.webkit.org/show_bug.cgi?id=136601
1965
1966         Reviewed by Timothy Hatcher.
1967
1968         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
1969         (WebKit::WebInspectorFrontendClient::attachWindow):
1970         * WebProcess/WebPage/WebInspector.cpp:
1971         (WebKit::WebInspector::attachedBottom):
1972         (WebKit::WebInspector::attachedRight):
1973         (WebKit::WebInspector::detached):
1974
1975 2014-09-06  Antti Koivisto  <antti@apple.com>
1976
1977         Serialize ResourceResponses using WebKit types
1978         https://bugs.webkit.org/show_bug.cgi?id=136545
1979
1980         Reviewed by Alexey Proskuryakov.
1981
1982         Remove the WK2 serialization code for responses. It moves to the types itself in WebCore where it is
1983         close to the data being serialized and less likely to get out of sync.
1984
1985         * Shared/WebCoreArgumentCoders.cpp:
1986         (IPC::ArgumentCoder<ResourceResponse>::encode): Deleted.
1987         (IPC::ArgumentCoder<ResourceResponse>::decode): Deleted.
1988         * Shared/WebCoreArgumentCoders.h:
1989         * Shared/mac/WebCoreArgumentCodersMac.mm:
1990         (IPC::ArgumentCoder<ResourceResponse>::encodePlatformData): Deleted.
1991         (IPC::ArgumentCoder<ResourceResponse>::decodePlatformData): Deleted.
1992
1993 2014-09-06  Ryuan Choi  <ryuan.choi@gmail.com>
1994
1995         [EFL] Drop evas object cursor support
1996         https://bugs.webkit.org/show_bug.cgi?id=136324
1997
1998         Reviewed by Gyuyoung Kim.
1999
2000         Removed evas object cursor because there are some bugs.
2001         ewebkit will only support ecore_x_cursor because ewebkit is available with X, now.
2002
2003         * UIProcess/API/efl/EwkView.cpp:
2004         (EwkViewEventHandler<EVAS_CALLBACK_MOUSE_IN>::handleEvent):
2005         (EwkView::EwkView):
2006         (EwkView::updateCursor): Simplifies not to use evas object cursor.
2007         (EwkView::setCursor): Ditto.
2008         * UIProcess/API/efl/EwkView.h:
2009
2010 2014-09-05  Commit Queue  <commit-queue@webkit.org>
2011
2012         Unreviewed, rolling out r173340 and r173342.
2013         https://bugs.webkit.org/show_bug.cgi?id=136596
2014
2015         Broke many tests (Requested by ap on #webkit).
2016
2017         Reverted changesets:
2018
2019         "Remove PLATFORM(IOS) from WebCore/editing (Part 3)."
2020         https://bugs.webkit.org/show_bug.cgi?id=136474
2021         http://trac.webkit.org/changeset/173340
2022
2023         "Build fix after r173340."
2024         http://trac.webkit.org/changeset/173342
2025
2026 2014-09-05  Joseph Pecoraro  <pecoraro@apple.com>
2027
2028         Use WTFString::split(char) in more places
2029         https://bugs.webkit.org/show_bug.cgi?id=136543
2030
2031         Reviewed by Sam Weinig.
2032
2033         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
2034         (WebKit::PluginVersion::parse):
2035         * UIProcess/gtk/WebContextGtk.cpp:
2036         (WebKit::initInspectorServer):
2037         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2038         (WebKit::isTransparentSilverlightBackgroundValue):
2039
2040 2014-09-05  Enrica Casucci  <enrica@apple.com>
2041
2042         Remove PLATFORM(IOS) from WebCore/editing (Part 3).
2043         https://bugs.webkit.org/show_bug.cgi?id=136474
2044
2045         Reviewed by Benjamin Poulain.
2046
2047         This patch removes the use of PLATFORM(IOS) from TextAffinity.h
2048         and removes the assumption that EAffinity values match NSSelectionAffinity
2049         values. It also removes the includes in TextAffinity.h, creating the need to
2050         include explicitly the files when necessary. It also removes the unnecessary
2051         use of platform specific types, replacing them with WebCore types.
2052
2053         * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
2054         * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
2055         (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
2056
2057 2014-09-05  David Kilzer  <ddkilzer@apple.com>
2058
2059         JavaScriptCore should build with newer clang
2060         <http://webkit.org/b/136002>
2061         <rdar://problem/18020616>
2062
2063         Reviewed by Geoffrey Garen.
2064
2065         * Shared/API/c/WKString.cpp:
2066         (WKStringCreateWithJSString): Add NULL check to prevent
2067         WebKitTestRunner crashes that relied on the previous |this|
2068         behavior where NULL values were allowed.
2069
2070 2014-09-05  Beth Dakin  <bdakin@apple.com>
2071
2072         ScrollablArea::handleWheelEvent() should return early if the ScrollableArea is not 
2073         actually scrollable
2074         https://bugs.webkit.org/show_bug.cgi?id=136558
2075
2076         Reviewed by Simon Fraser.
2077
2078         New ScrollableArea virtual function.
2079         * WebProcess/Plugins/PDF/PDFPlugin.h:
2080
2081 2014-09-04  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2082
2083         Unreviewed, speculative build fix on GTK port since r173305.
2084
2085         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
2086         (webkitURISchemeRequestReadCallback):
2087
2088 2014-09-03  Andy Estes  <aestes@apple.com>
2089
2090         [Cocoa] Some WebKitLegacy headers migrated from WebCore incorrectly contain WEBCORE_EXPORT
2091         https://bugs.webkit.org/show_bug.cgi?id=136521
2092
2093         Reviewed by Anders Carlsson.
2094
2095         * config.h: Included <WebCore/PlatformExportMacros.h> instead of defining WEBCORE_EXPORT.
2096
2097 2014-09-04  Maciej Stachowiak  <mjs@apple.com>
2098
2099         Remove WebCoreSystemInterface glue for otherwise unused WKSI calls
2100         https://bugs.webkit.org/show_bug.cgi?id=136527
2101
2102         Reviewed by Alexey Proskuryakov.
2103
2104         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2105         (InitWebCoreSystemInterface):
2106
2107 2014-09-04  Antti Koivisto  <antti@apple.com>
2108
2109         Remove ResourceResponse::m_suggestedFilename
2110         https://bugs.webkit.org/show_bug.cgi?id=136534
2111
2112         Reviewed by Alexey Proskuryakov.
2113
2114         * Shared/WebCoreArgumentCoders.cpp:
2115         (IPC::ArgumentCoder<ResourceResponse>::encode):
2116         (IPC::ArgumentCoder<ResourceResponse>::decode):
2117
2118             No more m_suggestedFilename.
2119
2120         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2121         (WebKit::PDFPlugin::addArchiveResource):
2122
2123             Fake the suggested filename by using the Content-Disposition header.
2124
2125 2014-09-04  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
2126
2127         Remove CSS_FILTERS flag
2128         https://bugs.webkit.org/show_bug.cgi?id=136529
2129
2130         Reviewed by Dirk Schulze.
2131
2132         * Configurations/FeatureDefines.xcconfig:
2133         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
2134         (IPC::ArgumentCoder<WebCore::FilterOperations>::decode):
2135         (IPC::ArgumentCoder<GraphicsLayerAnimation>::encode):
2136         (IPC::ArgumentCoder<GraphicsLayerAnimation>::decode):
2137         (IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::encode):
2138         (IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::decode):
2139         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h:
2140         * Shared/WebCoreArgumentCoders.cpp:
2141         * Shared/WebCoreArgumentCoders.h:
2142         * WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
2143         (WebKit::GraphicsLayerCARemote::filtersCanBeComposited):
2144         * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
2145         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
2146         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
2147         (WebKit::PlatformCAAnimationRemote::setFromValue):
2148         (WebKit::PlatformCAAnimationRemote::setToValue):
2149         (WebKit::PlatformCAAnimationRemote::setValues):
2150         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
2151         (WebKit::PlatformCALayerRemote::updateClonedLayerProperties):
2152         (WebKit::PlatformCALayerRemote::filtersCanBeComposited):
2153         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2154
2155 2014-09-04  Commit Queue  <commit-queue@webkit.org>
2156
2157         Unreviewed, rolling out r173245.
2158         https://bugs.webkit.org/show_bug.cgi?id=136533
2159
2160         Broke JSC tests. (Requested by ddkilzer on #webkit).
2161
2162         Reverted changeset:
2163
2164         "JavaScriptCore should build with newer clang"
2165         https://bugs.webkit.org/show_bug.cgi?id=136002
2166         http://trac.webkit.org/changeset/173245
2167
2168 2014-09-04  Carlos Garcia Campos  <cgarcia@igalia.com>
2169
2170         Initialize m_usesNetworkProcess earlier in WebProcess::initializeWebProcess()
2171         https://bugs.webkit.org/show_bug.cgi?id=136478
2172
2173         Reviewed by Alexey Proskuryakov.
2174
2175         The soup network backend uses WebProcess::usesNetworkProcess()
2176         from WebProcess::platformSetCacheModel() and
2177         WebProcess::platformInitializeWebProcess(), both called before the
2178         m_usesNetworkProcess member has been initialized.
2179
2180         * WebProcess/WebProcess.cpp:
2181         (WebKit::WebProcess::initializeWebProcess): Move the
2182         m_usesNetworkProcess initialization at the beginning right before
2183         calling platformInitializeWebProcess().
2184         * WebProcess/cocoa/WebProcessCocoa.mm:
2185         (WebKit::WebProcess::platformSetCacheModel): Remove the early
2186         return when using the network process, since this was dead code
2187         before this change, and not really needed now that
2188         usesNetworkProcess() will return true.
2189         (WebKit::WebProcess::platformInitializeWebProcess): Remove comment
2190         that is not accurate since r171156.
2191
2192 2014-09-03  Michael Catanzaro  <mcatanzaro@igalia.com>
2193
2194         [SOUP] Race condition when downloading a file due to the intermediate temporary file
2195         https://bugs.webkit.org/show_bug.cgi?id=136423
2196
2197         Reviewed by Carlos Garcia Campos.
2198
2199         * Shared/Downloads/soup/DownloadSoup.cpp:
2200         (WebKit::DownloadClient::DownloadClient): Replace m_destinationURI with
2201         m_destinationFile and add m_createdDestination.
2202         (WebKit::DownloadClient::deleteFilesIfNeeded): Added.
2203         (WebKit::DownloadClient::downloadFailed): Call deleteFilesIfNeeded.
2204         (WebKit::DownloadClient::didReceiveResponse): Attempt to create the
2205         destination file before the intermediate file. Fail here if the file
2206         exists and overwrite is not allowed, so we don't erroneously fire the
2207         didCreateDestination event or waste time downloading the file when we
2208         know the download will fail.
2209         (WebKit::DownloadClient::didFinishLoading): Unconditionally overwrite
2210         the empty destination file.
2211         (WebKit::DownloadClient::cancel): Call deleteFilesIfNeeded.
2212         (WebKit::DownloadClient::deleteIntermediateFileInNeeded): Deleted.
2213
2214 2014-09-03  David Kilzer  <ddkilzer@apple.com>
2215
2216         JavaScriptCore should build with newer clang
2217         <http://webkit.org/b/136002>
2218         <rdar://problem/18020616>
2219
2220         Reviewed by Geoffrey Garen.
2221
2222         * Shared/API/c/WKString.cpp:
2223         (WKStringCreateWithJSString): Add NULL check to prevent
2224         WebKitTestRunner crashes that relied on the previous |this|
2225         behavior where NULL values were allowed.
2226
2227 2014-09-03  Enrica Casucci  <enrica@apple.com>
2228
2229         Remove PLATFORM(IOS) from WebCore/editing (Part 1).
2230         https://bugs.webkit.org/show_bug.cgi?id=136474
2231
2232         Reviewed by Tim Horton.
2233
2234         * UIProcess/WebEditCommandProxy.cpp:
2235         (WebKit::WebEditCommandProxy::nameForEditAction):
2236
2237 2014-09-03  Yongjun Zhang  <yongjun_zhang@apple.com>
2238
2239         https://bugs.webkit.org/show_bug.cgi?id=136395
2240         Need a way to get userAgent from WKWebView.
2241
2242         Add _userAgent property to return user agent string from WKWebView.
2243
2244         Reviewed by Anders Carlsson.
2245
2246         * UIProcess/API/Cocoa/WKWebView.mm:
2247         (-[WKWebView _userAgent]):
2248         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2249
2250 2014-09-02  Maciej Stachowiak  <mjs@apple.com>
2251
2252         Clean up naming for and slightly refactor legacy video fullscreen support
2253         https://bugs.webkit.org/show_bug.cgi?id=136446
2254
2255         Reviewed by Jer Noble.
2256
2257         Key changes:
2258         supportsFullscreenForNode(Node*) --> supportsVideoFullscreen()
2259         enterFullscreenForNode(Node*) --> enterVideoFullscreenForVideoElement(HTMLVideoElement*)
2260         exitFullscreenForNode(Node*) --> exitVideoFullscreen()
2261         
2262         The old versions had unnecessary parameters, did not clearly distinguish their purpose
2263         from enterFullscreenForElement and friends, and wrongly claimed generality to all Nodes.
2264         Also changed many other places to use HTMLVideoElement* instead of Node* or 
2265         HTMLMediaElement* when they were in fact only used for video elements and would only
2266         work for such.
2267
2268         Legacy video fullscreen in WebKit2 is only supported on iOS (for other ports that support
2269         it, it's WK1 only).
2270         
2271         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2272         (WebKit::WebChromeClient::supportsVideoFullscreen): Adjust for renames as
2273         mentioned.
2274         (WebKit::WebChromeClient::enterVideoFullscreenForVideoElement): ditto
2275         (WebKit::WebChromeClient::exitVideoFullscreen): ditto
2276         * WebProcess/WebCoreSupport/WebChromeClient.h:
2277         * WebProcess/ios/WebVideoFullscreenManager.h:
2278         * WebProcess/ios/WebVideoFullscreenManager.mm:
2279         (WebKit::clientRectForElement): No need to be generic to node.
2280         (WebKit::WebVideoFullscreenManager::supportsVideoFullscreen): Adjust for the
2281         main refactoring. Also change m_node to m_videoElement with appropriate type change.
2282         (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement): ditto
2283         (WebKit::WebVideoFullscreenManager::exitVideoFullscreen): ditto
2284         (WebKit::WebVideoFullscreenManager::didEnterFullscreen): ditto 
2285         (WebKit::WebVideoFullscreenManager::didExitFullscreen): ditto
2286         (WebKit::WebVideoFullscreenManager::didCleanupFullscreen): ditto
2287
2288 2014-09-03  Dan Bernstein  <mitz@apple.com>
2289
2290         Get rid of HIGH_DPI_CANVAS leftovers
2291         https://bugs.webkit.org/show_bug.cgi?id=136491
2292
2293         Reviewed by Benjamin Poulain.
2294
2295         * Configurations/FeatureDefines.xcconfig: Removed definition of ENABLE_HIGH_DPI_CANVAS
2296         and removed it from FEATURE_DEFINES.
2297
2298 2014-09-02  Yongjun Zhang  <yongjun_zhang@apple.com>
2299
2300         Pass the resource identifier in willSendRequest callback.
2301         https://bugs.webkit.org/show_bug.cgi?id=136325
2302
2303         Reviewed by Dan Bernstein.
2304
2305         Add two new delegate methods webProcessPlugInBrowserContextController:frame:willSendRequestForResource:request:redirectResponse:
2306         and webProcessPlugInBrowserContextController:frame:didInitiateLoadForResource:request:pageIsProvisionallyLoading:. We will remove
2307         the old willSendRequest and didInitiateLoadForResource when clients adopt the new methods.
2308
2309         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
2310         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2311         (willSendRequestForFrame):
2312         (didInitiateLoadForResource):
2313
2314 2014-09-02  Philippe Normand  <pnormand@igalia.com>
2315
2316         Unreviewed, GTK build fix after r173163.
2317
2318         * UIProcess/API/gtk/PageClientImpl.cpp:
2319         (WebKit::PageClientImpl::createDrawingAreaProxy):
2320         * UIProcess/DrawingAreaProxyImpl.cpp:
2321         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
2322         (WebKit::DrawingAreaProxyImpl::update):
2323         (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):
2324         (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
2325         (WebKit::DrawingAreaProxyImpl::sendUpdateBackingStoreState):
2326         (WebKit::DrawingAreaProxyImpl::waitForAndDispatchDidUpdateBackingStoreState):
2327         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
2328         (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
2329         (WebKit::DrawingAreaProxyImpl::updateAcceleratedCompositingMode):
2330         * UIProcess/DrawingAreaProxyImpl.h:
2331
2332 2014-09-01  Timothy Horton  <timothy_horton@apple.com>
2333
2334         Fix the iOS build.
2335
2336         * UIProcess/ios/WKContentView.mm:
2337         (-[WKContentView _createDrawingAreaProxy]):
2338         Whoops.
2339
2340 2014-09-01  Ryuan Choi  <ryuan.choi@gmail.com>
2341
2342         Build break on the EFL port since r173163
2343         https://bugs.webkit.org/show_bug.cgi?id=136443
2344
2345         Unreviewed build fix.
2346
2347         * UIProcess/BackingStore.cpp:
2348         (WebKit::BackingStore::BackingStore):
2349         * UIProcess/BackingStore.h:
2350         * UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp:
2351         (WebKit::CoordinatedDrawingAreaProxy::CoordinatedDrawingAreaProxy):
2352         (WebKit::CoordinatedDrawingAreaProxy::updateViewport):
2353         (WebKit::CoordinatedDrawingAreaProxy::contentsRect):
2354         (WebKit::CoordinatedDrawingAreaProxy::update):
2355         (WebKit::CoordinatedDrawingAreaProxy::didUpdateBackingStoreState):
2356         (WebKit::CoordinatedDrawingAreaProxy::incorporateUpdate):
2357         (WebKit::CoordinatedDrawingAreaProxy::sendUpdateBackingStoreState):
2358         (WebKit::CoordinatedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState):
2359         (WebKit::CoordinatedDrawingAreaProxy::enterAcceleratedCompositingMode):
2360         (WebKit::CoordinatedDrawingAreaProxy::exitAcceleratedCompositingMode):
2361         (WebKit::CoordinatedDrawingAreaProxy::updateAcceleratedCompositingMode):
2362         * UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.h:
2363         (WebKit::CoordinatedDrawingAreaProxy::page):
2364         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
2365         (WebKit::CoordinatedLayerTreeHostProxy::CoordinatedLayerTreeHostProxy):
2366         (WebKit::CoordinatedLayerTreeHostProxy::~CoordinatedLayerTreeHostProxy):
2367         (WebKit::CoordinatedLayerTreeHostProxy::commitCoordinatedGraphicsState):
2368         (WebKit::CoordinatedLayerTreeHostProxy::setVisibleContentsRect):
2369         (WebKit::CoordinatedLayerTreeHostProxy::renderNextFrame):
2370         (WebKit::CoordinatedLayerTreeHostProxy::purgeBackingStores):
2371         (WebKit::CoordinatedLayerTreeHostProxy::commitScrollOffset):
2372         * UIProcess/CoordinatedGraphics/WebView.cpp:
2373         (WebKit::WebView::createDrawingAreaProxy):
2374         * UIProcess/cairo/BackingStoreCairo.cpp:
2375         (WebKit::BackingStore::incorporateUpdate):
2376
2377 2014-09-01  Tim Horton  <timothy_horton@apple.com>
2378
2379         Remove two unused WebKit2 PDF-related preferences
2380         https://bugs.webkit.org/show_bug.cgi?id=136441
2381
2382         Reviewed by Dan Bernstein.
2383
2384         * Shared/WebPreferencesDefinitions.h:
2385         Move the macro arguments comment down near where the macros are being used.
2386         No need to check both PLATFORM(IOS) and PLATFORM(IOS_SIMULATOR); the second can't be true without the first.
2387         These two PDF preferences are long-unused; if we bring back their functionality,
2388         we'll bring back the preferences.
2389
2390 2014-09-01  Tim Horton  <timothy_horton@apple.com>
2391
2392         DrawingAreaProxy and friends can hold on to WebPageProxy by reference
2393         https://bugs.webkit.org/show_bug.cgi?id=136440
2394
2395         Reviewed by Dan Bernstein.
2396
2397         * UIProcess/API/mac/WKView.mm:
2398         (-[WKView _createDrawingAreaProxy]):
2399         * UIProcess/DrawingAreaProxy.cpp:
2400         (WebKit::DrawingAreaProxy::DrawingAreaProxy):
2401         (WebKit::DrawingAreaProxy::~DrawingAreaProxy):
2402         (WebKit::DrawingAreaProxy::setExposedRect):
2403         (WebKit::DrawingAreaProxy::exposedRectChangedTimerFired):
2404         * UIProcess/DrawingAreaProxy.h:
2405         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
2406         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2407         (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
2408         (WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy):
2409         (WebKit::RemoteLayerTreeDrawingAreaProxy::sizeDidChange):
2410         (WebKit::RemoteLayerTreeDrawingAreaProxy::deviceScaleFactorDidChange):
2411         (WebKit::RemoteLayerTreeDrawingAreaProxy::scaledExposedRect):
2412         (WebKit::RemoteLayerTreeDrawingAreaProxy::sendUpdateGeometry):
2413         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
2414         (WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidStart):
2415         (WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidEnd):
2416         (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
2417         (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorScale):
2418         (WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
2419         (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
2420         (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateViewState):
2421         (WebKit::RemoteLayerTreeDrawingAreaProxy::dispatchAfterEnsuringDrawing):
2422         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
2423         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
2424         (WebKit::TiledCoreAnimationDrawingAreaProxy::TiledCoreAnimationDrawingAreaProxy):
2425         (WebKit::TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange):
2426         (WebKit::TiledCoreAnimationDrawingAreaProxy::sizeDidChange):
2427         (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
2428         (WebKit::TiledCoreAnimationDrawingAreaProxy::colorSpaceDidChange):
2429         (WebKit::TiledCoreAnimationDrawingAreaProxy::minimumLayoutSizeDidChange):
2430         (WebKit::TiledCoreAnimationDrawingAreaProxy::enterAcceleratedCompositingMode):
2431         (WebKit::TiledCoreAnimationDrawingAreaProxy::updateAcceleratedCompositingMode):
2432         (WebKit::TiledCoreAnimationDrawingAreaProxy::didUpdateGeometry):
2433         (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateViewState):
2434         (WebKit::TiledCoreAnimationDrawingAreaProxy::intrinsicContentSizeDidChange):
2435         (WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
2436         (WebKit::TiledCoreAnimationDrawingAreaProxy::adjustTransientZoom):
2437         (WebKit::TiledCoreAnimationDrawingAreaProxy::commitTransientZoom):
2438
2439 2014-09-01  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2440
2441         [CMAKE] Build warning by INTERFACE_LINK_LIBRARIES
2442         https://bugs.webkit.org/show_bug.cgi?id=136194
2443
2444         Reviewed by Csaba Osztrogonác.
2445
2446         Set the LINK_INTERFACE_LIBRARIES target property on the top level CMakeLists.txt.
2447
2448         * CMakeLists.txt:
2449
2450 2014-09-01  Michael Catanzaro  <mcatanzaro@igalia.com>
2451
2452         [SOUP] WebKitDownload cannot overwrite existing file
2453         https://bugs.webkit.org/show_bug.cgi?id=136322
2454
2455         Reviewed by Carlos Garcia Campos.
2456
2457         * Shared/Downloads/soup/DownloadSoup.cpp:
2458         (WebKit::DownloadClient::didReceiveResponse): pass a member variable
2459         to Download::decideDestinationWithSuggestedFilename instead of a
2460         temporary bool, so we can use the result in didFinishLoading.
2461         (WebKit::DownloadClient::didFinishLoading): overwrite the destination
2462         if Download::decideDestinationWithSuggestedFilename determined we
2463         should do so.
2464
2465 2014-08-31  Tim Horton  <timothy_horton@apple.com>
2466
2467         Occasional crashes (null deref) under ViewGestureController::endMagnificationGesture
2468         https://bugs.webkit.org/show_bug.cgi?id=136409
2469         <rdar://problem/18104748>
2470
2471         Reviewed by Dan Bernstein.
2472
2473         * UIProcess/mac/ViewGestureControllerMac.mm:
2474         (WebKit::ViewGestureController::endMagnificationGesture):
2475         Null-check DrawingArea.
2476
2477 2014-08-26  Maciej Stachowiak  <mjs@apple.com>
2478
2479         Use RetainPtr::autorelease in some places where it seems appropriate
2480         https://bugs.webkit.org/show_bug.cgi?id=136280
2481
2482         Reviewed by Darin Adler.
2483
2484         * Shared/Cocoa/WKNSURLExtras.mm:
2485         (urlWithWTFString): Use autorelease() instead of CFBridgingRelease(leakRef())
2486
2487 2014-08-29  Tim Horton  <timothy_horton@apple.com>
2488
2489         More occasional crashes in ServicesController::resfreshExistingServices
2490         https://bugs.webkit.org/show_bug.cgi?id=136387
2491         <rdar://problem/18167200>
2492
2493         Reviewed by Dan Bernstein.
2494
2495         * UIProcess/mac/ServicesController.mm:
2496         (WebKit::ServicesController::ServicesController):
2497         Speculative fix; if this block is called synchronously, we'll end up
2498         calling back into ::shared() before the NeverDestroyed is initialized,
2499         ending up with two ServicesControllers.
2500
2501 2014-08-29  Alexey Proskuryakov  <ap@apple.com>
2502
2503         Crashes in IPC code under VisitedLinkProvider::pendingVisitedLinksTimerFired
2504         https://bugs.webkit.org/show_bug.cgi?id=136384
2505         rdar://problem/16991213
2506
2507         Reviewed by Sam Weinig.
2508
2509         VisitedLinkProvider process tracking relied on a combination of WebPageProxy process
2510         lifecycle notifications and checking process state. As evidenced by multiple FIXMEs,
2511         these are not yet as reliable as they should be.
2512         
2513         Changed to unregister a process when it closes, not when it no longer has any pages
2514         using the particular VisitedLinkProvider or WebUserContentControllerProxy. This
2515         is a deoptimization that should not matter in practice.
2516
2517         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
2518         (WebKit::WebUserContentControllerProxy::~WebUserContentControllerProxy):
2519         (WebKit::WebUserContentControllerProxy::removeProcess):
2520         (WebKit::WebUserContentControllerProxy::addUserScript):
2521         (WebKit::WebUserContentControllerProxy::removeAllUserScripts):
2522         (WebKit::WebUserContentControllerProxy::addUserStyleSheet):
2523         (WebKit::WebUserContentControllerProxy::removeAllUserStyleSheets):
2524         (WebKit::WebUserContentControllerProxy::addUserScriptMessageHandler):
2525         (WebKit::WebUserContentControllerProxy::removeUserMessageHandlerForName):
2526         * UIProcess/UserContent/WebUserContentControllerProxy.h:
2527         * UIProcess/VisitedLinkProvider.cpp:
2528         (WebKit::VisitedLinkProvider::~VisitedLinkProvider):
2529         (WebKit::VisitedLinkProvider::removeProcess):
2530         (WebKit::VisitedLinkProvider::removeAll):
2531         (WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired):
2532         (WebKit::VisitedLinkProvider::resizeTable):
2533         * UIProcess/VisitedLinkProvider.h:
2534         * UIProcess/WebPageProxy.cpp:
2535         (WebKit::WebPageProxy::WebPageProxy):
2536         (WebKit::WebPageProxy::close):
2537         (WebKit::WebPageProxy::processDidFinishLaunching):
2538         (WebKit::WebPageProxy::resetStateAfterProcessExited):
2539         * UIProcess/WebProcessProxy.cpp:
2540         (WebKit::WebProcessProxy::disconnect):
2541         (WebKit::WebProcessProxy::addVisitedLinkProvider):
2542         (WebKit::WebProcessProxy::addWebUserContentControllerProxy):
2543         (WebKit::WebProcessProxy::didDestroyVisitedLinkProvider):
2544         (WebKit::WebProcessProxy::didDestroyWebUserContentControllerProxy):
2545         * UIProcess/WebProcessProxy.h:
2546
2547 2014-08-29  Alexey Proskuryakov  <ap@apple.com>
2548
2549         WebPageProxy::close() is a no-op for terminated processes
2550         https://bugs.webkit.org/show_bug.cgi?id=136378
2551         Related to <rdar://problem/16991213> and to <rdar://problem/17095600>
2552
2553         Reviewed by Brady Eidson.
2554
2555         Also fixes issues that got uncovered after making close() work.
2556
2557         * UIProcess/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::invalidate): Don't
2558         close the page, because it makes no sense, and causes an assertion now. Previosly,
2559         this was OK because the page was invalid already, and close() was a no-op.
2560
2561         * UIProcess/WebPageProxy.cpp:
2562         (WebKit::WebPageProxy::~WebPageProxy): Added some assertions to catch invalidation
2563         issues earlier.
2564         (WebKit::WebPageProxy::reattachToWebProcess): Make it an invariant that a page's
2565         process always has a message receiver for it, until close() removes it.
2566         (WebKit::WebPageProxy::close): Make this function work for all open pages, whether
2567         they have a page or not.
2568         (WebKit::WebPageProxy::processDidFinishLaunching): Added an asserion that process
2569         agrees about its state.
2570         (WebKit::WebPageProxy::resetStateAfterProcessExited): Don't remove a message receiver,
2571         we now only do this in reattach or close.
2572
2573 2014-08-29  Antti Koivisto  <antti@apple.com>
2574
2575         Remove NetworkResourceLoaderClient and subclasses.
2576         https://bugs.webkit.org/show_bug.cgi?id=136370
2577
2578         Reviewed by Darin Adler.
2579
2580         This code is needlessly abstract. Move what logic these classes have to NetworkResourceLoader.
2581
2582         * NetworkProcess/AsynchronousNetworkLoaderClient.cpp: Removed.
2583         * NetworkProcess/AsynchronousNetworkLoaderClient.h: Removed.
2584         * NetworkProcess/NetworkLoaderClient.h: Removed.
2585         * NetworkProcess/NetworkResourceLoader.cpp:
2586         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
2587         (WebKit::NetworkResourceLoader::~NetworkResourceLoader):
2588         (WebKit::NetworkResourceLoader::isSynchronous):
2589         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
2590         (WebKit::NetworkResourceLoader::didReceiveBuffer):
2591         (WebKit::NetworkResourceLoader::didFinishLoading):
2592         (WebKit::NetworkResourceLoader::didFail):
2593         (WebKit::NetworkResourceLoader::willSendRequestAsync):
2594         (WebKit::NetworkResourceLoader::didSendData):
2595         (WebKit::NetworkResourceLoader::sendBuffer):
2596         (WebKit::NetworkResourceLoader::sendReplyToSynchronousRequest):
2597         (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
2598         * NetworkProcess/NetworkResourceLoader.h:
2599         (WebKit::NetworkResourceLoader::SynchronousLoadData::SynchronousLoadData):
2600         * NetworkProcess/SynchronousNetworkLoaderClient.cpp: Removed.
2601         * NetworkProcess/SynchronousNetworkLoaderClient.h: Removed.
2602         * WebKit2.xcodeproj/project.pbxproj:
2603
2604 2014-08-29  Csaba Osztrogonác  <ossy@webkit.org>
2605
2606         Unreviwed, remove empty directories.
2607
2608         * PluginProcess/qt: Removed.
2609         * Shared/API/c/qt: Removed.
2610         * Shared/Downloads/qt: Removed.
2611         * Shared/FileAPI: Removed.
2612         * Shared/qt: Removed.
2613         * UIProcess/API/C/qt: Removed.
2614         * UIProcess/API/cpp/qt: Removed.
2615         * UIProcess/API/qt: Removed.
2616         * UIProcess/API/qt/raw: Removed.
2617         * UIProcess/API/qt/tests: Removed.
2618         * UIProcess/API/qt/tests/html: Removed.
2619         * UIProcess/API/qt/tests/html/resources: Removed.
2620         * UIProcess/API/qt/tests/inspectorserver: Removed.
2621         * UIProcess/API/qt/tests/publicapi: Removed.
2622         * UIProcess/API/qt/tests/qmltests: Removed.
2623         * UIProcess/API/qt/tests/qmltests/DesktopBehavior: Removed.
2624         * UIProcess/API/qt/tests/qmltests/WebView: Removed.
2625         * UIProcess/API/qt/tests/qmltests/common: Removed.
2626         * UIProcess/API/qt/tests/qquickwebview: Removed.
2627         * UIProcess/API/qt/tests/qrawwebview: Removed.
2628         * UIProcess/InspectorServer/qt: Removed.
2629         * UIProcess/Launcher/qt: Removed.
2630         * UIProcess/Plugins/qt: Removed.
2631         * UIProcess/SharedWorkers: Removed.
2632         * UIProcess/qt: Removed.
2633         * WebProcess/Cookies/qt: Removed.
2634         * WebProcess/Downloads: Removed.
2635         * WebProcess/IndexedDB: Removed.
2636         * WebProcess/InjectedBundle/qt: Removed.
2637         * WebProcess/NetworkInfo: Removed.
2638         * WebProcess/Plugins/Netscape/qt: Removed.
2639         * WebProcess/WebCoreSupport/qt: Removed.
2640         * WebProcess/WebPage/qt: Removed.
2641         * WebProcess/qt: Removed.
2642         * qt: Removed.
2643
2644 2014-08-28  Tim Horton  <timothy_horton@apple.com>
2645
2646         _setDidMoveSwipeSnapshotCallback's block should only be called if the snapshot is going to move
2647         https://bugs.webkit.org/show_bug.cgi?id=136354
2648         <rdar://problem/18167791>
2649
2650         Reviewed by Simon Fraser.
2651
2652         * UIProcess/API/Cocoa/WKViewPrivate.h:
2653         Update the comment to note the new behavior.
2654
2655         * UIProcess/mac/ViewGestureControllerMac.mm:
2656         (WebKit::ViewGestureController::beginSwipeGesture):
2657         Don't call the block until the snapshot is actually moving (if the snapshot
2658         never moves because it's behind the live view, don't call the block at all).
2659
2660 2014-08-28  Tim Horton  <timothy_horton@apple.com>
2661
2662         Occasional thread-safety-related crashes on the ServicesController queue
2663         https://bugs.webkit.org/show_bug.cgi?id=136356
2664         <rdar://problem/18045685>
2665
2666         Reviewed by Dan Bernstein.
2667
2668         * UIProcess/mac/ServicesController.mm:
2669         (WebKit::hasCompatibleServicesForItems):
2670         Added. Check directly with NSSharingService if we have any services for the given items.
2671         We should eventually check Viewer and Editor services separately so the Web process can
2672         be smarter about when it shows the overlay, but for now this maintains the existing behavior.
2673
2674         (WebKit::ServicesController::refreshExistingServices):
2675         Make use of hasCompatibleServicesForItems instead of having NSSharingServicePicker construct NSMenus.
2676
2677 2014-08-28  Tim Horton  <timothy_horton@apple.com>
2678
2679         WebKit2 doesn't support viewer services that accept image attachments
2680         https://bugs.webkit.org/show_bug.cgi?id=136349
2681         <rdar://problem/18164606>
2682
2683         Reviewed by Brady Eidson.
2684
2685         * Shared/WebProcessCreationParameters.cpp:
2686         (WebKit::WebProcessCreationParameters::encode):
2687         (WebKit::WebProcessCreationParameters::decode):
2688         Encode the already-existing parameter.
2689
2690 2014-08-28  Zalan Bujtas  <zalan@apple.com>
2691
2692         Subpixel layout: Remove unused pixel snapping functions.
2693         https://bugs.webkit.org/show_bug.cgi?id=136341
2694
2695         Reviewed by Simon Fraser.
2696
2697         Let's not encourage integral snapping by having these functions around.
2698         
2699         No change in functionality.
2700
2701         * Shared/WebRenderObject.cpp:
2702         (WebKit::WebRenderObject::WebRenderObject):
2703
2704 2014-08-27  Enrica Casucci  <enrica@apple.com>
2705
2706         textStylingAtPosition returns incorrect values after executing toggleBold, toggleItalic and toggleUnderline.
2707         https://bugs.webkit.org/show_bug.cgi?id=136323
2708         rdar://problem/18141964
2709
2710         Reviewed by Antti Koivisto.
2711
2712         For underline style we need to check typingStyle first and use that information to populate
2713         the dictionary. If there is no typing style we can use the render style.
2714         We also need to update the editor state for the toggle commands to reflect the state in the UIProcess
2715         even for commands that don't change the selection.
2716
2717         * WebProcess/WebPage/WebPage.cpp:
2718         (WebKit::WebPage::editorState):
2719         * WebProcess/WebPage/ios/WebPageIOS.mm:
2720         (WebKit::WebPage::executeEditCommandWithCallback):
2721
2722 2014-08-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2723
2724         [GTK] Add webkit_uri_response_get_http_headers to WebKit2 GTK+ API
2725         https://bugs.webkit.org/show_bug.cgi?id=136248
2726
2727         Reviewed by Gustavo Noronha Silva.
2728
2729         Add webkit_uri_response_get_http_headers() that returns the HTTP
2730         headers as a SoupMessageHeaders* like webkit_uri_request_get_http_headers().
2731
2732         * UIProcess/API/gtk/WebKitURIResponse.cpp:
2733         (webkitURIResponseGetProperty): Add http-headers property getter.
2734         (webkit_uri_response_class_init): Add http-headers property.
2735         (webkit_uri_response_get_http_headers): Return the HTTP headers as
2736         a SoupMessageHeaders* or NULL for non HTTP responses.
2737         * UIProcess/API/gtk/WebKitURIResponse.h:
2738         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol.
2739
2740 2014-08-27  Zalan Bujtas  <zalan@apple.com>
2741
2742         Subpixel layout: Rename LayoutRect's device pixel snapping functions.
2743         https://bugs.webkit.org/show_bug.cgi?id=136319
2744
2745         Reviewed by Simon Fraser.
2746
2747         From pixelSnappedForPainting() to snapRectToDevicePixels() and 
2748         pixelSnappedIntRect*() to snappedIntRect*().
2749
2750         No change in functionality.
2751
2752         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
2753         (WebKit::InjectedBundleNodeHandle::renderedImage):
2754         * WebProcess/WebPage/WebPage.cpp:
2755         (WebKit::WebPage::snapshotNode):
2756         * WebProcess/WebPage/mac/ServicesOverlayController.mm:
2757         (WebKit::ServicesOverlayController::buildSelectionHighlight):
2758
2759 2014-08-27  Zalan Bujtas  <zalan@apple.com>
2760
2761         Subpixel layout: Rename FloatPoint/FloatRect device pixel snapping functions.
2762         https://bugs.webkit.org/show_bug.cgi?id=136314
2763
2764         Reviewed by Simon Fraser.
2765
2766         From *edToDevicePixels() to *PointToDevicePixels() (* = floor/round/ceil)
2767
2768         EnclosedIntRect -> enclosingIntRect() changes functionality for InspectorOverlay painting,
2769         but currently untestable.
2770
2771         * UIProcess/ios/WKContentViewInteraction.mm:
2772         (-[WKContentView _updateTapHighlight]):
2773
2774 2014-08-27  Tim Horton  <timothy_horton@apple.com>
2775
2776         WebKit2 swipe gesture should report the position of the snapshot to the client
2777         https://bugs.webkit.org/show_bug.cgi?id=136308
2778         rdar://problem/18105827
2779
2780         Reviewed by Simon Fraser.
2781
2782         * UIProcess/API/Cocoa/WKViewPrivate.h:
2783         * UIProcess/API/mac/WKView.mm:
2784         (-[WKView _setDidMoveSwipeSnapshotCallback:]):
2785         Add _setDidMoveSwipeSnapshotCallback, and plumb it to ViewGestureController.
2786         Callers provide a block which is called whenever ViewGestureController moves the
2787         swipe *snapshot* layer around.
2788
2789         * UIProcess/PageClient.h:
2790         * UIProcess/WebPageProxy.h:
2791         * UIProcess/mac/PageClientImpl.h:
2792         * UIProcess/mac/PageClientImpl.mm:
2793         (WebKit::PageClientImpl::boundsOfLayerInLayerBackedWindowCoordinates):
2794         * UIProcess/mac/WebPageProxyMac.mm:
2795         (WebKit::WebPageProxy::boundsOfLayerInLayerBackedWindowCoordinates):
2796         Expose a Mac-only way to get the bounds of a given CALayer in window coordinates,
2797         respecting transforms. This only works for layer-backed windows because
2798         it uses CA in order to do the mapping respecting transforms.
2799
2800         * UIProcess/mac/ViewGestureController.h:
2801         * UIProcess/mac/ViewGestureControllerMac.mm:
2802         (WebKit::ViewGestureController::ViewGestureController):
2803         (WebKit::ViewGestureController::~ViewGestureController):
2804         (WebKit::ViewGestureController::setDidMoveSwipeSnapshotCallback):
2805         Do the Block_copy and Block_release dance to keep our copy of the callback block.
2806
2807         (WebKit::ViewGestureController::beginSwipeGesture):
2808         (WebKit::ViewGestureController::handleSwipeGesture):
2809         (WebKit::ViewGestureController::didMoveSwipeSnapshotLayer):
2810         When the swipe snapshot layer moves around, call the block.
2811
2812 2014-08-27  Tim Horton  <timothy_horton@apple.com>
2813
2814         Occasional crashes in commitTransientZoom's transaction completion block
2815         https://bugs.webkit.org/show_bug.cgi?id=136309
2816         <rdar://problem/17215064>
2817
2818         Reviewed by Dan Bernstein.
2819
2820         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2821         (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
2822         Hold a reference to zoomLayer and the WebPage. It's possible that either
2823         of these things could have gone away by the time the transaction is committed.
2824
2825 2014-08-27  Benjamin Poulain  <bpoulain@apple.com>
2826
2827         [iOS WK2] Provide a delegate callback to skip Geolocation authorization per page for WebApp
2828         https://bugs.webkit.org/show_bug.cgi?id=136243
2829
2830         Reviewed by Sam Weinig.
2831
2832         Just ask the UI if the authorization dialog needs to be skipped.
2833
2834         * UIProcess/API/Cocoa/WKUIDelegate.h:
2835         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
2836         * UIProcess/ios/PageClientImplIOS.mm:
2837         (WebKit::PageClientImpl::decidePolicyForGeolocationPermissionRequest):
2838
2839         * UIProcess/ios/WKContentView.h:
2840         * UIProcess/ios/WKContentView.mm:
2841         (-[WKContentView _decidePolicyForGeolocationRequestFromOrigin:frame:request:]): Deleted.
2842         The code in WKContentView only exists due to legacy. Instead, the PageClient dispatch the request
2843         to the GeolocationProvider directly.
2844
2845         * UIProcess/ios/WKGeolocationProviderIOS.h:
2846         * UIProcess/ios/WKGeolocationProviderIOS.mm:
2847         (-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:request:view:]):
2848         (-[WKGeolocationProviderIOS geolocationAuthorizationGranted]):
2849         (-[WKGeolocationProviderIOS positionChanged:]):
2850         (-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:request:window:]): Deleted.
2851
2852 2014-08-27  Beth Dakin  <bdakin@apple.com>
2853
2854         overflow:scroll elements should not latch to the body if the body is 
2855         overflow:hidden
2856         https://bugs.webkit.org/show_bug.cgi?id=136273
2857
2858         Reviewed by Darin Adler.
2859
2860         New ScrollabeArea virtual function.
2861         * WebProcess/Plugins/PDF/PDFPlugin.h:
2862
2863 2014-08-26  Matt Lilek  <mrl@apple.com>
2864
2865         Add WebKit SPI to control the navigator.standalone property
2866         https://bugs.webkit.org/show_bug.cgi?id=136189
2867
2868         Reviewed by Andy Estes.
2869
2870         Add a property to WKPreferences that allows toggling this setting.
2871
2872         * UIProcess/API/Cocoa/WKPreferences.mm:
2873         (-[WKPreferences _isStandalone]):
2874         (-[WKPreferences _setStandalone:]):
2875         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2876
2877 2014-08-26  Joseph Pecoraro  <pecoraro@apple.com>
2878
2879         FileReader cannot read files selected with <input type="file"> in iOS 8
2880         https://bugs.webkit.org/show_bug.cgi?id=136117
2881
2882         Reviewed by Alexey Proskuryakov.
2883
2884         * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2885         Correct an overzealous deny that was accidentally denying all
2886         com.apple.app-sandbox.read extensions instead of just the ones
2887         in Application bundles it was trying to deny.
2888
2889 2014-08-26  Tim Horton  <timothy_horton@apple.com>
2890
2891         Crashes in ViewGestureController::beginSwipeGesture when swiping in rapid succession
2892         https://bugs.webkit.org/show_bug.cgi?id=136271
2893         <rdar://problem/17923694>
2894
2895         Reviewed by Simon Fraser.
2896
2897         It was possible to get into trackSwipeGesture while another swipe was still
2898         occurring, because the guard against this happening depended on m_pendingSwipeReason
2899         never being set while a swipe was occurring. However, if the very first scroll event
2900         had sufficient magnitude, we would still set m_pendingSwipeReason to InsufficientMagnitude,
2901         and then *never clear it*, leading to a path around the guard against multiple live swipes.
2902         This in turn allowed stale layers in m_liveSwipeLayers, which lead to the crash.
2903
2904         * UIProcess/mac/ViewGestureControllerMac.mm:
2905         (WebKit::ViewGestureController::handleScrollWheelEvent):
2906         Don't unset m_pendingSwipeReason before calling trackSwipeGesture;
2907         trackSwipeGesture will do it itself.
2908
2909         Don't set m_pendingSwipeReason to InsufficientMagnitude
2910         if the event actually *has* sufficient magnitude to start a swipe.
2911
2912         (WebKit::ViewGestureController::trackSwipeGesture):
2913         Assert that we don't have an active gesture while starting a swipe.
2914
2915         Reset m_pendingSwipeReason, because the swipe is no longer pending!
2916
2917 2014-08-26  Andy Estes  <aestes@apple.com>
2918
2919         [Cocoa] Some projects are incorrectly installed to $BUILT_PRODUCTS_DIR
2920         https://bugs.webkit.org/show_bug.cgi?id=136267
2921
2922         Reviewed by Dan Bernstein.
2923
2924         INSTALL_PATH was set to $BUILT_PRODUCTS_DIR for engineering configurations in r20225 as part of a build fix.
2925         Not only is this no longer necessary to build, but it causes built products to be incorrectly installed in
2926         engineering configurations.
2927
2928         Remove the setting of INSTALL_PATH from the pbxproj file so that the value specified in the xcconfig files is
2929         used instead.
2930
2931         * WebKit2.xcodeproj/project.pbxproj:
2932
2933 2014-08-25  Maciej Stachowiak  <mjs@apple.com>
2934
2935         Replace use of WKCopyCFLocalizationPreferredName with NSLocale public API
2936         https://bugs.webkit.org/show_bug.cgi?id=136082
2937
2938         Reviewed by Alexey Proskuryakov.
2939
2940         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2941         (WebKit::connectToService): Remove accidental leftover retrieval
2942         of the localization.
2943         (WebKit::createProcess): Get current localization name from
2944         CFBundle API instead of using SPI.
2945         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2946         (InitWebCoreSystemInterface): Remove mention of WKCopyCFLocalizationPreferredName
2947         * mac/WebKit2.order: ditto
2948
2949 2014-08-26  Dana Burkart  <dburkart@apple.com>
2950
2951         The UNUSED_PARAM macros in ServicesOverlayController.mm are causing ASan build failures.
2952         https://bugs.webkit.org/show_bug.cgi?id=136262
2953
2954         Reviewed by David Kilzer.
2955
2956         * WebProcess/WebPage/mac/ServicesOverlayController.mm:
2957         (WebKit::ServicesOverlayController::selectionRectsDidChange):
2958         (WebKit::ServicesOverlayController::selectedTelephoneNumberRangesChanged):
2959
2960 2014-08-26  Csaba Osztrogonác  <ossy@webkit.org>
2961
2962         [EFL] URTBF after r172966.
2963
2964         * UIProcess/efl/WebViewEfl.h:
2965
2966 2014-08-26  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2967
2968         REGRESSION(r172966) [GTK] Build broken.
2969
2970         Unreviewed build fix after r172966.
2971
2972         * UIProcess/API/gtk/PageClientImpl.cpp:
2973         (WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame):
2974         * UIProcess/API/gtk/PageClientImpl.h:
2975
2976 2014-08-26  Simon Fraser  <simon.fraser@apple.com>
2977
2978         Crashes in hit testing under WebPage::determinePrimarySnapshottedPlugIn()
2979         https://bugs.webkit.org/show_bug.cgi?id=136240
2980         rdar://problem/17231462
2981
2982         Reviewed by Darin Adler.
2983         
2984         determinePrimarySnapshottedPlugIn() does render tree hit testing, so needs
2985         to ensure that layout is up-to-date.
2986
2987         * WebProcess/WebPage/WebPage.cpp:
2988         (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
2989
2990 2014-08-26  Tim Horton  <timothy_horton@apple.com>
2991
2992         REGRESSION (r172771): Amazon product page becomes unresponsive after swiping back to it
2993         https://bugs.webkit.org/show_bug.cgi?id=136260
2994         <rdar://problem/18107826>
2995
2996         Reviewed by Dan Bernstein.
2997
2998         Previously, when a swipe ended up performing a same-document navigation,
2999         we would never get didFinishLoadForMainFrame nor didFirstVisuallyNonEmptyLayoutForMainFrame
3000         nor would we even get didHitRenderTreeSizeThreshold in all cases, so we would never
3001         remove the swipe snapshot. Previous implementations removed the snapshot on
3002         didSameDocumentNavigation for the main frame if the navigation type was Replace or Pop,
3003         so we will match that behavior.
3004
3005         Also, reinstate the watchdog that starts at swipe-end which would have prevented
3006         this bug from forever breaking the view it was associated with.
3007
3008         Also, defend against removing the snapshot before the swipe has finished (before
3009         we have even caused the navigation that we're watching for the effects of).
3010
3011         * UIProcess/API/mac/WKView.mm:
3012         (-[WKView _didSameDocumentNavigationForMainFrame:]):
3013         * UIProcess/API/mac/WKViewInternal.h:
3014         * UIProcess/PageClient.h:
3015         * UIProcess/WebPageProxy.cpp:
3016         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
3017         * UIProcess/ios/PageClientImplIOS.h:
3018         * UIProcess/ios/PageClientImplIOS.mm:
3019         (WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame):
3020         * UIProcess/mac/PageClientImpl.h:
3021         * UIProcess/mac/PageClientImpl.mm:
3022         (WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame):
3023         Plumb main-frame same-document navigation notification from WebPageProxy
3024         to ViewGestureControllerMac via PageClient and WKView.
3025
3026         * UIProcess/mac/ViewGestureController.h:
3027         * UIProcess/mac/ViewGestureControllerMac.mm:
3028         (WebKit::ViewGestureController::ViewGestureController):
3029         (WebKit::ViewGestureController::beginSwipeGesture):
3030         (WebKit::ViewGestureController::endSwipeGesture):
3031         Keep track of whether a swipe is currently occurring. We can't use
3032         activeGestureType for this because the swipe currently remains the "active"
3033         gesture until the snapshot is removed.
3034
3035         Reintroduce the old swipeWatchdogTimer (and rename the shorter timer that starts
3036         when we get a visually non-empty layout) so that we will always remove the
3037         snapshot after 5 seconds, even if we haven't committed the load.
3038         This could lead to flashing back to the old content if we fail to get a single
3039         byte for 5 seconds, but that is a rare case and should eventually get additional
3040         special treatment (dropping the tiles until we do get content, or some such).
3041
3042         (WebKit::ViewGestureController::didHitRenderTreeSizeThreshold):
3043         If a swipe is still in progress, we haven't done our navigation and thus
3044         don't care about render tree size changes.
3045
3046         (WebKit::ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame):
3047         If a swipe is still in progress, we haven't done our navigation and thus
3048         don't care about layouts.
3049
3050         Stop the 5 second overall watchdog if we start the 3 second after-visuallyNonEmptyLayout
3051         watchdog. This means that the snapshot could stay up for a maximum of 8 seconds
3052         for a very, very slow load.
3053
3054         (WebKit::ViewGestureController::didFinishLoadForMainFrame):
3055         If a swipe is still in progress, we haven't done our navigation and thus
3056         don't care about loads that complete.
3057
3058         (WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
3059         Remove the swipe snapshot after painting if we do replaceState or popState.
3060
3061         (WebKit::ViewGestureController::removeSwipeSnapshotAfterRepaint):
3062         If a swipe is still in progress, we shouldn't remove the snapshot yet.
3063
3064 2014-08-26  Carlos Garcia Campos  <cgarcia@igalia.com>
3065
3066         [GTK] Translations are not initialized in the UI process
3067         https://bugs.webkit.org/show_bug.cgi?id=136249
3068
3069         Reviewed by Philippe Normand.
3070
3071         This is breaking things like webkitContextMenuActionGetForContextMenuItem()
3072         for non English locales in the cases where we use the action title to guess the
3073         action, because the action title we get from the web process is translated while
3074         the one in the UI process is in English.
3075
3076         * UIProcess/API/gtk/WebKitWebContext.cpp:
3077         (createDefaultWebContext): Initialize gettext right before
3078         creating the default web context.
3079
3080 2014-08-26  Ryuan Choi  <ryuan.choi@samsung.com>
3081
3082         [EFL] Remove dead code in WebPageEfl.cpp
3083         https://bugs.webkit.org/show_bug.cgi?id=136246
3084
3085         Reviewed by Gyuyoung Kim.
3086
3087         * WebProcess/WebPage/efl/WebPageEfl.cpp:
3088         (WebKit::scroll): Deleted.
3089
3090 2014-08-26  Ryuan Choi  <ryuan.choi@samsung.com>
3091
3092         [EFL] Build break using clang
3093         https://bugs.webkit.org/show_bug.cgi?id=136245
3094
3095         Reviewed by Gyuyoung Kim.
3096
3097         * PlatformEfl.cmake: defines GTEST_HAS_RTTI=0
3098
3099 2014-08-25  Zalan Bujtas  <zalan@apple.com>
3100
3101         Subpixel layout: remove roundedLayoutPoint/roundedLayoutSize functions.
3102         https://bugs.webkit.org/show_bug.cgi?id=136236
3103
3104         Reviewed by Simon Fraser.
3105
3106         These functions simply call LayoutPoint/LayoutSize c'tors. They don't round the input value at all.
3107
3108         Non change in functionality.
3109
3110         * UIProcess/ios/WebPageProxyIOS.mm:
3111         (WebKit::WebPageProxy::computeCustomFixedPositionRect):
3112
3113 2014-08-25  Antti Koivisto  <antti@apple.com>
3114
3115         Don't pass priority as parameter to ResourceLoadScheduler
3116         https://bugs.webkit.org/show_bug.cgi?id=136232
3117
3118         Reviewed by Sam Weinig.
3119
3120         * NetworkProcess/NetworkResourceLoader.cpp:
3121         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
3122         * NetworkProcess/NetworkResourceLoader.h:
3123         (WebKit::NetworkResourceLoader::priority): Deleted.
3124         * Shared/Network/NetworkResourceLoadParameters.cpp:
3125         (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
3126         (WebKit::NetworkResourceLoadParameters::encode):
3127         (WebKit::NetworkResourceLoadParameters::decode):
3128         * Shared/Network/NetworkResourceLoadParameters.h:
3129         * WebProcess/Network/WebResourceLoadScheduler.cpp:
3130         (WebKit::WebResourceLoadScheduler::scheduleSubresourceLoad):
3131         (WebKit::WebResourceLoadScheduler::schedulePluginStreamLoad):
3132         (WebKit::WebResourceLoadScheduler::scheduleLoad):
3133         * WebProcess/Network/WebResourceLoadScheduler.h:
3134         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3135         (WebKit::WebPlatformStrategies::loadResourceSynchronously):
3136
3137 2014-08-25  Brady Eidson  <beidson@apple.com>
3138
3139         Don't crash when the DataDetectors framework is unavailable.
3140         <rdar://problem/18106066> and https://bugs.webkit.org/show_bug.cgi?id=136234
3141
3142         Reviewed by Tim Horton.
3143
3144         * WebProcess/WebPage/mac/ServicesOverlayController.mm:
3145         (WebKit::ServicesOverlayController::buildPhoneNumberHighlights): Bail if DD.framework didn’t soft link.
3146         (WebKit::ServicesOverlayController::buildSelectionHighlight): Ditto.
3147
3148 2014-08-25  Antti Koivisto  <antti@apple.com>
3149
3150         Remove load scheduling code from network process
3151         https://bugs.webkit.org/show_bug.cgi?id=136199
3152
3153         Reviewed by Darin Adler.
3154
3155         Most platforms just flush resource loads directly to the networking layer by
3156         making the parallel load count large. Also we always pass ResourceLoadPriorityHighest
3157         to the scheduler so no actual scheduling happens. This is effectively dead code.
3158
3159         Keep basic support for serializing loads. This is only used for testing.
3160
3161         * NetworkProcess/HostRecord.cpp: Removed.
3162         * NetworkProcess/HostRecord.h: Removed.
3163         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
3164         (WebKit::NetworkConnectionToWebProcess::servePendingRequests):
3165         * NetworkProcess/NetworkProcess.cpp:
3166         (WebKit::NetworkProcess::getNetworkProcessStatistics):
3167         * NetworkProcess/NetworkResourceLoadScheduler.cpp:
3168         (WebKit::NetworkResourceLoadScheduler::NetworkResourceLoadScheduler):
3169         (WebKit::NetworkResourceLoadScheduler::scheduleLoader):
3170         (WebKit::NetworkResourceLoadScheduler::removeLoader):
3171         (WebKit::NetworkResourceLoadScheduler::loadsPendingCount):
3172         (WebKit::NetworkResourceLoadScheduler::loadsActiveCount):
3173         (WebKit::NetworkResourceLoadScheduler::scheduleServePendingRequests): Deleted.
3174         (WebKit::NetworkResourceLoadScheduler::requestTimerFired): Deleted.
3175         (WebKit::NetworkResourceLoadScheduler::hostForURL): Deleted.
3176         (WebKit::NetworkResourceLoadScheduler::receivedRedirect): Deleted.
3177         (WebKit::NetworkResourceLoadScheduler::servePendingRequests): Deleted.
3178         (WebKit::NetworkResourceLoadScheduler::removeScheduledLoaders): Deleted.
3179         (WebKit::NetworkResourceLoadScheduler::scheduleRemoveLoader): Deleted.
3180         (WebKit::NetworkResourceLoadScheduler::hostsPendingCount): Deleted.
3181         (WebKit::NetworkResourceLoadScheduler::hostsActiveCount): Deleted.
3182         * NetworkProcess/NetworkResourceLoadScheduler.h:
3183         * NetworkProcess/NetworkResourceLoader.cpp:
3184         (WebKit::NetworkResourceLoader::~NetworkResourceLoader):
3185         (WebKit::NetworkResourceLoader::cleanup):
3186         (WebKit::NetworkResourceLoader::continueWillSendRequest):
3187         * NetworkProcess/NetworkResourceLoader.h:
3188         (WebKit::NetworkResourceLoader::isLoadingMainResource):
3189         (WebKit::NetworkResourceLoader::setHostRecord): Deleted.
3190         (WebKit::NetworkResourceLoader::hostRecord): Deleted.
3191         * NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm:
3192         (WebKit::NetworkResourceLoadScheduler::platformInitializeNetworkSettings):
3193         (WebKit::NetworkResourceLoadScheduler::platformInitializeMaximumHTTPConnectionCountPerHost): Deleted.
3194         * NetworkProcess/soup/NetworkResourceLoadSchedulerSoup.cpp:
3195         (WebKit::NetworkResourceLoadScheduler::platformInitializeNetworkSettings):
3196         (WebKit::NetworkResourceLoadScheduler::platformInitializeMaximumHTTPConnectionCountPerHost): Deleted.
3197         * WebKit2.xcodeproj/project.pbxproj:
3198
3199 2014-08-25  Carlos Garcia Campos  <cgarcia@igalia.com>
3200
3201         [GTK] Older versions of WebKit should use the plugins cache in read only mode
3202         https://bugs.webkit.org/show_bug.cgi?id=136215
3203
3204         Reviewed by Philippe Normand.
3205
3206         Now that WebKitGTK+ 2.4 and 2.5 are parallel installable, since
3207         they use different versions of the plugins cache, apps using 2.4
3208         might override the plugins cache file. We should prevent this from
3209         happening by making older versions use the plugin cache, but not
3210         downgrade it.
3211
3212         * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
3213         (WebKit::PluginInfoCache::PluginInfoCache):
3214         (WebKit::PluginInfoCache::updatePluginInfo):
3215         * UIProcess/Plugins/gtk/PluginInfoCache.h:
3216
3217 2014-08-25  Carlos Garcia Campos  <cgarcia@igalia.com>
3218
3219         [GTK] Should check if a plugin mixes GTK+ symbols earlier
3220         https://bugs.webkit.org/show_bug.cgi?id=136214
3221
3222         Reviewed by Philippe Normand.
3223
3224         We are currently checking if the plugin module and the plugin
3225         process mix GTK symbols after the plugin has been loaded and
3226         initialized. This is too late in many cases, since plugins can use
3227         GTK methods in the NP_Initialize implementation. This is causing
3228         the apps using WebKitGTK+ 2.4 to freeze when the plugin process
3229         scans the plugins and there's a plugin using GTK+3 installed. We
3230         should move the check earlier, once the module is loaded but
3231         before calling NP_Initialize.
3232
3233         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
3234         (WebKit::moduleMixesGtkSymbols):
3235         (WebKit::NetscapePluginModule::tryLoad):
3236         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
3237         (WebKit::NetscapePlugin::platformPostInitialize):
3238
3239 2014-08-25  Zan Dobersek  <zdobersek@igalia.com>
3240
3241         Improve virtual method declarations in LayerTreeHostGtk
3242         https://bugs.webkit.org/show_bug.cgi?id=136210
3243
3244         Reviewed by Carlos Garcia Campos.
3245
3246         Mark the LayerTreeHostGtk class as final in the virtual inheritance hierarchy.
3247
3248         Order the public and private virtual method overrides from the LayerTreeHost
3249         and GraphicsLayerClient interfaces. Explicitly mark them as overriding the
3250         base class methods.
3251
3252         Remove the overriding notifyAnimationStarted() and notifyFlushRequired()
3253         methods since they are identical to the methods in the base class.
3254
3255         De-virtualize flushPendingLayerChanges(). It's not inherited and is not
3256         overriden by anything (and nothing can inherit from LayerTreeHostGtk from
3257         now on due to the final specifier).
3258
3259         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
3260         (WebKit::LayerTreeHostGtk::notifyAnimationStarted): Deleted.
3261         (WebKit::LayerTreeHostGtk::notifyFlushRequired): Deleted.
3262         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
3263         (WebKit::LayerTreeHostGtk::didCommitChangesForLayer): Deleted.
3264
3265 2014-08-24  Brian J. Burg  <burg@cs.washington.edu>
3266
3267         Remove unused method declarations replaced by WebPage::setViewState
3268         https://bugs.webkit.org/show_bug.cgi?id=136180
3269
3270         Reviewed by Darin Adler.
3271
3272         * WebProcess/WebPage/WebPage.h:
3273         Remove setFocused, setActive, setViewIsVisible. No longer used.
3274
3275 2014-08-23  Byungseon Shin  <sun.shin@lge.com>
3276  
3277         Unify GraphicsLayer::setContentsToMedia and setContentsToCanvas
3278         https://bugs.webkit.org/show_bug.cgi?id=109658
3279  
3280         Reviewed by Martin Robinson.
3281  
3282         Based on patch originally written by Tim Horton.
3283         Merge setContentsToMedia and setContentsToCanvas into setContentsToPlatformLayer.
3284  
3285         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
3286         (IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::encode):
3287         (IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::decode):
3288         Rename canvas -> platformLayer.
3289
3290 2014-08-22  Commit Queue  <commit-queue@webkit.org>
3291
3292         Unreviewed, rolling out r172866.
3293         https://bugs.webkit.org/show_bug.cgi?id=136177
3294
3295         Broke iOS build (Requested by othermaciej on #webkit).
3296
3297         Reverted changeset:
3298
3299         "Replace use of WKCopyCFLocalizationPreferredName with
3300         NSLocale public API"
3301         https://bugs.webkit.org/show_bug.cgi?id=136082
3302         http://trac.webkit.org/changeset/172866
3303
3304 2014-08-19  Maciej Stachowiak  <mjs@apple.com>
3305
3306         Replace use of WKCopyCFLocalizationPreferredName with NSLocale public API
3307         https://bugs.webkit.org/show_bug.cgi?id=136082
3308
3309         Reviewed by Alexey Proskuryakov.
3310
3311         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3312         (WebKit::connectToService): Remove accidental leftover retrieval
3313         of the localization.
3314         (WebKit::createProcess): Get current localization name from
3315         CFBundle API instead of using SPI.
3316         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3317         (InitWebCoreSystemInterface): Remove mention of WKCopyCFLocalizationPreferredName
3318         * mac/WebKit2.order: ditto
3319
3320 2014-08-22  Daniel Bates  <dabates@apple.com>
3321
3322         [iOS] Disable ENABLE_IOS_{GESTURE, TOUCH}_EVENTS, and temporarily disable ENABLE_TOUCH_EVENTS
3323         and ENABLE_XSLT when building with the iOS public SDK
3324         https://bugs.webkit.org/show_bug.cgi?id=135945
3325
3326         Reviewed by Andy Estes.
3327
3328         * Configurations/FeatureDefines.xcconfig: Disable ENABLE_IOS_{GESTURE, TOUCH}_EVENTS, ENABLE_TOUCH_EVENTS
3329         and ENABLE_XSLT when building with the public SDK.
3330         * Shared/WebEventConversion.h: Write preprocessor logic in terms of ENABLE(IOS_TOUCH_EVENTS).
3331         * WebProcess/WebPage/WebPage.h: Ditto.
3332
3333 2014-08-22  Simon Fraser  <simon.fraser@apple.com>
3334
3335         Implement paint flashing via GraphicsLayers in the WK2 inspector overlay
3336         https://bugs.webkit.org/show_bug.cgi?id=136136
3337
3338         Reviewed by Sam Weinig, Joseph Pecoraro.
3339         
3340         Allow InspectorClient to have a custom implementation of showPaintRect(). For
3341         WebKit2's WebInspectorClient, implement this by creating a set of GraphicsLayers
3342         which are parented in a document overlay, with 0.25s fade-out animations.
3343         
3344         Also change InspectorInstrumentation::didPaintImpl() to no longer take a GraphicsContext;
3345         it makes no sense to paint the paint rects directly into the context of the web page.
3346         Now that the paint rects are painted into an overlay, the rectangles need to be converted
3347         to root document coordinates, which is done in InspectorInstrumentation::didPaintImpl().
3348         
3349         Remove the generic InspectorOverlay::drawOutline()-based indicators; they will
3350         be reimplemented in a later patch.
3351
3352         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
3353         (WebKit::RepaintIndicatorLayerClient::RepaintIndicatorLayerClient):
3354         (WebKit::RepaintIndicatorLayerClient::~RepaintIndicatorLayerClient):
3355         (WebKit::RepaintIndicatorLayerClient::notifyAnimationEnded):
3356         (WebKit::WebInspectorClient::WebInspectorClient):
3357         (WebKit::WebInspectorClient::~WebInspectorClient):
3358         (WebKit::WebInspectorClient::showPaintRect):
3359         (WebKit::WebInspectorClient::animationEndedForLayer):
3360         * WebProcess/WebCoreSupport/WebInspectorClient.h:
3361         (WebKit::WebInspectorClient::WebInspectorClient): Deleted.
3362
3363 2014-08-22  Jon Lee  <jonlee@apple.com>
3364
3365         Fix iOS build due to r172832 and move RUBBER_BANDING out of FeatureDefines.h
3366         https://bugs.webkit.org/show_bug.cgi?id=136157
3367
3368         Reviewed by Simon Fraser.
3369
3370         * Configurations/FeatureDefines.xcconfig: Add ENABLE(RUBBER_BANDING).
3371
3372 2014-08-21  Joseph Pecoraro  <pecoraro@apple.com>
3373
3374         Possible RetainPtr misuse in WKScriptMessage.mm - could leak
3375         https://bugs.webkit.org/show_bug.cgi?id=136140
3376
3377         Reviewed by Darin Adler.
3378
3379         Adopt a copy into a RetainPtr to avoid leaking.
3380
3381         * UIProcess/API/Cocoa/WKScriptMessage.mm:
3382         (-[WKScriptMessage _initWithBody:webView:frameInfo:name:]):
3383
3384 2014-08-21  Simon Fraser  <simon.fraser@apple.com>
3385
3386         Add animationDidEnd callbacks on GraphicsLayer
3387         https://bugs.webkit.org/show_bug.cgi?id=136084
3388
3389         Reviewed by Tim Horton.
3390
3391         Hook up GraphicsLayerClient::notifyAnimationEnded() so that code using GraphicsLayers directly
3392         can add animations, and know when they finish.
3393
3394         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
3395         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3396         (WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidEnd):
3397         * UIProcess/mac/RemoteLayerTreeHost.h:
3398         * UIProcess/mac/RemoteLayerTreeHost.mm:
3399         (WebKit::RemoteLayerTreeHost::animationDidEnd):
3400         * WebProcess/WebPage/DrawingArea.h:
3401         (WebKit::DrawingArea::acceleratedAnimationDidEnd):
3402         * WebProcess/WebPage/DrawingArea.messages.in:
3403         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
3404         (-[WKAnimationDelegate animationDidStop:finished:]):
3405         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
3406         (WebKit::PlatformCALayerRemote::animationStarted):
3407         (WebKit::PlatformCALayerRemote::animationEnded):
3408         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
3409         * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
3410         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
3411         (WebKit::RemoteLayerTreeContext::layerWillBeDestroyed):
3412         (WebKit::RemoteLayerTreeContext::willStartAnimationOnLayer):
3413         (WebKit::RemoteLayerTreeContext::animationDidStart):
3414         (WebKit::RemoteLayerTreeContext::animationDidEnd):
3415         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
3416         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3417         (WebKit::RemoteLayerTreeDrawingArea::acceleratedAnimationDidEnd):
3418
3419 2014-08-21  Zalan Bujtas  <zalan@apple.com>
3420
3421         Enable SATURATED_LAYOUT_ARITHMETIC.
3422         https://bugs.webkit.org/show_bug.cgi?id=136106
3423
3424         Reviewed by Simon Fraser.
3425
3426         SATURATED_LAYOUT_ARITHMETIC protects LayoutUnit against arithmetic overflow.
3427         (No measurable performance regression on Mac.)
3428
3429         * Configurations/FeatureDefines.xcconfig:
3430
3431 2014-08-21  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
3432
3433         [GTK] WebkitWebProcess crashing navigating away from ogg video element
3434         https://bugs.webkit.org/show_bug.cgi?id=135348
3435
3436         Reviewed by Philippe Normand.
3437
3438         When a page is cached, by default doesn't recreate the backing store
3439         (an optimization added in r89316).
3440
3441         Not all the ports uses that optimization. For example IOS port doesn't
3442         use it (r161185).
3443
3444         In the case of the GTK port, the MediaPlayerPrivateGStreamer, not only
3445         processes video buffers, also display them, because it is a
3446         TextureMapperPlatformLayer too.
3447
3448         Nevertheless, in r153937, when a page is cached, the player is
3449         destroyed. But our player has a backing store and the render tree
3450         doesn't know that the player has gone. Hence, when the page is redraw,
3451         the TextureMapper tree visits the video element, which doesn't exist
3452         anymore, a segmentation fault occurs.
3453
3454         So, as our media player renders, and as we cannot trust that the
3455         player exists when a page is painted, we cannot rely in the r89316
3456         optimization.
3457
3458         Disabling the backing stores optimization fixes the problem.
3459
3460         Covered by existing tests.
3461
3462         * WebProcess/soup/WebProcessSoup.cpp:
3463         (WebKit::WebProcess::platformSetCacheModel): Enable the backing store
3464         clearing when page caching for GTK.
3465
3466 2014-08-20  Alex Christensen  <achristensen@webkit.org>
3467
3468         Introducing WEBCORE_EXPORT macro.
3469         https://bugs.webkit.org/show_bug.cgi?id=136108
3470
3471         Reviewed by Antti Koivisto.
3472
3473         * config.h:
3474         Added stub definition of WEBCORE_EXPORT defined to nothing to be able to compile with WebCore headers.
3475
3476 2014-08-20  Pratik Solanki  <psolanki@apple.com>
3477
3478         Move DiskCacheMonitor to WebCore so that WebKit1 clients can use it as well
3479         https://bugs.webkit.org/show_bug.cgi?id=135896
3480
3481         Reviewed by Andreas Kling.
3482
3483         * NetworkProcess/mac/NetworkDiskCacheMonitor.h:
3484             Inherit from WebCore::DiskCacheMonitor which has the bulk of the functionality now.
3485         (WebKit::NetworkDiskCacheMonitor::~NetworkDiskCacheMonitor):
3486         * NetworkProcess/mac/NetworkDiskCacheMonitor.mm:
3487         (WebKit::NetworkDiskCacheMonitor::monitorFileBackingStoreCreation):
3488         (WebKit::NetworkDiskCacheMonitor::NetworkDiskCacheMonitor):
3489         (WebKit::NetworkDiskCacheMonitor::resourceBecameFileBacked):
3490             Override virtual method and send the data to the WebContent process as before.
3491
3492 2014-08-19  Pratik Solanki  <psolanki@apple.com>
3493
3494         Remove PurgeableBuffer since it is not very useful any more
3495         https://bugs.webkit.org/show_bug.cgi?id=135939
3496
3497         Reviewed by Andreas Kling.
3498
3499         * WebProcess/WebProcess.cpp:
3500         (WebKit::getWebCoreMemoryCacheStatistics):
3501
3502 2014-08-19  Peyton Randolph  <prandolph@apple.com>
3503
3504         Expose injected bundle SPI to get a node's URL element, get the visible selection range of that
3505         element, and snapshot that range
3506         https://bugs.webkit.org/show_bug.cgi?id=136076
3507
3508         Reviewed by Tim Horton.
3509
3510         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
3511         (WKBundleHitTestResultCopyURLElementHandle): Added.
3512         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
3513         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
3514         (WKBundleNodeHandleCopyVisibleRange): Added.
3515         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
3516         * WebProcess/InjectedBundle/API/c/WKBundleRangeHandle.cpp:
3517         (WKBundleRangeHandleGetBoundingRectInWindowCoordinates): Added.
3518         (WKBundleRangeHandleCopySnapshotWithOptions): Added.
3519         * WebProcess/InjectedBundle/API/c/WKBundleRangeHandlePrivate.h:
3520         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
3521         (WebKit::InjectedBundleNodeHandle::visibleRange): Added.
3522         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
3523         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
3524         (WebKit::InjectedBundleRangeHandle::boundingRectInWindowCoordinates): Added.
3525         (WebKit::InjectedBundleRangeHandle::renderedImage): Added.
3526         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.h:
3527         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
3528         (WebKit::InjectedBundleHitTestResult::urlElementHandle): Added.
3529         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
3530
3531 2014-08-19  Zalan Bujtas  <zalan@apple.com>
3532
3533         Remove ENABLE(SUBPIXEL_LAYOUT).
3534         https://bugs.webkit.org/show_bug.cgi?id=136077
3535
3536         Reviewed by Simon Fraser.
3537
3538         Remove compile time flag SUBPIXEL_LAYOUT. All ports have it enabled for a while now.
3539
3540         * Configurations/FeatureDefines.xcconfig:
3541
3542 2014-08-19  Peyton Randolph  <prandolph@apple.com>
3543
3544         Extend injected bundle node snapshotting to support forced white and black text
3545         https://bugs.webkit.org/show_bug.cgi?id=136061
3546
3547         Reviewed by Beth Dakin.
3548
3549         * Shared/API/c/WKImage.h:
3550         Add -ForceBlackText and -ForceWhiteText snapshotting options.
3551         * Shared/API/c/WKSharedAPICast.h:
3552         (WebKit::toSnapshotOptions):
3553         Support aforementioned text snapshotting options.
3554         * Shared/ImageOptions.h:
3555         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
3556         (WebKit::imageForRect):
3557         Respect text color snapshotting options by setting appropriate paint behaviors.
3558
3559 2014-08-18  Maciej Stachowiak  <mjs@apple.com>
3560
3561         Use NSURLFileTypeMappings directly instead of depending on WebKitSystemInterface wrappers for it
3562         https://bugs.webkit.org/show_bug.cgi?id=136035
3563
3564         Reviewed by Dan Bernstein.
3565
3566         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3567         (InitWebCoreSystemInterface): Don't initialize the no-longer-used WKGetExtensionsForMIMEType,
3568         WKGetPreferredExtensionForMIMEType, or WKGetMIMETypeForExtension
3569         * mac/WebKit2.order: Remove exports related to above.
3570
3571 2014-08-18  Commit Queue  <commit-queue@webkit.org>
3572
3573         Unreviewed, rolling out r172736.
3574         https://bugs.webkit.org/show_bug.cgi?id=136060
3575
3576         Caused 14% PLT regressions (Requested by rniwa on #webkit).
3577
3578         Reverted changeset:
3579
3580         "Remove PurgeableBuffer since it is not very useful any more"
3581         https://bugs.webkit.org/show_bug.cgi?id=135939
3582         http://trac.webkit.org/changeset/172736
3583
3584 2014-08-18  Simon Fraser  <simon.fraser@apple.com>
3585
3586         Provide default implementations of all GraphicsLayerClient methods
3587         https://bugs.webkit.org/show_bug.cgi?id=136054
3588
3589         Reviewed by Tim Horton.
3590         
3591         Remove overrides which are no longer required.
3592
3593         * WebProcess/WebPage/PageOverlayController.h:
3594         * WebProcess/WebPage/ServicesOverlayController.h:
3595         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
3596
3597 2014-08-18  Pratik Solanki  <psolanki@apple.com>
3598
3599         Remove PurgeableBuffer since it is not very useful any more
3600         https://bugs.webkit.org/show_bug.cgi?id=135939
3601
3602         Reviewed by Geoffrey Garen.
3603
3604         * WebProcess/WebProcess.cpp:
3605         (WebKit::getWebCoreMemoryCacheStatistics):
3606
3607 2014-08-18  Peyton Randolph  <prandolph@apple.com>
3608
3609         Expose long mouse press WebKit API. Part of 135257 - Add long mouse press gesture
3610         https://bugs.webkit.org/show_bug.cgi?id=136048
3611
3612         Reviewed by Dan Bernstein.
3613
3614         This patch exposes long mouse press API callbacks in both the injected bundle and on the UI process
3615         through their respective page UI clients. The callbacks are modeled off of the mouseDidMoveOverElement
3616         callback. Like the mouseDidMoveOverElement callback, these callbacks allow the bundle to pass 
3617         information to the UI process via a userData out parameter.
3618
3619         * UIProcess/API/APIUIClient.h:
3620         (API::UIClient::didBeginTrackingPotentialLongMousePress): Added.
3621         (API::UIClient::didRecognizeLongMousePress): Added.
3622         (API::UIClient::didCancelTrackingPotentialLongMousePress): Added.
3623         * UIProcess/API/C/WKPage.cpp:
3624         (WKPageSetPageUIClient):
3625         * UIProcess/API/C/WKPageUIClient.h:
3626         * UIProcess/WebPageProxy.cpp:
3627         (WebKit::WebPageProxy::didBeginTrackingPotentialLongMousePress): Added.
3628         (WebKit::WebPageProxy::didRecognizeLongMousePress): Added.
3629         (WebKit::WebPageProxy::didCancelTrackingPotentialLongMousePress): Added.
3630         * UIProcess/WebPageProxy.h:
3631         * UIProcess/WebPageProxy.messages.in:
3632         * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
3633         (API::InjectedBundle::PageUIClient::didBeginTrackingPotentialLongMousePress): Added.
3634         (API::InjectedBundle::PageUIClient::didRecognizeLongMousePress): Added.
3635         (API::InjectedBundle::PageUIClient::didCancelTrackingPotentialLongMousePress): Added.
3636         * WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h:
3637         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: Added.
3638         (WebKit::InjectedBundlePageUIClient::didBeginTrackingPotentialLongMousePress): Added.
3639         (WebKit::InjectedBundlePageUIClient::didRecognizeLongMousePress): Added.
3640         (WebKit::InjectedBundlePageUIClient::didCancelTrackingPotentialLongMousePress): Added.
3641         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
3642         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3643         (WebKit::WebChromeClient::didBeginTrackingPotentialLongMousePress): Added.
3644         (WebKit::WebChromeClient::didRecognizeLongMousePress): Added.
3645         (WebKit::WebChromeClient::didCancelTrackingPotentialLongMousePress): Added.
3646         * WebProcess/WebCoreSupport/WebChromeClient.h:
3647
3648 2014-08-18  Przemyslaw Kuczynski  <p.kuczynski@samsung.com>
3649
3650         Fix unintentional integer overflow before widen
3651         https://bugs.webkit.org/show_bug.cgi?id=135463
3652
3653         Reviewed by Oliver Hunt.
3654
3655         Overflowing expression is evaluated using operands arithmetic but then is used in
3656         context which expects an wider integer type. To avoid overflow at least one operand
3657         has to be representative of the wider type.
3658
3659         * WebProcess/soup/WebProcessSoup.cpp:
3660         (WebKit::getMemorySize): Added long long literal.
3661
3662 2014-08-18  Przemyslaw Kuczynski  <p.kuczynski@samsung.com>
3663
3664         Fix resource leak in unclosed file descriptor handles
3665         https://bugs.webkit.org/show_bug.cgi?id=135458
3666
3667         Reviewed by Oliver Hunt.
3668
3669         Leaving descriptor unclosed will cause the resources associated with the open
3670         file description never be freed (they are freed on closing the last descriptor
3671         refering to the underlying file).
3672
3673         * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
3674         (WebKit::StdoutDevNullRedirector::StdoutDevNullRedirector): Closed newStdout descriptor.
3675         (WebKit::StdoutDevNullRedirector::~StdoutDevNullRedirector): Closed m_savedStdout descriptor.
3676
3677 2014-08-18  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
3678
3679         [EFL] ewk_init() is sufficient to initialize EFL components
3680         https://bugs.webkit.org/show_bug.cgi?id=136036
3681
3682         Reviewed by Gyuyoung Kim.
3683
3684         Developers do not have to initialize EFL components as ewk_init()
3685         already does it.
3686
3687         * UIProcess/API/efl/ewk_intro.h:
3688
3689 2014-08-16  Pratik Solanki  <psolanki@apple.com>
3690
3691         Rename DiskCacheMonitor to NetworkDiskCacheMonitor
3692         https://bugs.webkit.org/show_bug.cgi?id=135897
3693
3694         Reviewed by Andreas Kling.
3695
3696         In preparation for moving DiskCacheMonitor code to WebCore in bug 135896, rename the WebKit2
3697         class to NetworkDiskCacheMonitor.
3698
3699         * NetworkProcess/mac/NetworkDiskCacheMonitor.h: Renamed from Source/WebKit2/NetworkProcess/mac/DiskCacheMonitor.h.
3700         (WebKit::NetworkDiskCacheMonitor::resourceRequest):
3701         * NetworkProcess/mac/NetworkDiskCacheMonitor.mm: Renamed from Source/WebKit2/NetworkProcess/mac/DiskCacheMonitor.mm.
3702         (WebKit::NetworkDiskCacheMonitor::monitorFileBackingStoreCreation):
3703         (WebKit::NetworkDiskCacheMonitor::NetworkDiskCacheMonitor):
3704         (WebKit::NetworkDiskCacheMonitor::messageSenderConnection):
3705         (WebKit::NetworkDiskCacheMonitor::messageSenderDestinationID):
3706         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
3707         (WebKit::NetworkResourceLoader::willCacheResponseAsync):
3708         * WebKit2.xcodeproj/project.pbxproj:
3709
3710 2014-08-16  Byungseon Shin  <sun.shin@lge.com>
3711
3712         [GTK] build fails with error: cannot allocate an object of abstract type 'WebKit::PageClientImpl'
3713         https://bugs.webkit.org/show_bug.cgi?id=136017 
3714
3715         Reviewed by Gyuyoung Kim.
3716
3717         * UIProcess/API/gtk/PageClientImpl.cpp:
3718         (WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):
3719         (WebKit::PageClientImpl::didFinishLoadForMainFrame):
3720         * UIProcess/API/gtk/PageClientImpl.h:
3721
3722 2014-08-15  Ryuan Choi  <ryuan.choi@samsung.com>
3723
3724         [EFL] Add ewk_intro.h to describe main page of doxygen
3725         https://bugs.webkit.org/show_bug.cgi?id=136013
3726
3727         Reviewed by Gyuyoung Kim.
3728
3729         * PlatformEfl.cmake:
3730         * UIProcess/API/efl/EWebKit2.h.in:
3731         * UIProcess/API/efl/ewk_intro.h: Added.
3732
3733 2014-08-15  Zalan Bujtas  <zalan@apple.com>
3734
3735         Do not use FloatRect::infiniteRect() to flag full repaints.
3736         https://bugs.webkit.org/show_bug.cgi?id=135900
3737
3738         Reviewed by Simon Fraser.
3739
3740         Converting FloatRect::infiniteRect() to IntRect leads to value overflow
3741         and we end up with invalid repaint rectangle. Use a boolean flag to indicate
3742         full repaint request.
3743
3744         Covered by existing tests.
3745
3746         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
3747         (WebKit::PlatformCALayerRemote::setNeedsDisplayInRect):
3748         (WebKit::PlatformCALayerRemote::setNeedsDisplay):
3749         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
3750         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
3751         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
3752         (WebKit::PlatformCALayerRemoteCustom::setNeedsDisplayInRect):
3753         (WebKit::PlatformCALayerRemoteCustom::setNeedsDisplay):
3754         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
3755         (WebKit::PlatformCALayerRemoteTiledBacking::setNeedsDisplayInRect):
3756         (WebKit::PlatformCALayerRemoteTiledBacking::setNeedsDisplay):
3757         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
3758
3759 2014-08-15  Alexey Proskuryakov  <ap@apple.com>
3760
3761         REGRESSION (r172660): WebKit2.TerminateTwice asserts
3762         https://bugs.webkit.org/show_bug.cgi?id=136012
3763
3764         * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::terminateProcess):
3765         Added bug number to a fixme.
3766
3767 2014-08-15  Ryuan Choi  <ryuan.choi@samsung.com>
3768
3769         Unreviewed build fix on the EFL port since r172635
3770
3771         * UIProcess/WebPageProxy.cpp: Guard removeNavigationGestureSnapshot with PLATFORM(MAC) macro.
3772         * UIProcess/WebPageProxy.h: Ditto.
3773         * UIProcess/efl/WebViewEfl.h: Added didFirstVisuallyNonEmptyLayoutForMainFrame and didFinishLoadForMainFrame as dummy.
3774
3775 2014-08-15  Alexey Proskuryakov  <ap@apple.com>
3776
3777         Improve page to process relationship tracking
3778         https://bugs.webkit.org/show_bug.cgi?id=135996
3779         <rdar://problem/16991213>
3780
3781         Reviewed by Sam Weinig.
3782
3783         * UIProcess/VisitedLinkProvider.cpp:
3784         (WebKit::VisitedLinkProvider::removeAll):
3785         (WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired):
3786         (WebKit::VisitedLinkProvider::sendTable):
3787         Added assertions for m_processes only having valid entries.
3788
3789         * UIProcess/WebPageProxy.cpp:
3790         (WebKit::WebPageProxy::reattachToWebProcess): When attaching to a new process,
3791         tell the old process that the page is not longer associated with it, avoiding
3792         a potential stale pointer.
3793         If re-attached to an existing process, make sure that we perform all the same
3794         registrations as after having launched a new process. This substantially improves
3795         the behavior when the number of open tabs is over process limit.
3796         (WebKit::WebPageProxy::reattachToWebProcessWithItem): Added ASSERT(!isValid())
3797         to avoid confusion. All other calls to reattachToWebProcess() have this as a
3798         runtime check, but reattachToWebProcessWithItem() is only called for valid pages.
3799         (WebKit::WebPageProxy::terminateProcess): Added an assertion with a FIXME for
3800         something that will need to be fixed another day.
3801
3802         * UIProcess/WebPageProxy.h: Removed an unimplemented function.
3803
3804         * UIProcess/WebProcessProxy.cpp:
3805         (WebKit::WebProcessProxy::addExistingWebPage): Added assertions for page map sanity.
3806         (WebKit::WebProcessProxy::removeWebPage): Added a check for page state being Terminated
3807         already. This avoids an assertion failure that happened under the new call to
3808         removeWebPage() in reattachToWebProcess(), as we are now calling it for terminated
3809         processes that are not in WebContext::m_processes any more.
3810         (WebKit::WebProcessProxy::didFinishLaunching): Added an assertion that page agrees
3811         about using this process.
3812
3813 2014-08-15  Gavin Barraclough  <barraclough@apple.com>
3814
3815         Fix plugin visibility check.
3816         https://bugs.webkit.org/show_bug.cgi?id=135991
3817
3818         D'oh, more unreviewed typo fix. :-(
3819
3820         * PluginProcess/PluginControllerProxy.cpp:
3821         (WebKit::PluginControllerProxy::visibilityDidChange):
3822         (WebKit::PluginControllerProxy::windowVisibilityChanged):
3823         (WebKit::PluginControllerProxy::updateVisibilityActivity):
3824         (WebKit::PluginControllerProxy::updateVisiblityActivity): Deleted.
3825         * PluginProcess/PluginControllerProxy.h:
3826
3827 2014-08-15  Wenson Hsieh  <wenson_hsieh@apple.com>
3828
3829         Implement snapping behavior for iOS
3830         https://bugs.webkit.org/show_bug.cgi?id=135769
3831
3832         Reviewed by Brent Fulgham.
3833
3834         Added support for snap points on iOS.
3835
3836         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
3837         (ArgumentCoder<ScrollingStateScrollingNode>::encode): Added snap offset encoding.
3838         (ArgumentCoder<ScrollingStateScrollingNode>::decode): Added snap offset decoding.
3839         * UIProcess/API/Cocoa/WKWebView.mm:
3840         (-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]): For mainframe scrolling, retargets the scroll destination to the appropriate snap point.
3841         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h: Added methods to extract relevant information for WKWebView from snap offsets in mainframe scrolling.
3842         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
3843         (-[WKOverflowScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset:]): For overflow scrolling, retargets the scroll destination to the appropriate snap point.
3844         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren): Sets the deceleration factor to FAST if snap points are active.
3845         * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
3846         (WebKit::RemoteScrollingCoordinatorProxy::adjustTargetContentOffsetForSnapping): Used by WKWebView for mainframe scrolling to retarget the scroll destination, if necessary.
3847         (WebKit::RemoteScrollingCoordinatorProxy::shouldSetScrollViewDecelerationRateFast): Used by WKWebView for mainframe scrolling to determine whether to set deceleration rate to the fast value.
3848         (WebKit::RemoteScrollingCoordinatorProxy::shouldSnapForMainFrameScrolling): Helper method.
3849         (WebKit::RemoteScrollingCoordinatorProxy::closestSnapOffsetForMainFrameScrolling): Helper method.
3850
3851 2014-08-15  Gavin Barraclough  <barraclough@apple.com>
3852
3853         Fix plugin visibility check.
3854         https://bugs.webkit.org/show_bug.cgi?id=135991
3855
3856         Unreviewed typo fix.
3857
3858         * PluginProcess/PluginControllerProxy.cpp:
3859         (WebKit::PluginControllerProxy::PluginControllerProxy):
3860         (WebKit::PluginControllerProxy::visibilityDidChange):
3861         (WebKit::PluginControllerProxy::windowVisibilityChanged):
3862         (WebKit::PluginControllerProxy::updateVisibilityActivity):
3863         * PluginProcess/PluginControllerProxy.h:
3864
3865 2014-08-15  Gavin Barraclough  <barraclough@apple.com>
3866
3867         Fix plugin visibility check.
3868         https://bugs.webkit.org/show_bug.cgi?id=135991
3869
3870         Reviewed by Andreas Kling.
3871
3872         We should only take a UserActivity if the plugin is in a visible window,
3873         and also is itself visible.
3874
3875         * PluginProcess/PluginControllerProxy.cpp:
3876         (WebKit::PluginControllerProxy::PluginControllerProxy):
3877             - initialize member state.
3878         (WebKit::PluginControllerProxy::visibilityDidChange):
3879         (WebKit::PluginControllerProxy::windowVisibilityChanged):
3880             - update member state & call updateVisibilityActivity.
3881         (WebKit::PluginControllerProxy::updateVisibilityActivity):
3882             - enable the UserActivity only if both visibilities are true.
3883         * PluginProcess/PluginControllerProxy.h:
3884             - added m_isVisible, m_isWindowVisible, updateVisibilityActivity.
3885
3886 2014-08-15  Enrica Casucci  <enrica@apple.com>
3887
3888         [Services with UI] Selections are incorrect when selecting three lines.
3889         https://bugs.webkit.org/show_bug.cgi?id=135989
3890         <rdar://problem/18032571>
3891
3892         Reviewed by Tim Horton.
3893
3894         The stitching algorithm did not handle correctly the case of selections
3895         over three lines if the middle line is composed of only one rectangle.
3896
3897         * WebProcess/WebPage/mac/ServicesOverlayController.mm:
3898         (WebKit::stitchRects):
3899
3900 2014-08-15  Tim Horton  <timothy_horton@apple.com>
3901
3902         Service overlays stay fixed when <iframe> scrolls
3903         https://bugs.webkit.org/show_bug.cgi?id=135959
3904         <rdar://problem/17957716>
3905
3906         Reviewed by Enrica Casucci.
3907
3908         * WebProcess/WebPage/mac/ServicesOverlayController.mm:
3909         (WebKit::ServicesOverlayController::highlightsAreEquivalent):
3910         Tiny correctness fix; highlights can only be equivalent if their
3911         types are equivalent as well.
3912
3913 2014-08-15  Gavin Barraclough  <barraclough@apple.com>
3914
3915         de-PLATFORM(COCOA) a couple of methods in plugin code
3916         https://bugs.webkit.org/show_bug.cgi?id=135987
3917
3918         Reviewed by Sam Weinig.
3919
3920         Pass through the visibility & focus on all platforms, to simplify & avoid
3921         any weird inconsistencies between platforms.
3922
3923         * PluginProcess/PluginControllerProxy.cpp:
3924         (WebKit::PluginControllerProxy::windowFocusChanged):
3925         (WebKit::PluginControllerProxy::windowVisibilityChanged):
3926         * PluginProcess/PluginControllerProxy.h:
3927         * PluginProcess/PluginControllerProxy.messages.in:
3928         * PluginProcess/mac/PluginControllerProxyMac.mm:
3929         (WebKit::PluginControllerProxy::windowFocusChanged): Deleted.
3930         (WebKit::PluginControllerProxy::windowVisibilityChanged): Deleted.
3931         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3932         (WebKit::NetscapePlugin::windowFocusChanged):
3933         (WebKit::NetscapePlugin::windowVisibilityChanged):
3934         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3935         * WebProcess/Plugins/Plugin.h:
3936         * WebProcess/Plugins/PluginProxy.cpp:
3937         (WebKit::PluginProxy::windowAndViewFramesChanged):
3938         * WebProcess/Plugins/PluginProxy.h:
3939         * WebProcess/Plugins/PluginView.cpp:
3940         (WebKit::PluginView::viewStateDidChange):
3941         (WebKit::PluginView::platformViewStateDidChange): Deleted.
3942         * WebProcess/Plugins/PluginView.h:
3943
3944 2014-08-15  Tim Horton  <timothy_horton@apple.com>
3945
3946         Service overlays stay fixed when <iframe> scrolls
3947         https://bugs.webkit.org/show_bug.cgi?id=135959
3948         <rdar://problem/17957716>
3949
3950         Reviewed by Enrica Casucci.
3951
3952         * WebProcess/WebPage/PageOverlay.cpp:
3953         (WebKit::PageOverlay::didScrollFrame):
3954         * WebProcess/WebPage/PageOverlay.h:
3955         (WebKit::PageOverlay::Client::didScrollFrame):
3956         * WebProcess/WebPage/PageOverlayController.cpp:
3957         (WebKit::PageOverlayController::didScrollFrame):
3958         Push didScrollFrame down to the overlays.
3959
3960         * WebProcess/WebPage/ServicesOverlayController.h:
3961         * WebProcess/WebPage/mac/ServicesOverlayController.mm:
3962         (WebKit::ServicesOverlayController::Highlight::createForSelection):
3963         Hold on to the selection's Range so we can use it to compare Highlights later.
3964
3965         (WebKit::ServicesOverlayController::Highlight::Highlight):
3966         (WebKit::ServicesOverlayController::Highlight::setDDHighlight):
3967         Factor the code to set up and paint the highlight out, so that we can
3968         set a new DDHighlightRef on a Highlight and the layer moves/reshapes/repaints.
3969
3970         (WebKit::ServicesOverlayController::buildPhoneNumberHighlights):
3971         (WebKit::ServicesOverlayController::buildSelectionHighlight):
3972         (WebKit::ServicesOverlayController::replaceHighlightsOfTypePreservingEquivalentHighlights):
3973         Factor replaceHighlightsOfTypePreservingEquivalentHighlights out
3974         so that we can use it for buildSelectionHighlight as well.
3975
3976         Steal the DDHighlightRef from the new Highlight when re-using an old one
3977         so that the newly computed rects are used instead of the old ones.
3978
3979         (WebKit::ServicesOverlayController::highlightsAreEquivalent):
3980         We will always have a Range now, so we can always check equivalence using it.
3981
3982         (WebKit::ServicesOverlayController::didScrollFrame):
3983         Rebuild all highlights upon subframe scroll, as they might have moved.
3984         We could optimize this in the future, but for now it's cheap enough
3985         and rare enough that it doesn't matter.
3986
3987 2014-08-15  Tim Horton  <timothy_horton@apple.com>
3988
3989         REGRESSION (WebKit2 Gestures): White flash when swiping back to cnn.com's homepage from an article
3990         https://bugs.webkit.org/show_bug.cgi?id=135951
3991         <rdar://problem/18006149>
3992
3993         Reviewed by Simon Fraser.
3994
3995         Wait for (the first visually non-empty layout AND the render tree size threshold to be hit),
3996         OR didFinishLoadForFrame, whichever comes first. Once we've done the first visually non-empty layout,
3997         we'll start the watchdog and tear down the snapshot in three seconds no matter what.
3998         Also, force a repaint so we can asynchronously wait for the Web Process to paint and return to us
3999         before removing the snapshot, which improves our chances that something is actually on the screen.
4000
4001         * UIProcess/API/mac/WKView.mm:
4002         (-[WKView _didFirstVisuallyNonEmptyLayoutForMainFrame]):
4003         (-[WKView _didFinishLoadForMainFrame]):
4004         (-[WKView _removeNavigationGestureSnapshot]):
4005         * UIProcess/API/mac/WKViewInternal.h:
4006         * UIProcess/PageClient.h:
4007         * UIProcess/WebPageProxy.cpp:
4008         (WebKit::WebPageProxy::didFinishLoadForFrame):
4009         (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
4010         (WebKit::WebPageProxy::removeNavigationGestureSnapshot):
4011         * UIProcess/WebPageProxy.h:
4012         * UIProcess/ios/PageClientImplIOS.h:
4013         * UIProcess/ios/PageClientImplIOS.mm:
4014         (WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):
4015         (WebKit::PageClientImpl::didFinishLoadForMainFrame):
4016         * UIProcess/mac/PageClientImpl.h:
4017         * UIProcess/mac/PageClientImpl.mm:
4018         (WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):
4019         (WebKit::PageClientImpl::didFinishLoadForMainFrame):
4020         (WebKit::PageClientImpl::removeNavigationGestureSnapshot):
4021         Plumb didFirstVisuallyNonEmptyLayoutForMainFrame and didFinishLoadForMainFrame
4022         through to ViewGestureController from WebPageProxy via the PageClient, etc.
4023
4024         Ditto for removeNavigationGestureSnapshot, though it is called from a
4025         VoidCallback in ViewGestureController instead of from WebFrameLoaderClient and friends.
4026
4027         * UIProcess/mac/ViewGestureController.h:
4028         * UIProcess/mac/ViewGestureControllerMac.mm:
4029         (WebKit::ViewGestureController::ViewGestureController):
4030         (WebKit::ViewGestureController::endSwipeGesture):
4031         When finishing a swipe, we want to wait for both the first visually non-empty layout
4032         and the render tree size threshold being hit.
4033
4034         (WebKit::ViewGestureController::didHitRenderTreeSizeThreshold):
4035         (WebKit::ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame):
4036         When both of these things have happened, remove the swipe snapshot (after forcing a repaint).
4037         For didFirstVisuallyNonEmptyLayoutForMainFrame, we will also start a watchdog
4038         ensuring that we remove the snapshot in three seconds.
4039
4040         (WebKit::ViewGestureController::didFinishLoadForMainFrame):
4041         When didFinishLoadForMainFrame happens, remove the swipe snapshot (after forcing a repaint).
4042
4043         (WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired):
4044         If the watchdog timer fires, remove the swipe snapshot (after forcing a repaint).
4045
4046         (WebKit::ViewGestureController::removeSwipeSnapshotAfterRepaint):
4047         Force a repaint and wait for the async callback before removing the snapshot.
4048         It is safe to hold on to the WebPageProxy here because it will always
4049         call all of its callbacks before it is destroyed.
4050         Avoid enqueuing multiple force-repaints.
4051
4052         (WebKit::ViewGestureController::removeSwipeSnapshot):
4053
4054 2014-08-15  Gavin Barraclough