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