1 2014-09-08 Tim Horton <timothy_horton@apple.com>
3 Try to fix the build after r173383, part 3.
5 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
7 2014-09-08 Dan Bernstein <mitz@apple.com>
11 * Platform/IPC/Connection.h:
13 2014-09-06 Sam Weinig <sam@webkit.org>
15 XPCPtr should be converted into an all purpose smart pointer for os_objects
16 https://bugs.webkit.org/show_bug.cgi?id=136602
18 Reviewed by Darin Adler.
20 * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm:
21 (DatabaseServiceInitializer):
22 * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
23 (WebKit::NetworkServiceInitializerDelegate::NetworkServiceInitializerDelegate):
24 (NetworkServiceInitializer):
25 * Platform/IPC/Connection.h:
26 (IPC::Connection::Identifier::Identifier):
27 * Platform/IPC/mac/ConnectionMac.mm:
28 (IPC::ConnectionTerminationWatchdog::createConnectionTerminationWatchdog):
29 (IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog):
30 * Platform/IPC/mac/XPCPtr.h: Removed.
31 * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
32 (WebKit::PluginServiceInitializerDelegate::PluginServiceInitializerDelegate):
33 (PluginServiceInitializer):
34 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
35 (WebKit::XPCServiceInitializerDelegate::XPCServiceInitializerDelegate):
36 (WebKit::XPCServiceInitializer):
37 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
38 (WebKit::XPCServiceInitializerDelegate::checkEntitlements):
39 (WebKit::XPCServiceInitializerDelegate::hasEntitlement):
40 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
41 (WebKit::XPCServiceEventHandler):
42 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
43 (WebKit::XPCServiceEventHandler):
44 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
45 (WebKit::connectToService):
46 (WebKit::connectToReExecService):
47 * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
48 (WebContentServiceInitializer):
49 Update after the rename of XPCPtr to OSObjectPtr.
51 2014-09-06 Darin Adler <darin@apple.com>
53 Make updates suggested by new version of Xcode
54 https://bugs.webkit.org/show_bug.cgi?id=136603
56 Reviewed by Mark Rowe.
58 * Configurations/Base.xcconfig: Added CLANG_WARN_UNREACHABLE_CODE, COMBINE_HIDPI_IMAGES,
59 and ENABLE_STRICT_OBJC_MSGSEND as suggested by the Xcode upgrade check.
61 * PluginProcess/mac/PluginProcessMac.mm:
62 (WebKit::initializeCocoaOverrides): Changed NSConcreteTask_launch to use the same technique
63 as the other functions in this file, doing the type casting right at the call to
64 method_setImplementation so the global has a suitable type for making a function call,
65 rather than relying on the abilty to call through a type without a specific argument list.
67 * UIProcess/Plugins/PluginInfoStore.cpp:
68 (WebKit::pathExtension): Use size_t for the result of String::reverseFind rather than
69 converting it to an int. Also don't rely on the fact that WTF's notFound becomes -1 when
70 cast from size_t to int.
72 * WebKit2.xcodeproj/project.pbxproj: Let Xcode delete some orphaned items, and updated
75 2014-09-06 Brian J. Burg <burg@cs.washington.edu>
77 Web Inspector: convert DockSide to an enum class
78 https://bugs.webkit.org/show_bug.cgi?id=136601
80 Reviewed by Timothy Hatcher.
82 * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
83 (WebKit::WebInspectorFrontendClient::attachWindow):
84 * WebProcess/WebPage/WebInspector.cpp:
85 (WebKit::WebInspector::attachedBottom):
86 (WebKit::WebInspector::attachedRight):
87 (WebKit::WebInspector::detached):
89 2014-09-06 Antti Koivisto <antti@apple.com>
91 Serialize ResourceResponses using WebKit types
92 https://bugs.webkit.org/show_bug.cgi?id=136545
94 Reviewed by Alexey Proskuryakov.
96 Remove the WK2 serialization code for responses. It moves to the types itself in WebCore where it is
97 close to the data being serialized and less likely to get out of sync.
99 * Shared/WebCoreArgumentCoders.cpp:
100 (IPC::ArgumentCoder<ResourceResponse>::encode): Deleted.
101 (IPC::ArgumentCoder<ResourceResponse>::decode): Deleted.
102 * Shared/WebCoreArgumentCoders.h:
103 * Shared/mac/WebCoreArgumentCodersMac.mm:
104 (IPC::ArgumentCoder<ResourceResponse>::encodePlatformData): Deleted.
105 (IPC::ArgumentCoder<ResourceResponse>::decodePlatformData): Deleted.
107 2014-09-06 Ryuan Choi <ryuan.choi@gmail.com>
109 [EFL] Drop evas object cursor support
110 https://bugs.webkit.org/show_bug.cgi?id=136324
112 Reviewed by Gyuyoung Kim.
114 Removed evas object cursor because there are some bugs.
115 ewebkit will only support ecore_x_cursor because ewebkit is available with X, now.
117 * UIProcess/API/efl/EwkView.cpp:
118 (EwkViewEventHandler<EVAS_CALLBACK_MOUSE_IN>::handleEvent):
120 (EwkView::updateCursor): Simplifies not to use evas object cursor.
121 (EwkView::setCursor): Ditto.
122 * UIProcess/API/efl/EwkView.h:
124 2014-09-05 Commit Queue <commit-queue@webkit.org>
126 Unreviewed, rolling out r173340 and r173342.
127 https://bugs.webkit.org/show_bug.cgi?id=136596
129 Broke many tests (Requested by ap on #webkit).
133 "Remove PLATFORM(IOS) from WebCore/editing (Part 3)."
134 https://bugs.webkit.org/show_bug.cgi?id=136474
135 http://trac.webkit.org/changeset/173340
137 "Build fix after r173340."
138 http://trac.webkit.org/changeset/173342
140 2014-09-05 Joseph Pecoraro <pecoraro@apple.com>
142 Use WTFString::split(char) in more places
143 https://bugs.webkit.org/show_bug.cgi?id=136543
145 Reviewed by Sam Weinig.
147 * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
148 (WebKit::PluginVersion::parse):
149 * UIProcess/gtk/WebContextGtk.cpp:
150 (WebKit::initInspectorServer):
151 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
152 (WebKit::isTransparentSilverlightBackgroundValue):
154 2014-09-05 Enrica Casucci <enrica@apple.com>
156 Remove PLATFORM(IOS) from WebCore/editing (Part 3).
157 https://bugs.webkit.org/show_bug.cgi?id=136474
159 Reviewed by Benjamin Poulain.
161 This patch removes the use of PLATFORM(IOS) from TextAffinity.h
162 and removes the assumption that EAffinity values match NSSelectionAffinity
163 values. It also removes the includes in TextAffinity.h, creating the need to
164 include explicitly the files when necessary. It also removes the unnecessary
165 use of platform specific types, replacing them with WebCore types.
167 * WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
168 * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
169 (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
171 2014-09-05 David Kilzer <ddkilzer@apple.com>
173 JavaScriptCore should build with newer clang
174 <http://webkit.org/b/136002>
175 <rdar://problem/18020616>
177 Reviewed by Geoffrey Garen.
179 * Shared/API/c/WKString.cpp:
180 (WKStringCreateWithJSString): Add NULL check to prevent
181 WebKitTestRunner crashes that relied on the previous |this|
182 behavior where NULL values were allowed.
184 2014-09-05 Beth Dakin <bdakin@apple.com>
186 ScrollablArea::handleWheelEvent() should return early if the ScrollableArea is not
188 https://bugs.webkit.org/show_bug.cgi?id=136558
190 Reviewed by Simon Fraser.
192 New ScrollableArea virtual function.
193 * WebProcess/Plugins/PDF/PDFPlugin.h:
195 2014-09-04 Gyuyoung Kim <gyuyoung.kim@samsung.com>
197 Unreviewed, speculative build fix on GTK port since r173305.
199 * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
200 (webkitURISchemeRequestReadCallback):
202 2014-09-03 Andy Estes <aestes@apple.com>
204 [Cocoa] Some WebKitLegacy headers migrated from WebCore incorrectly contain WEBCORE_EXPORT
205 https://bugs.webkit.org/show_bug.cgi?id=136521
207 Reviewed by Anders Carlsson.
209 * config.h: Included <WebCore/PlatformExportMacros.h> instead of defining WEBCORE_EXPORT.
211 2014-09-04 Maciej Stachowiak <mjs@apple.com>
213 Remove WebCoreSystemInterface glue for otherwise unused WKSI calls
214 https://bugs.webkit.org/show_bug.cgi?id=136527
216 Reviewed by Alexey Proskuryakov.
218 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
219 (InitWebCoreSystemInterface):
221 2014-09-04 Antti Koivisto <antti@apple.com>
223 Remove ResourceResponse::m_suggestedFilename
224 https://bugs.webkit.org/show_bug.cgi?id=136534
226 Reviewed by Alexey Proskuryakov.
228 * Shared/WebCoreArgumentCoders.cpp:
229 (IPC::ArgumentCoder<ResourceResponse>::encode):
230 (IPC::ArgumentCoder<ResourceResponse>::decode):
232 No more m_suggestedFilename.
234 * WebProcess/Plugins/PDF/PDFPlugin.mm:
235 (WebKit::PDFPlugin::addArchiveResource):
237 Fake the suggested filename by using the Content-Disposition header.
239 2014-09-04 Eva Balazsfalvi <evab.u-szeged@partner.samsung.com>
241 Remove CSS_FILTERS flag
242 https://bugs.webkit.org/show_bug.cgi?id=136529
244 Reviewed by Dirk Schulze.
246 * Configurations/FeatureDefines.xcconfig:
247 * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
248 (IPC::ArgumentCoder<WebCore::FilterOperations>::decode):
249 (IPC::ArgumentCoder<GraphicsLayerAnimation>::encode):
250 (IPC::ArgumentCoder<GraphicsLayerAnimation>::decode):
251 (IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::encode):
252 (IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::decode):
253 * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h:
254 * Shared/WebCoreArgumentCoders.cpp:
255 * Shared/WebCoreArgumentCoders.h:
256 * WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
257 (WebKit::GraphicsLayerCARemote::filtersCanBeComposited):
258 * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
259 * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
260 * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
261 (WebKit::PlatformCAAnimationRemote::setFromValue):
262 (WebKit::PlatformCAAnimationRemote::setToValue):
263 (WebKit::PlatformCAAnimationRemote::setValues):
264 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
265 (WebKit::PlatformCALayerRemote::updateClonedLayerProperties):
266 (WebKit::PlatformCALayerRemote::filtersCanBeComposited):
267 * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
269 2014-09-04 Commit Queue <commit-queue@webkit.org>
271 Unreviewed, rolling out r173245.
272 https://bugs.webkit.org/show_bug.cgi?id=136533
274 Broke JSC tests. (Requested by ddkilzer on #webkit).
278 "JavaScriptCore should build with newer clang"
279 https://bugs.webkit.org/show_bug.cgi?id=136002
280 http://trac.webkit.org/changeset/173245
282 2014-09-04 Carlos Garcia Campos <cgarcia@igalia.com>
284 Initialize m_usesNetworkProcess earlier in WebProcess::initializeWebProcess()
285 https://bugs.webkit.org/show_bug.cgi?id=136478
287 Reviewed by Alexey Proskuryakov.
289 The soup network backend uses WebProcess::usesNetworkProcess()
290 from WebProcess::platformSetCacheModel() and
291 WebProcess::platformInitializeWebProcess(), both called before the
292 m_usesNetworkProcess member has been initialized.
294 * WebProcess/WebProcess.cpp:
295 (WebKit::WebProcess::initializeWebProcess): Move the
296 m_usesNetworkProcess initialization at the beginning right before
297 calling platformInitializeWebProcess().
298 * WebProcess/cocoa/WebProcessCocoa.mm:
299 (WebKit::WebProcess::platformSetCacheModel): Remove the early
300 return when using the network process, since this was dead code
301 before this change, and not really needed now that
302 usesNetworkProcess() will return true.
303 (WebKit::WebProcess::platformInitializeWebProcess): Remove comment
304 that is not accurate since r171156.
306 2014-09-03 Michael Catanzaro <mcatanzaro@igalia.com>
308 [SOUP] Race condition when downloading a file due to the intermediate temporary file
309 https://bugs.webkit.org/show_bug.cgi?id=136423
311 Reviewed by Carlos Garcia Campos.
313 * Shared/Downloads/soup/DownloadSoup.cpp:
314 (WebKit::DownloadClient::DownloadClient): Replace m_destinationURI with
315 m_destinationFile and add m_createdDestination.
316 (WebKit::DownloadClient::deleteFilesIfNeeded): Added.
317 (WebKit::DownloadClient::downloadFailed): Call deleteFilesIfNeeded.
318 (WebKit::DownloadClient::didReceiveResponse): Attempt to create the
319 destination file before the intermediate file. Fail here if the file
320 exists and overwrite is not allowed, so we don't erroneously fire the
321 didCreateDestination event or waste time downloading the file when we
322 know the download will fail.
323 (WebKit::DownloadClient::didFinishLoading): Unconditionally overwrite
324 the empty destination file.
325 (WebKit::DownloadClient::cancel): Call deleteFilesIfNeeded.
326 (WebKit::DownloadClient::deleteIntermediateFileInNeeded): Deleted.
328 2014-09-03 David Kilzer <ddkilzer@apple.com>
330 JavaScriptCore should build with newer clang
331 <http://webkit.org/b/136002>
332 <rdar://problem/18020616>
334 Reviewed by Geoffrey Garen.
336 * Shared/API/c/WKString.cpp:
337 (WKStringCreateWithJSString): Add NULL check to prevent
338 WebKitTestRunner crashes that relied on the previous |this|
339 behavior where NULL values were allowed.
341 2014-09-03 Enrica Casucci <enrica@apple.com>
343 Remove PLATFORM(IOS) from WebCore/editing (Part 1).
344 https://bugs.webkit.org/show_bug.cgi?id=136474
346 Reviewed by Tim Horton.
348 * UIProcess/WebEditCommandProxy.cpp:
349 (WebKit::WebEditCommandProxy::nameForEditAction):
351 2014-09-03 Yongjun Zhang <yongjun_zhang@apple.com>
353 https://bugs.webkit.org/show_bug.cgi?id=136395
354 Need a way to get userAgent from WKWebView.
356 Add _userAgent property to return user agent string from WKWebView.
358 Reviewed by Anders Carlsson.
360 * UIProcess/API/Cocoa/WKWebView.mm:
361 (-[WKWebView _userAgent]):
362 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
364 2014-09-02 Maciej Stachowiak <mjs@apple.com>
366 Clean up naming for and slightly refactor legacy video fullscreen support
367 https://bugs.webkit.org/show_bug.cgi?id=136446
369 Reviewed by Jer Noble.
372 supportsFullscreenForNode(Node*) --> supportsVideoFullscreen()
373 enterFullscreenForNode(Node*) --> enterVideoFullscreenForVideoElement(HTMLVideoElement*)
374 exitFullscreenForNode(Node*) --> exitVideoFullscreen()
376 The old versions had unnecessary parameters, did not clearly distinguish their purpose
377 from enterFullscreenForElement and friends, and wrongly claimed generality to all Nodes.
378 Also changed many other places to use HTMLVideoElement* instead of Node* or
379 HTMLMediaElement* when they were in fact only used for video elements and would only
382 Legacy video fullscreen in WebKit2 is only supported on iOS (for other ports that support
385 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
386 (WebKit::WebChromeClient::supportsVideoFullscreen): Adjust for renames as
388 (WebKit::WebChromeClient::enterVideoFullscreenForVideoElement): ditto
389 (WebKit::WebChromeClient::exitVideoFullscreen): ditto
390 * WebProcess/WebCoreSupport/WebChromeClient.h:
391 * WebProcess/ios/WebVideoFullscreenManager.h:
392 * WebProcess/ios/WebVideoFullscreenManager.mm:
393 (WebKit::clientRectForElement): No need to be generic to node.
394 (WebKit::WebVideoFullscreenManager::supportsVideoFullscreen): Adjust for the
395 main refactoring. Also change m_node to m_videoElement with appropriate type change.
396 (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement): ditto
397 (WebKit::WebVideoFullscreenManager::exitVideoFullscreen): ditto
398 (WebKit::WebVideoFullscreenManager::didEnterFullscreen): ditto
399 (WebKit::WebVideoFullscreenManager::didExitFullscreen): ditto
400 (WebKit::WebVideoFullscreenManager::didCleanupFullscreen): ditto
402 2014-09-03 Dan Bernstein <mitz@apple.com>
404 Get rid of HIGH_DPI_CANVAS leftovers
405 https://bugs.webkit.org/show_bug.cgi?id=136491
407 Reviewed by Benjamin Poulain.
409 * Configurations/FeatureDefines.xcconfig: Removed definition of ENABLE_HIGH_DPI_CANVAS
410 and removed it from FEATURE_DEFINES.
412 2014-09-02 Yongjun Zhang <yongjun_zhang@apple.com>
414 Pass the resource identifier in willSendRequest callback.
415 https://bugs.webkit.org/show_bug.cgi?id=136325
417 Reviewed by Dan Bernstein.
419 Add two new delegate methods webProcessPlugInBrowserContextController:frame:willSendRequestForResource:request:redirectResponse:
420 and webProcessPlugInBrowserContextController:frame:didInitiateLoadForResource:request:pageIsProvisionallyLoading:. We will remove
421 the old willSendRequest and didInitiateLoadForResource when clients adopt the new methods.
423 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
424 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
425 (willSendRequestForFrame):
426 (didInitiateLoadForResource):
428 2014-09-02 Philippe Normand <pnormand@igalia.com>
430 Unreviewed, GTK build fix after r173163.
432 * UIProcess/API/gtk/PageClientImpl.cpp:
433 (WebKit::PageClientImpl::createDrawingAreaProxy):
434 * UIProcess/DrawingAreaProxyImpl.cpp:
435 (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
436 (WebKit::DrawingAreaProxyImpl::update):
437 (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):
438 (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
439 (WebKit::DrawingAreaProxyImpl::sendUpdateBackingStoreState):
440 (WebKit::DrawingAreaProxyImpl::waitForAndDispatchDidUpdateBackingStoreState):
441 (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
442 (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
443 (WebKit::DrawingAreaProxyImpl::updateAcceleratedCompositingMode):
444 * UIProcess/DrawingAreaProxyImpl.h:
446 2014-09-01 Timothy Horton <timothy_horton@apple.com>
450 * UIProcess/ios/WKContentView.mm:
451 (-[WKContentView _createDrawingAreaProxy]):
454 2014-09-01 Ryuan Choi <ryuan.choi@gmail.com>
456 Build break on the EFL port since r173163
457 https://bugs.webkit.org/show_bug.cgi?id=136443
459 Unreviewed build fix.
461 * UIProcess/BackingStore.cpp:
462 (WebKit::BackingStore::BackingStore):
463 * UIProcess/BackingStore.h:
464 * UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp:
465 (WebKit::CoordinatedDrawingAreaProxy::CoordinatedDrawingAreaProxy):
466 (WebKit::CoordinatedDrawingAreaProxy::updateViewport):
467 (WebKit::CoordinatedDrawingAreaProxy::contentsRect):
468 (WebKit::CoordinatedDrawingAreaProxy::update):
469 (WebKit::CoordinatedDrawingAreaProxy::didUpdateBackingStoreState):
470 (WebKit::CoordinatedDrawingAreaProxy::incorporateUpdate):
471 (WebKit::CoordinatedDrawingAreaProxy::sendUpdateBackingStoreState):
472 (WebKit::CoordinatedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState):
473 (WebKit::CoordinatedDrawingAreaProxy::enterAcceleratedCompositingMode):
474 (WebKit::CoordinatedDrawingAreaProxy::exitAcceleratedCompositingMode):
475 (WebKit::CoordinatedDrawingAreaProxy::updateAcceleratedCompositingMode):
476 * UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.h:
477 (WebKit::CoordinatedDrawingAreaProxy::page):
478 * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
479 (WebKit::CoordinatedLayerTreeHostProxy::CoordinatedLayerTreeHostProxy):
480 (WebKit::CoordinatedLayerTreeHostProxy::~CoordinatedLayerTreeHostProxy):
481 (WebKit::CoordinatedLayerTreeHostProxy::commitCoordinatedGraphicsState):
482 (WebKit::CoordinatedLayerTreeHostProxy::setVisibleContentsRect):
483 (WebKit::CoordinatedLayerTreeHostProxy::renderNextFrame):
484 (WebKit::CoordinatedLayerTreeHostProxy::purgeBackingStores):
485 (WebKit::CoordinatedLayerTreeHostProxy::commitScrollOffset):
486 * UIProcess/CoordinatedGraphics/WebView.cpp:
487 (WebKit::WebView::createDrawingAreaProxy):
488 * UIProcess/cairo/BackingStoreCairo.cpp:
489 (WebKit::BackingStore::incorporateUpdate):
491 2014-09-01 Tim Horton <timothy_horton@apple.com>
493 Remove two unused WebKit2 PDF-related preferences
494 https://bugs.webkit.org/show_bug.cgi?id=136441
496 Reviewed by Dan Bernstein.
498 * Shared/WebPreferencesDefinitions.h:
499 Move the macro arguments comment down near where the macros are being used.
500 No need to check both PLATFORM(IOS) and PLATFORM(IOS_SIMULATOR); the second can't be true without the first.
501 These two PDF preferences are long-unused; if we bring back their functionality,
502 we'll bring back the preferences.
504 2014-09-01 Tim Horton <timothy_horton@apple.com>
506 DrawingAreaProxy and friends can hold on to WebPageProxy by reference
507 https://bugs.webkit.org/show_bug.cgi?id=136440
509 Reviewed by Dan Bernstein.
511 * UIProcess/API/mac/WKView.mm:
512 (-[WKView _createDrawingAreaProxy]):
513 * UIProcess/DrawingAreaProxy.cpp:
514 (WebKit::DrawingAreaProxy::DrawingAreaProxy):
515 (WebKit::DrawingAreaProxy::~DrawingAreaProxy):
516 (WebKit::DrawingAreaProxy::setExposedRect):
517 (WebKit::DrawingAreaProxy::exposedRectChangedTimerFired):
518 * UIProcess/DrawingAreaProxy.h:
519 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
520 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
521 (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
522 (WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy):
523 (WebKit::RemoteLayerTreeDrawingAreaProxy::sizeDidChange):
524 (WebKit::RemoteLayerTreeDrawingAreaProxy::deviceScaleFactorDidChange):
525 (WebKit::RemoteLayerTreeDrawingAreaProxy::scaledExposedRect):
526 (WebKit::RemoteLayerTreeDrawingAreaProxy::sendUpdateGeometry):
527 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
528 (WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidStart):
529 (WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidEnd):
530 (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
531 (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorScale):
532 (WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
533 (WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
534 (WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateViewState):
535 (WebKit::RemoteLayerTreeDrawingAreaProxy::dispatchAfterEnsuringDrawing):
536 * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
537 * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
538 (WebKit::TiledCoreAnimationDrawingAreaProxy::TiledCoreAnimationDrawingAreaProxy):
539 (WebKit::TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange):
540 (WebKit::TiledCoreAnimationDrawingAreaProxy::sizeDidChange):
541 (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
542 (WebKit::TiledCoreAnimationDrawingAreaProxy::colorSpaceDidChange):
543 (WebKit::TiledCoreAnimationDrawingAreaProxy::minimumLayoutSizeDidChange):
544 (WebKit::TiledCoreAnimationDrawingAreaProxy::enterAcceleratedCompositingMode):
545 (WebKit::TiledCoreAnimationDrawingAreaProxy::updateAcceleratedCompositingMode):
546 (WebKit::TiledCoreAnimationDrawingAreaProxy::didUpdateGeometry):
547 (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateViewState):
548 (WebKit::TiledCoreAnimationDrawingAreaProxy::intrinsicContentSizeDidChange):
549 (WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
550 (WebKit::TiledCoreAnimationDrawingAreaProxy::adjustTransientZoom):
551 (WebKit::TiledCoreAnimationDrawingAreaProxy::commitTransientZoom):
553 2014-09-01 Gyuyoung Kim <gyuyoung.kim@samsung.com>
555 [CMAKE] Build warning by INTERFACE_LINK_LIBRARIES
556 https://bugs.webkit.org/show_bug.cgi?id=136194
558 Reviewed by Csaba Osztrogonác.
560 Set the LINK_INTERFACE_LIBRARIES target property on the top level CMakeLists.txt.
564 2014-09-01 Michael Catanzaro <mcatanzaro@igalia.com>
566 [SOUP] WebKitDownload cannot overwrite existing file
567 https://bugs.webkit.org/show_bug.cgi?id=136322
569 Reviewed by Carlos Garcia Campos.
571 * Shared/Downloads/soup/DownloadSoup.cpp:
572 (WebKit::DownloadClient::didReceiveResponse): pass a member variable
573 to Download::decideDestinationWithSuggestedFilename instead of a
574 temporary bool, so we can use the result in didFinishLoading.
575 (WebKit::DownloadClient::didFinishLoading): overwrite the destination
576 if Download::decideDestinationWithSuggestedFilename determined we
579 2014-08-31 Tim Horton <timothy_horton@apple.com>
581 Occasional crashes (null deref) under ViewGestureController::endMagnificationGesture
582 https://bugs.webkit.org/show_bug.cgi?id=136409
583 <rdar://problem/18104748>
585 Reviewed by Dan Bernstein.
587 * UIProcess/mac/ViewGestureControllerMac.mm:
588 (WebKit::ViewGestureController::endMagnificationGesture):
589 Null-check DrawingArea.
591 2014-08-26 Maciej Stachowiak <mjs@apple.com>
593 Use RetainPtr::autorelease in some places where it seems appropriate
594 https://bugs.webkit.org/show_bug.cgi?id=136280
596 Reviewed by Darin Adler.
598 * Shared/Cocoa/WKNSURLExtras.mm:
599 (urlWithWTFString): Use autorelease() instead of CFBridgingRelease(leakRef())
601 2014-08-29 Tim Horton <timothy_horton@apple.com>
603 More occasional crashes in ServicesController::resfreshExistingServices
604 https://bugs.webkit.org/show_bug.cgi?id=136387
605 <rdar://problem/18167200>
607 Reviewed by Dan Bernstein.
609 * UIProcess/mac/ServicesController.mm:
610 (WebKit::ServicesController::ServicesController):
611 Speculative fix; if this block is called synchronously, we'll end up
612 calling back into ::shared() before the NeverDestroyed is initialized,
613 ending up with two ServicesControllers.
615 2014-08-29 Alexey Proskuryakov <ap@apple.com>
617 Crashes in IPC code under VisitedLinkProvider::pendingVisitedLinksTimerFired
618 https://bugs.webkit.org/show_bug.cgi?id=136384
619 rdar://problem/16991213
621 Reviewed by Sam Weinig.
623 VisitedLinkProvider process tracking relied on a combination of WebPageProxy process
624 lifecycle notifications and checking process state. As evidenced by multiple FIXMEs,
625 these are not yet as reliable as they should be.
627 Changed to unregister a process when it closes, not when it no longer has any pages
628 using the particular VisitedLinkProvider or WebUserContentControllerProxy. This
629 is a deoptimization that should not matter in practice.
631 * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
632 (WebKit::WebUserContentControllerProxy::~WebUserContentControllerProxy):
633 (WebKit::WebUserContentControllerProxy::removeProcess):
634 (WebKit::WebUserContentControllerProxy::addUserScript):
635 (WebKit::WebUserContentControllerProxy::removeAllUserScripts):
636 (WebKit::WebUserContentControllerProxy::addUserStyleSheet):
637 (WebKit::WebUserContentControllerProxy::removeAllUserStyleSheets):
638 (WebKit::WebUserContentControllerProxy::addUserScriptMessageHandler):
639 (WebKit::WebUserContentControllerProxy::removeUserMessageHandlerForName):
640 * UIProcess/UserContent/WebUserContentControllerProxy.h:
641 * UIProcess/VisitedLinkProvider.cpp:
642 (WebKit::VisitedLinkProvider::~VisitedLinkProvider):
643 (WebKit::VisitedLinkProvider::removeProcess):
644 (WebKit::VisitedLinkProvider::removeAll):
645 (WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired):
646 (WebKit::VisitedLinkProvider::resizeTable):
647 * UIProcess/VisitedLinkProvider.h:
648 * UIProcess/WebPageProxy.cpp:
649 (WebKit::WebPageProxy::WebPageProxy):
650 (WebKit::WebPageProxy::close):
651 (WebKit::WebPageProxy::processDidFinishLaunching):
652 (WebKit::WebPageProxy::resetStateAfterProcessExited):
653 * UIProcess/WebProcessProxy.cpp:
654 (WebKit::WebProcessProxy::disconnect):
655 (WebKit::WebProcessProxy::addVisitedLinkProvider):
656 (WebKit::WebProcessProxy::addWebUserContentControllerProxy):
657 (WebKit::WebProcessProxy::didDestroyVisitedLinkProvider):
658 (WebKit::WebProcessProxy::didDestroyWebUserContentControllerProxy):
659 * UIProcess/WebProcessProxy.h:
661 2014-08-29 Alexey Proskuryakov <ap@apple.com>
663 WebPageProxy::close() is a no-op for terminated processes
664 https://bugs.webkit.org/show_bug.cgi?id=136378
665 Related to <rdar://problem/16991213> and to <rdar://problem/17095600>
667 Reviewed by Brady Eidson.
669 Also fixes issues that got uncovered after making close() work.
671 * UIProcess/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::invalidate): Don't
672 close the page, because it makes no sense, and causes an assertion now. Previosly,
673 this was OK because the page was invalid already, and close() was a no-op.
675 * UIProcess/WebPageProxy.cpp:
676 (WebKit::WebPageProxy::~WebPageProxy): Added some assertions to catch invalidation
678 (WebKit::WebPageProxy::reattachToWebProcess): Make it an invariant that a page's
679 process always has a message receiver for it, until close() removes it.
680 (WebKit::WebPageProxy::close): Make this function work for all open pages, whether
681 they have a page or not.
682 (WebKit::WebPageProxy::processDidFinishLaunching): Added an asserion that process
683 agrees about its state.
684 (WebKit::WebPageProxy::resetStateAfterProcessExited): Don't remove a message receiver,
685 we now only do this in reattach or close.
687 2014-08-29 Antti Koivisto <antti@apple.com>
689 Remove NetworkResourceLoaderClient and subclasses.
690 https://bugs.webkit.org/show_bug.cgi?id=136370
692 Reviewed by Darin Adler.
694 This code is needlessly abstract. Move what logic these classes have to NetworkResourceLoader.
696 * NetworkProcess/AsynchronousNetworkLoaderClient.cpp: Removed.
697 * NetworkProcess/AsynchronousNetworkLoaderClient.h: Removed.
698 * NetworkProcess/NetworkLoaderClient.h: Removed.
699 * NetworkProcess/NetworkResourceLoader.cpp:
700 (WebKit::NetworkResourceLoader::NetworkResourceLoader):
701 (WebKit::NetworkResourceLoader::~NetworkResourceLoader):
702 (WebKit::NetworkResourceLoader::isSynchronous):
703 (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
704 (WebKit::NetworkResourceLoader::didReceiveBuffer):
705 (WebKit::NetworkResourceLoader::didFinishLoading):
706 (WebKit::NetworkResourceLoader::didFail):
707 (WebKit::NetworkResourceLoader::willSendRequestAsync):
708 (WebKit::NetworkResourceLoader::didSendData):
709 (WebKit::NetworkResourceLoader::sendBuffer):
710 (WebKit::NetworkResourceLoader::sendReplyToSynchronousRequest):
711 (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
712 * NetworkProcess/NetworkResourceLoader.h:
713 (WebKit::NetworkResourceLoader::SynchronousLoadData::SynchronousLoadData):
714 * NetworkProcess/SynchronousNetworkLoaderClient.cpp: Removed.
715 * NetworkProcess/SynchronousNetworkLoaderClient.h: Removed.
716 * WebKit2.xcodeproj/project.pbxproj:
718 2014-08-29 Csaba Osztrogonác <ossy@webkit.org>
720 Unreviwed, remove empty directories.
722 * PluginProcess/qt: Removed.
723 * Shared/API/c/qt: Removed.
724 * Shared/Downloads/qt: Removed.
725 * Shared/FileAPI: Removed.
726 * Shared/qt: Removed.
727 * UIProcess/API/C/qt: Removed.
728 * UIProcess/API/cpp/qt: Removed.
729 * UIProcess/API/qt: Removed.
730 * UIProcess/API/qt/raw: Removed.
731 * UIProcess/API/qt/tests: Removed.
732 * UIProcess/API/qt/tests/html: Removed.
733 * UIProcess/API/qt/tests/html/resources: Removed.
734 * UIProcess/API/qt/tests/inspectorserver: Removed.
735 * UIProcess/API/qt/tests/publicapi: Removed.
736 * UIProcess/API/qt/tests/qmltests: Removed.
737 * UIProcess/API/qt/tests/qmltests/DesktopBehavior: Removed.
738 * UIProcess/API/qt/tests/qmltests/WebView: Removed.
739 * UIProcess/API/qt/tests/qmltests/common: Removed.
740 * UIProcess/API/qt/tests/qquickwebview: Removed.
741 * UIProcess/API/qt/tests/qrawwebview: Removed.
742 * UIProcess/InspectorServer/qt: Removed.
743 * UIProcess/Launcher/qt: Removed.
744 * UIProcess/Plugins/qt: Removed.
745 * UIProcess/SharedWorkers: Removed.
746 * UIProcess/qt: Removed.
747 * WebProcess/Cookies/qt: Removed.
748 * WebProcess/Downloads: Removed.
749 * WebProcess/IndexedDB: Removed.
750 * WebProcess/InjectedBundle/qt: Removed.
751 * WebProcess/NetworkInfo: Removed.
752 * WebProcess/Plugins/Netscape/qt: Removed.
753 * WebProcess/WebCoreSupport/qt: Removed.
754 * WebProcess/WebPage/qt: Removed.
755 * WebProcess/qt: Removed.
758 2014-08-28 Tim Horton <timothy_horton@apple.com>
760 _setDidMoveSwipeSnapshotCallback's block should only be called if the snapshot is going to move
761 https://bugs.webkit.org/show_bug.cgi?id=136354
762 <rdar://problem/18167791>
764 Reviewed by Simon Fraser.
766 * UIProcess/API/Cocoa/WKViewPrivate.h:
767 Update the comment to note the new behavior.
769 * UIProcess/mac/ViewGestureControllerMac.mm:
770 (WebKit::ViewGestureController::beginSwipeGesture):
771 Don't call the block until the snapshot is actually moving (if the snapshot
772 never moves because it's behind the live view, don't call the block at all).
774 2014-08-28 Tim Horton <timothy_horton@apple.com>
776 Occasional thread-safety-related crashes on the ServicesController queue
777 https://bugs.webkit.org/show_bug.cgi?id=136356
778 <rdar://problem/18045685>
780 Reviewed by Dan Bernstein.
782 * UIProcess/mac/ServicesController.mm:
783 (WebKit::hasCompatibleServicesForItems):
784 Added. Check directly with NSSharingService if we have any services for the given items.
785 We should eventually check Viewer and Editor services separately so the Web process can
786 be smarter about when it shows the overlay, but for now this maintains the existing behavior.
788 (WebKit::ServicesController::refreshExistingServices):
789 Make use of hasCompatibleServicesForItems instead of having NSSharingServicePicker construct NSMenus.
791 2014-08-28 Tim Horton <timothy_horton@apple.com>
793 WebKit2 doesn't support viewer services that accept image attachments
794 https://bugs.webkit.org/show_bug.cgi?id=136349
795 <rdar://problem/18164606>
797 Reviewed by Brady Eidson.
799 * Shared/WebProcessCreationParameters.cpp:
800 (WebKit::WebProcessCreationParameters::encode):
801 (WebKit::WebProcessCreationParameters::decode):
802 Encode the already-existing parameter.
804 2014-08-28 Zalan Bujtas <zalan@apple.com>
806 Subpixel layout: Remove unused pixel snapping functions.
807 https://bugs.webkit.org/show_bug.cgi?id=136341
809 Reviewed by Simon Fraser.
811 Let's not encourage integral snapping by having these functions around.
813 No change in functionality.
815 * Shared/WebRenderObject.cpp:
816 (WebKit::WebRenderObject::WebRenderObject):
818 2014-08-27 Enrica Casucci <enrica@apple.com>
820 textStylingAtPosition returns incorrect values after executing toggleBold, toggleItalic and toggleUnderline.
821 https://bugs.webkit.org/show_bug.cgi?id=136323
822 rdar://problem/18141964
824 Reviewed by Antti Koivisto.
826 For underline style we need to check typingStyle first and use that information to populate
827 the dictionary. If there is no typing style we can use the render style.
828 We also need to update the editor state for the toggle commands to reflect the state in the UIProcess
829 even for commands that don't change the selection.
831 * WebProcess/WebPage/WebPage.cpp:
832 (WebKit::WebPage::editorState):
833 * WebProcess/WebPage/ios/WebPageIOS.mm:
834 (WebKit::WebPage::executeEditCommandWithCallback):
836 2014-08-28 Carlos Garcia Campos <cgarcia@igalia.com>
838 [GTK] Add webkit_uri_response_get_http_headers to WebKit2 GTK+ API
839 https://bugs.webkit.org/show_bug.cgi?id=136248
841 Reviewed by Gustavo Noronha Silva.
843 Add webkit_uri_response_get_http_headers() that returns the HTTP
844 headers as a SoupMessageHeaders* like webkit_uri_request_get_http_headers().
846 * UIProcess/API/gtk/WebKitURIResponse.cpp:
847 (webkitURIResponseGetProperty): Add http-headers property getter.
848 (webkit_uri_response_class_init): Add http-headers property.
849 (webkit_uri_response_get_http_headers): Return the HTTP headers as
850 a SoupMessageHeaders* or NULL for non HTTP responses.
851 * UIProcess/API/gtk/WebKitURIResponse.h:
852 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol.
854 2014-08-27 Zalan Bujtas <zalan@apple.com>
856 Subpixel layout: Rename LayoutRect's device pixel snapping functions.
857 https://bugs.webkit.org/show_bug.cgi?id=136319
859 Reviewed by Simon Fraser.
861 From pixelSnappedForPainting() to snapRectToDevicePixels() and
862 pixelSnappedIntRect*() to snappedIntRect*().
864 No change in functionality.
866 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
867 (WebKit::InjectedBundleNodeHandle::renderedImage):
868 * WebProcess/WebPage/WebPage.cpp:
869 (WebKit::WebPage::snapshotNode):
870 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
871 (WebKit::ServicesOverlayController::buildSelectionHighlight):
873 2014-08-27 Zalan Bujtas <zalan@apple.com>
875 Subpixel layout: Rename FloatPoint/FloatRect device pixel snapping functions.
876 https://bugs.webkit.org/show_bug.cgi?id=136314
878 Reviewed by Simon Fraser.
880 From *edToDevicePixels() to *PointToDevicePixels() (* = floor/round/ceil)
882 EnclosedIntRect -> enclosingIntRect() changes functionality for InspectorOverlay painting,
883 but currently untestable.
885 * UIProcess/ios/WKContentViewInteraction.mm:
886 (-[WKContentView _updateTapHighlight]):
888 2014-08-27 Tim Horton <timothy_horton@apple.com>
890 WebKit2 swipe gesture should report the position of the snapshot to the client
891 https://bugs.webkit.org/show_bug.cgi?id=136308
892 rdar://problem/18105827
894 Reviewed by Simon Fraser.
896 * UIProcess/API/Cocoa/WKViewPrivate.h:
897 * UIProcess/API/mac/WKView.mm:
898 (-[WKView _setDidMoveSwipeSnapshotCallback:]):
899 Add _setDidMoveSwipeSnapshotCallback, and plumb it to ViewGestureController.
900 Callers provide a block which is called whenever ViewGestureController moves the
901 swipe *snapshot* layer around.
903 * UIProcess/PageClient.h:
904 * UIProcess/WebPageProxy.h:
905 * UIProcess/mac/PageClientImpl.h:
906 * UIProcess/mac/PageClientImpl.mm:
907 (WebKit::PageClientImpl::boundsOfLayerInLayerBackedWindowCoordinates):
908 * UIProcess/mac/WebPageProxyMac.mm:
909 (WebKit::WebPageProxy::boundsOfLayerInLayerBackedWindowCoordinates):
910 Expose a Mac-only way to get the bounds of a given CALayer in window coordinates,
911 respecting transforms. This only works for layer-backed windows because
912 it uses CA in order to do the mapping respecting transforms.
914 * UIProcess/mac/ViewGestureController.h:
915 * UIProcess/mac/ViewGestureControllerMac.mm:
916 (WebKit::ViewGestureController::ViewGestureController):
917 (WebKit::ViewGestureController::~ViewGestureController):
918 (WebKit::ViewGestureController::setDidMoveSwipeSnapshotCallback):
919 Do the Block_copy and Block_release dance to keep our copy of the callback block.
921 (WebKit::ViewGestureController::beginSwipeGesture):
922 (WebKit::ViewGestureController::handleSwipeGesture):
923 (WebKit::ViewGestureController::didMoveSwipeSnapshotLayer):
924 When the swipe snapshot layer moves around, call the block.
926 2014-08-27 Tim Horton <timothy_horton@apple.com>
928 Occasional crashes in commitTransientZoom's transaction completion block
929 https://bugs.webkit.org/show_bug.cgi?id=136309
930 <rdar://problem/17215064>
932 Reviewed by Dan Bernstein.
934 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
935 (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
936 Hold a reference to zoomLayer and the WebPage. It's possible that either
937 of these things could have gone away by the time the transaction is committed.
939 2014-08-27 Benjamin Poulain <bpoulain@apple.com>
941 [iOS WK2] Provide a delegate callback to skip Geolocation authorization per page for WebApp
942 https://bugs.webkit.org/show_bug.cgi?id=136243
944 Reviewed by Sam Weinig.
946 Just ask the UI if the authorization dialog needs to be skipped.
948 * UIProcess/API/Cocoa/WKUIDelegate.h:
949 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
950 * UIProcess/ios/PageClientImplIOS.mm:
951 (WebKit::PageClientImpl::decidePolicyForGeolocationPermissionRequest):
953 * UIProcess/ios/WKContentView.h:
954 * UIProcess/ios/WKContentView.mm:
955 (-[WKContentView _decidePolicyForGeolocationRequestFromOrigin:frame:request:]): Deleted.
956 The code in WKContentView only exists due to legacy. Instead, the PageClient dispatch the request
957 to the GeolocationProvider directly.
959 * UIProcess/ios/WKGeolocationProviderIOS.h:
960 * UIProcess/ios/WKGeolocationProviderIOS.mm:
961 (-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:request:view:]):
962 (-[WKGeolocationProviderIOS geolocationAuthorizationGranted]):
963 (-[WKGeolocationProviderIOS positionChanged:]):
964 (-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:request:window:]): Deleted.
966 2014-08-27 Beth Dakin <bdakin@apple.com>
968 overflow:scroll elements should not latch to the body if the body is
970 https://bugs.webkit.org/show_bug.cgi?id=136273
972 Reviewed by Darin Adler.
974 New ScrollabeArea virtual function.
975 * WebProcess/Plugins/PDF/PDFPlugin.h:
977 2014-08-26 Matt Lilek <mrl@apple.com>
979 Add WebKit SPI to control the navigator.standalone property
980 https://bugs.webkit.org/show_bug.cgi?id=136189
982 Reviewed by Andy Estes.
984 Add a property to WKPreferences that allows toggling this setting.
986 * UIProcess/API/Cocoa/WKPreferences.mm:
987 (-[WKPreferences _isStandalone]):
988 (-[WKPreferences _setStandalone:]):
989 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
991 2014-08-26 Joseph Pecoraro <pecoraro@apple.com>
993 FileReader cannot read files selected with <input type="file"> in iOS 8
994 https://bugs.webkit.org/show_bug.cgi?id=136117
996 Reviewed by Alexey Proskuryakov.
998 * Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
999 Correct an overzealous deny that was accidentally denying all
1000 com.apple.app-sandbox.read extensions instead of just the ones
1001 in Application bundles it was trying to deny.
1003 2014-08-26 Tim Horton <timothy_horton@apple.com>
1005 Crashes in ViewGestureController::beginSwipeGesture when swiping in rapid succession
1006 https://bugs.webkit.org/show_bug.cgi?id=136271
1007 <rdar://problem/17923694>
1009 Reviewed by Simon Fraser.
1011 It was possible to get into trackSwipeGesture while another swipe was still
1012 occurring, because the guard against this happening depended on m_pendingSwipeReason
1013 never being set while a swipe was occurring. However, if the very first scroll event
1014 had sufficient magnitude, we would still set m_pendingSwipeReason to InsufficientMagnitude,
1015 and then *never clear it*, leading to a path around the guard against multiple live swipes.
1016 This in turn allowed stale layers in m_liveSwipeLayers, which lead to the crash.
1018 * UIProcess/mac/ViewGestureControllerMac.mm:
1019 (WebKit::ViewGestureController::handleScrollWheelEvent):
1020 Don't unset m_pendingSwipeReason before calling trackSwipeGesture;
1021 trackSwipeGesture will do it itself.
1023 Don't set m_pendingSwipeReason to InsufficientMagnitude
1024 if the event actually *has* sufficient magnitude to start a swipe.
1026 (WebKit::ViewGestureController::trackSwipeGesture):
1027 Assert that we don't have an active gesture while starting a swipe.
1029 Reset m_pendingSwipeReason, because the swipe is no longer pending!
1031 2014-08-26 Andy Estes <aestes@apple.com>
1033 [Cocoa] Some projects are incorrectly installed to $BUILT_PRODUCTS_DIR
1034 https://bugs.webkit.org/show_bug.cgi?id=136267
1036 Reviewed by Dan Bernstein.
1038 INSTALL_PATH was set to $BUILT_PRODUCTS_DIR for engineering configurations in r20225 as part of a build fix.
1039 Not only is this no longer necessary to build, but it causes built products to be incorrectly installed in
1040 engineering configurations.
1042 Remove the setting of INSTALL_PATH from the pbxproj file so that the value specified in the xcconfig files is
1045 * WebKit2.xcodeproj/project.pbxproj:
1047 2014-08-25 Maciej Stachowiak <mjs@apple.com>
1049 Replace use of WKCopyCFLocalizationPreferredName with NSLocale public API
1050 https://bugs.webkit.org/show_bug.cgi?id=136082
1052 Reviewed by Alexey Proskuryakov.
1054 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1055 (WebKit::connectToService): Remove accidental leftover retrieval
1056 of the localization.
1057 (WebKit::createProcess): Get current localization name from
1058 CFBundle API instead of using SPI.
1059 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1060 (InitWebCoreSystemInterface): Remove mention of WKCopyCFLocalizationPreferredName
1061 * mac/WebKit2.order: ditto
1063 2014-08-26 Dana Burkart <dburkart@apple.com>
1065 The UNUSED_PARAM macros in ServicesOverlayController.mm are causing ASan build failures.
1066 https://bugs.webkit.org/show_bug.cgi?id=136262
1068 Reviewed by David Kilzer.
1070 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
1071 (WebKit::ServicesOverlayController::selectionRectsDidChange):
1072 (WebKit::ServicesOverlayController::selectedTelephoneNumberRangesChanged):
1074 2014-08-26 Csaba Osztrogonác <ossy@webkit.org>
1076 [EFL] URTBF after r172966.
1078 * UIProcess/efl/WebViewEfl.h:
1080 2014-08-26 Carlos Alberto Lopez Perez <clopez@igalia.com>
1082 REGRESSION(r172966) [GTK] Build broken.
1084 Unreviewed build fix after r172966.
1086 * UIProcess/API/gtk/PageClientImpl.cpp:
1087 (WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame):
1088 * UIProcess/API/gtk/PageClientImpl.h:
1090 2014-08-26 Simon Fraser <simon.fraser@apple.com>
1092 Crashes in hit testing under WebPage::determinePrimarySnapshottedPlugIn()
1093 https://bugs.webkit.org/show_bug.cgi?id=136240
1094 rdar://problem/17231462
1096 Reviewed by Darin Adler.
1098 determinePrimarySnapshottedPlugIn() does render tree hit testing, so needs
1099 to ensure that layout is up-to-date.
1101 * WebProcess/WebPage/WebPage.cpp:
1102 (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
1104 2014-08-26 Tim Horton <timothy_horton@apple.com>
1106 REGRESSION (r172771): Amazon product page becomes unresponsive after swiping back to it
1107 https://bugs.webkit.org/show_bug.cgi?id=136260
1108 <rdar://problem/18107826>
1110 Reviewed by Dan Bernstein.
1112 Previously, when a swipe ended up performing a same-document navigation,
1113 we would never get didFinishLoadForMainFrame nor didFirstVisuallyNonEmptyLayoutForMainFrame
1114 nor would we even get didHitRenderTreeSizeThreshold in all cases, so we would never
1115 remove the swipe snapshot. Previous implementations removed the snapshot on
1116 didSameDocumentNavigation for the main frame if the navigation type was Replace or Pop,
1117 so we will match that behavior.
1119 Also, reinstate the watchdog that starts at swipe-end which would have prevented
1120 this bug from forever breaking the view it was associated with.
1122 Also, defend against removing the snapshot before the swipe has finished (before
1123 we have even caused the navigation that we're watching for the effects of).
1125 * UIProcess/API/mac/WKView.mm:
1126 (-[WKView _didSameDocumentNavigationForMainFrame:]):
1127 * UIProcess/API/mac/WKViewInternal.h:
1128 * UIProcess/PageClient.h:
1129 * UIProcess/WebPageProxy.cpp:
1130 (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
1131 * UIProcess/ios/PageClientImplIOS.h:
1132 * UIProcess/ios/PageClientImplIOS.mm:
1133 (WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame):
1134 * UIProcess/mac/PageClientImpl.h:
1135 * UIProcess/mac/PageClientImpl.mm:
1136 (WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame):
1137 Plumb main-frame same-document navigation notification from WebPageProxy
1138 to ViewGestureControllerMac via PageClient and WKView.
1140 * UIProcess/mac/ViewGestureController.h:
1141 * UIProcess/mac/ViewGestureControllerMac.mm:
1142 (WebKit::ViewGestureController::ViewGestureController):
1143 (WebKit::ViewGestureController::beginSwipeGesture):
1144 (WebKit::ViewGestureController::endSwipeGesture):
1145 Keep track of whether a swipe is currently occurring. We can't use
1146 activeGestureType for this because the swipe currently remains the "active"
1147 gesture until the snapshot is removed.
1149 Reintroduce the old swipeWatchdogTimer (and rename the shorter timer that starts
1150 when we get a visually non-empty layout) so that we will always remove the
1151 snapshot after 5 seconds, even if we haven't committed the load.
1152 This could lead to flashing back to the old content if we fail to get a single
1153 byte for 5 seconds, but that is a rare case and should eventually get additional
1154 special treatment (dropping the tiles until we do get content, or some such).
1156 (WebKit::ViewGestureController::didHitRenderTreeSizeThreshold):
1157 If a swipe is still in progress, we haven't done our navigation and thus
1158 don't care about render tree size changes.
1160 (WebKit::ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame):
1161 If a swipe is still in progress, we haven't done our navigation and thus
1162 don't care about layouts.
1164 Stop the 5 second overall watchdog if we start the 3 second after-visuallyNonEmptyLayout
1165 watchdog. This means that the snapshot could stay up for a maximum of 8 seconds
1166 for a very, very slow load.
1168 (WebKit::ViewGestureController::didFinishLoadForMainFrame):
1169 If a swipe is still in progress, we haven't done our navigation and thus
1170 don't care about loads that complete.
1172 (WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
1173 Remove the swipe snapshot after painting if we do replaceState or popState.
1175 (WebKit::ViewGestureController::removeSwipeSnapshotAfterRepaint):
1176 If a swipe is still in progress, we shouldn't remove the snapshot yet.
1178 2014-08-26 Carlos Garcia Campos <cgarcia@igalia.com>
1180 [GTK] Translations are not initialized in the UI process
1181 https://bugs.webkit.org/show_bug.cgi?id=136249
1183 Reviewed by Philippe Normand.
1185 This is breaking things like webkitContextMenuActionGetForContextMenuItem()
1186 for non English locales in the cases where we use the action title to guess the
1187 action, because the action title we get from the web process is translated while
1188 the one in the UI process is in English.
1190 * UIProcess/API/gtk/WebKitWebContext.cpp:
1191 (createDefaultWebContext): Initialize gettext right before
1192 creating the default web context.
1194 2014-08-26 Ryuan Choi <ryuan.choi@samsung.com>
1196 [EFL] Remove dead code in WebPageEfl.cpp
1197 https://bugs.webkit.org/show_bug.cgi?id=136246
1199 Reviewed by Gyuyoung Kim.
1201 * WebProcess/WebPage/efl/WebPageEfl.cpp:
1202 (WebKit::scroll): Deleted.
1204 2014-08-26 Ryuan Choi <ryuan.choi@samsung.com>
1206 [EFL] Build break using clang
1207 https://bugs.webkit.org/show_bug.cgi?id=136245
1209 Reviewed by Gyuyoung Kim.
1211 * PlatformEfl.cmake: defines GTEST_HAS_RTTI=0
1213 2014-08-25 Zalan Bujtas <zalan@apple.com>
1215 Subpixel layout: remove roundedLayoutPoint/roundedLayoutSize functions.
1216 https://bugs.webkit.org/show_bug.cgi?id=136236
1218 Reviewed by Simon Fraser.
1220 These functions simply call LayoutPoint/LayoutSize c'tors. They don't round the input value at all.
1222 Non change in functionality.
1224 * UIProcess/ios/WebPageProxyIOS.mm:
1225 (WebKit::WebPageProxy::computeCustomFixedPositionRect):
1227 2014-08-25 Antti Koivisto <antti@apple.com>
1229 Don't pass priority as parameter to ResourceLoadScheduler
1230 https://bugs.webkit.org/show_bug.cgi?id=136232
1232 Reviewed by Sam Weinig.
1234 * NetworkProcess/NetworkResourceLoader.cpp:
1235 (WebKit::NetworkResourceLoader::NetworkResourceLoader):
1236 * NetworkProcess/NetworkResourceLoader.h:
1237 (WebKit::NetworkResourceLoader::priority): Deleted.
1238 * Shared/Network/NetworkResourceLoadParameters.cpp:
1239 (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
1240 (WebKit::NetworkResourceLoadParameters::encode):
1241 (WebKit::NetworkResourceLoadParameters::decode):
1242 * Shared/Network/NetworkResourceLoadParameters.h:
1243 * WebProcess/Network/WebResourceLoadScheduler.cpp:
1244 (WebKit::WebResourceLoadScheduler::scheduleSubresourceLoad):
1245 (WebKit::WebResourceLoadScheduler::schedulePluginStreamLoad):
1246 (WebKit::WebResourceLoadScheduler::scheduleLoad):
1247 * WebProcess/Network/WebResourceLoadScheduler.h:
1248 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1249 (WebKit::WebPlatformStrategies::loadResourceSynchronously):
1251 2014-08-25 Brady Eidson <beidson@apple.com>
1253 Don't crash when the DataDetectors framework is unavailable.
1254 <rdar://problem/18106066> and https://bugs.webkit.org/show_bug.cgi?id=136234
1256 Reviewed by Tim Horton.
1258 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
1259 (WebKit::ServicesOverlayController::buildPhoneNumberHighlights): Bail if DD.framework didn’t soft link.
1260 (WebKit::ServicesOverlayController::buildSelectionHighlight): Ditto.
1262 2014-08-25 Antti Koivisto <antti@apple.com>
1264 Remove load scheduling code from network process
1265 https://bugs.webkit.org/show_bug.cgi?id=136199
1267 Reviewed by Darin Adler.
1269 Most platforms just flush resource loads directly to the networking layer by
1270 making the parallel load count large. Also we always pass ResourceLoadPriorityHighest
1271 to the scheduler so no actual scheduling happens. This is effectively dead code.
1273 Keep basic support for serializing loads. This is only used for testing.
1275 * NetworkProcess/HostRecord.cpp: Removed.
1276 * NetworkProcess/HostRecord.h: Removed.
1277 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1278 (WebKit::NetworkConnectionToWebProcess::servePendingRequests):
1279 * NetworkProcess/NetworkProcess.cpp:
1280 (WebKit::NetworkProcess::getNetworkProcessStatistics):
1281 * NetworkProcess/NetworkResourceLoadScheduler.cpp:
1282 (WebKit::NetworkResourceLoadScheduler::NetworkResourceLoadScheduler):
1283 (WebKit::NetworkResourceLoadScheduler::scheduleLoader):
1284 (WebKit::NetworkResourceLoadScheduler::removeLoader):
1285 (WebKit::NetworkResourceLoadScheduler::loadsPendingCount):
1286 (WebKit::NetworkResourceLoadScheduler::loadsActiveCount):
1287 (WebKit::NetworkResourceLoadScheduler::scheduleServePendingRequests): Deleted.
1288 (WebKit::NetworkResourceLoadScheduler::requestTimerFired): Deleted.
1289 (WebKit::NetworkResourceLoadScheduler::hostForURL): Deleted.
1290 (WebKit::NetworkResourceLoadScheduler::receivedRedirect): Deleted.
1291 (WebKit::NetworkResourceLoadScheduler::servePendingRequests): Deleted.
1292 (WebKit::NetworkResourceLoadScheduler::removeScheduledLoaders): Deleted.
1293 (WebKit::NetworkResourceLoadScheduler::scheduleRemoveLoader): Deleted.
1294 (WebKit::NetworkResourceLoadScheduler::hostsPendingCount): Deleted.
1295 (WebKit::NetworkResourceLoadScheduler::hostsActiveCount): Deleted.
1296 * NetworkProcess/NetworkResourceLoadScheduler.h:
1297 * NetworkProcess/NetworkResourceLoader.cpp:
1298 (WebKit::NetworkResourceLoader::~NetworkResourceLoader):
1299 (WebKit::NetworkResourceLoader::cleanup):
1300 (WebKit::NetworkResourceLoader::continueWillSendRequest):
1301 * NetworkProcess/NetworkResourceLoader.h:
1302 (WebKit::NetworkResourceLoader::isLoadingMainResource):
1303 (WebKit::NetworkResourceLoader::setHostRecord): Deleted.
1304 (WebKit::NetworkResourceLoader::hostRecord): Deleted.
1305 * NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm:
1306 (WebKit::NetworkResourceLoadScheduler::platformInitializeNetworkSettings):
1307 (WebKit::NetworkResourceLoadScheduler::platformInitializeMaximumHTTPConnectionCountPerHost): Deleted.
1308 * NetworkProcess/soup/NetworkResourceLoadSchedulerSoup.cpp:
1309 (WebKit::NetworkResourceLoadScheduler::platformInitializeNetworkSettings):
1310 (WebKit::NetworkResourceLoadScheduler::platformInitializeMaximumHTTPConnectionCountPerHost): Deleted.
1311 * WebKit2.xcodeproj/project.pbxproj:
1313 2014-08-25 Carlos Garcia Campos <cgarcia@igalia.com>
1315 [GTK] Older versions of WebKit should use the plugins cache in read only mode
1316 https://bugs.webkit.org/show_bug.cgi?id=136215
1318 Reviewed by Philippe Normand.
1320 Now that WebKitGTK+ 2.4 and 2.5 are parallel installable, since
1321 they use different versions of the plugins cache, apps using 2.4
1322 might override the plugins cache file. We should prevent this from
1323 happening by making older versions use the plugin cache, but not
1326 * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
1327 (WebKit::PluginInfoCache::PluginInfoCache):
1328 (WebKit::PluginInfoCache::updatePluginInfo):
1329 * UIProcess/Plugins/gtk/PluginInfoCache.h:
1331 2014-08-25 Carlos Garcia Campos <cgarcia@igalia.com>
1333 [GTK] Should check if a plugin mixes GTK+ symbols earlier
1334 https://bugs.webkit.org/show_bug.cgi?id=136214
1336 Reviewed by Philippe Normand.
1338 We are currently checking if the plugin module and the plugin
1339 process mix GTK symbols after the plugin has been loaded and
1340 initialized. This is too late in many cases, since plugins can use
1341 GTK methods in the NP_Initialize implementation. This is causing
1342 the apps using WebKitGTK+ 2.4 to freeze when the plugin process
1343 scans the plugins and there's a plugin using GTK+3 installed. We
1344 should move the check earlier, once the module is loaded but
1345 before calling NP_Initialize.
1347 * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
1348 (WebKit::moduleMixesGtkSymbols):
1349 (WebKit::NetscapePluginModule::tryLoad):
1350 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
1351 (WebKit::NetscapePlugin::platformPostInitialize):
1353 2014-08-25 Zan Dobersek <zdobersek@igalia.com>
1355 Improve virtual method declarations in LayerTreeHostGtk
1356 https://bugs.webkit.org/show_bug.cgi?id=136210
1358 Reviewed by Carlos Garcia Campos.
1360 Mark the LayerTreeHostGtk class as final in the virtual inheritance hierarchy.
1362 Order the public and private virtual method overrides from the LayerTreeHost
1363 and GraphicsLayerClient interfaces. Explicitly mark them as overriding the
1366 Remove the overriding notifyAnimationStarted() and notifyFlushRequired()
1367 methods since they are identical to the methods in the base class.
1369 De-virtualize flushPendingLayerChanges(). It's not inherited and is not
1370 overriden by anything (and nothing can inherit from LayerTreeHostGtk from
1371 now on due to the final specifier).
1373 * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
1374 (WebKit::LayerTreeHostGtk::notifyAnimationStarted): Deleted.
1375 (WebKit::LayerTreeHostGtk::notifyFlushRequired): Deleted.
1376 * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
1377 (WebKit::LayerTreeHostGtk::didCommitChangesForLayer): Deleted.
1379 2014-08-24 Brian J. Burg <burg@cs.washington.edu>
1381 Remove unused method declarations replaced by WebPage::setViewState
1382 https://bugs.webkit.org/show_bug.cgi?id=136180
1384 Reviewed by Darin Adler.
1386 * WebProcess/WebPage/WebPage.h:
1387 Remove setFocused, setActive, setViewIsVisible. No longer used.
1389 2014-08-23 Byungseon Shin <sun.shin@lge.com>
1391 Unify GraphicsLayer::setContentsToMedia and setContentsToCanvas
1392 https://bugs.webkit.org/show_bug.cgi?id=109658
1394 Reviewed by Martin Robinson.
1396 Based on patch originally written by Tim Horton.
1397 Merge setContentsToMedia and setContentsToCanvas into setContentsToPlatformLayer.
1399 * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
1400 (IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::encode):
1401 (IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::decode):
1402 Rename canvas -> platformLayer.
1404 2014-08-22 Commit Queue <commit-queue@webkit.org>
1406 Unreviewed, rolling out r172866.
1407 https://bugs.webkit.org/show_bug.cgi?id=136177
1409 Broke iOS build (Requested by othermaciej on #webkit).
1413 "Replace use of WKCopyCFLocalizationPreferredName with
1414 NSLocale public API"
1415 https://bugs.webkit.org/show_bug.cgi?id=136082
1416 http://trac.webkit.org/changeset/172866
1418 2014-08-19 Maciej Stachowiak <mjs@apple.com>
1420 Replace use of WKCopyCFLocalizationPreferredName with NSLocale public API
1421 https://bugs.webkit.org/show_bug.cgi?id=136082
1423 Reviewed by Alexey Proskuryakov.
1425 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1426 (WebKit::connectToService): Remove accidental leftover retrieval
1427 of the localization.
1428 (WebKit::createProcess): Get current localization name from
1429 CFBundle API instead of using SPI.
1430 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1431 (InitWebCoreSystemInterface): Remove mention of WKCopyCFLocalizationPreferredName
1432 * mac/WebKit2.order: ditto
1434 2014-08-22 Daniel Bates <dabates@apple.com>
1436 [iOS] Disable ENABLE_IOS_{GESTURE, TOUCH}_EVENTS, and temporarily disable ENABLE_TOUCH_EVENTS
1437 and ENABLE_XSLT when building with the iOS public SDK
1438 https://bugs.webkit.org/show_bug.cgi?id=135945
1440 Reviewed by Andy Estes.
1442 * Configurations/FeatureDefines.xcconfig: Disable ENABLE_IOS_{GESTURE, TOUCH}_EVENTS, ENABLE_TOUCH_EVENTS
1443 and ENABLE_XSLT when building with the public SDK.
1444 * Shared/WebEventConversion.h: Write preprocessor logic in terms of ENABLE(IOS_TOUCH_EVENTS).
1445 * WebProcess/WebPage/WebPage.h: Ditto.
1447 2014-08-22 Simon Fraser <simon.fraser@apple.com>
1449 Implement paint flashing via GraphicsLayers in the WK2 inspector overlay
1450 https://bugs.webkit.org/show_bug.cgi?id=136136
1452 Reviewed by Sam Weinig, Joseph Pecoraro.
1454 Allow InspectorClient to have a custom implementation of showPaintRect(). For
1455 WebKit2's WebInspectorClient, implement this by creating a set of GraphicsLayers
1456 which are parented in a document overlay, with 0.25s fade-out animations.
1458 Also change InspectorInstrumentation::didPaintImpl() to no longer take a GraphicsContext;
1459 it makes no sense to paint the paint rects directly into the context of the web page.
1460 Now that the paint rects are painted into an overlay, the rectangles need to be converted
1461 to root document coordinates, which is done in InspectorInstrumentation::didPaintImpl().
1463 Remove the generic InspectorOverlay::drawOutline()-based indicators; they will
1464 be reimplemented in a later patch.
1466 * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
1467 (WebKit::RepaintIndicatorLayerClient::RepaintIndicatorLayerClient):
1468 (WebKit::RepaintIndicatorLayerClient::~RepaintIndicatorLayerClient):
1469 (WebKit::RepaintIndicatorLayerClient::notifyAnimationEnded):
1470 (WebKit::WebInspectorClient::WebInspectorClient):
1471 (WebKit::WebInspectorClient::~WebInspectorClient):
1472 (WebKit::WebInspectorClient::showPaintRect):
1473 (WebKit::WebInspectorClient::animationEndedForLayer):
1474 * WebProcess/WebCoreSupport/WebInspectorClient.h:
1475 (WebKit::WebInspectorClient::WebInspectorClient): Deleted.
1477 2014-08-22 Jon Lee <jonlee@apple.com>
1479 Fix iOS build due to r172832 and move RUBBER_BANDING out of FeatureDefines.h
1480 https://bugs.webkit.org/show_bug.cgi?id=136157
1482 Reviewed by Simon Fraser.
1484 * Configurations/FeatureDefines.xcconfig: Add ENABLE(RUBBER_BANDING).
1486 2014-08-21 Joseph Pecoraro <pecoraro@apple.com>
1488 Possible RetainPtr misuse in WKScriptMessage.mm - could leak
1489 https://bugs.webkit.org/show_bug.cgi?id=136140
1491 Reviewed by Darin Adler.
1493 Adopt a copy into a RetainPtr to avoid leaking.
1495 * UIProcess/API/Cocoa/WKScriptMessage.mm:
1496 (-[WKScriptMessage _initWithBody:webView:frameInfo:name:]):
1498 2014-08-21 Simon Fraser <simon.fraser@apple.com>
1500 Add animationDidEnd callbacks on GraphicsLayer
1501 https://bugs.webkit.org/show_bug.cgi?id=136084
1503 Reviewed by Tim Horton.
1505 Hook up GraphicsLayerClient::notifyAnimationEnded() so that code using GraphicsLayers directly
1506 can add animations, and know when they finish.
1508 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
1509 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1510 (WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidEnd):
1511 * UIProcess/mac/RemoteLayerTreeHost.h:
1512 * UIProcess/mac/RemoteLayerTreeHost.mm:
1513 (WebKit::RemoteLayerTreeHost::animationDidEnd):
1514 * WebProcess/WebPage/DrawingArea.h:
1515 (WebKit::DrawingArea::acceleratedAnimationDidEnd):
1516 * WebProcess/WebPage/DrawingArea.messages.in:
1517 * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
1518 (-[WKAnimationDelegate animationDidStop:finished:]):
1519 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1520 (WebKit::PlatformCALayerRemote::animationStarted):
1521 (WebKit::PlatformCALayerRemote::animationEnded):
1522 * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
1523 * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
1524 * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
1525 (WebKit::RemoteLayerTreeContext::layerWillBeDestroyed):
1526 (WebKit::RemoteLayerTreeContext::willStartAnimationOnLayer):
1527 (WebKit::RemoteLayerTreeContext::animationDidStart):
1528 (WebKit::RemoteLayerTreeContext::animationDidEnd):
1529 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1530 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1531 (WebKit::RemoteLayerTreeDrawingArea::acceleratedAnimationDidEnd):
1533 2014-08-21 Zalan Bujtas <zalan@apple.com>
1535 Enable SATURATED_LAYOUT_ARITHMETIC.
1536 https://bugs.webkit.org/show_bug.cgi?id=136106
1538 Reviewed by Simon Fraser.
1540 SATURATED_LAYOUT_ARITHMETIC protects LayoutUnit against arithmetic overflow.
1541 (No measurable performance regression on Mac.)
1543 * Configurations/FeatureDefines.xcconfig:
1545 2014-08-21 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
1547 [GTK] WebkitWebProcess crashing navigating away from ogg video element
1548 https://bugs.webkit.org/show_bug.cgi?id=135348
1550 Reviewed by Philippe Normand.
1552 When a page is cached, by default doesn't recreate the backing store
1553 (an optimization added in r89316).
1555 Not all the ports uses that optimization. For example IOS port doesn't
1558 In the case of the GTK port, the MediaPlayerPrivateGStreamer, not only
1559 processes video buffers, also display them, because it is a
1560 TextureMapperPlatformLayer too.
1562 Nevertheless, in r153937, when a page is cached, the player is
1563 destroyed. But our player has a backing store and the render tree
1564 doesn't know that the player has gone. Hence, when the page is redraw,
1565 the TextureMapper tree visits the video element, which doesn't exist
1566 anymore, a segmentation fault occurs.
1568 So, as our media player renders, and as we cannot trust that the
1569 player exists when a page is painted, we cannot rely in the r89316
1572 Disabling the backing stores optimization fixes the problem.
1574 Covered by existing tests.
1576 * WebProcess/soup/WebProcessSoup.cpp:
1577 (WebKit::WebProcess::platformSetCacheModel): Enable the backing store
1578 clearing when page caching for GTK.
1580 2014-08-20 Alex Christensen <achristensen@webkit.org>
1582 Introducing WEBCORE_EXPORT macro.
1583 https://bugs.webkit.org/show_bug.cgi?id=136108
1585 Reviewed by Antti Koivisto.
1588 Added stub definition of WEBCORE_EXPORT defined to nothing to be able to compile with WebCore headers.
1590 2014-08-20 Pratik Solanki <psolanki@apple.com>
1592 Move DiskCacheMonitor to WebCore so that WebKit1 clients can use it as well
1593 https://bugs.webkit.org/show_bug.cgi?id=135896
1595 Reviewed by Andreas Kling.
1597 * NetworkProcess/mac/NetworkDiskCacheMonitor.h:
1598 Inherit from WebCore::DiskCacheMonitor which has the bulk of the functionality now.
1599 (WebKit::NetworkDiskCacheMonitor::~NetworkDiskCacheMonitor):
1600 * NetworkProcess/mac/NetworkDiskCacheMonitor.mm:
1601 (WebKit::NetworkDiskCacheMonitor::monitorFileBackingStoreCreation):
1602 (WebKit::NetworkDiskCacheMonitor::NetworkDiskCacheMonitor):
1603 (WebKit::NetworkDiskCacheMonitor::resourceBecameFileBacked):
1604 Override virtual method and send the data to the WebContent process as before.
1606 2014-08-19 Pratik Solanki <psolanki@apple.com>
1608 Remove PurgeableBuffer since it is not very useful any more
1609 https://bugs.webkit.org/show_bug.cgi?id=135939
1611 Reviewed by Andreas Kling.
1613 * WebProcess/WebProcess.cpp:
1614 (WebKit::getWebCoreMemoryCacheStatistics):
1616 2014-08-19 Peyton Randolph <prandolph@apple.com>
1618 Expose injected bundle SPI to get a node's URL element, get the visible selection range of that
1619 element, and snapshot that range
1620 https://bugs.webkit.org/show_bug.cgi?id=136076
1622 Reviewed by Tim Horton.
1624 * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
1625 (WKBundleHitTestResultCopyURLElementHandle): Added.
1626 * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
1627 * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
1628 (WKBundleNodeHandleCopyVisibleRange): Added.
1629 * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
1630 * WebProcess/InjectedBundle/API/c/WKBundleRangeHandle.cpp:
1631 (WKBundleRangeHandleGetBoundingRectInWindowCoordinates): Added.
1632 (WKBundleRangeHandleCopySnapshotWithOptions): Added.
1633 * WebProcess/InjectedBundle/API/c/WKBundleRangeHandlePrivate.h:
1634 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
1635 (WebKit::InjectedBundleNodeHandle::visibleRange): Added.
1636 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
1637 * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
1638 (WebKit::InjectedBundleRangeHandle::boundingRectInWindowCoordinates): Added.
1639 (WebKit::InjectedBundleRangeHandle::renderedImage): Added.
1640 * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.h:
1641 * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
1642 (WebKit::InjectedBundleHitTestResult::urlElementHandle): Added.
1643 * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
1645 2014-08-19 Zalan Bujtas <zalan@apple.com>
1647 Remove ENABLE(SUBPIXEL_LAYOUT).
1648 https://bugs.webkit.org/show_bug.cgi?id=136077
1650 Reviewed by Simon Fraser.
1652 Remove compile time flag SUBPIXEL_LAYOUT. All ports have it enabled for a while now.
1654 * Configurations/FeatureDefines.xcconfig:
1656 2014-08-19 Peyton Randolph <prandolph@apple.com>
1658 Extend injected bundle node snapshotting to support forced white and black text
1659 https://bugs.webkit.org/show_bug.cgi?id=136061
1661 Reviewed by Beth Dakin.
1663 * Shared/API/c/WKImage.h:
1664 Add -ForceBlackText and -ForceWhiteText snapshotting options.
1665 * Shared/API/c/WKSharedAPICast.h:
1666 (WebKit::toSnapshotOptions):
1667 Support aforementioned text snapshotting options.
1668 * Shared/ImageOptions.h:
1669 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
1670 (WebKit::imageForRect):
1671 Respect text color snapshotting options by setting appropriate paint behaviors.
1673 2014-08-18 Maciej Stachowiak <mjs@apple.com>
1675 Use NSURLFileTypeMappings directly instead of depending on WebKitSystemInterface wrappers for it
1676 https://bugs.webkit.org/show_bug.cgi?id=136035
1678 Reviewed by Dan Bernstein.
1680 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1681 (InitWebCoreSystemInterface): Don't initialize the no-longer-used WKGetExtensionsForMIMEType,
1682 WKGetPreferredExtensionForMIMEType, or WKGetMIMETypeForExtension
1683 * mac/WebKit2.order: Remove exports related to above.
1685 2014-08-18 Commit Queue <commit-queue@webkit.org>
1687 Unreviewed, rolling out r172736.
1688 https://bugs.webkit.org/show_bug.cgi?id=136060
1690 Caused 14% PLT regressions (Requested by rniwa on #webkit).
1694 "Remove PurgeableBuffer since it is not very useful any more"
1695 https://bugs.webkit.org/show_bug.cgi?id=135939
1696 http://trac.webkit.org/changeset/172736
1698 2014-08-18 Simon Fraser <simon.fraser@apple.com>
1700 Provide default implementations of all GraphicsLayerClient methods
1701 https://bugs.webkit.org/show_bug.cgi?id=136054
1703 Reviewed by Tim Horton.
1705 Remove overrides which are no longer required.
1707 * WebProcess/WebPage/PageOverlayController.h:
1708 * WebProcess/WebPage/ServicesOverlayController.h:
1709 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1711 2014-08-18 Pratik Solanki <psolanki@apple.com>
1713 Remove PurgeableBuffer since it is not very useful any more
1714 https://bugs.webkit.org/show_bug.cgi?id=135939
1716 Reviewed by Geoffrey Garen.
1718 * WebProcess/WebProcess.cpp:
1719 (WebKit::getWebCoreMemoryCacheStatistics):
1721 2014-08-18 Peyton Randolph <prandolph@apple.com>
1723 Expose long mouse press WebKit API. Part of 135257 - Add long mouse press gesture
1724 https://bugs.webkit.org/show_bug.cgi?id=136048
1726 Reviewed by Dan Bernstein.
1728 This patch exposes long mouse press API callbacks in both the injected bundle and on the UI process
1729 through their respective page UI clients. The callbacks are modeled off of the mouseDidMoveOverElement
1730 callback. Like the mouseDidMoveOverElement callback, these callbacks allow the bundle to pass
1731 information to the UI process via a userData out parameter.
1733 * UIProcess/API/APIUIClient.h:
1734 (API::UIClient::didBeginTrackingPotentialLongMousePress): Added.
1735 (API::UIClient::didRecognizeLongMousePress): Added.
1736 (API::UIClient::didCancelTrackingPotentialLongMousePress): Added.
1737 * UIProcess/API/C/WKPage.cpp:
1738 (WKPageSetPageUIClient):
1739 * UIProcess/API/C/WKPageUIClient.h:
1740 * UIProcess/WebPageProxy.cpp:
1741 (WebKit::WebPageProxy::didBeginTrackingPotentialLongMousePress): Added.
1742 (WebKit::WebPageProxy::didRecognizeLongMousePress): Added.
1743 (WebKit::WebPageProxy::didCancelTrackingPotentialLongMousePress): Added.
1744 * UIProcess/WebPageProxy.h:
1745 * UIProcess/WebPageProxy.messages.in:
1746 * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
1747 (API::InjectedBundle::PageUIClient::didBeginTrackingPotentialLongMousePress): Added.
1748 (API::InjectedBundle::PageUIClient::didRecognizeLongMousePress): Added.
1749 (API::InjectedBundle::PageUIClient::didCancelTrackingPotentialLongMousePress): Added.
1750 * WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h:
1751 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: Added.
1752 (WebKit::InjectedBundlePageUIClient::didBeginTrackingPotentialLongMousePress): Added.
1753 (WebKit::InjectedBundlePageUIClient::didRecognizeLongMousePress): Added.
1754 (WebKit::InjectedBundlePageUIClient::didCancelTrackingPotentialLongMousePress): Added.
1755 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
1756 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1757 (WebKit::WebChromeClient::didBeginTrackingPotentialLongMousePress): Added.
1758 (WebKit::WebChromeClient::didRecognizeLongMousePress): Added.
1759 (WebKit::WebChromeClient::didCancelTrackingPotentialLongMousePress): Added.
1760 * WebProcess/WebCoreSupport/WebChromeClient.h:
1762 2014-08-18 Przemyslaw Kuczynski <p.kuczynski@samsung.com>
1764 Fix unintentional integer overflow before widen
1765 https://bugs.webkit.org/show_bug.cgi?id=135463
1767 Reviewed by Oliver Hunt.
1769 Overflowing expression is evaluated using operands arithmetic but then is used in
1770 context which expects an wider integer type. To avoid overflow at least one operand
1771 has to be representative of the wider type.
1773 * WebProcess/soup/WebProcessSoup.cpp:
1774 (WebKit::getMemorySize): Added long long literal.
1776 2014-08-18 Przemyslaw Kuczynski <p.kuczynski@samsung.com>
1778 Fix resource leak in unclosed file descriptor handles
1779 https://bugs.webkit.org/show_bug.cgi?id=135458
1781 Reviewed by Oliver Hunt.
1783 Leaving descriptor unclosed will cause the resources associated with the open
1784 file description never be freed (they are freed on closing the last descriptor
1785 refering to the underlying file).
1787 * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
1788 (WebKit::StdoutDevNullRedirector::StdoutDevNullRedirector): Closed newStdout descriptor.
1789 (WebKit::StdoutDevNullRedirector::~StdoutDevNullRedirector): Closed m_savedStdout descriptor.
1791 2014-08-18 Grzegorz Czajkowski <g.czajkowski@samsung.com>
1793 [EFL] ewk_init() is sufficient to initialize EFL components
1794 https://bugs.webkit.org/show_bug.cgi?id=136036
1796 Reviewed by Gyuyoung Kim.
1798 Developers do not have to initialize EFL components as ewk_init()
1801 * UIProcess/API/efl/ewk_intro.h:
1803 2014-08-16 Pratik Solanki <psolanki@apple.com>
1805 Rename DiskCacheMonitor to NetworkDiskCacheMonitor
1806 https://bugs.webkit.org/show_bug.cgi?id=135897
1808 Reviewed by Andreas Kling.
1810 In preparation for moving DiskCacheMonitor code to WebCore in bug 135896, rename the WebKit2
1811 class to NetworkDiskCacheMonitor.
1813 * NetworkProcess/mac/NetworkDiskCacheMonitor.h: Renamed from Source/WebKit2/NetworkProcess/mac/DiskCacheMonitor.h.
1814 (WebKit::NetworkDiskCacheMonitor::resourceRequest):
1815 * NetworkProcess/mac/NetworkDiskCacheMonitor.mm: Renamed from Source/WebKit2/NetworkProcess/mac/DiskCacheMonitor.mm.
1816 (WebKit::NetworkDiskCacheMonitor::monitorFileBackingStoreCreation):
1817 (WebKit::NetworkDiskCacheMonitor::NetworkDiskCacheMonitor):
1818 (WebKit::NetworkDiskCacheMonitor::messageSenderConnection):
1819 (WebKit::NetworkDiskCacheMonitor::messageSenderDestinationID):
1820 * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
1821 (WebKit::NetworkResourceLoader::willCacheResponseAsync):
1822 * WebKit2.xcodeproj/project.pbxproj:
1824 2014-08-16 Byungseon Shin <sun.shin@lge.com>
1826 [GTK] build fails with error: cannot allocate an object of abstract type 'WebKit::PageClientImpl'
1827 https://bugs.webkit.org/show_bug.cgi?id=136017
1829 Reviewed by Gyuyoung Kim.
1831 * UIProcess/API/gtk/PageClientImpl.cpp:
1832 (WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):
1833 (WebKit::PageClientImpl::didFinishLoadForMainFrame):
1834 * UIProcess/API/gtk/PageClientImpl.h:
1836 2014-08-15 Ryuan Choi <ryuan.choi@samsung.com>
1838 [EFL] Add ewk_intro.h to describe main page of doxygen
1839 https://bugs.webkit.org/show_bug.cgi?id=136013
1841 Reviewed by Gyuyoung Kim.
1843 * PlatformEfl.cmake:
1844 * UIProcess/API/efl/EWebKit2.h.in:
1845 * UIProcess/API/efl/ewk_intro.h: Added.
1847 2014-08-15 Zalan Bujtas <zalan@apple.com>
1849 Do not use FloatRect::infiniteRect() to flag full repaints.
1850 https://bugs.webkit.org/show_bug.cgi?id=135900
1852 Reviewed by Simon Fraser.
1854 Converting FloatRect::infiniteRect() to IntRect leads to value overflow
1855 and we end up with invalid repaint rectangle. Use a boolean flag to indicate
1856 full repaint request.
1858 Covered by existing tests.
1860 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1861 (WebKit::PlatformCALayerRemote::setNeedsDisplayInRect):
1862 (WebKit::PlatformCALayerRemote::setNeedsDisplay):
1863 * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
1864 * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
1865 * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
1866 (WebKit::PlatformCALayerRemoteCustom::setNeedsDisplayInRect):
1867 (WebKit::PlatformCALayerRemoteCustom::setNeedsDisplay):
1868 * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
1869 (WebKit::PlatformCALayerRemoteTiledBacking::setNeedsDisplayInRect):
1870 (WebKit::PlatformCALayerRemoteTiledBacking::setNeedsDisplay):
1871 * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
1873 2014-08-15 Alexey Proskuryakov <ap@apple.com>
1875 REGRESSION (r172660): WebKit2.TerminateTwice asserts
1876 https://bugs.webkit.org/show_bug.cgi?id=136012
1878 * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::terminateProcess):
1879 Added bug number to a fixme.
1881 2014-08-15 Ryuan Choi <ryuan.choi@samsung.com>
1883 Unreviewed build fix on the EFL port since r172635
1885 * UIProcess/WebPageProxy.cpp: Guard removeNavigationGestureSnapshot with PLATFORM(MAC) macro.
1886 * UIProcess/WebPageProxy.h: Ditto.
1887 * UIProcess/efl/WebViewEfl.h: Added didFirstVisuallyNonEmptyLayoutForMainFrame and didFinishLoadForMainFrame as dummy.
1889 2014-08-15 Alexey Proskuryakov <ap@apple.com>
1891 Improve page to process relationship tracking
1892 https://bugs.webkit.org/show_bug.cgi?id=135996
1893 <rdar://problem/16991213>
1895 Reviewed by Sam Weinig.
1897 * UIProcess/VisitedLinkProvider.cpp:
1898 (WebKit::VisitedLinkProvider::removeAll):
1899 (WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired):
1900 (WebKit::VisitedLinkProvider::sendTable):
1901 Added assertions for m_processes only having valid entries.
1903 * UIProcess/WebPageProxy.cpp:
1904 (WebKit::WebPageProxy::reattachToWebProcess): When attaching to a new process,
1905 tell the old process that the page is not longer associated with it, avoiding
1906 a potential stale pointer.
1907 If re-attached to an existing process, make sure that we perform all the same
1908 registrations as after having launched a new process. This substantially improves
1909 the behavior when the number of open tabs is over process limit.
1910 (WebKit::WebPageProxy::reattachToWebProcessWithItem): Added ASSERT(!isValid())
1911 to avoid confusion. All other calls to reattachToWebProcess() have this as a
1912 runtime check, but reattachToWebProcessWithItem() is only called for valid pages.
1913 (WebKit::WebPageProxy::terminateProcess): Added an assertion with a FIXME for
1914 something that will need to be fixed another day.
1916 * UIProcess/WebPageProxy.h: Removed an unimplemented function.
1918 * UIProcess/WebProcessProxy.cpp:
1919 (WebKit::WebProcessProxy::addExistingWebPage): Added assertions for page map sanity.
1920 (WebKit::WebProcessProxy::removeWebPage): Added a check for page state being Terminated
1921 already. This avoids an assertion failure that happened under the new call to
1922 removeWebPage() in reattachToWebProcess(), as we are now calling it for terminated
1923 processes that are not in WebContext::m_processes any more.
1924 (WebKit::WebProcessProxy::didFinishLaunching): Added an assertion that page agrees
1925 about using this process.
1927 2014-08-15 Gavin Barraclough <barraclough@apple.com>
1929 Fix plugin visibility check.
1930 https://bugs.webkit.org/show_bug.cgi?id=135991
1932 D'oh, more unreviewed typo fix. :-(
1934 * PluginProcess/PluginControllerProxy.cpp:
1935 (WebKit::PluginControllerProxy::visibilityDidChange):
1936 (WebKit::PluginControllerProxy::windowVisibilityChanged):
1937 (WebKit::PluginControllerProxy::updateVisibilityActivity):
1938 (WebKit::PluginControllerProxy::updateVisiblityActivity): Deleted.
1939 * PluginProcess/PluginControllerProxy.h:
1941 2014-08-15 Wenson Hsieh <wenson_hsieh@apple.com>
1943 Implement snapping behavior for iOS
1944 https://bugs.webkit.org/show_bug.cgi?id=135769
1946 Reviewed by Brent Fulgham.
1948 Added support for snap points on iOS.
1950 * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
1951 (ArgumentCoder<ScrollingStateScrollingNode>::encode): Added snap offset encoding.
1952 (ArgumentCoder<ScrollingStateScrollingNode>::decode): Added snap offset decoding.
1953 * UIProcess/API/Cocoa/WKWebView.mm:
1954 (-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]): For mainframe scrolling, retargets the scroll destination to the appropriate snap point.
1955 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h: Added methods to extract relevant information for WKWebView from snap offsets in mainframe scrolling.
1956 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
1957 (-[WKOverflowScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset:]): For overflow scrolling, retargets the scroll destination to the appropriate snap point.
1958 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren): Sets the deceleration factor to FAST if snap points are active.
1959 * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
1960 (WebKit::RemoteScrollingCoordinatorProxy::adjustTargetContentOffsetForSnapping): Used by WKWebView for mainframe scrolling to retarget the scroll destination, if necessary.
1961 (WebKit::RemoteScrollingCoordinatorProxy::shouldSetScrollViewDecelerationRateFast): Used by WKWebView for mainframe scrolling to determine whether to set deceleration rate to the fast value.
1962 (WebKit::RemoteScrollingCoordinatorProxy::shouldSnapForMainFrameScrolling): Helper method.
1963 (WebKit::RemoteScrollingCoordinatorProxy::closestSnapOffsetForMainFrameScrolling): Helper method.
1965 2014-08-15 Gavin Barraclough <barraclough@apple.com>
1967 Fix plugin visibility check.
1968 https://bugs.webkit.org/show_bug.cgi?id=135991
1970 Unreviewed typo fix.
1972 * PluginProcess/PluginControllerProxy.cpp:
1973 (WebKit::PluginControllerProxy::PluginControllerProxy):
1974 (WebKit::PluginControllerProxy::visibilityDidChange):
1975 (WebKit::PluginControllerProxy::windowVisibilityChanged):
1976 (WebKit::PluginControllerProxy::updateVisibilityActivity):
1977 * PluginProcess/PluginControllerProxy.h:
1979 2014-08-15 Gavin Barraclough <barraclough@apple.com>
1981 Fix plugin visibility check.
1982 https://bugs.webkit.org/show_bug.cgi?id=135991
1984 Reviewed by Andreas Kling.
1986 We should only take a UserActivity if the plugin is in a visible window,
1987 and also is itself visible.
1989 * PluginProcess/PluginControllerProxy.cpp:
1990 (WebKit::PluginControllerProxy::PluginControllerProxy):
1991 - initialize member state.
1992 (WebKit::PluginControllerProxy::visibilityDidChange):
1993 (WebKit::PluginControllerProxy::windowVisibilityChanged):
1994 - update member state & call updateVisibilityActivity.
1995 (WebKit::PluginControllerProxy::updateVisibilityActivity):
1996 - enable the UserActivity only if both visibilities are true.
1997 * PluginProcess/PluginControllerProxy.h:
1998 - added m_isVisible, m_isWindowVisible, updateVisibilityActivity.
2000 2014-08-15 Enrica Casucci <enrica@apple.com>
2002 [Services with UI] Selections are incorrect when selecting three lines.
2003 https://bugs.webkit.org/show_bug.cgi?id=135989
2004 <rdar://problem/18032571>
2006 Reviewed by Tim Horton.
2008 The stitching algorithm did not handle correctly the case of selections
2009 over three lines if the middle line is composed of only one rectangle.
2011 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
2012 (WebKit::stitchRects):
2014 2014-08-15 Tim Horton <timothy_horton@apple.com>
2016 Service overlays stay fixed when <iframe> scrolls
2017 https://bugs.webkit.org/show_bug.cgi?id=135959
2018 <rdar://problem/17957716>
2020 Reviewed by Enrica Casucci.
2022 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
2023 (WebKit::ServicesOverlayController::highlightsAreEquivalent):
2024 Tiny correctness fix; highlights can only be equivalent if their
2025 types are equivalent as well.
2027 2014-08-15 Gavin Barraclough <barraclough@apple.com>
2029 de-PLATFORM(COCOA) a couple of methods in plugin code
2030 https://bugs.webkit.org/show_bug.cgi?id=135987
2032 Reviewed by Sam Weinig.
2034 Pass through the visibility & focus on all platforms, to simplify & avoid
2035 any weird inconsistencies between platforms.
2037 * PluginProcess/PluginControllerProxy.cpp:
2038 (WebKit::PluginControllerProxy::windowFocusChanged):
2039 (WebKit::PluginControllerProxy::windowVisibilityChanged):
2040 * PluginProcess/PluginControllerProxy.h:
2041 * PluginProcess/PluginControllerProxy.messages.in:
2042 * PluginProcess/mac/PluginControllerProxyMac.mm:
2043 (WebKit::PluginControllerProxy::windowFocusChanged): Deleted.
2044 (WebKit::PluginControllerProxy::windowVisibilityChanged): Deleted.
2045 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2046 (WebKit::NetscapePlugin::windowFocusChanged):
2047 (WebKit::NetscapePlugin::windowVisibilityChanged):
2048 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2049 * WebProcess/Plugins/Plugin.h:
2050 * WebProcess/Plugins/PluginProxy.cpp:
2051 (WebKit::PluginProxy::windowAndViewFramesChanged):
2052 * WebProcess/Plugins/PluginProxy.h:
2053 * WebProcess/Plugins/PluginView.cpp:
2054 (WebKit::PluginView::viewStateDidChange):
2055 (WebKit::PluginView::platformViewStateDidChange): Deleted.
2056 * WebProcess/Plugins/PluginView.h:
2058 2014-08-15 Tim Horton <timothy_horton@apple.com>
2060 Service overlays stay fixed when <iframe> scrolls
2061 https://bugs.webkit.org/show_bug.cgi?id=135959
2062 <rdar://problem/17957716>
2064 Reviewed by Enrica Casucci.
2066 * WebProcess/WebPage/PageOverlay.cpp:
2067 (WebKit::PageOverlay::didScrollFrame):
2068 * WebProcess/WebPage/PageOverlay.h:
2069 (WebKit::PageOverlay::Client::didScrollFrame):
2070 * WebProcess/WebPage/PageOverlayController.cpp:
2071 (WebKit::PageOverlayController::didScrollFrame):
2072 Push didScrollFrame down to the overlays.
2074 * WebProcess/WebPage/ServicesOverlayController.h:
2075 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
2076 (WebKit::ServicesOverlayController::Highlight::createForSelection):
2077 Hold on to the selection's Range so we can use it to compare Highlights later.
2079 (WebKit::ServicesOverlayController::Highlight::Highlight):
2080 (WebKit::ServicesOverlayController::Highlight::setDDHighlight):
2081 Factor the code to set up and paint the highlight out, so that we can
2082 set a new DDHighlightRef on a Highlight and the layer moves/reshapes/repaints.
2084 (WebKit::ServicesOverlayController::buildPhoneNumberHighlights):
2085 (WebKit::ServicesOverlayController::buildSelectionHighlight):
2086 (WebKit::ServicesOverlayController::replaceHighlightsOfTypePreservingEquivalentHighlights):
2087 Factor replaceHighlightsOfTypePreservingEquivalentHighlights out
2088 so that we can use it for buildSelectionHighlight as well.
2090 Steal the DDHighlightRef from the new Highlight when re-using an old one
2091 so that the newly computed rects are used instead of the old ones.
2093 (WebKit::ServicesOverlayController::highlightsAreEquivalent):
2094 We will always have a Range now, so we can always check equivalence using it.
2096 (WebKit::ServicesOverlayController::didScrollFrame):
2097 Rebuild all highlights upon subframe scroll, as they might have moved.
2098 We could optimize this in the future, but for now it's cheap enough
2099 and rare enough that it doesn't matter.
2101 2014-08-15 Tim Horton <timothy_horton@apple.com>
2103 REGRESSION (WebKit2 Gestures): White flash when swiping back to cnn.com's homepage from an article
2104 https://bugs.webkit.org/show_bug.cgi?id=135951
2105 <rdar://problem/18006149>
2107 Reviewed by Simon Fraser.
2109 Wait for (the first visually non-empty layout AND the render tree size threshold to be hit),
2110 OR didFinishLoadForFrame, whichever comes first. Once we've done the first visually non-empty layout,
2111 we'll start the watchdog and tear down the snapshot in three seconds no matter what.
2112 Also, force a repaint so we can asynchronously wait for the Web Process to paint and return to us
2113 before removing the snapshot, which improves our chances that something is actually on the screen.
2115 * UIProcess/API/mac/WKView.mm:
2116 (-[WKView _didFirstVisuallyNonEmptyLayoutForMainFrame]):
2117 (-[WKView _didFinishLoadForMainFrame]):
2118 (-[WKView _removeNavigationGestureSnapshot]):
2119 * UIProcess/API/mac/WKViewInternal.h:
2120 * UIProcess/PageClient.h:
2121 * UIProcess/WebPageProxy.cpp:
2122 (WebKit::WebPageProxy::didFinishLoadForFrame):
2123 (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
2124 (WebKit::WebPageProxy::removeNavigationGestureSnapshot):
2125 * UIProcess/WebPageProxy.h:
2126 * UIProcess/ios/PageClientImplIOS.h:
2127 * UIProcess/ios/PageClientImplIOS.mm:
2128 (WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):
2129 (WebKit::PageClientImpl::didFinishLoadForMainFrame):
2130 * UIProcess/mac/PageClientImpl.h:
2131 * UIProcess/mac/PageClientImpl.mm:
2132 (WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):
2133 (WebKit::PageClientImpl::didFinishLoadForMainFrame):
2134 (WebKit::PageClientImpl::removeNavigationGestureSnapshot):
2135 Plumb didFirstVisuallyNonEmptyLayoutForMainFrame and didFinishLoadForMainFrame
2136 through to ViewGestureController from WebPageProxy via the PageClient, etc.
2138 Ditto for removeNavigationGestureSnapshot, though it is called from a
2139 VoidCallback in ViewGestureController instead of from WebFrameLoaderClient and friends.
2141 * UIProcess/mac/ViewGestureController.h:
2142 * UIProcess/mac/ViewGestureControllerMac.mm:
2143 (WebKit::ViewGestureController::ViewGestureController):
2144 (WebKit::ViewGestureController::endSwipeGesture):
2145 When finishing a swipe, we want to wait for both the first visually non-empty layout
2146 and the render tree size threshold being hit.
2148 (WebKit::ViewGestureController::didHitRenderTreeSizeThreshold):
2149 (WebKit::ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame):
2150 When both of these things have happened, remove the swipe snapshot (after forcing a repaint).
2151 For didFirstVisuallyNonEmptyLayoutForMainFrame, we will also start a watchdog
2152 ensuring that we remove the snapshot in three seconds.
2154 (WebKit::ViewGestureController::didFinishLoadForMainFrame):
2155 When didFinishLoadForMainFrame happens, remove the swipe snapshot (after forcing a repaint).
2157 (WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired):
2158 If the watchdog timer fires, remove the swipe snapshot (after forcing a repaint).
2160 (WebKit::ViewGestureController::removeSwipeSnapshotAfterRepaint):
2161 Force a repaint and wait for the async callback before removing the snapshot.
2162 It is safe to hold on to the WebPageProxy here because it will always
2163 call all of its callbacks before it is destroyed.
2164 Avoid enqueuing multiple force-repaints.
2166 (WebKit::ViewGestureController::removeSwipeSnapshot):
2168 2014-08-15 Gavin Barraclough <barraclough@apple.com>
2170 Fix plugin visibility initialization
2171 https://bugs.webkit.org/show_bug.cgi?id=135985
2173 Reviewed by Geoffrey Garen.
2175 * WebProcess/Plugins/PluginView.cpp:
2176 (WebKit::PluginView::didInitializePlugin):
2177 - We're not currently initializing the plugin visibility state,
2178 and we're passing the wrong value for window visibility.
2180 2014-08-15 Gavin Barraclough <barraclough@apple.com>
2182 Simplify visibility activity accounting for plugins
2183 https://bugs.webkit.org/show_bug.cgi?id=135981
2185 Reviewed by Dan Bernstein.
2187 Just take one per connection, rather than implementing a counting mechanism.
2189 * PluginProcess/PluginControllerProxy.cpp:
2190 (WebKit::PluginControllerProxy::PluginControllerProxy):
2191 * PluginProcess/PluginControllerProxy.h:
2192 - added m_visiblityActivity.
2193 * PluginProcess/PluginProcess.cpp:
2194 (WebKit::PluginProcess::PluginProcess):
2195 (WebKit::PluginProcess::pluginsForWebProcessDidBecomeVisible): Deleted.
2196 (WebKit::PluginProcess::pluginsForWebProcessDidBecomeHidden): Deleted.
2197 * PluginProcess/PluginProcess.h:
2198 - removed pluginsForWebProcessDidBecomeVisible/Hidden.
2199 * PluginProcess/WebProcessConnection.cpp:
2200 (WebKit::WebProcessConnection::removePluginControllerProxy):
2201 (WebKit::WebProcessConnection::pluginDidBecomeVisible): Deleted.
2202 (WebKit::WebProcessConnection::pluginDidBecomeHidden): Deleted.
2203 * PluginProcess/WebProcessConnection.h:
2204 - removed pluginDidBecomeVisible/Hidden.
2205 * PluginProcess/mac/PluginControllerProxyMac.mm:
2206 (WebKit::PluginControllerProxy::windowVisibilityChanged):
2207 - windowVisibilityChanged uses m_visiblityActivity, rather than calling to PluginControllerProxy.
2209 2014-08-15 Carlos Garcia Campos <cgarcia@igalia.com>
2211 Unreviewed. Update OptionsGTK.cmake and NEWS for 2.5.3 release.
2213 * gtk/NEWS: Add release notes for 2.5.3.
2215 2014-08-14 Enrica Casucci <enrica@apple.com>
2217 [Services with UI] Selection services don't work inside <iframes>.
2218 https://bugs.webkit.org/show_bug.cgi?id=135941
2219 <rdar://problem/17957690>
2221 Reviewed by Tim Horton.
2223 Need to map the selection rectangles using the correct FrameView.
2224 When handling the click, we must use the selection from the focused frame.
2226 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
2227 (WebKit::ServicesOverlayController::buildSelectionHighlight):
2228 (WebKit::ServicesOverlayController::handleClick):
2230 2014-08-13 Mark Rowe <mrowe@apple.com>
2232 <https://webkit.org/b/135909> Move helper applications out of the root of the framework.
2234 As described in <https://developer.apple.com/library/mac/technotes/tn2206/>, for bundles containing
2235 a Versions directory there may be no other content at the top level of the bundle other than symlinks.
2236 Upcoming changes to code signing will prevent bundles that violate this rule from being signed.
2238 Reviewed by Sam Weinig.
2240 * Configurations/Base.xcconfig: Define a configuration setting that points to the content directory
2241 of the framework. On OS X this is Versions/A. On iOS, where frameworks are shallow, this is the top level.
2242 * Configurations/BaseLegacyProcess.xcconfig: Install the legacy processes in the content directory
2244 * WebKit2.xcodeproj/project.pbxproj: Copy the legacy processes into the content directory of the
2245 framework during engineering builds. Generate symlinks for the legacy processes to their locations
2246 in Versions/Current. This is necessary because -[NSBundle pathForAuxiliaryExecutable:] only looks
2247 at the top level of the framework wrapper.
2249 2014-08-14 Michael Catanzaro <mcatanzaro@igalia.com>
2251 WebKit2GTK - WebKitWebProcess assertion fails when dragging and dropping a file into the view
2252 https://bugs.webkit.org/show_bug.cgi?id=127576
2254 Reviewed by Carlos Garcia Campos.
2256 * UIProcess/WebPageProxy.cpp:
2257 (WebKit::WebPageProxy::performDragControllerAction): Assume read access
2258 to any file that has been dragged into the web view when compiling for
2259 GTK, since we don't support sandbox extensions.
2261 2014-08-13 Wenson Hsieh <wenson_hsieh@apple.com>
2263 Enable CSS_SCROLL_SNAP for iOS
2264 https://bugs.webkit.org/show_bug.cgi?id=135915
2266 Turn on CSS_SCROLL_SNAP for iOS and the iOS simulator.
2268 Reviewed by Tim Horton.
2270 * Configurations/FeatureDefines.xcconfig:
2272 2014-08-13 Enrica Casucci <enrica@apple.com>
2274 [Services with UI] Use a longer delay duration for editable content.
2275 https://bugs.webkit.org/show_bug.cgi?id=135918
2276 <rdar://problem/17998929>
2278 Reviewed by Tim Horton.
2280 Use a 1 second delay for selections in editable content.
2282 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
2283 (WebKit::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
2285 2014-08-13 Mark Rowe <mrowe@apple.com>
2287 <https://webkit.org/b/135911> WebKit should build on Yosemite with the public SDK.
2289 Reviewed by Darin Adler.
2291 * Platform/IPC/mac/ImportanceAssertion.h: Forward-declare the new assertion functions we use.
2292 * UIProcess/mac/WebContextMenuProxyMac.mm: Forward-declare some details related to NSSharingServicePicker.
2294 2014-08-13 Alexey Proskuryakov <ap@apple.com>
2298 * UIProcess/WebContext.cpp:
2299 (WebKit::WebContext::ensureNetworkProcess):
2300 (WebKit::WebContext::createNewWebProcess):
2302 2014-08-13 Joseph Pecoraro <pecoraro@apple.com>
2304 Opening Web Inspector causes a large amount of sandbox violations
2305 https://bugs.webkit.org/show_bug.cgi?id=135908
2307 Reviewed by Timothy Hatcher.
2309 * WebProcess/com.apple.WebProcess.sb.in:
2310 Permit the WebContent process to create file read extensions for the
2311 system WebInspectorUI.framework which the Network process can already
2314 2014-08-13 Tim Horton <timothy_horton@apple.com>
2316 Avoid making new active service overlay highlights while the mouse is down
2317 https://bugs.webkit.org/show_bug.cgi?id=135872
2318 <rdar://problem/17982341>
2320 Reviewed by Enrica Casucci.
2322 * WebProcess/WebPage/ServicesOverlayController.h:
2323 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
2324 (WebKit::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
2325 (WebKit::ServicesOverlayController::mouseEvent):
2326 If the mouse is pressed or it's been less than 200ms since the mouse went up,
2327 don't allow the highlight to change. We apply the mouse-is-pressed rule to telephone
2328 number highlights as well, unlike the rest of the hysteresis logic.
2330 2014-08-13 Timothy Hatcher <timothy@apple.com>
2332 Web Inspector: Workaround a NSWindow change to the title bar.
2333 https://bugs.webkit.org/show_bug.cgi?id=135880
2335 Reviewed by Joseph Pecoraro.
2337 * UIProcess/mac/WebInspectorProxyMac.mm:
2338 (WebKit::WebInspectorProxy::createInspectorWindow): Set titlebarAppearsTransparent on 10.10.
2339 Only call border thickness APIs on 10.9 and earlier.
2340 (WebKit::WebInspectorProxy::platformCreateInspectorPage): Only call setDrawsBackground: on 10.9 and earlier.
2341 (WebKit::WebInspectorProxy::platformSetToolbarHeight): Only call setContentBorderThickness: on 10.9 and earlier.
2343 2014-08-13 Ryuan Choi <ryuan.choi@samsung.com>
2345 [EFL] Add API to set application name for the user agent
2346 https://bugs.webkit.org/show_bug.cgi?id=135640
2348 Reviewed by Gyuyoung Kim.
2350 Add ewk_application_name_for_user_agent_set to make default user agent string
2351 with application name which application passes.
2352 It's useful for application to set only application information without knowledge
2353 of legacy user agent components.
2355 * UIProcess/API/efl/EwkView.cpp:
2357 (EwkView::setApplicationNameForUserAgent):
2358 * UIProcess/API/efl/EwkView.h:
2359 (EwkView::applicationNameForUserAgent):
2360 * UIProcess/API/efl/ewk_view.cpp:
2361 (ewk_view_application_name_for_user_agent_set):
2362 (ewk_view_application_name_for_user_agent_get):
2363 * UIProcess/API/efl/ewk_view.h:
2364 * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2366 * UIProcess/efl/WebPageProxyEfl.cpp:
2367 (WebKit::WebPageProxy::standardUserAgent):
2369 2014-08-12 Carlos Garcia Campos <cgarcia@igalia.com>
2371 [CMAKE] WebProcess shouldn't need to explicitly link to JavaScriptCore and WebCore
2372 https://bugs.webkit.org/show_bug.cgi?id=135832
2374 Reviewed by Gyuyoung Kim.
2376 Linking to WebKit2 should be enough, like Network and Plugin processes.
2380 2014-08-12 Tim Horton <timothy_horton@apple.com>
2382 Document-relative page overlays drop some mouse events with non-zero top content inset
2383 https://bugs.webkit.org/show_bug.cgi?id=135871
2384 <rdar://problem/17982275>
2386 Reviewed by Beth Dakin.
2388 * WebProcess/WebPage/PageOverlay.cpp:
2389 (WebKit::PageOverlay::mouseEvent):
2390 Convert the mouse position into document-relative coordinates; the bounds()
2391 already are! This way, we can actually compare them without being wrong sometimes.
2393 2014-08-12 Peyton Randolph <prandolph@apple.com>
2395 Runtime switch for long mouse press gesture. Part of 135257 - Add long mouse press gesture
2396 https://bugs.webkit.org/show_bug.cgi?id=135682
2398 Reviewed by Tim Horton.
2400 * Configurations/FeatureDefines.xcconfig: Remove LONG_MOUSE_PRESS feature flag.
2401 * Shared/WebPreferencesDefinitions.h:
2402 Add LongMousePressEnabled preference, initially false.
2403 * UIProcess/API/C/WKPreferences.cpp:
2404 (WKPreferencesSetLongMousePressEnabled): Added.
2405 (WKPreferencesGetLongMousePressEnabled): Added.
2406 * UIProcess/API/C/WKPreferencesRefPrivate.h:
2407 * WebProcess/WebPage/WebPage.cpp:
2408 (WebKit::WebPage::updatePreferences):
2409 Reflect the WebKit long mouse press setting in WebCore.
2411 2014-08-12 Pratik Solanki <psolanki@apple.com>
2413 Cached file backed resources don't make it to the Web Process when NETWORK_CFDATA_ARRAY_CALLBACK is enabled
2414 https://bugs.webkit.org/show_bug.cgi?id=135727
2415 <rdar://problem/17947880>
2417 Reviewed by Darin Adler.
2419 tryGetShareableHandleFromSharedBuffer() assumed that we have a file backed resource only if
2420 we had a CFDataRef (platformData()) in SharedBuffer. This is wrong when we use the data
2421 array callbacks since the file backed buffer could be in the data array. Instead of relying
2422 on hasPlatformData(), explicitly ask the SharedBuffer to give us a CFDataRef if it has one
2423 so that SharedBuffer can take care of the data array case.
2425 * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
2426 (WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer):
2428 2014-08-12 Alexey Proskuryakov <ap@apple.com>
2430 REGRESSION: WebContent process has a sandbox extension for the entirety of user's temp directory
2431 https://bugs.webkit.org/show_bug.cgi?id=135853
2432 <rdar://problem/17986556>
2434 Reviewed by Oliver hunt.
2436 Move extensions recently added for iOS benefit under PLATFORM(IOS). Removed some
2437 dead code while at it (child processes don't need actual paths, they only need
2438 sandbox extensions in most cases).
2440 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2441 (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
2442 * Shared/Network/NetworkProcessCreationParameters.cpp:
2443 (WebKit::NetworkProcessCreationParameters::encode):
2444 (WebKit::NetworkProcessCreationParameters::decode):
2445 * Shared/Network/NetworkProcessCreationParameters.h:
2446 * Shared/WebProcessCreationParameters.cpp:
2447 (WebKit::WebProcessCreationParameters::encode):
2448 (WebKit::WebProcessCreationParameters::decode):
2449 * Shared/WebProcessCreationParameters.h:
2450 * UIProcess/WebContext.cpp:
2451 (WebKit::WebContext::ensureNetworkProcess):
2452 (WebKit::WebContext::createNewWebProcess):
2453 (WebKit::WebContext::openGLCacheDirectory): Deleted.
2454 (WebKit::WebContext::networkingHSTSDatabasePath): Deleted.
2455 * UIProcess/WebContext.h:
2456 * UIProcess/efl/WebContextEfl.cpp:
2457 (WebKit::WebContext::containerTemporaryDirectory): Deleted.
2458 (WebKit::WebContext::platformDefaultNetworkingHSTSDatabasePath): Deleted.
2459 * UIProcess/gtk/WebContextGtk.cpp:
2460 (WebKit::WebContext::containerTemporaryDirectory): Deleted.
2461 (WebKit::WebContext::platformDefaultNetworkingHSTSDatabasePath): Deleted.
2462 * UIProcess/mac/WebContextMac.mm:
2463 (WebKit::WebContext::openGLCacheDirectory):
2464 (WebKit::WebContext::parentBundleDirectory):
2465 (WebKit::WebContext::networkingHSTSDatabasePath):
2466 (WebKit::WebContext::platformDefaultOpenGLCacheDirectory): Deleted.
2467 (WebKit::WebContext::platformDefaultNetworkingHSTSDatabasePath): Deleted.
2468 * WebProcess/cocoa/WebProcessCocoa.mm:
2469 (WebKit::WebProcess::platformInitializeWebProcess):
2471 2014-08-12 Tim Horton <timothy_horton@apple.com>
2473 Small region (~1px tall) where you get the selection button instead of the phone number overlay
2474 https://bugs.webkit.org/show_bug.cgi?id=135852
2475 <rdar://problem/17992795>
2477 Reviewed by Enrica Casucci.
2479 * WebProcess/WebPage/ServicesOverlayController.h:
2480 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
2481 (WebKit::ServicesOverlayController::findTelephoneNumberHighlightContainingSelectionHighlight):
2482 (WebKit::ServicesOverlayController::determineActiveHighlight):
2483 If our new active highlight is a selection highlight that is completely contained
2484 by one of the phone number highlights, we'll make the phone number highlight active
2485 even if it's not hovered. This fixes the case where the selection highlight
2486 (a subset of a telephone number) is slightly taller than the telephone number
2487 highlight, and can be hovered without hovering the phone number highlight.
2489 2014-08-12 Tim Horton <timothy_horton@apple.com>
2491 REGRESSION (r172424): Extra menu header in combined telephone number menu when no phone paired
2492 https://bugs.webkit.org/show_bug.cgi?id=135854
2493 <rdar://problem/17996339>
2495 Reviewed by Enrica Casucci.
2497 * UIProcess/mac/WebContextMenuProxyMac.mm:
2498 (WebKit::WebContextMenuProxyMac::setupServicesMenu):
2499 Get all the menu items ahead of time, and only add the shared header
2500 if there are any telephone number menu items.
2502 2014-08-12 Enrica Casucci <enrica@apple.com>
2504 Crash at com.apple.WebKit.WebContent at com.apple.WebKit: WebKit::expandForGap
2505 https://bugs.webkit.org/show_bug.cgi?id=135859
2506 <rdar://problem/17994679>
2508 Reviewed by Tim Horton.
2510 expandForGap made the assumption that the selection rects were always three.
2511 This was not true even before http://trac.webkit.org/changeset/172395 but
2512 was more likely to happen after that change.
2514 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
2515 (WebKit::expandForGap):
2517 2014-08-12 Tim Horton <timothy_horton@apple.com>
2519 Don't show the combined menu if there are no services available
2520 https://bugs.webkit.org/show_bug.cgi?id=135846
2521 <rdar://problem/17582099>
2523 Reviewed by Enrica Casucci.
2525 * WebProcess/WebPage/ServicesOverlayController.h:
2528 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
2529 (WebKit::ServicesOverlayController::determineActiveHighlight):
2530 Don't allow a selection Highlight to become active if there is no
2531 service available to handle it. Previously we showed the combined menu
2532 with just phone numbers in it if any were detected.
2534 2014-08-12 Tim Horton <timothy_horton@apple.com>
2536 Add a fade transition to services highlights
2537 https://bugs.webkit.org/show_bug.cgi?id=135829
2538 <rdar://problem/17935736>
2540 Reviewed by Enrica Casucci.
2542 Add a smooth fade to highlight installation and uninstallation.
2543 To do so, we make each highlight paint into its own small layer.
2545 * WebProcess/WebPage/PageOverlay.cpp:
2546 (WebKit::PageOverlay::layer):
2547 * WebProcess/WebPage/PageOverlay.h:
2548 * WebProcess/WebPage/PageOverlayController.cpp:
2549 (WebKit::PageOverlayController::layerForOverlay):
2550 * WebProcess/WebPage/PageOverlayController.h:
2551 Expose the GraphicsLayer on PageOverlay.
2553 * WebProcess/WebPage/ServicesOverlayController.h:
2554 (WebKit::ServicesOverlayController::Highlight::layer):
2555 (WebKit::ServicesOverlayController::activeHighlight):
2556 (WebKit::ServicesOverlayController::webPage):
2557 (WebKit::ServicesOverlayController::Highlight::Highlight): Deleted.
2559 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
2560 (WebKit::ServicesOverlayController::Highlight::createForSelection):
2561 (WebKit::ServicesOverlayController::Highlight::createForTelephoneNumber):
2562 (WebKit::ServicesOverlayController::Highlight::Highlight):
2563 Highlights now own a GraphicsLayer, which are later installed
2564 as sublayers of the ServicesOverlayController's PageOverlay layer.
2565 These layers are sized and positioned according to the DDHighlight's bounds.
2567 (WebKit::ServicesOverlayController::Highlight::~Highlight):
2568 (WebKit::ServicesOverlayController::Highlight::invalidate):
2569 ServicesOverlayController will invalidate any remaining highlights
2570 when it is torn down, so they can clear their backpointers.
2572 (WebKit::ServicesOverlayController::Highlight::notifyFlushRequired):
2573 Forward flush notifications to the DrawingArea.
2575 (WebKit::ServicesOverlayController::Highlight::paintContents):
2576 Paint the DDHighlight into the layer. Translation is done by the layer position,
2577 so we zero the bounds origin when painting.
2579 (WebKit::ServicesOverlayController::Highlight::deviceScaleFactor):
2580 Forward the deviceScaleFactor so that things are painted at the right scale.
2582 (WebKit::ServicesOverlayController::Highlight::fadeIn):
2583 (WebKit::ServicesOverlayController::Highlight::fadeOut):
2584 Apply a fade animation to the layer.
2586 (WebKit::ServicesOverlayController::Highlight::didFinishFadeOutAnimation):
2587 When the fade completes, unparent the layer, unless it has become active again.
2589 (WebKit::ServicesOverlayController::ServicesOverlayController):
2590 (WebKit::ServicesOverlayController::~ServicesOverlayController):
2591 Invalidate all highlights, so they can clear their backpointers.
2593 (WebKit::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
2594 Make remainingTimeUntilHighlightShouldBeShown act upon a particular highlight
2595 instead of always the active highlight.
2597 (WebKit::ServicesOverlayController::determineActiveHighlightTimerFired): Rename.
2599 (WebKit::ServicesOverlayController::drawRect):
2600 drawRect is no longer called and will no longer do anything; all of the
2601 painting is done in sublayers.
2603 (WebKit::ServicesOverlayController::buildPhoneNumberHighlights):
2604 Ensure that phone number Highlights stay stable even while the selection
2605 changes, by comparing the underlying Ranges and keeping around old Highlights
2606 that match the new ones. This enables us to e.g. fade in while changing
2607 the selection within a phone number.
2609 (WebKit::ServicesOverlayController::buildSelectionHighlight):
2610 (WebKit::ServicesOverlayController::didRebuildPotentialHighlights):
2611 (WebKit::ServicesOverlayController::createOverlayIfNeeded):
2612 Don't call setNeedsDisplay; the overlay doesn't have backing store.
2613 Instead, call determineActiveHighlight, which will install/uninstall
2614 highlights as necessary.
2616 (WebKit::ServicesOverlayController::determineActiveHighlight):
2617 Apply fade in/fade out to the overlays.
2618 Keep track of which highlight we're going to activate, until the hysteresis
2619 delay is up, then actually make it active/parent it/fade it in.
2620 We now will have no active highlight between the fade out of the previous one
2621 and the fade in of the new one (during the hysteresis delay).
2623 (WebKit::ServicesOverlayController::mouseEvent):
2624 The overlay now will not become active until the delay is up, so we don't
2625 need to check it again here.
2627 (WebKit::ServicesOverlayController::handleClick):
2628 (WebKit::ServicesOverlayController::didCreateHighlight):
2629 (WebKit::ServicesOverlayController::willDestroyHighlight):
2630 (WebKit::ServicesOverlayController::repaintHighlightTimerFired): Deleted.
2631 (WebKit::ServicesOverlayController::drawHighlight): Deleted.
2633 2014-08-11 Andy Estes <aestes@apple.com>
2635 [iOS] Get rid of iOS.xcconfig
2636 https://bugs.webkit.org/show_bug.cgi?id=135809
2638 Reviewed by Joseph Pecoraro.
2640 All iOS.xcconfig did was include AspenFamily.xcconfig, so there's no need for the indirection.
2642 * Configurations/Base.xcconfig:
2643 * Configurations/iOS.xcconfig: Removed.
2644 * WebKit2.xcodeproj/project.pbxproj:
2646 2014-08-12 Grzegorz Czajkowski <g.czajkowski@samsung.com>
2648 [EFL] Rename ewk_private.h to EwkDebug.h
2649 https://bugs.webkit.org/show_bug.cgi?id=135797
2651 Reviewed by Gyuyoung Kim.
2653 ewk_private.h contains only debug macros alllowing
2656 * UIProcess/API/efl/EwkView.cpp:
2657 * UIProcess/API/efl/ewk_main.cpp:
2658 * UIProcess/efl/EwkDebug.h: Renamed from Source/WebKit2/UIProcess/API/efl/ewk_private.h.
2659 * UIProcess/efl/ViewClientEfl.cpp:
2661 2014-08-12 Carlos Garcia Campos <cgarcia@igalia.com>
2663 [GTK] The plugins metadata cache doesn't work if the user cache directory doesn't exist
2664 https://bugs.webkit.org/show_bug.cgi?id=135834
2666 Reviewed by Philippe Normand.
2668 Make sure the user cache directory exists. If creating the
2669 directory fails for whatever reason, do not try to save the cache
2672 * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
2673 (WebKit::PluginInfoCache::PluginInfoCache):
2674 (WebKit::PluginInfoCache::updatePluginInfo):
2676 2014-08-12 Alexey Proskuryakov <ap@apple.com>
2678 [Mac] Allow reading CoreGraphics debugging preferences
2679 https://bugs.webkit.org/show_bug.cgi?id=135821
2680 <rdar://problem/11219259>
2682 Reviewed by Darin Adler.
2684 * WebProcess/com.apple.WebProcess.sb.in:
2686 2014-08-11 Grzegorz Czajkowski <g.czajkowski@samsung.com>
2688 [EFL] Prevent the client from creating ewk_view when EWebkit is not initialized
2689 https://bugs.webkit.org/show_bug.cgi?id=135606
2691 Reviewed by Gyuyoung Kim.
2693 Similarly to EFL modules (eina, evas etc.), application using EWebKit
2694 has to initialize it using ewk_init().
2696 Do not allow the client to create ewk_view if ewk_init has not been called.
2697 Add an appropriate logs warning the client about wrong APIs usage.
2699 * UIProcess/API/efl/ewk_main.cpp: Add EwkMain class to control ewk lifetime.
2700 (WebKit::EwkMain::EwkMain):
2701 (WebKit::EwkMain::shared):
2702 (WebKit::EwkMain::~EwkMain): Add logs when the client forgot to destroy EWebkit.
2703 (WebKit::EwkMain::initialize):
2704 (WebKit::EwkMain::finalize):
2705 (WebKit::EwkMain::shutdownInitializedEFLModules):
2708 * UIProcess/API/efl/ewk_main_private.h: Added.
2709 (WebKit::EwkMain::isInitialized):
2710 (WebKit::EwkMain::logDomainId):
2711 * UIProcess/API/efl/ewk_private.h:
2712 * UIProcess/API/efl/ewk_view.cpp:
2714 Prevent the client from creating ewk_view when ewk_init() has not been called.
2716 2014-08-11 Enrica Casucci <enrica@apple.com>
2718 Improve look and feel of combined service menu..
2719 https://bugs.webkit.org/show_bug.cgi?id=135824
2720 <rdar://problem/17936880>
2722 Reviewed by Tim Horton.
2724 When showing the combined menu, list the phone numbers first,
2725 grouped under a common header, followed by the entries relative
2728 * Platform/mac/MenuUtilities.h:
2729 * Platform/mac/MenuUtilities.mm:
2730 (WebKit::menuItemTitleForTelephoneNumberGroup):
2731 (WebKit::menuItemForTelephoneNumber):
2732 * UIProcess/mac/WebContextMenuProxyMac.mm:
2733 (WebKit::WebContextMenuProxyMac::setupServicesMenu):
2735 2014-08-11 Joseph Pecoraro <pecoraro@apple.com>
2737 Add Private WKPreferences API for developer extras (show inspector)
2738 https://bugs.webkit.org/show_bug.cgi?id=135811
2740 Reviewed by Timothy Hatcher.
2742 * UIProcess/API/Cocoa/WKPreferences.mm:
2743 (-[WKPreferences _developerExtrasEnabled]):
2744 (-[WKPreferences _setDeveloperExtrasEnabled:]):
2745 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2747 2014-08-08 Enrica Casucci <enrica@apple.com>
2749 [Services with UI] Action menu arrow hit testing is sometimes wrong.
2750 https://bugs.webkit.org/show_bug.cgi?id=135776
2751 <rdar://problem/17837670>
2753 Reviewed by Brady Eidson.
2755 There was a problem in the algorithm that stitches together the selection rectangles
2756 to be given to Data Detectors API.
2757 This change adds a new function that stiches together all the rects contributing to the
2758 first line, all the rects contributing to the last line and all the ones in the middle.
2759 This way we can have a maximum of 3 non overlapping rectangles.
2761 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
2762 (WebKit::stitchRects):
2763 (WebKit::compactRectsWithGapRects):
2765 2014-08-11 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2767 Unreviewed, EFL build fix since r172385.
2769 * PlatformEfl.cmake:
2771 2014-08-11 Carlos Garcia Campos <cgarcia@igalia.com>
2773 Unreviewed. Update OptionsGTK.cmake and NEWS for 2.5.2 release.
2775 * gtk/NEWS: Add release notes for 2.5.2.
2777 2014-08-10 Carlos Garcia Campos <cgarcia@igalia.com>
2779 [GTK] No IPC messages are sent when building WebKitGTK+ with VERSION_SCRIPT
2780 https://bugs.webkit.org/show_bug.cgi?id=135760
2782 Reviewed by Philippe Normand.
2784 The problem is that the threading initialization is failing
2785 because there are two copies of WTF, one in libjavascriptcoregtk
2786 and the other in libwebkit2gtk. When WebKit2 is initialized in the
2787 UI process, JSC::initializeThreading() is called first and then
2788 WTF::initializeMainThread(). The former is calling
2789 ThreadIdentifierData::initializeOnce() initializing the
2790 ThreadIdentifierData::m_key symbol in libjavascriptcoregtk, while
2791 the latter is using the ThreadIdentifierData API from libwebkit2gtk
2792 that hasn't been initialized.
2794 * CMakeLists.txt: Do not add WTF to the list of WebKit2 libraries,
2795 WebKit2 already depends on JavaScriptCore that already links to WTF.
2797 2014-08-10 Tim Horton <timothy_horton@apple.com>
2799 Yelp phone number highlights often disappear
2800 https://bugs.webkit.org/show_bug.cgi?id=135789
2801 <rdar://problem/17971057>
2803 Reviewed by Brady Eidson.
2805 Since selectedTelephoneNumberRangesChanged doesn't provide an associated
2806 Frame, an incoming selectedTelephoneNumberRangesChanged from a subframe
2807 would overwrite ServicesOverlayController's cached (and potentially active)
2808 telephone number highlights.
2810 This happens a lot on Yelp, because they have many subframes which are
2811 doing layout on a regular basis.
2813 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2814 (WebKit::WebEditorClient::selectedTelephoneNumberRangesChanged):
2815 * WebProcess/WebCoreSupport/WebEditorClient.h:
2816 Adjust to the new (lack of) arguments.
2818 * WebProcess/WebPage/ServicesOverlayController.h:
2819 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
2820 (WebKit::ServicesOverlayController::selectedTelephoneNumberRangesChanged):
2821 Adjust logging; we can revisit it later.
2823 (WebKit::ServicesOverlayController::buildPhoneNumberHighlights):
2824 When building phone number highlights, walk the Frame tree and retrieve
2825 them from all of the Editors.
2827 (WebKit::ServicesOverlayController::didRebuildPotentialHighlights):
2828 (WebKit::ServicesOverlayController::telephoneNumberRangesForFocusedFrame):
2829 (WebKit::ServicesOverlayController::determineActiveHighlight):
2830 (WebKit::ServicesOverlayController::handleClick):
2831 Retrieve the detected telephone number ranges from the focused frame
2832 when combining telephone numbers with selection services.
2833 This ensures that we don't show combined phone number highlights from other frames.
2835 2014-08-10 Tim Horton <timothy_horton@apple.com>
2837 Refactor ServiceOverlayController in preparation for fading between highlights
2838 https://bugs.webkit.org/show_bug.cgi?id=135787
2839 <rdar://problem/17935736>
2841 Reviewed by Brady Eidson.
2843 Rework ServicesOverlayController so that we always keep a set of generic
2844 "potential highlights", which are refcounted Highlight objects and
2845 wrap a DDHighlightRef, as well as a type (Selection or TelephoneNumber),
2846 Range (only used in the case of TelephoneNumber), and potentially more
2847 things in the future (like, say, fade state!).
2849 We eagerly update the list of potential highlights when the selection or set
2850 of detected telephone numbers changes, and use this information to install
2851 or uninstall the page overlay as needed.
2853 When we need to recompute the "active" highlight from this set (for example,
2854 we need to handle a mouse event or paint the highlight), we look through
2855 the set of potential highlights and decide. This moves the "active" highlight
2856 decision logic into one small and confined place.
2858 * WebProcess/WebPage/ServicesOverlayController.h:
2859 (WebKit::ServicesOverlayController::Highlight):
2860 Add the new aforementioned refcounted Highlight class.
2861 Rename m_lastHoveredHighlightChangeTime to m_lastActiveHighlightChangeTime.
2862 Make m_webPage a reference.
2863 The rest is just added/removed/adjusted functions for the refactoring.
2865 (WebKit::TelephoneNumberData::TelephoneNumberData): Deleted.
2866 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
2867 (WebKit::ServicesOverlayController::Highlight::createForSelection):
2868 (WebKit::ServicesOverlayController::Highlight::createForTelephoneNumber):
2869 Create Highlights for the two different highlight types.
2871 (WebKit::ServicesOverlayController::ServicesOverlayController):
2872 (WebKit::ServicesOverlayController::willMoveToWebPage):
2873 Our WebPage pointer is always valid because it owns us; don't clear it.
2874 We need to keep it around so that we can uninstall the overlay and
2875 install it again later, anyway.
2877 (WebKit::ServicesOverlayController::selectionRectsDidChange):
2878 (WebKit::ServicesOverlayController::selectedTelephoneNumberRangesChanged):
2879 When selection rects or detected telephone numbers change, rebuild potential highlights.
2880 This will have the side-effect of installing the overlay if needed.
2882 (WebKit::ServicesOverlayController::mouseIsOverHighlight):
2883 Make this function take a Highlight instead of a DDHighlightRef.
2885 (WebKit::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
2886 Make this function take a Highlight instead of a DDHighlightRef.
2888 (WebKit::ServicesOverlayController::drawHighlight):
2889 Make this function take a Highlight instead of a DDHighlightRef.
2890 There's no reason to do the translation separately from the layer blit,
2891 also allowing us to avoid the StateSaver.
2893 (WebKit::ServicesOverlayController::drawRect):
2894 drawRect now always paints the active highlight, instead of duplicating
2895 logic about which highlight should be active.
2896 Also, it will update the active highlight before painting.
2897 We no longer need to re-determine whether the active highlight's phone
2898 number range is still a valid phone number range, because we rebuild
2899 the potential highlights whenever the set of phone number ranges changes.
2901 (WebKit::ServicesOverlayController::clearActiveHighlight):
2902 Mostly an adoption of new names.
2904 (WebKit::ServicesOverlayController::removeAllPotentialHighlightsOfType):
2905 Run through the list of potential highlights and remove any of the given type.
2906 The two highlight building functions use this helper to clear the old ones before building.
2908 (WebKit::ServicesOverlayController::buildPhoneNumberHighlights):
2909 (WebKit::ServicesOverlayController::buildSelectionHighlight):
2910 Rebuild the list of potential highlights, replacing all highlights of
2911 the given type with new ones.
2913 (WebKit::ServicesOverlayController::hasRelevantSelectionServices):
2914 Factor out the code that decides whether our current selection is
2915 viable for servicing based on whether we have plain-text and/or rich-text services.
2917 (WebKit::ServicesOverlayController::didRebuildPotentialHighlights):
2918 When rebuilding potential highlights, if we have no potential highlights at all,
2919 uninstall the page overlay; we don't need mouse tracking and don't need to
2920 paint anything. This improves memory use and compositing performance significantly,
2921 where previously we were leaving the overlay up forever after creating it.
2923 If we have either detected telephone numbers or relevant selection services,
2924 create and install the overlay if it doesn't already exist.
2926 (WebKit::ServicesOverlayController::createOverlayIfNeeded):
2927 This just moved from elsehwere, except that it now uses FadeMode::DoNotFade.
2928 It doesn't make sense to fade on install/uninstall (which happens even before hover)
2929 but not on changing the active highlight; fading will be re-addressed in the next patch.
2931 (WebKit::ServicesOverlayController::highlightsAreEquivalent):
2932 Determine whether two highlights are equivalent. While we may have
2933 created a new Highlight at rebuild time, if two telephone number
2934 highlights have equivalent ranges, there's no need to 'transition' to the new one.
2936 (WebKit::ServicesOverlayController::determineActiveHighlight):
2937 Run through the list of services, and try to find one that is hovered.
2938 We prefer telephone number highlights to selection highlights, and
2939 we will never make a selection highlight active if it is both
2940 not serviceable and there are no telephone numbers to show in the combined menu.
2941 This is the centralized location for determination of which highlight
2942 should be considered active. If the active highlight changed, update
2943 the time since last change and cancel the mouse-down tracking.
2945 (WebKit::ServicesOverlayController::mouseEvent):
2946 Adjust some comments to be more explanatory.
2947 A bunch of code moved out of here and into determineActiveHighlight.
2949 (WebKit::ServicesOverlayController::handleClick):
2950 Adjust to take a reference and use Highlight instead of DDHighlightRef.
2952 2014-08-10 Timothy Hatcher <timothy@apple.com>
2954 Web Inspector: new glyphs are visible on OS X 10.9 builds
2955 https://bugs.webkit.org/show_bug.cgi?id=135743
2957 Reviewed by Joseph Pecoraro.
2959 * UIProcess/mac/WebInspectorProxyMac.mm:
2960 (WebKit::WebInspectorProxy::createInspectorWindow): Use 10100 instead of 1090 for the version.
2962 2014-08-10 Carlos Garcia Campos <cgarcia@igalia.com>
2964 [GTK] REGRESSION(r166239): The ld version script is not being used
2965 https://bugs.webkit.org/show_bug.cgi?id=135694
2967 Reviewed by Martin Robinson.
2969 * CMakeLists.txt: Add VERSION_SCRIPT to WebKit2 link flags if present.
2971 2014-08-09 Tim Horton <timothy_horton@apple.com>
2973 REGRESSION (r172301): Combined phone number highlight doesn't appear if rich content is selected and we have no rich content services
2974 https://bugs.webkit.org/show_bug.cgi?id=135785
2975 <rdar://problem/17969843>
2977 Reviewed by Brady Eidson.
2979 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
2980 (WebKit::ServicesOverlayController::drawSelectionHighlight):
2981 We can't early return in the rich-content-but-no-rich-services case
2982 if we have telephone numbers in the selection, because we want to offer
2983 them up in the combined menu.
2985 * UIProcess/mac/WebContextMenuProxyMac.mm:
2986 If we end up with no menu, because there were no services available,
2987 make a fresh one that we can fill with combined telephone number items.
2989 2014-08-08 Grzegorz Czajkowski <g.czajkowski@samsung.com>
2991 [EFL] Do not initialize g_type in WebProcessMain::platformInitialize()
2992 https://bugs.webkit.org/show_bug.cgi?id=135700
2994 Reviewed by Gyuyoung Kim.
2996 Inspired by r171788.
2997 Glib since 2.36 itself initializes g_type_init.
2999 * WebProcess/efl/WebProcessMainEfl.cpp:
3001 2014-08-08 Tim Horton <timothy_horton@apple.com>
3003 Build fix for 32-bit.
3005 * UIProcess/mac/ServicesController.mm:
3006 (WebKit::ServicesController::ServicesController):
3007 Don't dynamically refresh services in 32-bit apps. It's not possible
3008 to write a 32-bit app with the Modern API, so this doesn't matter.
3010 2014-08-08 Tim Horton <timothy_horton@apple.com>
3012 [mac] Dynamically update serviceability when the set of services changes
3013 https://bugs.webkit.org/show_bug.cgi?id=135738
3014 <rdar://problem/17533459>
3016 Reviewed by Brady Eidson.
3018 * UIProcess/WebContext.cpp:
3019 (WebKit::WebContext::createNewWebProcess):
3020 Adopt the new universal refreshExistingServices.
3022 (WebKit::WebContext::refreshExistingServices): Deleted.
3023 * UIProcess/WebContext.h:
3024 Remove WebContext::refreshExistingServices; there's no need for it.
3026 * UIProcess/mac/ServicesController.h:
3027 * UIProcess/mac/ServicesController.mm:
3028 Fix the build with only public headers by including NSSharingService.h itself.
3029 Place the NSSharingServicePicker (Details) category outside the #ifdef.
3030 Forward-declare and possibly import NSExtension SPI.
3032 (WebKit::ServicesController::ServicesController):
3033 Register a callback to be notified whenever the set of services changes.
3034 When this occurs, call refreshExistingServices. We let refreshExistingServices
3035 coalesce updates because these notifications can come in small batches.
3037 (WebKit::ServicesController::refreshExistingServices):
3038 Dispatch changes in service availability to all processes in all contexts.
3040 * UIProcess/mac/WebContextMenuProxyMac.mm:
3041 (WebKit::WebContextMenuProxyMac::setupServicesMenu):
3042 Adjust the referenced rdar:// and call ServicesController::refreshExistingServices
3043 instead of the now-removed WebContext:: variant. We can't remove this
3044 yet because our services state can still be stale because NSServiceSharingPicker
3045 can still sometimes lie about the current service state immediately after a change occurs;
3046 once that is fixed, we should get rid of this as well as the refresh in Web Process creation.
3048 2014-08-08 Timothy Horton <timothy_horton@apple.com>
3050 Clients that request the selection services menu after WebKit2 will get one with different metrics than otherwise
3051 https://bugs.webkit.org/show_bug.cgi?id=135765
3052 <rdar://problem/17962180>
3054 Reviewed by Brady Eidson.
3056 * UIProcess/mac/WebContextMenuProxyMac.mm:
3057 (WebKit::WebContextMenuProxyMac::setupServicesMenu):
3058 The menu is cached between clients, but we make adjustments to it.
3059 We should copy it before adjusting.
3061 2014-08-08 Timothy Horton <timothy_horton@apple.com>
3063 Services overlay dropdown is often in the wrong place with zoomed pages or horizontal scrolling
3064 https://bugs.webkit.org/show_bug.cgi?id=135755
3065 <rdar://problem/17907752>
3067 Reviewed by Brady Eidson.
3069 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
3070 (WebKit::ServicesOverlayController::establishHoveredTelephoneHighlight):
3071 (WebKit::ServicesOverlayController::maybeCreateSelectionHighlight):
3072 DDHighlightCreateWithRectsInVisibleRectWithStyleAndDirection adjusts the
3073 location of the button based on the visible rect, trying to keep the button visible.
3075 We're handing it the wrong visible rect, though, not taking scrolling into account.
3077 This leads to pages that scroll horizontally showing the button on the left
3078 even if there's space for it on the right, or sometimes not showing it at all.
3080 Instead, provide the actual main FrameView visible rect; the same coordinate
3081 space that the highlight rects are provided in.
3083 2014-08-08 Timothy Horton <timothy_horton@apple.com>
3085 Additional items added to selection services menus are misaligned
3086 https://bugs.webkit.org/show_bug.cgi?id=135747
3087 <rdar://problem/17933167>
3089 Reviewed by Brady Eidson.
3091 * UIProcess/mac/WebContextMenuProxyMac.mm:
3092 (WebKit::WebContextMenuProxyMac::setupServicesMenu):
3093 Use NSSharingServicePickerStyleRollover for the rollover image services menu;
3094 use NSSharingServicePickerStyleTextSelection for the selection services menu.
3096 Set NSMenu's showsStateColumn to YES for selection services menus, so that
3097 other items added to the menu line up correctly.
3099 Remove an unncessary .get()
3101 2014-08-08 Grzegorz Czajkowski <g.czajkowski@samsung.com>
3103 [EFL] Remove unnecessary ewk_private.h includes
3104 https://bugs.webkit.org/show_bug.cgi?id=135753
3106 Reviewed by Gyuyoung Kim.
3108 Neither the below file uses the functionality from ewk_private.h.
3110 * UIProcess/API/efl/ewk_context.cpp:
3111 * UIProcess/API/efl/ewk_context_menu_item.cpp:
3112 * UIProcess/API/efl/ewk_cookie_manager.cpp:
3113 * UIProcess/API/efl/ewk_navigation_policy_decision.cpp:
3114 * UIProcess/API/efl/ewk_popup_menu_item.cpp:
3115 * UIProcess/API/efl/ewk_view.cpp:
3117 2014-08-08 Carlos Garcia Campos <cgarcia@igalia.com>
3119 [GTK] Do not use GtkWindow:resize-grip-visible with recent GTK+ versions
3120 https://bugs.webkit.org/show_bug.cgi?id=135699
3122 Reviewed by Philippe Normand.
3124 Resize grips support have been removed from GTK+ since 3.13.4, the
3125 API has been deprecated and does nothing.
3127 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3128 (webkitWebViewBaseSetToplevelOnScreenWindow):
3129 (resizeWebKitWebViewBaseFromAllocation):
3131 2014-08-07 Tim Horton <timothy_horton@apple.com>
3133 [Services with UI] Action menu does not appear if selection includes both text and an image
3134 https://bugs.webkit.org/show_bug.cgi?id=135731
3135 <rdar://problem/17837491>
3137 Reviewed by Dean Jackson.
3139 * UIProcess/WebContext.cpp:
3140 (WebKit::WebContext::createNewWebProcess):
3141 Initialize hasRichContentServices with the cached value.
3143 2014-08-07 Benjamin Poulain <bpoulain@apple.com>
3145 Get rid of SCRIPTED_SPEECH
3146 https://bugs.webkit.org/show_bug.cgi?id=135729
3148 Reviewed by Brent Fulgham.
3150 * Configurations/FeatureDefines.xcconfig:
3152 2014-08-07 Timothy Horton <timothy_horton@apple.com>
3154 setCustomSwipeViews inside didChangeBackForwardList client callback is ignored
3155 https://bugs.webkit.org/show_bug.cgi?id=135633
3156 <rdar://problem/17926507>
3158 Reviewed by Sam Weinig.
3160 * UIProcess/PageClient.h:
3161 * UIProcess/WebPageProxy.cpp:
3162 (WebKit::WebPageProxy::didChangeBackForwardList):
3163 * UIProcess/ios/PageClientImplIOS.h:
3164 * UIProcess/ios/PageClientImplIOS.mm:
3165 (WebKit::PageClientImpl::clearCustomSwipeViews): Deleted.
3166 * UIProcess/mac/PageClientImpl.h:
3167 * UIProcess/mac/PageClientImpl.mm:
3168 (WebKit::PageClientImpl::clearCustomSwipeViews): Deleted.
3169 WebKit clears the set of custom swipe views at the end of WebPageProxy::didChangeBackForwardList,
3170 *after* calling into the client. This means that if the client wants to setCustomSwipeViews in
3171 didChangeBackForwardList, it won't be respected.
3173 Since there's only one client of this SPI, let's just stop clearing the list of custom swipe
3174 views in WebKit and leave that totally up to the client.
3176 2014-08-07 Enrica Casucci <enrica@apple.com>
3178 [Services with UI] Action menu does not appear if selection includes both text and an image.
3179 https://bugs.webkit.org/show_bug.cgi?id=135731
3180 <rdar://problem/17837491>
3182 Reviewed by Brady Eidson.
3184 Adding a new setting to ServicesController to communicate to the WebProcess if
3185 there are services installed that can handle a combination of text and images.
3186 This way ServicesOverlayController can decide if it appropriate to show the hightlight
3187 based on the type of selection (text only or non text only). This information is retrieved
3188 when the selection rects are collected by SelectionGatherer and used by
3189 SelectionGatherer::Notifier to communicate the selection change.
3191 * Shared/WebProcessCreationParameters.cpp:
3192 (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
3193 * Shared/WebProcessCreationParameters.h:
3194 * UIProcess/mac/ServicesController.h:
3195 (WebKit::ServicesController::hasRichContentServices):
3196 * UIProcess/mac/ServicesController.mm:
3197 (WebKit::ServicesController::ServicesController):
3198 (WebKit::ServicesController::refreshExistingServices):
3199 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3200 (WebKit::WebEditorClient::selectionRectsDidChange):
3201 * WebProcess/WebCoreSupport/WebEditorClient.h:
3202 * WebProcess/WebPage/ServicesOverlayController.h:
3203 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
3204 (WebKit::ServicesOverlayController::ServicesOverlayController):
3205 (WebKit::ServicesOverlayController::selectionRectsDidChange):
3206 (WebKit::ServicesOverlayController::drawSelectionHighlight):
3207 * WebProcess/WebProcess.cpp:
3208 (WebKit::WebProcess::WebProcess):
3209 (WebKit::WebProcess::initializeWebProcess):
3210 (WebKit::WebProcess::setEnabledServices):
3211 * WebProcess/WebProcess.h:
3212 (WebKit::WebProcess::hasRichContentServices):
3213 * WebProcess/WebProcess.messages.in:
3215 2014-08-07 Ryuan Choi <ryuan.choi@samsung.com>
3217 [EFL] Fix several warnings of doxygen
3218 https://bugs.webkit.org/show_bug.cgi?id=135643
3220 Reviewed by Gyuyoung Kim.
3222 * UIProcess/API/efl/ewk_context_menu_item.h: Removed /info which is not doxygen keyword and unnecessary to the user.
3223 * UIProcess/API/efl/ewk_cookie_manager.h: Fixed parameter name.
3224 * UIProcess/API/efl/ewk_form_submission_request.h: Removed # from Eina_List because doxygen may not know the EFL structures.
3225 * UIProcess/API/efl/ewk_page_group.h: Fixed to match with parameter name.
3226 * UIProcess/API/efl/ewk_settings.h: Fixed wrong keyword and parameter name.
3227 * UIProcess/API/efl/ewk_text_checker.h: Ditto.
3228 * UIProcess/API/efl/ewk_view.h:
3229 - Used escape string for the tag.
3230 - Used @code, @endcode for media query example.
3232 2014-08-07 Benjamin Poulain <bpoulain@apple.com>
3234 Get rid of INPUT_SPEECH
3235 https://bugs.webkit.org/show_bug.cgi?id=135672
3237 Reviewed by Andreas Kling.
3239 * Configurations/FeatureDefines.xcconfig:
3240 * PlatformGTK.cmake:
3242 2014-08-07 Timothy Hatcher <timothy@apple.com>
3244 Web Inspector: Update glyphs to be more like Xcode 6
3245 https://bugs.webkit.org/show_bug.cgi?id=135705
3247 Reviewed by Joseph Pecoraro.
3249 * Resources/DockBottom.pdf: Added.
3250 * Resources/DockBottomLegacy.pdf: Copied from Source/WebKit/mac/Resources/Dock.pdf.
3251 * Resources/DockRight.pdf: Added.
3252 * Resources/DockRightLegacy.pdf: Copied from Source/WebKit2/Resources/DockRight.pdf.
3253 * UIProcess/mac/WebInspectorProxyMac.mm:
3254 (WebKit::WebInspectorProxy::createInspectorWindow): Use new images.
3255 * WebKit2.xcodeproj/project.pbxproj: Added new images.
3257 2014-08-07 Oliver Hunt <oliver@apple.com>
3259 WebContent needs access to HSTS database due to some networking still being performed in process
3260 https://bugs.webkit.org/show_bug.cgi?id=135711
3263 Reviewed by Alexey Proskuryakov.
3265 Simple patch in the same theme as the equivalent network process
3266 extension. Provide an extension that covers the WebContent specific
3267 HSTS file and consume it on launch.
3269 * Shared/WebProcessCreationParameters.cpp:
3270 (WebKit::WebProcessCreationParameters::encode):
3271 (WebKit::WebProcessCreationParameters::decode):
3272 * Shared/WebProcessCreationParameters.h:
3273 * UIProcess/WebContext.cpp:
3274 (WebKit::WebContext::createNewWebProcess):
3275 * UIProcess/WebContext.h:
3276 * UIProcess/mac/WebContextMac.mm:
3277 (WebKit::WebContext::webContentHSTSDatabasePath):
3278 * WebProcess/cocoa/WebProcessCocoa.mm:
3279 (WebKit::WebProcess::platformInitializeWebProcess):
3281 2014-08-07 Gordon Sheridan <gordon_sheridan@apple.com>
3283 Clear the m_previousItem member of HistoryControllers when it matches the HistoryItem being removed.
3284 https://bugs.webkit.org/show_bug.cgi?id=135634
3285 <rdar://problem/17388461>
3287 Reviewed by Brady Eidson.
3289 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
3290 (WebKit::WebBackForwardListProxy::removeItem):
3291 Call WebCore::Page::clearPreviousItemFromAllPages() for each item removed from
3292 the back/forward list to ensure the page URL is released from IconDatabase.
3294 2014-08-07 Carlos Garcia Campos <cgarcia@igalia.com>
3296 [GTK] Use WebKitNavigationAction also for WebKitNavigationPolicyDecision
3297 https://bugs.webkit.org/show_bug.cgi?id=135695
3299 Reviewed by Gustavo Noronha Silva.
3301 WebKitNavigationAction was introduced to extend WebKitWebView::create signal
3302 and its API is mostly duplicated in WebKitNavigationPolicyDecision.
3303 Use WebKitNavigationAction insternally in WebKitNavigationPolicyDecision and
3304 deprecated all the duplicated API in favor of a single property navigation-action.
3306 * UIProcess/API/gtk/WebKitDefines.h: Remove unused macro
3307 WEBKIT_OBSOLETE and add WEBKIT_DEPRECATED and WEBKIT_DEPRECATED_FOR.
3308 * UIProcess/API/gtk/WebKitNavigationPolicyDecision.cpp:
3309 (_WebKitNavigationPolicyDecisionPrivate::~_WebKitNavigationPolicyDecisionPrivate):
3310 Free the WebKitNavigationAction.
3311 (webkitNavigationPolicyDecisionGetProperty): Add getter for
3312 navigation-action and use WebKitNavigationAction in all other getters.
3313 (webkit_navigation_policy_decision_class_init): Add navigation-action
3314 property and deprecated all others except frame-name.
3315 (webkit_navigation_policy_decision_get_navigation_action): Return the WebKitNavigationAction.
3316 (webkit_navigation_policy_decision_get_navigation_type): Use WebKitNavigationAction.
3317 (webkit_navigation_policy_decision_get_mouse_button): Ditto.
3318 (webkit_navigation_policy_decision_get_modifiers): Ditto.
3319 (webkit_navigation_policy_decision_get_request): Ditto.
3320 (webkitNavigationPolicyDecisionCreate):
3321 (webkitNewWindowPolicyDecisionCreate):
3322 * UIProcess/API/gtk/WebKitNavigationPolicyDecision.h:
3323 * UIProcess/API/gtk/WebKitNavigationPolicyDecisionPrivate.h:
3324 * UIProcess/API/gtk/WebKitPolicyClient.cpp: Use a custom
3325 PolicyClient class so that we receive a NavigationActionData in
3327 (attachPolicyClientToView):
3328 (toWebKitNavigationType): Deleted.
3329 (decidePolicyForNavigationAction): Deleted.
3330 (decidePolicyForNewWindowAction): Deleted.
3331 (decidePolicyForResponse): Deleted.
3332 * UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp:
3333 (webkitResponsePolicyDecisionCreate):
3334 * UIProcess/API/gtk/WebKitResponsePolicyDecisionPrivate.h:
3335 * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for
3337 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
3339 2014-08-06 Antti Koivisto <antti@apple.com>
3341 Move Soup specific code out of WebCoreArgumentCoders.cpp
3342 https://bugs.webkit.org/show_bug.cgi?id=135665
3344 Reviewed by Anders Carlsson.
3346 * Shared/WebCoreArgumentCoders.cpp:
3347 (IPC::ArgumentCoder<ResourceRequest>::encode):
3348 (IPC::ArgumentCoder<ResourceRequest>::decode):
3349 (IPC::ArgumentCoder<ResourceError>::encode):
3350 (IPC::ArgumentCoder<ResourceError>::decode):
3351 * Shared/WebCoreArgumentCoders.h:
3353 Soup is the only client for this code. Move it to *Soup.cpp
3355 * Shared/soup/WebCoreArgumentCodersSoup.cpp:
3356 (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
3357 (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
3358 (IPC::ArgumentCoder<ResourceError>::encodePlatformData):
3359 (IPC::ArgumentCoder<ResourceError>::decodePlatformData):
3361 2014-08-06 Tim Horton <timothy_horton@apple.com>
3363 Services overlay flashes a lot; should have some hysteresis before showing overlay
3364 https://bugs.webkit.org/show_bug.cgi?id=135683
3365 <rdar://problem/16878039>
3367 Reviewed by Simon Fraser.
3369 Don't show the highlight until it's been 200ms since the last change
3370 in selection or change in which highlight is hovered, whichever was more recent.
3372 * WebProcess/WebPage/ServicesOverlayController.h:
3373 * WebProcess/WebPage/mac/ServicesOverlayController.mm:
3374 (WebKit::ServicesOverlayController::ServicesOverlayController):
3375 (WebKit::ServicesOverlayController::selectionRectsDidChange):
3376 Keep track of when the selection last changed.
3378 (WebKit::ServicesOverlayController::drawTelephoneNumberHighlightIfVisible):
3379 Make establishHoveredTelephoneHighlight take a bool instead of Boolean.
3381 (WebKit::ServicesOverlayController::mouseIsOverHighlight):
3382 Factor mouseIsOverHighlight out of establishHoveredTelephoneHighlight and drawHighlight.
3384 (WebKit::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
3385 Return the amount of time until the highlight should be shown; this is
3386 the maximum of (the difference between the last selection change and the timeout)
3387 and (the difference between the last change in which highlight is hovered and the timeout).
3389 Telephone number highlights are shown immediately, because they are already stable
3390 by virtue of being expanded to include the entire telephone number.
3392 (WebKit::ServicesOverlayController::repaintHighlightTimerFired):
3393 (WebKit::ServicesOverlayController::drawHighlight):
3394 If the highlight shouldn't be shown yet (because we haven't hit the two timeouts),
3395 schedule a timer to repaint us around when we will hit the timeouts.
3397 (WebKit::ServicesOverlayController::establishHoveredTelephoneHighlight):
3398 (WebKit::ServicesOverlayController::mouseEvent):
3399 Don't allow mouseUp to trigger the menu if we shouldn't be showing the overlay yet.
3401 2014-08-06 Simon Fraser <simon.fraser@apple.com>
3403 [iOS WK2] www.france24.com doesn't always load the page, sections stay white
3404 https://bugs.webkit.org/show_bug.cgi?id=135684
3405 <rdar://problem/17931712>
3407 Reviewed by Tim Horton.
3409 It's possible for a UIScrollView for overflow to move between one scrolling tree node
3410 and another. When this happens, we need to avoid unconditionally clearing the delegate
3411 on the node that's being destroyed, because the new node will already have set the
3412 UIScrollView delegate to its own delegate.
3414 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
3415 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::~ScrollingTreeOverflowScrollingNodeIOS):
3417 2014-08-06 Dean Jackson <dino@apple.com>
3419 ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED is not used anywhere. Remove it.
3420 https://bugs.webkit.org/show_bug.cgi?id=135675
3422 Reviewed by Sam Weinig.
3424 * Configurations/FeatureDefines.xcconfig:
3426 2014-08-06 Brady Eidson and Jeffrey Pfau <beidson@apple.com>
3428 IDB transactions never reset if the Web Process ends before cleaning up
3429 https://bugs.webkit.org/show_bug.cgi?id=135218
3431 Reviewed by Darin Adler and David Kilzer.
3433 * DatabaseProcess/DatabaseToWebProcessConnection.cpp:
3434 (WebKit::DatabaseToWebProcessConnection::didReceiveMessage):
3435 (WebKit::DatabaseToWebProcessConnection::didReceiveSyncMessage): Added.
3436 (WebKit::DatabaseToWebProcessConnection::didClose):
3437 * DatabaseProcess/DatabaseToWebProcessConnection.h:
3439 * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
3440 (WebKit::DatabaseProcessIDBConnection::resetTransactionSync): Added
3441 Wait until the reset is complete before sending the sync reply.
3442 (WebKit::DatabaseProcessIDBConnection::rollbackTransactionSync): Added.
3444 * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
3445 * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
3447 Keep track of all in progress transactions and make sure they’re cleaned up
3448 whenever a connection to a WebProcess is broken: