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