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