1 2014-04-24 Andreas Kling <akling@apple.com>
3 [iOS WebKit2] Enable optimization to mmap downloaded resources once they become file-backed.
4 <https://webkit.org/b/132171>
5 <rdar://problem/16720733>
7 Implement a CFNetwork-based version of NetworkResourceLoader::willCacheResponseAsync()
8 and activate the DiskCacheMonitor code path. This means that once resources go into
9 file system cache, we get notified and mmap them from disk, saving heaps of memory.
11 Reviewed by Antti Koivisto.
13 * NetworkProcess/NetworkResourceLoader.h:
14 * NetworkProcess/mac/DiskCacheMonitor.mm:
15 * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
16 (WebKit::NetworkResourceLoader::willCacheResponseAsync):
18 2014-04-24 Andreas Kling <akling@apple.com>
20 [iOS WebKit2] RemoteLayerTreeDrawingArea should force CA to garbage collect surfaces.
21 <https://webkit.org/b/132160>
22 <rdar://problem/16110687>
24 Do an empty CATransaction at the end of RemoteLayerTreeDrawingArea::flushLayers()
25 to get CA to garbage collect its IOSurfaces. This helps clean up unused surfaces
26 that we'd otherwise end up hanging on to for a long time.
28 Reviewed by Tim Horton.
30 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
31 (WebKit::RemoteLayerTreeDrawingArea::didUpdate):
33 2014-04-24 Commit Queue <commit-queue@webkit.org>
35 Unreviewed, rolling out r167700.
36 https://bugs.webkit.org/show_bug.cgi?id=132142
38 Incorrectly reverted the change in r167547 for
39 webkit.org/b/131898 (Requested by rniwa on #webkit).
43 "Cursor doesn't change back to pointer when leaving the Safari
45 https://bugs.webkit.org/show_bug.cgi?id=132038
46 http://trac.webkit.org/changeset/167700
48 2014-04-24 Brady Eidson <beidson@apple.com>
50 Rename "IMAGE_CONTROLS" feature to "SERVICE_CONTROLS"
51 https://bugs.webkit.org/show_bug.cgi?id=132155
53 Reviewed by Tim Horton.
55 * Configurations/FeatureDefines.xcconfig:
56 * Shared/ContextMenuContextData.cpp:
57 (WebKit::ContextMenuContextData::ContextMenuContextData):
58 (WebKit::ContextMenuContextData::operator=):
59 (WebKit::ContextMenuContextData::encode):
60 (WebKit::ContextMenuContextData::decode):
61 * Shared/ContextMenuContextData.h:
62 * UIProcess/WebPageProxy.cpp:
63 (WebKit::WebPageProxy::internalShowContextMenu):
64 * UIProcess/WebPageProxy.h:
65 * UIProcess/mac/WebContextMenuProxyMac.h:
66 * UIProcess/mac/WebContextMenuProxyMac.mm:
67 (WebKit::WebContextMenuProxyMac::contextMenuItemSelected):
68 (WebKit::WebContextMenuProxyMac::populate):
69 (WebKit::WebContextMenuProxyMac::showContextMenu):
70 * WebProcess/InjectedBundle/InjectedBundle.cpp:
71 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
72 * WebProcess/WebPage/WebContextMenu.cpp:
73 * WebProcess/WebPage/WebContextMenu.h:
74 * WebProcess/WebPage/WebPage.cpp:
75 (WebKit::WebPage::updatePreferences):
76 * WebProcess/WebPage/WebPage.h:
77 * WebProcess/WebPage/WebPage.messages.in:
79 2014-04-24 Joseph Pecoraro <pecoraro@apple.com>
81 [iOS] Add some missing overrides and remove unnecessary virtuals
82 https://bugs.webkit.org/show_bug.cgi?id=132153
84 Reviewed by Darin Adler.
86 * UIProcess/ios/PageClientImplIOS.h:
87 * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
89 2014-04-24 Tim Horton <timothy_horton@apple.com>
91 WebKit2 View Gestures: Use a single struct for the snapshot, and pass it around
92 https://bugs.webkit.org/show_bug.cgi?id=132114
94 Reviewed by Simon Fraser.
96 Have only a single map in ViewSnapshotStore, from back-forward item
97 to ViewSnapshotStore::Snapshot, and return the Snapshot struct when looking
98 up snapshots (via getSnapshot()), so that future patches can persist additional
99 information along with the snapshot.
101 * UIProcess/ios/ViewGestureControllerIOS.mm:
102 (WebKit::ViewGestureController::beginSwipeGesture):
103 (WebKit::ViewGestureController::endSwipeGesture):
104 * UIProcess/mac/ViewGestureController.h:
105 * UIProcess/mac/ViewGestureControllerMac.mm:
106 (WebKit::ViewGestureController::retrieveSnapshotForItem):
107 (WebKit::ViewGestureController::beginSwipeGesture):
108 (WebKit::ViewGestureController::endSwipeGesture):
109 Adopt getSnapshot() instead of snapshotAndRenderTreeSize().
110 Move retrieveSnapshotForItem out into a separate function (for future use).
112 * UIProcess/mac/ViewSnapshotStore.h:
113 (WebKit::ViewSnapshotStore::disableSnapshotting):
114 (WebKit::ViewSnapshotStore::enableSnapshotting):
115 * UIProcess/mac/ViewSnapshotStore.mm:
116 (WebKit::ViewSnapshotStore::pruneSnapshots):
117 (WebKit::ViewSnapshotStore::recordSnapshot):
118 (WebKit::ViewSnapshotStore::getSnapshot):
119 (WebKit::ViewSnapshotStore::snapshotAndRenderTreeSize): Deleted.
120 Make Snapshot struct public.
121 Get rid of the separate map of back-forward items to render tree sizes.
122 When evicting, instead of removing the entry, clear out its snapshot image;
123 this way, we can keep other snapshot metadata around.
125 2014-04-24 Enrica Casucci <enrica@apple.com>
127 [iOS WebKit2] Should properly handle focus redirect (keyboard state changes when focus changes).
128 https://bugs.webkit.org/show_bug.cgi?id=132136
129 <rdar://problem/16238336>
131 Reviewed by Benjamin Poulain.
133 Focusing a field from JavaScript should not make the keyboard or the select picker
134 appear unless the user has already started interacting with one of the fields in the page.
135 Adding a parameter to StartAssistingNode to indicate whether the focus change is a result
138 * UIProcess/PageClient.h:
139 * UIProcess/WebPageProxy.h:
140 * UIProcess/WebPageProxy.messages.in:
141 * UIProcess/ios/PageClientImplIOS.h:
142 * UIProcess/ios/PageClientImplIOS.mm:
143 (WebKit::PageClientImpl::startAssistingNode):
144 * UIProcess/ios/WKContentViewInteraction.h:
145 * UIProcess/ios/WKContentViewInteraction.mm:
146 (-[WKContentView _startAssistingNode:userIsInteracting:userObject:]):
147 * UIProcess/ios/WebPageProxyIOS.mm:
148 (WebKit::WebPageProxy::startAssistingNode):
149 * WebProcess/WebPage/WebPage.cpp:
150 (WebKit::WebPage::WebPage):
151 (WebKit::WebPage::dispatchTouchEvent):
152 * WebProcess/WebPage/WebPage.h:
153 * WebProcess/WebPage/ios/WebPageIOS.mm:
154 (WebKit::WebPage::handleTap):
155 (WebKit::WebPage::elementDidFocus):
157 2014-04-24 Myles C. Maxfield <mmaxfield@apple.com>
159 FontCache::fontCache() never returns nullptr so it can be made to return a reference instead
160 https://bugs.webkit.org/show_bug.cgi?id=132110
162 Reviewed by Tim Horton.
164 Updates callers to use '.' instead of '->'.
166 No new tests are necessary because there should be no behavior change.
168 * WebProcess/WebProcess.cpp:
169 (WebKit::WebProcess::terminate):
170 (WebKit::WebProcess::didClose):
171 (WebKit::WebProcess::getWebCoreStatistics):
173 2014-04-24 Eric Carlson <eric.carlson@apple.com>
175 [iOS] Manage AudioSession category according to media type
176 https://bugs.webkit.org/show_bug.cgi?id=132096
178 Reviewed by Jer Noble.
180 * WebProcess/WebPage/WebPage.cpp:
181 (WebKit::WebPage::WebPage): Tell WebCore to manage the AudioSession.
183 2014-04-24 Tim Horton <timothy_horton@apple.com>
185 [wk2] Provide SPI allowing clients to hand events directly to swipe code, bypassing scrolling
186 https://bugs.webkit.org/show_bug.cgi?id=132092
187 <rdar://problem/15948244>
189 Reviewed by Darin Adler.
191 * UIProcess/API/Cocoa/WKViewPrivate.h:
192 * UIProcess/API/mac/WKView.mm:
193 (-[WKView _tryToSwipeWithEvent:ignoringPinnedState:]):
194 Added. Hand the event directly to ViewGestureController, optionally
195 ignoring whether or not the WKView is scrollable (always pretending that it is not).
197 * UIProcess/mac/ViewGestureController.h:
198 (WebKit::ViewGestureController::shouldIgnorePinnedState):
199 (WebKit::ViewGestureController::setShouldIgnorePinnedState):
200 * UIProcess/mac/ViewGestureControllerMac.mm:
201 (WebKit::ViewGestureController::ViewGestureController):
202 (WebKit::ViewGestureController::scrollEventCanBecomeSwipe):
203 (WebKit::ViewGestureController::handleScrollWheelEvent):
204 (WebKit::ViewGestureController::wheelEventWasNotHandledByWebCore):
205 (WebKit::scrollEventCanBecomeSwipe):
206 If we're ignoring the view's pinned state, pretend that we're always pinned,
207 and don't worry about sending events to WebCore.
209 2014-04-24 Carlos Garcia Campos <cgarcia@igalia.com>
211 [GTK] wmode='transparent' for flash plugin doesn't work
212 https://bugs.webkit.org/show_bug.cgi?id=120055
214 Reviewed by Gustavo Noronha Silva.
216 Force opaque window mode for flash plugin when wmode='transparent',
217 since X11 backend doesn't support transparency. We should add
218 proper transparency support because forcing opaque window mode
219 doesn't really work. Handle this as a plugin quirk instead of
220 adding X11 specific code to WebFrameLoaderClient::createPlugin().
222 * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
223 (WebKit::NetscapePluginModule::determineQuirks): Add
224 ForceFlashWindowlessMode quirk for flash in case of EFL platform
225 because EFL port doesn't support windowed plugins.
226 * Shared/Plugins/PluginQuirks.h: Add ForceFlashWindowlessMode X11
228 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
229 (WebKit::NetscapePlugin::initialize): Modify or add wmode
230 parameter for flash plugin, to force opaque window mode when
231 transparent mode is specified or when ForceFlashWindowlessMode
233 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
234 (WebKit::WebFrameLoaderClient::createPlugin): Remove X11 specific code.
236 2014-04-23 Simon Fraser <simon.fraser@apple.com>
238 [iOS WK2] Missing content inside long overflow-scrolling:touch
239 https://bugs.webkit.org/show_bug.cgi?id=132105
241 Reviewed by Tim Horton.
243 PlatformCALayerRemote needs to track bounds origin as well as size,
244 since iOS uses bounds origin for overflow scrolling.
246 * Shared/mac/RemoteLayerTreePropertyApplier.mm:
247 (WebKit::applyPropertiesToLayer):
248 * Shared/mac/RemoteLayerTreeTransaction.h:
249 * Shared/mac/RemoteLayerTreeTransaction.mm:
250 (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
251 (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
252 (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
253 (WebKit::dumpChangedLayers):
254 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
255 (WebKit::PlatformCALayerRemote::updateBackingStore):
256 (WebKit::PlatformCALayerRemote::bounds):
257 (WebKit::PlatformCALayerRemote::setBounds):
259 2014-04-23 Andreas Kling <akling@apple.com>
261 Remove unused WKPageSetMemoryCacheClientCallsEnabled API.
262 <https://webkit.org/b/132098>
264 This API was added to WK2 back in 2011 but never actually used.
266 Reviewed by Anders Carlsson.
268 * Shared/WebPageCreationParameters.cpp:
269 (WebKit::WebPageCreationParameters::encode):
270 (WebKit::WebPageCreationParameters::decode):
271 * Shared/WebPageCreationParameters.h:
272 * UIProcess/API/C/WKPage.cpp:
273 (WKPageSetMemoryCacheClientCallsEnabled): Deleted.
274 * UIProcess/API/C/WKPage.h:
275 * UIProcess/WebPageProxy.cpp:
276 (WebKit::WebPageProxy::WebPageProxy):
277 (WebKit::WebPageProxy::creationParameters):
278 (WebKit::WebPageProxy::setMemoryCacheClientCallsEnabled): Deleted.
279 * UIProcess/WebPageProxy.h:
280 * WebProcess/WebPage/WebPage.cpp:
281 (WebKit::WebPage::WebPage):
282 (WebKit::WebPage::setMemoryCacheMessagesEnabled): Deleted.
283 * WebProcess/WebPage/WebPage.h:
284 * WebProcess/WebPage/WebPage.messages.in:
286 2014-04-23 Simon Fraser <simon.fraser@apple.com>
288 [iOS WK2] Make -webkit-overflow-scrolling:touch work
289 https://bugs.webkit.org/show_bug.cgi?id=132097
291 Reviewed by Tim Horton.
293 Scrolling of UIScrollViews in content (for -webkit-overflow-scrolling:touch)
294 depends on them getting hit-tested correctly. UIKit hit testing assumes
295 that subviews are enclosed by their ancestors, but this is not true of
296 web content. In addition, we had a root layer that was zero sized.
298 Fix by overriding hitTest:withEvent: on our content WKViews to hit
299 test subviews even if they are not enclosed.
301 * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
302 (-[UIView _recursiveFindDescendantViewAtPoint:withEvent:]):
303 (-[UIView _findDescendantViewAtPoint:withEvent:]):
304 (-[WKCompositingView hitTest:withEvent:]):
305 (-[WKTransformView hitTest:withEvent:]):
306 (-[WKRemoteView hitTest:withEvent:]):
307 (WebKit::RemoteLayerTreeHost::createLayer):
308 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
309 (WebKit::RemoteLayerTreeDrawingArea::updatePreferences):
310 Update debug borders on the root layer.
311 (WebKit::RemoteLayerTreeDrawingArea::mainFrameContentSizeChanged):
312 Size the root layer to the contents size. This isn't strictly necessary
313 given the hit testing overrides, but seems sensible to do anyway.
315 2014-04-23 Simon Fraser <simon.fraser@apple.com>
317 Nonopaque layers double-paint with UI-side compositing
318 https://bugs.webkit.org/show_bug.cgi?id=132101
320 Reviewed by Tim Horton.
322 The non-IOSurface code path was failing to clear the backing store
325 * Shared/mac/RemoteLayerBackingStore.mm:
326 (WebKit::RemoteLayerBackingStore::display):
327 (WebKit::RemoteLayerBackingStore::drawInContext):
329 2014-04-23 Benjamin Poulain <bpoulain@apple.com>
331 [iOS][WK2] Image and text documents sometime gets the webpage viewport configuration
332 https://bugs.webkit.org/show_bug.cgi?id=132099
334 Reviewed by Tim Horton.
336 When didReceiveMobileDocType(), if the doctype was not XHTML mobile, we were setting
337 the viewport configuration to webpageParameters(). This is obviously not correct for
338 Image and Text documents.
340 This patch moves the code deciding the default configuration out of WebPage::didCommitLoad()
341 and use it from WebPage::didCommitLoad() and WebPage::didReceiveMobileDocType().
343 * WebProcess/WebPage/WebPage.cpp:
344 (WebKit::WebPage::didCommitLoad):
345 * WebProcess/WebPage/WebPage.h:
346 * WebProcess/WebPage/ios/WebPageIOS.mm:
347 (WebKit::WebPage::didReceiveMobileDocType):
348 (WebKit::WebPage::resetViewportDefaultConfiguration):
350 2014-04-23 Benjamin Poulain <bpoulain@apple.com>
352 [iOS][WK2] Fix a few mistakes affecting the initial layout and the initial unobscured rect
353 https://bugs.webkit.org/show_bug.cgi?id=132093
354 <rdar://problem/16703237>
356 Reviewed by Tim Horton.
358 The user of WKWebView can setup a size on device pixels, which can add half a point to the minimum
359 layout size. By rounding this up before applying the page scale, we ended up with rounding errors
360 on the layout size and the transitory unobscured content rect.
362 This patch fixes changes the minimal layout size to float point values to reduce the rounding problems.
364 * UIProcess/API/Cocoa/WKWebView.mm:
365 (setViewportConfigurationMinimumLayoutSize):
366 (-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
367 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
368 * UIProcess/WebPageProxy.h:
369 * UIProcess/ios/WebPageProxyIOS.mm:
370 (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
371 (WebKit::WebPageProxy::setViewportConfigurationMinimumLayoutSize):
372 (WebKit::WebPageProxy::setMinimumLayoutSizeForMinimalUI):
374 * WebProcess/WebPage/WebPage.cpp:
375 (WebKit::WebPage::didCommitLoad):
376 Defaulting the content size to the minimum layout size only works if the initial-scale is 1.
377 ViewportConfiguration knows exactly what to do before the first layout.
379 * WebProcess/WebPage/WebPage.h:
380 * WebProcess/WebPage/WebPage.messages.in:
381 * WebProcess/WebPage/ios/WebPageIOS.mm:
382 (WebKit::WebPage::setViewportConfigurationMinimumLayoutSize):
383 (WebKit::WebPage::setMinimumLayoutSizeForMinimalUI):
384 (WebKit::WebPage::dynamicViewportSizeUpdate):
386 -setZoomedOutPageScaleFactor() was incorrectly using the initial scale. 99% of the time, initial scale
387 and minimum scale are equal, but the page can specify something different with the viewport meta tag.
388 -Use floating point for manipulating the minimum layout sizes, then round the value.
389 -minimumLayoutSizeInDocumentCoordinate was scaled the wrong way around.
391 (WebKit::WebPage::viewportConfigurationChanged):
393 2014-04-23 Yongjun Zhang <yongjun_zhang@apple.com>
395 Support encoding/decoding NSUInteger arguments in WKRemoteObjectCoder.
396 https://bugs.webkit.org/show_bug.cgi?id=132040
398 Add support for encoding/decoding NSUInteger arguments.
400 Reviewed by Sam Weinig.
402 * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
404 (decodeInvocationArguments):
406 2014-04-22 Ryosuke Niwa <rniwa@webkit.org>
408 Cursor doesn't change back to pointer when leaving the Safari window
409 https://bugs.webkit.org/show_bug.cgi?id=132038
411 Reviewed by Alexey Proskuryakov.
413 Since the cursor type is now updated asynchronously after r147739,
414 [window windowNumber] != [NSWindow windowNumberAtPoint:[NSEvent mouseLocation] belowWindowWithWindowNumber:0]
415 evalutes to false depending on how fast cursor is moving.
417 Instead, check whether the NSWindow of the WebView is the key window or not since
418 key window appears to control the cursor style in Cocoa as far as I've tested:
419 https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/WinPanel/Concepts/ChangingMainKeyWindow.html
421 * UIProcess/mac/PageClientImpl.mm:
422 (WebKit::PageClientImpl::setCursor):
424 2014-04-22 Yongjun Zhang <yongjun_zhang@apple.com>
426 Add SPI to expose provisional URL from Frame.
427 https://bugs.webkit.org/show_bug.cgi?id=132014
429 Add methods to return the provisional URL from WKWebProcessPlugInFrame.
431 Reviewed by Dan Bernstein.
433 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
434 (-[WKWebProcessPlugInFrame _provisionalURL]):
435 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h:
437 2014-04-22 Benjamin Poulain <bpoulain@apple.com>
439 [iOS][WK2] Split iOS touch event dispatch for the regular touch event dispatch
440 https://bugs.webkit.org/show_bug.cgi?id=132033
442 Reviewed by Simon Fraser.
444 The generic touch event dispatching does not work well with iOS gesture recognizers.
445 Some events are required to be synchronous, while other needs can be asynchronous and
446 can even use event coalescing. We only need UI callback for the synchronous events.
448 Previously, that was implemented by changing the property ShouldSendEventsSynchronously
449 on WebPageProxy. That is causing issues when synchronous events are sent right after asynchronous
450 events because the responses in WebPageProxy::didReceiveEvent() easily get out of order.
452 This patch completely split the UIGestureRecognizerDispatching from the normal asynchronous event dispatching.
454 Synchronous events are sent directly to the WebProcess and report the result to the PageClient right away.
456 Asynchronous events are sent to the EventDispatcher where they are coalesced until the main thread is free
459 There can be a race where a synchronous event comes before the asynchronous events are processed. In that case,
460 the synchronous event handler starts by getting the events out of the EventDispatcher and dispatch them first.
462 * Shared/NativeWebTouchEvent.h:
463 (WebKit::NativeWebTouchEvent::uniqueId): Deleted.
464 * Shared/ios/NativeWebTouchEventIOS.mm:
465 (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
466 * UIProcess/WebPageProxy.cpp:
467 (WebKit::WebPageProxy::handleSynchronousTouchEvent):
468 (WebKit::WebPageProxy::sendAsynchronousTouchEvent):
469 (WebKit::WebPageProxy::didReceiveEvent):
470 (WebKit::WebPageProxy::resetStateAfterProcessExited):
471 * UIProcess/WebPageProxy.h:
472 * UIProcess/ios/WKContentViewInteraction.h:
473 * UIProcess/ios/WKContentViewInteraction.mm:
474 (-[WKContentView _webTouchEventsRecognized:]):
475 (-[WKContentView _webTouchEvent:WebKit::preventsNativeGestures:]):
476 * WebProcess/WebPage/EventDispatcher.cpp:
477 (WebKit::EventDispatcher::EventDispatcher):
478 (WebKit::EventDispatcher::clearQueuedTouchEventsForPage):
479 (WebKit::EventDispatcher::getQueuedTouchEventsForPage):
480 (WebKit::EventDispatcher::touchEvent):
481 (WebKit::EventDispatcher::dispatchTouchEvents):
482 * WebProcess/WebPage/EventDispatcher.h:
483 * WebProcess/WebPage/EventDispatcher.messages.in:
484 * WebProcess/WebPage/WebPage.cpp:
485 (WebKit::WebPage::dispatchTouchEvent):
486 (WebKit::WebPage::touchEventSync):
487 (WebKit::WebPage::touchEvent):
488 (WebKit::WebPage::touchEventSyncForTesting):
489 (WebKit::WebPage::didCommitLoad):
490 * WebProcess/WebPage/WebPage.h:
491 * WebProcess/WebPage/WebPage.messages.in:
492 * WebProcess/WebPage/ios/WebPageIOS.mm:
493 (WebKit::WebPage::dispatchAsynchronousTouchEventsQueue):
495 2014-04-22 Chris Fleizach <cfleizach@apple.com>
497 AX: iOS hit-testing does not work when page is zoomed
498 https://bugs.webkit.org/show_bug.cgi?id=132013
500 Reviewed by Simon Fraser.
502 Implement accessibilityHitTest so that the point can be converted correctly.
504 * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
505 (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
507 2014-04-22 Commit Queue <commit-queue@webkit.org>
509 Unreviewed, rolling out r167674.
510 https://bugs.webkit.org/show_bug.cgi?id=132025
512 Going a different way with this (Requested by bradee-oh on
517 "Change Image Controls replacement to use selection and paste"
518 https://bugs.webkit.org/show_bug.cgi?id=131992
519 http://trac.webkit.org/changeset/167674
521 2014-04-22 Joseph Pecoraro <pecoraro@apple.com>
523 Remove unused local variable
524 https://bugs.webkit.org/show_bug.cgi?id=132020
526 Reviewed by Alexey Proskuryakov.
528 * UIProcess/ios/forms/WKFormSelectPopover.mm:
529 (-[WKSelectPopover initWithView:hasGroups:]):
531 2014-04-22 Brady Eidson <beidson@apple.com>
533 Change Image Controls replacement to use selection and paste
534 <rdar://problem/16302722> and https://bugs.webkit.org/show_bug.cgi?id=131992
536 Reviewed by Tim Horton.
538 * UIProcess/mac/WebContextMenuProxyMac.mm:
539 (-[WKSharingServicePickerDelegate sharingService:didShareItems:]): Write the
540 replacement data to a special pasteboard, then replace the current selection from
543 Remove all other code used to support the old replacement mechanism:
544 * UIProcess/WebPageProxy.cpp:
545 (WebKit::WebPageProxy::replaceControlledImage): Deleted.
546 * UIProcess/WebPageProxy.h:
547 * UIProcess/mac/WebContextMenuProxyMac.h:
548 (WebKit::WebContextMenuProxyMac::page):
549 (WebKit::WebContextMenuProxyMac::replaceControlledImage): Deleted.
550 * WebProcess/WebPage/WebContextMenu.cpp:
551 (WebKit::WebContextMenu::replaceControlledImage): Deleted.
552 * WebProcess/WebPage/WebContextMenu.h:
553 * WebProcess/WebPage/WebPage.cpp:
554 (WebKit::WebPage::replaceControlledImage): Deleted.
555 * WebProcess/WebPage/WebPage.h:
556 * WebProcess/WebPage/WebPage.messages.in:
558 2014-04-22 Eunmi Lee <eunmi15.lee@samsung.com>
560 [EFL][WK2] Remove duplicated code to set size to the DrawingArea.
561 https://bugs.webkit.org/show_bug.cgi?id=131972
563 Reviewed by Andreas Kling.
565 DrawingArea's size is set in the WebView.cpp when EwkView's size is
566 changed, so we don't have to set again in the PageViewportController.
568 * UIProcess/CoordinatedGraphics/PageViewportController.cpp:
569 (WebKit::PageViewportController::didChangeViewportSize):
571 2014-04-22 Tim Horton <timothy_horton@apple.com>
573 WKThumbnailView doesn't quite work with topContentInset
574 https://bugs.webkit.org/show_bug.cgi?id=131976
575 <rdar://problem/16642127>
577 Reviewed by Darin Adler.
579 * UIProcess/API/Cocoa/_WKThumbnailView.mm:
580 (-[_WKThumbnailView initWithFrame:fromWKView:]):
581 _WKThumbnailView always needs a layer.
582 We don't want to use snapshots by default, this was debugging accidentally landed in the last change.
584 (-[_WKThumbnailView _requestSnapshotIfNeeded]):
585 Don't request a new snapshot if the scale is the same as the existing one.
586 Reduce the height of the snapshot by the topContentInset.
587 Having the origin at (0, 0) is still correct, as the inset content is in negative Y space,
588 and (0, 0) is the true origin of the content.
590 (-[_WKThumbnailView setScale:]):
591 When not snapshotting, we've decided that WKThumbnailView should apply the scale to the WKView layer tree,
592 instead of depending on clients to do so.
594 (-[_WKThumbnailView setUsesSnapshot:]):
595 We *do* need to apply thumbnail scale in the web process even when snapshotting,
596 because we use the live layer tree temporarily while waiting for the asynchronous
597 snapshot to return. This was a misstep in the last thumbnail view patch.
599 2014-04-22 Shivakumar JM <shiva.jm@samsung.com>
601 [WebKit2] Cleanup the build from unused parameter in WebProcess Module
602 https://bugs.webkit.org/show_bug.cgi?id=131970
604 Reviewed by Darin Adler.
606 Fix a build warning by removing the parameters in function paintLayerContents() to fix build warning.
608 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
609 (WebKit::CoordinatedLayerTreeHost::paintLayerContents):
611 2014-04-22 Carlos Garcia Campos <cgarcia@igalia.com>
613 [GTK] Crash after getting web view context property with g_object_get
614 https://bugs.webkit.org/show_bug.cgi?id=131983
616 Reviewed by Philippe Normand.
618 The problem is that the getter is using g_value_take_object() and
619 the default context is destroyed when the caller releases its ref.
621 * UIProcess/API/gtk/WebKitWebView.cpp:
622 (webkitWebViewGetProperty): Use g_value_set_object() instead of
623 g_value_take_object().
625 2014-04-22 Ryuan Choi <ryuan.choi@samsung.com>
627 [EFL][WK2] Remove unnecessary includes in files of Source/WebKit2/UIProcess/API/efl
628 https://bugs.webkit.org/show_bug.cgi?id=131979
630 Reviewed by Gyuyoung Kim.
632 Removed unnecessary includes of header files.
633 In addition, tried to use forward declarations.
635 * UIProcess/API/efl/EwkView.cpp:
636 * UIProcess/API/efl/EwkView.h:
637 * UIProcess/API/efl/EwkViewCallbacks.h:
638 * UIProcess/API/efl/GestureRecognizer.h:
639 * UIProcess/API/efl/ewk_context_menu_item_private.h:
640 * UIProcess/API/efl/ewk_context_menu_private.h:
641 * UIProcess/API/efl/ewk_download_job.cpp:
642 * UIProcess/API/efl/ewk_download_job_private.h:
643 * UIProcess/API/efl/ewk_form_submission_request.cpp:
644 * UIProcess/API/efl/ewk_form_submission_request_private.h:
645 * UIProcess/API/efl/ewk_navigation_data.cpp:
646 * UIProcess/API/efl/ewk_navigation_data_private.h:
647 * UIProcess/API/efl/ewk_page_group_private.h:
648 * UIProcess/API/efl/ewk_popup_menu_private.h:
649 * UIProcess/API/efl/ewk_view.cpp:
650 * UIProcess/API/efl/ewk_window_features_private.h:
651 * UIProcess/efl/PageUIClientEfl.cpp:
652 * UIProcess/efl/ViewClientEfl.cpp:
654 2014-04-21 Tim Horton <timothy_horton@apple.com>
656 [wk2] Don't send intrinsic content size updates with dirty layout
657 https://bugs.webkit.org/show_bug.cgi?id=131964
658 <rdar://problem/14292718>
660 Reviewed by Simon Fraser.
662 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
663 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
664 (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
665 (WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged):
666 (WebKit::TiledCoreAnimationDrawingArea::updateIntrinsicContentSizeIfNeeded):
667 (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
668 (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
669 (WebKit::TiledCoreAnimationDrawingArea::updateIntrinsicContentSizeTimerFired): Deleted.
670 Instead of using a timer (which can fire while layout is dirty) to coalesce
671 intrinsic content size changes, send them only from flushLayers, just after updating layout.
672 This ensures that we never get intermediate intrinsic content sizes that won't be painted.
674 2014-04-21 Tim Horton <timothy_horton@apple.com>
676 Remove a unnecessary forward-declared class from TiledCoreAnimationDrawingArea.
678 Rubber-stamped by Simon Fraser.
680 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
682 2014-04-21 Simon Fraser <simon.fraser@apple.com>
684 Don't try to use a null connection()->xpcConnection()
685 https://bugs.webkit.org/show_bug.cgi?id=131961
687 Reviewed by Dan Bernstein.
689 If running with -WebKit2UseXPCServiceForWebProcess NO, connection()->xpcConnection()
690 is null and xpc_connection_get_pid() would crash, so null-check the xpcConnection.
692 * UIProcess/Network/NetworkProcessProxy.cpp:
693 (WebKit::NetworkProcessProxy::didFinishLaunching):
695 2014-04-21 Dan Bernstein <mitz@apple.com>
697 WebKit part of <rdar://problem/16631323> Page::setDefersLoading doesn’t do anything when using the Network process
698 https://bugs.webkit.org/show_bug.cgi?id=131939
700 Reviewed by David Kilzer.
702 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
703 (WebKit::NetworkConnectionToWebProcess::setDefersLoading): Added. Forwards the message to
704 the NetworkResourceLoader.
705 * NetworkProcess/NetworkConnectionToWebProcess.h:
707 * NetworkProcess/NetworkConnectionToWebProcess.messages.in: Added SetDefersLoading message.
709 * NetworkProcess/NetworkResourceLoader.cpp:
710 (WebKit::NetworkResourceLoader::NetworkResourceLoader): Initialize new member variable
711 m_defersLoading from the new field in the loader parameters.
712 (WebKit::NetworkResourceLoader::start): Added. Like WebCore::ResourceLoader, if loading is
713 deferred, keep the request in m_deferredRequest and bail out.
714 (WebKit::NetworkResourceLoader::setDefersLoading): Added. Similar to
715 WebCore::ResourceLoader::setDefersLoading.
716 * NetworkProcess/NetworkResourceLoader.h:
717 (WebKit::NetworkResourceLoader::defersLoading):
719 * Shared/Network/NetworkResourceLoadParameters.cpp:
720 (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters): Initialize new field
721 defersLoading to false.
722 (WebKit::NetworkResourceLoadParameters::encode): Encode new field.
723 (WebKit::NetworkResourceLoadParameters::decode): Decode new field.
724 * Shared/Network/NetworkResourceLoadParameters.h: Added defersLoading field.
726 * WebProcess/Network/WebResourceLoadScheduler.cpp:
727 (WebKit::WebResourceLoadScheduler::scheduleLoad): Populate defersLoading field in the load
729 (WebKit::WebResourceLoadScheduler::setDefersLoading): Send a message to the Network process.
730 * WebProcess/Network/WebResourceLoadScheduler.h:
732 2014-04-21 Anders Carlsson <andersca@apple.com>
734 Errors passed to delegate methods should have recovery attempters
735 https://bugs.webkit.org/show_bug.cgi?id=131957
736 <rdar://problem/16642539>
738 Reviewed by Tim Horton.
740 * UIProcess/API/Cocoa/_WKErrorRecoveryAttempting.h: Added.
741 * UIProcess/API/Cocoa/_WKErrorRecoveryAttempting.mm: Added.
742 * UIProcess/Cocoa/NavigationState.mm:
743 (WebKit::createErrorWithRecoveryAttempter):
744 (WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
745 (WebKit::NavigationState::LoaderClient::didFailLoadWithErrorForFrame):
746 * UIProcess/Cocoa/WKReloadFrameErrorRecoveryAttempter.h: Added.
747 * UIProcess/Cocoa/WKReloadFrameErrorRecoveryAttempter.mm: Added.
748 (-[WKReloadFrameErrorRecoveryAttempter initWithWebView:frameHandle:urlString:]):
749 (-[WKReloadFrameErrorRecoveryAttempter attemptRecovery]):
750 * WebKit2.xcodeproj/project.pbxproj:
752 2014-04-21 Eric Carlson <eric.carlson@apple.com>
754 [Mac] implement WebKitDataCue
755 https://bugs.webkit.org/show_bug.cgi?id=131799
757 Reviewed by Dean Jackson.
759 * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE.
761 2014-04-21 Beth Dakin <bdakin@apple.com>
763 topContentInset does not play well with fullscreen elements
764 https://bugs.webkit.org/show_bug.cgi?id=131955
766 <rdar://problem/16651925>
768 Reviewed by Sam Weinig.
770 If you take an element (such as a <video>) fullscreen when you have a
771 topContentInset set, there will be an inset-sized gap at the top of the fullscreen
774 Save and restore the topContentInset whenever the scroll position is saved and
776 * WebProcess/FullScreen/WebFullScreenManager.cpp:
777 (WebKit::WebFullScreenManager::WebFullScreenManager):
778 (WebKit::WebFullScreenManager::saveScrollPosition):
779 (WebKit::WebFullScreenManager::restoreScrollPosition):
780 * WebProcess/FullScreen/WebFullScreenManager.h:
782 2014-04-21 Gavin Barraclough <baraclough@apple.com>
784 Don't use ProcessAssertion on simulator
785 https://bugs.webkit.org/show_bug.cgi?id=131950
787 Rubber stamped by Enrica Casucci
789 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
790 (WebKit::connectToService):
791 * UIProcess/ios/ProcessAssertion.h:
793 2014-04-21 Enrica Casucci <enrica@apple.com>
795 [iOS WebKit2] support replacements for misspelled words.
796 https://bugs.webkit.org/show_bug.cgi?id=131827
797 <rdar://problem/16319657>
799 Reviewed by Darin Adler.
801 This is the second a final piece to support replacements.
802 It adds some entrypoints used by the keyboard code to perform
803 replacement when reaching the edge of a word using backspace.
804 I've modified the behavior of replaceSelectedText to work both
805 with caret or range selections.
807 * Shared/EditorState.cpp:
808 (WebKit::EditorState::encode):
809 (WebKit::EditorState::decode):
810 * Shared/EditorState.h:
811 (WebKit::EditorState::EditorState):
812 * UIProcess/ios/WKContentViewInteraction.mm:
813 (-[WKContentView isReplaceAllowed]):
814 (-[WKContentView _characterBeforeCaretSelection]):
815 * WebProcess/WebPage/WebPage.cpp:
816 (WebKit::WebPage::editorState):
817 * WebProcess/WebPage/ios/WebPageIOS.mm:
818 (WebKit::WebPage::replaceSelectedText):
820 2014-04-21 Gavin Barraclough <baraclough@apple.com>
822 Don't use ProcessAssertion on simulator
823 https://bugs.webkit.org/show_bug.cgi?id=131950
825 Rubber stamped by Benjamin Poulain
827 * UIProcess/ios/ProcessAssertion.mm:
828 (WebKit::ProcessAssertion::ProcessAssertion):
829 (WebKit::ProcessAssertion::setState):
831 2014-04-21 Anders Carlsson <andersca@apple.com>
835 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
836 (WebKit::XPCServiceInitializerDelegate::checkEntitlements):
838 2014-04-21 Anders Carlsson <andersca@apple.com>
842 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
843 (WebKit::XPCServiceInitializer):
845 2014-04-21 Tim Horton <timothy_horton@apple.com>
847 [iOS WebKit2] Implement CSS viewport units
848 https://bugs.webkit.org/show_bug.cgi?id=131863
849 <rdar://problem/16279088>
851 Reviewed by Darin Adler.
853 * UIProcess/API/Cocoa/WKWebView.mm:
854 (setMinimumLayoutSizeForMinimalUI):
855 (-[WKWebView _minimumLayoutSizeOverrideForMinimalUI]):
856 (-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
857 Add _setMinimumLayoutSizeOverrideForMinimalUI:, which pushes said size
858 down from the client to WebPageIOS, below.
860 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
861 * UIProcess/WebPageProxy.h:
862 * UIProcess/ios/WebPageProxyIOS.mm:
863 (WebKit::WebPageProxy::setMinimumLayoutSizeForMinimalUI):
864 * WebProcess/WebPage/WebPage.h:
865 * WebProcess/WebPage/WebPage.messages.in:
866 * WebProcess/WebPage/ios/WebPageIOS.mm:
867 (WebKit::WebPage::setMinimumLayoutSizeForMinimalUI):
868 (WebKit::WebPage::viewportConfigurationChanged):
869 Update FrameView's viewport size based on the minimum layout size for minimal UI (if we have it)
870 or the normal minimum layout size, scaled to the page's initial scale.
872 2014-04-21 Benjamin Poulain <bpoulain@apple.com>
874 [iOS][WK2] Fix the dynamic viewport update when the viewport's max-scale conflict with the transition
875 https://bugs.webkit.org/show_bug.cgi?id=131884
877 Reviewed by Darin Adler.
879 <rdar://problem/16667291>
881 * UIProcess/API/Cocoa/WKWebView.mm:
882 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
883 It is fairly common to have a viewport configuration with min-scale=1 and max-scale=1.
884 Since we were only changing the minimumScale for the transition, the target scale was affected
885 by max-scale. This was breaking the transition from portrait to landscale.
887 2014-04-21 Benjamin Poulain <bpoulain@apple.com>
889 [iOS][WK2] Make dynamic viewport size update content aware
890 https://bugs.webkit.org/show_bug.cgi?id=131874
892 Reviewed by Tim Horton.
894 When possible, adjust the scroll position based on the content on dynamic viewport resize.
896 * WebProcess/WebPage/WebPage.cpp:
897 (WebKit::WebPage::WebPage):
898 (WebKit::WebPage::scalePage):
899 (WebKit::WebPage::pageDidScroll):
900 * WebProcess/WebPage/WebPage.h:
901 The scrolling heuristic are not invertible, especially the content heuristic. To have the right
902 behavior when doing resize without changing the page, we save the old scroll position and restore
903 it when the content size and scale is restored.
905 * WebProcess/WebPage/ios/WebPageIOS.mm:
906 (WebKit::WebPage::dynamicViewportSizeUpdate):
907 On dynamic update, start by finding what node is at the center of the screen. After the layout, put that
908 node back in the center.
910 (WebKit::WebPage::updateVisibleContentRects):
912 2014-04-21 Anders Carlsson <andersca@apple.com>
914 Need default WKNavigationDelegate behavior
915 https://bugs.webkit.org/show_bug.cgi?id=131944
916 <rdar://problem/15949822>
918 Reviewed by Dan Bernstein.
920 Port the WebKit1 default delegate behavior over.
922 * UIProcess/Cocoa/NavigationState.mm:
923 (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
924 (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
926 2014-04-21 Dan Bernstein <mitz@apple.com>
928 [Cocoa] Expose WebPage::setDefersLoading
929 https://bugs.webkit.org/show_bug.cgi?id=131943
931 Reviewed by Anders Carlsson, but he doesn’t like this.
933 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
934 (-[WKWebProcessPlugInBrowserContextController _defersLoading]): Added this accessor.
935 (-[WKWebProcessPlugInBrowserContextController _setDefersLoading:]): Ditto.
936 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
937 Declared new property _defersLoading.
939 * WebProcess/WebPage/WebPage.cpp:
940 (WebKit::WebPage::defersLoading): Added this getter.
941 * WebProcess/WebPage/WebPage.h:
943 2014-04-21 Joseph Pecoraro <pecoraro@apple.com>
945 Remove unused WebKitSystemInterface functions
946 https://bugs.webkit.org/show_bug.cgi?id=131938
948 Reviewed by Alexey Proskuryakov.
950 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
951 (InitWebCoreSystemInterface):
953 2014-04-21 Anders Carlsson <andersca@apple.com>
955 Check the com.apple.security.network.client entitlement for all processes
956 https://bugs.webkit.org/show_bug.cgi?id=131942
957 <rdar://problem/12354188>
959 Reviewed by Dan Bernstein.
961 * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
962 (WebKit::NetworkServiceInitializerDelegate::NetworkServiceInitializerDelegate):
963 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
964 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
965 (WebKit::XPCServiceInitializerDelegate::checkEntitlements):
967 2014-04-20 Dan Bernstein <mitz@apple.com>
969 [Cocoa] Remove interfaces in the To Be Removed groups
970 https://bugs.webkit.org/show_bug.cgi?id=131925
972 Reviewed by Darin Adler.
974 * Shared/API/Cocoa/WKRemoteObjectInterface.h: Removed.
975 * Shared/API/Cocoa/WKRemoteObjectInterface.mm: Removed.
976 * Shared/API/Cocoa/WKRemoteObjectRegistry.h: Removed.
977 * Shared/API/Cocoa/WKRemoteObjectRegistry.mm: Removed.
978 * UIProcess/API/Cocoa/WKProcessPool.mm:
979 * UIProcess/API/Cocoa/WKProcessPoolConfiguration.h: Removed.
980 * UIProcess/API/Cocoa/WKProcessPoolConfiguration.mm: Removed.
981 * UIProcess/API/Cocoa/WKProcessPoolConfigurationPrivate.h: Removed.
982 * UIProcess/API/Cocoa/WKProcessPoolToBeRemoved.mm: Removed.
983 * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
984 * WebKit2.xcodeproj/project.pbxproj:
985 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInBrowserContextControllerToBeRemoved.mm: Removed.
986 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
988 2014-04-20 Dan Bernstein <mitz@apple.com>
990 [Cocoa] Crash when setting a bundle parameter to nil
991 https://bugs.webkit.org/show_bug.cgi?id=131917
993 Reviewed by Sam Weinig.
995 * UIProcess/API/Cocoa/WKProcessPool.mm:
996 (-[WKProcessPool _setObject:forBundleParameter:]): If the object is nil, use
997 -[NSMutableDictionary removeObjectForKey:] rather than -setObject:forKey:.
999 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm:
1000 (-[WKWebProcessBundleParameters setParameter:forKey:]): Ditto.
1002 * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
1003 (WebKit::InjectedBundle::setBundleParameter): Unrelatedly, create m_bundleParameters if
1004 needed, as it may have not been created on intialization if no bundle parameters were set
1007 2014-04-20 Dan Bernstein <mitz@apple.com>
1009 [Cocoa] Remove unused -webView:didFinishLoadingNavigation: delegate method
1010 https://bugs.webkit.org/show_bug.cgi?id=131914
1012 Reviewed by Sam Weinig.
1014 * UIProcess/Cocoa/NavigationState.h: Removed flag from m_navigationDelegateMethods struct.
1015 * UIProcess/Cocoa/NavigationState.mm:
1016 (WebKit::NavigationState::setNavigationDelegate): Removed check for whether the method is
1018 (WebKit::NavigationState::LoaderClient::didFinishLoadForFrame): Stopped calling the method
1021 2014-04-19 Anders Carlsson <andersca@apple.com>
1023 Plug-in process crashes if NP_Initialize returns an error the second time it's called
1024 https://bugs.webkit.org/show_bug.cgi?id=131903
1025 <rdar://problem/14355462>
1027 Reviewed by Sam Weinig.
1029 * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
1030 (WebKit::NetscapePluginModule::decrementLoadCount):
1031 Don't try to unload the plug-in if it hasn't been initialized.
1033 2014-04-19 Simon Fraser <simon.fraser@apple.com>
1035 [UI-side compositing] Implement blend modes
1036 https://bugs.webkit.org/show_bug.cgi?id=131891
1037 <rdar://problem/16490085>
1039 Reviewed by Tim Horton.
1041 Implement blend modes with UI-side compositing.
1043 PlatformCALayer::setBlendMode() becomes pure virtual, and overridden in
1044 PlatformCALayerMac and PlatformCALayerRemote.
1045 PlatformCAFilters::setBlendingFiltersOnLayer() now takes a raw platform
1046 layer, so it can be called from the UI process on a CALayer*.
1048 Add BlendMode to LayerProperties, and initialize, encode and decode it,
1049 as well as adding dumping support for blend modes.
1051 * Shared/mac/RemoteLayerTreePropertyApplier.mm:
1052 (WebKit::applyPropertiesToLayer):
1053 * Shared/mac/RemoteLayerTreeTransaction.h:
1054 * Shared/mac/RemoteLayerTreeTransaction.mm:
1055 (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
1056 (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
1057 (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
1058 (WebKit::RemoteLayerTreeTextStream::operator<<):
1059 (WebKit::dumpChangedLayers):
1060 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1061 (WebKit::PlatformCALayerRemote::setBlendMode):
1062 * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
1064 2014-04-19 Joseph Pecoraro <pecoraro@apple.com>
1066 Fix leak of UIScreenEdgePanGestureRecognizer in WKSwipeTransitionController
1067 https://bugs.webkit.org/show_bug.cgi?id=131877
1069 Reviewed by Darin Adler.
1071 * UIProcess/ios/ViewGestureControllerIOS.mm:
1072 (-[WKSwipeTransitionController gestureRecognizerForInteractiveTransition:WithTarget:action:]):
1074 2014-04-19 Dan Bernstein <mitz@apple.com>
1076 Don’t install a source file inside WebProcess.app.
1078 * WebKit2.xcodeproj/project.pbxproj: Removed ViewUpdateDispatcher.messages.in from
1079 WebProcess’s Copy Bundle Resources build phase.
1081 2014-04-19 Darin Adler <darin@apple.com>
1083 [Mac] WebView adjusts the cursor even when another window is in front
1084 https://bugs.webkit.org/show_bug.cgi?id=131898
1085 rdar://problem/14619911
1087 Reviewed by Dan Bernstein.
1089 * UIProcess/API/mac/WKView.mm:
1090 (-[WKView _setCursor:]): Deleted. Moved the code all into PageClientImpl, since none of it
1091 interacts with anything special about a WKView.
1093 * UIProcess/API/mac/WKViewInternal.h: Deleted the _setCursor: method.
1095 * UIProcess/mac/PageClientImpl.mm:
1096 (WebKit::PageClientImpl::setCursor): Added a check that the window is under the cursor
1097 and do nothing if it's not.
1099 2014-04-19 Dan Bernstein <mitz@apple.com>
1101 Use XPC services in the iOS Simulator, but not in Mountain Lion
1102 https://bugs.webkit.org/show_bug.cgi?id=131894
1104 Reviewed by Anders Carlsson.
1106 * Configurations/NetworkService.Development.xcconfig: Defined INFOPLIST_FILE for the
1108 * Configurations/NetworkService.xcconfig: Ditto.
1109 * Configurations/WebContentService.Development.xcconfig: Ditto.
1110 * Configurations/WebContentService.xcconfig: Ditto.
1111 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1112 (WebKit::systemDirectoryPath): Added this helper function that returns a slash-terminated
1113 path to the System directory in the current runtime.
1114 (WebKit::ProcessLauncher::launchProcess): Changed to use the above function to tell whether
1115 a development version of WebKit2 is being used.
1116 * WebKit2Prefix.h: Set WTF_USE_XPC_SERVICES to 1 when targeting the iOS Simulator, but not
1117 when targeting Mountain Lion.
1119 2014-04-19 Dan Bernstein <mitz@apple.com>
1121 [Cocoa] Crash in -[WKWebProcessPlugInHitTestResult nodeHandle] when nodeHandle() is null
1122 https://bugs.webkit.org/show_bug.cgi?id=131888
1124 Reviewed by Jon Honeycutt.
1126 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInHitTestResult.mm:
1127 (-[WKWebProcessPlugInHitTestResult nodeHandle]): Added a null check.
1129 2014-04-19 Simon Fraser <simon.fraser@apple.com>
1131 [iOS WK2] Fuzzy layers on sites using perspective and transforms
1132 https://bugs.webkit.org/show_bug.cgi?id=131873
1133 <rdar://problem/16540576>
1135 Reviewed by Sam Weinig.
1137 Always set rasterizationScale on CALayers in the UI process
1138 (as we do for WK1) so that layers are rasterized taking the
1139 device scale into account. We can do unconditionally; this
1140 is benign on layers that CA doesn't rasterize.
1142 * Shared/mac/RemoteLayerTreePropertyApplier.mm:
1143 (WebKit::applyPropertiesToLayer):
1145 2014-04-18 Simon Fraser <simon.fraser@apple.com>
1147 Use 'override' in GraphicsLayerCA
1148 https://bugs.webkit.org/show_bug.cgi?id=131882
1150 Reviewed by Tim Horton.
1154 * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
1156 2014-04-19 Darin Adler <darin@apple.com>
1158 Assertion in WebPage::runModal accesses object after it may have been destroyed
1159 https://bugs.webkit.org/show_bug.cgi?id=131875
1161 Reviewed by Anders Carlsson.
1163 * WebProcess/WebPage/WebPage.cpp:
1164 (WebKit::WebPage::runModal): Ref the WebPage so it's still around so we can
1165 check the m_isRunningModal flag.
1167 2014-04-18 Commit Queue <commit-queue@webkit.org>
1169 Unreviewed, rolling out r167527.
1170 https://bugs.webkit.org/show_bug.cgi?id=131883
1172 Broke 32-bit build (Requested by ap on #webkit).
1176 "[Mac] implement WebKitDataCue"
1177 https://bugs.webkit.org/show_bug.cgi?id=131799
1178 http://trac.webkit.org/changeset/167527
1180 2014-04-18 Eric Carlson <eric.carlson@apple.com>
1182 [Mac] implement WebKitDataCue
1183 https://bugs.webkit.org/show_bug.cgi?id=131799
1185 Reviewed by Dean Jackson.
1187 * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE.
1189 2014-04-18 Anders Carlsson <andersca@apple.com>
1191 Keep the WebPageProxy alive for the lifetime of all PageLoadState::Transaction objects
1192 https://bugs.webkit.org/show_bug.cgi?id=131872
1193 <rdar://problem/15758414>
1195 Reviewed by Dan Bernstein.
1197 * UIProcess/PageLoadState.cpp:
1198 (WebKit::PageLoadState::PageLoadState):
1199 (WebKit::PageLoadState::Transaction::Transaction):
1200 (WebKit::PageLoadState::Transaction::~Transaction):
1201 * UIProcess/PageLoadState.h:
1202 (WebKit::PageLoadState::Transaction::Transaction): Deleted.
1203 (WebKit::PageLoadState::Transaction::~Transaction): Deleted.
1204 * UIProcess/WebPageProxy.cpp:
1205 (WebKit::WebPageProxy::WebPageProxy):
1207 2014-04-18 Stephanie Lewis <slewis@apple.com>
1209 We shouldn’t create page throttlers for other pages than WebKit2 pages.
1210 Part of <rdar://problem/16473045> Visibility state counters are often incorrect.
1211 https://bugs.webkit.org/show_bug.cgi?id=131696
1213 Reviewed by Gavin Barraclough.
1215 Page throttlers were being created for SVG images and other page instances that
1216 were not accurately tracking the states that enable and disable page throttling.
1217 Make the throttler an unique ptr and only initialize it for WebKit2.
1219 This also fixes an inefficiency where we would throttle a new page on creation because
1220 we assumed it was visible even if that was not the case.
1222 * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: Check page throttler exists.
1223 (WebKit::NPRuntimeObjectMap::evaluate):
1224 * WebProcess/WebPage/WebPage.cpp:
1225 (WebKit::WebPage::WebPage): Initialize page throttler for WebKit2 views.
1226 (WebKit::WebPage::mouseEvent): Check page throttler exists.
1227 (WebKit::WebPage::wheelEvent): ditto
1228 (WebKit::WebPage::keyEvent): ditto
1230 2014-04-18 Anders Carlsson <andersca@apple.com>
1232 Don't allow app sandboxed apps without the network client entitlement to launch the network process
1233 https://bugs.webkit.org/show_bug.cgi?id=131868
1234 <rdar://problem/12354188>
1236 Reviewed by Dan Bernstein.
1238 * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
1239 (WebKit::NetworkServiceInitializerDelegate::NetworkServiceInitializerDelegate):
1240 Add a new delegate that implements checkEntitlements().
1242 (NetworkServiceInitializer):
1243 Pass the new delegate to XPCServiceInitializer.
1245 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
1246 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
1247 Call checkEntitlements.
1249 (WebKit::XPCServiceInitializerDelegate::checkEntitlements):
1252 (WebKit::XPCServiceInitializerDelegate::hasEntitlement):
1253 Helper function that returns whether a client has the given entitlement.
1255 (WebKit::XPCServiceInitializerDelegate::isClientSandboxed):
1256 Helper function that checks whether the client is sandboxed.
1258 2014-04-18 Alice Barraclough <alice.barraclough@webkit.org>
1260 Find on page - extend API by providing highlighted match index
1261 https://bugs.webkit.org/show_bug.cgi?id=131776
1263 Reviewed by Tim Horton.
1265 * Shared/WebFindOptions.h: Add an option for determining match index.
1267 Plumb through the API layers the addition of a parameter for match index.
1268 * UIProcess/API/APIFindClient.h:
1269 (API::FindClient::didFindString):
1270 * UIProcess/API/C/WKPage.cpp:
1271 (WKPageSetPageFindClient):
1272 * UIProcess/API/Cocoa/WKWebView.mm:
1274 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1276 * UIProcess/API/Cocoa/_WKFindDelegate.h:
1277 * UIProcess/Cocoa/FindClient.h:
1278 * UIProcess/Cocoa/FindClient.mm:
1279 (WebKit::FindClient::setDelegate):
1280 (WebKit::FindClient::didFindString):
1281 * UIProcess/WebFindClient.cpp:
1282 (WebKit::WebFindClient::didFindString):
1283 * UIProcess/WebFindClient.h:
1284 * UIProcess/WebPageProxy.cpp:
1285 (WebKit::WebPageProxy::didFindString):
1286 * UIProcess/WebPageProxy.h:
1287 * UIProcess/WebPageProxy.messages.in:
1289 The actual tracking of the match index is contained in FindController class.
1290 * WebProcess/WebPage/FindController.cpp:
1291 (WebKit::FindController::FindController): Start out as -1, understood to be an undefined index in this context.
1292 (WebKit::FindController::updateFindUIAfterPageScroll):
1293 Perform the calculation of matchCount if the flag for DetermineMatchIndex is on.
1294 If matchCount exceeds max, keep the match index undefined because otherwise the finding could advance
1295 to a point where the index exceeds the match count, legitimately. If matchCount doesn't exceed the max, then make
1296 sure the match index, which had been being incremented or decremented blindly back in findString(), is normalized
1297 to be less than match count.
1298 (WebKit::FindController::findString):
1299 If there is a user selection existing on the page, the next occurence of the string will be found after that
1300 selection. In that case we still want the index to properly reflect its ordinal position within the entire document.
1301 Use findStringMatchingRanges to provide the match index, and set a flag that prevents the match index from being
1302 blindly incremented or decremented later. After findString() is actually called on the page, increment or decrement
1303 the find index under specific conditions.
1304 (WebKit::FindController::hideFindIndicator): Reset match index when find UI goes away.
1305 * WebProcess/WebPage/FindController.h: Add m_foundStringMatchIndex to private variables.
1306 * WebProcess/WebPage/ios/FindControllerIOS.mm:
1307 (WebKit::FindController::hideFindIndicator): Reset match index when find UI goes away.
1309 2014-04-18 Joseph Pecoraro <pecoraro@apple.com>
1311 Correct some issues small issues in WK2 file upload InjectedBundle APIs
1312 https://bugs.webkit.org/show_bug.cgi?id=131852
1314 Reviewed by Dan Bernstein.
1316 * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
1317 (API::InjectedBundle::PageUIClient::shouldGenerateFileForUpload):
1318 The default return value, meaning no, should return the null string. The
1319 result is checked later, and null string is a special value meaning no.
1321 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
1322 (WebKit::InjectedBundlePageUIClient::generateFileForUpload):
1323 Pre-check for the correct client function we will use.
1325 2014-04-18 Andy Estes <aestes@apple.com>
1327 [iOS] REGRESSION (r167039): WebKit incorrectly sets a background process assertion state when displaying a PDF
1328 https://bugs.webkit.org/show_bug.cgi?id=131860
1329 <rdar://problem/16631282>
1331 Reviewed by Tim Horton.
1333 We were basing our process assertion state on whether or not the
1334 process had a WKContentView in a window, but when displaying a PDF
1335 we've removed the WKContentView from the window. Base this decision
1336 instead on whether or not the WKWebView is in the window.
1338 * UIProcess/API/Cocoa/WKWebView.mm:
1339 (-[WKWebView didMoveToWindow]):
1340 * UIProcess/ios/PageClientImplIOS.mm:
1341 (WebKit::PageClientImpl::isViewInWindow):
1343 2014-04-18 Anders Carlsson <andersca@apple.com>
1345 Address a couple of review comments
1346 https://bugs.webkit.org/show_bug.cgi?id=131856
1348 Reviewed by Dan Bernstein.
1350 * UIProcess/API/Cocoa/WKNavigationAction.h:
1351 * UIProcess/API/Cocoa/WKNavigationDelegate.h:
1352 * UIProcess/API/Cocoa/WKPreferences.h:
1353 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
1354 * UIProcess/API/Cocoa/WKWebView.h:
1356 2014-04-18 Anders Carlsson <andersca@apple.com>
1358 Handle pluginOrigin being null
1359 https://bugs.webkit.org/show_bug.cgi?id=131849
1360 <rdar://problem/16655898>
1362 Reviewed by Alexey Proskuryakov.
1364 * WebProcess/WebProcess.cpp:
1365 (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin):
1367 2014-04-18 Dan Bernstein <mitz@apple.com>
1369 [Cocoa] Add a navigation delegate method corresponding to didFinishDocumentLoadForFrame for the main frame
1370 https://bugs.webkit.org/show_bug.cgi?id=131847
1372 Reviewed by Anders Carlsson.
1374 * UIProcess/API/APILoaderClient.h:
1375 (API::LoaderClient::didFinishDocumentLoadForFrame): Added a navigationID parameter.
1376 * UIProcess/API/C/WKPage.cpp:
1377 (WKPageSetPageLoaderClient): Updated for the above change in paramerers.
1378 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new delegate method.
1379 * UIProcess/Cocoa/NavigationState.h: Declare override of didFinishDocumentLoadForFrame.
1380 * UIProcess/Cocoa/NavigationState.mm:
1381 (WebKit::NavigationState::setNavigationDelegate): Initialize
1382 webViewNavigationDidFinishDocumentLoad flag in the delegate methods struct.
1383 (WebKit::NavigationState::LoaderClient::didFinishDocumentLoadForFrame): Added override
1384 of the client function which calls the delegate.
1385 * UIProcess/WebPageProxy.cpp:
1386 (WebKit::WebPageProxy::didFinishDocumentLoadForFrame): Get and pass the navigation ID to
1388 * UIProcess/WebPageProxy.h: Added navigationID parameter.
1389 * UIProcess/WebPageProxy.messages.in: Ditto.
1390 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1391 (WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad): Get and send the navigation
1392 ID to the UI process.
1394 2014-04-18 Philippe Normand <pnormand@igalia.com>
1396 Remove NETWORK_INFO support
1397 https://bugs.webkit.org/show_bug.cgi?id=131841
1399 Reviewed by Gyuyoung Kim.
1402 * PlatformEfl.cmake:
1403 * Shared/API/c/WKBase.h:
1404 * Shared/APIObject.h:
1405 * Shared/WebNetworkInfo.cpp: Removed.
1406 * Shared/WebNetworkInfo.h: Removed.
1407 * UIProcess/API/C/WKAPICast.h:
1408 * UIProcess/API/C/WKContext.cpp:
1409 (WKContextGetNetworkInfoManager): Deleted.
1410 * UIProcess/API/C/WKContext.h:
1411 * UIProcess/API/C/WKNetworkInfo.cpp: Removed.
1412 * UIProcess/API/C/WKNetworkInfo.h: Removed.
1413 * UIProcess/API/C/WKNetworkInfoManager.cpp: Removed.
1414 * UIProcess/API/C/WKNetworkInfoManager.h: Removed.
1415 * UIProcess/API/efl/ewk_context.cpp:
1416 (EwkContext::EwkContext):
1417 * UIProcess/API/efl/ewk_context_private.h:
1418 * UIProcess/WebContext.cpp:
1419 (WebKit::WebContext::WebContext):
1420 * UIProcess/WebContext.h:
1421 * UIProcess/WebNetworkInfoManagerProxy.cpp: Removed.
1422 * UIProcess/WebNetworkInfoManagerProxy.h: Removed.
1423 * UIProcess/WebNetworkInfoManagerProxy.messages.in: Removed.
1424 * UIProcess/WebNetworkInfoProvider.cpp: Removed.
1425 * UIProcess/WebNetworkInfoProvider.h: Removed.
1426 * UIProcess/efl/NetworkInfoProvider.cpp: Removed.
1427 * UIProcess/efl/NetworkInfoProvider.h: Removed.
1428 * WebProcess/NetworkInfo/WebNetworkInfoManager.cpp: Removed.
1429 * WebProcess/NetworkInfo/WebNetworkInfoManager.h: Removed.
1430 * WebProcess/NetworkInfo/WebNetworkInfoManager.messages.in: Removed.
1431 * WebProcess/WebCoreSupport/WebNetworkInfoClient.cpp: Removed.
1432 * WebProcess/WebCoreSupport/WebNetworkInfoClient.h: Removed.
1433 * WebProcess/WebPage/WebPage.cpp:
1434 (WebKit::WebPage::WebPage):
1435 * WebProcess/WebProcess.cpp:
1436 (WebKit::WebProcess::WebProcess):
1438 2014-04-17 Daniel Bates <dabates@apple.com>
1440 [iOS] Hook up screen.{availHeight, availWidth, height, width}
1441 https://bugs.webkit.org/show_bug.cgi?id=131821
1442 <rdar://problem/16413795>
1444 Reviewed by Benjamin Poulain and Tim Horton.
1446 Implement WebKit2-specific support infrastructure.
1448 Additionally substitute "screenSize" for "viewporScreenSize" to make the code more understandable.
1450 * Shared/WebPageCreationParameters.cpp:
1451 (WebKit::WebPageCreationParameters::encode): Modified to encode the available screen size
1453 (WebKit::WebPageCreationParameters::decode): Modified to decode the available screen size
1455 * Shared/WebPageCreationParameters.h:
1456 * UIProcess/WebPageProxy.cpp:
1457 (WebKit::WebPageProxy::creationParameters): Initialize the available screen size
1459 * UIProcess/WebPageProxy.h:
1460 * UIProcess/ios/WebPageProxyIOS.mm:
1461 (WebKit::WebPageProxy::screenSize): Renamed; formerly named viewportScreenSize.
1462 (WebKit::WebPageProxy::availableScreenSize): Added.
1463 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1464 (WebKit::WebChromeClient::screenSize): Renamed; formerly named viewportScreenSize.
1465 (WebKit::WebChromeClient::availableScreenSize): Added; turns around and calls WebPage::availableScreenSize().
1466 * WebProcess/WebCoreSupport/WebChromeClient.h:
1467 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1468 (InitWebCoreSystemInterface): Hook up WebKit System Interface function WKGetAvailableScreenSize.
1469 * WebProcess/WebPage/WebPage.cpp:
1470 (WebKit::WebPage::WebPage): Initialize available screen size instance variable.
1471 * WebProcess/WebPage/WebPage.h:
1472 * WebProcess/WebPage/ios/WebPageIOS.mm:
1473 (WebKit::WebPage::screenSize):
1474 (WebKit::WebPage::availableScreenSize):
1476 2014-04-17 Anders Carlsson <andersca@apple.com>
1478 Remove unused API enums
1479 https://bugs.webkit.org/show_bug.cgi?id=131836
1481 Reviewed by Tim Horton.
1483 * UIProcess/API/Cocoa/WKNavigationDelegate.h:
1485 * UIProcess/Cocoa/NavigationState.mm:
1486 (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
1487 (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
1489 2014-04-17 Brent Fulgham <bfulgham@apple.com>
1491 Make RenderLayerBacking get the timingFunction of the correct animation.
1492 https://bugs.webkit.org/show_bug.cgi?id=100632
1494 Reviewed by Simon Fraser.
1496 * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
1497 (IPC::ArgumentCoder<GraphicsLayerAnimation>::decode): Update for new signatures for
1498 FloatAnimationValue, TransformAnimationValue, etc.
1500 2014-04-17 Enrica Casucci <enrica@apple.com>
1502 [iOS WebKit2] support replacements for misspelled words.
1503 https://bugs.webkit.org/show_bug.cgi?id=131827
1504 <rdar://problem/16319657>
1506 Reviewed by Benjamin Poulain.
1508 This is the first part of the work to add support for replacements.
1509 It handles _promptForReplace in canPerformAction to decide
1510 whether to show the Replace button in the menu and add the
1511 implementation of the replace action.
1513 * Shared/EditorState.cpp:
1514 (WebKit::EditorState::encode):
1515 (WebKit::EditorState::decode):
1516 * Shared/EditorState.h:
1517 (WebKit::EditorState::EditorState):
1518 * UIProcess/WebPageProxy.h:
1519 * UIProcess/ios/WKContentViewInteraction.mm:
1520 (-[WKContentView selectedText]):
1521 (-[WKContentView replaceText:withText:]):
1522 (-[WKContentView _promptForReplace:]):
1523 (-[WKContentView replace:]):
1524 (-[WKContentView canPerformAction:withSender:]):
1525 (-[WKContentView selectWordForReplacement]): This is called
1526 by UIKit when the user taps on a mispelled word to select it.
1527 * UIProcess/ios/WebPageProxyIOS.mm:
1528 (WebKit::WebPageProxy::replaceSelectedText):
1529 * WebProcess/WebPage/WebPage.cpp:
1530 (WebKit::WebPage::WebPage):
1531 (WebKit::WebPage::editorState):
1532 * WebProcess/WebPage/WebPage.h:
1533 * WebProcess/WebPage/WebPage.messages.in:
1534 * WebProcess/WebPage/ios/WebPageIOS.mm:
1535 (WebKit::WebPage::selectWithGesture): Removed m_shouldReturnWordForSelection.
1536 We now return always the word corresponding to the caret selection or
1537 the selected text up to a maximum of 200 characters.
1538 (WebKit::WebPage::extendSelection):
1539 (WebKit::WebPage::replaceSelectedText):
1541 2014-04-17 Tim Horton <timothy_horton@apple.com>
1543 [iOS] REGRESSION (r166975): WKPDFView is broken
1544 https://bugs.webkit.org/show_bug.cgi?id=131828
1546 Reviewed by Simon Fraser.
1548 * UIProcess/API/Cocoa/WKWebView.mm:
1549 (-[WKWebView _didCommitLayerTree:WebKit::]):
1550 Bail from updating the scroll view parameters from the layer tree update
1551 while it's being managed by a custom content view.
1552 We'll get any changes again in the next commit after removing the custom
1553 content view (and painting the new page) anyway, so this should be OK.
1555 2014-04-17 Pratik Solanki <psolanki@apple.com>
1557 _webProcessIdentifier should return 0 if the web process crashed
1558 https://bugs.webkit.org/show_bug.cgi?id=131813
1559 <rdar://problem/16650605>
1561 Reviewed by Anders Carlsson.
1563 * UIProcess/API/Cocoa/WKWebView.mm:
1564 (-[WKWebView _hasWebProcess]):
1565 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1567 2014-04-17 Darin Adler <darin@apple.com>
1569 Remove use of deprecatedDeleteAllValues in NPRemoteObjectMap::pluginDestroyed
1570 https://bugs.webkit.org/show_bug.cgi?id=122496
1572 Reviewed by Brent Fulgham.
1574 * Shared/Plugins/NPRemoteObjectMap.cpp:
1575 (WebKit::NPRemoteObjectMap::pluginDestroyed): Use new-style code and write the
1576 deprecatedDeleteAllValues function out using a loop. Might be nice to return here
1577 and use unique_ptr instead some day, but I tried that before and got it wrong, so
1578 lets do that another time.
1580 2014-04-17 Darin Adler <darin@apple.com>
1582 Add separate flag for IndexedDatabase in workers since the current implementation is not threadsafe
1583 https://bugs.webkit.org/show_bug.cgi?id=131785
1584 rdar://problem/16003108
1586 Reviewed by Brady Eidson.
1588 * Configurations/FeatureDefines.xcconfig: Added INDEXED_DATABASE_IN_WORKERS.
1590 2014-04-17 Dan Bernstein <mitz@apple.com>
1592 WebKit2 part of <rdar://problem/16601336> [Cocoa] _userInitiated is always NO in WKNavigationAction passed to -webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:
1593 https://bugs.webkit.org/show_bug.cgi?id=131783
1595 Reviewed by Tim Horton.
1597 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1598 (WebKit::WebChromeClient::createWindow): Set the isProcessingUserGesture field of
1599 the NavigationActionData to the corresponding value in the NavigationAction.
1600 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1601 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): Ditto.
1602 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Ditto.
1604 2014-04-16 Benjamin Poulain <bpoulain@apple.com>
1606 [iOS][WK2] Fix the DidCommitLoad initial scrolling position
1607 https://bugs.webkit.org/show_bug.cgi?id=131780
1609 Reviewed by Jon Honeycutt.
1611 * UIProcess/API/Cocoa/WKWebView.mm:
1612 (-[WKWebView _didCommitLayerTree:]):
1613 That code is older than _obscuredInsets and used the contentInsets as a workaround.
1615 2014-04-16 Benjamin Poulain <bpoulain@apple.com>
1617 [iOS][WK2] Fix annoying scrolling bugs
1618 https://bugs.webkit.org/show_bug.cgi?id=131722
1620 Reviewed by Simon Fraser.
1622 * UIProcess/API/Cocoa/WKWebView.mm:
1623 (-[WKWebView _scrollToContentOffset:WebCore::]):
1624 We are scrolling at the wrong position when we have the "small obscured insets".
1626 2014-04-16 Gavin Barraclough <baraclough@apple.com>
1628 On iOS keep network process running using a process assertion rather than a boost
1629 https://bugs.webkit.org/show_bug.cgi?id=131779
1631 Reviewed by Benjamin Poulain.
1633 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1634 (WebKit::connectToService):
1635 - No need to leak a boost onto the NetworkProcess on iOS.
1636 * UIProcess/Network/NetworkProcessProxy.cpp:
1637 (WebKit::NetworkProcessProxy::didFinishLaunching):
1638 - Take a ProcessAssertion on the NetworkProcess.
1639 * UIProcess/Shared/ChildProcessProxy.h:
1640 - Added m_assertion.
1641 * UIProcess/WebProcessProxy.h:
1642 - Removed m_assertion.
1643 * UIProcess/ios/ProcessAssertion.h: Added.
1644 - Added - refactored from WebProcessProxy.h.
1645 * UIProcess/ios/ProcessAssertion.mm: Added.
1646 (WebKit::ProcessAssertion::ProcessAssertion):
1647 (WebKit::ProcessAssertion::setState):
1648 - Added - refactored from WebProcessProxyIOS.mm.
1649 * UIProcess/ios/WebProcessProxyIOS.mm:
1650 (WebKit::WebProcessProxy::updateProcessState):
1651 - Code refactored out to ProcessAssertion.mm.
1652 * WebKit2.xcodeproj/project.pbxproj:
1655 2014-04-16 Benjamin Poulain <bpoulain@apple.com>
1657 [iOS][WK2] Improve the approximation of the scroll position of the dynamic viewport size updates
1658 https://bugs.webkit.org/show_bug.cgi?id=131720
1660 Reviewed by Tim Horton.
1662 * UIProcess/API/Cocoa/WKWebView.mm:
1663 (-[WKWebView _scrollToContentOffset:]):
1664 The scrolling tree was forcing scroll at the wrong scale during the transition.
1666 (-[WKWebView _setMinimumLayoutSizeOverride:]):
1667 This was left out by accident. The WebProcess was getting the new layout size twice, making
1668 WebPage::dynamicViewportSizeUpdate() very confused when the content size changes.
1670 * WebProcess/WebPage/ios/WebPageIOS.mm:
1671 (WebKit::WebPage::dynamicViewportSizeUpdate):
1672 Add scrolling adjustment for the dynamic relayout case:
1673 -Sticky top and bottom like the UIProcess.
1674 -Keep the same relative position of the unobscured rect's center.
1676 Also fix a bug in the horizontal and vertical adjustments: the code was using the exposed rect
1677 instead of the unobscured rect, which made the adjustments off by the size of the obscured insets.
1679 The type is changed from double to float since ARMv7 has a grudge against double.
1681 2014-04-16 Benjamin Poulain <bpoulain@apple.com>
1683 [iOS][WK2] Do not update the visible content rects when setting the same obscured insets multiple times
1684 https://bugs.webkit.org/show_bug.cgi?id=131633
1686 Reviewed by Darin Adler.
1688 We should avoid computing the visible content rects when not needed.
1690 * UIProcess/API/Cocoa/WKWebView.mm:
1691 (-[WKWebView _setObscuredInsets:]):
1693 2014-04-16 Zan Dobersek <zdobersek@igalia.com>
1695 Make IPC::Arguments a variadic template
1696 https://bugs.webkit.org/show_bug.cgi?id=131684
1698 Reviewed by Darin Adler.
1700 Make IPC::Arguments a variadic template that uses the template parameter pack to further
1701 define the std::tuple ValueType and is used to define the std::tuple container of the
1702 values passed into the container.
1704 * Platform/IPC/Arguments.h:
1705 (IPC::Arguments::Arguments):
1706 (IPC::Arguments::encode):
1707 (IPC::Arguments::decode):
1708 (IPC::Arguments0::encode): Deleted.
1709 (IPC::Arguments0::decode): Deleted.
1710 (IPC::Arguments1::Arguments1): Deleted.
1711 (IPC::Arguments1::encode): Deleted.
1712 (IPC::Arguments1::decode): Deleted.
1713 (IPC::Arguments2::Arguments2): Deleted.
1714 (IPC::Arguments2::encode): Deleted.
1715 (IPC::Arguments2::decode): Deleted.
1716 (IPC::Arguments3::Arguments3): Deleted.
1717 (IPC::Arguments3::encode): Deleted.
1718 (IPC::Arguments3::decode): Deleted.
1719 (IPC::Arguments4::Arguments4): Deleted.
1720 (IPC::Arguments4::encode): Deleted.
1721 (IPC::Arguments4::decode): Deleted.
1722 (IPC::Arguments5::Arguments5): Deleted.
1723 (IPC::Arguments5::encode): Deleted.
1724 (IPC::Arguments5::decode): Deleted.
1725 (IPC::Arguments6::Arguments6): Deleted.
1726 (IPC::Arguments6::encode): Deleted.
1727 (IPC::Arguments6::decode): Deleted.
1728 (IPC::Arguments7::Arguments7): Deleted.
1729 (IPC::Arguments7::encode): Deleted.
1730 (IPC::Arguments7::decode): Deleted.
1731 (IPC::Arguments8::Arguments8): Deleted.
1732 (IPC::Arguments8::encode): Deleted.
1733 (IPC::Arguments8::decode): Deleted.
1734 (IPC::Arguments10::Arguments10): Deleted.
1735 (IPC::Arguments10::encode): Deleted.
1736 (IPC::Arguments10::decode): Deleted.
1737 * Scripts/webkit2/LegacyMessages-expected.h:
1738 * Scripts/webkit2/Messages-expected.h:
1739 * Scripts/webkit2/messages.py: Clean up the code a bit.
1740 (reply_parameter_type):
1744 (arguments_type_old): Deleted.
1745 (base_class): Deleted.
1746 (delayed_reply_type): Deleted.
1748 2014-04-16 Tim Horton <timothy_horton@apple.com>
1750 Deduplicate LayerTreeContext
1751 https://bugs.webkit.org/show_bug.cgi?id=131773
1753 Reviewed by Simon Fraser.
1755 There are three identical implementations, one for each platform, for no reason.
1758 * PlatformEfl.cmake:
1759 * PlatformGTK.cmake:
1760 * Shared/LayerTreeContext.cpp: Renamed from Source/WebKit2/Shared/mac/LayerTreeContextMac.mm.
1761 (WebKit::LayerTreeContext::LayerTreeContext):
1762 (WebKit::LayerTreeContext::~LayerTreeContext):
1763 (WebKit::LayerTreeContext::encode):
1764 (WebKit::LayerTreeContext::decode):
1765 (WebKit::LayerTreeContext::isEmpty):
1766 (WebKit::operator==):
1767 * Shared/LayerTreeContext.h:
1768 (WebKit::operator!=): Deleted.
1769 * Shared/efl/LayerTreeContextEfl.cpp: Removed.
1770 * Shared/gtk/LayerTreeContextGtk.cpp: Removed.
1771 * WebKit2.xcodeproj/project.pbxproj:
1772 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1773 (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
1774 * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
1775 (WebKit::LayerTreeHostGtk::initialize):
1777 2014-04-16 Tim Horton <timothy_horton@apple.com>
1779 Don't build LayerTreeHost on Mac (and clean it up)
1780 https://bugs.webkit.org/show_bug.cgi?id=131769
1782 Reviewed by Simon Fraser.
1784 * WebKit2.xcodeproj/project.pbxproj:
1785 Don't include it in the project.
1787 * WebProcess/InjectedBundle/InjectedBundle.cpp:
1788 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
1789 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
1790 (WebKit::CoordinatedDrawingArea::updatePreferences):
1791 * WebProcess/WebPage/DrawingAreaImpl.cpp:
1792 (WebKit::DrawingAreaImpl::updatePreferences):
1793 * WebProcess/WebPage/LayerTreeHost.h:
1794 (WebKit::LayerTreeHost::setLayerHostingMode): Deleted.
1795 (WebKit::LayerTreeHost::supportsAcceleratedCompositing): Deleted.
1796 * WebProcess/WebPage/WebPage.cpp:
1797 (WebKit::WebPage::updatePreferences):
1798 * WebProcess/WebPage/ios/WebPageIOS.mm:
1799 Get rid of LayerTreeHost::supportsAcceleratedCompositing, which always returns true everywhere.
1800 Remove some LayerTreeHost.h includes.
1801 Remove LayerTreeHost::setLayerHostingMode, which is PLATFORM(COCOA) and not needed.
1803 2014-04-16 Simon Fraser <simon.fraser@apple.com>
1805 Failing to decode a layer tree commit message resulted in silent and mysterious failure
1806 https://bugs.webkit.org/show_bug.cgi?id=131766
1807 <rdar://problem/16520894>
1809 Reviewed by Sam Weinig.
1811 If the message decode failed, we should have already marked the message as invalid.
1812 Failing to do so indicates in a decode code coding error.
1814 * Platform/IPC/HandleMessage.h:
1815 (IPC::handleMessage):
1816 (IPC::handleMessageVariadic):
1817 (IPC::handleMessageDelayed):
1819 2014-04-16 Tim Horton <timothy_horton@apple.com>
1821 Minor include sanity in WebPage.h
1822 https://bugs.webkit.org/show_bug.cgi?id=131752
1824 Reviewed by Simon Fraser.
1826 * WebProcess/WebPage/WebPage.h:
1827 Remove a bunch of unnecessary includes.
1828 Un-indent some stuff.
1830 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1831 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1832 * WebProcess/WebPage/FindController.cpp:
1833 * WebProcess/WebPage/WebPage.cpp:
1834 * WebProcess/WebPage/mac/WebPageMac.mm:
1835 Add back more specific includes, into implementation files.
1837 * WebProcess/WebPage/WebUndoStep.cpp:
1838 (WebKit::WebUndoStep::~WebUndoStep):
1839 * WebProcess/WebPage/WebUndoStep.h:
1840 Add an out-of-line destructor.
1842 2014-04-16 Gavin Barraclough <baraclough@apple.com>
1844 REGRESSION: PCE.js is 20x slower in WebKit2 because timers are throttled
1845 https://bugs.webkit.org/show_bug.cgi?id=131189
1847 Unreviewed rollout of r166754
1849 This change is no longer necessary.
1851 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1852 (WebKit::connectToService):
1854 2014-04-16 Alexey Proskuryakov <ap@apple.com>
1856 Updating tests after bug 131721, [GTK] Fix unused parameter warnings.
1858 * Scripts/webkit2/LegacyMessageReceiver-expected.cpp:
1859 (WebKit::WebPage::didReceiveWebPageMessage):
1860 (WebKit::WebPage::didReceiveSyncWebPageMessage):
1861 * Scripts/webkit2/MessageReceiver-expected.cpp:
1862 (WebKit::WebPage::didReceiveMessage):
1863 (WebKit::WebPage::didReceiveSyncMessage):
1865 2014-04-16 Brendan Long <b.long@cablelabs.com>
1867 [GTK] Fix unused parameter warnings
1868 https://bugs.webkit.org/show_bug.cgi?id=131721
1870 Reviewed by Darin Adler.
1872 * Scripts/webkit2/messages.py:
1873 (generate_message_handler): Add UNUSED_PARAM() for a couple parameters which aren't always used.
1874 * Shared/WebCoreArgumentCoders.cpp:
1875 (IPC::ArgumentCoder<LinearTimingFunction>::decode): Remove unused parameters.
1876 * WebProcess/InjectedBundle/APIInjectedBundleFormClient.h:
1877 (API::InjectedBundle::FormClient::textDidChangeInTextField): Same.
1878 (API::InjectedBundle::FormClient::willSubmitForm): Same.
1879 (API::InjectedBundle::FormClient::willSendSubmitEvent): Same.
1880 * WebProcess/Network/NetworkProcessConnection.cpp:
1881 (WebKit::NetworkProcessConnection::didReceiveSyncMessage): Same.
1883 2014-04-16 Tim Horton <timothy_horton@apple.com>
1885 Accidentally included some style-checker-testing changes in the last commit.
1887 * WebProcess/Plugins/PDF/PDFPlugin.mm:
1888 (WebKit::PDFPlugin::attemptToUnlockPDF):
1889 (WebKit::PDFPlugin::updatePageAndDeviceScaleFactors):
1891 2014-04-16 Tim Horton <timothy_horton@apple.com>
1893 Fix some style checker complaints in PDFPlugin
1894 https://bugs.webkit.org/show_bug.cgi?id=131706
1896 Reviewed by Darin Adler.
1898 * WebProcess/Plugins/PDF/PDFPlugin.mm:
1899 (-[WKPDFPluginAccessibilityObject accessibilityAttributeValue:]):
1900 (-[WKPDFPluginAccessibilityObject accessibilityAttributeValue:forParameter:]):
1901 (-[WKPDFPluginAccessibilityObject accessibilityAttributeNames]):
1902 (WebKit::PDFPlugin::attemptToUnlockPDF):
1903 (WebKit::PDFPlugin::updatePageAndDeviceScaleFactors):
1904 (WebKit::PDFPlugin::isEditingCommandEnabled):
1905 (WebKit::PDFPlugin::nextMatchForString):
1906 (WebKit::PDFPlugin::handleWheelEvent):
1907 (WebKit::PDFPlugin::liveData):
1909 2014-04-15 Dan Bernstein <mitz@apple.com>
1911 [Cocoa] Add a form delegate method corresponding to willSubmitForm
1912 https://bugs.webkit.org/show_bug.cgi?id=131718
1914 Reviewed by Tim Horton.
1916 * UIProcess/API/Cocoa/WKWebView.mm:
1917 (-[WKWebView _setFormDelegate:]): Changed to define and create a FormClient (which derives
1918 from API::FormClient and messages a delegate), and set it as the form client.
1920 * UIProcess/API/Cocoa/_WKFormDelegate.h: Declared new delegate method.
1922 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Added a
1923 variant of willSubmitForm that returs a user object to pass to the delegate in the UI
1924 process, giving it a temporary name with “new”.
1926 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
1927 (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Changed willSubmitForm()
1928 to check for the new bundle delegate method first and encode the user object as user data.
1929 Moved the encoding of an NSObject <NSSecureCoding> as user data into a helper function.
1931 2014-04-15 Hyowon Kim <hw1008.kim@samsung.com>
1933 Make page overlay functionality working on coordinated graphics.
1934 https://bugs.webkit.org/show_bug.cgi?id=131425
1936 Reviewed by Darin Adler.
1938 Page overlay functionality did not work on coordinated graphics since r166975.
1939 This patch removes deprecated code related to the PageOverlay GraphicsLayer management.
1940 and makes CoordinatedLayerTreeHost use PageOverlayController.
1942 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
1943 (WebKit::CoordinatedDrawingArea::mainFrameContentSizeChanged):
1944 (WebKit::CoordinatedDrawingArea::didInstallPageOverlay): Deleted.
1945 (WebKit::CoordinatedDrawingArea::didUninstallPageOverlay): Deleted.
1946 (WebKit::CoordinatedDrawingArea::setPageOverlayNeedsDisplay): Deleted.
1947 (WebKit::CoordinatedDrawingArea::setPageOverlayOpacity): Deleted.
1948 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
1949 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1950 (WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer):
1951 (WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
1952 (WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
1953 (WebKit::CoordinatedLayerTreeHost::didInstallPageOverlay): Deleted.
1954 (WebKit::CoordinatedLayerTreeHost::didUninstallPageOverlay): Deleted.
1955 (WebKit::CoordinatedLayerTreeHost::setPageOverlayNeedsDisplay): Deleted.
1956 (WebKit::CoordinatedLayerTreeHost::setPageOverlayOpacity): Deleted.
1957 (WebKit::CoordinatedLayerTreeHost::createPageOverlayLayer): Deleted.
1958 (WebKit::CoordinatedLayerTreeHost::destroyPageOverlayLayer): Deleted.
1959 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
1960 * WebProcess/WebPage/LayerTreeHost.h:
1961 (WebKit::LayerTreeHost::didInstallPageOverlay):
1962 (WebKit::LayerTreeHost::didUninstallPageOverlay):
1963 (WebKit::LayerTreeHost::setPageOverlayNeedsDisplay):
1965 2014-04-15 Dan Bernstein <mitz@apple.com>
1967 Introduce API::FormClient
1968 https://bugs.webkit.org/show_bug.cgi?id=131714
1970 Reviewed by Tim Horton.
1972 * UIProcess/API/APIFormClient.h: Added.
1973 (API::FormClient::~FormClient):
1974 (API::FormClient::willSubmitForm):
1976 * UIProcess/API/C/WKPage.cpp:
1977 (WKPageSetPageFormClient): Changed to create a WebFormClient and call
1978 WebPageProxy::setFormClient.
1980 * UIProcess/WebFormClient.cpp:
1981 (WebKit::WebFormClient::WebFormClient): Added a constructor from WKPageFormClientBase.
1982 * UIProcess/WebFormClient.h: Added inheritance from API::FormClient, marked overrides as
1985 * UIProcess/WebPageProxy.cpp:
1986 (WebKit::WebPageProxy::WebPageProxy): Initialize m_formClient member.
1987 (WebKit::WebPageProxy::setFormClient): Added. Updates m_formClient.
1988 (WebKit::WebPageProxy::close): Updated code to clear m_formClient.
1989 (WebKit::WebPageProxy::willSubmitForm): Updated for type change.
1990 (WebKit::WebPageProxy::initializeFormClient): Deleted.
1991 * UIProcess/WebPageProxy.h:
1993 * WebKit2.xcodeproj/project.pbxproj: Added reference to new file.
1995 2014-04-15 Simon Fraser <simon.fraser@apple.com>
1997 [iOS WK2] Pages often blank on first load if page loaded by typing the URL
1998 https://bugs.webkit.org/show_bug.cgi?id=131665
2000 Reviewed by Tim Horton.
2002 The document overlay-related code in RemoteLayerTreeDrawingArea::setRootCompositingLayer()
2003 was triggering a compositing layer flush when called with a null rootLayer, which happens
2004 for pages going into the page cache. This would trigger a layer flush that would clobber
2005 the root layer for the visible page, resulting in missing content.
2007 Also, rebuildCompositingLayerTree() is called recursively and the m_documentOverlayRootLayer
2008 was being added to (and then removed from) every single compositing layers.
2010 Fix both these by changing to a pull model, where RenderLayerCompositor requests
2011 the overlay layer via ChromeClient, and gets it at the end of every flush,
2012 adding to the children of the root layer.
2014 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2015 (WebKit::WebChromeClient::documentOverlayLayerForFrame):
2016 * WebProcess/WebCoreSupport/WebChromeClient.h:
2017 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2018 (WebKit::RemoteLayerTreeDrawingArea::setRootCompositingLayer):
2020 2014-04-15 Jinwoo Song <jinwoo7.song@samsung.com>
2022 [EFL][WK2] Pass Mouse movement data to WebMouseEvent
2023 https://bugs.webkit.org/show_bug.cgi?id=131663
2025 Reviewed by Gyuyoung Kim.
2027 Currently mouse movement data are not passed to WebMouseEvent. Instead, they are set to 0 as default.
2028 EFL port needs to send the deltaX and deltaY for PointerLock API which will be implemented later.
2030 * Shared/efl/WebEventFactory.cpp:
2031 (WebKit::WebEventFactory::createWebMouseEvent):
2033 2014-04-15 Commit Queue <commit-queue@webkit.org>
2035 Unreviewed, rolling out r167298.
2036 https://bugs.webkit.org/show_bug.cgi?id=131670
2038 Broke CSS filters (17 test crashes) (Requested by ap on
2043 "[iOS WK2] Pages often blank on first load if page loaded by
2045 https://bugs.webkit.org/show_bug.cgi?id=131665
2046 http://trac.webkit.org/changeset/167298
2048 2014-04-14 Simon Fraser <simon.fraser@apple.com>
2050 [iOS WK2] Pages often blank on first load if page loaded by typing the URL
2051 https://bugs.webkit.org/show_bug.cgi?id=131665
2053 Reviewed by Tim Horton.
2055 The document overlay-related code in RemoteLayerTreeDrawingArea::setRootCompositingLayer()
2056 was triggering a compositing layer flush when called with a null rootLayer, which happens
2057 for pages going into the page cache. This would trigger a layer flush that would clobber
2058 the root layer for the visible page, resulting in missing content.
2060 Also, rebuildCompositingLayerTree() is called recursively and the m_documentOverlayRootLayer
2061 was being added to (and then removed from) every single compositing layers.
2063 Fix both these by changing to a pull model, where RenderLayerCompositor requests
2064 the overlay layer via ChromeClient, and gets it at the end of every flush,
2065 adding to the children of the root layer.
2067 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2068 (WebKit::WebChromeClient::documentOverlayLayerForFrame):
2069 * WebProcess/WebCoreSupport/WebChromeClient.h:
2070 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2071 (WebKit::RemoteLayerTreeDrawingArea::setRootCompositingLayer):
2073 2014-04-14 Tim Horton <timothy_horton@apple.com>
2075 Fix the 32-bit build.
2077 * UIProcess/mac/ViewGestureControllerMac.mm:
2079 2014-04-14 Simon Fraser <simon.fraser@apple.com>
2081 REGRESSION (WebKit2): Programmatic scrolls in overflow-scrolling:touch don't work
2082 https://bugs.webkit.org/show_bug.cgi?id=131649
2084 Reviewed by Tim Horton.
2086 Update the UIScrollView's contentOffset when we're told that the scroll position
2089 Also refactor slightly to have a single exception-protected block.
2091 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
2092 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren):
2094 2014-04-14 Tim Horton <timothy_horton@apple.com>
2096 Fix the 32-bit build.
2098 * UIProcess/mac/ViewGestureControllerMac.mm:
2100 2014-04-14 Tim Horton <timothy_horton@apple.com>
2102 Sometimes-crash under handleSwipeGesture after closing a window or quitting
2103 https://bugs.webkit.org/show_bug.cgi?id=131648
2104 <rdar://problem/15966106>
2106 Reviewed by Simon Fraser.
2108 * UIProcess/mac/ViewGestureController.h:
2109 * UIProcess/mac/ViewGestureControllerMac.mm:
2110 (WebKit::ViewGestureController::~ViewGestureController):
2111 (WebKit::ViewGestureController::trackSwipeGesture):
2112 Keep a Objective C object with a single boolean property, isCancelled, on
2113 the ViewGestureController, and also retained by the swipe-tracking block.
2114 When the ViewGestureController is destroyed, we set isCancelled to YES,
2115 and the next time the block is invoked, we will cancel the swipe without
2116 touching the destroyed ViewGestureController.
2118 (WebKit::ViewGestureController::handleSwipeGesture):
2119 Don't try to handle a swipe gesture if the drawing area is missing.
2121 (WebKit::ViewGestureController::endSwipeGesture):
2122 Clear the swipe cancellation tracker when the gesture completes.
2124 2014-04-14 Enrica Casucci <enrica@apple.com>
2126 REGRESSION(r166027) Menu is shown and immediately hidden after doubletap gesture.
2127 https://bugs.webkit.org/show_bug.cgi?id=131646
2128 <rdar://problem/16614374>
2130 Reviewed by Benjamin Poulain.
2132 This is a problem with every gesture that changes the selection
2133 We don't need to delay updating the selection if the selection is
2134 being changed with a gesture.
2136 * UIProcess/ios/WKContentViewInteraction.h:
2137 * UIProcess/ios/WKContentViewInteraction.mm:
2138 (-[WKContentView _didUpdateBlockSelectionWithTouch:withFlags:growThreshold:shrinkThreshold:]):
2139 (-[WKContentView changeSelectionWithGestureAt:withGesture:withState:]):
2140 (-[WKContentView changeSelectionWithTouchAt:withSelectionTouch:baseIsStart:]):
2141 (-[WKContentView changeSelectionWithTouchesFrom:to:withGesture:withState:]):
2142 (-[WKContentView changeBlockSelectionWithTouchAt:withSelectionTouch:forHandle:]):
2143 (-[WKContentView _selectionChanged]):
2145 2014-04-14 Dan Bernstein <mitz@apple.com>
2147 Let the bundle form client know whether a change in a text field was initiated by user typing
2148 https://bugs.webkit.org/show_bug.cgi?id=131643
2150 Reviewed by Sam Weinig.
2152 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Added
2153 initiatedByUserTyping parameter to the delegate method.
2155 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2156 (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Updated overload of
2157 textDidChangeInTextField to take the initiatedByUserTyping parameter and pass it along to
2160 * WebProcess/InjectedBundle/APIInjectedBundleFormClient.h:
2161 (API::InjectedBundle::FormClient::textDidChangeInTextField): Added initiatedByUserTyping
2164 * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
2165 (WebKit::InjectedBundlePageFormClient::textDidChangeInTextField): Maintained the existing
2166 behavior of not calling the C SPI client if the change was not initiated by user typing.
2167 * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h: Updated for added parameter.
2169 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2170 (WebKit::WebEditorClient::textDidChangeInTextField): Changed to call the bundle client
2171 function unconditionally, but pass along whether the change was initiated by user typing.
2173 2014-04-14 Dan Bernstein <mitz@apple.com>
2175 [Cocoa] Add a WKWebProcessPlugInFormDelegate method corresponding to willSendSubmitEvent
2176 https://bugs.webkit.org/show_bug.cgi?id=131639
2178 Reviewed by Tim Horton.
2180 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Declared
2181 new delegate method.
2182 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2183 (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Added an override
2184 of API::InjectedBundle::FormClient::willSendSubmitEvent which calls the new delegate
2187 2014-04-14 Benjamin Poulain <bpoulain@apple.com>
2189 [iOS][WK2] Change the SPI used when starting the rotation animation
2190 https://bugs.webkit.org/show_bug.cgi?id=131638
2192 Reviewed by Tim Horton.
2194 Having an update block where all the properties are changed is more convenient for Safari.
2196 * UIProcess/API/Cocoa/WKWebView.mm:
2197 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
2198 (-[WKWebView _beginAnimatedResizeToSize:obscuredInsets:minimumLayoutSizeOverride:]): Deleted.
2199 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2201 2014-04-14 Simon Fraser <simon.fraser@apple.com>
2203 [iOS WK2] Hash table assertion closing a tab
2204 https://bugs.webkit.org/show_bug.cgi?id=131640
2206 Reviewed by Tim Horton.
2208 Have RemoteLayerTreeContext keep track of all PlatformCALayerRemotes,
2209 and clear their context pointer when it is being destroyed to avoid
2210 calling into a deleted object later.
2212 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
2213 (WebKit::PlatformCALayerRemote::~PlatformCALayerRemote):
2214 (WebKit::PlatformCALayerRemote::addAnimationForKey):
2215 * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2216 (WebKit::PlatformCALayerRemote::clearContext):
2217 * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
2218 * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
2219 (WebKit::RemoteLayerTreeContext::~RemoteLayerTreeContext):
2220 (WebKit::RemoteLayerTreeContext::layerWasCreated):
2221 (WebKit::RemoteLayerTreeContext::layerWillBeDestroyed):
2223 2014-04-14 Tim Horton <timothy_horton@apple.com>
2225 Allow dynamic changes of WKThumbnailView snapshot scale
2226 https://bugs.webkit.org/show_bug.cgi?id=131628
2227 <rdar://problem/16584156>
2229 Reviewed by Beth Dakin.
2231 * UIProcess/API/Cocoa/_WKThumbnailView.mm:
2232 (-[_WKThumbnailView _requestSnapshotIfNeeded]):
2233 Don't bail from requesting a snapshot just because we already had one; we want to resnapshot.
2234 Keep track of when we bail from requesting a snapshot because we have one in-flight, so we can request it later.
2236 (-[_WKThumbnailView _didTakeSnapshot:]):
2237 Apply the scale to the bitmap size (whoops!).
2238 Make CA always resize the content to fill the thumbnail view's layer, respecting aspect ratio.
2239 Re-snapshot if we previously deferred a snapshot.
2241 (-[_WKThumbnailView setScale:]):
2242 If we get a scale change, request a new snapshot.
2244 (-[_WKThumbnailView setUsesSnapshot:]):
2245 Never apply thumbnail scale to the page if we're using snapshots. It's unnecessary,
2246 because scale will be applied simply when painting the software snapshot.
2247 Apply the thumbnail scale if we're going from usesSnapshot -> !usesSnapshot.
2249 * WebProcess/WebPage/WebPage.cpp:
2250 (WebKit::WebPage::snapshotAtSize):
2251 Snapshots should use the greater of the two scales, so as to never leave a portion of the snapshot unpainted.
2253 2014-04-14 Tim Horton <timothy_horton@apple.com>
2255 REGRESSION (WebKit2 View Gestures): Double-tap doesn't work properly when there's no element underneath the cursor
2256 https://bugs.webkit.org/show_bug.cgi?id=131629
2257 <rdar://problem/16192821>
2259 Reviewed by Dan Bernstein.
2261 * UIProcess/mac/ViewGestureControllerMac.mm:
2262 (WebKit::ViewGestureController::didCollectGeometryForSmartMagnificationGesture):
2263 If there's nothing under the cursor, zoom towards the cursor instead of towards 0,0.
2265 2014-04-14 Simon Fraser <simon.fraser@apple.com>
2267 Run filter animations in the UI process with UI-side compositing
2268 https://bugs.webkit.org/show_bug.cgi?id=131199
2269 <rdar://problem/16479487>
2271 Reviewed by Sam Weinig.
2273 * Shared/WebCoreArgumentCoders.cpp: Removed lots of WebCore::
2274 (IPC::ArgumentCoder<SelectionRect>::decode):
2275 (IPC::ArgumentCoder<PasteboardWebContent>::encode):
2276 (IPC::ArgumentCoder<PasteboardWebContent>::decode):
2277 (IPC::ArgumentCoder<PasteboardImage>::encode):
2278 (IPC::ArgumentCoder<PasteboardImage>::decode):
2279 (IPC::ArgumentCoder<URL>::decode):
2280 (IPC::ArgumentCoder<UserStyleSheet>::encode):
2281 (IPC::ArgumentCoder<UserStyleSheet>::decode):
2282 (IPC::ArgumentCoder<UserScript>::encode):
2283 (IPC::ArgumentCoder<UserScript>::decode):
2284 (IPC::ArgumentCoder<ScrollableAreaParameters>::encode):
2285 (IPC::ArgumentCoder<ScrollableAreaParameters>::decode):
2286 (IPC::ArgumentCoder<FixedPositionViewportConstraints>::encode):
2287 (IPC::ArgumentCoder<FixedPositionViewportConstraints>::decode):
2288 (IPC::ArgumentCoder<StickyPositionViewportConstraints>::encode):
2289 (IPC::ArgumentCoder<StickyPositionViewportConstraints>::decode):
2290 (IPC::ArgumentCoder<FilterOperation>::encode):
2291 (IPC::decodeFilterOperation):
2292 (IPC::ArgumentCoder<FilterOperations>::encode):
2293 (IPC::ArgumentCoder<WebCore::UserStyleSheet>::encode): Deleted.
2294 (IPC::ArgumentCoder<WebCore::UserStyleSheet>::decode): Deleted.
2295 (IPC::ArgumentCoder<WebCore::UserScript>::encode): Deleted.
2296 (IPC::ArgumentCoder<WebCore::UserScript>::decode): Deleted.
2297 (IPC::ArgumentCoder<WebCore::ScrollableAreaParameters>::encode): Deleted.
2298 (IPC::ArgumentCoder<WebCore::ScrollableAreaParameters>::decode): Deleted.
2299 (IPC::ArgumentCoder<WebCore::FixedPositionViewportConstraints>::encode): Deleted.
2300 (IPC::ArgumentCoder<WebCore::FixedPositionViewportConstraints>::decode): Deleted.
2301 (IPC::ArgumentCoder<WebCore::StickyPositionViewportConstraints>::encode): Deleted.
2302 (IPC::ArgumentCoder<WebCore::StickyPositionViewportConstraints>::decode): Deleted.
2303 (IPC::encodeFilterOperation): Deleted.
2304 Add encoding/decoding support for FilterOperation.
2305 decodeFilterOperation() has to be a bare function because of the RefPtr
2307 REFERENCE filters should never be encoded, since they have CachedSVGDocumentReferences.
2309 * Shared/WebCoreArgumentCoders.h:
2311 * Shared/mac/RemoteLayerTreeTransaction.mm:
2312 (WebKit::RemoteLayerTreeTextStream::operator<<):
2313 Add logging for filter animations to the RemoteLayerTree log output.
2315 * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
2316 * WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
2317 (WebKit::GraphicsLayerCARemote::addAnimation): Deleted. We can run
2318 filter animations now.
2320 * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
2321 KeyValues have a RefPtr<WebCore::FilterOperation> now (which can't be part of
2322 the union because we need its constructor to get called).
2323 * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
2324 (WebKit::PlatformCAAnimationRemote::KeyframeValue::encode): Encode the filter.
2325 (WebKit::PlatformCAAnimationRemote::KeyframeValue::decode): Decode the filter.
2326 (WebKit::PlatformCAAnimationRemote::setFromValue): Implement.
2327 (WebKit::PlatformCAAnimationRemote::setToValue): Implement.
2328 (WebKit::PlatformCAAnimationRemote::setValues): Implement.
2329 (WebKit::animationValueFromKeyframeValue): Handle filters.
2331 2014-04-14 Simon Fraser <simon.fraser@apple.com>
2335 * UIProcess/mac/PageClientImpl.h:
2337 2014-04-14 Simon Fraser <simon.fraser@apple.com>
2339 [WK2 iOS] Scrolling to anchor links is broken
2340 https://bugs.webkit.org/show_bug.cgi?id=131618
2341 <rdar://problem/16599144>
2343 Reviewed by Tim Horton.
2345 The RemoteScrollingTree implements scrollingTreeNodeRequestsScroll
2346 to get informed about requested scroll position updates, and passes
2347 them along via the RemoteScrollingCoordinatorProxy, WebPageProxy and PageClient
2348 to the WKWebView, which performs a scroll.
2350 * UIProcess/API/Cocoa/WKWebView.mm:
2351 (-[WKWebView _scrollToContentOffset:WebCore::]): Scroll to content offset,
2352 taking page scale and insets into account.
2353 * UIProcess/API/Cocoa/WKWebViewInternal.h:
2354 * UIProcess/CoordinatedGraphics/WebView.cpp:
2355 (WebKit::WebView::requestScroll):
2356 * UIProcess/CoordinatedGraphics/WebView.h:
2357 * UIProcess/PageClient.h:
2358 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
2359 (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeRequestsScroll):
2360 Pass scrolls along to the WebPageProxy for the root node. We will also need
2361 to handle programmatic scrolls for overflow soon.
2362 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
2363 * UIProcess/Scrolling/RemoteScrollingTree.cpp:
2364 (WebKit::RemoteScrollingTree::scrollingTreeNodeRequestsScroll):
2365 * UIProcess/Scrolling/RemoteScrollingTree.h:
2366 * UIProcess/WebPageProxy.cpp:
2367 (WebKit::WebPageProxy::requestScroll):
2368 * UIProcess/WebPageProxy.h:
2369 * UIProcess/ios/PageClientImplIOS.h:
2370 * UIProcess/ios/PageClientImplIOS.mm:
2371 (WebKit::PageClientImpl::canScrollView):
2372 (WebKit::PageClientImpl::requestScroll):
2373 * UIProcess/mac/PageClientImpl.mm:
2374 (WebKit::PageClientImpl::requestScroll):
2376 2014-04-12 Antti Koivisto <antti@apple.com>
2378 Keep secondary tile grid for zoomed-out scale
2379 https://bugs.webkit.org/show_bug.cgi?id=131586
2381 Reviewed by Darin Adler.
2383 * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
2384 (WebKit::PlatformCALayerRemoteTiledBacking::PlatformCALayerRemoteTiledBacking):
2385 (WebKit::PlatformCALayerRemoteTiledBacking::customSublayers):
2387 Always request new sublayer list from tile controller.
2389 * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
2391 2014-04-14 Tim Horton <timothy_horton@apple.com>
2393 Make WK(Web)View magnification setters actually use view-relative positions
2394 https://bugs.webkit.org/show_bug.cgi?id=131611
2395 <rdar://problem/15965239>
2397 Reviewed by Darin Adler.
2399 * UIProcess/API/mac/WKView.mm:
2400 (-[WKView setMagnification:centeredAtPoint:]):
2401 (-[WKView setMagnification:]):
2402 Use scalePageInViewCoordinates instead.
2404 * UIProcess/WebPageProxy.cpp:
2405 (WebKit::WebPageProxy::scalePageInViewCoordinates):
2406 * UIProcess/WebPageProxy.h:
2407 * WebProcess/WebPage/WebPage.cpp:
2408 (WebKit::WebPage::scalePageInViewCoordinates):
2409 (WebKit::WebPage::pageScaleFactor):
2410 * WebProcess/WebPage/WebPage.h:
2411 * WebProcess/WebPage/WebPage.messages.in:
2412 Add scalePageInViewCoordinates, which turns the scale centerpoint within the view
2413 into what scalePage expects: a post-scale scroll offset.
2415 2014-04-14 Tim Horton <timothy_horton@apple.com>
2417 Support setting a background color on page overlays
2418 https://bugs.webkit.org/show_bug.cgi?id=131600
2420 Reviewed by Darin Adler.
2422 * WebProcess/WebPage/PageOverlay.cpp:
2423 (WebKit::PageOverlay::PageOverlay):
2424 (WebKit::PageOverlay::bounds):
2425 (WebKit::PageOverlay::startFadeInAnimation):
2426 (WebKit::PageOverlay::startFadeOutAnimation):
2427 (WebKit::PageOverlay::startFadeAnimation):
2428 (WebKit::PageOverlay::fadeAnimationTimerFired):
2429 Minor style adjustments.
2430 Use more references everywhere.
2432 (WebKit::PageOverlay::setBackgroundColor):
2433 (WebKit::PageOverlay::setNeedsDisplay):
2434 * WebProcess/WebPage/PageOverlay.h:
2435 (WebKit::PageOverlay::backgroundColor):
2436 Keep track of our background color, and push it down to the page overlay controller if we have one.
2438 * WebProcess/WebPage/PageOverlayController.cpp:
2439 (WebKit::updateOverlayGeometry):
2440 (WebKit::PageOverlayController::clearPageOverlay):
2441 Page overlays will always have the right size, and just use drawsContents to determine
2442 whether or not they should tile/have backing store/etc.
2444 (WebKit::PageOverlayController::installPageOverlay):
2445 (WebKit::PageOverlayController::didChangeOverlayBackgroundColor):
2446 Set the background color of the layer.
2448 * WebProcess/WebPage/PageOverlayController.h:
2450 * WebProcess/WebPage/WebPage.cpp:
2451 (WebKit::WebPage::WebPage):
2454 2014-04-13 Andy Estes <aestes@apple.com>
2456 [QuickLook] Move file system-related code into WebKit
2457 https://bugs.webkit.org/show_bug.cgi?id=131597
2459 Reviewed by Dan Bernstein.
2461 * WebProcess/Network/WebResourceLoader.h: Made m_quickLookHandle a unique_ptr.
2462 * WebProcess/ios/WebResourceLoaderIOS.mm:
2463 (WebKit::WebResourceLoader::setUpQuickLookHandleIfNeeded):
2465 2014-04-13 Andy Estes <aestes@apple.com>
2467 REGRESSION (r167164): -[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:] _block_invoke can access a deallocated completionHandler
2468 https://bugs.webkit.org/show_bug.cgi?id=131595
2470 Reviewed by Dan Bernstein.
2472 Make a copy of completionHandler and release it after we're done with it.
2474 * Shared/mac/CookieStorageShim.mm:
2475 (-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
2477 2014-04-13 Pratik Solanki <psolanki@apple.com>
2479 Don't use ImportanceAssertion on iOS
2480 https://bugs.webkit.org/show_bug.cgi?id=131481
2481 <rdar://problem/16575830>
2483 Reviewed by Darin Adler.
2485 We have other API to mark processes as being in use on iOS. No need to use ImportanceAssertion.
2487 * Platform/IPC/MessageDecoder.cpp:
2488 * Platform/IPC/MessageDecoder.h:
2489 * Platform/IPC/mac/ConnectionMac.cpp:
2490 (IPC::Connection::receiveSourceEventHandler):
2491 * Platform/IPC/mac/ImportanceAssertion.h:
2493 2014-04-13 Commit Queue <commit-queue@webkit.org>
2495 Unreviewed, rolling out r167168 and r167194.
2496 https://bugs.webkit.org/show_bug.cgi?id=131589
2498 Caused massive ASSERTION failures on the GTK Debug bot
2499 (Requested by philn on #webkit).
2501 Reverted changesets:
2503 "[GTK] Add HighDPI support for non-accelerated compositing
2505 https://bugs.webkit.org/show_bug.cgi?id=131562
2506 http://trac.webkit.org/changeset/167168
2508 "Unreviewed. Fix GTK+ build with recent cairo and GTK+ after
2510 http://trac.webkit.org/changeset/167194
2512 2014-04-13 Carlos Garcia Campos <cgarcia@igalia.com>
2514 Unreviewed. Fix GTK+ build with recent cairo and GTK+ after r167168.
2516 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2517 (webkitWebViewBaseCreateWebPage):
2519 2014-04-12 Andy Estes <aestes@apple.com>
2521 [iOS] Move QuickLookHandle from ResourceLoader to WebResourceLoader
2522 https://bugs.webkit.org/show_bug.cgi?id=131580
2524 Reviewed by Darin Adler.
2526 There's no need to bloat WebKit1's ResourceLoader with a pointer that
2527 only WebKit2's WebResourceLoader cares about.
2529 * WebProcess/Network/WebResourceLoader.cpp:
2530 (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
2531 (WebKit::WebResourceLoader::didReceiveData):
2532 (WebKit::WebResourceLoader::didFinishResourceLoad):
2533 (WebKit::WebResourceLoader::didFailResourceLoad):
2534 * WebProcess/Network/WebResourceLoader.h:
2535 * WebProcess/ios/WebResourceLoaderIOS.mm:
2536 (WebKit::WebResourceLoader::setUpQuickLookHandleIfNeeded):
2538 2014-04-11 Alexey Proskuryakov <ap@apple.com>
2540 [Mac] Crashes when copying or pasting huge images
2541 https://bugs.webkit.org/show_bug.cgi?id=131576
2542 <rdar://problem/12131833>
2543 <rdar://problem/14427398>
2545 Reviewed by Darin Adler.
2547 Added a few null checks for SharedMemory::create() return value in pasteboard code.
2548 Error handling feels a bit sketchy, but
2549 - I'm not sure what it should look like ideally;
2550 - it matches the kind of error handling we already have in these functions;
2551 - it appears to work reasonably well in practice. We get empty content, which
2552 is not nice, but not particularly problematic either. When copying an animated GIF,
2553 we also get the GIF in RTFD flavor, so even pasting into NSTextViews works!
2555 * Platform/mac/SharedMemoryMac.cpp:
2556 (WebKit::SharedMemory::createFromVMBuffer):
2557 * UIProcess/mac/WebContextMac.mm:
2558 (WebKit::WebContext::getPasteboardBufferForType):
2559 (WebKit::WebContext::readBufferFromPasteboard):
2560 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2561 (WebKit::WebPlatformStrategies::setBufferForType):
2563 * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: (WebKit::WebDragClient::declareAndWriteDragImage):
2564 Also renamed some variables to prevent name collisions with with nested scope.
2566 2014-04-11 Ryuan Choi <ryuan.choi@samsung.com>
2568 Unreviewed build fix on the EFL port after r167152
2570 * WebProcess/WebPage/PageOverlay.cpp:
2571 (WebKit::PageOverlay::bounds):
2573 2014-04-11 Hyowon Kim <hw1008.kim@samsung.com>
2575 [WK2] WebProcess crashes, when closing window after opening page by means of context menu
2576 https://bugs.webkit.org/show_bug.cgi?id=131439
2578 Reviewed by Tim Horton.
2580 CoordinatedGraphicsLayer calls notifyFlushRequired() through its client when destroyed.
2581 When PageOverlayController::notifyFlushRequired() is called, the DrawingArea could be null
2582 because it's destoryed in WebPage::close().
2584 * WebProcess/WebPage/PageOverlayController.cpp:
2585 (WebKit::PageOverlayController::notifyFlushRequired): Add null check of m_webPage->drawingArea().
2587 2014-04-11 Tim Horton <timothy_horton@apple.com>
2589 Lots of compositing test failures after r167152
2590 https://bugs.webkit.org/show_bug.cgi?id=131574
2592 Reviewed by Simon Fraser.
2594 * WebProcess/WebPage/PageOverlayController.h:
2595 Skip page overlay layers in layer tree dumps, for consistency between platforms.
2597 2014-04-11 Beth Dakin <bdakin@apple.com>
2599 Need WK2 API to disable rubber-banding
2600 https://bugs.webkit.org/show_bug.cgi?id=131567
2602 Reviewed by Simon Fraser.
2604 New API allows the client to enable/disable horizontal or vertical rubber-banding.
2605 By default, rubber-banding is enabled.
2606 * UIProcess/API/C/WKPage.cpp:
2607 (WKPageVerticalRubberBandingIsEnabled):
2608 (WKPageSetEnableVerticalRubberBanding):
2609 (WKPageHorizontalRubberBandingIsEnabled):
2610 (WKPageSetEnableHorizontalRubberBanding):
2611 * UIProcess/API/C/WKPage.h:
2612 * UIProcess/WebPageProxy.cpp:
2613 (WebKit::WebPageProxy::WebPageProxy):
2614 (WebKit::WebPageProxy::setEnableVerticalRubberBanding):
2615 (WebKit::WebPageProxy::verticalRubberBandingIsEnabled):
2616 (WebKit::WebPageProxy::setEnableHorizontalRubberBanding):
2617 (WebKit::WebPageProxy::horizontalRubberBandingIsEnabled):
2618 * UIProcess/WebPageProxy.h:
2619 * WebProcess/WebPage/WebPage.cpp:
2620 (WebKit::WebPage::setEnableVerticalRubberBanding):
2621 (WebKit::WebPage::setEnableHorizontalRubberBanding):
2622 * WebProcess/WebPage/WebPage.h:
2623 * WebProcess/WebPage/WebPage.messages.in:
2625 2014-04-11 Tim Horton <timothy_horton@apple.com>
2629 * WebProcess/WebPage/FindController.cpp:
2630 (WebKit::FindController::updateFindIndicator):
2632 2014-04-11 Tim Horton <timothy_horton@apple.com>
2634 [iOS WebKit2] Find-in-page indicator
2635 https://bugs.webkit.org/show_bug.cgi?id=131510
2636 <rdar://problem/16547777>
2638 Reviewed by Simon Fraser and Enrica Casucci.
2640 * WebKit2.xcodeproj/project.pbxproj:
2641 * WebProcess/WebPage/FindController.cpp:
2642 (WebKit::FindController::updateFindUIAfterPageScroll):
2643 WebKit2 will clear the selection if we reveal it while not enabling selection painting.
2644 So, avoid revealing it.
2646 (WebKit::FindController::findString):
2647 (WebKit::FindController::hideFindIndicator):
2648 (WebKit::FindController::willFindString):
2649 (WebKit::FindController::didFailToFindString):
2650 (WebKit::FindController::didHideFindIndicator):
2651 #if out the cross-platform find indicator code on iOS; it will be replaced
2652 by the code in FindControllerIOS.
2654 * WebProcess/WebPage/FindController.h:
2656 * WebProcess/WebPage/ios/FindControllerIOS.mm: Added.
2658 (WebKit::FindIndicatorOverlayClientIOS::drawRect):
2659 Paint the selection (with black text forced on), and the yellow rounded rect
2660 into the indicator page overlay.
2662 (WebKit::FindController::updateFindIndicator):
2663 Create or update a small document-relative page overlay in the selection rect.
2665 (WebKit::FindController::hideFindIndicator):
2666 (WebKit::FindController::willFindString):
2667 (WebKit::FindController::didFailToFindString):
2668 (WebKit::FindController::didHideFindIndicator):
2669 Add willFindString, didFailToFindString, and didHideFindIndicator functions.
2670 They do nothing, except on iOS where they are used to prevent selection change
2671 messages from being dispatched while using find-in-page, and to force
2672 WebCore to compute a selection rect (via updateAppearance) despite the selection not being painted.
2674 * WebProcess/WebPage/ios/FindIndicatorOverlayClientIOS.h:
2675 (WebKit::FindIndicatorOverlayClientIOS::setFrame):
2677 2014-04-11 Owen Taylor <otaylor@redhat.com>
2679 [GTK] Add HighDPI support for non-accelerated compositing contents
2680 https://bugs.webkit.org/show_bug.cgi?id=131562
2682 Reviewed by Martin Robinson.
2684 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2685 (scaleFactorChanged): Added this callback to pass scale changes to the page proxy.
2686 (webkitWebViewBaseCreateWebPage): Attach the callback to the notify signal.
2687 * UIProcess/cairo/BackingStoreCairo.cpp:
2688 (WebKit::createBackingStoreForGTK): Pass the scale factor to the WebCore backing store.
2689 (WebKit::BackingStore::incorporateUpdate): Ditto.
2691 2014-04-10 Jer Noble <jer.noble@apple.com>
2693 [WK2] Dispatch to main thread's run loop to handle cookie requests.
2694 https://bugs.webkit.org/show_bug.cgi?id=131524
2696 Reviewed by Brady Eidson.
2698 When using synchronous network APIs from the main thread (e.g., -[NSImage
2699 initWithContentsOfURL:]) our cookie shim would attempt to dispath_async
2700 to the main thread to handle the cookie request, and block against the original
2701 request. CFNetwork is still servicing the run loop however, so rather than
2702 dispatch_async to the main queue, use the RunLoop to dispatch to the main thread.
2704 * Shared/mac/CookieStorageShim.mm:
2705 (-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
2707 2014-04-11 Tim Horton <timothy_horton@apple.com>
2709 Make the stylebot happier with r167154.
2711 * UIProcess/PageClient.h:
2712 * UIProcess/WebPageProxy.h:
2713 * UIProcess/ios/PageClientImplIOS.h:
2715 2014-04-11 Tim Horton <timothy_horton@apple.com>
2717 [iOS WebKit2] Expose a simplified zoom-to-rect to the WebProcess
2718 https://bugs.webkit.org/show_bug.cgi?id=131563
2720 Reviewed by Simon Fraser.
2722 * UIProcess/PageClient.h:
2723 * UIProcess/WebPageProxy.h:
2724 * UIProcess/WebPageProxy.messages.in:
2725 * UIProcess/ios/PageClientImplIOS.h:
2726 * UIProcess/ios/PageClientImplIOS.mm:
2727 (WebKit::PageClientImpl::zoomToRect):
2728 * UIProcess/ios/WebPageProxyIOS.mm:
2729 (WebKit::WebPageProxy::zoomToRect):
2730 * WebProcess/WebPage/WebPage.h:
2731 * WebProcess/WebPage/ios/WebPageIOS.mm:
2732 (WebKit::WebPage::zoomToRect):
2733 Add a simple message that calls WKContentView's zoom-to-rect code given just a rect and min/max scale.
2734 We will use the center of the rect as the zoom origin, and will try to show the whole rect.
2736 2014-04-10 Jer Noble <jer.noble@apple.com>
2738 [iOS][WK2] Videos should animate into and out of fullscreen.
2739 https://bugs.webkit.org/show_bug.cgi?id=131497
2741 Reviewed by Simon Fraser.
2743 Pass a starting rect for the enterFullscreen animation and an ending rect
2744 for the exitFullscreen animation.
2746 * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
2747 * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
2748 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2749 (WebKit::WebVideoFullscreenManagerProxy::enterFullscreenWithID): Pass initialFrame.
2750 * WebProcess/ios/WebVideoFullscreenManager.mm:
2751 (WebKit::screenRectOfContents): Casts node -> element and returns its screenRect().
2752 (WebKit::WebVideoFullscreenManager::enterFullscreenForNode): Pass initialFrame.
2753 (WebKit::WebVideoFullscreenManager::exitFullscreenForNode): Pass finalFrame.
2755 2014-04-11 Tim Horton <timothy_horton@apple.com>
2757 Support document-relative and custom-frame page overlays
2758 https://bugs.webkit.org/show_bug.cgi?id=131560
2759 <rdar://problem/16595556>
2761 Reviewed by Simon Fraser.
2763 Add "document-relative" overlays, which attach to (and scroll with) the document,
2764 and can be given a frame rect within the document to avoid overallocation of backing store.
2766 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2767 (WebKit::WebFrameLoaderClient::didChangeScrollOffset):
2768 * WebProcess/WebPage/WebPage.cpp:
2769 (WebKit::WebPage::mainFrame):
2770 (WebKit::WebPage::mainFrameView):
2771 (WebKit::WebPage::didChangeScrollOffsetForFrame):
2772 * WebProcess/WebPage/WebPage.h:
2773 Let the PageOverlayController know *which* frame scrolled, instead of "any frame".
2775 * WebProcess/WebPage/FindController.cpp:
2776 (WebKit::FindController::updateFindUIAfterPageScroll):
2777 Factor out shared code.
2779 (WebKit::FindController::willMoveToWebPage):
2780 (WebKit::FindController::drawRect):
2781 We can use clearRect() instead of a transparency layer and fillRect().
2782 I've looked through all the other overlay clients I know of and none of them
2783 depend on having a transparency layer at the overlay level.
2785 * WebProcess/WebPage/PageOverlay.cpp:
2786 (WebKit::PageOverlay::create):
2787 (WebKit::PageOverlay::PageOverlay):
2788 (WebKit::PageOverlay::bounds):
2789 (WebKit::PageOverlay::frame):
2790 (WebKit::PageOverlay::setFrame):
2791 (WebKit::PageOverlay::drawRect):
2792 Add OverlayType, which allows creation of Document or View relative overlays.
2793 All overlays up to this point are View relative, so we default to that.
2794 Document-relative overlays scroll with the page instead of repainting as
2795 the page scrolls. They can also be given an explicit frame, allowing them
2796 to be smaller than the entire document.
2798 * WebProcess/WebPage/PageOverlay.h:
2799 (WebKit::PageOverlay::overlayType):
2800 (WebKit::PageOverlay::webPage):
2801 (WebKit::PageOverlay::client): Deleted.
2802 * WebProcess/WebPage/PageOverlayController.cpp:
2803 (WebKit::PageOverlayController::initialize):
2804 (WebKit::PageOverlayController::installPageOverlay):
2805 (WebKit::PageOverlayController::uninstallPageOverlay):
2806 (WebKit::PageOverlayController::updateForceSynchronousScrollLayerPositionUpdates):
2807 (WebKit::updateOverlayGeometry):
2808 (WebKit::PageOverlayController::setPageOverlayNeedsDisplay):
2809 (WebKit::PageOverlayController::didChangeViewSize):
2810 (WebKit::PageOverlayController::didChangeDocumentSize):
2811 (WebKit::PageOverlayController::didChangeDeviceScaleFactor):
2812 (WebKit::PageOverlayController::didScrollFrame):
2813 (WebKit::PageOverlayController::flushPageOverlayLayers):
2814 (WebKit::PageOverlayController::didChangeOverlayFrame):
2815 Keep two overlay root layers - one for view-relative
2816 and one for document-relative overlays.
2817 Don't force synchronous scrolling if we only have document-relative overlays.
2818 Update the overlay's position as well as its size whenever necessary.
2819 Update document-relative overlay geometry when the document size changes.
2820 Only explicitly flush view-relative overlays; document-relative ones
2821 are plugged into the WebCore layer tree and flushed along with the page.
2823 * WebProcess/WebPage/PageOverlayController.h:
2824 (WebKit::PageOverlayController::documentOverlayRootLayer):
2825 (WebKit::PageOverlayController::viewOverlayRootLayer):
2826 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2827 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2828 (WebKit::RemoteLayerTreeDrawingArea::setRootCompositingLayer):
2829 (WebKit::RemoteLayerTreeDrawingArea::mainFrameContentSizeChanged):
2830 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2831 (WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged):
2832 (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
2833 Let the PageOverlay controller know when the document size changes.
2834 When we set up compositing, push the document overlay root layer
2837 2014-04-11 Pratik Solanki <psolanki@apple.com>
2839 [iOS WebKit2]: Share NSURLCache directory for webkit processes
2840 https://bugs.webkit.org/show_bug.cgi?id=131513
2841 <rdar://problem/16420859>
2843 Reviewed by Alexey Proskuryakov.
2845 Use iOS specific NSURLCache API to share the cache directory used by the networking process,
2846 web process and Safari.
2848 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2849 (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
2850 * WebProcess/cocoa/WebProcessCocoa.mm:
2851 (WebKit::WebProcess::platformInitializeWebProcess):
2853 2014-04-11 Alexey Proskuryakov <ap@apple.com>
2855 [Mac] Add IconServices to WebProcess sandbox profile
2856 https://bugs.webkit.org/show_bug.cgi?id=131558
2857 <rdar://problem/16552397>
2859 Reviewed by Brady Eidson.
2861 * WebProcess/com.apple.WebProcess.sb.in:
2863 2014-04-11 Antti Koivisto <antti@apple.com>
2865 Pipe initial scale factor to TileController
2866 https://bugs.webkit.org/show_bug.cgi?id=131521
2868 Reviewed by Tim Horton.
2870 * WebProcess/WebPage/ios/WebPageIOS.mm:
2871 (WebKit::WebPage::viewportConfigurationChanged):
2873 2014-04-10 Chris Fleizach <cfleizach@apple.com>
2875 AX: WebProcess at com.apple.WebCore: WebCore::AXObjectCache::rootObject + 18
2876 https://bugs.webkit.org/show_bug.cgi?id=131522
2878 Reviewed by Anders Carlsson.
2880 Protect against documents that have had their render tree destroyed, and no longer return a valid cache.
2882 * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
2884 2014-04-11 Brent Fulgham <bfulgham@apple.com>
2886 [Mac] Prevent crash when exiting fullscreen mode
2887 https://bugs.webkit.org/show_bug.cgi?id=131528
2889 Reviewed by Jer Noble.
2891 * UIProcess/mac/WKFullScreenWindowController.mm:
2892 (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
2893 Clean up the _scaleAnimation controller, not just the _fadeAnimation controller.
2894 (-[WKFullScreenWindowController close]): If we are doing an immediate
2895 close of the view, we need to stop animations so we avoid any
2896 final timer events from interacting with invalid window handles.
2898 2014-04-11 Carlos Garcia Campos <cgarcia@igalia.com>
2900 wk2-gtk does not display anything
2901 https://bugs.webkit.org/show_bug.cgi?id=125558
2903 Reviewed by Martin Robinson.
2905 Remove fcntl call to set access mode flags on the duplicated files
2906 descriptor. Those flags are ignored in Linux and make fcntl to
2907 fail in FreeBSD. We should handle the case where the passed
2908 protection is ReadOnly.
2909 Thanks to Raphael Kubo da Costa who proposed the solution.
2911 * Platform/unix/SharedMemoryUnix.cpp:
2912 (WebKit::SharedMemory::createHandle):
2913 (WebKit::accessModeFile): Deleted.
2915 2014-04-11 Zan Dobersek <zdobersek@igalia.com>
2917 [GTK][WK2] Move Vector objects into WebEditorClient::executePendingEditorCommands() invocations
2918 https://bugs.webkit.org/show_bug.cgi?id=131454
2920 Reviewed by Carlos Garcia Campos.
2922 * WebProcess/WebCoreSupport/WebEditorClient.h:
2923 * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
2924 (WebKit::WebEditorClient::executePendingEditorCommands): Take a const reference of the Vector
2925 object to avoid unnecessary copies. Also deploy two range-based for loops and efficiently move
2926 the Editor::Command objects into the other Vector.
2928 2014-04-10 Dan Bernstein <mitz@apple.com>
2930 <rdar://problem/16582465> [Cocoa] Avoid casts from CF types to unrelated Objective-C types
2931 https://bugs.webkit.org/show_bug.cgi?id=131529
2933 Reviewed by Mark Rowe.
2935 * Shared/API/c/cf/WKStringCF.mm:
2936 (WKStringCreateWithCFString): Cast the CFStringRef into its toll-free-bridged counterpart,
2937 NSString, then cast the NSString into a WKNSString.
2938 * Shared/API/c/cf/WKURLCF.mm:
2939 (WKURLCreateWithCFURL): Cast the CFURLRef into its toll-free-bridged counterpart, NSURL,
2940 then cast the NSURL into a WKNSURL.
2942 2014-04-10 Dan Bernstein <mitz@apple.com>
2944 BundlePageDiagnosticLoggingClient leaks every string passing through it.
2945 https://bugs.webkit.org/show_bug.cgi?id=130140
2947 Reviewed by Brent Fulgham.
2949 * WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp:
2950 (WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessage): Don’t copy the
2951 strings passed into the bundle client.
2953 2014-04-10 Benjamin Poulain <bpoulain@apple.com>
2955 Try to fix the debug bots after r167102
2957 * WebProcess/cocoa/WebProcessCocoa.mm:
2958 (WebKit::WebProcess::platformInitializeWebProcess):
2960 2014-04-10 Gavin Barraclough <barraclough@apple.com>
2962 Add user default for FTL JIT
2963 https://bugs.webkit.org/show_bug.cgi?id=131520
2965 Reviewed by Benjamin Poulain.
2967 * Shared/WebProcessCreationParameters.cpp:
2968 (WebKit::WebProcessCreationParameters::decode):
2969 * UIProcess/mac/WebContextMac.mm:
2970 (WebKit::registerUserDefaultsIfNeeded):
2971 (WebKit::WebContext::platformInitializeWebProcess):
2974 2014-04-10 Gavin Barraclough <barraclough@apple.com>
2976 Add user default for FTL JIT
2977 https://bugs.webkit.org/show_bug.cgi?id=131520
2979 Reviewed by Benjamin Poulain.
2981 * Shared/WebProcessCreationParameters.cpp:
2982 (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
2983 (WebKit::WebProcessCreationParameters::encode):
2984 (WebKit::WebProcessCreationParameters::decode):
2985 * Shared/WebProcessCreationParameters.h:
2986 - pass setting to WebContent process.
2987 * UIProcess/mac/WebContextMac.mm:
2988 (WebKit::registerUserDefaultsIfNeeded):
2989 (WebKit::WebContext::platformInitializeWebProcess):
2990 - read user default.
2991 * WebProcess/cocoa/WebProcessCocoa.mm:
2992 (WebKit::WebProcess::platformInitializeWebProcess):
2995 2014-04-10 Dan Bernstein <mitz@apple.com>
2997 [Cocoa] Notify the form delegate when the custom button in the form accessory view is tapped
2998 https://bugs.webkit.org/show_bug.cgi?id=131518
3000 Reviewed by Tim Horton.
3002 * UIProcess/API/Cocoa/_WKFormDelegate.h: Declared new delegate method.
3003 * UIProcess/ios/WKContentViewInteraction.mm:
3004 (-[WKContentView accessoryAutoFill]): Call the new delegate method.
3006 2014-04-10 Commit Queue <commit-queue@webkit.org>
3008 Unreviewed, rolling out r167097.
3009 https://bugs.webkit.org/show_bug.cgi?id=131519
3011 there was already a mechanism for this, and this was
3012 incomplete anyway (Requested by thorton on #webkit).
3016 "[iOS WebKit2] Disable the find overlay for now"
3017 https://bugs.webkit.org/show_bug.cgi?id=131509
3018 http://trac.webkit.org/changeset/167097
3020 2014-04-10 Tim Horton <timothy_horton@apple.com>
3022 [iOS WebKit2] Disable the find overlay for now
3023 https://bugs.webkit.org/show_bug.cgi?id=131509
3025 Reviewed by Adele Peterson.
3027 * Shared/WebPreferencesStore.h:
3028 * WebProcess/WebPage/FindController.cpp:
3029 (WebKit::FindController::FindController):
3030 (WebKit::FindController::hideFindOverlay):
3031 (WebKit::FindController::hideFindUI):
3032 (WebKit::FindController::setShouldShowOverlay):
3033 * WebProcess/WebPage/FindController.h:
3034 * WebProcess/WebPage/WebPage.cpp:
3035 (WebKit::WebPage::updatePreferences):
3036 Add a setting allowing us to turn off the find-in-page overlay on iOS.
3038 2014-04-10 Sergio Villar Senin <svillar@igalia.com>
3040 Unreviewed GTK build fix after r167074.
3042 This involves replacing resetDragSession() by
3043 resetCurrentDragInformation() and dragSession().operation by
3044 currentDragOperation().
3046 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3047 (webkitWebViewBaseDragDataReceived):
3048 (webkitWebViewBaseDragMotion):
3049 (dragExitedCallback):
3051 2014-04-10 Owen Taylor <otaylor@redhat.com>
3053 [Cairo] Implement ShareableBitmap::paint() with scale factor
3054 https://bugs.webkit.org/show_bug.cgi?id=64665
3056 Reviewed by Martin Robinson.
3058 * Shared/cairo/ShareableBitmapCairo.cpp (WebKit::ShareableBitmap::paint):
3060 2014-04-10 Enrica Casucci <enrica@apple.com>
3062 [iOS WebKit2] Support phraseboundary gesture recognizer for CJK.
3063 https://bugs.webkit.org/show_bug.cgi?id=131493
3064 <rdar://problem/16319583>
3066 Reviewed by Benjamin Poulain.
3068 On iOS it is possible with a gesture to change the selection
3069 within the marked text.
3070 Changing the selection triggers also the update of the inline candidates
3071 over the keyboard area.
3072 The patch adds the logic to decide whether the gesture can begin
3073 as well as the code for the movement of
3074 the selection within the marked range.
3075 The gesture is allowed to start within a given radius from the marked
3078 * Shared/InteractionInformationAtPosition.cpp:
3079 (WebKit::InteractionInformationAtPosition::encode):
3080 (WebKit::InteractionInformationAtPosition::decode):
3081 * Shared/InteractionInformationAtPosition.h:
3082 (WebKit::InteractionInformationAtPosition::InteractionInformationAtPosition):
3083 * Shared/ios/GestureTypes.h:
3084 * UIProcess/WebPageProxy.cpp:
3085 (WebKit::WebPageProxy::editorStateChanged):
3086 * UIProcess/ios/WKContentViewInteraction.mm:
3087 (-[WKContentView pointIsNearMarkedText:]):
3089 (toUIWKGestureType):
3090 * WebProcess/WebPage/ios/WebPageIOS.mm:
3091 (WebKit::WebPage::selectWithGesture):
3092 (WebKit::WebPage::getPositionInformation):
3094 2014-04-10 Enrica Casucci <enrica@apple.com>
3096 Unreviewed iOS build fix after http://trac.webkit.org/changeset/167074
3098 * UIProcess/WebPageProxy.cpp:
3099 (WebKit::WebPageProxy::WebPageProxy):
3101 2014-04-10 Alexey Proskuryakov <ap@apple.com>
3105 * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::performDragControllerAction):
3107 2014-04-09 Alexey Proskuryakov <ap@apple.com>
3109 Eliminate DragSession structure
3110 https://bugs.webkit.org/show_bug.cgi?id=131465
3112 Reviewed by Benjamin Poulain.
3114 * Scripts/webkit2/messages.py:
3116 * Shared/WebCoreArgumentCoders.cpp:
3117 (IPC::ArgumentCoder<DragSession>::encode): Deleted.
3118 (IPC::ArgumentCoder<DragSession>::decode): Deleted.
3119 * Shared/WebCoreArgumentCoders.h:
3120 * UIProcess/API/mac/WKView.mm:
3121 (-[WKView draggingEntered:]):
3122 (-[WKView draggingUpdated:]):
3123 * UIProcess/WebPageProxy.cpp:
3124 (WebKit::WebPageProxy::WebPageProxy):
3125 (WebKit::WebPageProxy::didPerformDragControllerAction):
3126 * UIProcess/WebPageProxy.h:
3127 (WebKit::WebPageProxy::currentDragOperation):
3128 (WebKit::WebPageProxy::currentDragIsOverFileInput):
3129 (WebKit::WebPageProxy::currentDragNumberOfFilesToBeAccepted):
3130 (WebKit::WebPageProxy::resetCurrentDragInformation):
3131 (WebKit::WebPageProxy::dragSession): Deleted.
3132 (WebKit::WebPageProxy::resetDragSession): Deleted.
3133 * UIProcess/WebPageProxy.messages.in:
3134 * WebProcess/WebPage/WebPage.cpp:
3135 (WebKit::WebPage::performDragControllerAction):
3137 2014-04-10 Martin Robinson <mrobinson@igalia.com>
3139 [GTK] LayerTreeHostGtk is creating a software scene graph
3140 https://bugs.webkit.org/show_bug.cgi?id=131471
3142 Reviewed by Sergio Villar Senin.
3144 At some point, a regression was introduced that sent the GTK+ WebKit2 scenegraph down the
3145 software route. The rest of the file depends on the fact that the TextureMapper is the OpenGL
3146 variety, so we should force that explicitly. This is causing crashes locally and soon we
3147 should be able to test this directly.
3149 * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
3150 (WebKit::LayerTreeHostGtk::initialize): Force the use of the OpenGL scenegraph.
3152 2014-04-09 Jeremy Jones <jeremyj@apple.com>
3154 Fix build failure when #if USE(XPC_SERVICES) is false.
3155 https://bugs.webkit.org/show_bug.cgi?id=131474
3157 Reviewed by Dan Bernstein.
3161 * UIProcess/ios/WebProcessProxyIOS.mm:
3162 Add #if around BackgroundTabFlags ForegroundTabFlags to prevent unused variable error.
3164 2014-04-09 Ryuan Choi <ryuan.choi@samsung.com>
3166 [EFL][WK2] Add API to set preferred languages
3167 https://bugs.webkit.org/show_bug.cgi?id=131435
3169 Reviewed by Gyuyoung Kim.
3171 Add ewk_context_preferred_languages_set to change the list of "Accept-Language".
3172 This list is used to receive alternative version of contents, which is related
3173 to specified languages from the contents provider.
3175 * UIProcess/API/efl/ewk_context.cpp:
3176 (ewk_context_preferred_languages_set):
3177 * UIProcess/API/efl/ewk_context.h:
3178 * UIProcess/API/efl/tests/test_ewk2_context.cpp:
3180 (TEST_F): Added test case for ewk_context_preferred_languages_set
3182 2014-04-09 Benjamin Poulain <bpoulain@apple.com>
3184 [iOS][WK2] Add the initial WebProcess handling of animated resize for rotation
3185 https://bugs.webkit.org/show_bug.cgi?id=131469
3187 Reviewed by Tim Horton.
3189 Add the basic handling of dynamic resize from the WebProcess.
3191 On animated resize, the UIProcess decides new target rects and scale. The information
3192 is then passed to the WebProcess to update the content.
3194 For various reason, the target rects and scale computed by the UIProcess can be incorrect
3195 (for example, if viewport constraints limit the scale).
3197 In those cases, the WebProcess has all the information to compute a better target. This patch
3198 adds such a basic update mechanism.
3200 Once the new values are computed, they are sent back to the UIProcess. If the rotation animation
3201 is still ongoing, we do not want mess with it. What we do is set a temporary transform on the subviews
3202 and restore the real value after the animation. The key is to have the two matrix multiplying to the end
3203 value so that there is no visual difference.
3205 * UIProcess/API/Cocoa/WKWebView.mm:
3206 (-[WKWebView _didCommitLayerTree:WebKit::]):
3207 (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:]):
3208 (setViewportConfigurationMinimumLayoutSize):
3209 (-[WKWebView _frameOrBoundsChanged]):
3210 (-[WKWebView _setMinimumLayoutSizeOverride:]):
3211 (-[WKWebView _beginAnimatedResizeToSize:obscuredInsets:minimumLayoutSizeOverride:]):
3212 (-[WKWebView _endAnimatedResize]):
3213 * UIProcess/API/Cocoa/WKWebViewInternal.h:
3214 * UIProcess/API/ios/WKViewIOS.mm:
3215 (-[WKView _frameOrBoundsChanged]):
3216 (-[WKView setMinimumLayoutSizeOverride:]):
3217 * UIProcess/PageClient.h:
3218 * UIProcess/WebPageProxy.h:
3219 * UIProcess/WebPageProxy.messages.in:
3220 * UIProcess/ios/PageClientImplIOS.h:
3221 * UIProcess/ios/PageClientImplIOS.mm:
3222 (WebKit::PageClientImpl::dynamicViewportUpdateChangedTarget):
3223 * UIProcess/ios/WKContentView.h:
3224 * UIProcess/ios/WKContentView.mm:
3225 (-[WKContentView setMinimumLayoutSize:]): Deleted.
3226 * UIProcess/ios/WebPageProxyIOS.mm:
3227 (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
3228 (WebKit::WebPageProxy::dynamicViewportUpdateChangedTarget):
3229 * WebProcess/WebPage/WebPage.h:
3230 * WebProcess/WebPage/WebPage.messages.in:
3231 * WebProcess/WebPage/ios/WebPageIOS.mm:
3232 (WebKit::WebPage::dynamicViewportSizeUpdate):
3234 2014-04-09 Martin Robinson <mrobinson@igalia.com>
3236 Try to fix the GTK+ build after resetDragOperation rename
3238 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3239 (webkitWebViewBaseDragDataReceived): Rename resetDragOperation to resetDragSession.
3240 (dragExitedCallback): Ditto.
3242 2014-04-09 Jeremy Jones <jeremyj@apple.com>
3244 Enable fullscreen captions selection
3245 https://bugs.webkit.org/show_bug.cgi?id=131069
3247 Reviewed by Eric Carlson.
3249 Enable media selection in fullscreen.
3250 setLegibleMediaSelectionOptions/setAudioMediaSelectionOptions provide a list of options.
3251 selectAudioMediaOption/selectLegibleMediaOption change the selected option.
3253 * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
3254 Add selectAudioMediaOption/selectLegibleMediaOption
3256 * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
3257 Add selectAudioMediaOption/selectLegibleMediaOption
3259 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
3260 (WebKit::WebVideoFullscreenManagerProxy::selectAudioMediaOption):
3261 Add selectAudioMediaOption
3263 (WebKit::WebVideoFullscreenManagerProxy::selectLegibleMediaOption):
3264 Add selectLegibleMediaOption
3266 * WebProcess/ios/WebVideoFullscreenManager.h:
3267 Add setAudioMediaSelectionOptions/setLegibleMediaSelectionOptions
3269 * WebProcess/ios/WebVideoFullscreenManager.messages.in:
3270 Add setAudioMediaSelectionOptions/setLegibleMediaSelectionOptions
3272 * WebProcess/ios/WebVideoFullscreenManager.mm:
3273 (WebKit::WebVideoFullscreenManager::setAudioMediaSelectionOptions):
3274 Add setAudioMediaSelectionOptions
3276 (WebKit::WebVideoFullscreenManager::setLegibleMediaSelectionOptions):
3277 Add setLegibleMediaSelectionOptions
3279 2014-04-09 Alexey Proskuryakov <ap@apple.com>
3281 Rename some dragging functions
3282 https://bugs.webkit.org/show_bug.cgi?id=131460
3284 Reviewed by Tim Horton.
3286 Renamed performDrag to performDragOperation.
3288 Also renamed resetDragOperation to resetDragSession, because it's m_dragSession
3291 * Shared/DragControllerAction.h:
3292 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3293 (webkitWebViewBaseDragDrop):
3294 * UIProcess/API/mac/WKView.mm:
3295 (-[WKView draggingEntered:]):
3296 (-[WKView draggingExited:]):
3297 (-[WKView performDragOperation:]):
3298 * UIProcess/WebPageProxy.cpp:
3299 (WebKit::WebPageProxy::performDragOperation):
3300 (WebKit::WebPageProxy::performDrag): Deleted.
3301 * UIProcess/WebPageProxy.h:
3302 (WebKit::WebPageProxy::resetDragSession):
3303 (WebKit::WebPageProxy::resetDragOperation): Deleted.
3304 * WebProcess/WebPage/WebPage.cpp:
3305 (WebKit::WebPage::performDragControllerAction):
3307 2014-04-09 Gavin Barraclough <baraclough@apple.com>
3309 Update SPI for managing tabs
3310 https://bugs.webkit.org/show_bug.cgi?id=131453
3312 Reviewed by Alexey Proskuryakov.
3314 * Configurations/WebKit2.xcconfig:
3315 - added AssertionServices
3316 * UIProcess/WebProcessProxy.h:
3317 - added m_assertion, m_assertionState.
3318 * UIProcess/ios/WebProcessProxyIOS.mm:
3319 (WebKit::WebProcessProxy::updateProcessState):
3320 - create BKSProcessAssertion to take an assertion.
3322 2014-04-09 Enrica Casucci <enrica@apple.com>
3324 WK2: Dictated words disappear after being inserted.
3325 https://bugs.webkit.org/show_bug.cgi?id=131458
3326 <rdar://problem/16395011>
3328 Reviewed by Benjamin Poulain.
3330 The dictation engine treats selected text as text to be
3331 removed. We need to ensure that the range selected to insert the
3332 new text isn't reflected in the UI process until we are done
3335 * WebProcess/WebPage/ios/WebPageIOS.mm:
3336 (WebKit::WebPage::replaceDictatedText):
3338 2014-04-09 Brady Eidson <beidson@apple.com>
3340 Don't offer "contact" actions in telephone number menus
3341 <rdar://problem/16556907> and https://bugs.webkit.org/show_bug.cgi?id=131451
3343 Reviewed by Tim Horton.
3345 * UIProcess/mac/WebPageProxyMac.mm:
3346 (WebKit::WebPageProxy::showTelephoneNumberMenu): Skip actions that have to do with contacts,
3347 and skip separators too!
3349 2014-04-09 Carlos Garcia Campos <cgarcia@igalia.com>
3351 Unreviewed. Fix GTK+ build after r166975.
3353 Do not use WebPage removed API to fix the build. Page overlays are
3354 no broken, see https://bugs.webkit.org/show_bug.cgi?id=131433.
3356 * WebProcess/WebPage/DrawingAreaImpl.cpp:
3357 (WebKit::DrawingAreaImpl::display):
3358 * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
3359 (WebKit::LayerTreeHostGtk::initialize):
3360 (WebKit::LayerTreeHostGtk::paintContents):
3362 2014-04-09 Carlos Garcia Campos <cgarcia@igalia.com>
3364 Unreviewed. Fix GTK+ build after r166965.
3366 * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
3367 (WebKit::WebDragClient::startDrag): Rename Clipboard to DataTransfer.
3369 2014-04-08 Hyowon Kim <hw1008.kim@samsung.com>
3371 Fix EFL Build errors since r166975.
3372 https://bugs.webkit.org/show_bug.cgi?id=131421
3374 Reviewed by Gyuyoung Kim.
3376 This patch is just for fixing EFL build errors.
3377 The page overlay functionality is not working yet.
3380 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
3381 (WebKit::CoordinatedDrawingArea::display):
3382 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
3383 (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
3384 (WebKit::CoordinatedLayerTreeHost::paintLayerContents):
3385 * WebProcess/WebPage/PageOverlayController.cpp:
3386 * WebProcess/WebPage/TapHighlightController.cpp:
3387 (WebKit::TapHighlightController::hideHighlight):
3389 2014-04-08 Jon Lee <jonlee@apple.com>
3391 Turn MSE on by default
3392 https://bugs.webkit.org/show_bug.cgi?id=131313
3393 <rdar://problem/16525223>
3395 Reviewed by Jer Noble.
3397 * Configurations/FeatureDefines.xcconfig:
3398 * Shared/WebPreferencesStore.h: Set default to true.
3399 * UIProcess/API/C/WKPreferencesRefPrivate.h:
3401 2014-04-08 Ryosuke Niwa <rniwa@webkit.org>
3403 Fix the typo in the previous commit.
3405 * WebProcess/WebPage/WebPage.cpp:
3406 (WebKit::WebPage::close):
3408 2014-04-08 Ryosuke Niwa <rniwa@webkit.org>
3410 REGRESSION(r 166890): Crash inside WebKit::WebEditorClient::textFieldDidEndEditing
3411 https://bugs.webkit.org/show_bug.cgi?id=131409
3413 Reviewed by Anders Carlsson.
3415 Create an empty API::InjectedBundle::FormClient to avoid crashing inside
3416 m_mainFrame->coreFrame()->loader().detachFromParent().
3418 * WebProcess/WebPage/WebPage.cpp:
3419 (WebKit::WebPage::close):
3421 2014-04-08 Tim Horton <timothy_horton@apple.com>
3423 Unify and factor out page overlay implementations
3424 https://bugs.webkit.org/show_bug.cgi?id=131353
3426 Reviewed by Anders Carlsson.
3428 * WebProcess/WebPage/PageOverlayController.cpp:
3429 (WebKit::PageOverlayController::uninstallPageOverlay):
3430 Don't turn fast scrolling back off unless the last overlay is removed.
3432 2014-04-08 Anders Carlsson <andersca@apple.com>
3434 Add a WKNavigationAction property indicating whether it resulted from processing a user gesture
3435 https://bugs.webkit.org/show_bug.cgi?id=131405
3436 <rdar://problem/16535453>
3438 Reviewed by Tim Horton.
3440 * Shared/NavigationActionData.cpp:
3441 (WebKit::NavigationActionData::NavigationActionData):
3442 (WebKit::NavigationActionData::encode):
3443 (WebKit::NavigationActionData::decode):
3444 * Shared/NavigationActionData.h:
3445 * UIProcess/API/Cocoa/WKNavigationActionInternal.h:
3446 * UIProcess/API/Cocoa/WKNavigationActionPrivate.h:
3447 * UIProcess/Cocoa/NavigationState.mm:
3448 (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
3449 * UIProcess/Cocoa/UIDelegate.mm:
3450 (WebKit::UIDelegate::UIClient::createNewPage):
3451 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3452 (WebKit::WebChromeClient::createWindow):
3453 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3454 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
3455 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
3457 2014-04-08 Tim Horton <timothy_horton@apple.com>
3459 Unify and factor out page overlay implementations
3460 https://bugs.webkit.org/show_bug.cgi?id=131353
3462 Reviewed by Anders Carlsson.
3464 Bring all of the PageOverlay code together in a single cross-platform
3465 PageOverlayController, including hit-testing code from WebPage and painting
3466 and layer-tree manipulation code from the DrawingArea.
3468 This also makes all PageOverlays a single GraphicsLayer tree which can be
3469 flushed and plugged into any DrawingArea in a straightforward manner.
3470 We no longer have to watch for individual layers flipping into/out of tiling,
3471 because they're hidden underneath the root PageOverlay GraphicsLayer.
3472 Additionally, because GraphicsLayer is cross-platform, we can share
3473 all of the fairly trivial but oft-repeated overlay management code.
3475 * WebKit2.xcodeproj/project.pbxproj:
3476 * WebProcess/WebPage/PageOverlayController.cpp: Added.
3477 * WebProcess/WebPage/PageOverlayController.h: Added.
3478 (WebKit::PageOverlayController::rootLayer):
3479 Add PageOverlayController.
3481 * WebProcess/WebPage/DrawingArea.h:
3482 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
3483 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3484 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
3485 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3486 Remove PageOverlay-related code from the DrawingAreas.