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