1 2014-04-25 Carlos Garcia Campos <cgarcia@igalia.com>
3 [GTK] Plugin process crashes with GTK2 windowed plugins
4 https://bugs.webkit.org/show_bug.cgi?id=132127
6 Reviewed by Martin Robinson.
8 It happens sometimes because the socket is used before the plug
9 has been added. A runtime critical warnings is shown and it
10 sometimes ends up crashing.
12 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
13 (WebKit::NetscapePlugin::platformPostInitializeWindowed): Do not
14 show the plug widget until the socket is connected.
16 2014-04-24 Andreas Kling <akling@apple.com>
18 [iOS WebKit2] Enable optimization to mmap downloaded resources once they become file-backed.
19 <https://webkit.org/b/132171>
20 <rdar://problem/16720733>
22 Implement a CFNetwork-based version of NetworkResourceLoader::willCacheResponseAsync()
23 and activate the DiskCacheMonitor code path. This means that once resources go into
24 file system cache, we get notified and mmap them from disk, saving heaps of memory.
26 Reviewed by Antti Koivisto.
28 * NetworkProcess/NetworkResourceLoader.h:
29 * NetworkProcess/mac/DiskCacheMonitor.mm:
30 * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
31 (WebKit::NetworkResourceLoader::willCacheResponseAsync):
33 2014-04-24 Andreas Kling <akling@apple.com>
35 [iOS WebKit2] RemoteLayerTreeDrawingArea should force CA to garbage collect surfaces.
36 <https://webkit.org/b/132160>
37 <rdar://problem/16110687>
39 Do an empty CATransaction at the end of RemoteLayerTreeDrawingArea::flushLayers()
40 to get CA to garbage collect its IOSurfaces. This helps clean up unused surfaces
41 that we'd otherwise end up hanging on to for a long time.
43 Reviewed by Tim Horton.
45 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
46 (WebKit::RemoteLayerTreeDrawingArea::didUpdate):
48 2014-04-24 Commit Queue <commit-queue@webkit.org>
50 Unreviewed, rolling out r167700.
51 https://bugs.webkit.org/show_bug.cgi?id=132142
53 Incorrectly reverted the change in r167547 for
54 webkit.org/b/131898 (Requested by rniwa on #webkit).
58 "Cursor doesn't change back to pointer when leaving the Safari
60 https://bugs.webkit.org/show_bug.cgi?id=132038
61 http://trac.webkit.org/changeset/167700
63 2014-04-24 Brady Eidson <beidson@apple.com>
65 Rename "IMAGE_CONTROLS" feature to "SERVICE_CONTROLS"
66 https://bugs.webkit.org/show_bug.cgi?id=132155
68 Reviewed by Tim Horton.
70 * Configurations/FeatureDefines.xcconfig:
71 * Shared/ContextMenuContextData.cpp:
72 (WebKit::ContextMenuContextData::ContextMenuContextData):
73 (WebKit::ContextMenuContextData::operator=):
74 (WebKit::ContextMenuContextData::encode):
75 (WebKit::ContextMenuContextData::decode):
76 * Shared/ContextMenuContextData.h:
77 * UIProcess/WebPageProxy.cpp:
78 (WebKit::WebPageProxy::internalShowContextMenu):
79 * UIProcess/WebPageProxy.h:
80 * UIProcess/mac/WebContextMenuProxyMac.h:
81 * UIProcess/mac/WebContextMenuProxyMac.mm:
82 (WebKit::WebContextMenuProxyMac::contextMenuItemSelected):
83 (WebKit::WebContextMenuProxyMac::populate):
84 (WebKit::WebContextMenuProxyMac::showContextMenu):
85 * WebProcess/InjectedBundle/InjectedBundle.cpp:
86 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
87 * WebProcess/WebPage/WebContextMenu.cpp:
88 * WebProcess/WebPage/WebContextMenu.h:
89 * WebProcess/WebPage/WebPage.cpp:
90 (WebKit::WebPage::updatePreferences):
91 * WebProcess/WebPage/WebPage.h:
92 * WebProcess/WebPage/WebPage.messages.in:
94 2014-04-24 Joseph Pecoraro <pecoraro@apple.com>
96 [iOS] Add some missing overrides and remove unnecessary virtuals
97 https://bugs.webkit.org/show_bug.cgi?id=132153
99 Reviewed by Darin Adler.
101 * UIProcess/ios/PageClientImplIOS.h:
102 * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
104 2014-04-24 Tim Horton <timothy_horton@apple.com>
106 WebKit2 View Gestures: Use a single struct for the snapshot, and pass it around
107 https://bugs.webkit.org/show_bug.cgi?id=132114
109 Reviewed by Simon Fraser.
111 Have only a single map in ViewSnapshotStore, from back-forward item
112 to ViewSnapshotStore::Snapshot, and return the Snapshot struct when looking
113 up snapshots (via getSnapshot()), so that future patches can persist additional
114 information along with the snapshot.
116 * UIProcess/ios/ViewGestureControllerIOS.mm:
117 (WebKit::ViewGestureController::beginSwipeGesture):
118 (WebKit::ViewGestureController::endSwipeGesture):
119 * UIProcess/mac/ViewGestureController.h:
120 * UIProcess/mac/ViewGestureControllerMac.mm:
121 (WebKit::ViewGestureController::retrieveSnapshotForItem):
122 (WebKit::ViewGestureController::beginSwipeGesture):
123 (WebKit::ViewGestureController::endSwipeGesture):
124 Adopt getSnapshot() instead of snapshotAndRenderTreeSize().
125 Move retrieveSnapshotForItem out into a separate function (for future use).
127 * UIProcess/mac/ViewSnapshotStore.h:
128 (WebKit::ViewSnapshotStore::disableSnapshotting):
129 (WebKit::ViewSnapshotStore::enableSnapshotting):
130 * UIProcess/mac/ViewSnapshotStore.mm:
131 (WebKit::ViewSnapshotStore::pruneSnapshots):
132 (WebKit::ViewSnapshotStore::recordSnapshot):
133 (WebKit::ViewSnapshotStore::getSnapshot):
134 (WebKit::ViewSnapshotStore::snapshotAndRenderTreeSize): Deleted.
135 Make Snapshot struct public.
136 Get rid of the separate map of back-forward items to render tree sizes.
137 When evicting, instead of removing the entry, clear out its snapshot image;
138 this way, we can keep other snapshot metadata around.
140 2014-04-24 Enrica Casucci <enrica@apple.com>
142 [iOS WebKit2] Should properly handle focus redirect (keyboard state changes when focus changes).
143 https://bugs.webkit.org/show_bug.cgi?id=132136
144 <rdar://problem/16238336>
146 Reviewed by Benjamin Poulain.
148 Focusing a field from JavaScript should not make the keyboard or the select picker
149 appear unless the user has already started interacting with one of the fields in the page.
150 Adding a parameter to StartAssistingNode to indicate whether the focus change is a result
153 * UIProcess/PageClient.h:
154 * UIProcess/WebPageProxy.h:
155 * UIProcess/WebPageProxy.messages.in:
156 * UIProcess/ios/PageClientImplIOS.h:
157 * UIProcess/ios/PageClientImplIOS.mm:
158 (WebKit::PageClientImpl::startAssistingNode):
159 * UIProcess/ios/WKContentViewInteraction.h:
160 * UIProcess/ios/WKContentViewInteraction.mm:
161 (-[WKContentView _startAssistingNode:userIsInteracting:userObject:]):
162 * UIProcess/ios/WebPageProxyIOS.mm:
163 (WebKit::WebPageProxy::startAssistingNode):
164 * WebProcess/WebPage/WebPage.cpp:
165 (WebKit::WebPage::WebPage):
166 (WebKit::WebPage::dispatchTouchEvent):
167 * WebProcess/WebPage/WebPage.h:
168 * WebProcess/WebPage/ios/WebPageIOS.mm:
169 (WebKit::WebPage::handleTap):
170 (WebKit::WebPage::elementDidFocus):
172 2014-04-24 Myles C. Maxfield <mmaxfield@apple.com>
174 FontCache::fontCache() never returns nullptr so it can be made to return a reference instead
175 https://bugs.webkit.org/show_bug.cgi?id=132110
177 Reviewed by Tim Horton.
179 Updates callers to use '.' instead of '->'.
181 No new tests are necessary because there should be no behavior change.
183 * WebProcess/WebProcess.cpp:
184 (WebKit::WebProcess::terminate):
185 (WebKit::WebProcess::didClose):
186 (WebKit::WebProcess::getWebCoreStatistics):
188 2014-04-24 Eric Carlson <eric.carlson@apple.com>
190 [iOS] Manage AudioSession category according to media type
191 https://bugs.webkit.org/show_bug.cgi?id=132096
193 Reviewed by Jer Noble.
195 * WebProcess/WebPage/WebPage.cpp:
196 (WebKit::WebPage::WebPage): Tell WebCore to manage the AudioSession.
198 2014-04-24 Tim Horton <timothy_horton@apple.com>
200 [wk2] Provide SPI allowing clients to hand events directly to swipe code, bypassing scrolling
201 https://bugs.webkit.org/show_bug.cgi?id=132092
202 <rdar://problem/15948244>
204 Reviewed by Darin Adler.
206 * UIProcess/API/Cocoa/WKViewPrivate.h:
207 * UIProcess/API/mac/WKView.mm:
208 (-[WKView _tryToSwipeWithEvent:ignoringPinnedState:]):
209 Added. Hand the event directly to ViewGestureController, optionally
210 ignoring whether or not the WKView is scrollable (always pretending that it is not).
212 * UIProcess/mac/ViewGestureController.h:
213 (WebKit::ViewGestureController::shouldIgnorePinnedState):
214 (WebKit::ViewGestureController::setShouldIgnorePinnedState):
215 * UIProcess/mac/ViewGestureControllerMac.mm:
216 (WebKit::ViewGestureController::ViewGestureController):
217 (WebKit::ViewGestureController::scrollEventCanBecomeSwipe):
218 (WebKit::ViewGestureController::handleScrollWheelEvent):
219 (WebKit::ViewGestureController::wheelEventWasNotHandledByWebCore):
220 (WebKit::scrollEventCanBecomeSwipe):
221 If we're ignoring the view's pinned state, pretend that we're always pinned,
222 and don't worry about sending events to WebCore.
224 2014-04-24 Carlos Garcia Campos <cgarcia@igalia.com>
226 [GTK] wmode='transparent' for flash plugin doesn't work
227 https://bugs.webkit.org/show_bug.cgi?id=120055
229 Reviewed by Gustavo Noronha Silva.
231 Force opaque window mode for flash plugin when wmode='transparent',
232 since X11 backend doesn't support transparency. We should add
233 proper transparency support because forcing opaque window mode
234 doesn't really work. Handle this as a plugin quirk instead of
235 adding X11 specific code to WebFrameLoaderClient::createPlugin().
237 * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
238 (WebKit::NetscapePluginModule::determineQuirks): Add
239 ForceFlashWindowlessMode quirk for flash in case of EFL platform
240 because EFL port doesn't support windowed plugins.
241 * Shared/Plugins/PluginQuirks.h: Add ForceFlashWindowlessMode X11
243 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
244 (WebKit::NetscapePlugin::initialize): Modify or add wmode
245 parameter for flash plugin, to force opaque window mode when
246 transparent mode is specified or when ForceFlashWindowlessMode
248 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
249 (WebKit::WebFrameLoaderClient::createPlugin): Remove X11 specific code.
251 2014-04-23 Simon Fraser <simon.fraser@apple.com>
253 [iOS WK2] Missing content inside long overflow-scrolling:touch
254 https://bugs.webkit.org/show_bug.cgi?id=132105
256 Reviewed by Tim Horton.
258 PlatformCALayerRemote needs to track bounds origin as well as size,
259 since iOS uses bounds origin for overflow scrolling.
261 * Shared/mac/RemoteLayerTreePropertyApplier.mm:
262 (WebKit::applyPropertiesToLayer):
263 * Shared/mac/RemoteLayerTreeTransaction.h:
264 * Shared/mac/RemoteLayerTreeTransaction.mm:
265 (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
266 (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
267 (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
268 (WebKit::dumpChangedLayers):
269 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
270 (WebKit::PlatformCALayerRemote::updateBackingStore):
271 (WebKit::PlatformCALayerRemote::bounds):
272 (WebKit::PlatformCALayerRemote::setBounds):
274 2014-04-23 Andreas Kling <akling@apple.com>
276 Remove unused WKPageSetMemoryCacheClientCallsEnabled API.
277 <https://webkit.org/b/132098>
279 This API was added to WK2 back in 2011 but never actually used.
281 Reviewed by Anders Carlsson.
283 * Shared/WebPageCreationParameters.cpp:
284 (WebKit::WebPageCreationParameters::encode):
285 (WebKit::WebPageCreationParameters::decode):
286 * Shared/WebPageCreationParameters.h:
287 * UIProcess/API/C/WKPage.cpp:
288 (WKPageSetMemoryCacheClientCallsEnabled): Deleted.
289 * UIProcess/API/C/WKPage.h:
290 * UIProcess/WebPageProxy.cpp:
291 (WebKit::WebPageProxy::WebPageProxy):
292 (WebKit::WebPageProxy::creationParameters):
293 (WebKit::WebPageProxy::setMemoryCacheClientCallsEnabled): Deleted.
294 * UIProcess/WebPageProxy.h:
295 * WebProcess/WebPage/WebPage.cpp:
296 (WebKit::WebPage::WebPage):
297 (WebKit::WebPage::setMemoryCacheMessagesEnabled): Deleted.
298 * WebProcess/WebPage/WebPage.h:
299 * WebProcess/WebPage/WebPage.messages.in:
301 2014-04-23 Simon Fraser <simon.fraser@apple.com>
303 [iOS WK2] Make -webkit-overflow-scrolling:touch work
304 https://bugs.webkit.org/show_bug.cgi?id=132097
306 Reviewed by Tim Horton.
308 Scrolling of UIScrollViews in content (for -webkit-overflow-scrolling:touch)
309 depends on them getting hit-tested correctly. UIKit hit testing assumes
310 that subviews are enclosed by their ancestors, but this is not true of
311 web content. In addition, we had a root layer that was zero sized.
313 Fix by overriding hitTest:withEvent: on our content WKViews to hit
314 test subviews even if they are not enclosed.
316 * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
317 (-[UIView _recursiveFindDescendantViewAtPoint:withEvent:]):
318 (-[UIView _findDescendantViewAtPoint:withEvent:]):
319 (-[WKCompositingView hitTest:withEvent:]):
320 (-[WKTransformView hitTest:withEvent:]):
321 (-[WKRemoteView hitTest:withEvent:]):
322 (WebKit::RemoteLayerTreeHost::createLayer):
323 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
324 (WebKit::RemoteLayerTreeDrawingArea::updatePreferences):
325 Update debug borders on the root layer.
326 (WebKit::RemoteLayerTreeDrawingArea::mainFrameContentSizeChanged):
327 Size the root layer to the contents size. This isn't strictly necessary
328 given the hit testing overrides, but seems sensible to do anyway.
330 2014-04-23 Simon Fraser <simon.fraser@apple.com>
332 Nonopaque layers double-paint with UI-side compositing
333 https://bugs.webkit.org/show_bug.cgi?id=132101
335 Reviewed by Tim Horton.
337 The non-IOSurface code path was failing to clear the backing store
340 * Shared/mac/RemoteLayerBackingStore.mm:
341 (WebKit::RemoteLayerBackingStore::display):
342 (WebKit::RemoteLayerBackingStore::drawInContext):
344 2014-04-23 Benjamin Poulain <bpoulain@apple.com>
346 [iOS][WK2] Image and text documents sometime gets the webpage viewport configuration
347 https://bugs.webkit.org/show_bug.cgi?id=132099
349 Reviewed by Tim Horton.
351 When didReceiveMobileDocType(), if the doctype was not XHTML mobile, we were setting
352 the viewport configuration to webpageParameters(). This is obviously not correct for
353 Image and Text documents.
355 This patch moves the code deciding the default configuration out of WebPage::didCommitLoad()
356 and use it from WebPage::didCommitLoad() and WebPage::didReceiveMobileDocType().
358 * WebProcess/WebPage/WebPage.cpp:
359 (WebKit::WebPage::didCommitLoad):
360 * WebProcess/WebPage/WebPage.h:
361 * WebProcess/WebPage/ios/WebPageIOS.mm:
362 (WebKit::WebPage::didReceiveMobileDocType):
363 (WebKit::WebPage::resetViewportDefaultConfiguration):
365 2014-04-23 Benjamin Poulain <bpoulain@apple.com>
367 [iOS][WK2] Fix a few mistakes affecting the initial layout and the initial unobscured rect
368 https://bugs.webkit.org/show_bug.cgi?id=132093
369 <rdar://problem/16703237>
371 Reviewed by Tim Horton.
373 The user of WKWebView can setup a size on device pixels, which can add half a point to the minimum
374 layout size. By rounding this up before applying the page scale, we ended up with rounding errors
375 on the layout size and the transitory unobscured content rect.
377 This patch fixes changes the minimal layout size to float point values to reduce the rounding problems.
379 * UIProcess/API/Cocoa/WKWebView.mm:
380 (setViewportConfigurationMinimumLayoutSize):
381 (-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
382 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
383 * UIProcess/WebPageProxy.h:
384 * UIProcess/ios/WebPageProxyIOS.mm:
385 (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
386 (WebKit::WebPageProxy::setViewportConfigurationMinimumLayoutSize):
387 (WebKit::WebPageProxy::setMinimumLayoutSizeForMinimalUI):
389 * WebProcess/WebPage/WebPage.cpp:
390 (WebKit::WebPage::didCommitLoad):
391 Defaulting the content size to the minimum layout size only works if the initial-scale is 1.
392 ViewportConfiguration knows exactly what to do before the first layout.
394 * WebProcess/WebPage/WebPage.h:
395 * WebProcess/WebPage/WebPage.messages.in:
396 * WebProcess/WebPage/ios/WebPageIOS.mm:
397 (WebKit::WebPage::setViewportConfigurationMinimumLayoutSize):
398 (WebKit::WebPage::setMinimumLayoutSizeForMinimalUI):
399 (WebKit::WebPage::dynamicViewportSizeUpdate):
401 -setZoomedOutPageScaleFactor() was incorrectly using the initial scale. 99% of the time, initial scale
402 and minimum scale are equal, but the page can specify something different with the viewport meta tag.
403 -Use floating point for manipulating the minimum layout sizes, then round the value.
404 -minimumLayoutSizeInDocumentCoordinate was scaled the wrong way around.
406 (WebKit::WebPage::viewportConfigurationChanged):
408 2014-04-23 Yongjun Zhang <yongjun_zhang@apple.com>
410 Support encoding/decoding NSUInteger arguments in WKRemoteObjectCoder.
411 https://bugs.webkit.org/show_bug.cgi?id=132040
413 Add support for encoding/decoding NSUInteger arguments.
415 Reviewed by Sam Weinig.
417 * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
419 (decodeInvocationArguments):
421 2014-04-22 Ryosuke Niwa <rniwa@webkit.org>
423 Cursor doesn't change back to pointer when leaving the Safari window
424 https://bugs.webkit.org/show_bug.cgi?id=132038
426 Reviewed by Alexey Proskuryakov.
428 Since the cursor type is now updated asynchronously after r147739,
429 [window windowNumber] != [NSWindow windowNumberAtPoint:[NSEvent mouseLocation] belowWindowWithWindowNumber:0]
430 evalutes to false depending on how fast cursor is moving.
432 Instead, check whether the NSWindow of the WebView is the key window or not since
433 key window appears to control the cursor style in Cocoa as far as I've tested:
434 https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/WinPanel/Concepts/ChangingMainKeyWindow.html
436 * UIProcess/mac/PageClientImpl.mm:
437 (WebKit::PageClientImpl::setCursor):
439 2014-04-22 Yongjun Zhang <yongjun_zhang@apple.com>
441 Add SPI to expose provisional URL from Frame.
442 https://bugs.webkit.org/show_bug.cgi?id=132014
444 Add methods to return the provisional URL from WKWebProcessPlugInFrame.
446 Reviewed by Dan Bernstein.
448 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
449 (-[WKWebProcessPlugInFrame _provisionalURL]):
450 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h:
452 2014-04-22 Benjamin Poulain <bpoulain@apple.com>
454 [iOS][WK2] Split iOS touch event dispatch for the regular touch event dispatch
455 https://bugs.webkit.org/show_bug.cgi?id=132033
457 Reviewed by Simon Fraser.
459 The generic touch event dispatching does not work well with iOS gesture recognizers.
460 Some events are required to be synchronous, while other needs can be asynchronous and
461 can even use event coalescing. We only need UI callback for the synchronous events.
463 Previously, that was implemented by changing the property ShouldSendEventsSynchronously
464 on WebPageProxy. That is causing issues when synchronous events are sent right after asynchronous
465 events because the responses in WebPageProxy::didReceiveEvent() easily get out of order.
467 This patch completely split the UIGestureRecognizerDispatching from the normal asynchronous event dispatching.
469 Synchronous events are sent directly to the WebProcess and report the result to the PageClient right away.
471 Asynchronous events are sent to the EventDispatcher where they are coalesced until the main thread is free
474 There can be a race where a synchronous event comes before the asynchronous events are processed. In that case,
475 the synchronous event handler starts by getting the events out of the EventDispatcher and dispatch them first.
477 * Shared/NativeWebTouchEvent.h:
478 (WebKit::NativeWebTouchEvent::uniqueId): Deleted.
479 * Shared/ios/NativeWebTouchEventIOS.mm:
480 (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
481 * UIProcess/WebPageProxy.cpp:
482 (WebKit::WebPageProxy::handleSynchronousTouchEvent):
483 (WebKit::WebPageProxy::sendAsynchronousTouchEvent):
484 (WebKit::WebPageProxy::didReceiveEvent):
485 (WebKit::WebPageProxy::resetStateAfterProcessExited):
486 * UIProcess/WebPageProxy.h:
487 * UIProcess/ios/WKContentViewInteraction.h:
488 * UIProcess/ios/WKContentViewInteraction.mm:
489 (-[WKContentView _webTouchEventsRecognized:]):
490 (-[WKContentView _webTouchEvent:WebKit::preventsNativeGestures:]):
491 * WebProcess/WebPage/EventDispatcher.cpp:
492 (WebKit::EventDispatcher::EventDispatcher):
493 (WebKit::EventDispatcher::clearQueuedTouchEventsForPage):
494 (WebKit::EventDispatcher::getQueuedTouchEventsForPage):
495 (WebKit::EventDispatcher::touchEvent):
496 (WebKit::EventDispatcher::dispatchTouchEvents):
497 * WebProcess/WebPage/EventDispatcher.h:
498 * WebProcess/WebPage/EventDispatcher.messages.in:
499 * WebProcess/WebPage/WebPage.cpp:
500 (WebKit::WebPage::dispatchTouchEvent):
501 (WebKit::WebPage::touchEventSync):
502 (WebKit::WebPage::touchEvent):
503 (WebKit::WebPage::touchEventSyncForTesting):
504 (WebKit::WebPage::didCommitLoad):
505 * WebProcess/WebPage/WebPage.h:
506 * WebProcess/WebPage/WebPage.messages.in:
507 * WebProcess/WebPage/ios/WebPageIOS.mm:
508 (WebKit::WebPage::dispatchAsynchronousTouchEventsQueue):
510 2014-04-22 Chris Fleizach <cfleizach@apple.com>
512 AX: iOS hit-testing does not work when page is zoomed
513 https://bugs.webkit.org/show_bug.cgi?id=132013
515 Reviewed by Simon Fraser.
517 Implement accessibilityHitTest so that the point can be converted correctly.
519 * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
520 (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
522 2014-04-22 Commit Queue <commit-queue@webkit.org>
524 Unreviewed, rolling out r167674.
525 https://bugs.webkit.org/show_bug.cgi?id=132025
527 Going a different way with this (Requested by bradee-oh on
532 "Change Image Controls replacement to use selection and paste"
533 https://bugs.webkit.org/show_bug.cgi?id=131992
534 http://trac.webkit.org/changeset/167674
536 2014-04-22 Joseph Pecoraro <pecoraro@apple.com>
538 Remove unused local variable
539 https://bugs.webkit.org/show_bug.cgi?id=132020
541 Reviewed by Alexey Proskuryakov.
543 * UIProcess/ios/forms/WKFormSelectPopover.mm:
544 (-[WKSelectPopover initWithView:hasGroups:]):
546 2014-04-22 Brady Eidson <beidson@apple.com>
548 Change Image Controls replacement to use selection and paste
549 <rdar://problem/16302722> and https://bugs.webkit.org/show_bug.cgi?id=131992
551 Reviewed by Tim Horton.
553 * UIProcess/mac/WebContextMenuProxyMac.mm:
554 (-[WKSharingServicePickerDelegate sharingService:didShareItems:]): Write the
555 replacement data to a special pasteboard, then replace the current selection from
558 Remove all other code used to support the old replacement mechanism:
559 * UIProcess/WebPageProxy.cpp:
560 (WebKit::WebPageProxy::replaceControlledImage): Deleted.
561 * UIProcess/WebPageProxy.h:
562 * UIProcess/mac/WebContextMenuProxyMac.h:
563 (WebKit::WebContextMenuProxyMac::page):
564 (WebKit::WebContextMenuProxyMac::replaceControlledImage): Deleted.
565 * WebProcess/WebPage/WebContextMenu.cpp:
566 (WebKit::WebContextMenu::replaceControlledImage): Deleted.
567 * WebProcess/WebPage/WebContextMenu.h:
568 * WebProcess/WebPage/WebPage.cpp:
569 (WebKit::WebPage::replaceControlledImage): Deleted.
570 * WebProcess/WebPage/WebPage.h:
571 * WebProcess/WebPage/WebPage.messages.in:
573 2014-04-22 Eunmi Lee <eunmi15.lee@samsung.com>
575 [EFL][WK2] Remove duplicated code to set size to the DrawingArea.
576 https://bugs.webkit.org/show_bug.cgi?id=131972
578 Reviewed by Andreas Kling.
580 DrawingArea's size is set in the WebView.cpp when EwkView's size is
581 changed, so we don't have to set again in the PageViewportController.
583 * UIProcess/CoordinatedGraphics/PageViewportController.cpp:
584 (WebKit::PageViewportController::didChangeViewportSize):
586 2014-04-22 Tim Horton <timothy_horton@apple.com>
588 WKThumbnailView doesn't quite work with topContentInset
589 https://bugs.webkit.org/show_bug.cgi?id=131976
590 <rdar://problem/16642127>
592 Reviewed by Darin Adler.
594 * UIProcess/API/Cocoa/_WKThumbnailView.mm:
595 (-[_WKThumbnailView initWithFrame:fromWKView:]):
596 _WKThumbnailView always needs a layer.
597 We don't want to use snapshots by default, this was debugging accidentally landed in the last change.
599 (-[_WKThumbnailView _requestSnapshotIfNeeded]):
600 Don't request a new snapshot if the scale is the same as the existing one.
601 Reduce the height of the snapshot by the topContentInset.
602 Having the origin at (0, 0) is still correct, as the inset content is in negative Y space,
603 and (0, 0) is the true origin of the content.
605 (-[_WKThumbnailView setScale:]):
606 When not snapshotting, we've decided that WKThumbnailView should apply the scale to the WKView layer tree,
607 instead of depending on clients to do so.
609 (-[_WKThumbnailView setUsesSnapshot:]):
610 We *do* need to apply thumbnail scale in the web process even when snapshotting,
611 because we use the live layer tree temporarily while waiting for the asynchronous
612 snapshot to return. This was a misstep in the last thumbnail view patch.
614 2014-04-22 Shivakumar JM <shiva.jm@samsung.com>
616 [WebKit2] Cleanup the build from unused parameter in WebProcess Module
617 https://bugs.webkit.org/show_bug.cgi?id=131970
619 Reviewed by Darin Adler.
621 Fix a build warning by removing the parameters in function paintLayerContents() to fix build warning.
623 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
624 (WebKit::CoordinatedLayerTreeHost::paintLayerContents):
626 2014-04-22 Carlos Garcia Campos <cgarcia@igalia.com>
628 [GTK] Crash after getting web view context property with g_object_get
629 https://bugs.webkit.org/show_bug.cgi?id=131983
631 Reviewed by Philippe Normand.
633 The problem is that the getter is using g_value_take_object() and
634 the default context is destroyed when the caller releases its ref.
636 * UIProcess/API/gtk/WebKitWebView.cpp:
637 (webkitWebViewGetProperty): Use g_value_set_object() instead of
638 g_value_take_object().
640 2014-04-22 Ryuan Choi <ryuan.choi@samsung.com>
642 [EFL][WK2] Remove unnecessary includes in files of Source/WebKit2/UIProcess/API/efl
643 https://bugs.webkit.org/show_bug.cgi?id=131979
645 Reviewed by Gyuyoung Kim.
647 Removed unnecessary includes of header files.
648 In addition, tried to use forward declarations.
650 * UIProcess/API/efl/EwkView.cpp:
651 * UIProcess/API/efl/EwkView.h:
652 * UIProcess/API/efl/EwkViewCallbacks.h:
653 * UIProcess/API/efl/GestureRecognizer.h:
654 * UIProcess/API/efl/ewk_context_menu_item_private.h:
655 * UIProcess/API/efl/ewk_context_menu_private.h:
656 * UIProcess/API/efl/ewk_download_job.cpp:
657 * UIProcess/API/efl/ewk_download_job_private.h:
658 * UIProcess/API/efl/ewk_form_submission_request.cpp:
659 * UIProcess/API/efl/ewk_form_submission_request_private.h:
660 * UIProcess/API/efl/ewk_navigation_data.cpp:
661 * UIProcess/API/efl/ewk_navigation_data_private.h:
662 * UIProcess/API/efl/ewk_page_group_private.h:
663 * UIProcess/API/efl/ewk_popup_menu_private.h:
664 * UIProcess/API/efl/ewk_view.cpp:
665 * UIProcess/API/efl/ewk_window_features_private.h:
666 * UIProcess/efl/PageUIClientEfl.cpp:
667 * UIProcess/efl/ViewClientEfl.cpp:
669 2014-04-21 Tim Horton <timothy_horton@apple.com>
671 [wk2] Don't send intrinsic content size updates with dirty layout
672 https://bugs.webkit.org/show_bug.cgi?id=131964
673 <rdar://problem/14292718>
675 Reviewed by Simon Fraser.
677 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
678 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
679 (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
680 (WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged):
681 (WebKit::TiledCoreAnimationDrawingArea::updateIntrinsicContentSizeIfNeeded):
682 (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
683 (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
684 (WebKit::TiledCoreAnimationDrawingArea::updateIntrinsicContentSizeTimerFired): Deleted.
685 Instead of using a timer (which can fire while layout is dirty) to coalesce
686 intrinsic content size changes, send them only from flushLayers, just after updating layout.
687 This ensures that we never get intermediate intrinsic content sizes that won't be painted.
689 2014-04-21 Tim Horton <timothy_horton@apple.com>
691 Remove a unnecessary forward-declared class from TiledCoreAnimationDrawingArea.
693 Rubber-stamped by Simon Fraser.
695 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
697 2014-04-21 Simon Fraser <simon.fraser@apple.com>
699 Don't try to use a null connection()->xpcConnection()
700 https://bugs.webkit.org/show_bug.cgi?id=131961
702 Reviewed by Dan Bernstein.
704 If running with -WebKit2UseXPCServiceForWebProcess NO, connection()->xpcConnection()
705 is null and xpc_connection_get_pid() would crash, so null-check the xpcConnection.
707 * UIProcess/Network/NetworkProcessProxy.cpp:
708 (WebKit::NetworkProcessProxy::didFinishLaunching):
710 2014-04-21 Dan Bernstein <mitz@apple.com>
712 WebKit part of <rdar://problem/16631323> Page::setDefersLoading doesn’t do anything when using the Network process
713 https://bugs.webkit.org/show_bug.cgi?id=131939
715 Reviewed by David Kilzer.
717 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
718 (WebKit::NetworkConnectionToWebProcess::setDefersLoading): Added. Forwards the message to
719 the NetworkResourceLoader.
720 * NetworkProcess/NetworkConnectionToWebProcess.h:
722 * NetworkProcess/NetworkConnectionToWebProcess.messages.in: Added SetDefersLoading message.
724 * NetworkProcess/NetworkResourceLoader.cpp:
725 (WebKit::NetworkResourceLoader::NetworkResourceLoader): Initialize new member variable
726 m_defersLoading from the new field in the loader parameters.
727 (WebKit::NetworkResourceLoader::start): Added. Like WebCore::ResourceLoader, if loading is
728 deferred, keep the request in m_deferredRequest and bail out.
729 (WebKit::NetworkResourceLoader::setDefersLoading): Added. Similar to
730 WebCore::ResourceLoader::setDefersLoading.
731 * NetworkProcess/NetworkResourceLoader.h:
732 (WebKit::NetworkResourceLoader::defersLoading):
734 * Shared/Network/NetworkResourceLoadParameters.cpp:
735 (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters): Initialize new field
736 defersLoading to false.
737 (WebKit::NetworkResourceLoadParameters::encode): Encode new field.
738 (WebKit::NetworkResourceLoadParameters::decode): Decode new field.
739 * Shared/Network/NetworkResourceLoadParameters.h: Added defersLoading field.
741 * WebProcess/Network/WebResourceLoadScheduler.cpp:
742 (WebKit::WebResourceLoadScheduler::scheduleLoad): Populate defersLoading field in the load
744 (WebKit::WebResourceLoadScheduler::setDefersLoading): Send a message to the Network process.
745 * WebProcess/Network/WebResourceLoadScheduler.h:
747 2014-04-21 Anders Carlsson <andersca@apple.com>
749 Errors passed to delegate methods should have recovery attempters
750 https://bugs.webkit.org/show_bug.cgi?id=131957
751 <rdar://problem/16642539>
753 Reviewed by Tim Horton.
755 * UIProcess/API/Cocoa/_WKErrorRecoveryAttempting.h: Added.
756 * UIProcess/API/Cocoa/_WKErrorRecoveryAttempting.mm: Added.
757 * UIProcess/Cocoa/NavigationState.mm:
758 (WebKit::createErrorWithRecoveryAttempter):
759 (WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
760 (WebKit::NavigationState::LoaderClient::didFailLoadWithErrorForFrame):
761 * UIProcess/Cocoa/WKReloadFrameErrorRecoveryAttempter.h: Added.
762 * UIProcess/Cocoa/WKReloadFrameErrorRecoveryAttempter.mm: Added.
763 (-[WKReloadFrameErrorRecoveryAttempter initWithWebView:frameHandle:urlString:]):
764 (-[WKReloadFrameErrorRecoveryAttempter attemptRecovery]):
765 * WebKit2.xcodeproj/project.pbxproj:
767 2014-04-21 Eric Carlson <eric.carlson@apple.com>
769 [Mac] implement WebKitDataCue
770 https://bugs.webkit.org/show_bug.cgi?id=131799
772 Reviewed by Dean Jackson.
774 * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE.
776 2014-04-21 Beth Dakin <bdakin@apple.com>
778 topContentInset does not play well with fullscreen elements
779 https://bugs.webkit.org/show_bug.cgi?id=131955
781 <rdar://problem/16651925>
783 Reviewed by Sam Weinig.
785 If you take an element (such as a <video>) fullscreen when you have a
786 topContentInset set, there will be an inset-sized gap at the top of the fullscreen
789 Save and restore the topContentInset whenever the scroll position is saved and
791 * WebProcess/FullScreen/WebFullScreenManager.cpp:
792 (WebKit::WebFullScreenManager::WebFullScreenManager):
793 (WebKit::WebFullScreenManager::saveScrollPosition):
794 (WebKit::WebFullScreenManager::restoreScrollPosition):
795 * WebProcess/FullScreen/WebFullScreenManager.h:
797 2014-04-21 Gavin Barraclough <baraclough@apple.com>
799 Don't use ProcessAssertion on simulator
800 https://bugs.webkit.org/show_bug.cgi?id=131950
802 Rubber stamped by Enrica Casucci
804 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
805 (WebKit::connectToService):
806 * UIProcess/ios/ProcessAssertion.h:
808 2014-04-21 Enrica Casucci <enrica@apple.com>
810 [iOS WebKit2] support replacements for misspelled words.
811 https://bugs.webkit.org/show_bug.cgi?id=131827
812 <rdar://problem/16319657>
814 Reviewed by Darin Adler.
816 This is the second a final piece to support replacements.
817 It adds some entrypoints used by the keyboard code to perform
818 replacement when reaching the edge of a word using backspace.
819 I've modified the behavior of replaceSelectedText to work both
820 with caret or range selections.
822 * Shared/EditorState.cpp:
823 (WebKit::EditorState::encode):
824 (WebKit::EditorState::decode):
825 * Shared/EditorState.h:
826 (WebKit::EditorState::EditorState):
827 * UIProcess/ios/WKContentViewInteraction.mm:
828 (-[WKContentView isReplaceAllowed]):
829 (-[WKContentView _characterBeforeCaretSelection]):
830 * WebProcess/WebPage/WebPage.cpp:
831 (WebKit::WebPage::editorState):
832 * WebProcess/WebPage/ios/WebPageIOS.mm:
833 (WebKit::WebPage::replaceSelectedText):
835 2014-04-21 Gavin Barraclough <baraclough@apple.com>
837 Don't use ProcessAssertion on simulator
838 https://bugs.webkit.org/show_bug.cgi?id=131950
840 Rubber stamped by Benjamin Poulain
842 * UIProcess/ios/ProcessAssertion.mm:
843 (WebKit::ProcessAssertion::ProcessAssertion):
844 (WebKit::ProcessAssertion::setState):
846 2014-04-21 Anders Carlsson <andersca@apple.com>
850 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
851 (WebKit::XPCServiceInitializerDelegate::checkEntitlements):
853 2014-04-21 Anders Carlsson <andersca@apple.com>
857 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
858 (WebKit::XPCServiceInitializer):
860 2014-04-21 Tim Horton <timothy_horton@apple.com>
862 [iOS WebKit2] Implement CSS viewport units
863 https://bugs.webkit.org/show_bug.cgi?id=131863
864 <rdar://problem/16279088>
866 Reviewed by Darin Adler.
868 * UIProcess/API/Cocoa/WKWebView.mm:
869 (setMinimumLayoutSizeForMinimalUI):
870 (-[WKWebView _minimumLayoutSizeOverrideForMinimalUI]):
871 (-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
872 Add _setMinimumLayoutSizeOverrideForMinimalUI:, which pushes said size
873 down from the client to WebPageIOS, below.
875 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
876 * UIProcess/WebPageProxy.h:
877 * UIProcess/ios/WebPageProxyIOS.mm:
878 (WebKit::WebPageProxy::setMinimumLayoutSizeForMinimalUI):
879 * WebProcess/WebPage/WebPage.h:
880 * WebProcess/WebPage/WebPage.messages.in:
881 * WebProcess/WebPage/ios/WebPageIOS.mm:
882 (WebKit::WebPage::setMinimumLayoutSizeForMinimalUI):
883 (WebKit::WebPage::viewportConfigurationChanged):
884 Update FrameView's viewport size based on the minimum layout size for minimal UI (if we have it)
885 or the normal minimum layout size, scaled to the page's initial scale.
887 2014-04-21 Benjamin Poulain <bpoulain@apple.com>
889 [iOS][WK2] Fix the dynamic viewport update when the viewport's max-scale conflict with the transition
890 https://bugs.webkit.org/show_bug.cgi?id=131884
892 Reviewed by Darin Adler.
894 <rdar://problem/16667291>
896 * UIProcess/API/Cocoa/WKWebView.mm:
897 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
898 It is fairly common to have a viewport configuration with min-scale=1 and max-scale=1.
899 Since we were only changing the minimumScale for the transition, the target scale was affected
900 by max-scale. This was breaking the transition from portrait to landscale.
902 2014-04-21 Benjamin Poulain <bpoulain@apple.com>
904 [iOS][WK2] Make dynamic viewport size update content aware
905 https://bugs.webkit.org/show_bug.cgi?id=131874
907 Reviewed by Tim Horton.
909 When possible, adjust the scroll position based on the content on dynamic viewport resize.
911 * WebProcess/WebPage/WebPage.cpp:
912 (WebKit::WebPage::WebPage):
913 (WebKit::WebPage::scalePage):
914 (WebKit::WebPage::pageDidScroll):
915 * WebProcess/WebPage/WebPage.h:
916 The scrolling heuristic are not invertible, especially the content heuristic. To have the right
917 behavior when doing resize without changing the page, we save the old scroll position and restore
918 it when the content size and scale is restored.
920 * WebProcess/WebPage/ios/WebPageIOS.mm:
921 (WebKit::WebPage::dynamicViewportSizeUpdate):
922 On dynamic update, start by finding what node is at the center of the screen. After the layout, put that
923 node back in the center.
925 (WebKit::WebPage::updateVisibleContentRects):
927 2014-04-21 Anders Carlsson <andersca@apple.com>
929 Need default WKNavigationDelegate behavior
930 https://bugs.webkit.org/show_bug.cgi?id=131944
931 <rdar://problem/15949822>
933 Reviewed by Dan Bernstein.
935 Port the WebKit1 default delegate behavior over.
937 * UIProcess/Cocoa/NavigationState.mm:
938 (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
939 (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
941 2014-04-21 Dan Bernstein <mitz@apple.com>
943 [Cocoa] Expose WebPage::setDefersLoading
944 https://bugs.webkit.org/show_bug.cgi?id=131943
946 Reviewed by Anders Carlsson, but he doesn’t like this.
948 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
949 (-[WKWebProcessPlugInBrowserContextController _defersLoading]): Added this accessor.
950 (-[WKWebProcessPlugInBrowserContextController _setDefersLoading:]): Ditto.
951 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
952 Declared new property _defersLoading.
954 * WebProcess/WebPage/WebPage.cpp:
955 (WebKit::WebPage::defersLoading): Added this getter.
956 * WebProcess/WebPage/WebPage.h:
958 2014-04-21 Joseph Pecoraro <pecoraro@apple.com>
960 Remove unused WebKitSystemInterface functions
961 https://bugs.webkit.org/show_bug.cgi?id=131938
963 Reviewed by Alexey Proskuryakov.
965 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
966 (InitWebCoreSystemInterface):
968 2014-04-21 Anders Carlsson <andersca@apple.com>
970 Check the com.apple.security.network.client entitlement for all processes
971 https://bugs.webkit.org/show_bug.cgi?id=131942
972 <rdar://problem/12354188>
974 Reviewed by Dan Bernstein.
976 * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
977 (WebKit::NetworkServiceInitializerDelegate::NetworkServiceInitializerDelegate):
978 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
979 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
980 (WebKit::XPCServiceInitializerDelegate::checkEntitlements):
982 2014-04-20 Dan Bernstein <mitz@apple.com>
984 [Cocoa] Remove interfaces in the To Be Removed groups
985 https://bugs.webkit.org/show_bug.cgi?id=131925
987 Reviewed by Darin Adler.
989 * Shared/API/Cocoa/WKRemoteObjectInterface.h: Removed.
990 * Shared/API/Cocoa/WKRemoteObjectInterface.mm: Removed.
991 * Shared/API/Cocoa/WKRemoteObjectRegistry.h: Removed.
992 * Shared/API/Cocoa/WKRemoteObjectRegistry.mm: Removed.
993 * UIProcess/API/Cocoa/WKProcessPool.mm:
994 * UIProcess/API/Cocoa/WKProcessPoolConfiguration.h: Removed.
995 * UIProcess/API/Cocoa/WKProcessPoolConfiguration.mm: Removed.
996 * UIProcess/API/Cocoa/WKProcessPoolConfigurationPrivate.h: Removed.
997 * UIProcess/API/Cocoa/WKProcessPoolToBeRemoved.mm: Removed.
998 * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
999 * WebKit2.xcodeproj/project.pbxproj:
1000 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInBrowserContextControllerToBeRemoved.mm: Removed.
1001 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
1003 2014-04-20 Dan Bernstein <mitz@apple.com>
1005 [Cocoa] Crash when setting a bundle parameter to nil
1006 https://bugs.webkit.org/show_bug.cgi?id=131917
1008 Reviewed by Sam Weinig.
1010 * UIProcess/API/Cocoa/WKProcessPool.mm:
1011 (-[WKProcessPool _setObject:forBundleParameter:]): If the object is nil, use
1012 -[NSMutableDictionary removeObjectForKey:] rather than -setObject:forKey:.
1014 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm:
1015 (-[WKWebProcessBundleParameters setParameter:forKey:]): Ditto.
1017 * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
1018 (WebKit::InjectedBundle::setBundleParameter): Unrelatedly, create m_bundleParameters if
1019 needed, as it may have not been created on intialization if no bundle parameters were set
1022 2014-04-20 Dan Bernstein <mitz@apple.com>
1024 [Cocoa] Remove unused -webView:didFinishLoadingNavigation: delegate method
1025 https://bugs.webkit.org/show_bug.cgi?id=131914
1027 Reviewed by Sam Weinig.
1029 * UIProcess/Cocoa/NavigationState.h: Removed flag from m_navigationDelegateMethods struct.
1030 * UIProcess/Cocoa/NavigationState.mm:
1031 (WebKit::NavigationState::setNavigationDelegate): Removed check for whether the method is
1033 (WebKit::NavigationState::LoaderClient::didFinishLoadForFrame): Stopped calling the method
1036 2014-04-19 Anders Carlsson <andersca@apple.com>
1038 Plug-in process crashes if NP_Initialize returns an error the second time it's called
1039 https://bugs.webkit.org/show_bug.cgi?id=131903
1040 <rdar://problem/14355462>
1042 Reviewed by Sam Weinig.
1044 * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
1045 (WebKit::NetscapePluginModule::decrementLoadCount):
1046 Don't try to unload the plug-in if it hasn't been initialized.
1048 2014-04-19 Simon Fraser <simon.fraser@apple.com>
1050 [UI-side compositing] Implement blend modes
1051 https://bugs.webkit.org/show_bug.cgi?id=131891
1052 <rdar://problem/16490085>
1054 Reviewed by Tim Horton.
1056 Implement blend modes with UI-side compositing.
1058 PlatformCALayer::setBlendMode() becomes pure virtual, and overridden in
1059 PlatformCALayerMac and PlatformCALayerRemote.
1060 PlatformCAFilters::setBlendingFiltersOnLayer() now takes a raw platform
1061 layer, so it can be called from the UI process on a CALayer*.
1063 Add BlendMode to LayerProperties, and initialize, encode and decode it,
1064 as well as adding dumping support for blend modes.
1066 * Shared/mac/RemoteLayerTreePropertyApplier.mm:
1067 (WebKit::applyPropertiesToLayer):
1068 * Shared/mac/RemoteLayerTreeTransaction.h:
1069 * Shared/mac/RemoteLayerTreeTransaction.mm:
1070 (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
1071 (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
1072 (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
1073 (WebKit::RemoteLayerTreeTextStream::operator<<):
1074 (WebKit::dumpChangedLayers):
1075 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1076 (WebKit::PlatformCALayerRemote::setBlendMode):
1077 * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
1079 2014-04-19 Joseph Pecoraro <pecoraro@apple.com>
1081 Fix leak of UIScreenEdgePanGestureRecognizer in WKSwipeTransitionController
1082 https://bugs.webkit.org/show_bug.cgi?id=131877
1084 Reviewed by Darin Adler.
1086 * UIProcess/ios/ViewGestureControllerIOS.mm:
1087 (-[WKSwipeTransitionController gestureRecognizerForInteractiveTransition:WithTarget:action:]):
1089 2014-04-19 Dan Bernstein <mitz@apple.com>
1091 Don’t install a source file inside WebProcess.app.
1093 * WebKit2.xcodeproj/project.pbxproj: Removed ViewUpdateDispatcher.messages.in from
1094 WebProcess’s Copy Bundle Resources build phase.
1096 2014-04-19 Darin Adler <darin@apple.com>
1098 [Mac] WebView adjusts the cursor even when another window is in front
1099 https://bugs.webkit.org/show_bug.cgi?id=131898
1100 rdar://problem/14619911
1102 Reviewed by Dan Bernstein.
1104 * UIProcess/API/mac/WKView.mm:
1105 (-[WKView _setCursor:]): Deleted. Moved the code all into PageClientImpl, since none of it
1106 interacts with anything special about a WKView.
1108 * UIProcess/API/mac/WKViewInternal.h: Deleted the _setCursor: method.
1110 * UIProcess/mac/PageClientImpl.mm:
1111 (WebKit::PageClientImpl::setCursor): Added a check that the window is under the cursor
1112 and do nothing if it's not.
1114 2014-04-19 Dan Bernstein <mitz@apple.com>
1116 Use XPC services in the iOS Simulator, but not in Mountain Lion
1117 https://bugs.webkit.org/show_bug.cgi?id=131894
1119 Reviewed by Anders Carlsson.
1121 * Configurations/NetworkService.Development.xcconfig: Defined INFOPLIST_FILE for the
1123 * Configurations/NetworkService.xcconfig: Ditto.
1124 * Configurations/WebContentService.Development.xcconfig: Ditto.
1125 * Configurations/WebContentService.xcconfig: Ditto.
1126 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1127 (WebKit::systemDirectoryPath): Added this helper function that returns a slash-terminated
1128 path to the System directory in the current runtime.
1129 (WebKit::ProcessLauncher::launchProcess): Changed to use the above function to tell whether
1130 a development version of WebKit2 is being used.
1131 * WebKit2Prefix.h: Set WTF_USE_XPC_SERVICES to 1 when targeting the iOS Simulator, but not
1132 when targeting Mountain Lion.
1134 2014-04-19 Dan Bernstein <mitz@apple.com>
1136 [Cocoa] Crash in -[WKWebProcessPlugInHitTestResult nodeHandle] when nodeHandle() is null
1137 https://bugs.webkit.org/show_bug.cgi?id=131888
1139 Reviewed by Jon Honeycutt.
1141 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInHitTestResult.mm:
1142 (-[WKWebProcessPlugInHitTestResult nodeHandle]): Added a null check.
1144 2014-04-19 Simon Fraser <simon.fraser@apple.com>
1146 [iOS WK2] Fuzzy layers on sites using perspective and transforms
1147 https://bugs.webkit.org/show_bug.cgi?id=131873
1148 <rdar://problem/16540576>
1150 Reviewed by Sam Weinig.
1152 Always set rasterizationScale on CALayers in the UI process
1153 (as we do for WK1) so that layers are rasterized taking the
1154 device scale into account. We can do unconditionally; this
1155 is benign on layers that CA doesn't rasterize.
1157 * Shared/mac/RemoteLayerTreePropertyApplier.mm:
1158 (WebKit::applyPropertiesToLayer):
1160 2014-04-18 Simon Fraser <simon.fraser@apple.com>
1162 Use 'override' in GraphicsLayerCA
1163 https://bugs.webkit.org/show_bug.cgi?id=131882
1165 Reviewed by Tim Horton.
1169 * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
1171 2014-04-19 Darin Adler <darin@apple.com>
1173 Assertion in WebPage::runModal accesses object after it may have been destroyed
1174 https://bugs.webkit.org/show_bug.cgi?id=131875
1176 Reviewed by Anders Carlsson.
1178 * WebProcess/WebPage/WebPage.cpp:
1179 (WebKit::WebPage::runModal): Ref the WebPage so it's still around so we can
1180 check the m_isRunningModal flag.
1182 2014-04-18 Commit Queue <commit-queue@webkit.org>
1184 Unreviewed, rolling out r167527.
1185 https://bugs.webkit.org/show_bug.cgi?id=131883
1187 Broke 32-bit build (Requested by ap on #webkit).
1191 "[Mac] implement WebKitDataCue"
1192 https://bugs.webkit.org/show_bug.cgi?id=131799
1193 http://trac.webkit.org/changeset/167527
1195 2014-04-18 Eric Carlson <eric.carlson@apple.com>
1197 [Mac] implement WebKitDataCue
1198 https://bugs.webkit.org/show_bug.cgi?id=131799
1200 Reviewed by Dean Jackson.
1202 * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE.
1204 2014-04-18 Anders Carlsson <andersca@apple.com>
1206 Keep the WebPageProxy alive for the lifetime of all PageLoadState::Transaction objects
1207 https://bugs.webkit.org/show_bug.cgi?id=131872
1208 <rdar://problem/15758414>
1210 Reviewed by Dan Bernstein.
1212 * UIProcess/PageLoadState.cpp:
1213 (WebKit::PageLoadState::PageLoadState):
1214 (WebKit::PageLoadState::Transaction::Transaction):
1215 (WebKit::PageLoadState::Transaction::~Transaction):
1216 * UIProcess/PageLoadState.h:
1217 (WebKit::PageLoadState::Transaction::Transaction): Deleted.
1218 (WebKit::PageLoadState::Transaction::~Transaction): Deleted.
1219 * UIProcess/WebPageProxy.cpp:
1220 (WebKit::WebPageProxy::WebPageProxy):
1222 2014-04-18 Stephanie Lewis <slewis@apple.com>
1224 We shouldn’t create page throttlers for other pages than WebKit2 pages.
1225 Part of <rdar://problem/16473045> Visibility state counters are often incorrect.
1226 https://bugs.webkit.org/show_bug.cgi?id=131696
1228 Reviewed by Gavin Barraclough.
1230 Page throttlers were being created for SVG images and other page instances that
1231 were not accurately tracking the states that enable and disable page throttling.
1232 Make the throttler an unique ptr and only initialize it for WebKit2.
1234 This also fixes an inefficiency where we would throttle a new page on creation because
1235 we assumed it was visible even if that was not the case.
1237 * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: Check page throttler exists.
1238 (WebKit::NPRuntimeObjectMap::evaluate):
1239 * WebProcess/WebPage/WebPage.cpp:
1240 (WebKit::WebPage::WebPage): Initialize page throttler for WebKit2 views.
1241 (WebKit::WebPage::mouseEvent): Check page throttler exists.
1242 (WebKit::WebPage::wheelEvent): ditto
1243 (WebKit::WebPage::keyEvent): ditto
1245 2014-04-18 Anders Carlsson <andersca@apple.com>
1247 Don't allow app sandboxed apps without the network client entitlement to launch the network process
1248 https://bugs.webkit.org/show_bug.cgi?id=131868
1249 <rdar://problem/12354188>
1251 Reviewed by Dan Bernstein.
1253 * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
1254 (WebKit::NetworkServiceInitializerDelegate::NetworkServiceInitializerDelegate):
1255 Add a new delegate that implements checkEntitlements().
1257 (NetworkServiceInitializer):
1258 Pass the new delegate to XPCServiceInitializer.
1260 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
1261 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
1262 Call checkEntitlements.
1264 (WebKit::XPCServiceInitializerDelegate::checkEntitlements):
1267 (WebKit::XPCServiceInitializerDelegate::hasEntitlement):
1268 Helper function that returns whether a client has the given entitlement.
1270 (WebKit::XPCServiceInitializerDelegate::isClientSandboxed):
1271 Helper function that checks whether the client is sandboxed.
1273 2014-04-18 Alice Barraclough <alice.barraclough@webkit.org>
1275 Find on page - extend API by providing highlighted match index
1276 https://bugs.webkit.org/show_bug.cgi?id=131776
1278 Reviewed by Tim Horton.
1280 * Shared/WebFindOptions.h: Add an option for determining match index.
1282 Plumb through the API layers the addition of a parameter for match index.
1283 * UIProcess/API/APIFindClient.h:
1284 (API::FindClient::didFindString):
1285 * UIProcess/API/C/WKPage.cpp:
1286 (WKPageSetPageFindClient):
1287 * UIProcess/API/Cocoa/WKWebView.mm:
1289 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1291 * UIProcess/API/Cocoa/_WKFindDelegate.h:
1292 * UIProcess/Cocoa/FindClient.h:
1293 * UIProcess/Cocoa/FindClient.mm:
1294 (WebKit::FindClient::setDelegate):
1295 (WebKit::FindClient::didFindString):
1296 * UIProcess/WebFindClient.cpp:
1297 (WebKit::WebFindClient::didFindString):
1298 * UIProcess/WebFindClient.h:
1299 * UIProcess/WebPageProxy.cpp:
1300 (WebKit::WebPageProxy::didFindString):
1301 * UIProcess/WebPageProxy.h:
1302 * UIProcess/WebPageProxy.messages.in:
1304 The actual tracking of the match index is contained in FindController class.
1305 * WebProcess/WebPage/FindController.cpp:
1306 (WebKit::FindController::FindController): Start out as -1, understood to be an undefined index in this context.
1307 (WebKit::FindController::updateFindUIAfterPageScroll):
1308 Perform the calculation of matchCount if the flag for DetermineMatchIndex is on.
1309 If matchCount exceeds max, keep the match index undefined because otherwise the finding could advance
1310 to a point where the index exceeds the match count, legitimately. If matchCount doesn't exceed the max, then make
1311 sure the match index, which had been being incremented or decremented blindly back in findString(), is normalized
1312 to be less than match count.
1313 (WebKit::FindController::findString):
1314 If there is a user selection existing on the page, the next occurence of the string will be found after that
1315 selection. In that case we still want the index to properly reflect its ordinal position within the entire document.
1316 Use findStringMatchingRanges to provide the match index, and set a flag that prevents the match index from being
1317 blindly incremented or decremented later. After findString() is actually called on the page, increment or decrement
1318 the find index under specific conditions.
1319 (WebKit::FindController::hideFindIndicator): Reset match index when find UI goes away.
1320 * WebProcess/WebPage/FindController.h: Add m_foundStringMatchIndex to private variables.
1321 * WebProcess/WebPage/ios/FindControllerIOS.mm:
1322 (WebKit::FindController::hideFindIndicator): Reset match index when find UI goes away.
1324 2014-04-18 Joseph Pecoraro <pecoraro@apple.com>
1326 Correct some issues small issues in WK2 file upload InjectedBundle APIs
1327 https://bugs.webkit.org/show_bug.cgi?id=131852
1329 Reviewed by Dan Bernstein.
1331 * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
1332 (API::InjectedBundle::PageUIClient::shouldGenerateFileForUpload):
1333 The default return value, meaning no, should return the null string. The
1334 result is checked later, and null string is a special value meaning no.
1336 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
1337 (WebKit::InjectedBundlePageUIClient::generateFileForUpload):
1338 Pre-check for the correct client function we will use.
1340 2014-04-18 Andy Estes <aestes@apple.com>
1342 [iOS] REGRESSION (r167039): WebKit incorrectly sets a background process assertion state when displaying a PDF
1343 https://bugs.webkit.org/show_bug.cgi?id=131860
1344 <rdar://problem/16631282>
1346 Reviewed by Tim Horton.
1348 We were basing our process assertion state on whether or not the
1349 process had a WKContentView in a window, but when displaying a PDF
1350 we've removed the WKContentView from the window. Base this decision
1351 instead on whether or not the WKWebView is in the window.
1353 * UIProcess/API/Cocoa/WKWebView.mm:
1354 (-[WKWebView didMoveToWindow]):
1355 * UIProcess/ios/PageClientImplIOS.mm:
1356 (WebKit::PageClientImpl::isViewInWindow):
1358 2014-04-18 Anders Carlsson <andersca@apple.com>
1360 Address a couple of review comments
1361 https://bugs.webkit.org/show_bug.cgi?id=131856
1363 Reviewed by Dan Bernstein.
1365 * UIProcess/API/Cocoa/WKNavigationAction.h:
1366 * UIProcess/API/Cocoa/WKNavigationDelegate.h:
1367 * UIProcess/API/Cocoa/WKPreferences.h:
1368 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
1369 * UIProcess/API/Cocoa/WKWebView.h:
1371 2014-04-18 Anders Carlsson <andersca@apple.com>
1373 Handle pluginOrigin being null
1374 https://bugs.webkit.org/show_bug.cgi?id=131849
1375 <rdar://problem/16655898>
1377 Reviewed by Alexey Proskuryakov.
1379 * WebProcess/WebProcess.cpp:
1380 (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin):
1382 2014-04-18 Dan Bernstein <mitz@apple.com>
1384 [Cocoa] Add a navigation delegate method corresponding to didFinishDocumentLoadForFrame for the main frame
1385 https://bugs.webkit.org/show_bug.cgi?id=131847
1387 Reviewed by Anders Carlsson.
1389 * UIProcess/API/APILoaderClient.h:
1390 (API::LoaderClient::didFinishDocumentLoadForFrame): Added a navigationID parameter.
1391 * UIProcess/API/C/WKPage.cpp:
1392 (WKPageSetPageLoaderClient): Updated for the above change in paramerers.
1393 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new delegate method.
1394 * UIProcess/Cocoa/NavigationState.h: Declare override of didFinishDocumentLoadForFrame.
1395 * UIProcess/Cocoa/NavigationState.mm:
1396 (WebKit::NavigationState::setNavigationDelegate): Initialize
1397 webViewNavigationDidFinishDocumentLoad flag in the delegate methods struct.
1398 (WebKit::NavigationState::LoaderClient::didFinishDocumentLoadForFrame): Added override
1399 of the client function which calls the delegate.
1400 * UIProcess/WebPageProxy.cpp:
1401 (WebKit::WebPageProxy::didFinishDocumentLoadForFrame): Get and pass the navigation ID to
1403 * UIProcess/WebPageProxy.h: Added navigationID parameter.
1404 * UIProcess/WebPageProxy.messages.in: Ditto.
1405 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1406 (WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad): Get and send the navigation
1407 ID to the UI process.
1409 2014-04-18 Philippe Normand <pnormand@igalia.com>
1411 Remove NETWORK_INFO support
1412 https://bugs.webkit.org/show_bug.cgi?id=131841
1414 Reviewed by Gyuyoung Kim.
1417 * PlatformEfl.cmake:
1418 * Shared/API/c/WKBase.h:
1419 * Shared/APIObject.h:
1420 * Shared/WebNetworkInfo.cpp: Removed.
1421 * Shared/WebNetworkInfo.h: Removed.
1422 * UIProcess/API/C/WKAPICast.h:
1423 * UIProcess/API/C/WKContext.cpp:
1424 (WKContextGetNetworkInfoManager): Deleted.
1425 * UIProcess/API/C/WKContext.h:
1426 * UIProcess/API/C/WKNetworkInfo.cpp: Removed.
1427 * UIProcess/API/C/WKNetworkInfo.h: Removed.
1428 * UIProcess/API/C/WKNetworkInfoManager.cpp: Removed.
1429 * UIProcess/API/C/WKNetworkInfoManager.h: Removed.
1430 * UIProcess/API/efl/ewk_context.cpp:
1431 (EwkContext::EwkContext):
1432 * UIProcess/API/efl/ewk_context_private.h:
1433 * UIProcess/WebContext.cpp:
1434 (WebKit::WebContext::WebContext):
1435 * UIProcess/WebContext.h:
1436 * UIProcess/WebNetworkInfoManagerProxy.cpp: Removed.
1437 * UIProcess/WebNetworkInfoManagerProxy.h: Removed.
1438 * UIProcess/WebNetworkInfoManagerProxy.messages.in: Removed.
1439 * UIProcess/WebNetworkInfoProvider.cpp: Removed.
1440 * UIProcess/WebNetworkInfoProvider.h: Removed.
1441 * UIProcess/efl/NetworkInfoProvider.cpp: Removed.
1442 * UIProcess/efl/NetworkInfoProvider.h: Removed.
1443 * WebProcess/NetworkInfo/WebNetworkInfoManager.cpp: Removed.
1444 * WebProcess/NetworkInfo/WebNetworkInfoManager.h: Removed.
1445 * WebProcess/NetworkInfo/WebNetworkInfoManager.messages.in: Removed.
1446 * WebProcess/WebCoreSupport/WebNetworkInfoClient.cpp: Removed.
1447 * WebProcess/WebCoreSupport/WebNetworkInfoClient.h: Removed.
1448 * WebProcess/WebPage/WebPage.cpp:
1449 (WebKit::WebPage::WebPage):
1450 * WebProcess/WebProcess.cpp:
1451 (WebKit::WebProcess::WebProcess):
1453 2014-04-17 Daniel Bates <dabates@apple.com>
1455 [iOS] Hook up screen.{availHeight, availWidth, height, width}
1456 https://bugs.webkit.org/show_bug.cgi?id=131821
1457 <rdar://problem/16413795>
1459 Reviewed by Benjamin Poulain and Tim Horton.
1461 Implement WebKit2-specific support infrastructure.
1463 Additionally substitute "screenSize" for "viewporScreenSize" to make the code more understandable.
1465 * Shared/WebPageCreationParameters.cpp:
1466 (WebKit::WebPageCreationParameters::encode): Modified to encode the available screen size
1468 (WebKit::WebPageCreationParameters::decode): Modified to decode the available screen size
1470 * Shared/WebPageCreationParameters.h:
1471 * UIProcess/WebPageProxy.cpp:
1472 (WebKit::WebPageProxy::creationParameters): Initialize the available screen size
1474 * UIProcess/WebPageProxy.h:
1475 * UIProcess/ios/WebPageProxyIOS.mm:
1476 (WebKit::WebPageProxy::screenSize): Renamed; formerly named viewportScreenSize.
1477 (WebKit::WebPageProxy::availableScreenSize): Added.
1478 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1479 (WebKit::WebChromeClient::screenSize): Renamed; formerly named viewportScreenSize.
1480 (WebKit::WebChromeClient::availableScreenSize): Added; turns around and calls WebPage::availableScreenSize().
1481 * WebProcess/WebCoreSupport/WebChromeClient.h:
1482 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1483 (InitWebCoreSystemInterface): Hook up WebKit System Interface function WKGetAvailableScreenSize.
1484 * WebProcess/WebPage/WebPage.cpp:
1485 (WebKit::WebPage::WebPage): Initialize available screen size instance variable.
1486 * WebProcess/WebPage/WebPage.h:
1487 * WebProcess/WebPage/ios/WebPageIOS.mm:
1488 (WebKit::WebPage::screenSize):
1489 (WebKit::WebPage::availableScreenSize):
1491 2014-04-17 Anders Carlsson <andersca@apple.com>
1493 Remove unused API enums
1494 https://bugs.webkit.org/show_bug.cgi?id=131836
1496 Reviewed by Tim Horton.
1498 * UIProcess/API/Cocoa/WKNavigationDelegate.h:
1500 * UIProcess/Cocoa/NavigationState.mm:
1501 (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
1502 (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
1504 2014-04-17 Brent Fulgham <bfulgham@apple.com>
1506 Make RenderLayerBacking get the timingFunction of the correct animation.
1507 https://bugs.webkit.org/show_bug.cgi?id=100632
1509 Reviewed by Simon Fraser.
1511 * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
1512 (IPC::ArgumentCoder<GraphicsLayerAnimation>::decode): Update for new signatures for
1513 FloatAnimationValue, TransformAnimationValue, etc.
1515 2014-04-17 Enrica Casucci <enrica@apple.com>
1517 [iOS WebKit2] support replacements for misspelled words.
1518 https://bugs.webkit.org/show_bug.cgi?id=131827
1519 <rdar://problem/16319657>
1521 Reviewed by Benjamin Poulain.
1523 This is the first part of the work to add support for replacements.
1524 It handles _promptForReplace in canPerformAction to decide
1525 whether to show the Replace button in the menu and add the
1526 implementation of the replace action.
1528 * Shared/EditorState.cpp:
1529 (WebKit::EditorState::encode):
1530 (WebKit::EditorState::decode):
1531 * Shared/EditorState.h:
1532 (WebKit::EditorState::EditorState):
1533 * UIProcess/WebPageProxy.h:
1534 * UIProcess/ios/WKContentViewInteraction.mm:
1535 (-[WKContentView selectedText]):
1536 (-[WKContentView replaceText:withText:]):
1537 (-[WKContentView _promptForReplace:]):
1538 (-[WKContentView replace:]):
1539 (-[WKContentView canPerformAction:withSender:]):
1540 (-[WKContentView selectWordForReplacement]): This is called
1541 by UIKit when the user taps on a mispelled word to select it.
1542 * UIProcess/ios/WebPageProxyIOS.mm:
1543 (WebKit::WebPageProxy::replaceSelectedText):
1544 * WebProcess/WebPage/WebPage.cpp:
1545 (WebKit::WebPage::WebPage):
1546 (WebKit::WebPage::editorState):
1547 * WebProcess/WebPage/WebPage.h:
1548 * WebProcess/WebPage/WebPage.messages.in:
1549 * WebProcess/WebPage/ios/WebPageIOS.mm:
1550 (WebKit::WebPage::selectWithGesture): Removed m_shouldReturnWordForSelection.
1551 We now return always the word corresponding to the caret selection or
1552 the selected text up to a maximum of 200 characters.
1553 (WebKit::WebPage::extendSelection):
1554 (WebKit::WebPage::replaceSelectedText):
1556 2014-04-17 Tim Horton <timothy_horton@apple.com>
1558 [iOS] REGRESSION (r166975): WKPDFView is broken
1559 https://bugs.webkit.org/show_bug.cgi?id=131828
1561 Reviewed by Simon Fraser.
1563 * UIProcess/API/Cocoa/WKWebView.mm:
1564 (-[WKWebView _didCommitLayerTree:WebKit::]):
1565 Bail from updating the scroll view parameters from the layer tree update
1566 while it's being managed by a custom content view.
1567 We'll get any changes again in the next commit after removing the custom
1568 content view (and painting the new page) anyway, so this should be OK.
1570 2014-04-17 Pratik Solanki <psolanki@apple.com>
1572 _webProcessIdentifier should return 0 if the web process crashed
1573 https://bugs.webkit.org/show_bug.cgi?id=131813
1574 <rdar://problem/16650605>
1576 Reviewed by Anders Carlsson.
1578 * UIProcess/API/Cocoa/WKWebView.mm:
1579 (-[WKWebView _hasWebProcess]):
1580 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1582 2014-04-17 Darin Adler <darin@apple.com>
1584 Remove use of deprecatedDeleteAllValues in NPRemoteObjectMap::pluginDestroyed
1585 https://bugs.webkit.org/show_bug.cgi?id=122496
1587 Reviewed by Brent Fulgham.
1589 * Shared/Plugins/NPRemoteObjectMap.cpp:
1590 (WebKit::NPRemoteObjectMap::pluginDestroyed): Use new-style code and write the
1591 deprecatedDeleteAllValues function out using a loop. Might be nice to return here
1592 and use unique_ptr instead some day, but I tried that before and got it wrong, so
1593 lets do that another time.
1595 2014-04-17 Darin Adler <darin@apple.com>
1597 Add separate flag for IndexedDatabase in workers since the current implementation is not threadsafe
1598 https://bugs.webkit.org/show_bug.cgi?id=131785
1599 rdar://problem/16003108
1601 Reviewed by Brady Eidson.
1603 * Configurations/FeatureDefines.xcconfig: Added INDEXED_DATABASE_IN_WORKERS.
1605 2014-04-17 Dan Bernstein <mitz@apple.com>
1607 WebKit2 part of <rdar://problem/16601336> [Cocoa] _userInitiated is always NO in WKNavigationAction passed to -webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:
1608 https://bugs.webkit.org/show_bug.cgi?id=131783
1610 Reviewed by Tim Horton.
1612 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1613 (WebKit::WebChromeClient::createWindow): Set the isProcessingUserGesture field of
1614 the NavigationActionData to the corresponding value in the NavigationAction.
1615 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1616 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): Ditto.
1617 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Ditto.
1619 2014-04-16 Benjamin Poulain <bpoulain@apple.com>
1621 [iOS][WK2] Fix the DidCommitLoad initial scrolling position
1622 https://bugs.webkit.org/show_bug.cgi?id=131780
1624 Reviewed by Jon Honeycutt.
1626 * UIProcess/API/Cocoa/WKWebView.mm:
1627 (-[WKWebView _didCommitLayerTree:]):
1628 That code is older than _obscuredInsets and used the contentInsets as a workaround.
1630 2014-04-16 Benjamin Poulain <bpoulain@apple.com>
1632 [iOS][WK2] Fix annoying scrolling bugs
1633 https://bugs.webkit.org/show_bug.cgi?id=131722
1635 Reviewed by Simon Fraser.
1637 * UIProcess/API/Cocoa/WKWebView.mm:
1638 (-[WKWebView _scrollToContentOffset:WebCore::]):
1639 We are scrolling at the wrong position when we have the "small obscured insets".
1641 2014-04-16 Gavin Barraclough <baraclough@apple.com>
1643 On iOS keep network process running using a process assertion rather than a boost
1644 https://bugs.webkit.org/show_bug.cgi?id=131779
1646 Reviewed by Benjamin Poulain.
1648 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1649 (WebKit::connectToService):
1650 - No need to leak a boost onto the NetworkProcess on iOS.
1651 * UIProcess/Network/NetworkProcessProxy.cpp:
1652 (WebKit::NetworkProcessProxy::didFinishLaunching):
1653 - Take a ProcessAssertion on the NetworkProcess.
1654 * UIProcess/Shared/ChildProcessProxy.h:
1655 - Added m_assertion.
1656 * UIProcess/WebProcessProxy.h:
1657 - Removed m_assertion.
1658 * UIProcess/ios/ProcessAssertion.h: Added.
1659 - Added - refactored from WebProcessProxy.h.
1660 * UIProcess/ios/ProcessAssertion.mm: Added.
1661 (WebKit::ProcessAssertion::ProcessAssertion):
1662 (WebKit::ProcessAssertion::setState):
1663 - Added - refactored from WebProcessProxyIOS.mm.
1664 * UIProcess/ios/WebProcessProxyIOS.mm:
1665 (WebKit::WebProcessProxy::updateProcessState):
1666 - Code refactored out to ProcessAssertion.mm.
1667 * WebKit2.xcodeproj/project.pbxproj:
1670 2014-04-16 Benjamin Poulain <bpoulain@apple.com>
1672 [iOS][WK2] Improve the approximation of the scroll position of the dynamic viewport size updates
1673 https://bugs.webkit.org/show_bug.cgi?id=131720
1675 Reviewed by Tim Horton.
1677 * UIProcess/API/Cocoa/WKWebView.mm:
1678 (-[WKWebView _scrollToContentOffset:]):
1679 The scrolling tree was forcing scroll at the wrong scale during the transition.
1681 (-[WKWebView _setMinimumLayoutSizeOverride:]):
1682 This was left out by accident. The WebProcess was getting the new layout size twice, making
1683 WebPage::dynamicViewportSizeUpdate() very confused when the content size changes.
1685 * WebProcess/WebPage/ios/WebPageIOS.mm:
1686 (WebKit::WebPage::dynamicViewportSizeUpdate):
1687 Add scrolling adjustment for the dynamic relayout case:
1688 -Sticky top and bottom like the UIProcess.
1689 -Keep the same relative position of the unobscured rect's center.
1691 Also fix a bug in the horizontal and vertical adjustments: the code was using the exposed rect
1692 instead of the unobscured rect, which made the adjustments off by the size of the obscured insets.
1694 The type is changed from double to float since ARMv7 has a grudge against double.
1696 2014-04-16 Benjamin Poulain <bpoulain@apple.com>
1698 [iOS][WK2] Do not update the visible content rects when setting the same obscured insets multiple times
1699 https://bugs.webkit.org/show_bug.cgi?id=131633
1701 Reviewed by Darin Adler.
1703 We should avoid computing the visible content rects when not needed.
1705 * UIProcess/API/Cocoa/WKWebView.mm:
1706 (-[WKWebView _setObscuredInsets:]):
1708 2014-04-16 Zan Dobersek <zdobersek@igalia.com>
1710 Make IPC::Arguments a variadic template
1711 https://bugs.webkit.org/show_bug.cgi?id=131684
1713 Reviewed by Darin Adler.
1715 Make IPC::Arguments a variadic template that uses the template parameter pack to further
1716 define the std::tuple ValueType and is used to define the std::tuple container of the
1717 values passed into the container.
1719 * Platform/IPC/Arguments.h:
1720 (IPC::Arguments::Arguments):
1721 (IPC::Arguments::encode):
1722 (IPC::Arguments::decode):
1723 (IPC::Arguments0::encode): Deleted.
1724 (IPC::Arguments0::decode): Deleted.
1725 (IPC::Arguments1::Arguments1): Deleted.
1726 (IPC::Arguments1::encode): Deleted.
1727 (IPC::Arguments1::decode): Deleted.
1728 (IPC::Arguments2::Arguments2): Deleted.
1729 (IPC::Arguments2::encode): Deleted.
1730 (IPC::Arguments2::decode): Deleted.
1731 (IPC::Arguments3::Arguments3): Deleted.
1732 (IPC::Arguments3::encode): Deleted.
1733 (IPC::Arguments3::decode): Deleted.
1734 (IPC::Arguments4::Arguments4): Deleted.
1735 (IPC::Arguments4::encode): Deleted.
1736 (IPC::Arguments4::decode): Deleted.
1737 (IPC::Arguments5::Arguments5): Deleted.
1738 (IPC::Arguments5::encode): Deleted.
1739 (IPC::Arguments5::decode): Deleted.
1740 (IPC::Arguments6::Arguments6): Deleted.
1741 (IPC::Arguments6::encode): Deleted.
1742 (IPC::Arguments6::decode): Deleted.
1743 (IPC::Arguments7::Arguments7): Deleted.
1744 (IPC::Arguments7::encode): Deleted.
1745 (IPC::Arguments7::decode): Deleted.
1746 (IPC::Arguments8::Arguments8): Deleted.
1747 (IPC::Arguments8::encode): Deleted.
1748 (IPC::Arguments8::decode): Deleted.
1749 (IPC::Arguments10::Arguments10): Deleted.
1750 (IPC::Arguments10::encode): Deleted.
1751 (IPC::Arguments10::decode): Deleted.
1752 * Scripts/webkit2/LegacyMessages-expected.h:
1753 * Scripts/webkit2/Messages-expected.h:
1754 * Scripts/webkit2/messages.py: Clean up the code a bit.
1755 (reply_parameter_type):
1759 (arguments_type_old): Deleted.
1760 (base_class): Deleted.
1761 (delayed_reply_type): Deleted.
1763 2014-04-16 Tim Horton <timothy_horton@apple.com>
1765 Deduplicate LayerTreeContext
1766 https://bugs.webkit.org/show_bug.cgi?id=131773
1768 Reviewed by Simon Fraser.
1770 There are three identical implementations, one for each platform, for no reason.
1773 * PlatformEfl.cmake:
1774 * PlatformGTK.cmake:
1775 * Shared/LayerTreeContext.cpp: Renamed from Source/WebKit2/Shared/mac/LayerTreeContextMac.mm.
1776 (WebKit::LayerTreeContext::LayerTreeContext):
1777 (WebKit::LayerTreeContext::~LayerTreeContext):
1778 (WebKit::LayerTreeContext::encode):
1779 (WebKit::LayerTreeContext::decode):
1780 (WebKit::LayerTreeContext::isEmpty):
1781 (WebKit::operator==):
1782 * Shared/LayerTreeContext.h:
1783 (WebKit::operator!=): Deleted.
1784 * Shared/efl/LayerTreeContextEfl.cpp: Removed.
1785 * Shared/gtk/LayerTreeContextGtk.cpp: Removed.
1786 * WebKit2.xcodeproj/project.pbxproj:
1787 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1788 (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
1789 * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
1790 (WebKit::LayerTreeHostGtk::initialize):
1792 2014-04-16 Tim Horton <timothy_horton@apple.com>
1794 Don't build LayerTreeHost on Mac (and clean it up)
1795 https://bugs.webkit.org/show_bug.cgi?id=131769
1797 Reviewed by Simon Fraser.
1799 * WebKit2.xcodeproj/project.pbxproj:
1800 Don't include it in the project.
1802 * WebProcess/InjectedBundle/InjectedBundle.cpp:
1803 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
1804 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
1805 (WebKit::CoordinatedDrawingArea::updatePreferences):
1806 * WebProcess/WebPage/DrawingAreaImpl.cpp:
1807 (WebKit::DrawingAreaImpl::updatePreferences):
1808 * WebProcess/WebPage/LayerTreeHost.h:
1809 (WebKit::LayerTreeHost::setLayerHostingMode): Deleted.
1810 (WebKit::LayerTreeHost::supportsAcceleratedCompositing): Deleted.
1811 * WebProcess/WebPage/WebPage.cpp:
1812 (WebKit::WebPage::updatePreferences):
1813 * WebProcess/WebPage/ios/WebPageIOS.mm:
1814 Get rid of LayerTreeHost::supportsAcceleratedCompositing, which always returns true everywhere.
1815 Remove some LayerTreeHost.h includes.
1816 Remove LayerTreeHost::setLayerHostingMode, which is PLATFORM(COCOA) and not needed.
1818 2014-04-16 Simon Fraser <simon.fraser@apple.com>
1820 Failing to decode a layer tree commit message resulted in silent and mysterious failure
1821 https://bugs.webkit.org/show_bug.cgi?id=131766
1822 <rdar://problem/16520894>
1824 Reviewed by Sam Weinig.
1826 If the message decode failed, we should have already marked the message as invalid.
1827 Failing to do so indicates in a decode code coding error.
1829 * Platform/IPC/HandleMessage.h:
1830 (IPC::handleMessage):
1831 (IPC::handleMessageVariadic):
1832 (IPC::handleMessageDelayed):
1834 2014-04-16 Tim Horton <timothy_horton@apple.com>
1836 Minor include sanity in WebPage.h
1837 https://bugs.webkit.org/show_bug.cgi?id=131752
1839 Reviewed by Simon Fraser.
1841 * WebProcess/WebPage/WebPage.h:
1842 Remove a bunch of unnecessary includes.
1843 Un-indent some stuff.
1845 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1846 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1847 * WebProcess/WebPage/FindController.cpp:
1848 * WebProcess/WebPage/WebPage.cpp:
1849 * WebProcess/WebPage/mac/WebPageMac.mm:
1850 Add back more specific includes, into implementation files.
1852 * WebProcess/WebPage/WebUndoStep.cpp:
1853 (WebKit::WebUndoStep::~WebUndoStep):
1854 * WebProcess/WebPage/WebUndoStep.h:
1855 Add an out-of-line destructor.
1857 2014-04-16 Gavin Barraclough <baraclough@apple.com>
1859 REGRESSION: PCE.js is 20x slower in WebKit2 because timers are throttled
1860 https://bugs.webkit.org/show_bug.cgi?id=131189
1862 Unreviewed rollout of r166754
1864 This change is no longer necessary.
1866 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1867 (WebKit::connectToService):
1869 2014-04-16 Alexey Proskuryakov <ap@apple.com>
1871 Updating tests after bug 131721, [GTK] Fix unused parameter warnings.
1873 * Scripts/webkit2/LegacyMessageReceiver-expected.cpp:
1874 (WebKit::WebPage::didReceiveWebPageMessage):
1875 (WebKit::WebPage::didReceiveSyncWebPageMessage):
1876 * Scripts/webkit2/MessageReceiver-expected.cpp:
1877 (WebKit::WebPage::didReceiveMessage):
1878 (WebKit::WebPage::didReceiveSyncMessage):
1880 2014-04-16 Brendan Long <b.long@cablelabs.com>
1882 [GTK] Fix unused parameter warnings
1883 https://bugs.webkit.org/show_bug.cgi?id=131721
1885 Reviewed by Darin Adler.
1887 * Scripts/webkit2/messages.py:
1888 (generate_message_handler): Add UNUSED_PARAM() for a couple parameters which aren't always used.
1889 * Shared/WebCoreArgumentCoders.cpp:
1890 (IPC::ArgumentCoder<LinearTimingFunction>::decode): Remove unused parameters.
1891 * WebProcess/InjectedBundle/APIInjectedBundleFormClient.h:
1892 (API::InjectedBundle::FormClient::textDidChangeInTextField): Same.
1893 (API::InjectedBundle::FormClient::willSubmitForm): Same.
1894 (API::InjectedBundle::FormClient::willSendSubmitEvent): Same.
1895 * WebProcess/Network/NetworkProcessConnection.cpp:
1896 (WebKit::NetworkProcessConnection::didReceiveSyncMessage): Same.
1898 2014-04-16 Tim Horton <timothy_horton@apple.com>
1900 Accidentally included some style-checker-testing changes in the last commit.
1902 * WebProcess/Plugins/PDF/PDFPlugin.mm:
1903 (WebKit::PDFPlugin::attemptToUnlockPDF):
1904 (WebKit::PDFPlugin::updatePageAndDeviceScaleFactors):
1906 2014-04-16 Tim Horton <timothy_horton@apple.com>
1908 Fix some style checker complaints in PDFPlugin
1909 https://bugs.webkit.org/show_bug.cgi?id=131706
1911 Reviewed by Darin Adler.
1913 * WebProcess/Plugins/PDF/PDFPlugin.mm:
1914 (-[WKPDFPluginAccessibilityObject accessibilityAttributeValue:]):
1915 (-[WKPDFPluginAccessibilityObject accessibilityAttributeValue:forParameter:]):
1916 (-[WKPDFPluginAccessibilityObject accessibilityAttributeNames]):
1917 (WebKit::PDFPlugin::attemptToUnlockPDF):
1918 (WebKit::PDFPlugin::updatePageAndDeviceScaleFactors):
1919 (WebKit::PDFPlugin::isEditingCommandEnabled):
1920 (WebKit::PDFPlugin::nextMatchForString):
1921 (WebKit::PDFPlugin::handleWheelEvent):
1922 (WebKit::PDFPlugin::liveData):
1924 2014-04-15 Dan Bernstein <mitz@apple.com>
1926 [Cocoa] Add a form delegate method corresponding to willSubmitForm
1927 https://bugs.webkit.org/show_bug.cgi?id=131718
1929 Reviewed by Tim Horton.
1931 * UIProcess/API/Cocoa/WKWebView.mm:
1932 (-[WKWebView _setFormDelegate:]): Changed to define and create a FormClient (which derives
1933 from API::FormClient and messages a delegate), and set it as the form client.
1935 * UIProcess/API/Cocoa/_WKFormDelegate.h: Declared new delegate method.
1937 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Added a
1938 variant of willSubmitForm that returs a user object to pass to the delegate in the UI
1939 process, giving it a temporary name with “new”.
1941 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
1942 (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Changed willSubmitForm()
1943 to check for the new bundle delegate method first and encode the user object as user data.
1944 Moved the encoding of an NSObject <NSSecureCoding> as user data into a helper function.
1946 2014-04-15 Hyowon Kim <hw1008.kim@samsung.com>
1948 Make page overlay functionality working on coordinated graphics.
1949 https://bugs.webkit.org/show_bug.cgi?id=131425
1951 Reviewed by Darin Adler.
1953 Page overlay functionality did not work on coordinated graphics since r166975.
1954 This patch removes deprecated code related to the PageOverlay GraphicsLayer management.
1955 and makes CoordinatedLayerTreeHost use PageOverlayController.
1957 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
1958 (WebKit::CoordinatedDrawingArea::mainFrameContentSizeChanged):
1959 (WebKit::CoordinatedDrawingArea::didInstallPageOverlay): Deleted.
1960 (WebKit::CoordinatedDrawingArea::didUninstallPageOverlay): Deleted.
1961 (WebKit::CoordinatedDrawingArea::setPageOverlayNeedsDisplay): Deleted.
1962 (WebKit::CoordinatedDrawingArea::setPageOverlayOpacity): Deleted.
1963 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
1964 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1965 (WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer):
1966 (WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
1967 (WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
1968 (WebKit::CoordinatedLayerTreeHost::didInstallPageOverlay): Deleted.
1969 (WebKit::CoordinatedLayerTreeHost::didUninstallPageOverlay): Deleted.
1970 (WebKit::CoordinatedLayerTreeHost::setPageOverlayNeedsDisplay): Deleted.
1971 (WebKit::CoordinatedLayerTreeHost::setPageOverlayOpacity): Deleted.
1972 (WebKit::CoordinatedLayerTreeHost::createPageOverlayLayer): Deleted.
1973 (WebKit::CoordinatedLayerTreeHost::destroyPageOverlayLayer): Deleted.
1974 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
1975 * WebProcess/WebPage/LayerTreeHost.h:
1976 (WebKit::LayerTreeHost::didInstallPageOverlay):
1977 (WebKit::LayerTreeHost::didUninstallPageOverlay):
1978 (WebKit::LayerTreeHost::setPageOverlayNeedsDisplay):
1980 2014-04-15 Dan Bernstein <mitz@apple.com>
1982 Introduce API::FormClient
1983 https://bugs.webkit.org/show_bug.cgi?id=131714
1985 Reviewed by Tim Horton.
1987 * UIProcess/API/APIFormClient.h: Added.
1988 (API::FormClient::~FormClient):
1989 (API::FormClient::willSubmitForm):
1991 * UIProcess/API/C/WKPage.cpp:
1992 (WKPageSetPageFormClient): Changed to create a WebFormClient and call
1993 WebPageProxy::setFormClient.
1995 * UIProcess/WebFormClient.cpp:
1996 (WebKit::WebFormClient::WebFormClient): Added a constructor from WKPageFormClientBase.
1997 * UIProcess/WebFormClient.h: Added inheritance from API::FormClient, marked overrides as
2000 * UIProcess/WebPageProxy.cpp:
2001 (WebKit::WebPageProxy::WebPageProxy): Initialize m_formClient member.
2002 (WebKit::WebPageProxy::setFormClient): Added. Updates m_formClient.
2003 (WebKit::WebPageProxy::close): Updated code to clear m_formClient.
2004 (WebKit::WebPageProxy::willSubmitForm): Updated for type change.
2005 (WebKit::WebPageProxy::initializeFormClient): Deleted.
2006 * UIProcess/WebPageProxy.h:
2008 * WebKit2.xcodeproj/project.pbxproj: Added reference to new file.
2010 2014-04-15 Simon Fraser <simon.fraser@apple.com>
2012 [iOS WK2] Pages often blank on first load if page loaded by typing the URL
2013 https://bugs.webkit.org/show_bug.cgi?id=131665
2015 Reviewed by Tim Horton.
2017 The document overlay-related code in RemoteLayerTreeDrawingArea::setRootCompositingLayer()
2018 was triggering a compositing layer flush when called with a null rootLayer, which happens
2019 for pages going into the page cache. This would trigger a layer flush that would clobber
2020 the root layer for the visible page, resulting in missing content.
2022 Also, rebuildCompositingLayerTree() is called recursively and the m_documentOverlayRootLayer
2023 was being added to (and then removed from) every single compositing layers.
2025 Fix both these by changing to a pull model, where RenderLayerCompositor requests
2026 the overlay layer via ChromeClient, and gets it at the end of every flush,
2027 adding to the children of the root layer.
2029 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2030 (WebKit::WebChromeClient::documentOverlayLayerForFrame):
2031 * WebProcess/WebCoreSupport/WebChromeClient.h:
2032 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2033 (WebKit::RemoteLayerTreeDrawingArea::setRootCompositingLayer):
2035 2014-04-15 Jinwoo Song <jinwoo7.song@samsung.com>
2037 [EFL][WK2] Pass Mouse movement data to WebMouseEvent
2038 https://bugs.webkit.org/show_bug.cgi?id=131663
2040 Reviewed by Gyuyoung Kim.
2042 Currently mouse movement data are not passed to WebMouseEvent. Instead, they are set to 0 as default.
2043 EFL port needs to send the deltaX and deltaY for PointerLock API which will be implemented later.
2045 * Shared/efl/WebEventFactory.cpp:
2046 (WebKit::WebEventFactory::createWebMouseEvent):
2048 2014-04-15 Commit Queue <commit-queue@webkit.org>
2050 Unreviewed, rolling out r167298.
2051 https://bugs.webkit.org/show_bug.cgi?id=131670
2053 Broke CSS filters (17 test crashes) (Requested by ap on
2058 "[iOS WK2] Pages often blank on first load if page loaded by
2060 https://bugs.webkit.org/show_bug.cgi?id=131665
2061 http://trac.webkit.org/changeset/167298
2063 2014-04-14 Simon Fraser <simon.fraser@apple.com>
2065 [iOS WK2] Pages often blank on first load if page loaded by typing the URL
2066 https://bugs.webkit.org/show_bug.cgi?id=131665
2068 Reviewed by Tim Horton.
2070 The document overlay-related code in RemoteLayerTreeDrawingArea::setRootCompositingLayer()
2071 was triggering a compositing layer flush when called with a null rootLayer, which happens
2072 for pages going into the page cache. This would trigger a layer flush that would clobber
2073 the root layer for the visible page, resulting in missing content.
2075 Also, rebuildCompositingLayerTree() is called recursively and the m_documentOverlayRootLayer
2076 was being added to (and then removed from) every single compositing layers.
2078 Fix both these by changing to a pull model, where RenderLayerCompositor requests
2079 the overlay layer via ChromeClient, and gets it at the end of every flush,
2080 adding to the children of the root layer.
2082 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2083 (WebKit::WebChromeClient::documentOverlayLayerForFrame):
2084 * WebProcess/WebCoreSupport/WebChromeClient.h:
2085 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2086 (WebKit::RemoteLayerTreeDrawingArea::setRootCompositingLayer):
2088 2014-04-14 Tim Horton <timothy_horton@apple.com>
2090 Fix the 32-bit build.
2092 * UIProcess/mac/ViewGestureControllerMac.mm:
2094 2014-04-14 Simon Fraser <simon.fraser@apple.com>
2096 REGRESSION (WebKit2): Programmatic scrolls in overflow-scrolling:touch don't work
2097 https://bugs.webkit.org/show_bug.cgi?id=131649
2099 Reviewed by Tim Horton.
2101 Update the UIScrollView's contentOffset when we're told that the scroll position
2104 Also refactor slightly to have a single exception-protected block.
2106 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
2107 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren):
2109 2014-04-14 Tim Horton <timothy_horton@apple.com>
2111 Fix the 32-bit build.
2113 * UIProcess/mac/ViewGestureControllerMac.mm:
2115 2014-04-14 Tim Horton <timothy_horton@apple.com>
2117 Sometimes-crash under handleSwipeGesture after closing a window or quitting
2118 https://bugs.webkit.org/show_bug.cgi?id=131648
2119 <rdar://problem/15966106>
2121 Reviewed by Simon Fraser.
2123 * UIProcess/mac/ViewGestureController.h:
2124 * UIProcess/mac/ViewGestureControllerMac.mm:
2125 (WebKit::ViewGestureController::~ViewGestureController):
2126 (WebKit::ViewGestureController::trackSwipeGesture):
2127 Keep a Objective C object with a single boolean property, isCancelled, on
2128 the ViewGestureController, and also retained by the swipe-tracking block.
2129 When the ViewGestureController is destroyed, we set isCancelled to YES,
2130 and the next time the block is invoked, we will cancel the swipe without
2131 touching the destroyed ViewGestureController.
2133 (WebKit::ViewGestureController::handleSwipeGesture):
2134 Don't try to handle a swipe gesture if the drawing area is missing.
2136 (WebKit::ViewGestureController::endSwipeGesture):
2137 Clear the swipe cancellation tracker when the gesture completes.
2139 2014-04-14 Enrica Casucci <enrica@apple.com>
2141 REGRESSION(r166027) Menu is shown and immediately hidden after doubletap gesture.
2142 https://bugs.webkit.org/show_bug.cgi?id=131646
2143 <rdar://problem/16614374>
2145 Reviewed by Benjamin Poulain.
2147 This is a problem with every gesture that changes the selection
2148 We don't need to delay updating the selection if the selection is
2149 being changed with a gesture.
2151 * UIProcess/ios/WKContentViewInteraction.h:
2152 * UIProcess/ios/WKContentViewInteraction.mm:
2153 (-[WKContentView _didUpdateBlockSelectionWithTouch:withFlags:growThreshold:shrinkThreshold:]):
2154 (-[WKContentView changeSelectionWithGestureAt:withGesture:withState:]):
2155 (-[WKContentView changeSelectionWithTouchAt:withSelectionTouch:baseIsStart:]):
2156 (-[WKContentView changeSelectionWithTouchesFrom:to:withGesture:withState:]):
2157 (-[WKContentView changeBlockSelectionWithTouchAt:withSelectionTouch:forHandle:]):
2158 (-[WKContentView _selectionChanged]):
2160 2014-04-14 Dan Bernstein <mitz@apple.com>
2162 Let the bundle form client know whether a change in a text field was initiated by user typing
2163 https://bugs.webkit.org/show_bug.cgi?id=131643
2165 Reviewed by Sam Weinig.
2167 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Added
2168 initiatedByUserTyping parameter to the delegate method.
2170 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2171 (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Updated overload of
2172 textDidChangeInTextField to take the initiatedByUserTyping parameter and pass it along to
2175 * WebProcess/InjectedBundle/APIInjectedBundleFormClient.h:
2176 (API::InjectedBundle::FormClient::textDidChangeInTextField): Added initiatedByUserTyping
2179 * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
2180 (WebKit::InjectedBundlePageFormClient::textDidChangeInTextField): Maintained the existing
2181 behavior of not calling the C SPI client if the change was not initiated by user typing.
2182 * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h: Updated for added parameter.
2184 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2185 (WebKit::WebEditorClient::textDidChangeInTextField): Changed to call the bundle client
2186 function unconditionally, but pass along whether the change was initiated by user typing.
2188 2014-04-14 Dan Bernstein <mitz@apple.com>
2190 [Cocoa] Add a WKWebProcessPlugInFormDelegate method corresponding to willSendSubmitEvent
2191 https://bugs.webkit.org/show_bug.cgi?id=131639
2193 Reviewed by Tim Horton.
2195 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Declared
2196 new delegate method.
2197 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2198 (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Added an override
2199 of API::InjectedBundle::FormClient::willSendSubmitEvent which calls the new delegate
2202 2014-04-14 Benjamin Poulain <bpoulain@apple.com>
2204 [iOS][WK2] Change the SPI used when starting the rotation animation
2205 https://bugs.webkit.org/show_bug.cgi?id=131638
2207 Reviewed by Tim Horton.
2209 Having an update block where all the properties are changed is more convenient for Safari.
2211 * UIProcess/API/Cocoa/WKWebView.mm:
2212 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
2213 (-[WKWebView _beginAnimatedResizeToSize:obscuredInsets:minimumLayoutSizeOverride:]): Deleted.
2214 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2216 2014-04-14 Simon Fraser <simon.fraser@apple.com>
2218 [iOS WK2] Hash table assertion closing a tab
2219 https://bugs.webkit.org/show_bug.cgi?id=131640
2221 Reviewed by Tim Horton.
2223 Have RemoteLayerTreeContext keep track of all PlatformCALayerRemotes,
2224 and clear their context pointer when it is being destroyed to avoid
2225 calling into a deleted object later.
2227 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
2228 (WebKit::PlatformCALayerRemote::~PlatformCALayerRemote):
2229 (WebKit::PlatformCALayerRemote::addAnimationForKey):
2230 * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2231 (WebKit::PlatformCALayerRemote::clearContext):
2232 * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
2233 * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
2234 (WebKit::RemoteLayerTreeContext::~RemoteLayerTreeContext):
2235 (WebKit::RemoteLayerTreeContext::layerWasCreated):
2236 (WebKit::RemoteLayerTreeContext::layerWillBeDestroyed):
2238 2014-04-14 Tim Horton <timothy_horton@apple.com>
2240 Allow dynamic changes of WKThumbnailView snapshot scale
2241 https://bugs.webkit.org/show_bug.cgi?id=131628
2242 <rdar://problem/16584156>
2244 Reviewed by Beth Dakin.
2246 * UIProcess/API/Cocoa/_WKThumbnailView.mm:
2247 (-[_WKThumbnailView _requestSnapshotIfNeeded]):
2248 Don't bail from requesting a snapshot just because we already had one; we want to resnapshot.
2249 Keep track of when we bail from requesting a snapshot because we have one in-flight, so we can request it later.
2251 (-[_WKThumbnailView _didTakeSnapshot:]):
2252 Apply the scale to the bitmap size (whoops!).
2253 Make CA always resize the content to fill the thumbnail view's layer, respecting aspect ratio.
2254 Re-snapshot if we previously deferred a snapshot.
2256 (-[_WKThumbnailView setScale:]):
2257 If we get a scale change, request a new snapshot.
2259 (-[_WKThumbnailView setUsesSnapshot:]):
2260 Never apply thumbnail scale to the page if we're using snapshots. It's unnecessary,
2261 because scale will be applied simply when painting the software snapshot.
2262 Apply the thumbnail scale if we're going from usesSnapshot -> !usesSnapshot.
2264 * WebProcess/WebPage/WebPage.cpp:
2265 (WebKit::WebPage::snapshotAtSize):
2266 Snapshots should use the greater of the two scales, so as to never leave a portion of the snapshot unpainted.
2268 2014-04-14 Tim Horton <timothy_horton@apple.com>
2270 REGRESSION (WebKit2 View Gestures): Double-tap doesn't work properly when there's no element underneath the cursor
2271 https://bugs.webkit.org/show_bug.cgi?id=131629
2272 <rdar://problem/16192821>
2274 Reviewed by Dan Bernstein.
2276 * UIProcess/mac/ViewGestureControllerMac.mm:
2277 (WebKit::ViewGestureController::didCollectGeometryForSmartMagnificationGesture):
2278 If there's nothing under the cursor, zoom towards the cursor instead of towards 0,0.
2280 2014-04-14 Simon Fraser <simon.fraser@apple.com>
2282 Run filter animations in the UI process with UI-side compositing
2283 https://bugs.webkit.org/show_bug.cgi?id=131199
2284 <rdar://problem/16479487>
2286 Reviewed by Sam Weinig.
2288 * Shared/WebCoreArgumentCoders.cpp: Removed lots of WebCore::
2289 (IPC::ArgumentCoder<SelectionRect>::decode):
2290 (IPC::ArgumentCoder<PasteboardWebContent>::encode):
2291 (IPC::ArgumentCoder<PasteboardWebContent>::decode):
2292 (IPC::ArgumentCoder<PasteboardImage>::encode):
2293 (IPC::ArgumentCoder<PasteboardImage>::decode):
2294 (IPC::ArgumentCoder<URL>::decode):
2295 (IPC::ArgumentCoder<UserStyleSheet>::encode):
2296 (IPC::ArgumentCoder<UserStyleSheet>::decode):
2297 (IPC::ArgumentCoder<UserScript>::encode):
2298 (IPC::ArgumentCoder<UserScript>::decode):
2299 (IPC::ArgumentCoder<ScrollableAreaParameters>::encode):
2300 (IPC::ArgumentCoder<ScrollableAreaParameters>::decode):
2301 (IPC::ArgumentCoder<FixedPositionViewportConstraints>::encode):
2302 (IPC::ArgumentCoder<FixedPositionViewportConstraints>::decode):
2303 (IPC::ArgumentCoder<StickyPositionViewportConstraints>::encode):
2304 (IPC::ArgumentCoder<StickyPositionViewportConstraints>::decode):
2305 (IPC::ArgumentCoder<FilterOperation>::encode):
2306 (IPC::decodeFilterOperation):
2307 (IPC::ArgumentCoder<FilterOperations>::encode):
2308 (IPC::ArgumentCoder<WebCore::UserStyleSheet>::encode): Deleted.
2309 (IPC::ArgumentCoder<WebCore::UserStyleSheet>::decode): Deleted.
2310 (IPC::ArgumentCoder<WebCore::UserScript>::encode): Deleted.
2311 (IPC::ArgumentCoder<WebCore::UserScript>::decode): Deleted.
2312 (IPC::ArgumentCoder<WebCore::ScrollableAreaParameters>::encode): Deleted.
2313 (IPC::ArgumentCoder<WebCore::ScrollableAreaParameters>::decode): Deleted.
2314 (IPC::ArgumentCoder<WebCore::FixedPositionViewportConstraints>::encode): Deleted.
2315 (IPC::ArgumentCoder<WebCore::FixedPositionViewportConstraints>::decode): Deleted.
2316 (IPC::ArgumentCoder<WebCore::StickyPositionViewportConstraints>::encode): Deleted.
2317 (IPC::ArgumentCoder<WebCore::StickyPositionViewportConstraints>::decode): Deleted.
2318 (IPC::encodeFilterOperation): Deleted.
2319 Add encoding/decoding support for FilterOperation.
2320 decodeFilterOperation() has to be a bare function because of the RefPtr
2322 REFERENCE filters should never be encoded, since they have CachedSVGDocumentReferences.
2324 * Shared/WebCoreArgumentCoders.h:
2326 * Shared/mac/RemoteLayerTreeTransaction.mm:
2327 (WebKit::RemoteLayerTreeTextStream::operator<<):
2328 Add logging for filter animations to the RemoteLayerTree log output.
2330 * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
2331 * WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
2332 (WebKit::GraphicsLayerCARemote::addAnimation): Deleted. We can run
2333 filter animations now.
2335 * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
2336 KeyValues have a RefPtr<WebCore::FilterOperation> now (which can't be part of
2337 the union because we need its constructor to get called).
2338 * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
2339 (WebKit::PlatformCAAnimationRemote::KeyframeValue::encode): Encode the filter.
2340 (WebKit::PlatformCAAnimationRemote::KeyframeValue::decode): Decode the filter.
2341 (WebKit::PlatformCAAnimationRemote::setFromValue): Implement.
2342 (WebKit::PlatformCAAnimationRemote::setToValue): Implement.
2343 (WebKit::PlatformCAAnimationRemote::setValues): Implement.
2344 (WebKit::animationValueFromKeyframeValue): Handle filters.
2346 2014-04-14 Simon Fraser <simon.fraser@apple.com>
2350 * UIProcess/mac/PageClientImpl.h:
2352 2014-04-14 Simon Fraser <simon.fraser@apple.com>
2354 [WK2 iOS] Scrolling to anchor links is broken
2355 https://bugs.webkit.org/show_bug.cgi?id=131618
2356 <rdar://problem/16599144>
2358 Reviewed by Tim Horton.
2360 The RemoteScrollingTree implements scrollingTreeNodeRequestsScroll
2361 to get informed about requested scroll position updates, and passes
2362 them along via the RemoteScrollingCoordinatorProxy, WebPageProxy and PageClient
2363 to the WKWebView, which performs a scroll.
2365 * UIProcess/API/Cocoa/WKWebView.mm:
2366 (-[WKWebView _scrollToContentOffset:WebCore::]): Scroll to content offset,
2367 taking page scale and insets into account.
2368 * UIProcess/API/Cocoa/WKWebViewInternal.h:
2369 * UIProcess/CoordinatedGraphics/WebView.cpp:
2370 (WebKit::WebView::requestScroll):
2371 * UIProcess/CoordinatedGraphics/WebView.h:
2372 * UIProcess/PageClient.h:
2373 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
2374 (WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeRequestsScroll):
2375 Pass scrolls along to the WebPageProxy for the root node. We will also need
2376 to handle programmatic scrolls for overflow soon.
2377 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
2378 * UIProcess/Scrolling/RemoteScrollingTree.cpp:
2379 (WebKit::RemoteScrollingTree::scrollingTreeNodeRequestsScroll):
2380 * UIProcess/Scrolling/RemoteScrollingTree.h:
2381 * UIProcess/WebPageProxy.cpp:
2382 (WebKit::WebPageProxy::requestScroll):
2383 * UIProcess/WebPageProxy.h:
2384 * UIProcess/ios/PageClientImplIOS.h:
2385 * UIProcess/ios/PageClientImplIOS.mm:
2386 (WebKit::PageClientImpl::canScrollView):
2387 (WebKit::PageClientImpl::requestScroll):
2388 * UIProcess/mac/PageClientImpl.mm:
2389 (WebKit::PageClientImpl::requestScroll):
2391 2014-04-12 Antti Koivisto <antti@apple.com>
2393 Keep secondary tile grid for zoomed-out scale
2394 https://bugs.webkit.org/show_bug.cgi?id=131586
2396 Reviewed by Darin Adler.
2398 * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
2399 (WebKit::PlatformCALayerRemoteTiledBacking::PlatformCALayerRemoteTiledBacking):
2400 (WebKit::PlatformCALayerRemoteTiledBacking::customSublayers):
2402 Always request new sublayer list from tile controller.
2404 * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
2406 2014-04-14 Tim Horton <timothy_horton@apple.com>
2408 Make WK(Web)View magnification setters actually use view-relative positions
2409 https://bugs.webkit.org/show_bug.cgi?id=131611
2410 <rdar://problem/15965239>
2412 Reviewed by Darin Adler.
2414 * UIProcess/API/mac/WKView.mm:
2415 (-[WKView setMagnification:centeredAtPoint:]):
2416 (-[WKView setMagnification:]):
2417 Use scalePageInViewCoordinates instead.
2419 * UIProcess/WebPageProxy.cpp:
2420 (WebKit::WebPageProxy::scalePageInViewCoordinates):
2421 * UIProcess/WebPageProxy.h:
2422 * WebProcess/WebPage/WebPage.cpp:
2423 (WebKit::WebPage::scalePageInViewCoordinates):
2424 (WebKit::WebPage::pageScaleFactor):
2425 * WebProcess/WebPage/WebPage.h:
2426 * WebProcess/WebPage/WebPage.messages.in:
2427 Add scalePageInViewCoordinates, which turns the scale centerpoint within the view
2428 into what scalePage expects: a post-scale scroll offset.
2430 2014-04-14 Tim Horton <timothy_horton@apple.com>
2432 Support setting a background color on page overlays
2433 https://bugs.webkit.org/show_bug.cgi?id=131600
2435 Reviewed by Darin Adler.
2437 * WebProcess/WebPage/PageOverlay.cpp:
2438 (WebKit::PageOverlay::PageOverlay):
2439 (WebKit::PageOverlay::bounds):
2440 (WebKit::PageOverlay::startFadeInAnimation):
2441 (WebKit::PageOverlay::startFadeOutAnimation):
2442 (WebKit::PageOverlay::startFadeAnimation):
2443 (WebKit::PageOverlay::fadeAnimationTimerFired):
2444 Minor style adjustments.
2445 Use more references everywhere.
2447 (WebKit::PageOverlay::setBackgroundColor):
2448 (WebKit::PageOverlay::setNeedsDisplay):
2449 * WebProcess/WebPage/PageOverlay.h:
2450 (WebKit::PageOverlay::backgroundColor):
2451 Keep track of our background color, and push it down to the page overlay controller if we have one.
2453 * WebProcess/WebPage/PageOverlayController.cpp:
2454 (WebKit::updateOverlayGeometry):
2455 (WebKit::PageOverlayController::clearPageOverlay):
2456 Page overlays will always have the right size, and just use drawsContents to determine
2457 whether or not they should tile/have backing store/etc.
2459 (WebKit::PageOverlayController::installPageOverlay):
2460 (WebKit::PageOverlayController::didChangeOverlayBackgroundColor):
2461 Set the background color of the layer.
2463 * WebProcess/WebPage/PageOverlayController.h:
2465 * WebProcess/WebPage/WebPage.cpp:
2466 (WebKit::WebPage::WebPage):
2469 2014-04-13 Andy Estes <aestes@apple.com>
2471 [QuickLook] Move file system-related code into WebKit
2472 https://bugs.webkit.org/show_bug.cgi?id=131597
2474 Reviewed by Dan Bernstein.
2476 * WebProcess/Network/WebResourceLoader.h: Made m_quickLookHandle a unique_ptr.
2477 * WebProcess/ios/WebResourceLoaderIOS.mm:
2478 (WebKit::WebResourceLoader::setUpQuickLookHandleIfNeeded):
2480 2014-04-13 Andy Estes <aestes@apple.com>
2482 REGRESSION (r167164): -[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:] _block_invoke can access a deallocated completionHandler
2483 https://bugs.webkit.org/show_bug.cgi?id=131595
2485 Reviewed by Dan Bernstein.
2487 Make a copy of completionHandler and release it after we're done with it.
2489 * Shared/mac/CookieStorageShim.mm:
2490 (-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
2492 2014-04-13 Pratik Solanki <psolanki@apple.com>
2494 Don't use ImportanceAssertion on iOS
2495 https://bugs.webkit.org/show_bug.cgi?id=131481
2496 <rdar://problem/16575830>
2498 Reviewed by Darin Adler.
2500 We have other API to mark processes as being in use on iOS. No need to use ImportanceAssertion.
2502 * Platform/IPC/MessageDecoder.cpp:
2503 * Platform/IPC/MessageDecoder.h:
2504 * Platform/IPC/mac/ConnectionMac.cpp:
2505 (IPC::Connection::receiveSourceEventHandler):
2506 * Platform/IPC/mac/ImportanceAssertion.h:
2508 2014-04-13 Commit Queue <commit-queue@webkit.org>
2510 Unreviewed, rolling out r167168 and r167194.
2511 https://bugs.webkit.org/show_bug.cgi?id=131589
2513 Caused massive ASSERTION failures on the GTK Debug bot
2514 (Requested by philn on #webkit).
2516 Reverted changesets:
2518 "[GTK] Add HighDPI support for non-accelerated compositing
2520 https://bugs.webkit.org/show_bug.cgi?id=131562
2521 http://trac.webkit.org/changeset/167168
2523 "Unreviewed. Fix GTK+ build with recent cairo and GTK+ after
2525 http://trac.webkit.org/changeset/167194
2527 2014-04-13 Carlos Garcia Campos <cgarcia@igalia.com>
2529 Unreviewed. Fix GTK+ build with recent cairo and GTK+ after r167168.
2531 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2532 (webkitWebViewBaseCreateWebPage):
2534 2014-04-12 Andy Estes <aestes@apple.com>
2536 [iOS] Move QuickLookHandle from ResourceLoader to WebResourceLoader
2537 https://bugs.webkit.org/show_bug.cgi?id=131580
2539 Reviewed by Darin Adler.
2541 There's no need to bloat WebKit1's ResourceLoader with a pointer that
2542 only WebKit2's WebResourceLoader cares about.
2544 * WebProcess/Network/WebResourceLoader.cpp:
2545 (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
2546 (WebKit::WebResourceLoader::didReceiveData):
2547 (WebKit::WebResourceLoader::didFinishResourceLoad):
2548 (WebKit::WebResourceLoader::didFailResourceLoad):
2549 * WebProcess/Network/WebResourceLoader.h:
2550 * WebProcess/ios/WebResourceLoaderIOS.mm:
2551 (WebKit::WebResourceLoader::setUpQuickLookHandleIfNeeded):
2553 2014-04-11 Alexey Proskuryakov <ap@apple.com>
2555 [Mac] Crashes when copying or pasting huge images
2556 https://bugs.webkit.org/show_bug.cgi?id=131576
2557 <rdar://problem/12131833>
2558 <rdar://problem/14427398>
2560 Reviewed by Darin Adler.
2562 Added a few null checks for SharedMemory::create() return value in pasteboard code.
2563 Error handling feels a bit sketchy, but
2564 - I'm not sure what it should look like ideally;
2565 - it matches the kind of error handling we already have in these functions;
2566 - it appears to work reasonably well in practice. We get empty content, which
2567 is not nice, but not particularly problematic either. When copying an animated GIF,
2568 we also get the GIF in RTFD flavor, so even pasting into NSTextViews works!
2570 * Platform/mac/SharedMemoryMac.cpp:
2571 (WebKit::SharedMemory::createFromVMBuffer):
2572 * UIProcess/mac/WebContextMac.mm:
2573 (WebKit::WebContext::getPasteboardBufferForType):
2574 (WebKit::WebContext::readBufferFromPasteboard):
2575 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2576 (WebKit::WebPlatformStrategies::setBufferForType):
2578 * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: (WebKit::WebDragClient::declareAndWriteDragImage):
2579 Also renamed some variables to prevent name collisions with with nested scope.
2581 2014-04-11 Ryuan Choi <ryuan.choi@samsung.com>
2583 Unreviewed build fix on the EFL port after r167152
2585 * WebProcess/WebPage/PageOverlay.cpp:
2586 (WebKit::PageOverlay::bounds):
2588 2014-04-11 Hyowon Kim <hw1008.kim@samsung.com>
2590 [WK2] WebProcess crashes, when closing window after opening page by means of context menu
2591 https://bugs.webkit.org/show_bug.cgi?id=131439
2593 Reviewed by Tim Horton.
2595 CoordinatedGraphicsLayer calls notifyFlushRequired() through its client when destroyed.
2596 When PageOverlayController::notifyFlushRequired() is called, the DrawingArea could be null
2597 because it's destoryed in WebPage::close().
2599 * WebProcess/WebPage/PageOverlayController.cpp:
2600 (WebKit::PageOverlayController::notifyFlushRequired): Add null check of m_webPage->drawingArea().
2602 2014-04-11 Tim Horton <timothy_horton@apple.com>
2604 Lots of compositing test failures after r167152
2605 https://bugs.webkit.org/show_bug.cgi?id=131574
2607 Reviewed by Simon Fraser.
2609 * WebProcess/WebPage/PageOverlayController.h:
2610 Skip page overlay layers in layer tree dumps, for consistency between platforms.
2612 2014-04-11 Beth Dakin <bdakin@apple.com>
2614 Need WK2 API to disable rubber-banding
2615 https://bugs.webkit.org/show_bug.cgi?id=131567
2617 Reviewed by Simon Fraser.
2619 New API allows the client to enable/disable horizontal or vertical rubber-banding.
2620 By default, rubber-banding is enabled.
2621 * UIProcess/API/C/WKPage.cpp:
2622 (WKPageVerticalRubberBandingIsEnabled):
2623 (WKPageSetEnableVerticalRubberBanding):
2624 (WKPageHorizontalRubberBandingIsEnabled):
2625 (WKPageSetEnableHorizontalRubberBanding):
2626 * UIProcess/API/C/WKPage.h:
2627 * UIProcess/WebPageProxy.cpp:
2628 (WebKit::WebPageProxy::WebPageProxy):
2629 (WebKit::WebPageProxy::setEnableVerticalRubberBanding):
2630 (WebKit::WebPageProxy::verticalRubberBandingIsEnabled):
2631 (WebKit::WebPageProxy::setEnableHorizontalRubberBanding):
2632 (WebKit::WebPageProxy::horizontalRubberBandingIsEnabled):
2633 * UIProcess/WebPageProxy.h:
2634 * WebProcess/WebPage/WebPage.cpp:
2635 (WebKit::WebPage::setEnableVerticalRubberBanding):
2636 (WebKit::WebPage::setEnableHorizontalRubberBanding):
2637 * WebProcess/WebPage/WebPage.h:
2638 * WebProcess/WebPage/WebPage.messages.in:
2640 2014-04-11 Tim Horton <timothy_horton@apple.com>
2644 * WebProcess/WebPage/FindController.cpp:
2645 (WebKit::FindController::updateFindIndicator):
2647 2014-04-11 Tim Horton <timothy_horton@apple.com>
2649 [iOS WebKit2] Find-in-page indicator
2650 https://bugs.webkit.org/show_bug.cgi?id=131510
2651 <rdar://problem/16547777>
2653 Reviewed by Simon Fraser and Enrica Casucci.
2655 * WebKit2.xcodeproj/project.pbxproj:
2656 * WebProcess/WebPage/FindController.cpp:
2657 (WebKit::FindController::updateFindUIAfterPageScroll):
2658 WebKit2 will clear the selection if we reveal it while not enabling selection painting.
2659 So, avoid revealing it.
2661 (WebKit::FindController::findString):
2662 (WebKit::FindController::hideFindIndicator):
2663 (WebKit::FindController::willFindString):
2664 (WebKit::FindController::didFailToFindString):
2665 (WebKit::FindController::didHideFindIndicator):
2666 #if out the cross-platform find indicator code on iOS; it will be replaced
2667 by the code in FindControllerIOS.
2669 * WebProcess/WebPage/FindController.h:
2671 * WebProcess/WebPage/ios/FindControllerIOS.mm: Added.
2673 (WebKit::FindIndicatorOverlayClientIOS::drawRect):
2674 Paint the selection (with black text forced on), and the yellow rounded rect
2675 into the indicator page overlay.
2677 (WebKit::FindController::updateFindIndicator):
2678 Create or update a small document-relative page overlay in the selection rect.
2680 (WebKit::FindController::hideFindIndicator):
2681 (WebKit::FindController::willFindString):
2682 (WebKit::FindController::didFailToFindString):
2683 (WebKit::FindController::didHideFindIndicator):
2684 Add willFindString, didFailToFindString, and didHideFindIndicator functions.
2685 They do nothing, except on iOS where they are used to prevent selection change
2686 messages from being dispatched while using find-in-page, and to force
2687 WebCore to compute a selection rect (via updateAppearance) despite the selection not being painted.
2689 * WebProcess/WebPage/ios/FindIndicatorOverlayClientIOS.h:
2690 (WebKit::FindIndicatorOverlayClientIOS::setFrame):
2692 2014-04-11 Owen Taylor <otaylor@redhat.com>
2694 [GTK] Add HighDPI support for non-accelerated compositing contents
2695 https://bugs.webkit.org/show_bug.cgi?id=131562
2697 Reviewed by Martin Robinson.
2699 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2700 (scaleFactorChanged): Added this callback to pass scale changes to the page proxy.
2701 (webkitWebViewBaseCreateWebPage): Attach the callback to the notify signal.
2702 * UIProcess/cairo/BackingStoreCairo.cpp:
2703 (WebKit::createBackingStoreForGTK): Pass the scale factor to the WebCore backing store.
2704 (WebKit::BackingStore::incorporateUpdate): Ditto.
2706 2014-04-10 Jer Noble <jer.noble@apple.com>
2708 [WK2] Dispatch to main thread's run loop to handle cookie requests.
2709 https://bugs.webkit.org/show_bug.cgi?id=131524
2711 Reviewed by Brady Eidson.
2713 When using synchronous network APIs from the main thread (e.g., -[NSImage
2714 initWithContentsOfURL:]) our cookie shim would attempt to dispath_async
2715 to the main thread to handle the cookie request, and block against the original
2716 request. CFNetwork is still servicing the run loop however, so rather than
2717 dispatch_async to the main queue, use the RunLoop to dispatch to the main thread.
2719 * Shared/mac/CookieStorageShim.mm:
2720 (-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
2722 2014-04-11 Tim Horton <timothy_horton@apple.com>
2724 Make the stylebot happier with r167154.
2726 * UIProcess/PageClient.h:
2727 * UIProcess/WebPageProxy.h:
2728 * UIProcess/ios/PageClientImplIOS.h:
2730 2014-04-11 Tim Horton <timothy_horton@apple.com>
2732 [iOS WebKit2] Expose a simplified zoom-to-rect to the WebProcess
2733 https://bugs.webkit.org/show_bug.cgi?id=131563
2735 Reviewed by Simon Fraser.
2737 * UIProcess/PageClient.h:
2738 * UIProcess/WebPageProxy.h:
2739 * UIProcess/WebPageProxy.messages.in:
2740 * UIProcess/ios/PageClientImplIOS.h:
2741 * UIProcess/ios/PageClientImplIOS.mm:
2742 (WebKit::PageClientImpl::zoomToRect):
2743 * UIProcess/ios/WebPageProxyIOS.mm:
2744 (WebKit::WebPageProxy::zoomToRect):
2745 * WebProcess/WebPage/WebPage.h:
2746 * WebProcess/WebPage/ios/WebPageIOS.mm:
2747 (WebKit::WebPage::zoomToRect):
2748 Add a simple message that calls WKContentView's zoom-to-rect code given just a rect and min/max scale.
2749 We will use the center of the rect as the zoom origin, and will try to show the whole rect.
2751 2014-04-10 Jer Noble <jer.noble@apple.com>
2753 [iOS][WK2] Videos should animate into and out of fullscreen.
2754 https://bugs.webkit.org/show_bug.cgi?id=131497
2756 Reviewed by Simon Fraser.
2758 Pass a starting rect for the enterFullscreen animation and an ending rect
2759 for the exitFullscreen animation.
2761 * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
2762 * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
2763 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2764 (WebKit::WebVideoFullscreenManagerProxy::enterFullscreenWithID): Pass initialFrame.
2765 * WebProcess/ios/WebVideoFullscreenManager.mm:
2766 (WebKit::screenRectOfContents): Casts node -> element and returns its screenRect().
2767 (WebKit::WebVideoFullscreenManager::enterFullscreenForNode): Pass initialFrame.
2768 (WebKit::WebVideoFullscreenManager::exitFullscreenForNode): Pass finalFrame.
2770 2014-04-11 Tim Horton <timothy_horton@apple.com>
2772 Support document-relative and custom-frame page overlays
2773 https://bugs.webkit.org/show_bug.cgi?id=131560
2774 <rdar://problem/16595556>
2776 Reviewed by Simon Fraser.
2778 Add "document-relative" overlays, which attach to (and scroll with) the document,
2779 and can be given a frame rect within the document to avoid overallocation of backing store.
2781 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2782 (WebKit::WebFrameLoaderClient::didChangeScrollOffset):
2783 * WebProcess/WebPage/WebPage.cpp:
2784 (WebKit::WebPage::mainFrame):
2785 (WebKit::WebPage::mainFrameView):
2786 (WebKit::WebPage::didChangeScrollOffsetForFrame):
2787 * WebProcess/WebPage/WebPage.h:
2788 Let the PageOverlayController know *which* frame scrolled, instead of "any frame".
2790 * WebProcess/WebPage/FindController.cpp:
2791 (WebKit::FindController::updateFindUIAfterPageScroll):
2792 Factor out shared code.
2794 (WebKit::FindController::willMoveToWebPage):
2795 (WebKit::FindController::drawRect):
2796 We can use clearRect() instead of a transparency layer and fillRect().
2797 I've looked through all the other overlay clients I know of and none of them
2798 depend on having a transparency layer at the overlay level.
2800 * WebProcess/WebPage/PageOverlay.cpp:
2801 (WebKit::PageOverlay::create):
2802 (WebKit::PageOverlay::PageOverlay):
2803 (WebKit::PageOverlay::bounds):
2804 (WebKit::PageOverlay::frame):
2805 (WebKit::PageOverlay::setFrame):
2806 (WebKit::PageOverlay::drawRect):
2807 Add OverlayType, which allows creation of Document or View relative overlays.
2808 All overlays up to this point are View relative, so we default to that.
2809 Document-relative overlays scroll with the page instead of repainting as
2810 the page scrolls. They can also be given an explicit frame, allowing them
2811 to be smaller than the entire document.
2813 * WebProcess/WebPage/PageOverlay.h:
2814 (WebKit::PageOverlay::overlayType):
2815 (WebKit::PageOverlay::webPage):
2816 (WebKit::PageOverlay::client): Deleted.
2817 * WebProcess/WebPage/PageOverlayController.cpp:
2818 (WebKit::PageOverlayController::initialize):
2819 (WebKit::PageOverlayController::installPageOverlay):
2820 (WebKit::PageOverlayController::uninstallPageOverlay):
2821 (WebKit::PageOverlayController::updateForceSynchronousScrollLayerPositionUpdates):
2822 (WebKit::updateOverlayGeometry):
2823 (WebKit::PageOverlayController::setPageOverlayNeedsDisplay):
2824 (WebKit::PageOverlayController::didChangeViewSize):
2825 (WebKit::PageOverlayController::didChangeDocumentSize):
2826 (WebKit::PageOverlayController::didChangeDeviceScaleFactor):
2827 (WebKit::PageOverlayController::didScrollFrame):
2828 (WebKit::PageOverlayController::flushPageOverlayLayers):
2829 (WebKit::PageOverlayController::didChangeOverlayFrame):
2830 Keep two overlay root layers - one for view-relative
2831 and one for document-relative overlays.
2832 Don't force synchronous scrolling if we only have document-relative overlays.
2833 Update the overlay's position as well as its size whenever necessary.
2834 Update document-relative overlay geometry when the document size changes.
2835 Only explicitly flush view-relative overlays; document-relative ones
2836 are plugged into the WebCore layer tree and flushed along with the page.
2838 * WebProcess/WebPage/PageOverlayController.h:
2839 (WebKit::PageOverlayController::documentOverlayRootLayer):
2840 (WebKit::PageOverlayController::viewOverlayRootLayer):
2841 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2842 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2843 (WebKit::RemoteLayerTreeDrawingArea::setRootCompositingLayer):
2844 (WebKit::RemoteLayerTreeDrawingArea::mainFrameContentSizeChanged):
2845 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2846 (WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged):
2847 (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
2848 Let the PageOverlay controller know when the document size changes.
2849 When we set up compositing, push the document overlay root layer
2852 2014-04-11 Pratik Solanki <psolanki@apple.com>
2854 [iOS WebKit2]: Share NSURLCache directory for webkit processes
2855 https://bugs.webkit.org/show_bug.cgi?id=131513
2856 <rdar://problem/16420859>
2858 Reviewed by Alexey Proskuryakov.
2860 Use iOS specific NSURLCache API to share the cache directory used by the networking process,
2861 web process and Safari.
2863 * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2864 (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
2865 * WebProcess/cocoa/WebProcessCocoa.mm:
2866 (WebKit::WebProcess::platformInitializeWebProcess):
2868 2014-04-11 Alexey Proskuryakov <ap@apple.com>
2870 [Mac] Add IconServices to WebProcess sandbox profile
2871 https://bugs.webkit.org/show_bug.cgi?id=131558
2872 <rdar://problem/16552397>
2874 Reviewed by Brady Eidson.
2876 * WebProcess/com.apple.WebProcess.sb.in:
2878 2014-04-11 Antti Koivisto <antti@apple.com>
2880 Pipe initial scale factor to TileController
2881 https://bugs.webkit.org/show_bug.cgi?id=131521
2883 Reviewed by Tim Horton.
2885 * WebProcess/WebPage/ios/WebPageIOS.mm:
2886 (WebKit::WebPage::viewportConfigurationChanged):
2888 2014-04-10 Chris Fleizach <cfleizach@apple.com>
2890 AX: WebProcess at com.apple.WebCore: WebCore::AXObjectCache::rootObject + 18
2891 https://bugs.webkit.org/show_bug.cgi?id=131522
2893 Reviewed by Anders Carlsson.
2895 Protect against documents that have had their render tree destroyed, and no longer return a valid cache.
2897 * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
2899 2014-04-11 Brent Fulgham <bfulgham@apple.com>
2901 [Mac] Prevent crash when exiting fullscreen mode
2902 https://bugs.webkit.org/show_bug.cgi?id=131528
2904 Reviewed by Jer Noble.
2906 * UIProcess/mac/WKFullScreenWindowController.mm:
2907 (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
2908 Clean up the _scaleAnimation controller, not just the _fadeAnimation controller.
2909 (-[WKFullScreenWindowController close]): If we are doing an immediate
2910 close of the view, we need to stop animations so we avoid any
2911 final timer events from interacting with invalid window handles.
2913 2014-04-11 Carlos Garcia Campos <cgarcia@igalia.com>
2915 wk2-gtk does not display anything
2916 https://bugs.webkit.org/show_bug.cgi?id=125558
2918 Reviewed by Martin Robinson.
2920 Remove fcntl call to set access mode flags on the duplicated files
2921 descriptor. Those flags are ignored in Linux and make fcntl to
2922 fail in FreeBSD. We should handle the case where the passed
2923 protection is ReadOnly.
2924 Thanks to Raphael Kubo da Costa who proposed the solution.
2926 * Platform/unix/SharedMemoryUnix.cpp:
2927 (WebKit::SharedMemory::createHandle):
2928 (WebKit::accessModeFile): Deleted.
2930 2014-04-11 Zan Dobersek <zdobersek@igalia.com>
2932 [GTK][WK2] Move Vector objects into WebEditorClient::executePendingEditorCommands() invocations
2933 https://bugs.webkit.org/show_bug.cgi?id=131454
2935 Reviewed by Carlos Garcia Campos.
2937 * WebProcess/WebCoreSupport/WebEditorClient.h:
2938 * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
2939 (WebKit::WebEditorClient::executePendingEditorCommands): Take a const reference of the Vector
2940 object to avoid unnecessary copies. Also deploy two range-based for loops and efficiently move
2941 the Editor::Command objects into the other Vector.
2943 2014-04-10 Dan Bernstein <mitz@apple.com>
2945 <rdar://problem/16582465> [Cocoa] Avoid casts from CF types to unrelated Objective-C types
2946 https://bugs.webkit.org/show_bug.cgi?id=131529
2948 Reviewed by Mark Rowe.
2950 * Shared/API/c/cf/WKStringCF.mm:
2951 (WKStringCreateWithCFString): Cast the CFStringRef into its toll-free-bridged counterpart,
2952 NSString, then cast the NSString into a WKNSString.
2953 * Shared/API/c/cf/WKURLCF.mm:
2954 (WKURLCreateWithCFURL): Cast the CFURLRef into its toll-free-bridged counterpart, NSURL,
2955 then cast the NSURL into a WKNSURL.
2957 2014-04-10 Dan Bernstein <mitz@apple.com>
2959 BundlePageDiagnosticLoggingClient leaks every string passing through it.
2960 https://bugs.webkit.org/show_bug.cgi?id=130140
2962 Reviewed by Brent Fulgham.
2964 * WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp:
2965 (WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessage): Don’t copy the
2966 strings passed into the bundle client.
2968 2014-04-10 Benjamin Poulain <bpoulain@apple.com>
2970 Try to fix the debug bots after r167102
2972 * WebProcess/cocoa/WebProcessCocoa.mm:
2973 (WebKit::WebProcess::platformInitializeWebProcess):
2975 2014-04-10 Gavin Barraclough <barraclough@apple.com>
2977 Add user default for FTL JIT
2978 https://bugs.webkit.org/show_bug.cgi?id=131520
2980 Reviewed by Benjamin Poulain.
2982 * Shared/WebProcessCreationParameters.cpp:
2983 (WebKit::WebProcessCreationParameters::decode):
2984 * UIProcess/mac/WebContextMac.mm:
2985 (WebKit::registerUserDefaultsIfNeeded):
2986 (WebKit::WebContext::platformInitializeWebProcess):
2989 2014-04-10 Gavin Barraclough <barraclough@apple.com>
2991 Add user default for FTL JIT
2992 https://bugs.webkit.org/show_bug.cgi?id=131520
2994 Reviewed by Benjamin Poulain.
2996 * Shared/WebProcessCreationParameters.cpp:
2997 (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
2998 (WebKit::WebProcessCreationParameters::encode):
2999 (WebKit::WebProcessCreationParameters::decode):
3000 * Shared/WebProcessCreationParameters.h:
3001 - pass setting to WebContent process.
3002 * UIProcess/mac/WebContextMac.mm:
3003 (WebKit::registerUserDefaultsIfNeeded):
3004 (WebKit::WebContext::platformInitializeWebProcess):
3005 - read user default.
3006 * WebProcess/cocoa/WebProcessCocoa.mm:
3007 (WebKit::WebProcess::platformInitializeWebProcess):
3010 2014-04-10 Dan Bernstein <mitz@apple.com>
3012 [Cocoa] Notify the form delegate when the custom button in the form accessory view is tapped
3013 https://bugs.webkit.org/show_bug.cgi?id=131518
3015 Reviewed by Tim Horton.
3017 * UIProcess/API/Cocoa/_WKFormDelegate.h: Declared new delegate method.
3018 * UIProcess/ios/WKContentViewInteraction.mm:
3019 (-[WKContentView accessoryAutoFill]): Call the new delegate method.
3021 2014-04-10 Commit Queue <commit-queue@webkit.org>
3023 Unreviewed, rolling out r167097.
3024 https://bugs.webkit.org/show_bug.cgi?id=131519
3026 there was already a mechanism for this, and this was
3027 incomplete anyway (Requested by thorton on #webkit).
3031 "[iOS WebKit2] Disable the find overlay for now"
3032 https://bugs.webkit.org/show_bug.cgi?id=131509
3033 http://trac.webkit.org/changeset/167097
3035 2014-04-10 Tim Horton <timothy_horton@apple.com>
3037 [iOS WebKit2] Disable the find overlay for now
3038 https://bugs.webkit.org/show_bug.cgi?id=131509
3040 Reviewed by Adele Peterson.
3042 * Shared/WebPreferencesStore.h:
3043 * WebProcess/WebPage/FindController.cpp:
3044 (WebKit::FindController::FindController):
3045 (WebKit::FindController::hideFindOverlay):
3046 (WebKit::FindController::hideFindUI):
3047 (WebKit::FindController::setShouldShowOverlay):
3048 * WebProcess/WebPage/FindController.h:
3049 * WebProcess/WebPage/WebPage.cpp:
3050 (WebKit::WebPage::updatePreferences):
3051 Add a setting allowing us to turn off the find-in-page overlay on iOS.
3053 2014-04-10 Sergio Villar Senin <svillar@igalia.com>
3055 Unreviewed GTK build fix after r167074.
3057 This involves replacing resetDragSession() by
3058 resetCurrentDragInformation() and dragSession().operation by
3059 currentDragOperation().
3061 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3062 (webkitWebViewBaseDragDataReceived):
3063 (webkitWebViewBaseDragMotion):
3064 (dragExitedCallback):
3066 2014-04-10 Owen Taylor <otaylor@redhat.com>
3068 [Cairo] Implement ShareableBitmap::paint() with scale factor
3069 https://bugs.webkit.org/show_bug.cgi?id=64665
3071 Reviewed by Martin Robinson.
3073 * Shared/cairo/ShareableBitmapCairo.cpp (WebKit::ShareableBitmap::paint):
3075 2014-04-10 Enrica Casucci <enrica@apple.com>
3077 [iOS WebKit2] Support phraseboundary gesture recognizer for CJK.
3078 https://bugs.webkit.org/show_bug.cgi?id=131493
3079 <rdar://problem/16319583>
3081 Reviewed by Benjamin Poulain.
3083 On iOS it is possible with a gesture to change the selection
3084 within the marked text.
3085 Changing the selection triggers also the update of the inline candidates
3086 over the keyboard area.
3087 The patch adds the logic to decide whether the gesture can begin
3088 as well as the code for the movement of
3089 the selection within the marked range.
3090 The gesture is allowed to start within a given radius from the marked
3093 * Shared/InteractionInformationAtPosition.cpp:
3094 (WebKit::InteractionInformationAtPosition::encode):
3095 (WebKit::InteractionInformationAtPosition::decode):
3096 * Shared/InteractionInformationAtPosition.h:
3097 (WebKit::InteractionInformationAtPosition::InteractionInformationAtPosition):
3098 * Shared/ios/GestureTypes.h:
3099 * UIProcess/WebPageProxy.cpp:
3100 (WebKit::WebPageProxy::editorStateChanged):
3101 * UIProcess/ios/WKContentViewInteraction.mm:
3102 (-[WKContentView pointIsNearMarkedText:]):
3104 (toUIWKGestureType):
3105 * WebProcess/WebPage/ios/WebPageIOS.mm:
3106 (WebKit::WebPage::selectWithGesture):
3107 (WebKit::WebPage::getPositionInformation):
3109 2014-04-10 Enrica Casucci <enrica@apple.com>
3111 Unreviewed iOS build fix after http://trac.webkit.org/changeset/167074
3113 * UIProcess/WebPageProxy.cpp:
3114 (WebKit::WebPageProxy::WebPageProxy):
3116 2014-04-10 Alexey Proskuryakov <ap@apple.com>
3120 * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::performDragControllerAction):
3122 2014-04-09 Alexey Proskuryakov <ap@apple.com>
3124 Eliminate DragSession structure
3125 https://bugs.webkit.org/show_bug.cgi?id=131465
3127 Reviewed by Benjamin Poulain.
3129 * Scripts/webkit2/messages.py:
3131 * Shared/WebCoreArgumentCoders.cpp:
3132 (IPC::ArgumentCoder<DragSession>::encode): Deleted.
3133 (IPC::ArgumentCoder<DragSession>::decode): Deleted.
3134 * Shared/WebCoreArgumentCoders.h:
3135 * UIProcess/API/mac/WKView.mm:
3136 (-[WKView draggingEntered:]):
3137 (-[WKView draggingUpdated:]):
3138 * UIProcess/WebPageProxy.cpp:
3139 (WebKit::WebPageProxy::WebPageProxy):
3140 (WebKit::WebPageProxy::didPerformDragControllerAction):
3141 * UIProcess/WebPageProxy.h:
3142 (WebKit::WebPageProxy::currentDragOperation):
3143 (WebKit::WebPageProxy::currentDragIsOverFileInput):
3144 (WebKit::WebPageProxy::currentDragNumberOfFilesToBeAccepted):
3145 (WebKit::WebPageProxy::resetCurrentDragInformation):
3146 (WebKit::WebPageProxy::dragSession): Deleted.
3147 (WebKit::WebPageProxy::resetDragSession): Deleted.
3148 * UIProcess/WebPageProxy.messages.in:
3149 * WebProcess/WebPage/WebPage.cpp:
3150 (WebKit::WebPage::performDragControllerAction):
3152 2014-04-10 Martin Robinson <mrobinson@igalia.com>
3154 [GTK] LayerTreeHostGtk is creating a software scene graph
3155 https://bugs.webkit.org/show_bug.cgi?id=131471
3157 Reviewed by Sergio Villar Senin.
3159 At some point, a regression was introduced that sent the GTK+ WebKit2 scenegraph down the
3160 software route. The rest of the file depends on the fact that the TextureMapper is the OpenGL
3161 variety, so we should force that explicitly. This is causing crashes locally and soon we
3162 should be able to test this directly.
3164 * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
3165 (WebKit::LayerTreeHostGtk::initialize): Force the use of the OpenGL scenegraph.
3167 2014-04-09 Jeremy Jones <jeremyj@apple.com>
3169 Fix build failure when #if USE(XPC_SERVICES) is false.
3170 https://bugs.webkit.org/show_bug.cgi?id=131474
3172 Reviewed by Dan Bernstein.
3176 * UIProcess/ios/WebProcessProxyIOS.mm:
3177 Add #if around BackgroundTabFlags ForegroundTabFlags to prevent unused variable error.
3179 2014-04-09 Ryuan Choi <ryuan.choi@samsung.com>
3181 [EFL][WK2] Add API to set preferred languages
3182 https://bugs.webkit.org/show_bug.cgi?id=131435
3184 Reviewed by Gyuyoung Kim.
3186 Add ewk_context_preferred_languages_set to change the list of "Accept-Language".
3187 This list is used to receive alternative version of contents, which is related
3188 to specified languages from the contents provider.
3190 * UIProcess/API/efl/ewk_context.cpp:
3191 (ewk_context_preferred_languages_set):
3192 * UIProcess/API/efl/ewk_context.h:
3193 * UIProcess/API/efl/tests/test_ewk2_context.cpp:
3195 (TEST_F): Added test case for ewk_context_preferred_languages_set
3197 2014-04-09 Benjamin Poulain <bpoulain@apple.com>
3199 [iOS][WK2] Add the initial WebProcess handling of animated resize for rotation
3200 https://bugs.webkit.org/show_bug.cgi?id=131469
3202 Reviewed by Tim Horton.
3204 Add the basic handling of dynamic resize from the WebProcess.
3206 On animated resize, the UIProcess decides new target rects and scale. The information
3207 is then passed to the WebProcess to update the content.
3209 For various reason, the target rects and scale computed by the UIProcess can be incorrect
3210 (for example, if viewport constraints limit the scale).
3212 In those cases, the WebProcess has all the information to compute a better target. This patch
3213 adds such a basic update mechanism.
3215 Once the new values are computed, they are sent back to the UIProcess. If the rotation animation
3216 is still ongoing, we do not want mess with it. What we do is set a temporary transform on the subviews
3217 and restore the real value after the animation. The key is to have the two matrix multiplying to the end
3218 value so that there is no visual difference.
3220 * UIProcess/API/Cocoa/WKWebView.mm:
3221 (-[WKWebView _didCommitLayerTree:WebKit::]):
3222 (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:]):
3223 (setViewportConfigurationMinimumLayoutSize):
3224 (-[WKWebView _frameOrBoundsChanged]):
3225 (-[WKWebView _setMinimumLayoutSizeOverride:]):
3226 (-[WKWebView _beginAnimatedResizeToSize:obscuredInsets:minimumLayoutSizeOverride:]):
3227 (-[WKWebView _endAnimatedResize]):
3228 * UIProcess/API/Cocoa/WKWebViewInternal.h:
3229 * UIProcess/API/ios/WKViewIOS.mm:
3230 (-[WKView _frameOrBoundsChanged]):
3231 (-[WKView setMinimumLayoutSizeOverride:]):
3232 * UIProcess/PageClient.h:
3233 * UIProcess/WebPageProxy.h:
3234 * UIProcess/WebPageProxy.messages.in:
3235 * UIProcess/ios/PageClientImplIOS.h:
3236 * UIProcess/ios/PageClientImplIOS.mm:
3237 (WebKit::PageClientImpl::dynamicViewportUpdateChangedTarget):
3238 * UIProcess/ios/WKContentView.h:
3239 * UIProcess/ios/WKContentView.mm:
3240 (-[WKContentView setMinimumLayoutSize:]): Deleted.
3241 * UIProcess/ios/WebPageProxyIOS.mm:
3242 (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
3243 (WebKit::WebPageProxy::dynamicViewportUpdateChangedTarget):
3244 * WebProcess/WebPage/WebPage.h:
3245 * WebProcess/WebPage/WebPage.messages.in:
3246 * WebProcess/WebPage/ios/WebPageIOS.mm:
3247 (WebKit::WebPage::dynamicViewportSizeUpdate):
3249 2014-04-09 Martin Robinson <mrobinson@igalia.com>
3251 Try to fix the GTK+ build after resetDragOperation rename
3253 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3254 (webkitWebViewBaseDragDataReceived): Rename resetDragOperation to resetDragSession.
3255 (dragExitedCallback): Ditto.
3257 2014-04-09 Jeremy Jones <jeremyj@apple.com>
3259 Enable fullscreen captions selection
3260 https://bugs.webkit.org/show_bug.cgi?id=131069
3262 Reviewed by Eric Carlson.
3264 Enable media selection in fullscreen.
3265 setLegibleMediaSelectionOptions/setAudioMediaSelectionOptions provide a list of options.
3266 selectAudioMediaOption/selectLegibleMediaOption change the selected option.
3268 * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
3269 Add selectAudioMediaOption/selectLegibleMediaOption
3271 * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
3272 Add selectAudioMediaOption/selectLegibleMediaOption
3274 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
3275 (WebKit::WebVideoFullscreenManagerProxy::selectAudioMediaOption):
3276 Add selectAudioMediaOption
3278 (WebKit::WebVideoFullscreenManagerProxy::selectLegibleMediaOption):
3279 Add selectLegibleMediaOption
3281 * WebProcess/ios/WebVideoFullscreenManager.h:
3282 Add setAudioMediaSelectionOptions/setLegibleMediaSelectionOptions
3284 * WebProcess/ios/WebVideoFullscreenManager.messages.in:
3285 Add setAudioMediaSelectionOptions/setLegibleMediaSelectionOptions
3287 * WebProcess/ios/WebVideoFullscreenManager.mm:
3288 (WebKit::WebVideoFullscreenManager::setAudioMediaSelectionOptions):
3289 Add setAudioMediaSelectionOptions
3291 (WebKit::WebVideoFullscreenManager::setLegibleMediaSelectionOptions):
3292 Add setLegibleMediaSelectionOptions
3294 2014-04-09 Alexey Proskuryakov <ap@apple.com>
3296 Rename some dragging functions
3297 https://bugs.webkit.org/show_bug.cgi?id=131460
3299 Reviewed by Tim Horton.
3301 Renamed performDrag to performDragOperation.
3303 Also renamed resetDragOperation to resetDragSession, because it's m_dragSession
3306 * Shared/DragControllerAction.h:
3307 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3308 (webkitWebViewBaseDragDrop):
3309 * UIProcess/API/mac/WKView.mm:
3310 (-[WKView draggingEntered:]):
3311 (-[WKView draggingExited:]):
3312 (-[WKView performDragOperation:]):
3313 * UIProcess/WebPageProxy.cpp:
3314 (WebKit::WebPageProxy::performDragOperation):
3315 (WebKit::WebPageProxy::performDrag): Deleted.
3316 * UIProcess/WebPageProxy.h:
3317 (WebKit::WebPageProxy::resetDragSession):
3318 (WebKit::WebPageProxy::resetDragOperation): Deleted.
3319 * WebProcess/WebPage/WebPage.cpp:
3320 (WebKit::WebPage::performDragControllerAction):
3322 2014-04-09 Gavin Barraclough <baraclough@apple.com>
3324 Update SPI for managing tabs
3325 https://bugs.webkit.org/show_bug.cgi?id=131453
3327 Reviewed by Alexey Proskuryakov.
3329 * Configurations/WebKit2.xcconfig:
3330 - added AssertionServices
3331 * UIProcess/WebProcessProxy.h:
3332 - added m_assertion, m_assertionState.
3333 * UIProcess/ios/WebProcessProxyIOS.mm:
3334 (WebKit::WebProcessProxy::updateProcessState):
3335 - create BKSProcessAssertion to take an assertion.
3337 2014-04-09 Enrica Casucci <enrica@apple.com>
3339 WK2: Dictated words disappear after being inserted.
3340 https://bugs.webkit.org/show_bug.cgi?id=131458
3341 <rdar://problem/16395011>
3343 Reviewed by Benjamin Poulain.
3345 The dictation engine treats selected text as text to be
3346 removed. We need to ensure that the range selected to insert the
3347 new text isn't reflected in the UI process until we are done
3350 * WebProcess/WebPage/ios/WebPageIOS.mm:
3351 (WebKit::WebPage::replaceDictatedText):
3353 2014-04-09 Brady Eidson <beidson@apple.com>
3355 Don't offer "contact" actions in telephone number menus
3356 <rdar://problem/16556907> and https://bugs.webkit.org/show_bug.cgi?id=131451
3358 Reviewed by Tim Horton.
3360 * UIProcess/mac/WebPageProxyMac.mm:
3361 (WebKit::WebPageProxy::showTelephoneNumberMenu): Skip actions that have to do with contacts,
3362 and skip separators too!
3364 2014-04-09 Carlos Garcia Campos <cgarcia@igalia.com>
3366 Unreviewed. Fix GTK+ build after r166975.
3368 Do not use WebPage removed API to fix the build. Page overlays are
3369 no broken, see https://bugs.webkit.org/show_bug.cgi?id=131433.
3371 * WebProcess/WebPage/DrawingAreaImpl.cpp:
3372 (WebKit::DrawingAreaImpl::display):
3373 * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
3374 (WebKit::LayerTreeHostGtk::initialize):
3375 (WebKit::LayerTreeHostGtk::paintContents):
3377 2014-04-09 Carlos Garcia Campos <cgarcia@igalia.com>
3379 Unreviewed. Fix GTK+ build after r166965.
3381 * WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
3382 (WebKit::WebDragClient::startDrag): Rename Clipboard to DataTransfer.
3384 2014-04-08 Hyowon Kim <hw1008.kim@samsung.com>
3386 Fix EFL Build errors since r166975.
3387 https://bugs.webkit.org/show_bug.cgi?id=131421
3389 Reviewed by Gyuyoung Kim.
3391 This patch is just for fixing EFL build errors.
3392 The page overlay functionality is not working yet.
3395 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
3396 (WebKit::CoordinatedDrawingArea::display):
3397 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
3398 (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
3399 (WebKit::CoordinatedLayerTreeHost::paintLayerContents):
3400 * WebProcess/WebPage/PageOverlayController.cpp:
3401 * WebProcess/WebPage/TapHighlightController.cpp:
3402 (WebKit::TapHighlightController::hideHighlight):
3404 2014-04-08 Jon Lee <jonlee@apple.com>
3406 Turn MSE on by default
3407 https://bugs.webkit.org/show_bug.cgi?id=131313
3408 <rdar://problem/16525223>
3410 Reviewed by Jer Noble.
3412 * Configurations/FeatureDefines.xcconfig:
3413 * Shared/WebPreferencesStore.h: Set default to true.
3414 * UIProcess/API/C/WKPreferencesRefPrivate.h:
3416 2014-04-08 Ryosuke Niwa <rniwa@webkit.org>
3418 Fix the typo in the previous commit.
3420 * WebProcess/WebPage/WebPage.cpp:
3421 (WebKit::WebPage::close):
3423 2014-04-08 Ryosuke Niwa <rniwa@webkit.org>
3425 REGRESSION(r 166890): Crash inside WebKit::WebEditorClient::textFieldDidEndEditing
3426 https://bugs.webkit.org/show_bug.cgi?id=131409
3428 Reviewed by Anders Carlsson.
3430 Create an empty API::InjectedBundle::FormClient to avoid crashing inside
3431 m_mainFrame->coreFrame()->loader().detachFromParent().
3433 * WebProcess/WebPage/WebPage.cpp:
3434 (WebKit::WebPage::close):
3436 2014-04-08 Tim Horton <timothy_horton@apple.com>
3438 Unify and factor out page overlay implementations
3439 https://bugs.webkit.org/show_bug.cgi?id=131353
3441 Reviewed by Anders Carlsson.
3443 * WebProcess/WebPage/PageOverlayController.cpp:
3444 (WebKit::PageOverlayController::uninstallPageOverlay):
3445 Don't turn fast scrolling back off unless the last overlay is removed.
3447 2014-04-08 Anders Carlsson <andersca@apple.com>
3449 Add a WKNavigationAction property indicating whether it resulted from processing a user gesture
3450 https://bugs.webkit.org/show_bug.cgi?id=131405
3451 <rdar://problem/16535453>
3453 Reviewed by Tim Horton.
3455 * Shared/NavigationActionData.cpp:
3456 (WebKit::NavigationActionData::NavigationActionData):
3457 (WebKit::NavigationActionData::encode):
3458 (WebKit::NavigationActionData::decode):
3459 * Shared/NavigationActionData.h:
3460 * UIProcess/API/Cocoa/WKNavigationActionInternal.h:
3461 * UIProcess/API/Cocoa/WKNavigationActionPrivate.h:
3462 * UIProcess/Cocoa/NavigationState.mm:
3463 (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
3464 * UIProcess/Cocoa/UIDelegate.mm:
3465 (WebKit::UIDelegate::UIClient::createNewPage):
3466 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3467 (WebKit::WebChromeClient::createWindow):
3468 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3469 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
3470 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
3472 2014-04-08 Tim Horton <timothy_horton@apple.com>
3474 Unify and factor out page overlay implementations
3475 https://bugs.webkit.org/show_bug.cgi?id=131353
3477 Reviewed by Anders Carlsson.
3479 Bring all of the PageOverlay code together in a single cross-platform
3480 PageOverlayController, including hit-testing code from WebPage and painting
3481 and layer-tree manipulation code from the DrawingArea.
3483 This also makes all PageOverlays a single GraphicsLayer tree which can be
3484 flushed and plugged into any DrawingArea in a straightforward manner.
3485 We no longer have to watch for individual layers flipping into/out of tiling,
3486 because they're hidden underneath the root PageOverlay GraphicsLayer.
3487 Additionally, because GraphicsLayer is cross-platform, we can share