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