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