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