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