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