1 2014-05-03 Simon Fraser <simon.fraser@apple.com>
3 [UI-side compositing] Assertion in PlatformCAFilters::setFiltersOnLayer with animated reference filter
4 https://bugs.webkit.org/show_bug.cgi?id=132528
5 <rdar://problem/16671660>
7 Reviewed by Tim Horton.
9 Allow PASSTHROUGH filters to be encoded and sent to the UI process; they can be set
10 on layers as the result of a filter animation using a reference filter, and just get
11 ignored anyway, but encoding them maintains consistency of the filters list.
13 * Shared/WebCoreArgumentCoders.cpp:
14 (IPC::ArgumentCoder<FilterOperation>::encode): Assert during encoding if
15 we try to encode a NONE or REFERENCE filter (to match the decoding assertions).
16 (IPC::decodeFilterOperation): Allow decoding of PASSTHROUGH filters. Have
17 trying to decode a NONE or REFERENCE filter mark the message as invalid.
18 (IPC::ArgumentCoder<IDBKeyData>::decode): Mark the message invalid when receiving
20 * Shared/mac/RemoteLayerTreeTransaction.mm:
21 (WebKit::RemoteLayerTreeTextStream::operator<<): Have the logging not crash if
22 a filter is null (should never happen).
24 2014-05-02 Dan Bernstein <mitz@apple.com>
26 [Cocoa] Remove unused WKErrorRecoveryAttempting
27 https://bugs.webkit.org/show_bug.cgi?id=132503
29 Reviewed by Anders Carlsson.
31 * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
32 (didFailProvisionalLoadWithErrorForFrame):
33 (didFailLoadWithErrorForFrame):
34 (createErrorWithRecoveryAttempter): Deleted.
35 (-[WKBrowsingContextController attemptRecoveryFromError:]): Deleted.
36 * UIProcess/API/Cocoa/WKErrorRecoveryAttempting.m: Removed.
37 * UIProcess/API/Cocoa/_WKFormDelegate.h:
38 * WebKit2.xcodeproj/project.pbxproj:
40 2014-05-02 Enrica Casucci <enrica@apple.com>
42 REGRESSION (WebKit2) Need to support reanalyze button for Chinese Traditional.
43 https://bugs.webkit.org/show_bug.cgi?id=132504
44 <rdar://problem/16778862>
46 Reviewed by Benjamin Poulain.
48 For traditional Chinese we support reanalyzing of the text to perform
49 transformations on the text based on the selected language and keyboard.
50 This is done by pressing the Reanalyze button on the system
51 menu. This patch adds the necessary code to canPerformAction to enable
52 the button when appropriate as well as the implementation of the action
55 * UIProcess/ios/WKContentViewInteraction.mm:
56 (-[WKContentView _reanalyze:]):
57 (-[WKContentView canPerformAction:withSender:]):
59 2014-05-02 Enrica Casucci <enrica@apple.com>
61 REGRESSION (WebKit2) Need to support transliterate chinese button (简⇄繁) for Traditional Chinese.
62 https://bugs.webkit.org/show_bug.cgi?id=132500
63 <rdar://problem/16778870>
65 Reviewed by Benjamin Poulain.
67 For traditional Chinese we support the transliterate to simplified Chinese.
68 This is done by pressing the 简⇄繁 button on the system
69 menu. This patch adds the necessary code to canPerformAction to enable
70 the button when appropriate as well as the implementation of the action
73 * UIProcess/ios/WKContentViewInteraction.mm:
74 (-[WKContentView _transliterateChinese:]):
75 (-[WKContentView canPerformAction:withSender:]):
77 2014-05-02 Jeremy Jones <jeremyj@apple.com>
79 Fullscreen UI does not appear after WebProcess has crashed
80 https://bugs.webkit.org/show_bug.cgi?id=132442
82 Reviewed by Darin Adler.
84 Cleanup WebVideoFullscreenManagerProxy after a WebProcess crash.
86 * UIProcess/WebPageProxy.cpp:
87 (WebKit::WebPageProxy::reattachToWebProcess):
88 recreate WebVideoFullscreenManagerProxy after a WebProcess crash.
90 (WebKit::WebPageProxy::resetState):
91 invalidate and release WebVideoFullscreenManagerProxy on crash.
93 * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
94 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
95 (WebKit::WebVideoFullscreenManagerProxy::~WebVideoFullscreenManagerProxy):
96 don't assume m_page is valid.
98 (WebKit::WebVideoFullscreenManagerProxy::invalidate):
99 do cleanup invalidation in reponse to a WebProcess crash.
101 2014-05-02 Benjamin Poulain <bpoulain@apple.com>
103 [iOS][WK2] More animation madness for when the extendedBackground is modified in an animation block
104 https://bugs.webkit.org/show_bug.cgi?id=132497
106 Reviewed by Beth Dakin.
108 * UIProcess/API/Cocoa/WKWebView.mm:
109 (updateTopAndBottomExtendedBackgroundExclusionIfNecessary):
110 Do not early return when _extendedBackgroundExclusionInsets.left is empty. That way, if executed in an animation block,
111 the top of bottom view will animate from their current size to an empty width.
113 When creating the layer, set up their height without animation. Otherwise it is possible to see the height animating
114 while the left inset is animating.
116 (-[WKWebView _setExtendedBackgroundExclusionInsets:]):
117 When replacing the scrollview, make sure the frame and color are not animated. Otherwise the transition between
118 scrollView and _mainExtendedBackgroundView can be visible if _setExtendedBackgroundExclusionInsets: is invoked
119 in an animation block.
121 (-[WKWebView _endAnimatedResize]):
122 Nuke the top and bottom insets when possible. [WKWebView _endAnimatedResize] is unfrequent, so it is a good opportunity
125 2014-05-02 Alexey Proskuryakov <ap@apple.com>
127 Remove Blob contentDisposition handling
128 https://bugs.webkit.org/show_bug.cgi?id=132490
130 Reviewed by Sam Weinig.
132 * Shared/FileAPI/BlobRegistrationData.cpp:
133 (WebKit::BlobRegistrationData::encode):
134 (WebKit::BlobRegistrationData::decode):
136 2014-05-02 Benjamin Poulain <benjamin@webkit.org>
138 [iOS][WK2] Adapt the rubberband constraints when the page get smaller than the scrollview - insets
139 https://bugs.webkit.org/show_bug.cgi?id=132457
141 Reviewed by Enrica Casucci.
143 It is quite common for us to have a WKContentView that is scalled smaller than the WKWebView, content
146 In those cases, update the constraints to fit the content properly in the view.
148 * UIProcess/ios/WKScrollView.mm:
149 (valuesAreWithinOnePixel):
150 (-[WKScrollView _rubberBandOffsetForOffset:maxOffset:minOffset:range:outside:]):
152 2014-05-02 Mark Rowe <mrowe@apple.com>
154 -[_WKThumbnailView _requestSnapshotIfNeeded] assumes that taking a snapshot will always succeed
155 <https://webkit.org/b/132489> / <rdar://problem/16704660>
157 Reviewed by Tim Horton.
159 * UIProcess/API/Cocoa/_WKThumbnailView.mm:
160 (-[_WKThumbnailView _requestSnapshotIfNeeded]): Don't attempt to create a CGImageRef if we failed
161 to create a ShareableBitmap. This handles both the callback receiving a null Handle and a failure
162 within ShareableBitmap::create.
164 2014-05-02 Anders Carlsson <andersca@apple.com>
166 Clean up FormDataElement
167 https://bugs.webkit.org/show_bug.cgi?id=132483
169 Reviewed by Sam Weinig.
171 * NetworkProcess/NetworkResourceLoader.cpp:
172 (WebKit::NetworkResourceLoader::NetworkResourceLoader):
173 * Shared/Network/NetworkResourceLoadParameters.cpp:
174 (WebKit::NetworkResourceLoadParameters::encode):
176 2014-05-02 Anders Carlsson <andersca@apple.com>
178 Add and implement KeyedDecoder::decodeBytes
179 https://bugs.webkit.org/show_bug.cgi?id=132479
181 Reviewed by Tim Horton.
183 * Shared/cf/KeyedDecoder.cpp:
184 (WebKit::KeyedDecoder::decodeBytes):
185 * Shared/cf/KeyedDecoder.h:
187 2014-05-02 Joseph Pecoraro <pecoraro@apple.com>
189 [iOS] WebKit2 File Upload Support
190 https://bugs.webkit.org/show_bug.cgi?id=132024
192 Reviewed by Enrica Casucci.
194 * Configurations/WebKit2.xcconfig:
195 Include MobileCoreServices on iOS for kUTTypeImage/kUTTypeMovie.
197 * WebKit2.xcodeproj/project.pbxproj:
200 * UIProcess/WebOpenPanelResultListenerProxy.h:
201 * UIProcess/WebOpenPanelResultListenerProxy.cpp:
202 (WebKit::filePathsFromFileURLs):
203 (WebKit::WebOpenPanelResultListenerProxy::chooseFiles):
204 * UIProcess/WebPageProxy.h:
205 * UIProcess/WebPageProxy.cpp:
206 (WebKit::WebPageProxy::runOpenPanel):
207 (WebKit::WebPageProxy::didChooseFilesForOpenPanelWithDisplayStringAndIcon):
208 * WebProcess/WebPage/WebOpenPanelResultListener.h:
209 * WebProcess/WebPage/WebOpenPanelResultListener.cpp:
210 (WebKit::WebOpenPanelResultListener::didChooseFilesWithDisplayStringAndIcon):
211 * WebProcess/WebPage/WebPage.h:
212 * WebProcess/WebPage/WebPage.messages.in:
213 * WebProcess/WebPage/WebPage.cpp:
214 (WebKit::WebPage::didChooseFilesForOpenPanelWithDisplayStringAndIcon):
215 Message forwarding for choosing files and providing a display string and icon,
216 leading down to the existing WebCore FileChooser method.
218 * UIProcess/PageClient.h:
219 * UIProcess/ios/PageClientImplIOS.h:
220 * UIProcess/ios/PageClientImplIOS.mm:
221 (WebKit::PageClientImpl::handleRunOpenPanel):
222 Add a default handler for file open panel on iOS.
223 Forwards to the content view.
225 * UIProcess/ios/WKContentViewInteraction.h:
226 * UIProcess/ios/WKContentViewInteraction.mm:
227 (-[WKContentView lastInteractionLocation]):
228 (-[WKContentView _webTouchEventsRecognized:]):
229 (-[WKContentView _highlightLongPressRecognized:]):
230 (-[WKContentView _longPressRecognized:]):
231 (-[WKContentView _singleTapRecognized:]):
232 (-[WKContentView _doubleTapRecognized:]):
233 (-[WKContentView _twoFingerDoubleTapRecognized:]):
234 Keep track of the last interaction location. This matches previous behavior
235 of showing the file upload popover where the user tapped, to handle
236 cases where the <input> is hidden.
238 (-[WKContentView _showRunOpenPanel:resultListener:]):
239 (-[WKContentView fileUploadPanelDidDismiss:]):
240 Handle showing the cleaning up after the file upload panel.
242 * UIProcess/ios/forms/WKFileUploadPanel.h:
243 * UIProcess/ios/forms/WKFileUploadPanel.mm: Added.
244 (squareCropRectForSize):
246 (thumbnailSizedImageForImage):
247 (-[_WKFileUploadItem isVideo]):
248 (-[_WKFileUploadItem fileURL]):
249 (-[_WKFileUploadItem displayImage]):
250 (-[_WKImageFileUploadItem initWithFilePath:originalImage:]):
251 (-[_WKImageFileUploadItem isVideo]):
252 (-[_WKImageFileUploadItem fileURL]):
253 (-[_WKImageFileUploadItem displayImage]):
254 (-[_WKVideoFileUploadItem initWithFilePath:mediaURL:]):
255 (-[_WKVideoFileUploadItem isVideo]):
256 (-[_WKVideoFileUploadItem fileURL]):
257 (-[_WKVideoFileUploadItem displayImage]):
258 Helper class for each image picker selection. Knows how to get
259 a file URL and thumbnail display image for the item.
261 (-[WKFileUploadPanel initWithView:]):
262 (-[WKFileUploadPanel dealloc]):
263 (-[WKFileUploadPanel _dispatchDidDismiss]):
264 (-[WKFileUploadPanel _cancel]):
265 (-[WKFileUploadPanel _chooseFiles:displayString:iconImage:]):
266 Lifetime of the upload panel requires that either cancel or choose
267 must happen as we go through the file picking process.
269 (-[WKFileUploadPanel presentWithParameters:WebKit::resultListener:WebKit::]):
270 (-[WKFileUploadPanel dismiss]):
271 API to show or dismiss the panel.
273 (-[WKFileUploadPanel _dismissDisplayAnimated:]):
274 Helper to clean up the UI as it progresses or completes no matter the device idiom.
276 (-[WKFileUploadPanel _presentPopoverWithContentViewController:animated:]):
277 (-[WKFileUploadPanel _presentFullscreenViewController:animated:]):
278 UI presentation for the appropriate idiom.
280 (-[WKFileUploadPanel _mediaTypesForPickerSourceType:]):
281 (-[WKFileUploadPanel _showMediaSourceSelectionSheet]):
282 (-[WKFileUploadPanel _showPhotoPickerWithSourceType:]):
283 Showing the action sheet or image picker.
285 (-[WKFileUploadPanel popoverControllerDidDismissPopover:]):
286 (-[WKFileUploadPanel _willMultipleSelectionDelegateBeCalled]):
287 (-[WKFileUploadPanel imagePickerController:didFinishPickingMediaWithInfo:]):
288 (-[WKFileUploadPanel imagePickerController:didFinishPickingMultipleMediaWithInfo:]):
289 (-[WKFileUploadPanel imagePickerControllerDidCancel:]):
290 Action sheet or image picker handlers.
292 (-[WKFileUploadPanel _processMediaInfoDictionaries:successBlock:failureBlock:]):
293 (-[WKFileUploadPanel _processMediaInfoDictionaries:atIndex:processedResults:processedImageCount:processedVideoCount:successBlock:failureBlock:]):
294 (-[WKFileUploadPanel _uploadItemFromMediaInfo:successBlock:failureBlock:]):
295 (-[WKFileUploadPanel _displayStringForPhotos:videos:]):
296 Processing selections from the image picker to FileUploadItems.
298 2014-05-01 Simon Fraser <simon.fraser@apple.com>
300 [iOS WK2] Animations on vox.com look wrong
301 https://bugs.webkit.org/show_bug.cgi?id=132462
302 <rdar://problem/16731884>
304 Reviewed by Sam Weinig.
306 PlatformCALayerRemote was managing animations incorrectly; aninations
307 would stick around in m_properties.addedAnimations and get added a second
310 Animations have to be managed a little differently to other properties,
311 since they are not steady-state things. A given commit has to send over
312 the added and removed animations, and then clear the layer properties.
314 Do this by adding PlatformCALayerRemote::didCommit(), which is called
315 after the layer properties have been encoded, and have it clear the lists
316 of added and removed animations.
318 removeAnimationForKey() also has to remove the animation from addedAnimations
319 so that an add/remove in the same commit doesn't send the animation to the
322 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
323 (WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
324 (WebKit::PlatformCALayerRemote::didCommit):
325 (WebKit::PlatformCALayerRemote::removeAnimationForKey):
326 * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
327 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
328 (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
330 2014-05-01 Simon Fraser <simon.fraser@apple.com>
332 [iOS WK2] Can't scroll on gatesnotes.com
333 https://bugs.webkit.org/show_bug.cgi?id=132459
334 <rdar://problem/16770909>
336 Reviewed by Benjamin Poulain.
338 The custom UIView hit-testing code was finding views that were created by
339 the compositing code for clipping, above the UIScrollViews. We only ever
340 need to find UIScrollViews here for touch overflow-scrolling, so constrain
341 the hit-testing code to only return UIScrollViews.
343 * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
344 (-[UIView _recursiveFindDescendantScrollViewAtPoint:withEvent:]):
345 (-[UIView _findDescendantViewAtPoint:withEvent:]):
346 (-[UIView _recursiveFindDescendantViewAtPoint:withEvent:]): Deleted.
348 2014-05-02 Carlos Alberto Lopez Perez <clopez@igalia.com>
350 REGRESSION(r168118): [GTK] build broken due to shouldTrackVisitedLinks
351 https://bugs.webkit.org/show_bug.cgi?id=132447
353 Unreviewed GTK build fix.
355 shouldTrackVisitedLinks was removed on r168118.
356 Visited link coloring works as expected after this change.
358 * UIProcess/gtk/WebContextGtk.cpp:
359 (WebKit::WebContext::platformInitializeWebProcess): Remove
360 shouldTrackVisitedLinks parameter.
362 2014-05-01 Enrica Casucci <enrica@apple.com>
364 REGRESSION (WebKit2) Need to support Learn button.
365 https://bugs.webkit.org/show_bug.cgi?id=132454
366 <rdar://problem/16778889>
368 Reviewed by Benjamin Poulain.
370 For traditional Chinese we support the ability to add shortcuts
371 for typing. This is done by pressing the Learn button on the system
372 menu. This patch adds the necessary code to canPerformAction to enable
373 the button when appropriate as well as the implementation of the action
375 It also adds a check for the Replace button not to be shown when the
376 selection only contains CJ characters.
378 * UIProcess/ios/WKContentViewInteraction.mm:
379 (-[WKContentView _addShortcut:]):
380 (-[WKContentView canPerformAction:withSender:]):
382 2014-05-01 Benjamin Poulain <bpoulain@apple.com>
384 [iOS][WK2] Tweak the extended background exclusion for MobileSafari
385 https://bugs.webkit.org/show_bug.cgi?id=132449
387 Reviewed by Beth Dakin.
389 Some tweaks for Mobile:
390 -Use UIViews instead of CALayers to have the same animation timing as the top views.
391 -The left extended background insets should not exclude the top and bottom insets.
393 Since this code is in the middle of 2 hot paths, also added some performance tweaks.
395 * UIProcess/API/Cocoa/WKWebView.mm:
396 (-[WKWebView initWithFrame:configuration:]):
397 In the normal case, we do not have extended background exclusion. To avoid creating a background view, we use
398 the scrollview to render the background.
399 The separate background view is created lazily if needed.
401 (-[WKWebView _updateScrollViewBackground]):
402 (-[WKWebView _frameOrBoundsChanged]):
403 (updateTopAndBottomExtendedBackgroundExclusionIfNecessary):
404 This create the top and bottom extended background view as needed and update their frames for the current insets.
406 (-[WKWebView _setObscuredInsets:]):
407 (-[WKWebView _setExtendedBackgroundExclusionInsets:]):
408 When an exclusion inset is needed, create a view for it, transfer the color from the ScrollView, and reset the color
411 2014-05-01 Alexey Proskuryakov <ap@apple.com>
413 Move size computation for Blob constructor into BlobRegistryImpl
414 https://bugs.webkit.org/show_bug.cgi?id=132439
416 Reviewed by Sam Weinig.
418 Plumbing to make this version of registerBlobURL synchronous for now.
419 I expect to make it async again when data structures on client side are simplified.
421 * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
422 (WebKit::NetworkBlobRegistry::registerBlobURL):
423 * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
424 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
425 (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
426 * NetworkProcess/NetworkConnectionToWebProcess.h:
427 * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
428 * WebProcess/FileAPI/BlobRegistryProxy.cpp:
429 (WebKit::BlobRegistryProxy::registerBlobURL):
430 * WebProcess/FileAPI/BlobRegistryProxy.h:
432 2014-05-01 Beth Dakin <bdakin@apple.com>
434 REGRESSION(168053): Repro crash navigating to another page after selecting phone
436 https://bugs.webkit.org/show_bug.cgi?id=132444
438 <rdar://problem/16787285>
440 Reviewed by Darin Adler.
443 * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
444 (WebKit::TelephoneNumberOverlayController::drawRect):
446 2014-05-01 Anders Carlsson <andersca@apple.com>
448 Remove WKBundleSetShouldTrackVisitedLinks and associate code
449 https://bugs.webkit.org/show_bug.cgi?id=132441
451 Reviewed by Sam Weinig.
453 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
454 (WKBundleSetShouldTrackVisitedLinks): Deleted.
455 * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
456 * WebProcess/InjectedBundle/InjectedBundle.cpp:
457 (WebKit::InjectedBundle::setShouldTrackVisitedLinks): Deleted.
458 * WebProcess/InjectedBundle/InjectedBundle.h:
459 * WebProcess/WebPage/VisitedLinkTableController.cpp:
460 (WebKit::VisitedLinkTableController::addVisitedLink):
461 * WebProcess/WebProcess.cpp:
462 (WebKit::WebProcess::WebProcess):
463 (WebKit::WebProcess::setShouldTrackVisitedLinks): Deleted.
464 * WebProcess/WebProcess.h:
465 (WebKit::WebProcess::shouldTrackVisitedLinks): Deleted.
467 2014-05-01 Anders Carlsson <andersca@apple.com>
469 window.testRunner.keepWebHistory() should update the UI process state
470 https://bugs.webkit.org/show_bug.cgi?id=132440
472 Reviewed by Dan Bernstein.
474 * UIProcess/API/C/WKPage.cpp:
475 (WKPageGetAddsVisitedLinks):
476 (WKPageSetAddsVisitedLinks):
477 * UIProcess/API/C/WKPagePrivate.h:
479 2014-05-01 Filip Pizlo <fpizlo@apple.com>
483 Rubber stamped by Mark Hahnenberg.
485 This breaks our debugging workflow.
487 * Shared/WebProcessCreationParameters.cpp:
488 (WebKit::WebProcessCreationParameters::decode):
489 * UIProcess/mac/WebContextMac.mm:
490 (WebKit::registerUserDefaultsIfNeeded):
491 (WebKit::WebContext::platformInitializeWebProcess):
493 2014-05-01 Anders Carlsson <andersca@apple.com>
495 WKWebView doesn't track visited links (for visited link coloring)
496 https://bugs.webkit.org/show_bug.cgi?id=132438
497 <rdar://problem/16704519>
499 Reviewed by Dan Bernstein.
501 * Shared/WebProcessCreationParameters.cpp:
502 (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
503 (WebKit::WebProcessCreationParameters::encode):
504 (WebKit::WebProcessCreationParameters::decode):
505 * Shared/WebProcessCreationParameters.h:
506 * UIProcess/API/APIHistoryClient.h:
507 (API::HistoryClient::addsVisitedLinks):
508 (API::HistoryClient::shouldTrackVisitedLinks): Deleted.
509 * UIProcess/API/C/WKContext.cpp:
510 (WKContextSetHistoryClient):
511 * UIProcess/API/Cocoa/WKWebView.mm:
512 (-[WKWebView _addsVisitedLinks]):
513 (-[WKWebView _setAddsVisitedLinks:]):
514 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
515 * UIProcess/API/mac/WKView.mm:
516 (-[WKView initWithFrame:context:configuration:webView:]):
517 * UIProcess/Cocoa/HistoryClient.h:
518 * UIProcess/Cocoa/HistoryClient.mm:
519 (WebKit::HistoryClient::shouldTrackVisitedLinks): Deleted.
520 * UIProcess/VisitedLinkProvider.cpp:
521 (WebKit::VisitedLinkProvider::addVisitedLinkHashFromPage):
522 * UIProcess/VisitedLinkProvider.h:
523 * UIProcess/VisitedLinkProvider.messages.in:
524 * UIProcess/WebContext.cpp:
525 (WebKit::WebContext::setHistoryClient):
526 (WebKit::WebContext::createNewWebProcess):
527 * UIProcess/WebContext.h:
528 (WebKit::WebContext::processes):
529 * UIProcess/WebPageProxy.cpp:
530 (WebKit::WebPageProxy::WebPageProxy):
531 * UIProcess/WebPageProxy.h:
532 (WebKit::WebPageProxy::addsVisitedLinks):
533 (WebKit::WebPageProxy::setAddsVisitedLinks):
534 * WebProcess/WebPage/VisitedLinkTableController.cpp:
535 (WebKit::VisitedLinkTableController::addVisitedLink):
536 * WebProcess/WebProcess.cpp:
537 (WebKit::WebProcess::initializeWebProcess):
538 * WebProcess/WebProcess.h:
539 * WebProcess/WebProcess.messages.in:
541 2014-05-01 Benjamin Poulain <bpoulain@apple.com>
543 [iOS][WK2] The highlight view needs to be in WKWebView coordinates
544 https://bugs.webkit.org/show_bug.cgi?id=132435
545 <rdar://problem/16708861>
547 Reviewed by Tim Horton.
549 _UIHighlightView needs to be in WKWebView coordinates so that it render unscaled for any page scale factor.
550 The view needs to be a child of WKContentView so that it moves/scales with the page.
552 To fix the issue, add an inverse transform root layer for the hightlight, and scale the coordinates to their
553 inverse scaled counterpart.
555 The scale is not updated live with the scaling of WKContentView but that should be fine since the view disappear
556 on any scaling operation (and I would prefer not add live painting during scaling animation).
558 * UIProcess/ios/WKContentViewInteraction.h:
559 * UIProcess/ios/WKContentViewInteraction.mm:
560 (-[WKContentView cleanupInteraction]):
561 (-[WKContentView _didGetTapHighlightForRequest:color:WebCore::quads:WebCore::topLeftRadius:WebCore::topRightRadius:WebCore::bottomLeftRadius:WebCore::bottomRightRadius:WebCore::]):
562 (-[WKContentView _cancelInteraction]):
564 2014-05-01 Ryuan Choi <ryuan.choi@samsung.com>
566 [EFL] There are many warnings with software backend
567 https://bugs.webkit.org/show_bug.cgi?id=132422
569 Reviewed by Gyuyoung Kim.
571 * UIProcess/API/efl/EwkView.cpp:
572 (EwkView::updateCursor):
573 (EwkView::transformToScreen):
575 2014-04-30 Alexey Proskuryakov <ap@apple.com>
577 Roll out fix for https://bugs.webkit.org/show_bug.cgi?id=131637:
578 Clean up unnecessary methods in the BackForwardClient interface
580 It broke a regression test and an API test.
582 * WebKit2.xcodeproj/project.pbxproj:
583 * WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp:
584 (WebKit::InjectedBundleBackForwardList::clear):
585 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
586 (WebKit::WebBackForwardListProxy::WebBackForwardListProxy):
587 (WebKit::WebBackForwardListProxy::addItem):
588 (WebKit::WebBackForwardListProxy::goToItem):
589 (WebKit::WebBackForwardListProxy::itemAtIndex):
590 (WebKit::WebBackForwardListProxy::backListCount):
591 (WebKit::WebBackForwardListProxy::forwardListCount):
592 (WebKit::WebBackForwardListProxy::close):
593 (WebKit::WebBackForwardListProxy::clear):
594 * WebProcess/WebPage/WebBackForwardListProxy.h:
595 (WebKit::WebBackForwardListProxy::create):
596 * WebProcess/WebPage/WebPage.cpp:
597 (WebKit::WebPage::WebPage):
598 * WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm: Copied from Source/WebKit2/WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm.
600 2014-04-30 Brady Eidson <beidson@apple.com>
602 Only reveal selection service UI after a short delay.
603 <rdar://problem/16777346> and https://bugs.webkit.org/show_bug.cgi?id=132418
605 Reviewed by Sam Weinig.
607 * WebProcess/WebPage/SelectionOverlayController.cpp:
608 (WebKit::SelectionOverlayController::SelectionOverlayController):
609 (WebKit::SelectionOverlayController::destroyOverlay): Also stop the hover timer.
610 (WebKit::SelectionOverlayController::selectionRectsDidChange): Mark the highlight as dirty.
611 (WebKit::SelectionOverlayController::hoverTimerFired): If the mouse is still over the highlight,
612 set the visible flag and setNeedsDisplay().
613 * WebProcess/WebPage/SelectionOverlayController.h:
615 * WebProcess/WebPage/mac/SelectionOverlayControllerMac.mm:
616 (WebKit::SelectionOverlayController::drawRect): Recreate the highlight if it exists but
617 is marked as dirty. After doing that, possibly reset the hover timer.
618 Also, only performing the actual drawing if the visible flag is set.
619 (WebKit::SelectionOverlayController::mouseEvent): If the mouse moves on or off the highlight,
620 start or stop the hover timer accordingly.
621 (WebKit::SelectionOverlayController::mouseHoverStateChanged): Handle starting/stopping the
623 (WebKit::SelectionOverlayController::clearHighlight): Deleted.
625 2014-04-30 Benjamin Poulain <benjamin@webkit.org>
627 [iOS][WK2] Animated resize incorrectly assumes the layout width is the same as the view width
628 https://bugs.webkit.org/show_bug.cgi?id=132373
629 <rdar://problem/16762178>
631 Reviewed by Tim Horton.
633 * UIProcess/API/Cocoa/WKWebView.mm:
634 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
635 Fix a couple of bugs when the left/right obscured insets change, and/or when the minimum layout size
636 is narrower than the view itself.
639 -We need to perfom and update if the insets change since the unobscuredRect will also change.
640 -The min/max zoom scale should be based on the minimum layout size, that's the definition of minimum layout size
641 in scrollview coordinate :)
642 -The old web view width in content coordinate could be narrower than the old view bounds if there are left or right
645 2014-04-30 Simon Fraser <simon.fraser@apple.com>
647 Remove ENABLE_PLUGIN_PROXY_FOR_VIDEO
648 https://bugs.webkit.org/show_bug.cgi?id=132396
650 Reviewed by Eric Carlson.
652 Remove ENABLE_PLUGIN_PROXY_FOR_VIDEO and related code.
654 * Configurations/FeatureDefines.xcconfig:
655 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
656 (WebKit::WebFrameLoaderClient::createMediaPlayerProxyPlugin): Deleted.
657 (WebKit::WebFrameLoaderClient::hideMediaPlayerProxyPlugin): Deleted.
658 (WebKit::WebFrameLoaderClient::showMediaPlayerProxyPlugin): Deleted.
659 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
660 * WebProcess/WebPage/WebPage.cpp:
661 (WebKit::WebPage::updatePreferences):
663 2014-04-30 Brady Eidson <beidson@apple.com>
665 If there are no services available, do not show the service controls UI
666 <rdar://problem/16735665> and https://bugs.webkit.org/show_bug.cgi?id=132410
668 Reviewed by Tim Horton.
670 Add a lightweight class that lazily polls the appropriate APIs for whether or not appropriate services
671 are installed and usable on the system:
672 * UIProcess/mac/ServicesController.h: Added.
673 (WebKit::ServicesController::imageServicesExist):
674 (WebKit::ServicesController::selectionServicesExist):
675 * UIProcess/mac/ServicesController.mm: Added.
676 (WebKit::ServicesController::shared):
677 (WebKit::ServicesController::ServicesController):
678 (WebKit::ServicesController::refreshExistingServices):
679 (WebKit::ServicesController::refreshExistingServicesTimerFired):
681 Add "image services exist" and "selection services exist" parameters:
682 * Shared/WebProcessCreationParameters.cpp:
683 (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
684 (WebKit::WebProcessCreationParameters::encode):
685 (WebKit::WebProcessCreationParameters::decode):
686 * Shared/WebProcessCreationParameters.h:
688 * UIProcess/WebContext.cpp:
689 (WebKit::WebContext::createNewWebProcess):
690 (WebKit::WebContext::refreshExistingServices): Called when the context menu proxy realizes that
691 services no longer exist.
692 * UIProcess/WebContext.h:
694 Each WebProcess hangs on to its own copy of the flags for whether or not the services exist:
695 * WebProcess/WebProcess.cpp:
696 (WebKit::WebProcess::WebProcess):
697 (WebKit::WebProcess::initializeWebProcess):
698 (WebKit::WebProcess::setEnabledServices):
699 * WebProcess/WebProcess.h:
700 (WebKit::WebProcess::imageServicesExist):
701 (WebKit::WebProcess::selectionServicesExist):
703 * UIProcess/mac/WebContextMenuProxyMac.mm:
704 (WebKit::WebContextMenuProxyMac::setupServicesMenu): If the menu creation failed, the set of services
705 on the system must have changed. So ask the WebContext to refresh them.
707 * WebProcess/WebPage/SelectionOverlayController.cpp:
708 (WebKit::SelectionOverlayController::selectionRectsDidChange): If services don't exist, don't create an
709 overlay (and destroy any existing overlay!)
711 * WebProcess/WebPage/mac/SelectionOverlayControllerMac.mm:
712 (WebKit::SelectionOverlayController::drawRect): If services don't exist, don't draw, and destroy the overlay.
714 * WebProcess/WebProcess.messages.in:
715 * WebKit2.xcodeproj/project.pbxproj:
717 2014-04-30 Gavin Barraclough <baraclough@apple.com>
719 https://bugs.webkit.org/show_bug.cgi?id=132415
720 Fix snapshotting on WebKit2
722 Reviewed by Geoff Garen
724 * UIProcess/API/Cocoa/WKWebView.mm:
725 (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
726 - Use a VisibilityToken to keep the process runnable.
728 2014-04-30 Gavin Barraclough <baraclough@apple.com>
730 Fix PageVisibility on iOS
731 https://bugs.webkit.org/show_bug.cgi?id=132393
733 Rubber stamped by Tim Horton
735 * UIProcess/ios/PageClientImplIOS.mm:
736 (WebKit::PageClientImpl::isViewWindowActive):
737 (WebKit::PageClientImpl::isViewFocused):
738 (WebKit::PageClientImpl::isViewVisible):
739 (WebKit::PageClientImpl::isViewVisibleOrOccluded):
740 (WebKit::PageClientImpl::isVisuallyIdle):
741 - m_contentView -> m_webView
743 2014-04-30 Benjamin Poulain <benjamin@webkit.org>
745 [iOS][WK2] Add a SPI to exclude the extended background from some areas of WKWebView
746 https://bugs.webkit.org/show_bug.cgi?id=132406
747 <rdar://problem/16762197>
749 Reviewed by Beth Dakin.
751 Move the extended background to a separate layer bellow the UIScrollView.
753 The geometry of that layer is then changed based on ExtendedBackgroundExclusionInsets
756 * UIProcess/API/Cocoa/WKWebView.mm:
757 (-[WKWebView initWithFrame:configuration:]):
758 (-[WKWebView _updateScrollViewBackground]):
759 (-[WKWebView _frameOrBoundsChanged]):
760 (-[WKWebView _setExtendedBackgroundExclusionInsets:]):
761 (-[WKWebView _extendedBackgroundExclusionInsets]):
762 (-[WKWebView pageExtendedBackgroundColor]): Deleted.
763 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
765 2014-04-30 Simon Fraser <simon.fraser@apple.com>
767 Fix build error when building for iOS simulator.
769 * UIProcess/ios/ProcessAssertion.mm:
771 2014-04-30 Alexey Proskuryakov <ap@apple.com>
773 Move Blob.slice() implementation into BlobRegistryImpl
774 https://bugs.webkit.org/show_bug.cgi?id=132402
776 Reviewed by Anders Carlsson.
778 * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
779 (WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
780 * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
781 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
782 (WebKit::NetworkConnectionToWebProcess::registerBlobURLForSlice):
783 * NetworkProcess/NetworkConnectionToWebProcess.h:
784 * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
785 * WebProcess/FileAPI/BlobRegistryProxy.cpp:
786 (WebKit::BlobRegistryProxy::registerBlobURLForSlice):
787 * WebProcess/FileAPI/BlobRegistryProxy.h:
789 2014-04-30 Beth Dakin <bdakin@apple.com>
791 Phone number data detection UI is offset for iframes, pages with topContentInset
792 https://bugs.webkit.org/show_bug.cgi?id=132372
794 <rdar://problem/16651235>
796 Reviewed by Tim Horton.
798 Make the overlay an OverlayType::Document, which will keep everything relative to
799 the main Document’s coordinates.
800 * WebProcess/WebPage/TelephoneNumberOverlayController.cpp:
801 (WebKit::TelephoneNumberOverlayController::createOverlayIfNeeded):
803 Make frames work by converting to the main document’s coordinate space.
804 * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
805 (WebKit::TelephoneNumberOverlayController::drawRect):
807 2014-04-30 Roger Fong <roger_fong@apple.com>
809 Unreviewed. Unnecessary explicit initialization of LayoutUnit from r167985.
811 * WebProcess/WebPage/WebPage.cpp:
812 (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
813 Darin points out that I can just use “/2” instead of “/LayoutUnit(2.0)”.
815 2014-04-30 David Hyatt <hyatt@apple.com>
817 [New Multicolumn] Enable new multi-column mode
818 https://bugs.webkit.org/show_bug.cgi?id=131825
820 Reviewed by Simon Fraser.
822 * Shared/WebPreferencesStore.h:
824 2014-04-30 Brian J. Burg <burg@cs.washington.edu>
826 Clean up unnecessary methods in the BackForwardClient interface
827 https://bugs.webkit.org/show_bug.cgi?id=131637
829 Reviewed by Andreas Kling.
831 Remove stubs for iOS-specific methods in the BackForwardClient interface.
833 Construct a WebBackForwardListProxy directly, and make the WebCore page
834 own the BackForwardClient instance. Convert uses of backForward().client()
835 to accept references instead of raw pointers.
837 * WebKit2.xcodeproj/project.pbxproj:
838 * WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp:
839 (WebKit::InjectedBundleBackForwardList::clear):
840 * WebProcess/WebPage/WebBackForwardListProxy.cpp: Store a reference to
841 WebCore::Page instead of a pointer.
842 (WebKit::WebBackForwardListProxy::WebBackForwardListProxy):
843 (WebKit::WebBackForwardListProxy::create): Deleted.
844 (WebKit::WebBackForwardListProxy::addItem):
845 (WebKit::WebBackForwardListProxy::goToItem):
846 (WebKit::WebBackForwardListProxy::itemAtIndex):
847 (WebKit::WebBackForwardListProxy::backListCount):
848 (WebKit::WebBackForwardListProxy::forwardListCount):
849 (WebKit::WebBackForwardListProxy::close):
850 (WebKit::WebBackForwardListProxy::clear):
851 (WebKit::WebBackForwardListProxy::isActive):
852 * WebProcess/WebPage/WebBackForwardListProxy.h:
853 * WebProcess/WebPage/WebPage.cpp:
854 (WebKit::WebPage::WebPage):
855 * WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm: Removed.
857 2014-04-30 Gavin Barraclough <baraclough@apple.com>
859 Fix PageVisibility on iOS
860 https://bugs.webkit.org/show_bug.cgi?id=132393
862 Reviewed by Andreas Kling.
864 Currently page visibility API doesn't work correctly on WK2 iOS for a few reasons,
865 the most significant of which being that the moment a WKWebView leaves the window
866 we'll suspend the content process, which removes the possibility for any notification
867 to be delivered. This patch addresses this issue, by allowing the process to run for
868 long enough for the notification to be delivered.
870 1) Introduce a new class, ProcessThrottler, to encapsulate the process suspension logic.
871 2) WebPageProxy uses ProcessThrottler::VisibilityToken to communicate visibility to the throttler.
872 3) WebPageProxy tracks pending didUpdateViewState messages to detect when the view state update in
873 the web content process has completed.
874 4) Distiguish between 'Background' and 'Suspended' states in the ProcessAssertion.
876 * Shared/ChildProcessProxy.h:
877 - moved m_assertion to NetworkProcessProxy / WebProcessProxy.
878 * UIProcess/Network/NetworkProcessProxy.h:
880 * UIProcess/WebPageProxy.cpp:
881 (WebKit::WebPageProxy::WebPageProxy):
882 - initialize VisibilityToken state.
883 (WebKit::WebPageProxy::reattachToWebProcess):
884 - reinitialize VisibilityToken state.
885 (WebKit::WebPageProxy::viewStateDidChange):
886 - update VisibilityToken, increment m_pendingViewStateUpdates as necessary.
887 (WebKit::WebPageProxy::updateVisibilityToken):
888 - update the VisibiliyToken based on page visibility, and whether an update is still pending.
889 (WebKit::WebPageProxy::didUpdateViewState):
890 - detect when a view state change has completed in the web process, and update throttle state as necessary.
891 * UIProcess/WebPageProxy.h:
892 (WebKit::WebPageProxy::didUpdateViewState): Deleted.
894 * UIProcess/WebProcessProxy.cpp:
895 (WebKit::WebProcessProxy::WebProcessProxy):
896 - initialize m_throttler.
897 (WebKit::WebProcessProxy::didFinishLaunching):
898 - notify the PageThrottler of the new connection.
899 * UIProcess/WebProcessProxy.h:
900 (WebKit::WebProcessProxy::throttler):
902 (WebKit::WebProcessProxy::updateProcessState): Deleted.
903 - moved trottling login to ProcessThrottler.
904 * UIProcess/ios/PageClientImplIOS.h:
905 * UIProcess/ios/PageClientImplIOS.mm:
906 (WebKit::PageClientImpl::isViewWindowActive):
907 (WebKit::PageClientImpl::isViewFocused):
908 (WebKit::PageClientImpl::isViewVisible):
909 (WebKit::PageClientImpl::isViewVisibleOrOccluded):
910 - these should only be true when the view is in a window.
911 (WebKit::PageClientImpl::isVisuallyIdle):
912 - this should only be true when the view is not in a window.
913 * UIProcess/ios/ProcessAssertion.h:
914 * UIProcess/ios/ProcessAssertion.mm:
915 (WebKit::flagsForState):
916 - map from enum -> BKSAssertion flags values.
917 (WebKit::ProcessAssertion::ProcessAssertion):
918 - use flagsForState (add support for Suspended state).
919 (WebKit::ProcessAssertion::setState):
920 - use flagsForState (add support for Suspended state).
921 * UIProcess/ios/ProcessThrottler.h: Added.
922 (WebKit::ProcessThrottler::VisibilityToken::visibility):
924 (WebKit::ProcessThrottler::VisibilityToken::setVisibility):
925 - update Visibility value; update the token as necessary.
926 (WebKit::ProcessThrottler::ProcessThrottler):
927 - constructor; does not take an assention until didConnnectToProcess is called.
928 (WebKit::ProcessThrottler::visibilityToken):
929 - create a VisibilityToken.
930 (WebKit::ProcessThrottler::didConnnectToProcess):
932 (WebKit::ProcessThrottler::weakPtr):
933 - create a weak pointer, used for references from VisibilityToken to the throttler.
934 (WebKit::ProcessThrottler::assertionState):
935 - determine the correct AssertionState for the process, based on current visibility.
936 (WebKit::ProcessThrottler::updateAssertion):
937 - update assertion, called in response to visibility change.
938 * UIProcess/ios/ProcessThrottler.mm: Added.
939 (WebKit::ProcessThrottler::VisibilityToken::VisibilityToken):
941 (WebKit::ProcessThrottler::VisibilityToken::~VisibilityToken):
942 - set visibility to hidden to reset.
943 (WebKit::ProcessThrottler::VisibilityToken::hideTimerFired):
944 - automatically decay from Hiding -> Hidden on a timeout.
945 (WebKit::ProcessThrottler::VisibilityToken::setVisibilityInternal):
946 - update counters tracking visibility in ProcessThrottler.
947 * UIProcess/ios/WKContentView.mm:
948 (-[WKContentView didMoveToWindow]):
949 - This affects all view state flags, not just the 'InWindow' state.
950 If the view moves out of a window request a reply from the WebContent - we use this
951 to detect when the page visibility event has completed.
952 * UIProcess/ios/WebProcessProxyIOS.mm:
953 (WebKit::WebProcessProxy::updateProcessState): Deleted.
955 * WebKit2.xcodeproj/project.pbxproj:
958 2014-04-30 Anders Carlsson <andersca@apple.com>
960 Preemptive header fixes for when WebKit.framework is going to provide the modern API
961 https://bugs.webkit.org/show_bug.cgi?id=132394
963 Reviewed by Dan Bernstein.
965 * UIProcess/API/Cocoa/WKBrowsingContextPolicyDelegate.h:
967 Delete WKNavigationType for now. Ultimately the entire delegate should be removed.
969 * UIProcess/API/Cocoa/WKPreferences.h:
970 Add a header guard so we can avoid importing WKPreferences.h more than once.
972 * WebKit2.xcodeproj/project.pbxproj:
973 _WKScriptWorld.h should be private, not public.
974 WKScriptMessagePrivate.h and WKUserContentControllerPrivate.h should be private, not project.
976 2014-04-30 Joseph Pecoraro <pecoraro@apple.com>
978 Web Inspector: Ensure UIProcess checks in to webinspectord after spawning a WebProcess
979 https://bugs.webkit.org/show_bug.cgi?id=132389
981 Reviewed by Timothy Hatcher.
983 We aggregate WebProcess WebView's under the UIProcess. If the UIProcess
984 didn't connect to webinspectord these WebViews would have remained
985 hidden. Always have the UIProcess connect to webinspectord when it
986 spawns a WebProcess and may have a child process holding views that
987 it ultimately owns and should display under the UIProcess name.
989 * UIProcess/WebContext.cpp:
990 (WebKit::WebContext::createNewWebProcess):
992 2014-04-30 Zalan Bujtas <zalan@apple.com>
994 [iOS]Subpixel rendering: Extra line of pixels next to the YouTube loading indicator.
995 https://bugs.webkit.org/show_bug.cgi?id=132391
997 Reviewed by Simon Fraser.
999 CG and GraphicsContext clipping should use the same coordinates. Snapping either one
1000 while leaving the other unsnapped results in clipping mismatch and that may produce
1005 * Shared/mac/RemoteLayerBackingStore.mm:
1006 (WebKit::RemoteLayerBackingStore::drawInContext):
1008 2014-04-30 Alexey Proskuryakov <ap@apple.com>
1010 https://bugs.webkit.org/show_bug.cgi?id=132363
1011 Make Blob RawData immutable
1013 Reviewed by Anders Carlsson.
1015 * Shared/FileAPI/BlobRegistrationData.cpp: (WebKit::BlobRegistrationData::decode):
1016 Create RawData in one step.
1018 2014-04-30 Brady Eidson <beidson@apple.com>
1020 Followup to: Handle selection services menu.
1021 <rdar://problem/16727798> and https://bugs.webkit.org/show_bug.cgi?id=132362
1023 * UIProcess/mac/WebContextMenuProxyMac.mm:
1024 (WebKit::WebContextMenuProxyMac::setupServicesMenu): Remove an ASSERT from previous version of the patch
1025 that landed. I’d forgotten to add this stray change to my staging area.
1027 2014-04-30 Manuel Rego Casasnovas <rego@igalia.com>
1029 [CSS Grid Layout] Enable runtime feature by default
1030 https://bugs.webkit.org/show_bug.cgi?id=132189
1032 Reviewed by Benjamin Poulain.
1034 * Shared/WebPreferencesStore.h: Remove unneeded changes that
1035 enable/disable the runtime feature depending on the compilation flag.
1036 And set it to true by default.
1037 * UIProcess/gtk/ExperimentalFeatures.cpp: Set it to true by default.
1039 2014-04-30 Roger Fong <roger_fong@apple.com>
1041 Unreviewed. Wrong units used in offset calculation from r167961.
1043 * WebProcess/WebPage/WebPage.cpp:
1044 (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
1045 I accidentally mixed and matches LayoutUnits with Ints in offset calculation here.
1046 It should all just be in LayoutUnits.
1048 2014-04-29 Benjamin Poulain <bpoulain@apple.com>
1050 [iOS][WK2] When pageScaleFactor * deviceScaleFactor = 1, the tile grid is completely messed up
1051 https://bugs.webkit.org/show_bug.cgi?id=132368
1053 Reviewed by Simon Fraser.
1055 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1056 (WebKit::PlatformCALayerRemote::PlatformCALayerRemote):
1057 PlatformCALayerRemote always initialized the content scale to 1. Since contentsScale is supposed to reflect
1058 zoomScale * deviceScaleFactor, the value should be 2.
1060 This was causing bugs whenever the page scale factor was 1/2 on retina device (device scale factor = 2).
1062 When the page is initialized, GraphicsLayerCA::updateContentsScale(0.5) computes a contentsScale of 1. There is an early
1063 return on if (contentsScale == m_layer->contentsScale()). Since PlatformCALayerRemote->contentsScale() was incorreclty
1064 returning one, we were leaving the tile backing unmodified.
1066 Later, when the transaction is commited, the tile backing would still be default initialized and would render everything
1069 2014-04-29 Eric Carlson <eric.carlson@apple.com>
1071 [Mac] tag the video layers with descriptive name to aid debugging
1072 https://bugs.webkit.org/show_bug.cgi?id=132371
1074 Reviewed by Darin Adler.
1076 * WebProcess/ios/WebVideoFullscreenManager.mm:
1077 (WebKit::WebVideoFullscreenManager::enterFullscreenForNode): Set the
1078 fullscreen host layer name in a debug build.
1080 2014-04-29 Brady Eidson <beidson@apple.com>
1082 Handle selection services menu.
1083 <rdar://problem/16727798> and https://bugs.webkit.org/show_bug.cgi?id=132362
1085 Reviewed by Tim Horton.
1087 Add members for the relevant info for showing a service menu for a selection:
1088 * Shared/ContextMenuContextData.cpp:
1089 (WebKit::ContextMenuContextData::ContextMenuContextData):
1090 (WebKit::ContextMenuContextData::controlledDataIsEditable):
1091 * Shared/ContextMenuContextData.h:
1092 (WebKit::ContextMenuContextData::ContextMenuContextData):
1093 (WebKit::ContextMenuContextData::controlledSelectionData):
1094 (WebKit::ContextMenuContextData::needsServicesMenu):
1096 * UIProcess/WebPageProxy.h:
1097 * UIProcess/WebPageProxy.messages.in:
1098 * UIProcess/mac/WebPageProxyMac.mm:
1099 (WebKit::WebPageProxy::replaceSelectionWithPasteboardData): Changed to allow for multiple types on the overridden pasteboard.
1100 (WebKit::WebPageProxy::showSelectionServiceMenu):
1102 Update the services menu code to know the difference between an image service and a selection service:
1103 * UIProcess/mac/WebContextMenuProxyMac.h:
1104 * UIProcess/mac/WebContextMenuProxyMac.mm:
1105 (-[WKSharingServicePickerDelegate sharingServicePicker:sharingServicesForItems:mask:proposedSharingServices:]):
1106 (-[WKSharingServicePickerDelegate sharingService:willShareItems:]):
1107 (-[WKSharingServicePickerDelegate sharingService:didShareItems:]):
1108 (WebKit::WebContextMenuProxyMac::contextMenuItemSelected):
1109 (WebKit::WebContextMenuProxyMac::setupServicesMenu):
1110 (WebKit::WebContextMenuProxyMac::clearServicesMenu):
1111 (WebKit::WebContextMenuProxyMac::populate):
1112 (WebKit::WebContextMenuProxyMac::showContextMenu):
1113 (WebKit::WebContextMenuProxyMac::setupImageServicesMenu): Deleted.
1114 (WebKit::WebContextMenuProxyMac::clearImageServicesMenu): Deleted.
1116 * WebProcess/WebCoreSupport/WebPasteboardOverrides.cpp:
1117 (WebKit::WebPasteboardOverrides::getDataForOverride):
1119 * WebProcess/WebPage/WebPage.h:
1120 * WebProcess/WebPage/WebPage.messages.in:
1121 * WebProcess/WebPage/mac/WebPageMac.mm:
1122 (WebKit::WebPage::replaceSelectionWithPasteboardData): Changed to allow for multiple types on the overridden pasteboard.
1123 (WebKit::WebPage::handleSelectionServiceClick): Pass the relevant selection data through to the UIProcess as RTFD data.
1125 * WebProcess/WebPage/mac/SelectionOverlayControllerMac.mm:
1126 (WebKit::SelectionOverlayController::handleClick): Notify the WebPage of the click.
1128 2014-04-29 Dan Bernstein <mitz@apple.com>
1130 <rdar://problem/16745596> [Cocoa] Crash when invoking a method with an unsigned parameter on a remote object
1131 https://bugs.webkit.org/show_bug.cgi?id=132366
1133 Reviewed by Anders Carlsson.
1135 * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
1136 (encodeInvocation): Handle the 'I' type code. Interpret the 'q' and 'Q' type codes in an
1137 architecture-independent manner.
1138 (decodeInvocationArguments): Ditto.
1140 2014-04-29 Roger Fong <roger_fong@apple.com>
1142 Don't immediately snapshot plugin to allow for proper dominant plugin detection.
1143 https://bugs.webkit.org/show_bug.cgi?id=132294.
1144 <rdar://problem/16745679>
1146 Reviewed by Dean Jackson.
1148 * WebProcess/Plugins/PluginView.cpp:
1149 (WebKit::PluginView::didInitializePlugin):
1150 Instead of immediately setting the display state to DisplaySnapshot,
1151 put it on a timer to let the page fully layout and get hit test properly.
1153 2014-04-28 Roger Fong <roger_fong@apple.com>
1155 Plugins hidden by images should autoplay.
1156 https://bugs.webkit.org/show_bug.cgi?id=132222.
1157 <rdar://problem/16653536>
1159 Reviewed by Jon Lee and Darin Adler.
1161 * WebProcess/WebPage/WebPage.cpp:
1162 (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
1163 If the image on top of the plugin is similarly sized and similarly positioned as the plugin rect,
1164 set the plugin to autoplay. This is assuming that the previous snapshot checks have passed as well.
1166 2014-04-29 Filip Pizlo <fpizlo@apple.com>
1168 Use LLVM as a backend for the fourth-tier DFG JIT (a.k.a. the FTL JIT)
1169 https://bugs.webkit.org/show_bug.cgi?id=112840
1171 Rubber stamped by Geoffrey Garen.
1173 * Configurations/FeatureDefines.xcconfig:
1175 2014-04-29 Brady Eidson <beidson@apple.com>
1177 Change Image Controls replacement to use selection and paste
1178 <rdar://problem/16302722> and https://bugs.webkit.org/show_bug.cgi?id=131992
1180 Reviewed by Tim Horton.
1182 Add a "pasteboard override" mechanism which allows WebKit to keep pasteboard content local
1183 to the WebProcess and access it there without having to message up to the UI process:
1184 * WebProcess/WebCoreSupport/WebPasteboardOverrides.cpp: Added.
1185 (WebKit::WebPasteboardOverrides::sharedPasteboardOverrides):
1186 (WebKit::WebPasteboardOverrides::WebPasteboardOverrides):
1187 (WebKit::WebPasteboardOverrides::addOverride):
1188 (WebKit::WebPasteboardOverrides::removeOverride):
1189 (WebKit::WebPasteboardOverrides::overriddenTypes):
1190 (WebKit::WebPasteboardOverrides::getDataForOverride):
1191 * WebProcess/WebCoreSupport/WebPasteboardOverrides.h: Added.
1193 Change the pasteboard strategy to consult the pasteboard overrides before consulting the native pasteboard:
1194 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1195 (WebKit::WebPlatformStrategies::getTypes):
1196 (WebKit::WebPlatformStrategies::bufferForType):
1198 Add "replaceSelectionWithPasteboardData" which uses the new pasteboard overrides mechanism
1199 and then has WebCore perform the replacement:
1200 * WebProcess/WebPage/WebPage.h:
1201 * WebProcess/WebPage/WebPage.messages.in:
1202 * WebProcess/WebPage/mac/WebPageMac.mm:
1203 (WebKit::replaceSelectionPasteboardName):
1204 (WebKit::WebPage::replaceSelectionWithPasteboardData):
1206 * UIProcess/mac/WebPageProxyMac.mm:
1207 (WebKit::WebPageProxy::replaceSelectionWithPasteboardData):
1209 * UIProcess/mac/WebContextMenuProxyMac.h:
1210 (WebKit::WebContextMenuProxyMac::page):
1211 * UIProcess/mac/WebContextMenuProxyMac.mm:
1212 (-[WKSharingServicePickerDelegate sharingService:didShareItems:]): Use "replaceSelectionWithPasteboardData".
1213 (WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac):
1214 (WebKit::WebContextMenuProxyMac::replaceControlledImage): Deleted.
1216 Remain other remnants of "replaceControlledImage":
1217 * UIProcess/WebPageProxy.cpp:
1218 (WebKit::WebPageProxy::replaceControlledImage): Deleted.
1219 * UIProcess/WebPageProxy.h:
1220 * WebProcess/WebPage/WebContextMenu.cpp:
1221 (WebKit::WebContextMenu::replaceControlledImage): Deleted.
1222 * WebProcess/WebPage/WebContextMenu.h:
1223 * WebProcess/WebPage/WebPage.cpp:
1224 (WebKit::WebPage::replaceControlledImage): Deleted.
1226 * WebKit2.xcodeproj/project.pbxproj:
1228 2014-04-29 Tim Horton <timothy_horton@apple.com>
1232 * DatabaseProcess/ios/DatabaseProcessIOS.mm:
1234 2014-04-29 Alexey Proskuryakov <ap@apple.com>
1236 [WK2] DatabaseProcess should be sandboxed
1237 https://bugs.webkit.org/show_bug.cgi?id=132324
1238 <rdar://problem/15961708>
1240 Reviewed by Darin Adler.
1242 * Configurations/WebKit2.xcconfig: Added the profile to the list of files skipped
1245 * DatabaseProcess/DatabaseProcess.cpp: (WebKit::DatabaseProcess::initializeDatabaseProcess):
1246 Consume a sandbox extension for IndexedDB directory (which we get with initialization
1247 message after entering sandbox).
1249 * DatabaseProcess/ios: Added.
1250 * DatabaseProcess/ios/DatabaseProcessIOS.mm: Copied from Source/WebKit2/DatabaseProcess/mac/DatabaseProcessMac.mm.
1251 Separated from Mac version to match how other processes are implemented.
1253 * DatabaseProcess/mac/DatabaseProcessMac.mm: (WebKit::DatabaseProcess::initializeProcessName):
1256 * DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in: Added.
1258 * DerivedSources.make: Generate the profile from .sb.in.
1260 * Shared/Databases/DatabaseProcessCreationParameters.cpp:
1261 (WebKit::DatabaseProcessCreationParameters::encode):
1262 (WebKit::DatabaseProcessCreationParameters::decode):
1263 * Shared/Databases/DatabaseProcessCreationParameters.h:
1264 Added a sandbox extension for indexedDatabaseDirectory.
1266 * Shared/SecurityOriginData.h: Added an unrelated FIXME.
1268 * UIProcess/WebContext.cpp: (WebKit::WebContext::ensureDatabaseProcess): Create
1269 a sandbox extension for indexedDatabaseDirectory.
1271 * WebKit2.xcodeproj/project.pbxproj: Added new files.
1273 2014-04-28 Andy Estes <aestes@apple.com>
1275 [iOS] Introduce -didNotHandleTapAsClickAtPoint: to WKUIDelegatePrivate
1276 https://bugs.webkit.org/show_bug.cgi?id=132316
1278 Reviewed by Darin Adler.
1280 One WebKit2 client is interested to know if a tap was not handled by an element that responds to clicks.
1281 Introduce a new, private WKUIDelegate method telling it that a tap at a location was not handled as a click on
1284 * UIProcess/API/APIUIClient.h:
1285 (API::UIClient::didNotHandleTapAsClick):
1286 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1287 * UIProcess/Cocoa/UIDelegate.h:
1288 * UIProcess/Cocoa/UIDelegate.mm:
1289 (WebKit::UIDelegate::setDelegate):
1290 (WebKit::UIDelegate::UIClient::didNotHandleTapAsClick):
1291 * UIProcess/WebPageProxy.h:
1292 * UIProcess/WebPageProxy.messages.in:
1293 * UIProcess/ios/WebPageProxyIOS.mm:
1294 (WebKit::WebPageProxy::didNotHandleTapAsClick):
1295 * WebProcess/WebPage/ios/WebPageIOS.mm:
1296 (WebKit::WebPage::handleTap): Sent Messages::WebPageProxy::DidNotHandleTapAsClick if the tap wasn't handled, no
1297 node responded to the click event, or the responding node wasn't an element.
1299 2014-04-29 Zan Dobersek <zdobersek@igalia.com>
1301 [GTK][WK2] Avoid Vector copies in WebViewBaseInputMethodFilter::setPreedit()
1302 https://bugs.webkit.org/show_bug.cgi?id=132323
1304 Reviewed by Carlos Garcia Campos.
1306 * UIProcess/API/gtk/WebViewBaseInputMethodFilter.cpp:
1307 (WebKit::WebViewBaseInputMethodFilter::setPreedit): Inline the Vector object construction into
1308 the WebPageProxy::setComposition() call to avoid extra Vector copies and moves.
1310 2014-04-28 Dan Bernstein <mitz@apple.com>
1312 <rdar://problem/16750708> REGRESSION (r159358): Crash in InjectedBundleHitTestResult::frame
1313 https://bugs.webkit.org/show_bug.cgi?id=132318
1315 Reviewed by Andy Estes.
1317 * UIProcess/Cocoa/NavigationState.mm:
1318 (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction): Fixed a typo: set
1319 the source frame, not the destination frame.
1321 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1322 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Changed to get the
1323 frame for the action not from a hit test result, because some link activation actions are
1324 not mouse events, but rather from the event’s target.
1326 2014-04-28 Benjamin Poulain <bpoulain@apple.com>
1328 [iOS][WK2] Restore the scroll position and scale from the HistoryItem (mostly)
1329 https://bugs.webkit.org/show_bug.cgi?id=132307
1330 <rdar://problem/16031704>
1332 Reviewed by Simon Fraser.
1334 Restore the scroll position and scale on back-forward by restoring the values from HistoryItem.
1335 This covers the common cases, see <rdar://problem/16031704>.
1337 * UIProcess/API/Cocoa/WKWebView.mm:
1338 (-[WKWebView _didCommitLayerTree:WebKit::]):
1339 (-[WKWebView _didCommitLoadForMainFrame]): Deleted.
1340 * UIProcess/API/Cocoa/WKWebViewInternal.h:
1341 * UIProcess/ios/WKContentView.mm:
1342 (-[WKContentView _didCommitLoadForMainFrame]):
1343 Get rid of the old code restoring the scroll position. This is now done by the WebProcess.
1345 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1346 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
1347 Update the scrolling tree after invoking didCommitLayerTree() on the WebPageProxy.
1349 WKContentView and WKWebView states are updated in response to didCommitLayerTree(), the content size
1350 and scale in particular are set there.
1352 After that, the content size/scale is in the same state as the layerTree update, and we can scroll
1353 the content as needed.
1355 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1356 * WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
1357 (WebKit::WebFrameLoaderClient::restoreViewState):
1358 iOS WebKit1 uses a custom restoreViewState(), do the same for WebKit2 since the generic code is #ifdefed out.
1359 This is also necessary for the main frame's state update.
1361 * WebProcess/WebPage/WebPage.h:
1362 * WebProcess/WebPage/ios/WebPageIOS.mm:
1363 (WebKit::WebPage::restorePageState):
1364 Restore the scale and position of the main frame. For now, we assume m_userHasChangedPageScaleFactor is set otherwise
1365 the initial-scale would override the restored value. We will need to fix that, the value should probably be saved with
1368 2014-04-28 Benjamin Poulain <bpoulain@apple.com>
1370 [iOS][WK2] iOS fix after r167867
1371 https://bugs.webkit.org/show_bug.cgi?id=132302
1373 Reviewed by Simon Fraser.
1375 iOS Touch Points uses "phase" for describing the touch points state for historical reasons.
1376 This patch adds state() as a synonym for phase, and revert r167893.
1378 * Shared/WebEvent.h:
1379 (WebKit::WebPlatformTouchPoint::state):
1380 * UIProcess/WebPageProxy.cpp:
1381 (WebKit::areAllTouchPointsReleased):
1383 2014-04-28 Andy Estes <aestes@apple.com>
1385 Fix a transcription error from r167901.
1387 When addressing Darin's review feedback, I moved the iteration of dataArray from
1388 QuickLookDocumentData::append() to WebQuickLookHandleClient::didReceiveDataArray(),
1389 but I forgot to update the context argument to CFArrayApplyFunction() accordingly.
1391 * WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.cpp:
1392 (WebKit::WebQuickLookHandleClient::didReceiveDataArray):
1394 2014-04-28 Enrica Casucci <enrica@apple.com>
1396 [WK2 iOS] Need to show title in the action sheet for images not inside an anchor element.
1397 https://bugs.webkit.org/show_bug.cgi?id=132304
1398 <rdar://problem/16535227>
1400 Reviewed by Benjamin Poulain.
1402 If the image in not inside an anchor tag, we must use the title attribute as
1403 title for the action sheet.
1405 * UIProcess/ios/WKActionSheetAssistant.mm:
1406 (-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]):
1408 2014-04-28 Tim Horton <timothy_horton@apple.com>
1410 WebKit2 View Gestures (Swipe): Discard snapshots made with a different view size/pixel density
1411 https://bugs.webkit.org/show_bug.cgi?id=132115
1413 Reviewed by Simon Fraser.
1415 We shouldn't try to use snapshots if they no longer match the destination view size.
1416 To do this, we need an accurate understanding of the topContentInset, both for the Web view,
1417 and for any custom views, because we don't want to include the inset area in the snapshot,
1418 and we don't want to reject snapshots that differ from the current view only because they have an inset or not.
1420 * UIProcess/API/Cocoa/WKViewPrivate.h:
1421 * UIProcess/API/mac/WKView.mm:
1422 (-[WKView _takeViewSnapshot]):
1423 (-[WKView _setCustomSwipeViewsTopContentInset:]):
1424 Add and plumb through a topContentInset property to apply to the custom swipe views.
1425 For simplicitly's sake in the multi-view case, it is applied in window coordinates,
1426 so clients will have to do conversions if necessary.
1427 Don't include the top content inset in the snapshot that is taken.
1429 * UIProcess/mac/ViewGestureController.h:
1430 (WebKit::ViewGestureController::setCustomSwipeViewsTopContentInset):
1431 * UIProcess/mac/ViewGestureControllerMac.mm:
1432 (WebKit::ViewGestureController::ViewGestureController):
1433 (WebKit::ViewGestureController::windowRelativeBoundsForCustomSwipeViews):
1434 Apply the aforementioned custom swipe view top content inset.
1436 (WebKit::ViewGestureController::determineSnapshotLayerParent):
1437 (WebKit::ViewGestureController::determineLayerAdjacentToSnapshotForParent):
1438 Factor these out of beginSwipeGesture.
1440 (WebKit::ViewGestureController::retrieveSnapshotForItem):
1441 Don't return a snapshot if the current deviceScaleFactor doesn't match that
1442 at which the snapshot was taken, or if the size of the snapshot doesn't match
1443 the unobscured part of the snapshot layer (the layer's size sans top content inset).
1445 (WebKit::layerGeometryFlippedToRoot): Added.
1446 Determine whether geometry flipping occurs between a layer and the root of the tree it is in.
1448 (WebKit::ViewGestureController::applyDebuggingPropertiesToSwipeViews):
1449 Factor out debugging layer properties, and add some borders and backgrounds to our layers.
1450 I switched to invert instead of blur because blur makes the borders hard to use.
1452 (WebKit::ViewGestureController::beginSwipeGesture):
1453 Add an additional layer, the swipeLayer, which is the parent of the swipeSnapshotLayer.
1454 We use this layer to compensate for geometry flipping, since we don't necessarily
1455 know the structure of the layer tree ahead of time when inserting snapshots into the
1456 client's layer tree, in the custom swipe view case.
1457 The swipe layer is always the full size of the view, including topContentInset, and
1458 has a white background in order to fill in that space. The snapshot layer is the size
1459 of the view *excluding* the topContentInset, which should match the size of the snapshot image
1460 itself (and we reject the image and just paint white if this is not the case).
1462 (WebKit::ViewGestureController::handleSwipeGesture):
1463 (WebKit::ViewGestureController::removeSwipeSnapshot):
1464 Move and remove the new swipeLayer.
1466 * UIProcess/mac/ViewSnapshotStore.h:
1467 * UIProcess/mac/ViewSnapshotStore.mm:
1468 (WebKit::ViewSnapshotStore::recordSnapshot):
1469 Store the deviceScaleFactor at the time the snapshot was taken.
1470 Fix a bug where the count of snapshots with live images was too high
1471 because we were failing to decrement it when replacing a snapshot of
1472 an existing item with a fresh one.
1474 2014-04-28 Enrica Casucci <enrica@apple.com>
1476 WK2 iOS: crash when handling a synthetic keyboard event.
1477 https://bugs.webkit.org/show_bug.cgi?id=132296
1478 <rdar://problem/16469726>
1480 Reviewed by Benjamin Poulain.
1482 Adding a null check, since synthetic keyboard events do not
1483 have a corresponding platform event. We already do this on OS X.
1485 * WebProcess/WebPage/ios/WebPageIOS.mm:
1486 (WebKit::WebPage::handleEditingKeyboardEvent):
1488 2014-04-24 Andy Estes <aestes@apple.com>
1490 [iOS] Implement WebQuickLookHandleClient for WebKit2
1491 https://bugs.webkit.org/show_bug.cgi?id=132157
1493 Reviewed by Darin Adler.
1495 * Shared/API/Cocoa/_WKNSFileManagerExtras.h: Added.
1496 * Shared/API/Cocoa/_WKNSFileManagerExtras.mm: Added.
1497 (+[NSFileManager _web_createTemporaryFileForQuickLook:]): Called WebCore::createTemporaryFileForQuickLook().
1498 * Shared/ios/QuickLookDocumentData.cpp: Added.
1499 (WebKit::QuickLookDocumentData::QuickLookDocumentData):
1500 (WebKit::QuickLookDocumentData::append): Appened each CFDataRef to m_data and added their sizes to m_size.
1501 (WebKit::QuickLookDocumentData::decodedData): Returned the combined CFDataRef created by decode().
1502 Named this method 'decodedData' to indicate that it should only be called on objects populated by decode().
1503 (WebKit::QuickLookDocumentData::clear): Cleared m_data and reset m_size to 0.
1504 (WebKit::QuickLookDocumentData::encode): Implemented a custom encoding function to avoid having to combine
1505 m_data into contiguous memory at encoding time. Encoded m_size then sequentially encoded each member of m_data.
1506 (WebKit::QuickLookDocumentData::decode): Decoded the byte stream into a single CFDataRef. Eagerly copied the
1507 decoded data rather than using a DataReference since we know this will outlive the decoder.
1508 * Shared/ios/QuickLookDocumentData.h: Added.
1509 * UIProcess/API/APILoaderClient.h:
1510 (API::LoaderClient::didStartLoadForQuickLookDocumentInMainFrame):
1511 (API::LoaderClient::didFinishLoadForQuickLookDocumentInMainFrame):
1512 * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
1513 * UIProcess/Cocoa/NavigationState.h:
1514 * UIProcess/Cocoa/NavigationState.mm:
1515 (WebKit::NavigationState::setNavigationDelegate):
1516 (WebKit::NavigationState::LoaderClient::didStartLoadForQuickLookDocumentInMainFrame):
1517 (WebKit::NavigationState::LoaderClient::didFinishLoadForQuickLookDocumentInMainFrame):
1518 * UIProcess/WebPageProxy.h:
1519 * UIProcess/WebPageProxy.messages.in:
1520 * UIProcess/ios/WebPageProxyIOS.mm:
1521 (WebKit::WebPageProxy::didStartLoadForQuickLookDocumentInMainFrame):
1522 (WebKit::WebPageProxy::didFinishLoadForQuickLookDocumentInMainFrame):
1523 * WebKit2.xcodeproj/project.pbxproj:
1524 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1525 * WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
1526 (WebKit::WebFrameLoaderClient::didCreateQuickLookHandle):
1527 * WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.cpp: Added.
1528 (WebKit::WebQuickLookHandleClient::WebQuickLookHandleClient): Sent DidStartLoadForQuickLookDocumentInMainFrame
1530 (WebKit::WebQuickLookHandleClient::didReceiveDataArray): Appended dataArray to m_data.
1531 (WebKit::WebQuickLookHandleClient::didFinishLoading): Sent DidFinishLoadForQuickLookDocumentInMainFrame to
1532 WebPageProxy and then cleared m_data.
1533 (WebKit::WebQuickLookHandleClient::didFail): Cleared m_data.
1534 * WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.h: Added.
1535 (WebKit::WebQuickLookHandleClient::create):
1537 2014-04-28 Brady Eidson <beidson@apple.com>
1539 Hide service controls for selection behind a runtime switch
1540 <rdar://problem/16736616> and https://bugs.webkit.org/show_bug.cgi?id=132291
1542 Reviewed by Tim Horton.
1544 * Shared/WebPreferencesStore.h:
1546 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1547 (WebKit::WebEditorClient::selectionRectsDidChange): Do nothing if the UI is disabled.
1549 * WebProcess/WebPage/WebPage.cpp:
1550 (WebKit::WebPage::WebPage):
1551 (WebKit::WebPage::updatePreferences):
1553 * WebProcess/WebPage/WebPage.h:
1554 (WebKit::WebPage::serviceControlsEnabled):
1556 2014-04-28 Commit Queue <commit-queue@webkit.org>
1558 Unreviewed, rolling out r167853.
1559 https://bugs.webkit.org/show_bug.cgi?id=132288
1561 caused crashes+timeouts+layout test failures described in the
1562 bug (Requested by thorton on #webkit).
1566 "Coalesce responses on network process side"
1567 https://bugs.webkit.org/show_bug.cgi?id=132229
1568 http://trac.webkit.org/changeset/167853
1570 2014-04-28 Simon Fraser <simon.fraser@apple.com>
1574 * UIProcess/WebPageProxy.cpp:
1575 (WebKit::areAllTouchPointsReleased):
1577 2014-04-24 Simon Fraser <simon.fraser@apple.com>
1579 [iOS WK2] Make subview rebuilding more incremental
1580 https://bugs.webkit.org/show_bug.cgi?id=132162
1581 <rdar://problem/16718916>
1583 Reviewed by Sam Weinig.
1585 Previously we did bulk replacement of subviews, but that triggers
1586 UIKit to send spurious will/DidMoveToWindow messages, which can
1587 interfere with UIScrollView scrolling.
1589 Make _web_setSubviews more incremental, only removing
1590 deleted subviews, adding new ones, and moving existing ones
1591 into the correct order.
1593 * Shared/mac/RemoteLayerTreePropertyApplier.mm:
1594 (-[UIView _web_setSubviews:]):
1596 2014-04-24 Simon Fraser <simon.fraser@apple.com>
1598 [iOS WK2] flickery scrolling with overflow-scrolling:touch
1599 https://bugs.webkit.org/show_bug.cgi?id=132150
1600 <rdar://problem/16683006>
1602 Reviewed by Tim Horton.
1604 Maintain a flag that tells us if the user is interacting
1605 with the UIScrollView, and while set, don't clobber the contentOffset
1606 via scrolling tree updates.
1608 * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
1609 (-[WKOverflowScrollViewDelegate initWithScrollingTreeNode:WebKit::]):
1610 (-[WKOverflowScrollViewDelegate scrollViewWillBeginDragging:]):
1611 (-[WKOverflowScrollViewDelegate scrollViewDidEndDragging:willDecelerate:]):
1612 (-[WKOverflowScrollViewDelegate scrollViewDidEndDecelerating:]): We need this one,
1613 not scrollViewDidEndScrollingAnimation:, to detect the end of decleration.
1614 (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren):
1615 (-[WKOverflowScrollViewDelegate scrollViewDidEndScrollingAnimation:]): Deleted.
1617 2014-04-28 Krzysztof Wolanski <k.wolanski@samsung.com>
1619 [X11] Add missing case for mime type application/x-webkit-test-netscape
1620 https://bugs.webkit.org/show_bug.cgi?id=132278
1622 Reviewed by Darin Adler.
1624 Case for x-webkit-test-netscape has been omitted along with r167759.
1626 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1627 (WebKit::NetscapePlugin::initialize):
1629 2014-04-28 Zan Dobersek <zdobersek@igalia.com>
1631 [WK2][X11] NetscapePluginModule::scanPlugin() should write UTF-8 strings to stdout
1632 https://bugs.webkit.org/show_bug.cgi?id=132245
1634 Reviewed by Carlos Garcia Campos.
1636 NetscapePluginModule::scanPlugin(), in the helper writeLine function, takes each character
1637 of the given string and writes it out as a UChar, doing two fputc calls for each byte of the
1640 This fails badly with characters with integer value less than 256 as the most significant byte
1641 of the UChar is written out as a null character. This effectively chops the output that's gathered
1642 in the UIProcess and is parsed in PluginProcessProxy::scanPlugin().
1644 To avoid all this, the UTF-8 encoding of the string is written out in the PluginProcess, and
1645 String::fromUTF8() is called in the UIProcess to properly decode the received string.
1647 * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
1648 (WebKit::writeCharacter):
1649 (WebKit::writeLine):
1650 (WebKit::writeByte): Deleted.
1651 * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
1652 (WebKit::PluginProcessProxy::scanPlugin):
1654 2014-04-28 Zan Dobersek <zdobersek@igalia.com>
1656 [GTK][WK2] Missing return statement in webkit_plugin_get_description()
1657 https://bugs.webkit.org/show_bug.cgi?id=132263
1659 Reviewed by Carlos Garcia Campos.
1661 * UIProcess/API/gtk/WebKitPlugin.cpp:
1662 (webkit_plugin_get_description): Actually return the data of the cached
1663 plugin description CString.
1665 2014-04-28 Carlos Garcia Campos <cgarcia@igalia.com>
1667 [GTK] Crash in debug build with removing windowed plugin child widgets from the view
1668 https://bugs.webkit.org/show_bug.cgi?id=132252
1670 Reviewed by Philippe Normand.
1672 It crashes due to an assert in HashTable that checks the iterators
1673 validity. The problem is that we are iterating the children map
1674 and the callback called on every iteration might modify the map,
1675 making the iterators invalid. This happens when the WebView is
1676 destroyed, GtkContainer calls gtk_container_foreach() with
1677 gtk_widget_destroy as callback. When a widget inside a container
1678 is destroyed, it's removed from the container, and in our case,
1679 the child widget is removed from the map. This fixes several
1680 crashes when running layout tests in debug bot.
1682 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1683 (webkitWebViewBaseContainerForall): Use copyKeysToVector() instead
1684 of using a range iterator for the map keys and check in every
1685 iteration that the child widget from the keys vector is still
1686 present in the map before calling the callback.
1688 2014-04-28 Carlos Garcia Campos <cgarcia@igalia.com>
1690 [GTK] GObject introspection links to installed libs when using jhbuild
1691 https://bugs.webkit.org/show_bug.cgi?id=132220
1693 Reviewed by Martin Robinson.
1695 The problem is that gobject-introspection is linking the temporary
1696 binaries adding the library paths present LDFLAGS environment
1697 variable first, taking precedence over the libraries in the build
1698 dir. Since the libraries paths of the dependencies are already
1699 correctly deduced by gobject-introspection using ldd, we can
1700 just unset the LDFLAGS variable before calling g-ir-scanner to
1701 make sure the libraries in the build dir take predence.
1703 * PlatformGTK.cmake:
1705 2014-04-27 Tim Horton <timothy_horton@apple.com>
1707 REGRESSION (r164702): Double tap doesn't stay under the new element once the animation finishes
1708 https://bugs.webkit.org/show_bug.cgi?id=132239
1709 <rdar://problem/16192842>
1711 Reviewed by Darin Adler.
1713 * WebProcess/WebPage/WebPage.cpp:
1714 (WebKit::WebPage::scalePage):
1715 The change in r167864 broke iOS animated resize, because it was depending on
1716 the dynamic size update code not running if the scale wasn't going to change.
1717 So, as a band-aid we should bail from doing that work if the scales aren't different.
1718 In the long term we should try to untangle this code and make it less platform dependent.
1720 2014-04-27 Eunmi Lee <eunmi15.lee@samsung.com>
1722 TouchEvent is not handled after releasing any point among touched points.
1723 https://bugs.webkit.org/show_bug.cgi?id=132043
1725 Reviewed by Benjamin Poulain.
1727 Handle TouchEvent until all touched points are released by setting
1728 trackingTouchEvents variable to false when all points are released.
1730 * UIProcess/WebPageProxy.cpp:
1731 (WebKit::areAllTouchPointsReleased):
1732 (WebKit::WebPageProxy::handleTouchEventSynchronously):
1733 (WebKit::WebPageProxy::handleTouchEventAsynchronously):
1734 (WebKit::WebPageProxy::handleTouchEvent):
1736 2014-04-27 Alexey Proskuryakov <ap@apple.com>
1738 Don't use DispatchMessageEvenWhenWaitingForSyncReply for messages from NetworkProcess
1739 https://bugs.webkit.org/show_bug.cgi?id=132144
1741 Reviewed by Darin Adler.
1743 * NetworkProcess/AsynchronousNetworkLoaderClient.cpp:
1744 (WebKit::AsynchronousNetworkLoaderClient::willSendRequest):
1745 (WebKit::AsynchronousNetworkLoaderClient::canAuthenticateAgainstProtectionSpace):
1746 Dont use the IPC::DispatchMessageEvenWhenWaitingForSyncReply flag. It's not needed,
1747 almost never works in NetworkProcess, but may cause trouble if it did.
1749 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1750 (WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess): Removed
1751 setOnlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage()
1752 function call, because there are no more any messages in NetworkProcess it could affect.
1754 * Platform/IPC/Connection.cpp: (IPC::Connection::dispatchMessage): Added a FIXME
1755 for an unrelated bug Anders and myself noticed while looking into this.
1757 2014-04-27 Dan Bernstein <mitz@apple.com>
1759 [Cocoa] -[WKWebProcessPlugInController parameters] returns nil if no parameters have been set yet
1760 https://bugs.webkit.org/show_bug.cgi?id=132223
1762 Reviewed by Sam Weinig.
1764 * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
1765 (WebKit::InjectedBundle::bundleParameters): Create the WKWebProcessBundleParameters if
1768 2014-04-27 Tim Horton <timothy_horton@apple.com>
1770 REGRESSION (r164702): Double tap doesn't stay under the new element once the animation finishes
1771 https://bugs.webkit.org/show_bug.cgi?id=132239
1772 <rdar://problem/16192842>
1774 Reviewed by Sam Weinig.
1776 * WebProcess/WebPage/WebPage.cpp:
1777 (WebKit::WebPage::scalePage):
1778 The early-return added to WebPage::scalePage breaks callers who depend
1779 on being able to call scalePage() with the same scale but a different
1780 origin and having that change take effect.
1782 Page::setPageScaleFactor already has the requisite logic, so move
1783 the early return down after that call, and guard only notification
1784 of page scale changes.
1786 2014-04-25 Andy Estes <aestes@apple.com>
1788 [iOS] Stop creating a WKWebResourceQuickLookDelegate for every WebResourceLoader
1789 https://bugs.webkit.org/show_bug.cgi?id=132215
1791 Reviewed by Dan Bernstein.
1793 * WebKit2.xcodeproj/project.pbxproj:
1794 * WebProcess/Network/WebResourceLoader.cpp:
1795 (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): Called QuickLookHandle::create() directly.
1796 * WebProcess/Network/WebResourceLoader.h:
1797 * WebProcess/ios/WebResourceLoaderIOS.mm: Removed.
1799 2014-04-27 Sam Weinig <sam@webkit.org>
1801 [iOS WebKit2] Add support for text autosizing
1802 <rdar://problem/16545245>
1803 https://bugs.webkit.org/show_bug.cgi?id=132237
1805 Reviewed by Tim Horton.
1807 * Shared/WebPageCreationParameters.cpp:
1808 (WebKit::WebPageCreationParameters::encode):
1809 (WebKit::WebPageCreationParameters::decode):
1810 * Shared/WebPageCreationParameters.h:
1811 * UIProcess/WebPageProxy.cpp:
1812 (WebKit::WebPageProxy::creationParameters):
1813 * UIProcess/WebPageProxy.h:
1814 * UIProcess/ios/WebPageProxyIOS.mm:
1815 (WebKit::WebPageProxy::textAutosizingWidth):
1816 * WebProcess/WebPage/WebPage.cpp:
1817 (WebKit::WebPage::WebPage):
1818 Pass the text autosizing width from the UIProcess to WebProcess.
1820 2014-04-27 Tim Horton <timothy_horton@apple.com>
1822 WebKit2 View Gestures (Zoom): Pages with 'background-attachment: fixed' don't behave correctly when zoomed
1823 https://bugs.webkit.org/show_bug.cgi?id=132225
1824 <rdar://problem/15729975>
1826 Reviewed by Darin Adler.
1828 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1829 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1830 (WebKit::TiledCoreAnimationDrawingArea::layerForTransientZoom):
1831 (WebKit::TiledCoreAnimationDrawingArea::shadowLayerForTransientZoom):
1832 (WebKit::TiledCoreAnimationDrawingArea::adjustTransientZoom):
1833 (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
1834 (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
1835 Factor out code to choose which layer (and shadow layer) to apply the transient zoom to.
1836 If we have a contentsContainmentLayer (because we have composited background-attachment: fixed),
1837 it applies page scale, so we should apply the transient zoom to that layer
1838 instead of the RenderView's main GraphicsLayer.
1840 2014-04-27 Pratik Solanki <psolanki@apple.com>
1842 Unreviewed. iOS build fix.
1844 * UIProcess/ios/SmartMagnificationController.h:
1846 2014-04-27 Zan Dobersek <zdobersek@igalia.com>
1848 Move cross-port WebKit2 code to std::unique_ptr
1849 https://bugs.webkit.org/show_bug.cgi?id=129670
1851 Reviewed by Darin Adler.
1853 Replace uses of OwnPtr, PassOwnPtr in cross-port WebKit2 code with std::unique_ptr.
1855 * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
1856 (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createIndex):
1857 * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
1858 * NetworkProcess/NetworkProcess.h:
1859 (WebKit::NetworkProcess::addSupplement):
1860 * NetworkProcess/SynchronousNetworkLoaderClient.cpp:
1861 (WebKit::SynchronousNetworkLoaderClient::didReceiveBuffer):
1862 * NetworkProcess/SynchronousNetworkLoaderClient.h:
1863 * Platform/IPC/Connection.cpp:
1864 (IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
1865 * Platform/IPC/Connection.h:
1866 * Platform/IPC/MessageReceiver.h:
1867 * Platform/Module.h:
1868 * Platform/WorkQueue.h:
1869 * Platform/efl/ModuleEfl.cpp:
1870 (WebKit::Module::load):
1871 * Platform/mac/LayerHostingContext.mm:
1873 * Shared/Network/CustomProtocols/CustomProtocolManager.h:
1874 * Shared/Plugins/NPRemoteObjectMap.cpp:
1875 * Shared/ShareableBitmap.h:
1876 * UIProcess/DrawingAreaProxyImpl.h:
1877 * UIProcess/InspectorServer/WebSocketServer.cpp:
1878 (WebKit::WebSocketServer::didAcceptConnection):
1879 (WebKit::WebSocketServer::didCloseWebSocketServerConnection):
1880 * UIProcess/InspectorServer/WebSocketServer.h:
1881 * UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp:
1882 (WebKit::connectionCallback):
1883 * UIProcess/Network/NetworkProcessProxy.cpp:
1884 (WebKit::NetworkProcessProxy::createDownloadProxy):
1885 * UIProcess/Network/NetworkProcessProxy.h:
1886 * UIProcess/Notifications/WebNotificationManagerProxy.h:
1887 * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
1888 (WebKit::WebPluginSiteDataManager::getSitesWithData):
1889 (WebKit::WebPluginSiteDataManager::clearSiteData):
1890 (WebKit::WebPluginSiteDataManager::didGetSitesWithDataForAllPlugins):
1891 (WebKit::WebPluginSiteDataManager::didClearSiteDataForAllPlugins):
1892 * UIProcess/Plugins/WebPluginSiteDataManager.h:
1893 * UIProcess/Storage/StorageManager.cpp:
1894 (WebKit::callCallbackFunction):
1895 (WebKit::StorageManager::getOriginsInternal):
1896 * UIProcess/WebPageProxy.cpp:
1897 (WebKit::ExceededDatabaseQuotaRecords::areBeingProcessed):
1898 (WebKit::ExceededDatabaseQuotaRecords::createRecord):
1899 (WebKit::ExceededDatabaseQuotaRecords::add):
1900 (WebKit::ExceededDatabaseQuotaRecords::next):
1901 (WebKit::WebPageProxy::handleMouseEvent):
1902 (WebKit::WebPageProxy::handleWheelEvent):
1903 (WebKit::WebPageProxy::processNextQueuedWheelEvent):
1904 (WebKit::WebPageProxy::internalShowContextMenu):
1905 * UIProcess/WebPageProxy.h:
1906 * UIProcess/WebProcessProxy.cpp:
1907 (WebKit::WebProcessProxy::createDownloadProxy):
1908 * UIProcess/WebProcessProxy.h:
1909 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1910 (WebKit::PluginDestructionProtector::PluginDestructionProtector):
1911 * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
1912 (WebKit::NetscapePluginStream::deliverData):
1913 * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
1914 * WebProcess/Plugins/PluginProcessConnectionManager.h:
1915 * WebProcess/Plugins/PluginProxy.cpp:
1916 (WebKit::PluginProxy::initialize):
1917 (WebKit::PluginProxy::didCreatePluginInternal):
1918 (WebKit::PluginProxy::didFailToCreatePluginInternal):
1919 * WebProcess/Plugins/PluginProxy.h:
1920 * WebProcess/Plugins/PluginView.cpp:
1921 (WebKit::PluginView::createWebEvent):
1922 (WebKit::PluginView::handleEvent):
1923 * WebProcess/Plugins/PluginView.h:
1924 * WebProcess/WebCoreSupport/WebPopupMenu.h:
1925 * WebProcess/WebPage/EventDispatcher.cpp:
1926 (WebKit::EventDispatcher::EventDispatcher):
1927 * WebProcess/WebPage/EventDispatcher.h:
1928 * WebProcess/WebPage/WebPage.cpp:
1929 (WebKit::WebPage::WebPage):
1930 (WebKit::WebPage::beginPrinting):
1931 * WebProcess/WebPage/WebPage.h:
1932 * WebProcess/WebProcess.h:
1933 (WebKit::WebProcess::addSupplement):
1935 2014-04-27 Antti Koivisto <antti@apple.com>
1937 Coalesce responses on network process side
1938 https://bugs.webkit.org/show_bug.cgi?id=132229
1940 Reviewed by Andreas Kling.
1942 To reduce IPC we should coalesce response data in the network process and send it over with single IPC call.
1944 * NetworkProcess/AsynchronousNetworkLoaderClient.cpp:
1945 (WebKit::AsynchronousNetworkLoaderClient::AsynchronousNetworkLoaderClient):
1946 (WebKit::AsynchronousNetworkLoaderClient::didReceiveResponse):
1947 (WebKit::AsynchronousNetworkLoaderClient::didReceiveBuffer):
1948 (WebKit::AsynchronousNetworkLoaderClient::didFinishLoading):
1949 (WebKit::AsynchronousNetworkLoaderClient::didFail):
1950 (WebKit::AsynchronousNetworkLoaderClient::dispatchPartialCoalescedResponse):
1951 (WebKit::AsynchronousNetworkLoaderClient::clearCoalescedResponse):
1952 (WebKit::AsynchronousNetworkLoaderClient::responseCoalesceTimerFired):
1954 Coalesce the response. Completed response is sent on didFinishLoading. If the coalesce timer fires
1955 before that the data accumulated so far is dispatched.
1957 * NetworkProcess/AsynchronousNetworkLoaderClient.h:
1958 * NetworkProcess/NetworkResourceLoader.h:
1959 * WebProcess/Network/WebResourceLoader.cpp:
1960 (WebKit::WebResourceLoader::didReceiveCompleteResponse):
1961 * WebProcess/Network/WebResourceLoader.h:
1962 * WebProcess/Network/WebResourceLoader.messages.in:
1964 Add a new message type that covers didReceiveResponse, didReceiveBuffer and didFinishLoading in a single message.
1966 2014-04-26 Tim Horton <timothy_horton@apple.com>
1968 REGRESSION (r167775): Safari crashes in ViewSnapshotStore::pruneSnapshots after loading 20 pages
1969 https://bugs.webkit.org/show_bug.cgi?id=132204
1970 <rdar://problem/16735622>
1972 Reviewed by Dan Bernstein and Sam Weinig.
1974 * UIProcess/mac/ViewSnapshotStore.mm:
1975 (WebKit::ViewSnapshotStore::pruneSnapshots):
1976 (WebKit::ViewSnapshotStore::recordSnapshot):
1977 Fix a bug where the count of snapshots with live images was too high
1978 because we were failing to decrement it when replacing a snapshot of
1979 an existing item with a fresh one.
1981 2014-04-26 Dan Bernstein <mitz@apple.com>
1983 [Cocoa] Rename a bundle form delegate method
1984 https://bugs.webkit.org/show_bug.cgi?id=132221
1986 Reviewed by Adele Peterson.
1988 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Renamed.
1989 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
1990 (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Check for the method
1991 under the old (“new”) name and under the new name.
1993 2014-04-25 Dan Bernstein <mitz@apple.com>
1995 [Cocoa] Synthesized getter for WKNavigationAction's _userInitiated property has the wrong name
1996 https://bugs.webkit.org/show_bug.cgi?id=132219
1998 Reviewed by Sam Weinig.
2000 * UIProcess/API/Cocoa/WKNavigationActionInternal.h:
2002 2014-04-25 Simon Fraser <simon.fraser@apple.com>
2004 [iOS] getAssistedNodeInformation crashes getting the bounding box if it doesn't have a renderer
2005 https://bugs.webkit.org/show_bug.cgi?id=132217
2006 <rdar://problem/16671662>
2008 Reviewed by Dean Jackson.
2010 * WebProcess/WebPage/ios/WebPageIOS.mm:
2011 (WebKit::WebPage::getAssistedNodeInformation): Check that m_assistedNode has
2012 a renderer before asking for its bounding box.
2014 2014-04-25 Benjamin Poulain <bpoulain@apple.com>
2016 [iOS][WK2] Add an intermediary view to do the target transform and adjustment transform
2017 https://bugs.webkit.org/show_bug.cgi?id=132175
2019 Reviewed by Enrica Casucci.
2021 Some utility views of WKContentView account for the transforms between the content view
2022 and the utility view.
2024 Since the dynamic resize relies on setting subLayerTransforms, it is getting in the way.
2026 This patch adds a layer in between for the animation. That way the content view remains
2029 * UIProcess/API/Cocoa/WKWebView.mm:
2030 (-[WKWebView _didCommitLayerTree:WebKit::]):
2031 (-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:]):
2032 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
2033 (-[WKWebView _endAnimatedResize]):
2035 2014-04-25 Enrica Casucci <enrica@apple.com>
2037 REGRESSION (iOS WebKit2): Selection is not being repainted during live resize.
2038 https://bugs.webkit.org/show_bug.cgi?id=132216
2039 <rdar://problem/16628819>
2041 Reviewed by Benjamin Poulain.
2043 Since the selection is drawn in the UIProcess on iOS,
2044 we need to update the selection rects and force a repaint
2045 during a live resize.
2047 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2048 (WebKit::WebFrameLoaderClient::dispatchDidLayout):
2049 * WebProcess/WebPage/WebPage.h:
2050 * WebProcess/WebPage/ios/WebPageIOS.mm:
2051 (WebKit::WebPage::updateSelectionAppearance):
2053 2014-04-25 Brady Eidson <beidson@apple.com>
2055 Add a selection overlay.
2056 <rdar://problem/16727797> and https://bugs.webkit.org/show_bug.cgi?id=132200
2058 Reviewed by David Hyatt.
2060 * WebKit2.xcodeproj/project.pbxproj:
2062 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2063 (WebKit::WebEditorClient::selectionRectsDidChange): Pass the new selection rects on
2064 to the selection overlay controller.
2065 * WebProcess/WebCoreSupport/WebEditorClient.h:
2067 * WebProcess/WebPage/SelectionOverlayController.cpp: Added.
2068 (WebKit::SelectionOverlayController::SelectionOverlayController):
2069 (WebKit::SelectionOverlayController::createOverlayIfNeeded):
2070 (WebKit::SelectionOverlayController::destroyOverlay):
2071 (WebKit::SelectionOverlayController::pageOverlayDestroyed):
2072 (WebKit::SelectionOverlayController::willMoveToWebPage):
2073 (WebKit::SelectionOverlayController::didMoveToWebPage):
2074 (WebKit::SelectionOverlayController::selectionRectsDidChange):
2075 (WebKit::SelectionOverlayController::drawRect):
2076 (WebKit::SelectionOverlayController::mouseEvent):
2077 * WebProcess/WebPage/SelectionOverlayController.h: Added.
2078 (WebKit::SelectionOverlayController::create):
2079 * WebProcess/WebPage/mac/SelectionOverlayControllerMac.mm: Added.
2080 (WebKit::SelectionOverlayController::drawRect):
2081 (WebKit::SelectionOverlayController::mouseEvent):
2082 (WebKit::SelectionOverlayController::handleClick):
2083 (WebKit::SelectionOverlayController::clearHighlight):
2085 * WebProcess/WebPage/WebPage.cpp:
2086 (WebKit::WebPage::selectionOverlayController):
2087 * WebProcess/WebPage/WebPage.h:
2089 2014-04-25 Enrica Casucci <enrica@apple.com>
2091 Remove duplicate member variable in WKAutocorrectionRects and WKAutocorrectionContext.
2092 https://bugs.webkit.org/show_bug.cgi?id=132206
2094 Reviewed by Benjamin Poulain.
2096 * UIProcess/ios/WKContentViewInteraction.mm:
2098 2014-04-25 Dean Jackson <dino@apple.com>
2100 Allow a platform-specific size enumeration to be passed into popup-menu display
2101 https://bugs.webkit.org/show_bug.cgi?id=132195
2103 Reviewed by Brent Fulgham. With some in-person review comments from Sam Weinig.
2105 Platforms like OS X use a set of predefined sizes for built-in controls
2106 used for <select>: normal, small and mini. Expose that information to
2107 the PopupMenuClient via the PopupMenuStyle, allowing it to be passed
2108 into the platform code in WebKitSystemInterface.
2110 * Shared/PlatformPopupMenuData.cpp: Encode and decode the PopupMenuSize enum.
2111 (WebKit::PlatformPopupMenuData::encode):
2112 (WebKit::PlatformPopupMenuData::decode):
2113 * Shared/PlatformPopupMenuData.h: Add PopupMenuSize member variable.
2114 * UIProcess/mac/WebPopupMenuProxyMac.mm:
2115 (WebKit::WebPopupMenuProxyMac::showPopupMenu): Convert the PopupMenuSize
2116 into a WKControlSize, and pass that into WKPopupMenu.
2117 * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
2118 (WebKit::WebPopupMenu::setUpPlatformData): Add the PopupMenuSize to
2119 the PlatformPopupMenuData.
2121 2014-04-25 Tim Horton <timothy_horton@apple.com>
2123 REGRESSION (r167775): Safari crashes in ViewSnapshotStore::pruneSnapshots after loading 20 pages
2124 https://bugs.webkit.org/show_bug.cgi?id=132204
2125 <rdar://problem/16729123>
2127 Reviewed by Anders Carlsson.
2129 * UIProcess/mac/ViewSnapshotStore.h:
2130 * UIProcess/mac/ViewSnapshotStore.mm:
2131 (WebKit::ViewSnapshotStore::ViewSnapshotStore):
2132 (WebKit::ViewSnapshotStore::pruneSnapshots):
2133 (WebKit::ViewSnapshotStore::recordSnapshot):
2134 Keep track of the number of snapshots that actually have live images; the
2135 size of the snapshot map no longer represents that.
2136 Also, fix the crash by using the UUID from the current item instead of from
2137 the (potentially null) most distant item; r167775 accidentally typo'd this.
2139 2014-04-25 Carlos Garcia Campos <cgarcia@igalia.com>
2141 [GTK] Plugin process crashes with GTK2 windowed plugins
2142 https://bugs.webkit.org/show_bug.cgi?id=132127
2144 Reviewed by Martin Robinson.
2146 It happens sometimes because the socket is used before the plug
2147 has been added. A runtime critical warnings is shown and it
2148 sometimes ends up crashing.
2150 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
2151 (WebKit::NetscapePlugin::platformPostInitializeWindowed): Do not
2152 show the plug widget until the socket is connected.
2154 2014-04-24 Andreas Kling <akling@apple.com>
2156 [iOS WebKit2] Enable optimization to mmap downloaded resources once they become file-backed.
2157 <https://webkit.org/b/132171>
2158 <rdar://problem/16720733>
2160 Implement a CFNetwork-based version of NetworkResourceLoader::willCacheResponseAsync()
2161 and activate the DiskCacheMonitor code path. This means that once resources go into
2162 file system cache, we get notified and mmap them from disk, saving heaps of memory.
2164 Reviewed by Antti Koivisto.
2166 * NetworkProcess/NetworkResourceLoader.h:
2167 * NetworkProcess/mac/DiskCacheMonitor.mm:
2168 * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
2169 (WebKit::NetworkResourceLoader::willCacheResponseAsync):
2171 2014-04-24 Andreas Kling <akling@apple.com>
2173 [iOS WebKit2] RemoteLayerTreeDrawingArea should force CA to garbage collect surfaces.
2174 <https://webkit.org/b/132160>
2175 <rdar://problem/16110687>
2177 Do an empty CATransaction at the end of RemoteLayerTreeDrawingArea::flushLayers()
2178 to get CA to garbage collect its IOSurfaces. This helps clean up unused surfaces
2179 that we'd otherwise end up hanging on to for a long time.
2181 Reviewed by Tim Horton.
2183 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2184 (WebKit::RemoteLayerTreeDrawingArea::didUpdate):
2186 2014-04-24 Commit Queue <commit-queue@webkit.org>
2188 Unreviewed, rolling out r167700.
2189 https://bugs.webkit.org/show_bug.cgi?id=132142
2191 Incorrectly reverted the change in r167547 for
2192 webkit.org/b/131898 (Requested by rniwa on #webkit).
2196 "Cursor doesn't change back to pointer when leaving the Safari
2198 https://bugs.webkit.org/show_bug.cgi?id=132038
2199 http://trac.webkit.org/changeset/167700
2201 2014-04-24 Brady Eidson <beidson@apple.com>
2203 Rename "IMAGE_CONTROLS" feature to "SERVICE_CONTROLS"
2204 https://bugs.webkit.org/show_bug.cgi?id=132155
2206 Reviewed by Tim Horton.
2208 * Configurations/FeatureDefines.xcconfig:
2209 * Shared/ContextMenuContextData.cpp:
2210 (WebKit::ContextMenuContextData::ContextMenuContextData):
2211 (WebKit::ContextMenuContextData::operator=):
2212 (WebKit::ContextMenuContextData::encode):
2213 (WebKit::ContextMenuContextData::decode):
2214 * Shared/ContextMenuContextData.h:
2215 * UIProcess/WebPageProxy.cpp:
2216 (WebKit::WebPageProxy::internalShowContextMenu):
2217 * UIProcess/WebPageProxy.h:
2218 * UIProcess/mac/WebContextMenuProxyMac.h:
2219 * UIProcess/mac/WebContextMenuProxyMac.mm:
2220 (WebKit::WebContextMenuProxyMac::contextMenuItemSelected):
2221 (WebKit::WebContextMenuProxyMac::populate):
2222 (WebKit::WebContextMenuProxyMac::showContextMenu):
2223 * WebProcess/InjectedBundle/InjectedBundle.cpp:
2224 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2225 * WebProcess/WebPage/WebContextMenu.cpp:
2226 * WebProcess/WebPage/WebContextMenu.h:
2227 * WebProcess/WebPage/WebPage.cpp:
2228 (WebKit::WebPage::updatePreferences):
2229 * WebProcess/WebPage/WebPage.h:
2230 * WebProcess/WebPage/WebPage.messages.in:
2232 2014-04-24 Joseph Pecoraro <pecoraro@apple.com>
2234 [iOS] Add some missing overrides and remove unnecessary virtuals
2235 https://bugs.webkit.org/show_bug.cgi?id=132153
2237 Reviewed by Darin Adler.
2239 * UIProcess/ios/PageClientImplIOS.h:
2240 * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
2242 2014-04-24 Tim Horton <timothy_horton@apple.com>
2244 WebKit2 View Gestures: Use a single struct for the snapshot, and pass it around
2245 https://bugs.webkit.org/show_bug.cgi?id=132114
2247 Reviewed by Simon Fraser.
2249 Have only a single map in ViewSnapshotStore, from back-forward item
2250 to ViewSnapshotStore::Snapshot, and return the Snapshot struct when looking
2251 up snapshots (via getSnapshot()), so that future patches can persist additional
2252 information along with the snapshot.
2254 * UIProcess/ios/ViewGestureControllerIOS.mm:
2255 (WebKit::ViewGestureController::beginSwipeGesture):
2256 (WebKit::ViewGestureController::endSwipeGesture):
2257 * UIProcess/mac/ViewGestureController.h:
2258 * UIProcess/mac/ViewGestureControllerMac.mm:
2259 (WebKit::ViewGestureController::retrieveSnapshotForItem):
2260 (WebKit::ViewGestureController::beginSwipeGesture):
2261 (WebKit::ViewGestureController::endSwipeGesture):
2262 Adopt getSnapshot() instead of snapshotAndRenderTreeSize().
2263 Move retrieveSnapshotForItem out into a separate function (for future use).
2265 * UIProcess/mac/ViewSnapshotStore.h:
2266 (WebKit::ViewSnapshotStore::disableSnapshotting):
2267 (WebKit::ViewSnapshotStore::enableSnapshotting):
2268 * UIProcess/mac/ViewSnapshotStore.mm:
2269 (WebKit::ViewSnapshotStore::pruneSnapshots):
2270 (WebKit::ViewSnapshotStore::recordSnapshot):
2271 (WebKit::ViewSnapshotStore::getSnapshot):
2272 (WebKit::ViewSnapshotStore::snapshotAndRenderTreeSize): Deleted.
2273 Make Snapshot struct public.
2274 Get rid of the separate map of back-forward items to render tree sizes.
2275 When evicting, instead of removing the entry, clear out its snapshot image;
2276 this way, we can keep other snapshot metadata around.
2278 2014-04-24 Enrica Casucci <enrica@apple.com>
2280 [iOS WebKit2] Should properly handle focus redirect (keyboard state changes when focus changes).
2281 https://bugs.webkit.org/show_bug.cgi?id=132136
2282 <rdar://problem/16238336>
2284 Reviewed by Benjamin Poulain.
2286 Focusing a field from JavaScript should not make the keyboard or the select picker
2287 appear unless the user has already started interacting with one of the fields in the page.
2288 Adding a parameter to StartAssistingNode to indicate whether the focus change is a result
2291 * UIProcess/PageClient.h:
2292 * UIProcess/WebPageProxy.h:
2293 * UIProcess/WebPageProxy.messages.in:
2294 * UIProcess/ios/PageClientImplIOS.h:
2295 * UIProcess/ios/PageClientImplIOS.mm:
2296 (WebKit::PageClientImpl::startAssistingNode):
2297 * UIProcess/ios/WKContentViewInteraction.h:
2298 * UIProcess/ios/WKContentViewInteraction.mm:
2299 (-[WKContentView _startAssistingNode:userIsInteracting:userObject:]):
2300 * UIProcess/ios/WebPageProxyIOS.mm:
2301 (WebKit::WebPageProxy::startAssistingNode):
2302 * WebProcess/WebPage/WebPage.cpp:
2303 (WebKit::WebPage::WebPage):
2304 (WebKit::WebPage::dispatchTouchEvent):
2305 * WebProcess/WebPage/WebPage.h:
2306 * WebProcess/WebPage/ios/WebPageIOS.mm:
2307 (WebKit::WebPage::handleTap):
2308 (WebKit::WebPage::elementDidFocus):
2310 2014-04-24 Myles C. Maxfield <mmaxfield@apple.com>
2312 FontCache::fontCache() never returns nullptr so it can be made to return a reference instead
2313 https://bugs.webkit.org/show_bug.cgi?id=132110
2315 Reviewed by Tim Horton.
2317 Updates callers to use '.' instead of '->'.
2319 No new tests are necessary because there should be no behavior change.
2321 * WebProcess/WebProcess.cpp:
2322 (WebKit::WebProcess::terminate):
2323 (WebKit::WebProcess::didClose):
2324 (WebKit::WebProcess::getWebCoreStatistics):
2326 2014-04-24 Eric Carlson <eric.carlson@apple.com>
2328 [iOS] Manage AudioSession category according to media type
2329 https://bugs.webkit.org/show_bug.cgi?id=132096
2331 Reviewed by Jer Noble.
2333 * WebProcess/WebPage/WebPage.cpp:
2334 (WebKit::WebPage::WebPage): Tell WebCore to manage the AudioSession.
2336 2014-04-24 Tim Horton <timothy_horton@apple.com>
2338 [wk2] Provide SPI allowing clients to hand events directly to swipe code, bypassing scrolling
2339 https://bugs.webkit.org/show_bug.cgi?id=132092
2340 <rdar://problem/15948244>
2342 Reviewed by Darin Adler.
2344 * UIProcess/API/Cocoa/WKViewPrivate.h:
2345 * UIProcess/API/mac/WKView.mm:
2346 (-[WKView _tryToSwipeWithEvent:ignoringPinnedState:]):
2347 Added. Hand the event directly to ViewGestureController, optionally
2348 ignoring whether or not the WKView is scrollable (always pretending that it is not).
2350 * UIProcess/mac/ViewGestureController.h:
2351 (WebKit::ViewGestureController::shouldIgnorePinnedState):
2352 (WebKit::ViewGestureController::setShouldIgnorePinnedState):
2353 * UIProcess/mac/ViewGestureControllerMac.mm:
2354 (WebKit::ViewGestureController::ViewGestureController):
2355 (WebKit::ViewGestureController::scrollEventCanBecomeSwipe):
2356 (WebKit::ViewGestureController::handleScrollWheelEvent):
2357 (WebKit::ViewGestureController::wheelEventWasNotHandledByWebCore):
2358 (WebKit::scrollEventCanBecomeSwipe):
2359 If we're ignoring the view's pinned state, pretend that we're always pinned,
2360 and don't worry about sending events to WebCore.
2362 2014-04-24 Carlos Garcia Campos <cgarcia@igalia.com>
2364 [GTK] wmode='transparent' for flash plugin doesn't work
2365 https://bugs.webkit.org/show_bug.cgi?id=120055
2367 Reviewed by Gustavo Noronha Silva.
2369 Force opaque window mode for flash plugin when wmode='transparent',
2370 since X11 backend doesn't support transparency. We should add
2371 proper transparency support because forcing opaque window mode
2372 doesn't really work. Handle this as a plugin quirk instead of
2373 adding X11 specific code to WebFrameLoaderClient::createPlugin().
2375 * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
2376 (WebKit::NetscapePluginModule::determineQuirks): Add
2377 ForceFlashWindowlessMode quirk for flash in case of EFL platform
2378 because EFL port doesn't support windowed plugins.
2379 * Shared/Plugins/PluginQuirks.h: Add ForceFlashWindowlessMode X11
2381 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2382 (WebKit::NetscapePlugin::initialize): Modify or add wmode
2383 parameter for flash plugin, to force opaque window mode when
2384 transparent mode is specified or when ForceFlashWindowlessMode
2386 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2387 (WebKit::WebFrameLoaderClient::createPlugin): Remove X11 specific code.
2389 2014-04-23 Simon Fraser <simon.fraser@apple.com>
2391 [iOS WK2] Missing content inside long overflow-scrolling:touch
2392 https://bugs.webkit.org/show_bug.cgi?id=132105
2394 Reviewed by Tim Horton.
2396 PlatformCALayerRemote needs to track bounds origin as well as size,
2397 since iOS uses bounds origin for overflow scrolling.
2399 * Shared/mac/RemoteLayerTreePropertyApplier.mm:
2400 (WebKit::applyPropertiesToLayer):
2401 * Shared/mac/RemoteLayerTreeTransaction.h:
2402 * Shared/mac/RemoteLayerTreeTransaction.mm:
2403 (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
2404 (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
2405 (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
2406 (WebKit::dumpChangedLayers):
2407 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
2408 (WebKit::PlatformCALayerRemote::updateBackingStore):
2409 (WebKit::PlatformCALayerRemote::bounds):
2410 (WebKit::PlatformCALayerRemote::setBounds):
2412 2014-04-23 Andreas Kling <akling@apple.com>
2414 Remove unused WKPageSetMemoryCacheClientCallsEnabled API.
2415 <https://webkit.org/b/132098>
2417 This API was added to WK2 back in 2011 but never actually used.
2419 Reviewed by Anders Carlsson.
2421 * Shared/WebPageCreationParameters.cpp:
2422 (WebKit::WebPageCreationParameters::encode):
2423 (WebKit::WebPageCreationParameters::decode):
2424 * Shared/WebPageCreationParameters.h:
2425 * UIProcess/API/C/WKPage.cpp:
2426 (WKPageSetMemoryCacheClientCallsEnabled): Deleted.
2427 * UIProcess/API/C/WKPage.h:
2428 * UIProcess/WebPageProxy.cpp:
2429 (WebKit::WebPageProxy::WebPageProxy):
2430 (WebKit::WebPageProxy::creationParameters):
2431 (WebKit::WebPageProxy::setMemoryCacheClientCallsEnabled): Deleted.
2432 * UIProcess/WebPageProxy.h:
2433 * WebProcess/WebPage/WebPage.cpp:
2434 (WebKit::WebPage::WebPage):
2435 (WebKit::WebPage::setMemoryCacheMessagesEnabled): Deleted.
2436 * WebProcess/WebPage/WebPage.h:
2437 * WebProcess/WebPage/WebPage.messages.in:
2439 2014-04-23 Simon Fraser <simon.fraser@apple.com>
2441 [iOS WK2] Make -webkit-overflow-scrolling:touch work
2442 https://bugs.webkit.org/show_bug.cgi?id=132097
2444 Reviewed by Tim Horton.
2446 Scrolling of UIScrollViews in content (for -webkit-overflow-scrolling:touch)
2447 depends on them getting hit-tested correctly. UIKit hit testing assumes
2448 that subviews are enclosed by their ancestors, but this is not true of
2449 web content. In addition, we had a root layer that was zero sized.
2451 Fix by overriding hitTest:withEvent: on our content WKViews to hit
2452 test subviews even if they are not enclosed.
2454 * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
2455 (-[UIView _recursiveFindDescendantViewAtPoint:withEvent:]):
2456 (-[UIView _findDescendantViewAtPoint:withEvent:]):
2457 (-[WKCompositingView hitTest:withEvent:]):
2458 (-[WKTransformView hitTest:withEvent:]):
2459 (-[WKRemoteView hitTest:withEvent:]):
2460 (WebKit::RemoteLayerTreeHost::createLayer):
2461 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2462 (WebKit::RemoteLayerTreeDrawingArea::updatePreferences):
2463 Update debug borders on the root layer.
2464 (WebKit::RemoteLayerTreeDrawingArea::mainFrameContentSizeChanged):
2465 Size the root layer to the contents size. This isn't strictly necessary
2466 given the hit testing overrides, but seems sensible to do anyway.
2468 2014-04-23 Simon Fraser <simon.fraser@apple.com>
2470 Nonopaque layers double-paint with UI-side compositing
2471 https://bugs.webkit.org/show_bug.cgi?id=132101
2473 Reviewed by Tim Horton.
2475 The non-IOSurface code path was failing to clear the backing store
2478 * Shared/mac/RemoteLayerBackingStore.mm:
2479 (WebKit::RemoteLayerBackingStore::display):
2480 (WebKit::RemoteLayerBackingStore::drawInContext):
2482 2014-04-23 Benjamin Poulain <bpoulain@apple.com>
2484 [iOS][WK2] Image and text documents sometime gets the webpage viewport configuration
2485 https://bugs.webkit.org/show_bug.cgi?id=132099
2487 Reviewed by Tim Horton.
2489 When didReceiveMobileDocType(), if the doctype was not XHTML mobile, we were setting
2490 the viewport configuration to webpageParameters(). This is obviously not correct for
2491 Image and Text documents.
2493 This patch moves the code deciding the default configuration out of WebPage::didCommitLoad()
2494 and use it from WebPage::didCommitLoad() and WebPage::didReceiveMobileDocType().
2496 * WebProcess/WebPage/WebPage.cpp:
2497 (WebKit::WebPage::didCommitLoad):
2498 * WebProcess/WebPage/WebPage.h:
2499 * WebProcess/WebPage/ios/WebPageIOS.mm:
2500 (WebKit::WebPage::didReceiveMobileDocType):
2501 (WebKit::WebPage::resetViewportDefaultConfiguration):
2503 2014-04-23 Benjamin Poulain <bpoulain@apple.com>
2505 [iOS][WK2] Fix a few mistakes affecting the initial layout and the initial unobscured rect
2506 https://bugs.webkit.org/show_bug.cgi?id=132093
2507 <rdar://problem/16703237>
2509 Reviewed by Tim Horton.
2511 The user of WKWebView can setup a size on device pixels, which can add half a point to the minimum
2512 layout size. By rounding this up before applying the page scale, we ended up with rounding errors
2513 on the layout size and the transitory unobscured content rect.
2515 This patch fixes changes the minimal layout size to float point values to reduce the rounding problems.
2517 * UIProcess/API/Cocoa/WKWebView.mm:
2518 (setViewportConfigurationMinimumLayoutSize):
2519 (-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
2520 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
2521 * UIProcess/WebPageProxy.h:
2522 * UIProcess/ios/WebPageProxyIOS.mm:
2523 (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
2524 (WebKit::WebPageProxy::setViewportConfigurationMinimumLayoutSize):
2525 (WebKit::WebPageProxy::setMinimumLayoutSizeForMinimalUI):
2527 * WebProcess/WebPage/WebPage.cpp:
2528 (WebKit::WebPage::didCommitLoad):
2529 Defaulting the content size to the minimum layout size only works if the initial-scale is 1.
2530 ViewportConfiguration knows exactly what to do before the first layout.
2532 * WebProcess/WebPage/WebPage.h:
2533 * WebProcess/WebPage/WebPage.messages.in:
2534 * WebProcess/WebPage/ios/WebPageIOS.mm:
2535 (WebKit::WebPage::setViewportConfigurationMinimumLayoutSize):
2536 (WebKit::WebPage::setMinimumLayoutSizeForMinimalUI):
2537 (WebKit::WebPage::dynamicViewportSizeUpdate):
2539 -setZoomedOutPageScaleFactor() was incorrectly using the initial scale. 99% of the time, initial scale
2540 and minimum scale are equal, but the page can specify something different with the viewport meta tag.
2541 -Use floating point for manipulating the minimum layout sizes, then round the value.
2542 -minimumLayoutSizeInDocumentCoordinate was scaled the wrong way around.
2544 (WebKit::WebPage::viewportConfigurationChanged):
2546 2014-04-23 Yongjun Zhang <yongjun_zhang@apple.com>
2548 Support encoding/decoding NSUInteger arguments in WKRemoteObjectCoder.
2549 https://bugs.webkit.org/show_bug.cgi?id=132040
2551 Add support for encoding/decoding NSUInteger arguments.
2553 Reviewed by Sam Weinig.
2555 * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
2557 (decodeInvocationArguments):
2559 2014-04-22 Ryosuke Niwa <rniwa@webkit.org>
2561 Cursor doesn't change back to pointer when leaving the Safari window
2562 https://bugs.webkit.org/show_bug.cgi?id=132038
2564 Reviewed by Alexey Proskuryakov.
2566 Since the cursor type is now updated asynchronously after r147739,
2567 [window windowNumber] != [NSWindow windowNumberAtPoint:[NSEvent mouseLocation] belowWindowWithWindowNumber:0]
2568 evalutes to false depending on how fast cursor is moving.
2570 Instead, check whether the NSWindow of the WebView is the key window or not since
2571 key window appears to control the cursor style in Cocoa as far as I've tested:
2572 https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/WinPanel/Concepts/ChangingMainKeyWindow.html
2574 * UIProcess/mac/PageClientImpl.mm:
2575 (WebKit::PageClientImpl::setCursor):
2577 2014-04-22 Yongjun Zhang <yongjun_zhang@apple.com>
2579 Add SPI to expose provisional URL from Frame.
2580 https://bugs.webkit.org/show_bug.cgi?id=132014
2582 Add methods to return the provisional URL from WKWebProcessPlugInFrame.
2584 Reviewed by Dan Bernstein.
2586 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
2587 (-[WKWebProcessPlugInFrame _provisionalURL]):
2588 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h:
2590 2014-04-22 Benjamin Poulain <bpoulain@apple.com>
2592 [iOS][WK2] Split iOS touch event dispatch for the regular touch event dispatch
2593 https://bugs.webkit.org/show_bug.cgi?id=132033
2595 Reviewed by Simon Fraser.
2597 The generic touch event dispatching does not work well with iOS gesture recognizers.
2598 Some events are required to be synchronous, while other needs can be asynchronous and
2599 can even use event coalescing. We only need UI callback for the synchronous events.
2601 Previously, that was implemented by changing the property ShouldSendEventsSynchronously
2602 on WebPageProxy. That is causing issues when synchronous events are sent right after asynchronous
2603 events because the responses in WebPageProxy::didReceiveEvent() easily get out of order.
2605 This patch completely split the UIGestureRecognizerDispatching from the normal asynchronous event dispatching.
2607 Synchronous events are sent directly to the WebProcess and report the result to the PageClient right away.
2609 Asynchronous events are sent to the EventDispatcher where they are coalesced until the main thread is free
2612 There can be a race where a synchronous event comes before the asynchronous events are processed. In that case,
2613 the synchronous event handler starts by getting the events out of the EventDispatcher and dispatch them first.
2615 * Shared/NativeWebTouchEvent.h:
2616 (WebKit::NativeWebTouchEvent::uniqueId): Deleted.
2617 * Shared/ios/NativeWebTouchEventIOS.mm:
2618 (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
2619 * UIProcess/WebPageProxy.cpp:
2620 (WebKit::WebPageProxy::handleSynchronousTouchEvent):
2621 (WebKit::WebPageProxy::sendAsynchronousTouchEvent):
2622 (WebKit::WebPageProxy::didReceiveEvent):
2623 (WebKit::WebPageProxy::resetStateAfterProcessExited):
2624 * UIProcess/WebPageProxy.h:
2625 * UIProcess/ios/WKContentViewInteraction.h:
2626 * UIProcess/ios/WKContentViewInteraction.mm:
2627 (-[WKContentView _webTouchEventsRecognized:]):
2628 (-[WKContentView _webTouchEvent:WebKit::preventsNativeGestures:]):
2629 * WebProcess/WebPage/EventDispatcher.cpp:
2630 (WebKit::EventDispatcher::EventDispatcher):
2631 (WebKit::EventDispatcher::clearQueuedTouchEventsForPage):
2632 (WebKit::EventDispatcher::getQueuedTouchEventsForPage):
2633 (WebKit::EventDispatcher::touchEvent):
2634 (WebKit::EventDispatcher::dispatchTouchEvents):
2635 * WebProcess/WebPage/EventDispatcher.h:
2636 * WebProcess/WebPage/EventDispatcher.messages.in:
2637 * WebProcess/WebPage/WebPage.cpp:
2638 (WebKit::WebPage::dispatchTouchEvent):
2639 (WebKit::WebPage::touchEventSync):
2640 (WebKit::WebPage::touchEvent):
2641 (WebKit::WebPage::touchEventSyncForTesting):
2642 (WebKit::WebPage::didCommitLoad):
2643 * WebProcess/WebPage/WebPage.h:
2644 * WebProcess/WebPage/WebPage.messages.in:
2645 * WebProcess/WebPage/ios/WebPageIOS.mm:
2646 (WebKit::WebPage::dispatchAsynchronousTouchEventsQueue):
2648 2014-04-22 Chris Fleizach <cfleizach@apple.com>
2650 AX: iOS hit-testing does not work when page is zoomed
2651 https://bugs.webkit.org/show_bug.cgi?id=132013
2653 Reviewed by Simon Fraser.
2655 Implement accessibilityHitTest so that the point can be converted correctly.
2657 * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
2658 (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
2660 2014-04-22 Commit Queue <commit-queue@webkit.org>
2662 Unreviewed, rolling out r167674.
2663 https://bugs.webkit.org/show_bug.cgi?id=132025
2665 Going a different way with this (Requested by bradee-oh on
2670 "Change Image Controls replacement to use selection and paste"
2671 https://bugs.webkit.org/show_bug.cgi?id=131992
2672 http://trac.webkit.org/changeset/167674
2674 2014-04-22 Joseph Pecoraro <pecoraro@apple.com>
2676 Remove unused local variable
2677 https://bugs.webkit.org/show_bug.cgi?id=132020
2679 Reviewed by Alexey Proskuryakov.
2681 * UIProcess/ios/forms/WKFormSelectPopover.mm:
2682 (-[WKSelectPopover initWithView:hasGroups:]):
2684 2014-04-22 Brady Eidson <beidson@apple.com>
2686 Change Image Controls replacement to use selection and paste
2687 <rdar://problem/16302722> and https://bugs.webkit.org/show_bug.cgi?id=131992
2689 Reviewed by Tim Horton.
2691 * UIProcess/mac/WebContextMenuProxyMac.mm:
2692 (-[WKSharingServicePickerDelegate sharingService:didShareItems:]): Write the
2693 replacement data to a special pasteboard, then replace the current selection from
2696 Remove all other code used to support the old replacement mechanism:
2697 * UIProcess/WebPageProxy.cpp:
2698 (WebKit::WebPageProxy::replaceControlledImage): Deleted.
2699 * UIProcess/WebPageProxy.h:
2700 * UIProcess/mac/WebContextMenuProxyMac.h:
2701 (WebKit::WebContextMenuProxyMac::page):
2702 (WebKit::WebContextMenuProxyMac::replaceControlledImage): Deleted.
2703 * WebProcess/WebPage/WebContextMenu.cpp:
2704 (WebKit::WebContextMenu::replaceControlledImage): Deleted.
2705 * WebProcess/WebPage/WebContextMenu.h:
2706 * WebProcess/WebPage/WebPage.cpp:
2707 (WebKit::WebPage::replaceControlledImage): Deleted.
2708 * WebProcess/WebPage/WebPage.h:
2709 * WebProcess/WebPage/WebPage.messages.in:
2711 2014-04-22 Eunmi Lee <eunmi15.lee@samsung.com>
2713 [EFL][WK2] Remove duplicated code to set size to the DrawingArea.
2714 https://bugs.webkit.org/show_bug.cgi?id=131972
2716 Reviewed by Andreas Kling.
2718 DrawingArea's size is set in the WebView.cpp when EwkView's size is
2719 changed, so we don't have to set again in the PageViewportController.
2721 * UIProcess/CoordinatedGraphics/PageViewportController.cpp:
2722 (WebKit::PageViewportController::didChangeViewportSize):
2724 2014-04-22 Tim Horton <timothy_horton@apple.com>
2726 WKThumbnailView doesn't quite work with topContentInset
2727 https://bugs.webkit.org/show_bug.cgi?id=131976
2728 <rdar://problem/16642127>
2730 Reviewed by Darin Adler.
2732 * UIProcess/API/Cocoa/_WKThumbnailView.mm:
2733 (-[_WKThumbnailView initWithFrame:fromWKView:]):
2734 _WKThumbnailView always needs a layer.
2735 We don't want to use snapshots by default, this was debugging accidentally landed in the last change.
2737 (-[_WKThumbnailView _requestSnapshotIfNeeded]):
2738 Don't request a new snapshot if the scale is the same as the existing one.
2739 Reduce the height of the snapshot by the topContentInset.
2740 Having the origin at (0, 0) is still correct, as the inset content is in negative Y space,
2741 and (0, 0) is the true origin of the content.
2743 (-[_WKThumbnailView setScale:]):
2744 When not snapshotting, we've decided that WKThumbnailView should apply the scale to the WKView layer tree,
2745 instead of depending on clients to do so.
2747 (-[_WKThumbnailView setUsesSnapshot:]):
2748 We *do* need to apply thumbnail scale in the web process even when snapshotting,
2749 because we use the live layer tree temporarily while waiting for the asynchronous
2750 snapshot to return. This was a misstep in the last thumbnail view patch.
2752 2014-04-22 Shivakumar JM <shiva.jm@samsung.com>
2754 [WebKit2] Cleanup the build from unused parameter in WebProcess Module
2755 https://bugs.webkit.org/show_bug.cgi?id=131970
2757 Reviewed by Darin Adler.
2759 Fix a build warning by removing the parameters in function paintLayerContents() to fix build warning.
2761 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2762 (WebKit::CoordinatedLayerTreeHost::paintLayerContents):
2764 2014-04-22 Carlos Garcia Campos <cgarcia@igalia.com>
2766 [GTK] Crash after getting web view context property with g_object_get
2767 https://bugs.webkit.org/show_bug.cgi?id=131983
2769 Reviewed by Philippe Normand.
2771 The problem is that the getter is using g_value_take_object() and
2772 the default context is destroyed when the caller releases its ref.
2774 * UIProcess/API/gtk/WebKitWebView.cpp:
2775 (webkitWebViewGetProperty): Use g_value_set_object() instead of
2776 g_value_take_object().
2778 2014-04-22 Ryuan Choi <ryuan.choi@samsung.com>
2780 [EFL][WK2] Remove unnecessary includes in files of Source/WebKit2/UIProcess/API/efl
2781 https://bugs.webkit.org/show_bug.cgi?id=131979
2783 Reviewed by Gyuyoung Kim.
2785 Removed unnecessary includes of header files.
2786 In addition, tried to use forward declarations.
2788 * UIProcess/API/efl/EwkView.cpp:
2789 * UIProcess/API/efl/EwkView.h:
2790 * UIProcess/API/efl/EwkViewCallbacks.h:
2791 * UIProcess/API/efl/GestureRecognizer.h:
2792 * UIProcess/API/efl/ewk_context_menu_item_private.h:
2793 * UIProcess/API/efl/ewk_context_menu_private.h:
2794 * UIProcess/API/efl/ewk_download_job.cpp:
2795 * UIProcess/API/efl/ewk_download_job_private.h:
2796 * UIProcess/API/efl/ewk_form_submission_request.cpp:
2797 * UIProcess/API/efl/ewk_form_submission_request_private.h:
2798 * UIProcess/API/efl/ewk_navigation_data.cpp:
2799 * UIProcess/API/efl/ewk_navigation_data_private.h:
2800 * UIProcess/API/efl/ewk_page_group_private.h:
2801 * UIProcess/API/efl/ewk_popup_menu_private.h:
2802 * UIProcess/API/efl/ewk_view.cpp:
2803 * UIProcess/API/efl/ewk_window_features_private.h:
2804 * UIProcess/efl/PageUIClientEfl.cpp:
2805 * UIProcess/efl/ViewClientEfl.cpp:
2807 2014-04-21 Tim Horton <timothy_horton@apple.com>
2809 [wk2] Don't send intrinsic content size updates with dirty layout
2810 https://bugs.webkit.org/show_bug.cgi?id=131964
2811 <rdar://problem/14292718>
2813 Reviewed by Simon Fraser.
2815 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2816 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2817 (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
2818 (WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged):
2819 (WebKit::TiledCoreAnimationDrawingArea::updateIntrinsicContentSizeIfNeeded):
2820 (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
2821 (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
2822 (WebKit::TiledCoreAnimationDrawingArea::updateIntrinsicContentSizeTimerFired): Deleted.
2823 Instead of using a timer (which can fire while layout is dirty) to coalesce
2824 intrinsic content size changes, send them only from flushLayers, just after updating layout.
2825 This ensures that we never get intermediate intrinsic content sizes that won't be painted.
2827 2014-04-21 Tim Horton <timothy_horton@apple.com>
2829 Remove a unnecessary forward-declared class from TiledCoreAnimationDrawingArea.
2831 Rubber-stamped by Simon Fraser.
2833 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2835 2014-04-21 Simon Fraser <simon.fraser@apple.com>
2837 Don't try to use a null connection()->xpcConnection()
2838 https://bugs.webkit.org/show_bug.cgi?id=131961
2840 Reviewed by Dan Bernstein.
2842 If running with -WebKit2UseXPCServiceForWebProcess NO, connection()->xpcConnection()
2843 is null and xpc_connection_get_pid() would crash, so null-check the xpcConnection.
2845 * UIProcess/Network/NetworkProcessProxy.cpp:
2846 (WebKit::NetworkProcessProxy::didFinishLaunching):
2848 2014-04-21 Dan Bernstein <mitz@apple.com>
2850 WebKit part of <rdar://problem/16631323> Page::setDefersLoading doesn’t do anything when using the Network process
2851 https://bugs.webkit.org/show_bug.cgi?id=131939
2853 Reviewed by David Kilzer.
2855 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2856 (WebKit::NetworkConnectionToWebProcess::setDefersLoading): Added. Forwards the message to
2857 the NetworkResourceLoader.
2858 * NetworkProcess/NetworkConnectionToWebProcess.h:
2860 * NetworkProcess/NetworkConnectionToWebProcess.messages.in: Added SetDefersLoading message.
2862 * NetworkProcess/NetworkResourceLoader.cpp:
2863 (WebKit::NetworkResourceLoader::NetworkResourceLoader): Initialize new member variable
2864 m_defersLoading from the new field in the loader parameters.
2865 (WebKit::NetworkResourceLoader::start): Added. Like WebCore::ResourceLoader, if loading is
2866 deferred, keep the request in m_deferredRequest and bail out.
2867 (WebKit::NetworkResourceLoader::setDefersLoading): Added. Similar to
2868 WebCore::ResourceLoader::setDefersLoading.
2869 * NetworkProcess/NetworkResourceLoader.h:
2870 (WebKit::NetworkResourceLoader::defersLoading):
2872 * Shared/Network/NetworkResourceLoadParameters.cpp:
2873 (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters): Initialize new field
2874 defersLoading to false.
2875 (WebKit::NetworkResourceLoadParameters::encode): Encode new field.
2876 (WebKit::NetworkResourceLoadParameters::decode): Decode new field.
2877 * Shared/Network/NetworkResourceLoadParameters.h: Added defersLoading field.
2879 * WebProcess/Network/WebResourceLoadScheduler.cpp:
2880 (WebKit::WebResourceLoadScheduler::scheduleLoad): Populate defersLoading field in the load
2882 (WebKit::WebResourceLoadScheduler::setDefersLoading): Send a message to the Network process.
2883 * WebProcess/Network/WebResourceLoadScheduler.h:
2885 2014-04-21 Anders Carlsson <andersca@apple.com>
2887 Errors passed to delegate methods should have recovery attempters
2888 https://bugs.webkit.org/show_bug.cgi?id=131957
2889 <rdar://problem/16642539>
2891 Reviewed by Tim Horton.
2893 * UIProcess/API/Cocoa/_WKErrorRecoveryAttempting.h: Added.
2894 * UIProcess/API/Cocoa/_WKErrorRecoveryAttempting.mm: Added.
2895 * UIProcess/Cocoa/NavigationState.mm:
2896 (WebKit::createErrorWithRecoveryAttempter):
2897 (WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
2898 (WebKit::NavigationState::LoaderClient::didFailLoadWithErrorForFrame):
2899 * UIProcess/Cocoa/WKReloadFrameErrorRecoveryAttempter.h: Added.
2900 * UIProcess/Cocoa/WKReloadFrameErrorRecoveryAttempter.mm: Added.
2901 (-[WKReloadFrameErrorRecoveryAttempter initWithWebView:frameHandle:urlString:]):
2902 (-[WKReloadFrameErrorRecoveryAttempter attemptRecovery]):
2903 * WebKit2.xcodeproj/project.pbxproj:
2905 2014-04-21 Eric Carlson <eric.carlson@apple.com>
2907 [Mac] implement WebKitDataCue
2908 https://bugs.webkit.org/show_bug.cgi?id=131799
2910 Reviewed by Dean Jackson.
2912 * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE.
2914 2014-04-21 Beth Dakin <bdakin@apple.com>
2916 topContentInset does not play well with fullscreen elements
2917 https://bugs.webkit.org/show_bug.cgi?id=131955
2919 <rdar://problem/16651925>
2921 Reviewed by Sam Weinig.
2923 If you take an element (such as a <video>) fullscreen when you have a
2924 topContentInset set, there will be an inset-sized gap at the top of the fullscreen
2927 Save and restore the topContentInset whenever the scroll position is saved and
2929 * WebProcess/FullScreen/WebFullScreenManager.cpp:
2930 (WebKit::WebFullScreenManager::WebFullScreenManager):
2931 (WebKit::WebFullScreenManager::saveScrollPosition):
2932 (WebKit::WebFullScreenManager::restoreScrollPosition):
2933 * WebProcess/FullScreen/WebFullScreenManager.h:
2935 2014-04-21 Gavin Barraclough <baraclough@apple.com>
2937 Don't use ProcessAssertion on simulator
2938 https://bugs.webkit.org/show_bug.cgi?id=131950
2940 Rubber stamped by Enrica Casucci
2942 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2943 (WebKit::connectToService):
2944 * UIProcess/ios/ProcessAssertion.h:
2946 2014-04-21 Enrica Casucci <enrica@apple.com>
2948 [iOS WebKit2] support replacements for misspelled words.
2949 https://bugs.webkit.org/show_bug.cgi?id=131827
2950 <rdar://problem/16319657>
2952 Reviewed by Darin Adler.
2954 This is the second a final piece to support replacements.
2955 It adds some entrypoints used by the keyboard code to perform
2956 replacement when reaching the edge of a word using backspace.
2957 I've modified the behavior of replaceSelectedText to work both
2958 with caret or range selections.
2960 * Shared/EditorState.cpp:
2961 (WebKit::EditorState::encode):
2962 (WebKit::EditorState::decode):
2963 * Shared/EditorState.h:
2964 (WebKit::EditorState::EditorState):
2965 * UIProcess/ios/WKContentViewInteraction.mm:
2966 (-[WKContentView isReplaceAllowed]):
2967 (-[WKContentView _characterBeforeCaretSelection]):
2968 * WebProcess/WebPage/WebPage.cpp:
2969 (WebKit::WebPage::editorState):
2970 * WebProcess/WebPage/ios/WebPageIOS.mm:
2971 (WebKit::WebPage::replaceSelectedText):
2973 2014-04-21 Gavin Barraclough <baraclough@apple.com>
2975 Don't use ProcessAssertion on simulator
2976 https://bugs.webkit.org/show_bug.cgi?id=131950
2978 Rubber stamped by Benjamin Poulain
2980 * UIProcess/ios/ProcessAssertion.mm:
2981 (WebKit::ProcessAssertion::ProcessAssertion):
2982 (WebKit::ProcessAssertion::setState):
2984 2014-04-21 Anders Carlsson <andersca@apple.com>
2988 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
2989 (WebKit::XPCServiceInitializerDelegate::checkEntitlements):
2991 2014-04-21 Anders Carlsson <andersca@apple.com>
2995 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
2996 (WebKit::XPCServiceInitializer):
2998 2014-04-21 Tim Horton <timothy_horton@apple.com>
3000 [iOS WebKit2] Implement CSS viewport units
3001 https://bugs.webkit.org/show_bug.cgi?id=131863
3002 <rdar://problem/16279088>
3004 Reviewed by Darin Adler.
3006 * UIProcess/API/Cocoa/WKWebView.mm:
3007 (setMinimumLayoutSizeForMinimalUI):
3008 (-[WKWebView _minimumLayoutSizeOverrideForMinimalUI]):
3009 (-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
3010 Add _setMinimumLayoutSizeOverrideForMinimalUI:, which pushes said size
3011 down from the client to WebPageIOS, below.
3013 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3014 * UIProcess/WebPageProxy.h:
3015 * UIProcess/ios/WebPageProxyIOS.mm:
3016 (WebKit::WebPageProxy::setMinimumLayoutSizeForMinimalUI):
3017 * WebProcess/WebPage/WebPage.h:
3018 * WebProcess/WebPage/WebPage.messages.in:
3019 * WebProcess/WebPage/ios/WebPageIOS.mm:
3020 (WebKit::WebPage::setMinimumLayoutSizeForMinimalUI):
3021 (WebKit::WebPage::viewportConfigurationChanged):
3022 Update FrameView's viewport size based on the minimum layout size for minimal UI (if we have it)
3023 or the normal minimum layout size, scaled to the page's initial scale.
3025 2014-04-21 Benjamin Poulain <bpoulain@apple.com>
3027 [iOS][WK2] Fix the dynamic viewport update when the viewport's max-scale conflict with the transition
3028 https://bugs.webkit.org/show_bug.cgi?id=131884
3030 Reviewed by Darin Adler.
3032 <rdar://problem/16667291>
3034 * UIProcess/API/Cocoa/WKWebView.mm:
3035 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
3036 It is fairly common to have a viewport configuration with min-scale=1 and max-scale=1.
3037 Since we were only changing the minimumScale for the transition, the target scale was affected
3038 by max-scale. This was breaking the transition from portrait to landscale.
3040 2014-04-21 Benjamin Poulain <bpoulain@apple.com>
3042 [iOS][WK2] Make dynamic viewport size update content aware
3043 https://bugs.webkit.org/show_bug.cgi?id=131874
3045 Reviewed by Tim Horton.
3047 When possible, adjust the scroll position based on the content on dynamic viewport resize.
3049 * WebProcess/WebPage/WebPage.cpp:
3050 (WebKit::WebPage::WebPage):
3051 (WebKit::WebPage::scalePage):
3052 (WebKit::WebPage::pageDidScroll):
3053 * WebProcess/WebPage/WebPage.h:
3054 The scrolling heuristic are not invertible, especially the content heuristic. To have the right
3055 behavior when doing resize without changing the page, we save the old scroll position and restore
3056 it when the content size and scale is restored.
3058 * WebProcess/WebPage/ios/WebPageIOS.mm:
3059 (WebKit::WebPage::dynamicViewportSizeUpdate):
3060 On dynamic update, start by finding what node is at the center of the screen. After the layout, put that
3061 node back in the center.
3063 (WebKit::WebPage::updateVisibleContentRects):
3065 2014-04-21 Anders Carlsson <andersca@apple.com>
3067 Need default WKNavigationDelegate behavior
3068 https://bugs.webkit.org/show_bug.cgi?id=131944
3069 <rdar://problem/15949822>
3071 Reviewed by Dan Bernstein.
3073 Port the WebKit1 default delegate behavior over.
3075 * UIProcess/Cocoa/NavigationState.mm:
3076 (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
3077 (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
3079 2014-04-21 Dan Bernstein <mitz@apple.com>
3081 [Cocoa] Expose WebPage::setDefersLoading
3082 https://bugs.webkit.org/show_bug.cgi?id=131943
3084 Reviewed by Anders Carlsson, but he doesn’t like this.
3086 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
3087 (-[WKWebProcessPlugInBrowserContextController _defersLoading]): Added this accessor.
3088 (-[WKWebProcessPlugInBrowserContextController _setDefersLoading:]): Ditto.
3089 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
3090 Declared new property _defersLoading.
3092 * WebProcess/WebPage/WebPage.cpp:
3093 (WebKit::WebPage::defersLoading): Added this getter.
3094 * WebProcess/WebPage/WebPage.h:
3096 2014-04-21 Joseph Pecoraro <pecoraro@apple.com>
3098 Remove unused WebKitSystemInterface functions
3099 https://bugs.webkit.org/show_bug.cgi?id=131938
3101 Reviewed by Alexey Proskuryakov.
3103 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3104 (InitWebCoreSystemInterface):
3106 2014-04-21 Anders Carlsson <andersca@apple.com>
3108 Check the com.apple.security.network.client entitlement for all processes
3109 https://bugs.webkit.org/show_bug.cgi?id=131942
3110 <rdar://problem/12354188>
3112 Reviewed by Dan Bernstein.
3114 * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
3115 (WebKit::NetworkServiceInitializerDelegate::NetworkServiceInitializerDelegate):
3116 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
3117 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
3118 (WebKit::XPCServiceInitializerDelegate::checkEntitlements):
3120 2014-04-20 Dan Bernstein <mitz@apple.com>
3122 [Cocoa] Remove interfaces in the To Be Removed groups
3123 https://bugs.webkit.org/show_bug.cgi?id=131925
3125 Reviewed by Darin Adler.
3127 * Shared/API/Cocoa/WKRemoteObjectInterface.h: Removed.
3128 * Shared/API/Cocoa/WKRemoteObjectInterface.mm: Removed.
3129 * Shared/API/Cocoa/WKRemoteObjectRegistry.h: Removed.
3130 * Shared/API/Cocoa/WKRemoteObjectRegistry.mm: Removed.
3131 * UIProcess/API/Cocoa/WKProcessPool.mm:
3132 * UIProcess/API/Cocoa/WKProcessPoolConfiguration.h: Removed.
3133 * UIProcess/API/Cocoa/WKProcessPoolConfiguration.mm: Removed.
3134 * UIProcess/API/Cocoa/WKProcessPoolConfigurationPrivate.h: Removed.
3135 * UIProcess/API/Cocoa/WKProcessPoolToBeRemoved.mm: Removed.
3136 * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
3137 * WebKit2.xcodeproj/project.pbxproj:
3138 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInBrowserContextControllerToBeRemoved.mm: Removed.
3139 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
3141 2014-04-20 Dan Bernstein <mitz@apple.com>
3143 [Cocoa] Crash when setting a bundle parameter to nil
3144 https://bugs.webkit.org/show_bug.cgi?id=131917
3146 Reviewed by Sam Weinig.
3148 * UIProcess/API/Cocoa/WKProcessPool.mm:
3149 (-[WKProcessPool _setObject:forBundleParameter:]): If the object is nil, use
3150 -[NSMutableDictionary removeObjectForKey:] rather than -setObject:forKey:.
3152 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm:
3153 (-[WKWebProcessBundleParameters setParameter:forKey:]): Ditto.
3155 * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
3156 (WebKit::InjectedBundle::setBundleParameter): Unrelatedly, create m_bundleParameters if
3157 needed, as it may have not been created on intialization if no bundle parameters were set
3160 2014-04-20 Dan Bernstein <mitz@apple.com>
3162 [Cocoa] Remove unused -webView:didFinishLoadingNavigation: delegate method
3163 https://bugs.webkit.org/show_bug.cgi?id=131914
3165 Reviewed by Sam Weinig.
3167 * UIProcess/Cocoa/NavigationState.h: Removed flag from m_navigationDelegateMethods struct.
3168 * UIProcess/Cocoa/NavigationState.mm:
3169 (WebKit::NavigationState::setNavigationDelegate): Removed check for whether the method is
3171 (WebKit::NavigationState::LoaderClient::didFinishLoadForFrame): Stopped calling the method
3174 2014-04-19 Anders Carlsson <andersca@apple.com>
3176 Plug-in process crashes if NP_Initialize returns an error the second time it's called
3177 https://bugs.webkit.org/show_bug.cgi?id=131903
3178 <rdar://problem/14355462>
3180 Reviewed by Sam Weinig.
3182 * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
3183 (WebKit::NetscapePluginModule::decrementLoadCount):
3184 Don't try to unload the plug-in if it hasn't been initialized.
3186 2014-04-19 Simon Fraser <simon.fraser@apple.com>
3188 [UI-side compositing] Implement blend modes
3189 https://bugs.webkit.org/show_bug.cgi?id=131891
3190 <rdar://problem/16490085>
3192 Reviewed by Tim Horton.
3194 Implement blend modes with UI-side compositing.
3196 PlatformCALayer::setBlendMode() becomes pure virtual, and overridden in
3197 PlatformCALayerMac and PlatformCALayerRemote.
3198 PlatformCAFilters::setBlendingFiltersOnLayer() now takes a raw platform
3199 layer, so it can be called from the UI process on a CALayer*.
3201 Add BlendMode to LayerProperties, and initialize, encode and decode it,
3202 as well as adding dumping support for blend modes.
3204 * Shared/mac/RemoteLayerTreePropertyApplier.mm:
3205 (WebKit::applyPropertiesToLayer):
3206 * Shared/mac/RemoteLayerTreeTransaction.h:
3207 * Shared/mac/RemoteLayerTreeTransaction.mm:
3208 (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
3209 (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
3210 (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
3211 (WebKit::RemoteLayerTreeTextStream::operator<<):
3212 (WebKit::dumpChangedLayers):
3213 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
3214 (WebKit::PlatformCALayerRemote::setBlendMode):
3215 * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
3217 2014-04-19 Joseph Pecoraro <pecoraro@apple.com>
3219 Fix leak of UIScreenEdgePanGestureRecognizer in WKSwipeTransitionController
3220 https://bugs.webkit.org/show_bug.cgi?id=131877
3222 Reviewed by Darin Adler.
3224 * UIProcess/ios/ViewGestureControllerIOS.mm:
3225 (-[WKSwipeTransitionController gestureRecognizerForInteractiveTransition:WithTarget:action:]):
3227 2014-04-19 Dan Bernstein <mitz@apple.com>
3229 Don’t install a source file inside WebProcess.app.
3231 * WebKit2.xcodeproj/project.pbxproj: Removed ViewUpdateDispatcher.messages.in from
3232 WebProcess’s Copy Bundle Resources build phase.
3234 2014-04-19 Darin Adler <darin@apple.com>
3236 [Mac] WebView adjusts the cursor even when another window is in front
3237 https://bugs.webkit.org/show_bug.cgi?id=131898
3238 rdar://problem/14619911
3240 Reviewed by Dan Bernstein.
3242 * UIProcess/API/mac/WKView.mm:
3243 (-[WKView _setCursor:]): Deleted. Moved the code all into PageClientImpl, since none of it
3244 interacts with anything special about a WKView.
3246 * UIProcess/API/mac/WKViewInternal.h: Deleted the _setCursor: method.
3248 * UIProcess/mac/PageClientImpl.mm:
3249 (WebKit::PageClientImpl::setCursor): Added a check that the window is under the cursor
3250 and do nothing if it's not.
3252 2014-04-19 Dan Bernstein <mitz@apple.com>
3254 Use XPC services in the iOS Simulator, but not in Mountain Lion
3255 https://bugs.webkit.org/show_bug.cgi?id=131894
3257 Reviewed by Anders Carlsson.
3259 * Configurations/NetworkService.Development.xcconfig: Defined INFOPLIST_FILE for the
3261 * Configurations/NetworkService.xcconfig: Ditto.
3262 * Configurations/WebContentService.Development.xcconfig: Ditto.
3263 * Configurations/WebContentService.xcconfig: Ditto.
3264 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3265 (WebKit::systemDirectoryPath): Added this helper function that returns a slash-terminated
3266 path to the System directory in the current runtime.
3267 (WebKit::ProcessLauncher::launchProcess): Changed to use the above function to tell whether
3268 a development version of WebKit2 is being used.
3269 * WebKit2Prefix.h: Set WTF_USE_XPC_SERVICES to 1 when targeting the iOS Simulator, but not
3270 when targeting Mountain Lion.
3272 2014-04-19 Dan Bernstein <mitz@apple.com>
3274 [Cocoa] Crash in -[WKWebProcessPlugInHitTestResult nodeHandle] when nodeHandle() is null
3275 https://bugs.webkit.org/show_bug.cgi?id=131888
3277 Reviewed by Jon Honeycutt.
3279 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInHitTestResult.mm:
3280 (-[WKWebProcessPlugInHitTestResult nodeHandle]): Added a null check.
3282 2014-04-19 Simon Fraser <simon.fraser@apple.com>
3284 [iOS WK2] Fuzzy layers on sites using perspective and transforms
3285 https://bugs.webkit.org/show_bug.cgi?id=131873
3286 <rdar://problem/16540576>
3288 Reviewed by Sam Weinig.
3290 Always set rasterizationScale on CALayers in the UI process
3291 (as we do for WK1) so that layers are rasterized taking the
3292 device scale into account. We can do unconditionally; this
3293 is benign on layers that CA doesn't rasterize.
3295 * Shared/mac/RemoteLayerTreePropertyApplier.mm:
3296 (WebKit::applyPropertiesToLayer):
3298 2014-04-18 Simon Fraser <simon.fraser@apple.com>
3300 Use 'override' in GraphicsLayerCA
3301 https://bugs.webkit.org/show_bug.cgi?id=131882
3303 Reviewed by Tim Horton.
3307 * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
3309 2014-04-19 Darin Adler <darin@apple.com>
3311 Assertion in WebPage::runModal accesses object after it may have been destroyed
3312 https://bugs.webkit.org/show_bug.cgi?id=131875
3314 Reviewed by Anders Carlsson.
3316 * WebProcess/WebPage/WebPage.cpp:
3317 (WebKit::WebPage::runModal): Ref the WebPage so it's still around so we can
3318 check the m_isRunningModal flag.
3320 2014-04-18 Commit Queue <commit-queue@webkit.org>
3322 Unreviewed, rolling out r167527.
3323 https://bugs.webkit.org/show_bug.cgi?id=131883
3325 Broke 32-bit build (Requested by ap on #webkit).
3329 "[Mac] implement WebKitDataCue"
3330 https://bugs.webkit.org/show_bug.cgi?id=131799
3331 http://trac.webkit.org/changeset/167527
3333 2014-04-18 Eric Carlson <eric.carlson@apple.com>
3335 [Mac] implement WebKitDataCue
3336 https://bugs.webkit.org/show_bug.cgi?id=131799
3338 Reviewed by Dean Jackson.
3340 * Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE.
3342 2014-04-18 Anders Carlsson <andersca@apple.com>
3344 Keep the WebPageProxy alive for the lifetime of all PageLoadState::Transaction objects
3345 https://bugs.webkit.org/show_bug.cgi?id=131872
3346 <rdar://problem/15758414>
3348 Reviewed by Dan Bernstein.
3350 * UIProcess/PageLoadState.cpp:
3351 (WebKit::PageLoadState::PageLoadState):
3352 (WebKit::PageLoadState::Transaction::Transaction):
3353 (WebKit::PageLoadState::Transaction::~Transaction):
3354 * UIProcess/PageLoadState.h:
3355 (WebKit::PageLoadState::Transaction::Transaction): Deleted.
3356 (WebKit::PageLoadState::Transaction::~Transaction): Deleted.
3357 * UIProcess/WebPageProxy.cpp:
3358 (WebKit::WebPageProxy::WebPageProxy):
3360 2014-04-18 Stephanie Lewis <slewis@apple.com>
3362 We shouldn’t create page throttlers for other pages than WebKit2 pages.
3363 Part of <rdar://problem/16473045> Visibility state counters are often incorrect.
3364 https://bugs.webkit.org/show_bug.cgi?id=131696
3366 Reviewed by Gavin Barraclough.
3368 Page throttlers were being created for SVG images and other page instances that
3369 were not accurately tracking the states that enable and disable page throttling.
3370 Make the throttler an unique ptr and only initialize it for WebKit2.
3372 This also fixes an inefficiency where we would throttle a new page on creation because
3373 we assumed it was visible even if that was not the case.
3375 * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: Check page throttler exists.
3376 (WebKit::NPRuntimeObjectMap::evaluate):
3377 * WebProcess/WebPage/WebPage.cpp:
3378 (WebKit::WebPage::WebPage): Initialize page throttler for WebKit2 views.
3379 (WebKit::WebPage::mouseEvent): Check page throttler exists.
3380 (WebKit::WebPage::wheelEvent): ditto
3381 (WebKit::WebPage::keyEvent): ditto
3383 2014-04-18 Anders Carlsson <andersca@apple.com>
3385 Don't allow app sandboxed apps without the network client entitlement to launch the network process
3386 https://bugs.webkit.org/show_bug.cgi?id=131868
3387 <rdar://problem/12354188>
3389 Reviewed by Dan Bernstein.
3391 * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
3392 (WebKit::NetworkServiceInitializerDelegate::NetworkServiceInitializerDelegate):
3393 Add a new delegate that implements checkEntitlements().
3395 (NetworkServiceInitializer):
3396 Pass the new delegate to XPCServiceInitializer.
3398 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
3399 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
3400 Call checkEntitlements.
3402 (WebKit::XPCServiceInitializerDelegate::checkEntitlements):
3405 (WebKit::XPCServiceInitializerDelegate::hasEntitlement):
3406 Helper function that returns whether a client has the given entitlement.
3408 (WebKit::XPCServiceInitializerDelegate::isClientSandboxed):
3409 Helper function that checks whether the client is sandboxed.
3411 2014-04-18 Alice Barraclough <alice.barraclough@webkit.org>
3413 Find on page - extend API by providing highlighted match index
3414 https://bugs.webkit.org/show_bug.cgi?id=131776
3416 Reviewed by Tim Horton.
3418 * Shared/WebFindOptions.h: Add an option for determining match index.
3420 Plumb through the API layers the addition of a parameter for match index.
3421 * UIProcess/API/APIFindClient.h:
3422 (API::FindClient::didFindString):
3423 * UIProcess/API/C/WKPage.cpp:
3424 (WKPageSetPageFindClient):
3425 * UIProcess/API/Cocoa/WKWebView.mm:
3427 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3429 * UIProcess/API/Cocoa/_WKFindDelegate.h:
3430 * UIProcess/Cocoa/FindClient.h:
3431 * UIProcess/Cocoa/FindClient.mm:
3432 (WebKit::FindClient::setDelegate):
3433 (WebKit::FindClient::didFindString):
3434 * UIProcess/WebFindClient.cpp:
3435 (WebKit::WebFindClient::didFindString):
3436 * UIProcess/WebFindClient.h:
3437 * UIProcess/WebPageProxy.cpp:
3438 (WebKit::WebPageProxy::didFindString):
3439 * UIProcess/WebPageProxy.h:
3440 * UIProcess/WebPageProxy.messages.in:
3442 The actual tracking of the match index is contained in FindController class.
3443 * WebProcess/WebPage/FindController.cpp:
3444 (WebKit::FindController::FindController): Start out as -1, understood to be an undefined index in this context.
3445 (WebKit::FindController::updateFindUIAfterPageScroll):
3446 Perform the calculation of matchCount if the flag for DetermineMatchIndex is on.
3447 If matchCount exceeds max, keep the match index undefined because otherwise the finding could advance
3448 to a point where the index exceeds the match count, legitimately. If match