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