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