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