1 2015-10-30 Beth Dakin <bdakin@apple.com>
3 Tapping and holding a link should have a share option
4 https://bugs.webkit.org/show_bug.cgi?id=150693
6 rdar://problem/21319702
8 Reviewed by Tim Horton.
10 New _WKElementActionType called _WKElementActionTypeShare.
11 * UIProcess/API/Cocoa/_WKElementAction.h:
12 * UIProcess/API/Cocoa/_WKElementAction.mm:
13 (+[_WKElementAction _elementActionWithType:customTitle:assistant:]):
15 _WKElementActionTypeShare is part of the default actions for links.
16 * UIProcess/ios/WKActionSheetAssistant.h:
17 * UIProcess/ios/WKActionSheetAssistant.mm:
18 (-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
20 Handle the sharing part!
21 * UIProcess/ios/WKContentViewInteraction.mm:
22 (-[WKContentView actionSheetAssistant:shareElementWithURL:rect:]):
24 To support this in PDF, PDF need to create a _webSelectionAssistant.
25 * UIProcess/ios/WKPDFView.mm:
26 (-[WKPDFView web_initWithFrame:webView:]):
27 (-[WKPDFView actionSheetAssistant:openElementAtLocation:]):
28 (-[WKPDFView actionSheetAssistant:shareElementWithURL:rect:]):
29 (-[WKPDFView actionSheetAssistant:shouldIncludeAppLinkActionsForElement:]):
31 2015-10-30 Tim Horton <timothy_horton@apple.com>
33 WKView being inside WKWebView leads to weird API issues
34 https://bugs.webkit.org/show_bug.cgi?id=150174
36 Reviewed by Anders Carlsson.
38 * UIProcess/API/mac/WKView.mm:
39 (-[WKView _wantsKeyDownForEvent:]):
40 (-[WKView acceptsFirstMouse:]):
41 (-[WKView shouldDelayWindowOrderingForEvent:]):
42 (-[WKView validAttributesForMarkedText]):
43 (-[WKView _windowResizeMouseLocationIsInVisibleScrollerThumb:]):
44 (-[WKView drawRect:]):
46 (-[WKView mouseDownCanMoveWindow]):
47 (-[WKView viewDidHide]):
48 (-[WKView viewDidUnhide]):
49 (-[WKView _activeSpaceDidChange:]):
51 (-[WKView wantsUpdateLayer]):
52 (-[WKView canChangeFrameLayout:]):
53 (-[WKView printOperationWithPrintInfo:forFrame:]):
54 (+[WKView hideWordDefinitionWindow]):
55 * UIProcess/Cocoa/WebViewImpl.h:
56 (WebKit::WebViewImpl::wantsUpdateLayer):
57 (WebKit::WebViewImpl::mouseDownCanMoveWindow):
58 (WebKit::WebViewImpl::wantsKeyDownForEvent):
59 (WebKit::WebViewImpl::layerHostingView): Deleted.
60 * UIProcess/Cocoa/WebViewImpl.mm:
61 (WebKit::WebViewImpl::isOpaque):
62 (WebKit::WebViewImpl::acceptsFirstMouse):
63 (WebKit::WebViewImpl::drawRect):
64 (WebKit::WebViewImpl::canChangeFrameLayout):
65 (WebKit::WebViewImpl::printOperationWithPrintInfo):
66 (WebKit::WebViewImpl::shouldDelayWindowOrderingForEvent):
67 (WebKit::WebViewImpl::windowResizeMouseLocationIsInVisibleScrollerThumb):
68 (WebKit::WebViewImpl::viewDidHide):
69 (WebKit::WebViewImpl::viewDidUnhide):
70 (WebKit::WebViewImpl::activeSpaceDidChange):
71 (WebKit::WebViewImpl::hitTest):
72 (WebKit::WebViewImpl::hideWordDefinitionWindow):
73 (WebKit::WebViewImpl::validAttributesForMarkedText):
74 Printing and random bits.
76 2015-10-30 Anders Carlsson <andersca@apple.com>
78 REGRESSION (r191691): Unexpected "Share" context menu when right clicking around inspector
79 https://bugs.webkit.org/show_bug.cgi?id=150699
80 rdar://problem/23324522
82 Reviewed by Tim Horton.
84 Don't create a share menu item if we have nothing to share.
86 * UIProcess/mac/WebContextMenuProxyMac.mm:
87 (WebKit::WebContextMenuProxyMac::createShareMenuItem):
89 2015-10-30 Tim Horton <timothy_horton@apple.com>
91 Initialize some new WebViewImpl members
93 * UIProcess/Cocoa/WebViewImpl.h:
96 2015-10-30 Tim Horton <timothy_horton@apple.com>
100 * UIProcess/API/mac/WKView.mm:
102 2015-10-30 Tim Horton <timothy_horton@apple.com>
106 * UIProcess/Cocoa/WebViewImpl.h:
107 * UIProcess/Cocoa/WebViewImpl.mm:
108 (WebKit::WebViewImpl::collectKeyboardLayoutCommandsForEvent):
110 2015-10-30 Tim Horton <timothy_horton@apple.com>
112 WKView being inside WKWebView leads to weird API issues
113 https://bugs.webkit.org/show_bug.cgi?id=150174
115 Reviewed by Darin Adler.
117 * UIProcess/API/mac/WKView.mm:
118 (-[WKView doCommandBySelector:]):
119 (-[WKView insertText:]):
120 (-[WKView insertText:replacementRange:]):
121 (-[WKView inputContext]):
122 (-[WKView performKeyEquivalent:]):
124 (-[WKView keyDown:]):
125 (-[WKView flagsChanged:]):
126 (-[WKView setMarkedText:selectedRange:replacementRange:]):
127 (-[WKView unmarkText]):
128 (-[WKView selectedRange]):
129 (-[WKView hasMarkedText]):
130 (-[WKView markedRange]):
131 (-[WKView attributedSubstringForProposedRange:actualRange:]):
132 (-[WKView characterIndexForPoint:]):
133 (-[WKView firstRectForCharacterRange:actualRange:]):
134 (-[WKView selectedRangeWithCompletionHandler:]):
135 (-[WKView markedRangeWithCompletionHandler:]):
136 (-[WKView hasMarkedTextWithCompletionHandler:]):
137 (-[WKView attributedSubstringForProposedRange:completionHandler:]):
138 (-[WKView firstRectForCharacterRange:completionHandler:]):
139 (-[WKView characterIndexForPoint:completionHandler:]):
140 (-[WKView _superPerformKeyEquivalent:]):
141 (-[WKView _superKeyDown:]):
142 (extractUnderlines): Deleted.
143 (-[WKView _collectKeyboardLayoutCommandsForEvent:to:]): Deleted.
144 (-[WKView _interpretKeyEvent:completionHandler:]): Deleted.
145 (-[WKView NO_RETURN_DUE_TO_ASSERT]): Deleted.
146 (-[WKView _interpretKeyEvent:savingCommandsTo:]): Deleted.
147 (-[WKView _executeSavedKeypressCommands]): Deleted.
148 (-[WKView _doneWithKeyEvent:eventWasHandled:]): Deleted.
149 * UIProcess/API/mac/WKViewInternal.h:
150 * UIProcess/Cocoa/WebViewImpl.h:
151 * UIProcess/Cocoa/WebViewImpl.mm:
152 (WebKit::WebViewImpl::doneWithKeyEvent):
153 (WebKit::extractUnderlines):
154 (WebKit::WebViewImpl::collectKeyboardLayoutCommandsForEvent):
155 (WebKit::WebViewImpl::interpretKeyEvent):
156 (WebKit::WebViewImpl::doCommandBySelector):
157 (WebKit::WebViewImpl::insertText):
158 (WebKit::WebViewImpl::selectedRangeWithCompletionHandler):
159 (WebKit::WebViewImpl::markedRangeWithCompletionHandler):
160 (WebKit::WebViewImpl::hasMarkedTextWithCompletionHandler):
161 (WebKit::WebViewImpl::attributedSubstringForProposedRange):
162 (WebKit::WebViewImpl::firstRectForCharacterRange):
163 (WebKit::WebViewImpl::characterIndexForPoint):
164 (WebKit::WebViewImpl::inputContext):
165 (WebKit::WebViewImpl::unmarkText):
166 (WebKit::WebViewImpl::setMarkedText):
167 (WebKit::WebViewImpl::selectedRange):
168 (WebKit::WebViewImpl::hasMarkedText):
169 (WebKit::WebViewImpl::markedRange):
170 (WebKit::WebViewImpl::performKeyEquivalent):
171 (WebKit::WebViewImpl::keyUp):
172 (WebKit::WebViewImpl::keyDown):
173 (WebKit::WebViewImpl::flagsChanged):
174 (WebKit::WebViewImpl::executeSavedKeypressCommands):
175 * UIProcess/mac/PageClientImpl.mm:
176 (WebKit::PageClientImpl::doneWithKeyEvent):
177 Move NSTextInputClient implementation.
179 2015-10-30 Carlos Garcia Campos <cgarcia@igalia.com>
181 [GTK] Move the socket polling off the WorkQueue
182 https://bugs.webkit.org/show_bug.cgi?id=150593
184 Reviewed by Anders Carlsson.
186 Create the socket poll source in Connection::open and attach it to
187 the connection work queue context.
189 * Platform/IPC/Connection.h:
190 * Platform/IPC/unix/ConnectionUnix.cpp:
191 (IPC::Connection::platformInvalidate):
192 (IPC::Connection::open):
194 2015-10-30 Carlos Garcia Campos <cgarcia@igalia.com>
196 [GTK] Use RunLoop::Timer instead of GMainLoopSource
197 https://bugs.webkit.org/show_bug.cgi?id=150592
199 Reviewed by Žan Doberšek.
201 * Shared/Downloads/soup/DownloadSoup.cpp:
202 (WebKit::DownloadClient::DownloadClient):
203 (WebKit::DownloadClient::didReceiveData):
204 (WebKit::DownloadClient::handleResponseLater):
205 * UIProcess/gtk/GestureController.cpp:
206 (WebKit::GestureController::DragGesture::begin):
207 (WebKit::GestureController::DragGesture::update):
208 (WebKit::GestureController::DragGesture::end):
209 (WebKit::GestureController::DragGesture::longPressFired):
210 (WebKit::GestureController::DragGesture::DragGesture):
211 (WebKit::GestureController::ZoomGesture::scaleChanged):
212 (WebKit::GestureController::ZoomGesture::ZoomGesture):
213 * UIProcess/gtk/GestureController.h:
215 2015-10-29 Carlos Garcia Campos <cgarcia@igalia.com>
217 [GTK] Use a persistent main loop source in RunLoop glib implementation
218 https://bugs.webkit.org/show_bug.cgi?id=150590
220 Reviewed by Žan Doberšek.
222 Use RunLoop::dispatch() instead of
223 GMainLoopSource::scheduleAndDeleteOnDestroy in a couple of simple
226 * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
227 (WebKit::NetworkCache::runTaskInQueue):
228 * UIProcess/gtk/DragAndDropHandler.cpp:
229 (WebKit::DragAndDropHandler::dragLeave):
231 2015-10-29 Alex Christensen <achristensen@webkit.org>
233 Make WebCore a framework in Mac CMake build
234 https://bugs.webkit.org/show_bug.cgi?id=150702
236 Reviewed by Geoffrey Garen.
240 2015-10-29 Alex Christensen <achristensen@webkit.org>
242 EFL build fix after r191749
245 Only Mac should include the Cocoa directory.
247 2015-10-29 Tim Horton <timothy_horton@apple.com>
249 WKView being inside WKWebView leads to weird API issues
250 https://bugs.webkit.org/show_bug.cgi?id=150174
252 Reviewed by Anders Carlsson.
254 * Platform/spi/mac/AppKitSPI.h:
255 * UIProcess/API/mac/WKView.mm:
256 (-[WKView validRequestorForSendType:returnType:]):
257 (-[WKView readSelectionFromPasteboard:]):
258 (-[WKView changeFont:]):
259 (-[WKView startSpeaking:]):
260 (-[WKView stopSpeaking:]):
261 (-[WKView showGuessPanel:]):
262 (-[WKView checkSpelling:]):
263 (-[WKView changeSpelling:]):
264 (-[WKView toggleContinuousSpellChecking:]):
265 (-[WKView isGrammarCheckingEnabled]):
266 (-[WKView setGrammarCheckingEnabled:]):
267 (-[WKView toggleGrammarChecking:]):
268 (-[WKView toggleAutomaticSpellingCorrection:]):
269 (-[WKView orderFrontSubstitutionsPanel:]):
270 (-[WKView toggleSmartInsertDelete:]):
271 (-[WKView isAutomaticQuoteSubstitutionEnabled]):
272 (-[WKView setAutomaticQuoteSubstitutionEnabled:]):
273 (-[WKView toggleAutomaticQuoteSubstitution:]):
274 (-[WKView isAutomaticDashSubstitutionEnabled]):
275 (-[WKView setAutomaticDashSubstitutionEnabled:]):
276 (-[WKView toggleAutomaticDashSubstitution:]):
277 (-[WKView isAutomaticLinkDetectionEnabled]):
278 (-[WKView setAutomaticLinkDetectionEnabled:]):
279 (-[WKView toggleAutomaticLinkDetection:]):
280 (-[WKView isAutomaticTextReplacementEnabled]):
281 (-[WKView setAutomaticTextReplacementEnabled:]):
282 (-[WKView toggleAutomaticTextReplacement:]):
283 (-[WKView uppercaseWord:]):
284 (-[WKView lowercaseWord:]):
285 (-[WKView capitalizeWord:]):
286 * UIProcess/Cocoa/WebViewImpl.h:
287 * UIProcess/Cocoa/WebViewImpl.mm:
288 (WebKit::WebViewImpl::readSelectionFromPasteboard):
289 (WebKit::WebViewImpl::validRequestorForSendAndReturnTypes):
290 (WebKit::WebViewImpl::changeFontFromFontPanel):
291 (WebKit::WebViewImpl::startSpeaking):
292 (WebKit::WebViewImpl::stopSpeaking):
293 (WebKit::WebViewImpl::showGuessPanel):
294 (WebKit::WebViewImpl::checkSpelling):
295 (WebKit::WebViewImpl::changeSpelling):
296 (WebKit::WebViewImpl::toggleContinuousSpellChecking):
297 (WebKit::WebViewImpl::isGrammarCheckingEnabled):
298 (WebKit::WebViewImpl::setGrammarCheckingEnabled):
299 (WebKit::WebViewImpl::toggleGrammarChecking):
300 (WebKit::WebViewImpl::toggleAutomaticSpellingCorrection):
301 (WebKit::WebViewImpl::orderFrontSubstitutionsPanel):
302 (WebKit::WebViewImpl::toggleSmartInsertDelete):
303 (WebKit::WebViewImpl::isAutomaticQuoteSubstitutionEnabled):
304 (WebKit::WebViewImpl::setAutomaticQuoteSubstitutionEnabled):
305 (WebKit::WebViewImpl::toggleAutomaticQuoteSubstitution):
306 (WebKit::WebViewImpl::isAutomaticDashSubstitutionEnabled):
307 (WebKit::WebViewImpl::setAutomaticDashSubstitutionEnabled):
308 (WebKit::WebViewImpl::toggleAutomaticDashSubstitution):
309 (WebKit::WebViewImpl::isAutomaticLinkDetectionEnabled):
310 (WebKit::WebViewImpl::setAutomaticLinkDetectionEnabled):
311 (WebKit::WebViewImpl::toggleAutomaticLinkDetection):
312 (WebKit::WebViewImpl::setAutomaticTextReplacementEnabled):
313 (WebKit::WebViewImpl::toggleAutomaticTextReplacement):
314 (WebKit::WebViewImpl::uppercaseWord):
315 (WebKit::WebViewImpl::lowercaseWord):
316 (WebKit::WebViewImpl::capitalizeWord):
317 Move spellcheck and related bits.
319 2015-10-29 Eric Carlson <eric.carlson@apple.com>
321 Revert inadvertent changes
322 https://bugs.webkit.org/show_bug.cgi?id=150694
324 Reviewed by Tim Horton.
326 * WebProcess/com.apple.WebProcess.sb.in:
328 2015-10-29 Alex Christensen <achristensen@webkit.org>
334 I mistakenly added some mac-specific files to the shared CMakeLists.txt. This puts them in the right place.
335 * UIProcess/WebPageProxy.cpp:
336 (WebKit::WebPageProxy::viewWillStartLiveResize):
337 (WebKit::WebPageProxy::viewDidLeaveWindow):
338 (WebKit::WebPageProxy::didEndColorPicker):
339 Add preprocessor enable checks.
341 2015-10-29 Tim Horton <timothy_horton@apple.com>
343 WKView being inside WKWebView leads to weird API issues
344 https://bugs.webkit.org/show_bug.cgi?id=150174
346 Reviewed by Darin Adler.
348 * UIProcess/API/mac/WKView.mm:
349 (-[WKView browsingContextController]):
350 (-[WKView validateUserInterfaceItem:]):
351 (-[WKView saveBackForwardSnapshotForCurrentItem]):
352 (-[WKView saveBackForwardSnapshotForItem:]):
353 (-[WKView updateLayer]):
354 (-[WKView minimumSizeForAutoLayout]):
355 (-[WKView setMinimumSizeForAutoLayout:]):
356 (-[WKView shouldExpandToViewHeightForAutoLayout]):
357 (-[WKView setShouldExpandToViewHeightForAutoLayout:]):
358 (-[WKView underlayColor]):
359 (-[WKView setUnderlayColor:]):
360 (-[WKView _setOverlayScrollbarStyle:]):
361 (-[WKView _overlayScrollbarStyle]):
362 (-[WKView _pageExtendedBackgroundColor]):
363 (-[WKView forceAsyncDrawingAreaSizeUpdate:]):
364 (-[WKView waitForAsyncDrawingAreaSizeUpdate]):
365 (-[WKView isUsingUISideCompositing]):
366 (createSelectorExceptionMap): Deleted.
367 (commandNameForSelector): Deleted.
369 (toolbarItem): Deleted.
370 (-[WKView _setUserInterfaceItemState:enabled:state:]): Deleted.
371 * UIProcess/Cocoa/WebViewImpl.h:
372 * UIProcess/Cocoa/WebViewImpl.mm:
373 (WebKit::WebViewImpl::createDrawingAreaProxy):
374 (WebKit::WebViewImpl::isUsingUISideCompositing):
375 (WebKit::WebViewImpl::forceAsyncDrawingAreaSizeUpdate):
376 (WebKit::WebViewImpl::waitForAsyncDrawingAreaSizeUpdate):
377 (WebKit::WebViewImpl::updateLayer):
378 (WebKit::WebViewImpl::setMinimumSizeForAutoLayout):
379 (WebKit::WebViewImpl::minimumSizeForAutoLayout):
380 (WebKit::WebViewImpl::setShouldExpandToViewHeightForAutoLayout):
381 (WebKit::WebViewImpl::shouldExpandToViewHeightForAutoLayout):
382 (WebKit::WebViewImpl::setUnderlayColor):
383 (WebKit::WebViewImpl::underlayColor):
384 (WebKit::WebViewImpl::pageExtendedBackgroundColor):
385 (WebKit::WebViewImpl::setOverlayScrollbarStyle):
386 (WebKit::WebViewImpl::overlayScrollbarStyle):
387 (WebKit::createSelectorExceptionMap):
388 (WebKit::commandNameForSelector):
389 (WebKit::WebViewImpl::executeSavedCommandBySelector):
390 (WebKit::WebViewImpl::executeEditCommandForSelector):
392 (WebKit::toolbarItem):
393 (WebKit::WebViewImpl::validateUserInterfaceItem):
394 (WebKit::WebViewImpl::setUserInterfaceItemState):
395 (WebKit::WebViewImpl::browsingContextController):
396 (WebKit::WebViewImpl::saveBackForwardSnapshotForCurrentItem):
397 (WebKit::WebViewImpl::saveBackForwardSnapshotForItem):
398 (WebKit::WebViewImpl::executeEditCommand): Deleted.
399 Move UI validation and a grab-bag of other things.
401 2015-10-29 Alex Christensen <achristensen@webkit.org>
404 https://bugs.webkit.org/show_bug.cgi?id=150686
406 Reviewed by Filip Pizlo.
411 2015-10-29 Commit Queue <commit-queue@webkit.org>
413 Unreviewed, rolling out r191728.
414 https://bugs.webkit.org/show_bug.cgi?id=150668
416 Caused a lot of timeouts in layout tests (Requested by KaL on
421 "[GTK] Use a persistent main loop source in RunLoop glib
423 https://bugs.webkit.org/show_bug.cgi?id=150590
424 http://trac.webkit.org/changeset/191728
426 2015-10-29 Carlos Garcia Campos <cgarcia@igalia.com>
428 [GTK] Use a persistent main loop source in RunLoop glib implementation
429 https://bugs.webkit.org/show_bug.cgi?id=150590
431 Reviewed by Žan Doberšek.
433 Use RunLoop::dispatch() instead of
434 GMainLoopSource::scheduleAndDeleteOnDestroy in a couple of simple
437 * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
438 (WebKit::NetworkCache::runTaskInQueue):
439 * UIProcess/gtk/DragAndDropHandler.cpp:
440 (WebKit::DragAndDropHandler::dragLeave):
442 2015-10-28 Tim Horton <timothy_horton@apple.com>
446 * UIProcess/mac/PageClientImpl.mm:
447 (WebKit::PageClientImpl::startWindowDrag):
448 (WebKit::PageClientImpl::platformWindow):
450 2015-10-28 Tim Horton <timothy_horton@apple.com>
452 WKView being inside WKWebView leads to weird API issues
453 https://bugs.webkit.org/show_bug.cgi?id=150174
455 Reviewed by Anders Carlsson.
457 * UIProcess/API/C/mac/WKPagePrivateMac.mm:
458 (WKPageGetObjectRegistry):
459 * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
460 (-[WKBrowsingContextController _remoteObjectRegistry]):
461 * UIProcess/API/mac/WKView.mm:
463 (-[WKView _inspectorAttachmentView]):
464 (-[WKView _setInspectorAttachmentView:]):
465 (-[WKView windowOcclusionDetectionEnabled]):
466 (-[WKView setWindowOcclusionDetectionEnabled:]):
467 (-[WKView _setTotalHeightOfBanners:]):
468 (-[WKView _totalHeightOfBanners]):
469 (-[WKView initWithFrame:processPool:configuration:webView:]): Deleted.
470 (-[WKView _remoteObjectRegistry]): Deleted.
471 (-[WKView _startWindowDrag]): Deleted.
472 * UIProcess/API/mac/WKViewInternal.h:
473 * UIProcess/Cocoa/WebViewImpl.h:
474 (WebKit::WebViewImpl::setWindowOcclusionDetectionEnabled):
475 (WebKit::WebViewImpl::windowOcclusionDetectionEnabled):
476 (WebKit::WebViewImpl::setTotalHeightOfBanners):
477 (WebKit::WebViewImpl::totalHeightOfBanners):
478 * UIProcess/Cocoa/WebViewImpl.mm:
479 (WebKit::WebViewImpl::window):
480 (WebKit::WebViewImpl::setInspectorAttachmentView):
481 (WebKit::WebViewImpl::inspectorAttachmentView):
482 (WebKit::WebViewImpl::remoteObjectRegistry):
483 (WebKit::WebViewImpl::destroyRemoteObjectRegistry):
484 * UIProcess/PageClient.h:
485 * UIProcess/WebPageProxy.h:
486 * UIProcess/mac/PageClientImpl.h:
487 * UIProcess/mac/PageClientImpl.mm:
488 (WebKit::PageClientImpl::isViewVisible):
489 (WebKit::PageClientImpl::createColorPicker):
490 (WebKit::PageClientImpl::startWindowDrag):
491 (WebKit::PageClientImpl::platformWindow):
492 (WebKit::PageClientImpl::inspectorAttachmentView):
493 (WebKit::PageClientImpl::remoteObjectRegistry):
494 * UIProcess/mac/WebInspectorProxyMac.mm:
495 (WebKit::WebInspectorProxy::platformCreateInspectorPage):
496 (WebKit::WebInspectorProxy::platformCanAttach):
497 (WebKit::WebInspectorProxy::platformBringToFront):
498 (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
499 (WebKit::WebInspectorProxy::platformInspectedWindowHeight):
500 (WebKit::WebInspectorProxy::platformInspectedWindowWidth):
501 (WebKit::WebInspectorProxy::platformAttach):
502 (WebKit::WebInspectorProxy::platformDetach):
503 (WebKit::WebInspectorProxy::platformStartWindowDrag):
504 * UIProcess/mac/WebPageProxyMac.mm:
505 (WebKit::WebPageProxy::startWindowDrag):
506 (WebKit::WebPageProxy::platformWindow):
507 (WebKit::WebPageProxy::inspectorAttachmentView):
508 (WebKit::WebPageProxy::remoteObjectRegistry):
509 (WebKit::WebPageProxy::wkView): Deleted.
510 Get rid of the wkView() getters on PageClientImpl and WebPageProxy, because
511 those can't be a thing in the brave new world. Instead, plumb the four
512 callers through PageClient to WebViewImpl.
514 Also, move a few more things (banners, window occlusion).
516 2015-10-27 Anders Carlsson <andersca@apple.com>
518 Stub out more of the context menu SPI
519 https://bugs.webkit.org/show_bug.cgi?id=150606
521 Reviewed by Dan Bernstein.
523 Add a delegate method that will allow the client to modify the menu. Also,
524 add an empty _WKContextMenuElementInfo class and its _WKElementInfo superclass.
526 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
527 * UIProcess/API/Cocoa/_WKContextMenuElementInfo.h: Added.
528 * UIProcess/API/Cocoa/_WKContextMenuElementInfo.mm: Added.
529 * UIProcess/API/Cocoa/_WKElementInfo.h: Added.
530 * UIProcess/API/Cocoa/_WKElementInfo.mm: Added.
531 * UIProcess/Cocoa/UIDelegate.h:
532 * UIProcess/Cocoa/UIDelegate.mm:
533 (WebKit::UIDelegate::setDelegate):
534 (WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
535 (WebKit::UIDelegate::UIClient::createNewPage):
536 * UIProcess/mac/WebContextMenuProxyMac.mm:
537 (WebKit::WebContextMenuProxyMac::showContextMenu):
538 * WebKit2.xcodeproj/project.pbxproj:
540 2015-10-28 Anders Carlsson <andersca@apple.com>
542 Stop using ContextMenuItem::shareMenuItem in the UI process
543 https://bugs.webkit.org/show_bug.cgi?id=150578
545 Reviewed by Tim Horton.
547 * UIProcess/mac/WebContextMenuProxyMac.h:
548 * UIProcess/mac/WebContextMenuProxyMac.mm:
549 (WebKit::WebContextMenuProxyMac::createShareMenuItem):
550 (WebKit::WebContextMenuProxyMac::createContextMenuItem):
551 (WebKit::WebContextMenuProxyMac::shareMenuItem): Deleted.
553 2015-10-28 Tim Horton <timothy_horton@apple.com>
555 WKView being inside WKWebView leads to weird API issues
556 https://bugs.webkit.org/show_bug.cgi?id=150174
558 Reviewed by Anders Carlsson.
560 * UIProcess/API/mac/WKView.mm:
561 (-[WKView _superDoCommandBySelector:]):
562 (-[WKView _createDrawingAreaProxy]): Deleted.
563 (-[WKView _processDidExit]): Deleted.
564 (-[WKView _pageClosed]): Deleted.
565 (-[WKView _didRelaunchProcess]): Deleted.
566 (-[WKView _convertToDeviceSpace:]): Deleted.
567 (-[WKView _convertToUserSpace:]): Deleted.
568 (-[WKView _executeSavedCommandBySelector:]): Deleted.
569 (-[WKResponderChainSink initWithResponderChain:]): Deleted.
570 (-[WKResponderChainSink detach]): Deleted.
571 (-[WKResponderChainSink didReceiveUnhandledCommand]): Deleted.
572 (-[WKResponderChainSink noResponderFor:]): Deleted.
573 (-[WKResponderChainSink doCommandBySelector:]): Deleted.
574 (-[WKResponderChainSink tryToPerform:with:]): Deleted.
575 * UIProcess/API/mac/WKViewInternal.h:
576 * UIProcess/Cocoa/WebViewImpl.h:
577 * UIProcess/Cocoa/WebViewImpl.mm:
578 (-[WKResponderChainSink initWithResponderChain:]):
579 (-[WKResponderChainSink detach]):
580 (-[WKResponderChainSink didReceiveUnhandledCommand]):
581 (-[WKResponderChainSink noResponderFor:]):
582 (-[WKResponderChainSink doCommandBySelector:]):
583 (-[WKResponderChainSink tryToPerform:with:]):
584 (WebKit::WebViewImpl::createDrawingAreaProxy):
585 (WebKit::WebViewImpl::processDidExit):
586 (WebKit::WebViewImpl::pageClosed):
587 (WebKit::WebViewImpl::didRelaunchProcess):
588 (WebKit::WebViewImpl::executeSavedCommandBySelector):
589 (WebKit::WebViewImpl::resetGestureController): Deleted.
590 * UIProcess/mac/PageClientImpl.mm:
591 (WebKit::PageClientImpl::createDrawingAreaProxy):
592 (WebKit::PageClientImpl::processDidExit):
593 (WebKit::PageClientImpl::pageClosed):
594 (WebKit::PageClientImpl::didRelaunchProcess):
595 (WebKit::PageClientImpl::convertToDeviceSpace):
596 (WebKit::PageClientImpl::convertToUserSpace):
597 (WebKit::PageClientImpl::executeSavedCommandBySelector):
598 Move most of the rest of WKViewInternal.h's methods to WebViewImpl.
600 2015-10-28 Alex Christensen <achristensen@webkit.org>
602 Compile and link with CMake on Mac
603 https://bugs.webkit.org/show_bug.cgi?id=150632
605 Reviewed by Tim Horton.
612 2015-10-27 Anders Carlsson <andersca@apple.com>
614 Stub out more of the context menu SPI
615 https://bugs.webkit.org/show_bug.cgi?id=150606
617 Reviewed by Dan Bernstein.
619 Add a delegate method that will allow the client to modify the menu. Also,
620 add an empty _WKContextMenuElementInfo class and its _WKElementInfo superclass.
622 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
623 * UIProcess/API/Cocoa/_WKContextMenuElementInfo.h: Added.
624 * UIProcess/API/Cocoa/_WKContextMenuElementInfo.mm: Added.
625 * UIProcess/API/Cocoa/_WKElementInfo.h: Added.
626 * UIProcess/API/Cocoa/_WKElementInfo.mm: Added.
627 * UIProcess/Cocoa/UIDelegate.h:
628 * UIProcess/Cocoa/UIDelegate.mm:
629 (WebKit::UIDelegate::setDelegate):
630 (WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
631 (WebKit::UIDelegate::UIClient::createNewPage):
632 * UIProcess/mac/WebContextMenuProxyMac.mm:
633 (WebKit::WebContextMenuProxyMac::showContextMenu):
634 * WebKit2.xcodeproj/project.pbxproj:
636 2015-10-28 Chris Dumez <cdumez@apple.com>
638 Use RunLoopTimer in DataURLDecoder to avoid issues related to runloops
639 https://bugs.webkit.org/show_bug.cgi?id=150609
640 <rdar://problem/22702894>
642 Reviewed by Antti Koivisto.
644 Move addSchedulePair() call to Page::platformInitialize() so that
645 RunLoopTimer can be used by any Page, even those that don't have
648 * WebProcess/WebPage/mac/WebPageMac.mm:
649 (WebKit::WebPage::platformInitialize): Deleted.
651 2015-10-27 Tim Horton <timothy_horton@apple.com>
653 Fix the 32-bit build.
655 * UIProcess/Cocoa/WebViewImpl.mm:
656 (WebKit::WebViewImpl::dragImageForView):
658 2015-10-27 Tim Horton <timothy_horton@apple.com>
662 * UIProcess/Cocoa/WebViewImpl.mm:
664 2015-10-27 Tim Horton <timothy_horton@apple.com>
666 WKView being inside WKWebView leads to weird API issues
667 https://bugs.webkit.org/show_bug.cgi?id=150174
669 Reviewed by Anders Carlsson.
671 * UIProcess/API/mac/WKView.mm:
672 (-[WKView mouseDown:]):
673 (-[WKView mouseUp:]):
674 (-[WKView acceptsFirstMouse:]):
675 (-[WKView shouldDelayWindowOrderingForEvent:]):
676 (-[WKView pasteboardChangedOwner:]):
677 (-[WKView pasteboard:provideDataForType:]):
678 (-[WKView namesOfPromisedFilesDroppedAtDestination:]):
679 (-[WKView _startWindowDrag]):
680 (-[WKView _setMouseDownEvent:]): Deleted.
681 (-[WKView _colorSpace]): Deleted.
682 (-[WKView _dragImageForView:withImage:at:linkDrag:]): Deleted.
683 (matchesExtensionOrEquivalent): Deleted.
684 (-[WKView _setFileAndURLTypes:withExtension:withTitle:withURL:withVisibleURL:forPasteboard:]): Deleted.
685 (-[WKView _setPromisedDataForImage:withFileName:withExtension:withTitle:withURL:withVisibleURL:withArchive:forPasteboard:]): Deleted.
686 (-[WKView _setPromisedDataForAttachment:withExtension:withTitle:withURL:withVisibleURL:forPasteboard:]): Deleted.
687 (fileExists): Deleted.
688 (pathWithUniqueFilenameForPath): Deleted.
689 (-[WKView spellCheckerDocumentTag]): Deleted.
690 (-[WKView handleAcceptedAlternativeText:]): Deleted.
691 (-[WKView initWithFrame:processPool:configuration:webView:]): Deleted.
692 * UIProcess/API/mac/WKViewInternal.h:
693 * UIProcess/Cocoa/WebViewImpl.h:
694 * UIProcess/Cocoa/WebViewImpl.mm:
695 (WebKit::WebViewImpl::handleAcceptedAlternativeText):
696 (WebKit::WebViewImpl::spellCheckerDocumentTag):
697 (WebKit::WebViewImpl::startWindowDrag):
698 (WebKit::WebViewImpl::dragImageForView):
699 (WebKit::matchesExtensionOrEquivalent):
700 (WebKit::WebViewImpl::setFileAndURLTypes):
701 (WebKit::WebViewImpl::setPromisedDataForImage):
702 (WebKit::WebViewImpl::setPromisedDataForAttachment):
703 (WebKit::WebViewImpl::pasteboardChangedOwner):
704 (WebKit::WebViewImpl::provideDataForPasteboard):
705 (WebKit::fileExists):
706 (WebKit::pathWithUniqueFilenameForPath):
707 (WebKit::WebViewImpl::namesOfPromisedFilesDroppedAtDestination):
708 (WebKit::WebViewImpl::setLastMouseDownEvent):
709 * UIProcess/mac/CorrectionPanel.h:
710 * UIProcess/mac/CorrectionPanel.mm:
711 (WebKit::CorrectionPanel::show):
712 (WebKit::CorrectionPanel::recordAutocorrectionResponse):
713 (WebKit::CorrectionPanel::handleAcceptedReplacement):
714 * UIProcess/mac/PageClientImpl.mm:
715 (WebKit::PageClientImpl::colorSpace):
716 (WebKit::PageClientImpl::setDragImage):
717 (WebKit::PageClientImpl::setPromisedDataForImage):
718 (WebKit::PageClientImpl::setPromisedDataForAttachment):
719 (WebKit::PageClientImpl::showCorrectionPanel):
720 (WebKit::PageClientImpl::recordAutocorrectionResponse):
721 (WebKit::PageClientImpl::showDictationAlternativeUI):
722 Move some pasteboard and spellcheck code.
724 2015-10-27 Wenson Hsieh <wenson_hsieh@apple.com>
726 Implement viewport-width-based fast-click heuristic
727 https://bugs.webkit.org/show_bug.cgi?id=150604
728 <rdar://problem/23267308>
730 Reviewed by Simon Fraser.
732 Implement a new fast-click heuristic that applies to viewports with width = device-width. The basic rules are
733 as follows: when a page has viewport width = device-width and is at initial zoom scale, we disable double-tapping
734 in favor of fast-clicking. However, if the viewport scale is not the initial scale, we allow double tapping. For
735 fast-clicking to remain useful after the user pinch-zooms, we change our double-tap to zoom out behavior to zoom
736 to the initial scale rather than the minimum scale. For unscalable viewports, we default to fast-clicking behavior,
737 and for all other viewports not at device-width, we double-tap to zoom and scroll as normal.
739 This patch removes some logic previously used for our scroll- and zoom-based fast-clicking heuristic, and adds
740 information about the viewport width and initial scale to RemoteLayerTreeTransactions. This information is then
741 used by the UI process to determine whether double tapping should be disabled or enabled.
743 The fast-click heuristic can be turned off through user default preferences, and a tap highlight for debugging
744 fast-clicking can also be enabled through a user default preference. A red highlight indicates that a single-
745 tap was slow, whereas a green highlight indicates a fast single-tap.
747 * Shared/mac/RemoteLayerTreeTransaction.h:
748 (WebKit::RemoteLayerTreeTransaction::initialScaleFactor):
749 (WebKit::RemoteLayerTreeTransaction::setInitialScaleFactor):
750 (WebKit::RemoteLayerTreeTransaction::viewportMetaTagWidth):
751 (WebKit::RemoteLayerTreeTransaction::setViewportMetaTagWidth):
752 * Shared/mac/RemoteLayerTreeTransaction.mm:
753 (WebKit::RemoteLayerTreeTransaction::encode):
754 (WebKit::RemoteLayerTreeTransaction::decode):
755 * UIProcess/API/Cocoa/WKWebView.mm:
756 (-[WKWebView initWithFrame:configuration:]):
757 (-[WKWebView _processDidExit]):
758 (-[WKWebView _didCommitLayerTree:]):
759 (-[WKWebView _zoomToInitialScaleWithOrigin:animated:]):
760 (-[WKWebView _allowsDoubleTapGestures]):
761 (-[WKWebView _setViewportMetaTagWidth:]): Deleted.
762 (-[WKWebView _contentZoomScale]): Deleted.
763 (-[WKWebView _viewportMetaTagWidth]): Deleted.
764 (-[WKWebView _viewportIsUserScalable]): Deleted.
765 * UIProcess/API/Cocoa/WKWebViewInternal.h:
766 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
767 * UIProcess/PageClient.h:
768 * UIProcess/WebPageProxy.h:
769 * UIProcess/WebPageProxy.messages.in:
770 * UIProcess/ios/PageClientImplIOS.h:
771 * UIProcess/ios/PageClientImplIOS.mm:
772 (WebKit::PageClientImpl::disableDoubleTapGesturesDuringTapIfNecessary):
773 (WebKit::PageClientImpl::didChangeViewportMetaTagWidth): Deleted.
774 (WebKit::PageClientImpl::disableDoubleTapGesturesUntilTapIsFinishedIfNecessary): Deleted.
775 * UIProcess/ios/SmartMagnificationController.h:
776 * UIProcess/ios/SmartMagnificationController.mm:
777 (WebKit::SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture):
778 * UIProcess/ios/WKContentView.h:
779 * UIProcess/ios/WKContentView.mm:
780 (-[WKContentView _zoomToInitialScaleWithOrigin:]):
781 * UIProcess/ios/WKContentViewInteraction.h:
782 * UIProcess/ios/WKContentViewInteraction.mm:
783 (-[WKContentView setupInteraction]):
784 (-[WKContentView _showTapHighlight]):
785 (-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]):
786 (-[WKContentView _mayDisableDoubleTapGesturesDuringSingleTap]):
787 (-[WKContentView _disableDoubleTapGesturesDuringTapIfNecessary:]):
788 (-[WKContentView _finishInteraction]):
789 (-[WKContentView _endPotentialTapAndEnableDoubleTapGesturesIfNecessary]):
790 (-[WKContentView _tapHighlightColorForFastClick:]):
791 (-[WKContentView _setDoubleTapGesturesEnabled:]):
792 (-[WKContentView _fastClickZoomThreshold]): Deleted.
793 (-[WKContentView _allowDoubleTapToZoomForCurrentZoomScale:andTargetZoomScale:]): Deleted.
794 (-[WKContentView _disableDoubleTapGesturesUntilTapIsFinishedIfNecessary:allowsDoubleTapZoom:targetRect:isReplaced:minimumScale:maximumScale:]): Deleted.
795 * UIProcess/ios/WebPageProxyIOS.mm:
796 (WebKit::WebPageProxy::disableDoubleTapGesturesDuringTapIfNecessary):
797 (WebKit::WebPageProxy::viewportMetaTagWidthDidChange): Deleted.
798 (WebKit::WebPageProxy::disableDoubleTapGesturesUntilTapIsFinishedIfNecessary): Deleted.
799 * WebProcess/WebPage/ViewGestureGeometryCollector.h:
800 * WebProcess/WebPage/WebPage.cpp:
801 (WebKit::WebPage::willCommitLayerTree):
802 * WebProcess/WebPage/ios/WebPageIOS.mm:
803 (WebKit::WebPage::potentialTapAtPosition):
804 (WebKit::WebPage::viewportPropertiesDidChange): Deleted.
806 2015-10-27 Tim Horton <timothy_horton@apple.com>
808 WKView being inside WKWebView leads to weird API issues
809 https://bugs.webkit.org/show_bug.cgi?id=150174
811 Reviewed by Anders Carlsson.
813 * UIProcess/API/mac/WKView.mm:
814 (-[WKView _superAccessibilityAttributeValue:]):
815 (-[WKView accessibilityFocusedUIElement]):
816 (-[WKView accessibilityIsIgnored]):
817 (-[WKView accessibilityHitTest:]):
818 (-[WKView accessibilityAttributeValue:]):
819 (-[WKView _processDidExit]):
820 (-[WKView _pageClosed]):
821 (-[WKView _updateRemoteAccessibilityRegistration:]): Deleted.
822 (-[WKView enableAccessibilityIfNecessary]): Deleted.
823 (-[WKView _toolTipChangedFrom:to:]): Deleted.
824 (-[WKView _setAccessibilityWebProcessToken:]): Deleted.
825 (-[WKView _hasFullScreenWindowController]): Deleted.
826 (-[WKView _fullScreenWindowController]): Deleted.
827 (-[WKView _closeFullScreenWindowController]): Deleted.
828 (-[WKView _setSuppressVisibilityUpdates:]): Deleted.
829 (-[WKView _suppressVisibilityUpdates]): Deleted.
830 (-[WKView _primaryTrackingArea]): Deleted.
831 (-[WKView _setPrimaryTrackingArea:]): Deleted.
832 (-[WKView initWithFrame:processPool:configuration:webView:]): Deleted.
833 * UIProcess/API/mac/WKViewInternal.h:
834 * UIProcess/Cocoa/WebViewImpl.h:
835 (WebKit::WebViewImpl::accessibilityIsIgnored):
836 (WebKit::WebViewImpl::primaryTrackingArea):
837 * UIProcess/Cocoa/WebViewImpl.mm:
838 (WebKit::trackingAreaOptions):
839 (WebKit::WebViewImpl::WebViewImpl):
840 (WebKit::WebViewImpl::setAccessibilityWebProcessToken):
841 (WebKit::WebViewImpl::updateRemoteAccessibilityRegistration):
842 (WebKit::WebViewImpl::accessibilityFocusedUIElement):
843 (WebKit::WebViewImpl::accessibilityHitTest):
844 (WebKit::WebViewImpl::enableAccessibilityIfNecessary):
845 (WebKit::WebViewImpl::accessibilityAttributeValue):
846 (WebKit::WebViewImpl::setPrimaryTrackingArea):
847 (WebKit::WebViewImpl::toolTipChanged):
848 * UIProcess/mac/PageClientImpl.mm:
849 (WebKit::PageClientImpl::toolTipChanged):
850 (WebKit::PageClientImpl::accessibilityWebProcessTokenReceived):
851 (WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):
852 (WebKit::PageClientImpl::closeFullScreenManager):
853 (WebKit::PageClientImpl::isFullScreen):
854 (WebKit::PageClientImpl::enterFullScreen):
855 (WebKit::PageClientImpl::exitFullScreen):
856 (WebKit::PageClientImpl::beganEnterFullScreen):
857 (WebKit::PageClientImpl::beganExitFullScreen):
858 Move accessibility code, and fold in some internal-only methods.
860 2015-10-27 Tim Horton <timothy_horton@apple.com>
862 WKView being inside WKWebView leads to weird API issues
863 https://bugs.webkit.org/show_bug.cgi?id=150174
865 Reviewed by Anders Carlsson.
867 * UIProcess/API/mac/WKView.mm:
868 (-[WKView scrollWheel:]):
869 (-[WKView swipeWithEvent:]):
870 (-[WKView _superSwipeWithEvent:]):
871 (-[WKView _superMagnifyWithEvent:]):
872 (-[WKView _superSmartMagnifyWithEvent:]):
873 (-[WKView _processDidExit]):
874 (-[WKView setAllowsBackForwardNavigationGestures:]):
875 (-[WKView allowsBackForwardNavigationGestures]):
876 (-[WKView setAllowsMagnification:]):
877 (-[WKView allowsMagnification]):
878 (-[WKView magnifyWithEvent:]):
879 (-[WKView rotateWithEvent:]):
880 (-[WKView _gestureEventWasNotHandledByWebCore:]):
881 (-[WKView smartMagnifyWithEvent:]):
882 (-[WKView setMagnification:centeredAtPoint:]):
883 (-[WKView setMagnification:]):
884 (-[WKView magnification]):
885 (-[WKView _setCustomSwipeViews:]):
886 (-[WKView _setCustomSwipeViewsTopContentInset:]):
887 (-[WKView _tryToSwipeWithEvent:ignoringPinnedState:]):
888 (-[WKView _setDidMoveSwipeSnapshotCallback:]):
889 (-[WKView _ensureGestureController]): Deleted.
890 (takeWindowSnapshot): Deleted.
891 (-[WKView _takeViewSnapshot]): Deleted.
892 (-[WKView _wheelEventWasNotHandledByWebCore:]): Deleted.
893 (-[WKView _didFirstVisuallyNonEmptyLayoutForMainFrame]): Deleted.
894 (-[WKView _didFinishLoadForMainFrame]): Deleted.
895 (-[WKView _didFailLoadForMainFrame]): Deleted.
896 (-[WKView _didSameDocumentNavigationForMainFrame:]): Deleted.
897 (-[WKView _removeNavigationGestureSnapshot]): Deleted.
898 * UIProcess/API/mac/WKViewInternal.h:
899 * UIProcess/Cocoa/WebViewImpl.h:
900 (WebKit::WebViewImpl::gestureController):
901 (WebKit::WebViewImpl::allowsBackForwardNavigationGestures):
902 (WebKit::WebViewImpl::allowsMagnification):
903 * UIProcess/Cocoa/WebViewImpl.mm:
904 (WebKit::takeWindowSnapshot):
905 (WebKit::WebViewImpl::takeViewSnapshot):
906 (WebKit::WebViewImpl::ensureGestureController):
907 (WebKit::WebViewImpl::resetGestureController):
908 (WebKit::WebViewImpl::setAllowsBackForwardNavigationGestures):
909 (WebKit::WebViewImpl::setAllowsMagnification):
910 (WebKit::WebViewImpl::setMagnification):
911 (WebKit::WebViewImpl::magnification):
912 (WebKit::WebViewImpl::setCustomSwipeViews):
913 (WebKit::WebViewImpl::setCustomSwipeViewsTopContentInset):
914 (WebKit::WebViewImpl::tryToSwipeWithEvent):
915 (WebKit::WebViewImpl::setDidMoveSwipeSnapshotCallback):
916 (WebKit::WebViewImpl::scrollWheel):
917 (WebKit::WebViewImpl::swipeWithEvent):
918 (WebKit::WebViewImpl::magnifyWithEvent):
919 (WebKit::WebViewImpl::smartMagnifyWithEvent):
920 (WebKit::WebViewImpl::rotateWithEvent):
921 (WebKit::WebViewImpl::gestureEventWasNotHandledByWebCore):
922 (WebKit::WebViewImpl::gestureEventWasNotHandledByWebCoreFromViewOnly):
923 * UIProcess/mac/PageClientImpl.mm:
924 (WebKit::PageClientImpl::takeViewSnapshot):
925 (WebKit::PageClientImpl::wheelEventWasNotHandledByWebCore):
926 (WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):
927 (WebKit::PageClientImpl::didFinishLoadForMainFrame):
928 (WebKit::PageClientImpl::didFailLoadForMainFrame):
929 (WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame):
930 (WebKit::PageClientImpl::removeNavigationGestureSnapshot):
931 Move swipe, zoom, rotate, and snapshotting code.
933 2015-10-27 Zhuo Li <zachli@apple.com>
935 Add WebKit API to clear data type Search Field Recent Searches.
936 https://bugs.webkit.org/show_bug.cgi?id=150019.
938 Reviewed by Anders Carlsson.
940 * Shared/WebsiteData/WebsiteDataTypes.h: Add data type Search Field Recent Searches.
941 * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
942 (dataTypesToString): Ditto.
943 * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
944 (WebKit::toWebsiteDataTypes): Ditto.
945 (WebKit::toWKWebsiteDataTypes): Ditto.
946 * UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h: Ditto.
947 * UIProcess/WebsiteData/WebsiteDataStore.cpp:
948 (WebKit::WebsiteDataStore::removeData): Handle the case when data type is Search
949 Field Recent Searches.
950 * UIProcess/WebsiteData/WebsiteDataStore.h: Add a private function for removing
951 recent searches based on time.
952 * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
953 (WebKit::WebsiteDataStoreCocoa::platformRemoveRecentSearches): Call the removing
954 recent searches logic in WebCore.
955 * UIProcess/efl/WebPageProxyEfl.cpp:
956 (WebKit::WebsiteDataStore::platformRemoveRecentSearches): Not implemented.
957 * UIProcess/gtk/WebPageProxyGtk.cpp:
958 (WebKit::WebsiteDataStore::platformRemoveRecentSearches): Not implemented.
960 2015-10-26 Brady Eidson <beidson@apple.com>
962 Make IDBKeyData from a struct to a class.
963 https://bugs.webkit.org/show_bug.cgi?id=150576
965 Reviewed by Alex Christensen.
967 * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
968 * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
969 * DatabaseProcess/IndexedDB/IDBSerialization.h:
970 * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
971 (WebKit::UniqueIDBDatabase::putRecordInBackingStore):
972 * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
973 * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
974 * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
975 (WebKit::buildIndexStatement):
976 (WebKit::buildObjectStoreStatement):
977 (WebKit::SQLiteIDBCursor::establishStatement):
978 (WebKit::SQLiteIDBCursor::createSQLiteStatement):
979 (WebKit::SQLiteIDBCursor::resetAndRebindStatement):
980 (WebKit::SQLiteIDBCursor::iterate):
981 * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
982 (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createIndex):
983 * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
984 (WebKit::WebIDBServerConnection::didPutRecord):
985 * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
986 * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
988 2015-10-26 Philip Chimento <philip.chimento@gmail.com>
990 [GTK] [Stable] InstallMissingMediaPluginsPermissionRequest not defined when building without GStreamer
991 https://bugs.webkit.org/show_bug.cgi?id=148607
993 Unreviewed, build fix.
995 * UIProcess/gstreamer/InstallMissingMediaPluginsPermissionRequest.h:
996 Add a stub for the InstallMissingMediaPluginsPermissionRequest class
997 for the case when video is disabled or not using GStreamer. It's OK
998 that this class does nothing, because the associated C API contains
999 an assert_not_reached if video is disabled. We just need to define
1000 the symbol so that the function signature will compile.
1002 2015-10-26 Anders Carlsson <andersca@apple.com>
1004 Pipe custom context menu handling through to the UIDelegate object
1005 https://bugs.webkit.org/show_bug.cgi?id=150572
1007 Reviewed by Tim Horton.
1009 * UIProcess/API/APIContextMenuClient.h:
1010 (API::ContextMenuClient::menuFromProposedMenu):
1011 * UIProcess/API/Cocoa/WKWebView.mm:
1012 (-[WKWebView setUIDelegate:]):
1013 * UIProcess/Cocoa/UIDelegate.h:
1014 * UIProcess/Cocoa/UIDelegate.mm:
1015 (WebKit::UIDelegate::createContextMenuClient):
1016 (WebKit::UIDelegate::ContextMenuClient::ContextMenuClient):
1017 (WebKit::UIDelegate::ContextMenuClient::~ContextMenuClient):
1018 (WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
1019 * UIProcess/mac/WebContextMenuProxyMac.mm:
1020 (WebKit::WebContextMenuProxyMac::showContextMenu):
1022 2015-10-26 Tim Horton <timothy_horton@apple.com>
1024 WKView being inside WKWebView leads to weird API issues
1025 https://bugs.webkit.org/show_bug.cgi?id=150174
1027 Reviewed by Anders Carlsson.
1029 * UIProcess/API/mac/WKView.mm:
1030 (-[WKView mouseDown:]):
1031 (-[WKView mouseDragged:]):
1032 (-[WKView draggedImage:endedAt:operation:]):
1033 (-[WKView draggingEntered:]):
1034 (-[WKView draggingUpdated:]):
1035 (-[WKView draggingExited:]):
1036 (-[WKView prepareForDragOperation:]):
1037 (-[WKView performDragOperation:]):
1038 (-[WKView _hitTest:dragTypes:]):
1039 (-[WKView initWithFrame:processPool:configuration:webView:]):
1040 (-[WKView applicationFlags:]): Deleted.
1041 (maybeCreateSandboxExtensionFromPasteboard): Deleted.
1042 (createSandboxExtensionsForFileUpload): Deleted.
1043 (-[WKView _registerDraggedTypes]): Deleted.
1044 * UIProcess/Cocoa/WebViewImpl.h:
1045 (WebKit::WebViewImpl::ignoresMouseDraggedEvents):
1046 * UIProcess/Cocoa/WebViewImpl.mm:
1047 (WebKit::WebViewImpl::setIgnoresMouseDraggedEvents):
1048 (WebKit::WebViewImpl::draggedImage):
1049 (WebKit::applicationFlagsForDrag):
1050 (WebKit::WebViewImpl::draggingEntered):
1051 (WebKit::WebViewImpl::draggingUpdated):
1052 (WebKit::WebViewImpl::draggingExited):
1053 (WebKit::WebViewImpl::prepareForDragOperation):
1054 (WebKit::maybeCreateSandboxExtensionFromPasteboard):
1055 (WebKit::createSandboxExtensionsForFileUpload):
1056 (WebKit::WebViewImpl::performDragOperation):
1057 (WebKit::WebViewImpl::hitTestForDragTypes):
1058 (WebKit::WebViewImpl::registerDraggedTypes):
1059 Move some drag-related things to WebViewImpl.
1061 2015-10-26 Anders Carlsson <andersca@apple.com>
1063 Pipe custom context menu handling through to the UIDelegate object
1064 https://bugs.webkit.org/show_bug.cgi?id=150572
1066 Reviewed by Tim Horton.
1068 * UIProcess/API/APIContextMenuClient.h:
1069 (API::ContextMenuClient::menuFromProposedMenu):
1070 * UIProcess/API/Cocoa/WKWebView.mm:
1071 (-[WKWebView setUIDelegate:]):
1072 * UIProcess/Cocoa/UIDelegate.h:
1073 * UIProcess/Cocoa/UIDelegate.mm:
1074 (WebKit::UIDelegate::createContextMenuClient):
1075 (WebKit::UIDelegate::ContextMenuClient::ContextMenuClient):
1076 (WebKit::UIDelegate::ContextMenuClient::~ContextMenuClient):
1077 (WebKit::UIDelegate::ContextMenuClient::menuFromProposedMenu):
1078 * UIProcess/mac/WebContextMenuProxyMac.mm:
1079 (WebKit::WebContextMenuProxyMac::showContextMenu):
1081 2015-10-26 Alex Christensen <achristensen@webkit.org>
1083 Build fix when using NETWORK_SESSION after r191457.
1085 * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
1086 (-[NetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
1087 Use resourceResponse.
1089 2015-10-26 Anders Carlsson <andersca@apple.com>
1091 Remove more dead context menu code
1092 https://bugs.webkit.org/show_bug.cgi?id=150569
1094 Reviewed by Tim Horton.
1096 * UIProcess/API/APIContextMenuClient.h:
1097 (API::ContextMenuClient::contextMenuDismissed): Deleted.
1098 * UIProcess/API/C/WKPage.cpp:
1099 (WKPageSetPageContextMenuClient): Deleted.
1101 2015-10-26 Anders Carlsson <andersca@apple.com>
1103 Remove dead context menu code
1104 https://bugs.webkit.org/show_bug.cgi?id=150567
1106 Reviewed by Tim Horton.
1108 * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
1109 (WebKit::WebContextMenuClient::getCustomMenuFromDefaultItems): Deleted.
1110 * WebProcess/WebCoreSupport/WebContextMenuClient.h:
1112 2015-10-26 Tim Horton <timothy_horton@apple.com>
1114 Don't expose the whitelist/blacklist in _WKUserStyleSheet
1115 https://bugs.webkit.org/show_bug.cgi?id=150566
1117 Reviewed by Anders Carlsson.
1119 * UIProcess/API/Cocoa/_WKUserStyleSheet.h:
1120 * UIProcess/API/Cocoa/_WKUserStyleSheet.mm:
1121 (-[_WKUserStyleSheet initWithSource:forMainFrameOnly:]):
1122 (toWTFStrings): Deleted.
1123 (-[_WKUserStyleSheet initWithSource:whitelistedURLPatterns:blacklistedURLPatterns:forMainFrameOnly:]): Deleted.
1124 (-[_WKUserStyleSheet whitelistedURLPatterns]): Deleted.
1125 (-[_WKUserStyleSheet blacklistedURLPatterns]): Deleted.
1127 2015-10-25 Carlos Garcia Campos <cgarcia@igalia.com>
1129 Unreviewed. Fix GTK+ build after r191543.
1131 * UIProcess/API/gtk/WebKitWebView.cpp:
1132 (webkit_web_view_run_javascript):
1133 (resourcesStreamReadCallback):
1135 2015-10-24 Tim Horton <timothy_horton@apple.com>
1137 Add a way to add user style sheets to WKUserContentController
1138 https://bugs.webkit.org/show_bug.cgi?id=150531
1139 <rdar://problem/23191691>
1141 Reviewed by Darin Adler.
1143 * Shared/API/APIObject.h:
1144 * Shared/Cocoa/APIObject.mm:
1145 (API::Object::newObject):
1146 Boilerplate for a new API::UserStyleSheet.
1148 * UIProcess/API/APIUserStyleSheet.cpp: Added.
1149 (API::generateIdentifier):
1150 (API::UserStyleSheet::generateUniqueURL):
1151 * UIProcess/API/APIUserStyleSheet.h: Added.
1152 Added API::UserStyleSheet, borrowing URL generation code from API::UserScript.
1154 * UIProcess/API/Cocoa/WKUserContentController.mm:
1155 (-[WKUserContentController _addUserStyleSheet:]):
1156 (-[WKUserContentController _removeAllUserStyleSheets]):
1157 Forward add and remove-all to WebUserContentControllerProxy.
1159 * UIProcess/API/Cocoa/WKUserContentControllerPrivate.h:
1160 * UIProcess/API/Cocoa/_WKUserStyleSheet.h: Added.
1161 * UIProcess/API/Cocoa/_WKUserStyleSheet.mm: Added.
1163 (-[_WKUserStyleSheet initWithSource:whitelistedURLPatterns:blacklistedURLPatterns:forMainFrameOnly:]):
1164 (-[_WKUserStyleSheet source]):
1165 (-[_WKUserStyleSheet isForMainFrameOnly]):
1166 (-[_WKUserStyleSheet copyWithZone:]):
1167 (-[_WKUserStyleSheet _apiObject]):
1168 * UIProcess/API/Cocoa/_WKUserStyleSheetInternal.h: Added.
1170 * WebKit2.xcodeproj/project.pbxproj:
1171 Add the new modern API object (as SPI for now).
1173 2015-10-24 Tim Horton <timothy_horton@apple.com>
1175 Expose more information about the exception in WKErrorJavaScriptExceptionOccurred errors
1176 https://bugs.webkit.org/show_bug.cgi?id=150525
1178 Reviewed by Darin Adler.
1180 * Scripts/webkit/messages.py:
1182 * Shared/WebCoreArgumentCoders.cpp:
1183 (IPC::ArgumentCoder<ExceptionDetails>::encode):
1184 (IPC::ArgumentCoder<ExceptionDetails>::decode):
1185 * Shared/WebCoreArgumentCoders.h:
1186 Learn how to en/decode ExceptionDetails.
1188 * UIProcess/API/C/WKPage.cpp:
1189 (WKPageRunJavaScriptInMainFrame):
1190 * UIProcess/WebPageProxy.cpp:
1191 (WebKit::WebPageProxy::runJavaScriptInMainFrame):
1192 (WebKit::WebPageProxy::scriptValueCallback):
1193 * UIProcess/WebPageProxy.h:
1194 * UIProcess/WebPageProxy.messages.in:
1195 * WebProcess/WebPage/WebPage.cpp:
1196 (WebKit::WebPage::runJavaScriptInMainFrame):
1197 Plumb ExceptionDetails back through runJavaScriptInMainFrame, across the
1200 * UIProcess/API/Cocoa/WKError.mm:
1201 (localizedDescriptionForErrorCode):
1202 * UIProcess/API/Cocoa/WKErrorInternal.h:
1203 * UIProcess/API/Cocoa/WKErrorPrivate.h:
1204 Expose localizedDescriptionForErrorCode so that WKWebView can do special
1205 things with its error.
1206 Add new private userInfo keys for exception info.
1208 * UIProcess/API/Cocoa/WKWebView.mm:
1209 (-[WKWebView evaluateJavaScript:completionHandler:]):
1210 Fill in the NSError userInfo with the exception info.
1212 2015-10-24 Gyuyoung Kim <gyuyoung.kim@webkit.org>
1214 [EFL] Fix a wrong enum variable use
1215 https://bugs.webkit.org/show_bug.cgi?id=150522
1217 Reviewed by Csaba Osztrogonác.
1219 * UIProcess/API/efl/EwkView.cpp:
1220 (EwkView::requestPopupMenu):
1221 Use kWKPopupItemTextDirectionLTR instead of EWK_TEXT_DIRECTION_LEFT_TO_RIGHT.
1223 2015-10-24 Dan Bernstein <mitz@apple.com>
1225 [Cocoa] _WKFormInputSession should provide access to the focused element info
1226 https://bugs.webkit.org/show_bug.cgi?id=150512
1228 Reviewed by Tim Horton.
1230 * UIProcess/API/Cocoa/_WKFormInputSession.h: Added focusedElementInfo property to the
1233 * UIProcess/ios/WKContentViewInteraction.mm:
1234 (-[WKFormInputSession initWithContentView:focusedElementInfo:userObject:]): Added the
1235 focusedElementInfo argument, used to initialize a new ivar.
1236 (-[WKFormInputSession focusedElementInfo]): Added this getter for the new
1237 _WKFormInputSession property.
1238 (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
1239 Create the WKFocusedElementInfo unconditionally and pass it to the new WKFormInputSession
1242 2015-10-24 Dan Bernstein <mitz@apple.com>
1244 [iOS] Allow clients to specify a custom input view to be used for a form input session
1245 https://bugs.webkit.org/show_bug.cgi?id=150395
1247 Reviewed by Tim Horton.
1249 * UIProcess/API/Cocoa/_WKFormInputSession.h: Added customInputView property to the protocol.
1251 * UIProcess/ios/WKContentViewInteraction.mm:
1252 (-[WKFormInputSession customInputView]): Added this getter.
1253 (-[WKFormInputSession setCustomInputView:]): Added this setter, which reloads the input
1254 views when the custom input view changes.
1255 (-[WKContentView inputView]): Changed to return the custom view from the input session if
1258 2015-10-23 Alex Christensen <achristensen@webkit.org>
1260 Fix CMake compile error and add correct null check
1261 https://bugs.webkit.org/show_bug.cgi?id=150520
1263 Reviewed by Simon Fraser.
1265 * UIProcess/API/Cocoa/WKWebView.mm:
1266 (-[WKWebView _doAfterNextPresentationUpdate:]):
1268 2015-10-23 Alex Christensen <achristensen@webkit.org>
1270 Progress towards CMake on Mac
1271 https://bugs.webkit.org/show_bug.cgi?id=150517
1273 Reviewed by Tim Horton.
1276 * PlatformEfl.cmake:
1277 * PlatformGTK.cmake:
1278 * PlatformMac.cmake:
1279 * WebProcess/Cookies/cf/WebCookieManagerCFNet.cpp: Removed.
1280 * WebProcess/Cookies/curl/WebCookieManagerCurl.cpp: Removed.
1282 2015-10-23 Tim Horton <timothy_horton@apple.com>
1284 WKView being inside WKWebView leads to weird API issues
1285 https://bugs.webkit.org/show_bug.cgi?id=150174
1287 * UIProcess/Cocoa/WebViewImpl.h:
1290 2015-10-23 Tim Horton <timothy_horton@apple.com>
1292 WKView being inside WKWebView leads to weird API issues
1293 https://bugs.webkit.org/show_bug.cgi?id=150174
1295 Reviewed by Anders Carlsson.
1297 * UIProcess/API/mac/WKView.mm:
1298 (-[WKView hitTest:]):
1299 (-[WKView _processDidExit]):
1300 (-[WKView _setThumbnailView:]):
1301 (-[WKView _thumbnailView]):
1302 (-[WKFlippedView isFlipped]): Deleted.
1303 (-[WKView dealloc]): Deleted.
1304 (-[WKView _setAcceleratedCompositingModeRootLayer:]): Deleted.
1305 (-[WKView _acceleratedCompositingModeRootLayer]): Deleted.
1306 (-[WKView _updateThumbnailViewLayer]): Deleted.
1307 (-[WKView _reparentLayerTreeInThumbnailView]): Deleted.
1308 * UIProcess/API/mac/WKViewInternal.h:
1309 * UIProcess/Cocoa/WebViewImpl.h:
1310 (WebKit::WebViewImpl::acceleratedCompositingRootLayer):
1311 (WebKit::WebViewImpl::layerHostingView):
1312 (WebKit::WebViewImpl::thumbnailView):
1313 * UIProcess/Cocoa/WebViewImpl.mm:
1314 (-[WKFlippedView isFlipped]):
1315 (WebKit::WebViewImpl::~WebViewImpl):
1316 (WebKit::WebViewImpl::setAcceleratedCompositingRootLayer):
1317 (WebKit::WebViewImpl::setThumbnailView):
1318 (WebKit::WebViewImpl::reparentLayerTreeInThumbnailView):
1319 (WebKit::WebViewImpl::updateThumbnailViewLayer):
1320 * UIProcess/mac/PageClientImpl.mm:
1321 (WebKit::PageClientImpl::enterAcceleratedCompositingMode):
1322 (WebKit::PageClientImpl::exitAcceleratedCompositingMode):
1323 (WebKit::PageClientImpl::updateAcceleratedCompositingMode):
1324 (WebKit::PageClientImpl::setAcceleratedCompositingRootLayer):
1325 (WebKit::PageClientImpl::acceleratedCompositingRootLayer):
1326 Move accelerated compositing and thumbnail view code.
1328 2015-10-23 Tim Horton <timothy_horton@apple.com>
1330 WKView being inside WKWebView leads to weird API issues
1331 https://bugs.webkit.org/show_bug.cgi?id=150174
1333 Reviewed by Anders Carlsson.
1335 * UIProcess/API/mac/WKView.mm:
1336 (-[WKView _superRemoveTrackingRect:]):
1337 (-[WKView addTrackingRect:owner:userData:assumeInside:]):
1338 (-[WKView _addTrackingRect:owner:userData:assumeInside:useTrackingNum:]):
1339 (-[WKView _addTrackingRects:owner:userDataList:assumeInsideList:trackingNums:count:]):
1340 (-[WKView removeTrackingRect:]):
1341 (-[WKView _removeTrackingRects:count:]):
1342 (-[WKView view:stringForToolTip:point:userData:]):
1343 (-[WKView _toolTipChangedFrom:to:]):
1344 (-[WKView _setAcceleratedCompositingModeRootLayer:]): Deleted.
1345 (-[WKView _acceleratedCompositingModeRootLayer]): Deleted.
1346 (takeWindowSnapshot): Deleted.
1347 * UIProcess/Cocoa/WebViewImpl.h:
1348 * UIProcess/Cocoa/WebViewImpl.mm:
1349 (WebKit::WebViewImpl::addTrackingRect):
1350 (WebKit::WebViewImpl::addTrackingRectWithTrackingNum):
1351 (WebKit::WebViewImpl::addTrackingRectsWithTrackingNums):
1352 (WebKit::WebViewImpl::removeTrackingRect):
1353 (WebKit::WebViewImpl::removeTrackingRects):
1354 (WebKit::WebViewImpl::sendToolTipMouseExited):
1355 (WebKit::WebViewImpl::sendToolTipMouseEntered):
1356 (WebKit::WebViewImpl::stringForToolTip):
1357 (WebKit::WebViewImpl::toolTipChanged):
1360 2015-10-23 Tim Horton <timothy_horton@apple.com>
1362 WKView being inside WKWebView leads to weird API issues
1363 https://bugs.webkit.org/show_bug.cgi?id=150174
1365 Reviewed by Anders Carlsson.
1367 * UIProcess/API/mac/WKView.mm:
1368 (-[WKView _interpretKeyEvent:completionHandler:]):
1369 (-[WKView inputContext]):
1370 (-[WKView performKeyEquivalent:]):
1371 (-[WKView keyDown:]):
1372 (-[WKView _doneWithKeyEvent:eventWasHandled:]):
1373 (-[WKView _setPluginComplexTextInputState:]): Deleted.
1374 (-[WKView _disableComplexTextInputIfNecessary]): Deleted.
1375 (-[WKView _handlePluginComplexTextInputKeyDown:]): Deleted.
1376 (-[WKView _tryHandlePluginComplexTextInputKeyDown:]): Deleted.
1377 (-[WKView _tryPostProcessPluginComplexTextInputKeyDown:]): Deleted.
1378 (-[WKView _pluginFocusOrWindowFocusChanged:pluginComplexTextInputIdentifier:]): Deleted.
1379 (-[WKView _setPluginComplexTextInputState:pluginComplexTextInputIdentifier:]): Deleted.
1380 * UIProcess/API/mac/WKViewInternal.h:
1381 * UIProcess/Cocoa/WebViewImpl.h:
1382 (WebKit::WebViewImpl::pluginComplexTextInputState):
1383 (WebKit::WebViewImpl::pluginComplexTextInputIdentifier):
1384 * UIProcess/Cocoa/WebViewImpl.mm:
1385 (WebKit::WebViewImpl::setPluginComplexTextInputState):
1386 (WebKit::WebViewImpl::setPluginComplexTextInputStateAndIdentifier):
1387 (WebKit::WebViewImpl::disableComplexTextInputIfNecessary):
1388 (WebKit::WebViewImpl::handlePluginComplexTextInputKeyDown):
1389 (WebKit::WebViewImpl::tryHandlePluginComplexTextInputKeyDown):
1390 (WebKit::WebViewImpl::pluginFocusOrWindowFocusChanged):
1391 (WebKit::WebViewImpl::tryPostProcessPluginComplexTextInputKeyDown):
1392 * UIProcess/mac/PageClientImpl.mm:
1393 (WebKit::PageClientImpl::pluginFocusOrWindowFocusChanged):
1394 (WebKit::PageClientImpl::setPluginComplexTextInputState):
1395 Move a few more methods.
1397 2015-10-23 Eric Carlson <eric.carlson@apple.com>
1399 [MediaStream] Fix UserMediaPermissionRequestProxy::invalidate
1400 https://bugs.webkit.org/show_bug.cgi?id=150503
1401 <rdar://problem/23235386>
1403 Reviewed by Dean Jackson.
1405 * UIProcess/UserMediaPermissionRequestProxy.cpp:
1406 (WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy): m_manager is a pointer.
1407 (WebKit::UserMediaPermissionRequestProxy::allow): Return early if m_manager is null, clear it after
1408 calling the manager.
1409 (WebKit::UserMediaPermissionRequestProxy::deny): Ditto.
1410 (WebKit::UserMediaPermissionRequestProxy::invalidate): Clear m_manager.
1411 * UIProcess/UserMediaPermissionRequestProxy.h: Change m_manager from a reference to a
1412 pointer so it can be cleared.
1414 2015-10-23 Claudio Saavedra <csaavedra@igalia.com>
1416 [GTK] Minor web editor fixes
1417 https://bugs.webkit.org/show_bug.cgi?id=150501
1419 Reviewed by Carlos Garcia Campos.
1421 * UIProcess/gtk/KeyBindingTranslator.cpp: Remove
1422 "MoveParagraphForward/Backward" as these commands do not exist in
1424 * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
1425 (WebKit::WebEditorClient::executePendingEditorCommands):
1426 Editor::Command can take a String, no need to convert to a C char.
1428 2015-10-23 Timothy Horton <timothy_horton@apple.com>
1430 Fix the build by unapplying review comments.
1432 * UIProcess/Cocoa/WebViewImpl.h:
1434 2015-10-23 Tim Horton <timothy_horton@apple.com>
1436 WKView being inside WKWebView leads to weird API issues
1437 https://bugs.webkit.org/show_bug.cgi?id=150174
1439 Reviewed by Anders Carlsson.
1441 * UIProcess/API/mac/WKView.mm:
1442 (-[WKView renewGState]):
1443 (-[WKView writeSelectionToPasteboard:types:]):
1444 (-[WKView centerSelectionInVisibleArea:]):
1445 (-[WKView scrollWheel:]):
1446 (-[WKView swipeWithEvent:]):
1447 (-[WKView mouseMoved:]):
1448 (-[WKView mouseDown:]):
1449 (-[WKView mouseUp:]):
1450 (-[WKView mouseDragged:]):
1451 (-[WKView pressureChangeWithEvent:]):
1452 (-[WKView acceptsFirstMouse:]):
1453 (-[WKView shouldDelayWindowOrderingForEvent:]):
1454 (-[WKView performKeyEquivalent:]):
1456 (-[WKView keyDown:]):
1457 (-[WKView flagsChanged:]):
1458 (-[WKView _superQuickLookWithEvent:]):
1459 (-[WKView _addFontPanelObserver]):
1460 (-[WKView viewWillMoveToWindow:]):
1461 (-[WKView viewDidMoveToWindow]):
1462 (-[WKView viewDidChangeBackingProperties]):
1463 (-[WKView enableAccessibilityIfNecessary]):
1464 (-[WKView quickLookWithEvent:]):
1465 (-[WKView _colorSpace]):
1466 (-[WKView _didRelaunchProcess]):
1467 (-[WKView _setTextIndicator:]):
1468 (-[WKView _setTextIndicator:withLifetime:]):
1469 (-[WKView _clearTextIndicatorWithAnimation:]):
1470 (-[WKView _setTextIndicatorAnimationProgress:]):
1471 (-[WKView initWithFrame:processPool:configuration:webView:]):
1472 (-[WKView _didPerformImmediateActionHitTest:contentPreventsDefault:userData:]):
1473 (-[WKView _internalImmediateActionAnimationControllerForHitTestResult:withType:userData:]):
1474 (-[WKView _internalPrepareForImmediateActionAnimation]):
1475 (-[WKView _internalCancelImmediateActionAnimation]):
1476 (-[WKView _internalCompleteImmediateActionAnimation]):
1477 (-[WKView _internalDismissContentRelativeChildWindowsWithAnimation:]):
1478 (-[WKView beginDeferringViewInWindowChanges]):
1479 (-[WKView endDeferringViewInWindowChanges]):
1480 (-[WKView endDeferringViewInWindowChangesSync]):
1481 (-[WKView _prepareForMoveToWindow:withCompletionHandler:]):
1482 (-[WKView isDeferringViewInWindowChanges]):
1483 (-[WKView allowsLinkPreview]):
1484 (-[WKView setAllowsLinkPreview:]):
1485 (-[WKView _setIgnoresAllEvents:]):
1486 (-[WKView _setIgnoresNonWheelMouseEvents:]):
1487 (-[WKView _setIgnoresNonWheelEvents:]):
1488 (-[WKView _ignoresNonWheelEvents]):
1489 (-[WKView _ignoresAllEvents]):
1490 (-[WKView _setOverrideDeviceScaleFactor:]):
1491 (-[WKView _overrideDeviceScaleFactor]):
1492 (-[WKView _setTopContentInset:]):
1493 (-[WKView _topContentInset]):
1494 (-[WKView _dismissContentRelativeChildWindows]):
1495 (-[WKView _dismissContentRelativeChildWindowsWithAnimation:]):
1496 (-[WKView _setAutomaticallyAdjustsContentInsets:]):
1497 (-[WKView _automaticallyAdjustsContentInsets]):
1498 (-[WKWindowVisibilityObserver initWithView:]): Deleted.
1499 (-[WKWindowVisibilityObserver startObserving:]): Deleted.
1500 (-[WKWindowVisibilityObserver stopObserving:]): Deleted.
1501 (-[WKWindowVisibilityObserver _windowDidOrderOnScreen:]): Deleted.
1502 (-[WKWindowVisibilityObserver _windowDidOrderOffScreen:]): Deleted.
1503 (-[WKView dealloc]): Deleted.
1504 (-[WKView _updateWindowAndViewFrames]): Deleted.
1505 (-[WKView updateFontPanelIfNeeded]): Deleted.
1506 (-[WKView _selectionChanged]): Deleted.
1507 (-[WKView addWindowObserversForWindow:]): Deleted.
1508 (-[WKView removeWindowObservers]): Deleted.
1509 (-[WKView doWindowDidChangeScreen]): Deleted.
1510 (-[WKView _windowDidBecomeKey:]): Deleted.
1511 (-[WKView _windowDidChangeScreen:]): Deleted.
1512 (-[WKView _windowDidChangeLayerHosting:]): Deleted.
1513 (-[WKView _windowDidResignKey:]): Deleted.
1514 (-[WKView _windowDidMiniaturize:]): Deleted.
1515 (-[WKView _windowDidDeminiaturize:]): Deleted.
1516 (-[WKView _windowDidMove:]): Deleted.
1517 (-[WKView _windowDidResize:]): Deleted.
1518 (-[WKView _windowDidOrderOffScreen:]): Deleted.
1519 (-[WKView _windowDidOrderOnScreen:]): Deleted.
1520 (-[WKView _windowDidChangeBackingProperties:]): Deleted.
1521 (-[WKView _windowDidChangeOcclusionState:]): Deleted.
1522 (-[WKView _prepareForDictionaryLookup]): Deleted.
1523 (-[WKView _dictionaryLookupPopoverWillClose:]): Deleted.
1524 (-[WKView _accessibilityRegisterUIProcessTokens]): Deleted.
1525 (-[WKView _postFakeMouseMovedEventForFlagsChangedEvent:]): Deleted.
1526 (-[WKView _intrinsicDeviceScaleFactor]): Deleted.
1527 (-[WKView _preferencesDidChange]): Deleted.
1528 (-[WKView _targetWindowForMovePreparation]): Deleted.
1529 (-[WKView _updateContentInsetsIfAutomatic]): Deleted.
1530 (-[WKView observeValueForKeyPath:ofObject:change:context:]): Deleted.
1531 (-[WKView _dispatchSetTopContentInset]): Deleted.
1532 * UIProcess/API/mac/WKViewInternal.h:
1533 * UIProcess/Cocoa/WebViewImpl.h:
1534 (WebKit::WebViewImpl::automaticallyAdjustsContentInsets):
1535 (WebKit::WebViewImpl::topContentInset):
1536 (WebKit::WebViewImpl::overrideDeviceScaleFactor):
1537 (WebKit::WebViewImpl::isDeferringViewInWindowChanges):
1538 (WebKit::WebViewImpl::targetWindowForMovePreparation):
1539 (WebKit::WebViewImpl::lastPressureEvent):
1540 (WebKit::WebViewImpl::allowsLinkPreview):
1541 (WebKit::WebViewImpl::ignoresNonWheelEvents):
1542 (WebKit::WebViewImpl::ignoresAllEvents):
1543 (WebKit::WebViewImpl::createWeakPtr):
1544 * UIProcess/Cocoa/WebViewImpl.mm:
1545 (SOFT_LINK_CONSTANT_MAY_FAIL):
1546 (-[WKWindowVisibilityObserver initWithView:impl:]):
1547 (-[WKWindowVisibilityObserver dealloc]):
1548 (-[WKWindowVisibilityObserver startObserving:]):
1549 (-[WKWindowVisibilityObserver stopObserving:]):
1550 (-[WKWindowVisibilityObserver startObservingFontPanel]):
1551 (-[WKWindowVisibilityObserver startObservingLookupDismissal]):
1552 (-[WKWindowVisibilityObserver _windowDidOrderOnScreen:]):
1553 (-[WKWindowVisibilityObserver _windowDidOrderOffScreen:]):
1554 (-[WKWindowVisibilityObserver _windowDidBecomeKey:]):
1555 (-[WKWindowVisibilityObserver _windowDidResignKey:]):
1556 (-[WKWindowVisibilityObserver _windowDidMiniaturize:]):
1557 (-[WKWindowVisibilityObserver _windowDidDeminiaturize:]):
1558 (-[WKWindowVisibilityObserver _windowDidMove:]):
1559 (-[WKWindowVisibilityObserver _windowDidResize:]):
1560 (-[WKWindowVisibilityObserver _windowDidChangeBackingProperties:]):
1561 (-[WKWindowVisibilityObserver _windowDidChangeScreen:]):
1562 (-[WKWindowVisibilityObserver _windowDidChangeLayerHosting:]):
1563 (-[WKWindowVisibilityObserver _windowDidChangeOcclusionState:]):
1564 (-[WKWindowVisibilityObserver observeValueForKeyPath:ofObject:change:context:]):
1565 (-[WKWindowVisibilityObserver _dictionaryLookupPopoverWillClose:]):
1566 (-[WKEditCommandObjC initWithWebEditCommandProxy:]):
1567 (-[WKEditCommandObjC command]):
1568 (-[WKEditorUndoTargetObjC undoEditing:]):
1569 (-[WKEditorUndoTargetObjC redoEditing:]):
1570 (WebKit::WebViewImpl::WebViewImpl):
1571 (WebKit::WebViewImpl::~WebViewImpl):
1572 (WebKit::WebViewImpl::becomeFirstResponder):
1573 (WebKit::WebViewImpl::resignFirstResponder):
1574 (WebKit::WebViewImpl::renewGState):
1575 (WebKit::WebViewImpl::updateWindowAndViewFrames):
1576 (WebKit::WebViewImpl::setAutomaticallyAdjustsContentInsets):
1577 (WebKit::WebViewImpl::updateContentInsetsIfAutomatic):
1578 (WebKit::WebViewImpl::setTopContentInset):
1579 (WebKit::WebViewImpl::dispatchSetTopContentInset):
1580 (WebKit::WebViewImpl::setOverrideDeviceScaleFactor):
1581 (WebKit::WebViewImpl::intrinsicDeviceScaleFactor):
1582 (WebKit::WebViewImpl::windowDidOrderOffScreen):
1583 (WebKit::WebViewImpl::windowDidOrderOnScreen):
1584 (WebKit::WebViewImpl::windowDidBecomeKey):
1585 (WebKit::WebViewImpl::windowDidResignKey):
1586 (WebKit::WebViewImpl::windowDidMiniaturize):
1587 (WebKit::WebViewImpl::windowDidDeminiaturize):
1588 (WebKit::WebViewImpl::windowDidMove):
1589 (WebKit::WebViewImpl::windowDidResize):
1590 (WebKit::WebViewImpl::windowDidChangeBackingProperties):
1591 (WebKit::WebViewImpl::windowDidChangeScreen):
1592 (WebKit::WebViewImpl::windowDidChangeLayerHosting):
1593 (WebKit::WebViewImpl::windowDidChangeOcclusionState):
1594 (WebKit::WebViewImpl::viewWillMoveToWindow):
1595 (WebKit::WebViewImpl::viewDidMoveToWindow):
1596 (WebKit::WebViewImpl::viewDidChangeBackingProperties):
1597 (WebKit::WebViewImpl::postFakeMouseMovedEventForFlagsChangedEvent):
1598 (WebKit::WebViewImpl::colorSpace):
1599 (WebKit::WebViewImpl::beginDeferringViewInWindowChanges):
1600 (WebKit::WebViewImpl::endDeferringViewInWindowChanges):
1601 (WebKit::WebViewImpl::endDeferringViewInWindowChangesSync):
1602 (WebKit::WebViewImpl::prepareForMoveToWindow):
1603 (WebKit::WebViewImpl::pressureChangeWithEvent):
1604 (WebKit::WebViewImpl::isEditable):
1605 (WebKit::WebViewImpl::executeEditCommand):
1606 (WebKit::WebViewImpl::registerEditCommand):
1607 (WebKit::WebViewImpl::clearAllEditCommands):
1608 (WebKit::WebViewImpl::writeSelectionToPasteboard):
1609 (WebKit::WebViewImpl::centerSelectionInVisibleArea):
1610 (WebKit::WebViewImpl::selectionDidChange):
1611 (WebKit::WebViewImpl::startObservingFontPanel):
1612 (WebKit::WebViewImpl::updateFontPanelIfNeeded):
1613 (WebKit::WebViewImpl::preferencesDidChange):
1614 (WebKit::WebViewImpl::setTextIndicator):
1615 (WebKit::WebViewImpl::clearTextIndicatorWithAnimation):
1616 (WebKit::WebViewImpl::setTextIndicatorAnimationProgress):
1617 (WebKit::WebViewImpl::dismissContentRelativeChildWindows):
1618 (WebKit::WebViewImpl::quickLookWithEvent):
1619 (WebKit::WebViewImpl::prepareForDictionaryLookup):
1620 (WebKit::WebViewImpl::setAllowsLinkPreview):
1621 (WebKit::WebViewImpl::immediateActionAnimationControllerForHitTestResult):
1622 (WebKit::WebViewImpl::prepareForImmediateActionAnimation):
1623 (WebKit::WebViewImpl::cancelImmediateActionAnimation):
1624 (WebKit::WebViewImpl::completeImmediateActionAnimation):
1625 (WebKit::WebViewImpl::setIgnoresNonWheelEvents):
1626 (WebKit::WebViewImpl::setIgnoresAllEvents):
1627 (WebKit::WebViewImpl::accessibilityRegisterUIProcessTokens):
1628 * UIProcess/mac/PageClientImpl.h:
1629 * UIProcess/mac/PageClientImpl.mm:
1630 (WebKit::PageClientImpl::activeWindow):
1631 (WebKit::PageClientImpl::preferencesDidChange):
1632 (WebKit::PageClientImpl::registerEditCommand):
1633 (WebKit::PageClientImpl::clearAllEditCommands):
1634 (WebKit::PageClientImpl::selectionDidChange):
1635 (WebKit::PageClientImpl::didPerformDictionaryLookup):
1636 (-[WKEditCommandObjC initWithWebEditCommandProxy:]): Deleted.
1637 (-[WKEditCommandObjC command]): Deleted.
1638 (-[WKEditorUndoTargetObjC undoEditing:]): Deleted.
1639 (-[WKEditorUndoTargetObjC redoEditing:]): Deleted.
1640 (WebKit::PageClientImpl::PageClientImpl): Deleted.
1641 Move more things to WebViewImpl.
1642 This also introduces an unfortunate pattern that is required for things which
1643 clients override on WKView, where we have a flow like this:
1644 - somebody (PageClient, etc.) calls WebViewImpl::x
1645 - WebViewImpl::x does nothing except call [WKView _x]
1646 - [WKView _x] calls WebViewImpl::xFromViewOnly, which does the real work
1647 As long as no clients call the -FromViewOnly variant, this will mean that
1648 all callers are bottlenecked through the overridable WKView method.
1649 How this works with WKWebView, I am not sure yet.
1651 * UIProcess/mac/WKImmediateActionController.h:
1652 * UIProcess/mac/WKImmediateActionController.mm:
1653 (-[WKImmediateActionController initWithPage:view:viewImpl:recognizer:]):
1654 (-[WKImmediateActionController willDestroyView:]):
1655 (-[WKImmediateActionController immediateActionRecognizerWillPrepare:]):
1656 (-[WKImmediateActionController immediateActionRecognizerDidCancelAnimation:]):
1657 (-[WKImmediateActionController immediateActionRecognizerDidCompleteAnimation:]):
1658 (-[WKImmediateActionController menuItem:viewAtScreenPoint:]):
1659 (-[WKImmediateActionController menuItem:previewItemAtPoint:]):
1660 (-[WKImmediateActionController menuItem:itemFrameForPoint:]):
1661 (-[WKImmediateActionController menuItem:maxSizeForPoint:]):
1662 (-[WKImmediateActionController _animationControllerForDataDetectedText]):
1663 (-[WKImmediateActionController _animationControllerForDataDetectedLink]):
1664 (-[WKImmediateActionController _animationControllerForText]):
1665 (-[WKImmediateActionController initWithPage:view:recognizer:]): Deleted.
1666 Keep a generic NSView, use the WebViewImpl for WK*View related things.
1668 2015-10-22 Joonghun Park <jh718.park@samsung.com>
1670 [GTK] Fix build break since r191471
1671 https://bugs.webkit.org/show_bug.cgi?id=150487
1673 Reviewed by Žan Doberšek.
1675 * UIProcess/API/gtk/WebKitContextMenuClient.cpp:
1676 * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
1677 (WebKit::WebContextMenuProxyGtk::populate):
1679 2015-10-22 Gyuyoung Kim <gyuyoung.kim@webkit.org>
1681 [EFL] Build break since r191472 and r191473
1682 https://bugs.webkit.org/show_bug.cgi?id=150485
1684 Unreviewed build fix.
1686 * CMakeLists.txt: Remove icu include path and move page include path.
1688 2015-10-22 Sam Weinig <sam@webkit.org>
1690 Navigations on the same host (but with different schemes and ports) should not trigger universal links
1691 <rdar://problem/22811325>
1692 https://bugs.webkit.org/show_bug.cgi?id=150481
1694 Reviewed by Dan Bernstein.
1696 Update the policy for following universal links to only take host into consideration.
1698 * UIProcess/API/C/WKPage.cpp:
1699 (WKPageSetPageUIClient):
1700 * UIProcess/Cocoa/UIDelegate.mm:
1701 (WebKit::UIDelegate::UIClient::createNewPage):
1702 * UIProcess/WebPageProxy.cpp:
1703 (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1704 (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
1705 (WebKit::WebPageProxy::createNewPage):
1706 (WebKit::WebPageProxy::showPage):
1708 2015-10-22 Anders Carlsson <andersca@apple.com>
1710 Simplify menu creation
1711 https://bugs.webkit.org/show_bug.cgi?id=150476
1713 Reviewed by Tim Horton.
1715 Instead of creating vectors of NSMenuItem objects, just simply build the menu recursively.
1717 * UIProcess/mac/WebContextMenuProxyMac.h:
1718 * UIProcess/mac/WebContextMenuProxyMac.mm:
1719 (WebKit::WebContextMenuProxyMac::createContextMenuFromItems):
1720 (WebKit::WebContextMenuProxyMac::createContextMenuItem):
1721 (WebKit::WebContextMenuProxyMac::showContextMenu):
1722 (WebKit::populateNSMenu): Deleted.
1723 (WebKit::nsMenuItem): Deleted.
1724 (WebKit::nsMenuItemVector): Deleted.
1726 2015-10-22 Carlos Garcia Campos <cgarcia@igalia.com>
1728 ERROR: Unhandled web process message 'StorageAreaMap:DispatchStorageEvent'
1729 https://bugs.webkit.org/show_bug.cgi?id=150315
1731 Reviewed by Andreas Kling.
1733 It was introduced in r184930, that keeps the session storage area
1734 maps alive in the UI process when they are destroyed by the web
1735 process. The problem is that we also keep the listeners, so that
1736 events are also dispatched to the listeners of destroyed areas,
1737 and the message handlers were removed in the web process.
1739 * UIProcess/Storage/StorageManager.cpp:
1740 (WebKit::StorageManager::createTransientLocalStorageMap): Add a
1741 listener for the new storage map ID when the map is reused.
1742 (WebKit::StorageManager::destroyStorageMap): Always remove
1743 listeners of destroyed maps.
1745 2015-10-22 Tim Horton <timothy_horton@apple.com>
1747 Add a SPI variant of loadData that accepts user data to WKWebView
1748 https://bugs.webkit.org/show_bug.cgi?id=150475
1750 Reviewed by Anders Carlsson.
1752 * UIProcess/API/Cocoa/WKWebView.mm:
1753 (-[WKWebView _loadData:MIMEType:characterEncodingName:baseURL:userData:]):
1754 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1756 2015-10-22 Alex Christensen <achristensen@webkit.org>
1758 Progress towards CMake on Mac
1759 https://bugs.webkit.org/show_bug.cgi?id=150466
1761 Reviewed by Chris Dumez.
1764 * PlatformMac.cmake:
1765 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1767 2015-10-22 Anders Carlsson <andersca@apple.com>
1769 NativeContextMenuItem isn't needed anymore, remove it
1770 https://bugs.webkit.org/show_bug.cgi?id=150473
1772 Reviewed by Tim Horton.
1774 * PlatformEfl.cmake:
1775 * PlatformGTK.cmake:
1776 * Shared/NativeContextMenuItem.h: Removed.
1777 (WebKit::NativeContextMenuItem::~NativeContextMenuItem): Deleted.
1778 (WebKit::NativeContextMenuItem::nsMenuItem): Deleted.
1779 * Shared/WebContextMenuItem.cpp:
1780 (WebKit::WebContextMenuItem::WebContextMenuItem): Deleted.
1781 * Shared/WebContextMenuItem.h:
1782 (WebKit::WebContextMenuItem::create): Deleted.
1783 (WebKit::WebContextMenuItem::nativeContextMenuItem): Deleted.
1784 * Shared/efl/NativeContextMenuItemEfl.cpp: Removed.
1785 (WebKit::NativeContextMenuItem::NativeContextMenuItem): Deleted.
1786 * Shared/gtk/NativeContextMenuItemGtk.cpp: Removed.
1787 (WebKit::NativeContextMenuItem::NativeContextMenuItem): Deleted.
1788 * Shared/mac/NativeContextMenuItem.mm: Removed.
1789 (WebKit::NativeContextMenuItem::NativeContextMenuItem): Deleted.
1790 * UIProcess/mac/WebContextMenuProxyMac.mm:
1791 (WebKit::nsMenuItem): Deleted.
1792 * WebKit2.xcodeproj/project.pbxproj:
1794 2015-10-22 Anders Carlsson <andersca@apple.com>
1796 CTTE WebContextMenuItemData
1797 https://bugs.webkit.org/show_bug.cgi?id=150471
1799 Reviewed by Tim Horton.
1801 * Shared/API/c/WKContextMenuItem.cpp:
1802 (WKContextMenuItemGetTag):
1803 (WKContextMenuItemGetType):
1804 (WKContextMenuItemCopyTitle):
1805 (WKContextMenuItemGetEnabled):
1806 (WKContextMenuItemGetChecked):
1807 * Shared/WebContextMenuItem.cpp:
1808 (WebKit::WebContextMenuItem::create):
1809 * Shared/WebContextMenuItem.h:
1810 (WebKit::WebContextMenuItem::data):
1811 * UIProcess/API/C/WKPage.cpp:
1812 (WKPageSelectContextMenuItem):
1813 * UIProcess/mac/WebContextMenuProxyMac.mm:
1814 (WebKit::nsMenuItem):
1815 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1816 (WKBundlePageClickMenuItem):
1817 * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
1818 (WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
1820 2015-10-22 Anders Carlsson <andersca@apple.com>
1822 Handle nil menu items.
1824 * UIProcess/mac/WebContextMenuProxyMac.mm:
1825 (WebKit::nsMenuItemVector):
1827 2015-10-22 Anders Carlsson <andersca@apple.com>
1829 Wait to convert the share menu item to a real share menu until after calling out to the client
1830 https://bugs.webkit.org/show_bug.cgi?id=150465
1832 Reviewed by Tim Horton.
1834 This will let us simplify more code in upcoming patches.
1836 * UIProcess/mac/WebContextMenuProxyMac.h:
1837 * UIProcess/mac/WebContextMenuProxyMac.mm:
1838 (WebKit::nsMenuItem):
1839 (WebKit::nsMenuItemVector):
1840 (WebKit::WebContextMenuProxyMac::showContextMenu):
1842 2015-10-22 Myles C. Maxfield <mmaxfield@apple.com>
1844 [Cocoa] Migrate WKSetPatternPhaseInUserSpace() and WKGetUserToBaseCTM() from WKSI
1845 https://bugs.webkit.org/show_bug.cgi?id=150460
1847 Reviewed by Tim Horton.
1849 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1850 (InitWebCoreSystemInterface): Deleted.
1852 2015-10-22 Alex Christensen <achristensen@webkit.org>
1854 Initial NSURLSession WebResourceLoader implementation
1855 https://bugs.webkit.org/show_bug.cgi?id=150355
1857 Reviewed by Antti Koivisto.
1859 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1860 (WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
1861 (WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
1862 * NetworkProcess/NetworkResourceLoader.cpp:
1863 (WebKit::NetworkResourceLoader::~NetworkResourceLoader):
1864 (WebKit::NetworkResourceLoader::startNetworkLoad):
1865 (WebKit::NetworkResourceLoader::setDefersLoading):
1866 (WebKit::NetworkResourceLoader::cleanup):
1867 (WebKit::NetworkResourceLoader::didConvertHandleToDownload):
1868 (WebKit::NetworkResourceLoader::abort):
1869 (WebKit::NetworkResourceLoader::willPerformHTTPRedirection):
1870 (WebKit::NetworkResourceLoader::didReceiveChallenge):
1871 (WebKit::NetworkResourceLoader::didReceiveResponse):
1872 (WebKit::NetworkResourceLoader::didReceiveData):
1873 (WebKit::NetworkResourceLoader::didCompleteWithError):
1874 (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
1875 (WebKit::NetworkResourceLoader::willSendRequestAsync):
1876 (WebKit::NetworkResourceLoader::continueWillSendRequest):
1877 (WebKit::NetworkResourceLoader::continueDidReceiveResponse):
1878 (WebKit::NetworkResourceLoader::didSendData):
1879 (WebKit::NetworkResourceLoader::receivedCancellation):
1880 (WebKit::NetworkResourceLoader::startBufferingTimerIfNeeded):
1881 (WebKit::NetworkResourceLoader::bufferingTimerFired):
1882 (WebKit::NetworkResourceLoader::validateCacheEntry):
1883 (WebKit::NetworkResourceLoader::sendAbortingOnFailure):
1884 (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
1885 (WebKit::NetworkResourceLoader::continueCanAuthenticateAgainstProtectionSpace):
1886 (WebKit::NetworkResourceLoader::supportsDataArray):
1887 * NetworkProcess/NetworkResourceLoader.h:
1888 (WebKit::NetworkResourceLoader::create):
1889 (WebKit::NetworkResourceLoader::currentRequest):
1890 (WebKit::NetworkResourceLoader::handle):
1891 * NetworkProcess/NetworkSession.h: Added.
1892 (WebKit::NetworkSessionTaskClient::~NetworkSessionTaskClient):
1893 (WebKit::NetworkingDataTask::client):
1894 (WebKit::NetworkingDataTask::clearClient):
1895 (WebKit::NetworkSession::~NetworkSession):
1896 * NetworkProcess/cocoa/NetworkSessionCocoa.mm: Added.
1897 (toNSURLSessionResponseDisposition):
1898 (toNSURLSessionAuthChallengeDisposition):
1899 (-[NetworkSessionDelegate initWithNetworkSession:]):
1900 (-[NetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
1901 (-[NetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
1902 (-[NetworkSessionDelegate URLSession:task:didCompleteWithError:]):
1903 (-[NetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
1904 (-[NetworkSessionDelegate URLSession:dataTask:didReceiveData:]):
1905 (WebKit::NetworkSession::create):
1906 (WebKit::NetworkSession::singleton):
1907 (WebKit::configurationForType):
1908 (WebKit::NetworkSession::NetworkSession):
1909 (WebKit::NetworkSession::createDataTaskWithRequest):
1910 (WebKit::NetworkSession::dataTaskForIdentifier):
1911 (WebKit::NetworkingDataTask::NetworkingDataTask):
1912 (WebKit::NetworkingDataTask::~NetworkingDataTask):
1913 (WebKit::NetworkingDataTask::suspend):
1914 (WebKit::NetworkingDataTask::resume):
1915 (WebKit::NetworkingDataTask::taskIdentifier):
1916 * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
1917 (WebKit::NetworkResourceLoader::willCacheResponseAsync):
1918 * WebKit2.xcodeproj/project.pbxproj:
1921 2015-10-22 Philippe Normand <pnormand@igalia.com>
1923 Unreviewed, GTK build fix for disabled redirected XComposite window support.
1925 * UIProcess/API/gtk/WebKitWebViewBase.cpp: Add USE(REDIRECTED_XCOMPOSITE_WINDOW) guards.
1926 * UIProcess/DrawingAreaProxyImpl.h: Mark virtual methods as override to avoid compilation warnings.
1928 2015-10-22 Wenson Hsieh <wenson_hsieh@apple.com>
1930 Implement touch-action: manipulation; for iOS
1931 https://bugs.webkit.org/show_bug.cgi?id=149854
1932 <rdar://problem/23017145>
1934 Reviewed by Benjamin Poulain.
1936 Implements the manipulation value for the CSS property touch-action. Performs hit-testing upon receiving a potential
1937 tap to determine whether to disable double-tap gesture recognition over the duration of the tap. If so, sends a message
1938 from the web process to the UI process indicating that double-tapping should be disabled, allowing single taps to
1941 * WebProcess/WebPage/ios/WebPageIOS.mm:
1942 (WebKit::WebPage::potentialTapAtPosition):
1944 2015-10-22 Ryosuke Niwa <rniwa@webkit.org>
1946 REGRESSION (r181972): Scroll position changes to top of youtube page when switching tabs
1947 https://bugs.webkit.org/show_bug.cgi?id=150428
1949 Reviewed by Antti Koivisto.
1951 Call updateFocusAppearance with RevealMode::DoNotReveal to avoid revealing the focused element.
1953 * WebProcess/WebPage/WebPage.cpp:
1954 (WebKit::WebPage::restoreSelectionInFocusedEditableElement):
1956 2015-10-22 Carlos Garcia Campos <cgarcia@igalia.com>
1958 Unreviewed. Fix a crash in GTk+ after r191402.
1960 Since r191402 WebContextMenuProxy is no longer refcounted, and
1961 std::unique_ptr is used instead. This means that when we show the
1962 context menu for the second time in a web view, a new
1963 WebContextMenuProxy is created and the previous one is
1964 destroyed. We were setting the active context menu of the WebView
1965 in the constructor of WebContextMenuProxy, and unsetting it in the
1966 destructor. Now the constructor of the new WebContextMenuProxy
1967 happens before the destructor of the current one that unsets the
1968 WebView active context menu. This patch simply makes the web view
1969 unset its active context menu when it's unmapped and a new one
1972 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1973 (activeContextMenuUnmapped):
1974 (webkitWebViewBaseSetActiveContextMenuProxy):
1975 * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
1976 (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk):
1978 2015-10-22 Hunseop Jeong <hs85.jeong@samsung.com>
1980 [GTK] Try to fix the build after r191402.
1981 https://bugs.webkit.org/show_bug.cgi?id=150435
1983 Reviewed by Carlos Garcia Campos.
1985 * UIProcess/API/gtk/PageClientImpl.cpp:
1986 (WebKit::PageClientImpl::createPopupMenuProxy):
1987 (WebKit::PageClientImpl::createContextMenuProxy):
1988 (WebKit::PageClientImpl::createColorPicker):
1989 * UIProcess/API/gtk/PageClientImpl.h:
1990 * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
1991 (WebKit::WebContextMenuProxyGtk::populate):
1992 (WebKit::WebContextMenuProxyGtk::show):
1993 (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk):
1994 (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk):
1995 (WebKit::WebContextMenuProxyGtk::menuPositionFunction):
1996 (WebKit::WebContextMenuProxyGtk::showContextMenu): Deleted.
1997 (WebKit::WebContextMenuProxyGtk::hideContextMenu): Deleted.
1998 (WebKit::WebContextMenuProxyGtk::cancelTracking): Deleted.
1999 * UIProcess/gtk/WebContextMenuProxyGtk.h:
2000 (WebKit::WebContextMenuProxyGtk::gtkMenu):
2001 (WebKit::WebContextMenuProxyGtk::create): Deleted.
2003 2015-10-21 Gyuyoung Kim <gyuyoung.kim@webkit.org>
2005 Unreviewed EFL build fix. Remove customizeMenu implementation.
2007 * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
2008 (WebKit::WebContextMenuClient::customizeMenu): Deleted.
2010 2015-10-21 Alex Christensen <achristensen@webkit.org>
2012 Speculative EFL build fix.
2014 * WebProcess/WebCoreSupport/WebContextMenuClient.h:
2015 Remove another customizeMenu call.
2017 2015-10-21 Gyuyoung Kim <gyuyoung.kim@webkit.org>
2019 [EFL][GTK][WK2] Fix build break since r191402, r191401
2020 https://bugs.webkit.org/show_bug.cgi?id=150432
2022 Unreviewed EFL and GTK build fix.
2025 * UIProcess/CoordinatedGraphics/WebView.cpp:
2026 (WebKit::WebView::createContextMenuProxy):
2027 * UIProcess/CoordinatedGraphics/WebView.h:
2028 * UIProcess/efl/WebContextMenuProxyEfl.cpp:
2029 (WebKit::WebContextMenuProxyEfl::show):
2030 * UIProcess/efl/WebContextMenuProxyEfl.h:
2031 (WebKit::WebContextMenuProxyEfl::create): Deleted.
2032 * UIProcess/efl/WebViewEfl.cpp:
2033 (WebKit::WebViewEfl::createContextMenuProxy):
2034 * UIProcess/efl/WebViewEfl.h:
2035 * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
2036 (WebKit::WebContextMenuClient::customizeMenu):
2037 * WebProcess/WebCoreSupport/WebContextMenuClient.h:
2039 2015-10-21 Anders Carlsson <andersca@apple.com>
2041 Get rid of WebContextMenuClient::customizeMenu, it's no longer used
2042 https://bugs.webkit.org/show_bug.cgi?id=150427
2044 Reviewed by Tim Horton.
2046 * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
2047 (WebKit::WebContextMenuClient::customizeMenu): Deleted.
2048 * WebProcess/WebCoreSupport/WebContextMenuClient.h:
2050 2015-10-21 Tim Horton <timothy_horton@apple.com>
2052 API-ify the FindMatches client
2053 https://bugs.webkit.org/show_bug.cgi?id=150422
2055 Reviewed by Anders Carlsson.
2057 * UIProcess/API/APIFindMatchesClient.h: Renamed from Source/WebKit2/UIProcess/WebFindClient.h.
2058 (API::FindMatchesClient::~FindMatchesClient):
2059 (API::FindMatchesClient::didFindStringMatches):
2060 (API::FindMatchesClient::didGetImageForMatchResult):
2061 * UIProcess/API/C/WKPage.cpp:
2062 (WKPageSetPageFindMatchesClient):
2063 * UIProcess/WebFindClient.cpp: Removed.
2064 * UIProcess/WebPageProxy.cpp:
2065 (WebKit::WebPageProxy::WebPageProxy):
2066 (WebKit::WebPageProxy::setFindMatchesClient):
2067 (WebKit::WebPageProxy::close):
2068 (WebKit::WebPageProxy::didGetImageForFindMatch):
2069 (WebKit::WebPageProxy::didFindStringMatches):
2070 (WebKit::WebPageProxy::initializeFindMatchesClient): Deleted.
2071 * UIProcess/WebPageProxy.h:
2072 (WebKit::WebPageProxy::findMatchesClient):
2073 * WebKit2.xcodeproj/project.pbxproj:
2075 2015-10-21 Enrica Casucci <enrica@apple.com>
2077 WebProcess crashes when accessibility bundle is not found.
2078 https://bugs.webkit.org/show_bug.cgi?id=150414
2080 Reviewed by Dan Bernstein.
2082 The uninitialized pointer to NSError causes the print function to crash.
2084 * WebProcess/cocoa/WebProcessCocoa.mm:
2085 (WebKit::registerWithAccessibility):
2087 2015-10-21 Anders Carlsson <andersca@apple.com>
2089 Move services menu handling out into a separate function
2090 https://bugs.webkit.org/show_bug.cgi?id=150420
2092 Reviewed by Tim Horton.
2094 * UIProcess/mac/WebContextMenuProxyMac.h:
2095 * UIProcess/mac/WebContextMenuProxyMac.mm:
2096 (WebKit::WebContextMenuProxyMac::showServicesMenu):
2097 (WebKit::WebContextMenuProxyMac::show):
2098 (WebKit::WebContextMenuProxyMac::showContextMenu):
2099 (WebKit::WebContextMenuProxyMac::populate): Deleted.
2101 2015-10-21 Wenson Hsieh <wenson_hsieh@apple.com>
2103 Single tapping clickable elements in unscalable pages should show a tap highlight
2104 https://bugs.webkit.org/show_bug.cgi?id=150382
2106 Reviewed by Simon Fraser.
2108 When the double tap gesture recognizer is disabled ahead of time (as in the case of unscalable pages) the tap is
2109 committed before the geometries come in. To fix this, we introduce a flag that allows the single tap to be
2110 committed before the tap highlight arrives. This allows the tap highlight to be immediately animated when receiving
2111 the tap highlight geometries only in the case where double tapping is disabled when recognizing the single tap.
2113 * UIProcess/ios/WKContentViewInteraction.h:
2114 * UIProcess/ios/WKContentViewInteraction.mm:
2115 (-[WKContentView setupInteraction]):
2116 (-[WKContentView cleanupInteraction]):
2117 (-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]):
2118 (-[WKContentView _singleTapRecognized:]):
2119 (-[WKContentView _singleTapCommited:]):
2121 2015-10-21 Anders Carlsson <andersca@apple.com>
2123 Get rid of useBinaryEncoding from WKPageGetContentsAsMHTMLData
2124 https://bugs.webkit.org/show_bug.cgi?id=150417
2126 Reviewed by Tim Horton.
2128 The useBinaryEncoding parameter is always false, so just get rid of it.
2130 * UIProcess/API/C/WKPage.cpp:
2131 (WKPageGetContentsAsMHTMLData):
2132 * UIProcess/API/C/WKPage.h:
2133 * UIProcess/API/efl/ewk_view.cpp:
2134 (ewk_view_page_contents_get):
2135 * UIProcess/API/gtk/WebKitWebView.cpp:
2136 (webkit_web_view_save):
2137 (webkit_web_view_save_to_file):
2138 * UIProcess/WebPageProxy.cpp:
2139 (WebKit::WebPageProxy::getContentsAsMHTMLData):
2140 * UIProcess/WebPageProxy.h:
2141 * WebProcess/WebPage/WebPage.cpp:
2142 (WebKit::WebPage::getContentsAsMHTMLData):
2143 * WebProcess/WebPage/WebPage.h:
2144 * WebProcess/WebPage/WebPage.messages.in:
2146 2015-10-21 Anders Carlsson <andersca@apple.com>
2148 WebContextMenuProxyMac::setupServicesMenu doesn't need to take a context parameter
2149 https://bugs.webkit.org/show_bug.cgi?id=150418
2151 Reviewed by Tim Horton.
2153 * UIProcess/mac/WebContextMenuProxyMac.h:
2154 * UIProcess/mac/WebContextMenuProxyMac.mm:
2155 (WebKit::WebContextMenuProxyMac::setupServicesMenu):
2156 (WebKit::WebContextMenuProxyMac::populate):
2158 2015-10-21 Anders Carlsson <andersca@apple.com>
2160 WebContextMenuProxy doesn't have to be ref-counted
2161 https://bugs.webkit.org/show_bug.cgi?id=150415
2163 Reviewed by Tim Horton.
2165 Change WebContextMenuProxy to not inherit from RefCounted. Instead of using RefPtr, use std::unique_ptr.
2166 Get rid of cancelTracking and hideContextMenu and dismiss the menu whenever the menu proxy is destroyed.
2167 Also, rename showContextMenu to show.
2169 * UIProcess/PageClient.h:
2170 * UIProcess/WebContextMenuProxy.h:
2171 (WebKit::WebContextMenuProxy::cancelTracking): Deleted.
2172 * UIProcess/WebPageProxy.cpp:
2173 (WebKit::WebPageProxy::close):
2174 (WebKit::WebPageProxy::internalShowContextMenu):
2175 * UIProcess/WebPageProxy.h:
2176 * UIProcess/ios/PageClientImplIOS.h:
2177 * UIProcess/ios/PageClientImplIOS.mm:
2178 (WebKit::PageClientImpl::createContextMenuProxy):
2179 * UIProcess/mac/PageClientImpl.h:
2180 * UIProcess/mac/PageClientImpl.mm:
2181 (WebKit::PageClientImpl::createContextMenuProxy):
2182 * UIProcess/mac/WebContextMenuProxyMac.h:
2183 (WebKit::WebContextMenuProxyMac::create): Deleted.
2184 * UIProcess/mac/WebContextMenuProxyMac.mm:
2185 (WebKit::WebContextMenuProxyMac::~WebContextMenuProxyMac):
2186 (WebKit::WebContextMenuProxyMac::show):
2187 (WebKit::WebContextMenuProxyMac::showContextMenu): Deleted.
2188 (WebKit::WebContextMenuProxyMac::hideContextMenu): Deleted.
2189 (WebKit::WebContextMenuProxyMac::cancelTracking): Deleted.
2191 2015-10-21 Anders Carlsson <andersca@apple.com>
2193 Stop using a popup menu button cell(!) for context menus
2194 https://bugs.webkit.org/show_bug.cgi?id=150413
2196 Reviewed by Tim Horton.
2198 Just use a regular NSMenu. Also, have the service menu code path store the service menu
2199 in the same member variable.
2201 * UIProcess/mac/WebContextMenuProxyMac.h:
2202 * UIProcess/mac/WebContextMenuProxyMac.mm:
2203 (WebKit::WebContextMenuProxyMac::setupServicesMenu):
2204 (WebKit::WebContextMenuProxyMac::clearServicesMenu):
2205 (WebKit::WebContextMenuProxyMac::populate):
2206 (WebKit::WebContextMenuProxyMac::showContextMenu):
2207 (WebKit::WebContextMenuProxyMac::hideContextMenu):
2208 (WebKit::WebContextMenuProxyMac::cancelTracking):
2209 (WebKit::WebContextMenuProxyMac::~WebContextMenuProxyMac): Deleted.
2211 2015-10-21 Chris Dumez <cdumez@apple.com>
2213 Add assertions to NetworkCache::Entry constructor to make sure a key's type is "resource"
2214 https://bugs.webkit.org/show_bug.cgi?id=150369
2216 Reviewed by Antti Koivisto.
2218 Add assertions to NetworkCache::Entry constructor to make sure a key's
2219 type is "resource" now that the NetworkCache storage supports other
2222 * NetworkProcess/cache/NetworkCacheEntry.cpp:
2223 (WebKit::NetworkCache::Entry::Entry):
2225 2015-10-21 Carlos Garcia Campos <cgarcia@igalia.com>
2227 NetworkProcess: DNS prefetch happens in the Web Process
2228 https://bugs.webkit.org/show_bug.cgi?id=147824
2230 Reviewed by Chris Dumez.
2232 DNS prefetch requests started in the WebProcess should be sent to
2233 the network process when it's enabled.
2235 * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2236 (WebKit::NetworkConnectionToWebProcess::prefetchDNS): Use NetworkProcess::prefetchDNS().
2237 * NetworkProcess/NetworkConnectionToWebProcess.h:
2238 * NetworkProcess/NetworkConnectionToWebProcess.messages.in: Add
2239 PrefetchDNS message.
2240 * NetworkProcess/NetworkProcess.cpp:
2241 (WebKit::NetworkProcess::prefetchDNS): Do the actual DNS prefetch.
2242 * NetworkProcess/NetworkProcess.h:
2243 * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
2244 (webkitWebExtensionDidReceiveMessage): Use WebProcess::prefetchDNS().
2245 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2246 (WebKit::WebFrameLoaderClient::prefetchDNS): Use WebProcess::prefetchDNS().
2247 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2248 * WebProcess/WebPage/ios/WebPageIOS.mm:
2249 (WebKit::WebPage::sendTapHighlightForNodeIfNecessary): Use
2250 FrameLoaderClient to do the DNS prefetch.
2251 * WebProcess/WebProcess.cpp:
2252 (WebKit::WebProcess::WebProcess): Initialize the DNS prefetched
2253 hosts cleanup hysteresis activity. Clear the cache of DNS
2254 prefetched when hysteresis activity stopped.
2255 (WebKit::WebProcess::prefetchDNS): Send the request to the network
2256 process if it's enabled, otherwise do the actual DNS prefetch.
2257 * WebProcess/WebProcess.h:
2259 2015-10-20 Chris Dumez <cdumez@apple.com>
2261 [WK2] Generalize NetworkCacheStorage API so it can store different types of metadata
2262 https://bugs.webkit.org/show_bug.cgi?id=150221
2263 <rdar://problem/23149771>
2265 Reviewed by Darin Adler and Antti Koivisto.
2267 Generalize NetworkCacheStorage API so it can store different types of
2268 metadata alongside the network resources. This is a pre-requirement to
2269 making our NetworkCache smarter by storing information about the
2272 To keep the code simple, the entry type is now part of the entry key and
2273 we store records of a specific type in a 'type' subfolder. The cache
2274 structure looks like so:
2275 - WebKitCache/Version 5/[Partition]/[Type]/[Hash]
2276 - WebKitCache/Version 5/[Partition]/[Type]/[Hash]-blob (Optional)
2278 Existing cache entries now that the 'resource' type as these are network
2281 * NetworkProcess/cache/NetworkCache.cpp:
2282 * NetworkProcess/cache/NetworkCacheKey.cpp:
2283 * NetworkProcess/cache/NetworkCacheKey.h:
2284 * NetworkProcess/cache/NetworkCacheStatistics.cpp:
2285 * NetworkProcess/cache/NetworkCacheStorage.cpp:
2286 * NetworkProcess/cache/NetworkCacheStorage.h:
2288 2015-10-20 Hunseop Jeong <hs85.jeong@samsung.com>
2290 [EFL] ContextMenu doesn't work correctly on MiniBrowser after r191194.
2291 https://bugs.webkit.org/show_bug.cgi?id=150311
2293 Reviewed by Gyuyoung Kim.
2295 Restore the test_ewk2_context_menu API test to check the context menu whether it works correctly.
2297 * PlatformEfl.cmake:
2299 2015-10-13 Conrad Shultz <conrad_shultz@apple.com>
2301 _WKThumbnailView should support a snapshot-only mode
2302 https://bugs.webkit.org/show_bug.cgi?id=150106
2304 Reviewed by Tim Horton.
2306 Add a new property to _WKThumbnailView, exclusivelyUsesSnapshot, which causes _WKThumbnailView
2307 to bypass both layer tree reparenting and event suppression on the associated WKView.
2309 Add a new method, -requestSnapshot, which clients can use to force _WKThumbnailView to refresh
2312 * UIProcess/API/Cocoa/_WKThumbnailView.h:
2313 * UIProcess/API/Cocoa/_WKThumbnailView.mm:
2314 (-[_WKThumbnailView requestSnapshot]):
2315 Extracted from -_requestSnapshotIfNeeded:.
2316 (-[_WKThumbnailView _viewWasUnparented]):
2317 (-[_WKThumbnailView _viewWasParented]):
2318 (-[_WKThumbnailView _requestSnapshotIfNeeded]):
2320 2015-10-20 Alexey Proskuryakov <ap@apple.com>
2324 * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
2325 * UIProcess/ios/forms/WKFileUploadPanel.mm:
2327 2015-10-20 Joseph Pecoraro <pecoraro@apple.com>
2329 ASSERT when right clicking on SVG Image generating Share menu - can break Web Inspector
2330 https://bugs.webkit.org/show_bug.cgi?id=150374
2332 Reviewed by Brian Burg.
2334 When there is no absolute URL or downloadable media URL no system share
2335 menu is created, but we were still appending the null context menu to
2336 the list of context menu items.
2338 * UIProcess/mac/WebContextMenuProxyMac.mm:
2339 (WebKit::WebContextMenuProxyMac::shareMenuItem):
2340 Bail early if the context menu is null.
2342 (WebKit::WebContextMenuProxyMac::showContextMenu):
2343 Only append the share context menu item if it is non-null.
2344 This matches ContextMenuController.cpp in WebCore.
2346 2015-10-20 Commit Queue <commit-queue@webkit.org>
2348 Unreviewed, rolling out r191306.
2349 https://bugs.webkit.org/show_bug.cgi?id=150371
2351 "May have caused a significant warm PLT regression" (Requested
2352 by cdumez_ on #webkit).
2356 "[WK2] Generalize NetworkCacheStorage API so it can store
2357 different types of metadata"
2358 https://bugs.webkit.org/show_bug.cgi?id=150221
2359 http://trac.webkit.org/changeset/191306
2361 2015-10-20 Tim Horton <timothy_horton@apple.com>
2363 Try to fix the build by disabling MAC_GESTURE_EVENTS on 10.9 and 10.10
2365 * Configurations/FeatureDefines.xcconfig:
2367 2015-10-20 Commit Queue <commit-queue@webkit.org>
2369 Unreviewed, rolling out r191333.
2370 https://bugs.webkit.org/show_bug.cgi?id=150362
2372 Caused assertions on regression tests (Requested by ap on
2377 "ERROR: Unhandled web process message
2378 'StorageAreaMap:DispatchStorageEvent'"
2379 https://bugs.webkit.org/show_bug.cgi?id=150315
2380 http://trac.webkit.org/changeset/191333
2382 2015-10-20 Carlos Garcia Campos <cgarcia@igalia.com>
2384 [UNIX] ASSERTION FAILED: m_shouldWaitForSyncReplies in Connection::connectionDidClose()
2385 https://bugs.webkit.org/show_bug.cgi?id=150361
2387 Reviewed by Martin Robinson.
2389 It doesn't always happen because it depends on how sockets are
2390 closed, and the state of the threads. The problem is that we are
2391 not handling the case when the read fails because we closed the
2392 connection. In that case we log the error and call
2393 Connection::connectionDidClose(). But it was connectionDidClose()
2394 the one closing the socket. So, in this particular case it's not an
2395 error but a normal termination, and we shouldn't try to close the
2396 connection again. Something similar can happen while sending a
2397 message, and we get a broken pipe error, but in that case we are
2398 only printing the error, so it's harmless.
2400 * Platform/IPC/unix/ConnectionUnix.cpp:
2401 (IPC::Connection::readyReadHandler): Only print error and call
2402 connectionDidClose() if we are still connected when read fails.
2403 (IPC::Connection::sendOutgoingMessage): Only print error if we are
2404 still connected when send fails.
2406 2015-10-20 Carlos Garcia Campos <cgarcia@igalia.com>
2408 [GTK] Graphics corruption when entering/leaving AC mode quickly
2409 https://bugs.webkit.org/show_bug.cgi?id=150323
2411 Reviewed by Mario Sanchez Prada.
2413 The UI process is notified when entering accelerated compositing
2414 mode after the layers have been flushed and rendered to avoid
2415 flickering. However, this is producing flickering in the GTK+
2416 port, because we use an offscreen redirected window that is
2417 resized to a minimium size to save memory when not in AC mode. The
2418 web process always uses the current size of the redirected window,
2419 so when entering AC mode, contents are rendered into the 1x1
2420 window, then the UI process is notified, the redirected window is
2421 resized to its actual size, and we force a resize to ask the web
2422 process to render again, now at the correct size. Rendering at 1x1
2423 and then resizing the window is what produces the flickering when
2424 entering AC mode, but it's also inefficient, since we need to
2425 render again after the redirected window is resized. So, this
2426 patch adds a WillEnterAcceleratedCompositing message that is sent
2427 to the UI process when the layer tree host is created but before
2428 the contents have been composited and rendered. This is
2429 implemented by the GTK+ port to prepare for entering AC mode, by
2430 resizing the redirected window. When we actually enter AC mode,
2431 the contents have already been rendered in the web process at the
2432 correct size, so we can just use the redirected window surface
2433 instead of the drawing area one, and paint in the web view without
2434 any flickering. We no longer need the forceResize either.
2435 When leaving accelerated compositing mode, we now clear the redirected
2436 window resources after a short delay. This ensures that we have
2437 already rendered the update sent in the ExitAcceleratedCompositingMode
2438 message, but also that entering/leaving AC mode quickly doesn't
2439 produce any redirected window resize.
2441 * UIProcess/API/gtk/PageClientImpl.cpp:
2442 (WebKit::PageClientImpl::willEnterAcceleratedCompositingMode):
2443 * UIProcess/API/gtk/PageClientImpl.h:
2444 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2445 (webkitWebViewBaseClearRedirectedWindowSoon):
2446 (webkitWebViewBaseWillEnterAcceleratedCompositingMode):
2447 (webkitWebViewBaseEnterAcceleratedCompositingMode):
2448 (webkitWebViewBaseExitAcceleratedCompositingMode):
2449 * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
2450 * UIProcess/CoordinatedGraphics/WebView.h:
2451 * UIProcess/DrawingAreaProxy.h:
2452 (WebKit::DrawingAreaProxy::willEnterAcceleratedCompositingMode):
2453 * UIProcess/DrawingAreaProxy.messages.in:
2454 * UIProcess/DrawingAreaProxyImpl.cpp:
2455 (WebKit::DrawingAreaProxyImpl::willEnterAcceleratedCompositingMode):
2456 * UIProcess/DrawingAreaProxyImpl.h:
2457 (WebKit::DrawingAreaProxyImpl::forceResize): Deleted.
2458 * UIProcess/PageClient.h:
2459 * UIProcess/WebPageProxy.cpp:
2460 (WebKit::WebPageProxy::willEnterAcceleratedCompositingMode):
2461 * UIProcess/WebPageProxy.h:
2462 * UIProcess/ios/PageClientImplIOS.h:
2463 * UIProcess/ios/PageClientImplIOS.mm:
2464 (WebKit::PageClientImpl::willEnterAcceleratedCompositingMode):
2465 * UIProcess/mac/PageClientImpl.h:
2466 * UIProcess/mac/PageClientImpl.mm:
2467 (WebKit::PageClientImpl::willEnterAcceleratedCompositingMode):
2468 * WebProcess/WebPage/DrawingAreaImpl.cpp:
2469 (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
2471 2015-10-20 Sergio Villar Senin <svillar@igalia.com>
2473 [GTK] Fix build for ENABLE_PLUGIN_PROCESS_GTK2=OFF
2474 https://bugs.webkit.org/show_bug.cgi?id=150086
2476 Reviewed by Darin Adler.
2478 * UIProcess/cairo/BackingStoreCairo.cpp:
2479 (WebKit::BackingStore::createBackend):
2481 2015-10-20 Yoav Weiss <yoav@yoav.ws>
2483 Rename the PICTURE_SIZES flag to CURRENTSRC
2484 https://bugs.webkit.org/show_bug.cgi?id=150275
2486 Reviewed by Dean Jackson.
2488 * Configurations/FeatureDefines.xcconfig:
2490 2015-10-19 Carlos Garcia Campos <cgarcia@igalia.com>
2492 ERROR: Unhandled web process message 'StorageAreaMap:DispatchStorageEvent'
2493 https://bugs.webkit.org/show_bug.cgi?id=150315
2495 Reviewed by Andreas Kling.
2497 It was introduced in r184930, that keeps the session storage area
2498 maps alive in the UI process when they are destroyed by the web
2499 process. The problem is that we also keep the listeners, so that
2500 events are also dispatched to the listeners of destroyed areas,
2501 and the message handlers were removed in the web process.
2503 * UIProcess/Storage/StorageManager.cpp:
2504 (WebKit::StorageManager::createTransientLocalStorageMap): Add a
2505 listener for the new storage map ID when the map is reused.
2506 (WebKit::StorageManager::destroyStorageMap): Always remove
2507 listeners of destroyed maps.
2509 2015-10-19 Tim Horton <timothy_horton@apple.com>
2511 Remove unused support for long presses from WebKit
2512 https://bugs.webkit.org/show_bug.cgi?id=150345
2514 Reviewed by Beth Dakin.
2516 * Shared/WebPreferencesDefinitions.h:
2517 * UIProcess/API/APIUIClient.h:
2518 (API::UIClient::didBeginTrackingPotentialLongMousePress): Deleted.
2519 (API::UIClient::didRecognizeLongMousePress): Deleted.
2520 (API::UIClient::didCancelTrackingPotentialLongMousePress): Deleted.
2521 * UIProcess/API/C/WKPage.cpp:
2522 (WKPageSetPageUIClient): Deleted.
2523 * UIProcess/API/C/WKPageUIClient.h:
2524 * UIProcess/API/C/WKPreferences.cpp:
2525 (WKPreferencesGetLongMousePressEnabled):
2526 (WKPreferencesSetLongMousePressEnabled): Deleted.
2527 * UIProcess/API/C/WKPreferencesRefPrivate.h:
2528 * UIProcess/WebPageProxy.cpp:
2529 (WebKit::WebPageProxy::didBeginTrackingPotentialLongMousePress): Deleted.
2530 (WebKit::WebPageProxy::didRecognizeLongMousePress): Deleted.
2531 (WebKit::WebPageProxy::didCancelTrackingPotentialLongMousePress): Deleted.
2532 * UIProcess/WebPageProxy.h:
2533 * UIProcess/WebPageProxy.messages.in:
2534 * WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
2535 (API::InjectedBundle::PageUIClient::didBeginTrackingPotentialLongMousePress): Deleted.
2536 (API::InjectedBundle::PageUIClient::didRecognizeLongMousePress): Deleted.
2537 (API::InjectedBundle::PageUIClient::didCancelTrackingPotentialLongMousePress): Deleted.
2538 * WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h:
2539 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
2540 (WebKit::InjectedBundlePageUIClient::didBeginTrackingPotentialLongMousePress): Deleted.
2541 (WebKit::InjectedBundlePageUIClient::didRecognizeLongMousePress): Deleted.
2542 (WebKit::InjectedBundlePageUIClient::didCancelTrackingPotentialLongMousePress): Deleted.
2543 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
2544 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2545 (WebKit::WebChromeClient::didBeginTrackingPotentialLongMousePress): Deleted.
2546 (WebKit::WebChromeClient::didRecognizeLongMousePress): Deleted.
2547 (WebKit::WebChromeClient::didCancelTrackingPotentialLongMousePress): Deleted.
2548 * WebProcess/WebCoreSupport/WebChromeClient.h:
2549 * WebProcess/WebPage/WebPage.cpp:
2550 (WebKit::WebPage::updatePreferences): Deleted.
2552 2015-10-19 Chris Dumez <cdumez@apple.com>
2554 Make sure development Safari does not delete the stable Safari cache storage.
2555 https://bugs.webkit.org/show_bug.cgi?id=150343
2557 Reviewed by Antti Koivisto.
2559 Make sure development Safari does not delete the stable Safari disk cache
2560 storage. Development Safari now uses Version 5, while the last stable
2561 Safari uses Version 4. Since the 2 versions can co-exist, it is best not
2562 to drop the old cache version (4) at this point.
2564 * NetworkProcess/cache/NetworkCacheStorage.cpp:
2565 (WebKit::NetworkCache::Storage::deleteOldVersions):
2567 2015-10-19 Tim Horton <timothy_horton@apple.com>
2569 WKView being inside WKWebView leads to weird API issues
2570 https://bugs.webkit.org/show_bug.cgi?id=150174
2572 Reviewed by Darin Adler.
2574 * UIProcess/API/mac/WKView.mm:
2575 * UIProcess/API/mac/WKViewInternal.h:
2576 * UIProcess/Cocoa/WebViewImpl.h: Added.
2577 * UIProcess/Cocoa/WebViewImpl.mm: Added.
2578 (WebKit::WebViewImpl::WebViewImpl):
2579 (WebKit::WebViewImpl::~WebViewImpl):
2580 (WebKit::WebViewImpl::setDrawsBackground):
2581 (WebKit::WebViewImpl::drawsBackground):
2582 (WebKit::WebViewImpl::setDrawsTransparentBackground):
2583 (WebKit::WebViewImpl::drawsTransparentBackground):
2584 (WebKit::WebViewImpl::acceptsFirstResponder):
2585 (WebKit::WebViewImpl::becomeFirstResponder):
2586 (WebKit::WebViewImpl::resignFirstResponder):
2587 (WebKit::WebViewImpl::isFocused):
2588 (WebKit::WebViewImpl::viewWillStartLiveResize):
2589 (WebKit::WebViewImpl::viewDidEndLiveResize):
2590 (WebKit::WebViewImpl::setFrameSize):
2591 (WebKit::WebViewImpl::disableFrameSizeUpdates):
2592 (WebKit::WebViewImpl::enableFrameSizeUpdates):
2593 (WebKit::WebViewImpl::frameSizeUpdatesDisabled):
2594 (WebKit::WebViewImpl::setFrameAndScrollBy):
2595 (WebKit::WebViewImpl::setFixedLayoutSize):
2596 (WebKit::WebViewImpl::fixedLayoutSize):
2597 (WebKit::WebViewImpl::setDrawingAreaSize):
2598 (WebKit::WebViewImpl::setContentPreparationRect):
2599 (WebKit::WebViewImpl::updateViewExposedRect):
2600 (WebKit::WebViewImpl::setClipsToVisibleRect):
2601 (WebKit::WebViewImpl::setIntrinsicContentSize):
2602 (WebKit::WebViewImpl::intrinsicContentSize):
2603 (WebKit::WebViewImpl::setViewScale):
2604 (WebKit::WebViewImpl::viewScale):
2605 (WebKit::WebViewImpl::layoutMode):
2606 (WebKit::WebViewImpl::setLayoutMode):
2607 (WebKit::WebViewImpl::supportsArbitraryLayoutModes):
2608 (WebKit::WebViewImpl::updateSupportsArbitraryLayoutModes):
2609 (WebKit::WebViewImpl::updateSecureInputState):
2610 (WebKit::WebViewImpl::resetSecureInputState):
2611 (WebKit::WebViewImpl::notifyInputContextAboutDiscardedComposition):
2612 (WebKit::WebViewImpl::hasFullScreenWindowController):
2613 (WebKit::WebViewImpl::fullScreenWindowController):
2614 (WebKit::WebViewImpl::closeFullScreenWindowController):
2615 (WebKit::WebViewImpl::fullScreenPlaceholderView):
2616 (WebKit::WebViewImpl::createFullScreenWindow):
2617 Move the actual implementation of a number of WKView methods into a
2618 C++ class, WebViewImpl, which WKView calls directly into.
2619 Eventually, we will move all of the logic of WKView into WebViewImpl,
2620 and then duplicate the necessary forwarding in WKWebView and remove
2621 WKWebView's inner WKView.
2623 * UIProcess/mac/PageClientImpl.h:
2624 * UIProcess/mac/PageClientImpl.mm:
2625 (WebKit::PageClientImpl::isViewFocused):
2626 (WebKit::PageClientImpl::didCommitLoadForMainFrame):
2627 (WebKit::PageClientImpl::updateSecureInputState):
2628 (WebKit::PageClientImpl::resetSecureInputState):
2629 (WebKit::PageClientImpl::notifyInputContextAboutDiscardedComposition):
2630 (WebKit::PageClientImpl::beganEnterFullScreen):
2631 (WebKit::PageClientImpl::beganExitFullScreen):
2632 For now, forward PageClient requests that can be answered by WebViewImpl
2633 to WebViewImpl. Eventually, we'll probably fold PageClientImpl and WebViewImpl
2634 together into one class, and these things will collapse down.
2636 * UIProcess/mac/WKFullScreenWindowController.h:
2637 * UIProcess/mac/WKFullScreenWindowController.mm:
2638 (-[WKFullScreenWindowController initWithWindow:webView:page:]):
2639 (-[WKFullScreenWindowController enterFullScreen:]):
2640 (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
2641 (-[WKFullScreenWindowController exitFullScreen]):
2642 (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
2643 (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]):
2644 (-[WKFullScreenWindowController _manager]):
2645 (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
2646 (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
2647 (-[WKFullScreenWindowController initWithWindow:webView:]): Deleted.
2648 (-[WKFullScreenWindowController _page]): Deleted.
2649 * UIProcess/mac/WKViewLayoutStrategy.h:
2650 * UIProcess/mac/WKViewLayoutStrategy.mm:
2651 (+[WKViewLayoutStrategy layoutStrategyWithPage:view:viewImpl:mode:]):
2652 (-[WKViewLayoutStrategy initWithPage:view:viewImpl:mode:]):
2653 (-[WKViewLayoutStrategy invalidate]):
2654 (-[WKViewLayoutStrategy didChangeFrameSize]):
2655 (-[WKViewViewSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
2656 (-[WKViewFixedSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
2657 (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:viewImpl:mode:]):
2658 (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy updateLayout]):
2659 (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy didChangeFrameSize]):
2660 (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
2661 (+[WKViewLayoutStrategy layoutStrategyWithPage:view:mode:]): Deleted.
2662 (-[WKViewLayoutStrategy initWithPage:view:mode:]): Deleted.
2663 (-[WKViewLayoutStrategy willDestroyView:]): Deleted.
2664 (-[WKViewViewSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
2665 (-[WKViewFixedSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
2666 (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:mode:]): Deleted.
2667 (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
2668 Make WKViewLayoutStrategy and WKFullScreenWindowController operate in terms of generic
2669 NSViews instead of WKView, so that eventually they will be able to work for either
2670 WKView or WKWebView, and so that they can sit underneath WebViewImpl.
2672 * WebKit2.xcodeproj/project.pbxproj:
2674 2015-10-19 Commit Queue <commit-queue@webkit.org>
2676 Unreviewed, rolling out r191307.
2677 https://bugs.webkit.org/show_bug.cgi?id=150338
2679 broke lots of API tests, need time to figure out whats up
2680 (Requested by thorton on #webkit).
2684 "WKView being inside WKWebView leads to weird API issues"
2685 https://bugs.webkit.org/show_bug.cgi?id=150174
2686 http://trac.webkit.org/changeset/191307
2688 2015-10-19 Tim Horton <timothy_horton@apple.com>
2690 Try again to fix the 32-bit build.
2692 * UIProcess/mac/WebContextMenuProxyMac.mm:
2693 (WebKit::WebContextMenuProxyMac::setupServicesMenu):
2695 2015-10-17 Wenson Hsieh <wenson_hsieh@apple.com>
2697 Extend fast-clicking behavior to trigger on elements that have negligible zoom
2698 https://bugs.webkit.org/show_bug.cgi?id=150248
2699 <rdar://problem/23140069>
2701 Reviewed by Simon Fraser.
2703 Currently, fast-clicking only triggers on pages that have unscalable viewports. To allow more websites to benefit from fast-clicking
2704 behavior, we generalize fast-clicking to also occur when tapping on elements for which double-tap-to-zoom would zoom the element in
2705 or out by an insignificant amount. We define an insignificant amount of zoom to mean that zooming would increase the viewport scale
2706 by less than a configurable threshold, or decrease the viewport scale by more than a configurable threshold. We accomplish this by
2707 temporarily disabling the double tap gesture recognizer for the duration of the tap. This patch refactors some logic used to compute
2708 zoomed viewports to make it possible to predict the change in viewport scale when double tapping to zoom. See the changes in
2709 SmartMagnificationController and ViewGestureGeometryCollector for more details.
2711 There are no new tests, since this patch does not change existing behavior. Instead, this patch adds the machinery needed for zoom-
2712 dependent fast-clicking: by setting the preferences WebKitFastClickingEnabled and WebKitFastClickZoomThreshold, we will be able to tweak
2713 the behavior dynamically.
2715 * UIProcess/API/Cocoa/WKWebView.mm:
2716 (-[WKWebView _didCommitLayerTree:]):
2717 (-[WKWebView _contentZoomScale]):
2718 (-[WKWebView _targetContentZoomScaleForRect:currentScale:fitEntireRect:minimumScale:maximumScale:]):
2719 (-[WKWebView _zoomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]):
2720 (-[WKWebView _viewportIsUserScalable]):
2721 * UIProcess/API/Cocoa/WKWebViewInternal.h:
2722 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2723 * UIProcess/PageClient.h:
2724 * UIProcess/WebPageProxy.h:
2725 * UIProcess/WebPageProxy.messages.in:
2726 * UIProcess/ios/PageClientImplIOS.h:
2727 * UIProcess/ios/PageClientImplIOS.mm:
2728 (WebKit::PageClientImpl::disableDoubleTapGesturesUntilTapIsFinishedIfNecessary):
2729 * UIProcess/ios/SmartMagnificationController.h:
2730 * UIProcess/ios/SmartMagnificationController.mm:
2731 (WebKit::SmartMagnificationController::adjustSmartMagnificationTargetRectAndZoomScales):
2732 (WebKit::SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture):
2733 (WebKit::SmartMagnificationController::magnify):
2734 * UIProcess/ios/WKContentViewInteraction.h:
2735 * UIProcess/ios/WKContentViewInteraction.mm:
2736 (-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]):
2737 (-[WKContentView _fastClickZoomThreshold]):
2738 (-[WKContentView _allowDoubleTapToZoomForCurrentZoomScale:andTargetZoomScale:]):
2739 (-[WKContentView _disableDoubleTapGesturesUntilTapIsFinishedIfNecessary:allowsDoubleTapZoom:targetRect:isReplaced:minimumScale:maximumScale:]):
2740 (-[WKContentView _highlightLongPressRecognized:]):
2741 (-[WKContentView _endPotentialTapAndEnableDoubleTapGesturesIfNecessary]):
2742 (-[WKContentView _singleTapRecognized:]):
2743 (cancelPotentialTapIfNecessary):
2744 (-[WKContentView _singleTapCommited:]):
2745 (-[WKContentView webSelectionRects]): Deleted.
2746 * UIProcess/ios/WebPageProxyIOS.mm:
2747 (WebKit::WebPageProxy::disableDoubleTapGesturesUntilTapIsFinishedIfNecessary):
2748 * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
2749 (WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
2750 (WebKit::ViewGestureGeometryCollector::computeZoomInformationForNode):
2751 * WebProcess/WebPage/ViewGestureGeometryCollector.h:
2752 * WebProcess/WebPage/ios/WebPageIOS.mm:
2753 (WebKit::WebPage::potentialTapAtPosition):
2755 2015-10-19 Tim Horton <timothy_horton@apple.com>
2757 WKView being inside WKWebView leads to weird API issues
2758 https://bugs.webkit.org/show_bug.cgi?id=150174
2760 Reviewed by Darin Adler.
2762 * UIProcess/API/mac/WKView.mm:
2763 * UIProcess/API/mac/WKViewInternal.h:
2764 * UIProcess/Cocoa/WebViewImpl.h: Added.
2765 * UIProcess/Cocoa/WebViewImpl.mm: Added.
2766 (WebKit::WebViewImpl::WebViewImpl):
2767 (WebKit::WebViewImpl::~WebViewImpl):
2768 (WebKit::WebViewImpl::setDrawsBackground):
2769 (WebKit::WebViewImpl::drawsBackground):
2770 (WebKit::WebViewImpl::setDrawsTransparentBackground):
2771 (WebKit::WebViewImpl::drawsTransparentBackground):
2772 (WebKit::WebViewImpl::acceptsFirstResponder):
2773 (WebKit::WebViewImpl::becomeFirstResponder):
2774 (WebKit::WebViewImpl::resignFirstResponder):
2775 (WebKit::WebViewImpl::isFocused):
2776 (WebKit::WebViewImpl::viewWillStartLiveResize):
2777 (WebKit::WebViewImpl::viewDidEndLiveResize):
2778 (WebKit::WebViewImpl::setFrameSize):
2779 (WebKit::WebViewImpl::disableFrameSizeUpdates):
2780 (WebKit::WebViewImpl::enableFrameSizeUpdates):
2781 (WebKit::WebViewImpl::frameSizeUpdatesDisabled):
2782 (WebKit::WebViewImpl::setFrameAndScrollBy):
2783 (WebKit::WebViewImpl::setFixedLayoutSize):
2784 (WebKit::WebViewImpl::fixedLayoutSize):
2785 (WebKit::WebViewImpl::setDrawingAreaSize):
2786 (WebKit::WebViewImpl::setContentPreparationRect):
2787 (WebKit::WebViewImpl::updateViewExposedRect):
2788 (WebKit::WebViewImpl::setClipsToVisibleRect):
2789 (WebKit::WebViewImpl::setIntrinsicContentSize):
2790 (WebKit::WebViewImpl::intrinsicContentSize):
2791 (WebKit::WebViewImpl::setViewScale):
2792 (WebKit::WebViewImpl::viewScale):
2793 (WebKit::WebViewImpl::layoutMode):
2794 (WebKit::WebViewImpl::setLayoutMode):
2795 (WebKit::WebViewImpl::supportsArbitraryLayoutModes):
2796 (WebKit::WebViewImpl::updateSupportsArbitraryLayoutModes):
2797 (WebKit::WebViewImpl::updateSecureInputState):
2798 (WebKit::WebViewImpl::resetSecureInputState):
2799 (WebKit::WebViewImpl::notifyInputContextAboutDiscardedComposition):
2800 (WebKit::WebViewImpl::hasFullScreenWindowController):
2801 (WebKit::WebViewImpl::fullScreenWindowController):
2802 (WebKit::WebViewImpl::closeFullScreenWindowController):
2803 (WebKit::WebViewImpl::fullScreenPlaceholderView):
2804 (WebKit::WebViewImpl::createFullScreenWindow):
2805 Move the actual implementation of a number of WKView methods into a
2806 C++ class, WebViewImpl, which WKView calls directly into.
2807 Eventually, we will move all of the logic of WKView into WebViewImpl,
2808 and then duplicate the necessary forwarding in WKWebView and remove
2809 WKWebView's inner WKView.
2811 * UIProcess/mac/PageClientImpl.h:
2812 * UIProcess/mac/PageClientImpl.mm:
2813 (WebKit::PageClientImpl::isViewFocused):
2814 (WebKit::PageClientImpl::didCommitLoadForMainFrame):
2815 (WebKit::PageClientImpl::updateSecureInputState):
2816 (WebKit::PageClientImpl::resetSecureInputState):
2817 (WebKit::PageClientImpl::notifyInputContextAboutDiscardedComposition):
2818 (WebKit::PageClientImpl::beganEnterFullScreen):
2819 (WebKit::PageClientImpl::beganExitFullScreen):
2820 For now, forward PageClient requests that can be answered by WebViewImpl
2821 to WebViewImpl. Eventually, we'll probably fold PageClientImpl and WebViewImpl
2822 together into one class, and these things will collapse down.
2824 * UIProcess/mac/WKFullScreenWindowController.h:
2825 * UIProcess/mac/WKFullScreenWindowController.mm:
2826 (-[WKFullScreenWindowController initWithWindow:webView:page:]):
2827 (-[WKFullScreenWindowController enterFullScreen:]):
2828 (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
2829 (-[WKFullScreenWindowController exitFullScreen]):
2830 (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
2831 (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]):
2832 (-[WKFullScreenWindowController _manager]):
2833 (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
2834 (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
2835 (-[WKFullScreenWindowController initWithWindow:webView:]): Deleted.
2836 (-[WKFullScreenWindowController _page]): Deleted.
2837 * UIProcess/mac/WKViewLayoutStrategy.h:
2838 * UIProcess/mac/WKViewLayoutStrategy.mm:
2839 (+[WKViewLayoutStrategy layoutStrategyWithPage:view:viewImpl:mode:]):
2840 (-[WKViewLayoutStrategy initWithPage:view:viewImpl:mode:]):
2841 (-[WKViewLayoutStrategy invalidate]):
2842 (-[WKViewLayoutStrategy didChangeFrameSize]):
2843 (-[WKViewViewSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
2844 (-[WKViewFixedSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
2845 (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:viewImpl:mode:]):
2846 (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy updateLayout]):
2847 (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy didChangeFrameSize]):
2848 (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:viewImpl:mode:]):
2849 (+[WKViewLayoutStrategy layoutStrategyWithPage:view:mode:]): Deleted.
2850 (-[WKViewLayoutStrategy initWithPage:view:mode:]): Deleted.
2851 (-[WKViewLayoutStrategy willDestroyView:]): Deleted.
2852 (-[WKViewViewSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
2853 (-[WKViewFixedSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
2854 (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:mode:]): Deleted.
2855 (-[WKViewDynamicSizeComputedFromMinimumDocumentSizeLayoutStrategy initWithPage:view:mode:]): Deleted.
2856 Make WKViewLayoutStrategy and WKFullScreenWindowController operate in terms of generic
2857 NSViews instead of WKView, so that eventually they will be able to work for either
2858 WKView or WKWebView, and so that they can sit underneath WebViewImpl.
2860 * WebKit2.xcodeproj/project.pbxproj:
2862 2015-10-19 Chris Dumez <cdumez@apple.com>
2864 [WK2] Generalize NetworkCacheStorage API so it can store different types of metadata
2865 https://bugs.webkit.org/show_bug.cgi?id=150221
2866 <rdar://problem/23149771>
2868 Reviewed by Darin Adler and Antti Koivisto.
2870 Generalize NetworkCacheStorage API so it can store different types of
2871 metadata alongside the network resources. This is a pre-requirement to
2872 making our NetworkCache smarter by storing information about the
2875 To keep the code simple, the entry type is now part of the entry key and
2876 we store records of a specific type in a 'type' subfolder. The cache
2877 structure looks like so:
2878 - WebKitCache/Version 5/[Partition]/[Type]/[Hash]
2879 - WebKitCache/Version 5/[Partition]/[Type]/[Hash]-blob (Optional)
2881 Existing cache entries now that the 'resource' type as these are network
2884 * NetworkProcess/cache/NetworkCache.cpp:
2885 * NetworkProcess/cache/NetworkCacheKey.cpp:
2886 * NetworkProcess/cache/NetworkCacheKey.h:
2887 * NetworkProcess/cache/NetworkCacheStatistics.cpp:
2888 * NetworkProcess/cache/NetworkCacheStorage.cpp:
2889 * NetworkProcess/cache/NetworkCacheStorage.h:
2891 2015-10-19 Tim Horton <timothy_horton@apple.com>
2893 Try to fix the iOS build
2895 * Configurations/FeatureDefines.xcconfig:
2897 2015-10-19 Tim Horton <timothy_horton@apple.com>
2899 Try to fix the 32-bit build.
2901 * UIProcess/mac/WebContextMenuProxyMac.mm:
2902 (WebKit::WebContextMenuProxyMac::setupServicesMenu):
2904 2015-10-16 Anders Carlsson <andersca@apple.com>
2906 Fix image service menus somewhat
2907 https://bugs.webkit.org/show_bug.cgi?id=150265
2909 Reviewed by Tim Horton.
2911 * Shared/ContextMenuContextData.cpp:
2912 (WebKit::ContextMenuContextData::ContextMenuContextData):
2913 It's a service menu if we have a controlled image.
2915 * UIProcess/mac/WebContextMenuProxyMac.mm:
2916 (WebKit::WebContextMenuProxyMac::setupServicesMenu):
2917 Use an item provider.
2919 2015-10-19 Tim Horton <timothy_horton@apple.com>
2921 Add magnify and rotate gesture event support for Mac
2922 https://bugs.webkit.org/show_bug.cgi?id=150179
2923 <rdar://problem/8036240>
2925 Reviewed by Darin Adler.
2927 * Configurations/FeatureDefines.xcconfig:
2930 * Shared/NativeWebGestureEvent.h: Added.
2931 (WebKit::NativeWebGestureEvent::nativeEvent):
2932 * Shared/WebEvent.h:
2933 * Shared/WebEventConversion.cpp:
2934 (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
2936 * Shared/WebEventConversion.h:
2937 * Shared/mac/NativeWebGestureEventMac.mm: Added.
2938 (WebKit::webEventTypeForNSEvent):
2939 (WebKit::pointForEvent):
2940 (WebKit::NativeWebGestureEvent::NativeWebGestureEvent):
2941 Add and plumb a new native event that wraps a NSEvent of type
2942 NSEventTypeMagnify or NSEventTypeRotate (gesture events).
2944 * Shared/mac/WebGestureEvent.cpp: Added.
2945 (WebKit::WebGestureEvent::encode):
2946 (WebKit::WebGestureEvent::decode):
2947 (WebKit::WebGestureEvent::isGestureEventType):
2948 * Shared/mac/WebGestureEvent.h: Added.
2949 (WebKit::WebGestureEvent::WebGestureEvent):
2950 (WebKit::WebGestureEvent::position):
2951 (WebKit::WebGestureEvent::gestureScale):
2952 (WebKit::WebGestureEvent::gestureRotation):
2953 Add IPC plumbing for WebGestureEvent, which becomes a WebCore::PlatformGestureEvent.
2955 * UIProcess/API/Cocoa/WKViewPrivate.h:
2956 Remove unnecessary iPhone-only WKView code.
2957 Add _gestureEventWasNotHandledByWebCore, SPI which can be overridden
2958 to react when WebCore decides not to handle a gesture event.
2960 * UIProcess/API/mac/WKView.mm:
2961 (-[WKView magnifyWithEvent:]):
2962 Route magnification gesture events to the page, unless we're already
2963 in an active view zoom gesture, in which case we'll bypass the page
2964 and send the event straight to ViewGestureController.
2966 (-[WKView rotateWithEvent:]):
2967 Route rotation gesture events to the page.
2969 (-[WKView _gestureEventWasNotHandledByWebCore:]):
2970 Let ViewGestureController know that WebCore didn't handle a gesture event.
2971 We always give WebCore the first crack at the event if we're not in a zoom,
2972 because it could preventDefault() on the Begin phase event, and that should
2973 prevent pinch-zoom from starting.
2975 * UIProcess/PageClient.h:
2976 * UIProcess/mac/PageClientImpl.h:
2977 * UIProcess/mac/PageClientImpl.mm:
2978 (WebKit::PageClientImpl::gestureEventWasNotHandledByWebCore):
2979 Plumb gestureEventWasNotHandledByWebCore back from WebPageProxy to WKView.
2981 * UIProcess/WebPageProxy.cpp:
2982 (WebKit::WebPageProxy::handleGestureEvent):
2983 (WebKit::WebPageProxy::didReceiveEvent):
2984 * UIProcess/WebPageProxy.h:
2985 Forward gesture events to EventDispatcher, and let WKView know when WebCore
2986 passes on handling them.
2988 * UIProcess/mac/ViewGestureController.h:
2989 (WebKit::ViewGestureController::hasActiveMagnificationGesture):
2990 * UIProcess/mac/ViewGestureControllerMac.mm:
2991 (WebKit::ViewGestureController::gestureEventWasNotHandledByWebCore):
2992 (WebKit::ViewGestureController::handleMagnificationGestureEvent):
2993 Don't try to start a zoom with anything other than a Begin phase event.
2994 Try to start a zoom with any events that WebCore doesn't handle.
2995 Move dispatch of endMagnificationGesture into ViewGestureController;
2996 there is no reason for that to be in WKView anymore.
2998 * WebKit2.xcodeproj/project.pbxproj:
2999 * WebProcess/WebPage/EventDispatcher.cpp:
3000 (WebKit::EventDispatcher::gestureEvent):
3001 (WebKit::EventDispatcher::dispatchGestureEvent):
3002 * WebProcess/WebPage/EventDispatcher.h:
3003 * WebProcess/WebPage/EventDispatcher.messages.in:
3004 * WebProcess/WebPage/WebPage.cpp:
3005 (WebKit::handleGestureEvent):
3006 (WebKit::WebPage::gestureEvent):
3007 * WebProcess/WebPage/WebPage.h:
3008 Dispatch to the main thread and hand off the gesture event to WebCore,
3009 asynchronously informing the UI process of whether the event was handled or not.
3011 2015-10-19 Carlos Garcia Campos <cgarcia@igalia.com>
3013 [GTK] ASSERTION FAILED: parent in WebInspectorProxy::platformDetach()
3014 https://bugs.webkit.org/show_bug.cgi?id=150319
3016 Reviewed by Žan Doberšek.
3018 This happens when the inspector is shown/closed very
3019 quickly. Since we start the inspector attached by default, when
3020 the web inspector is created m_isAttached is set to true, so that
3021 when opened, it's attached to the view. If the inspector is closed
3022 before it has been actually attached, the inspector view doesn't
3023 have a parent, even if the m_isAttached is true. So, we should
3024 handle this case instead of asserting. This is what happens in
3025 test http/tests/xmlhttprequest/access-control-repeated-failed-preflight-crash.html.
3027 * UIProcess/gtk/WebInspectorProxyGtk.cpp:
3028 (WebKit::WebInspectorProxy::platformDetach): Remove the view from
3029 its parent container if it was actually attached.
3031 2015-10-19 Hunseop Jeong <hs85.jeong@samsung.com>
3033 [EFL] Implement WebContextMenuProxyEfl::showContextMenu after r191194
3034 https://bugs.webkit.org/show_bug.cgi?id=150310
3036 Reviewed by Gyuyoung Kim.
3038 showContextMenu() doesn't work correctly after r191194 in EFL port.
3039 This patch implements WebContextMenuProxyEfl::showContextMenu.
3041 * UIProcess/efl/WebContextMenuProxyEfl.cpp:
3042 (WebKit::WebContextMenuProxyEfl::WebContextMenuProxyEfl):
3043 (WebKit::WebContextMenuProxyEfl::showContextMenu):
3044 (WebKit::WebContextMenuProxyEfl::hideContextMenu):
3045 * UIProcess/efl/WebContextMenuProxyEfl.h:
3047 2015-10-18 Csaba Osztrogonác <ossy@webkit.org>
3049 [WK2] Simplify unused return warning in WKRetainPtr.h
3050 https://bugs.webkit.org/show_bug.cgi?id=150173
3052 Reviewed by Darin Adler.
3054 * UIProcess/API/cpp/WKRetainPtr.h:
3055 (WebKit::__attribute__):
3056 (WebKit::adoptWK): Deleted.
3058 2015-10-18 Csaba Osztrogonác <ossy@webkit.org>
3060 Fix the ENABLE(SECCOMP_FILTERS) build after r187030
3061 https://bugs.webkit.org/show_bug.cgi?id=150172
3063 Reviewed by Alexey Proskuryakov.
3065 * Shared/linux/SeccompFilters/Syscall.cpp:
3066 (WebKit::reportUnexpectedSyscall):
3068 2015-10-18 Joonghun Park <jh718.park@samsung.com>
3070 [GTK] Remove WebKitContextMenu related missing annotation warnings
3071 https://bugs.webkit.org/show_bug.cgi?id=150299
3073 Reviewed by Darin Adler.
3075 The warnings occur currently because when executing g-ir-scanner,
3076 it doesn't consider WebKitContextMenu related .cpp files,
3079 * PlatformGTK.cmake: Add WebKitContextMenu related cpp files.
3081 2015-10-18 Myles C. Maxfield <mmaxfield@apple.com>
3083 Stop honoring the user default "WebKitKerningAndLigaturesEnabledByDefault"
3084 https://bugs.webkit.org/show_bug.cgi?id=150287
3086 Reviewed by Simon Fraser.
3088 * Shared/WebProcessCreationParameters.cpp:
3089 (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Deleted.
3090 (WebKit::WebProcessCreationParameters::encode): Deleted.
3091 (WebKit::WebProcessCreationParameters::decode): Deleted.
3092 * Shared/WebProcessCreationParameters.h:
3093 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3094 (WebKit::registerUserDefaultsIfNeeded): Deleted.
3095 (WebKit::WebProcessPool::platformInitializeWebProcess): Deleted.
3096 * WebProcess/cocoa/WebProcessCocoa.mm:
3097 (WebKit::WebProcess::platformInitializeWebProcess): Deleted.
3099 2015-10-18 Yusuke Suzuki <utatane.tea@gmail.com>
3101 [GTK] Implement WebContextMenuProxyGtk::showContextMenu after r191194
3102 https://bugs.webkit.org/show_bug.cgi?id=150276
3104 Reviewed by Carlos Garcia Campos.
3106 After r191194, showContextMenu signature becomes changed, and the implementation
3107 is moved from the generic file to the Mac port. It poses the compile error in GTK port.
3108 This patch implements WebContextMenuProxyGtk::showContextMenu. The logic is the same
3109 to the old one except for dropping SERVICE_CONTROLS support. This is because
3110 SERVICE_CONTROLS is not related to GTK.
3112 * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
3113 (WebKit::WebContextMenuProxyGtk::showContextMenu):
3114 * UIProcess/gtk/WebContextMenuProxyGtk.h:
3116 2015-10-18 Commit Queue <commit-queue@webkit.org>
3118 Unreviewed, rolling out r191250 and r191253.
3119 https://bugs.webkit.org/show_bug.cgi?id=150296
3121 Broke all the tests on Windows (Requested by ap on #webkit).
3123 Reverted changesets:
3125 "Stop honoring the user default
3126 "WebKitKerningAndLigaturesEnabledByDefault""
3127 https://bugs.webkit.org/show_bug.cgi?id=150287
3128 http://trac.webkit.org/changeset/191250
3130 "Build fix after r191250"
3131 http://trac.webkit.org/changeset/191253
3133 2015-10-17 Myles C. Maxfield <mmaxfield@apple.com>
3135 Stop honoring the user default "WebKitKerningAndLigaturesEnabledByDefault"
3136 https://bugs.webkit.org/show_bug.cgi?id=150287
3138 Reviewed by Simon Fraser.
3140 * Shared/WebProcessCreationParameters.cpp:
3141 (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Deleted.
3142 (WebKit::WebProcessCreationParameters::encode): Deleted.
3143 (WebKit::WebProcessCreationParameters::decode): Deleted.
3144 * Shared/WebProcessCreationParameters.h:
3145 * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
3146 (WebKit::registerUserDefaultsIfNeeded): Deleted.
3147 (WebKit::WebProcessPool::platformInitializeWebProcess): Deleted.
3148 * WebProcess/cocoa/WebProcessCocoa.mm:
3149 (WebKit::WebProcess::platformInitializeWebProcess): Deleted.
3151 2015-10-17 Dan Bernstein <mitz@apple.com>
3153 [Cocoa] Stop using WKAXRegisterRemoteApp
3154 https://bugs.webkit.org/show_bug.cgi?id=150283
3156 Reviewed by Alexey Proskuryakov.
3158 * Platform/spi/mac: Added.
3159 * Platform/spi/mac/AppKitSPI.h: Added. Includes declaration of
3160 +[NSAccessibilityRemoteUIElement setRemoteUIApp:].
3162 * WebKit2.xcodeproj/project.pbxproj: Added reference to new header. Also changed the path of
3163 the Platform/spi/Cocoa group to the corresponding path in the source tree.
3165 * WebProcess/cocoa/WebProcessCocoa.mm:
3166 (WebKit::registerWithAccessibility): Added.
3167 (WebKit::WebProcess::platformInitializeProcess): Use new registerWithAccessibility instead
3168 of WKAXRegisterRemoteApp.
3170 2015-10-16 Simon Fraser <simon.fraser@apple.com>
3172 Enhance TextStream for logging, remove subclasses, log more things
3173 https://bugs.webkit.org/show_bug.cgi?id=150269
3175 Reviewed by Zalan Bujtas.
3177 Remove the various TextStream subclasses that only existed to support indenting,
3178 and output additional types. Add output for more WebCore and WebKit2 types, and
3179 just use TextStream everywhere.
3181 TextStream is enhance to support grouping (open paren and intent), with a
3182 stack-based class to open/end a group.
3184 Remove some SVG-specific duplicate output functions.
3186 Outdent namespace contents of GraphicsTypes.h.
3188 * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
3190 (WebKit::recursiveDumpNodes):
3191 (WebKit::RemoteScrollingCoordinatorTransaction::description):
3192 (WebKit::RemoteScrollingTreeTextStream::RemoteScrollingTreeTextStream): Deleted.
3193 (WebKit::RemoteScrollingTreeTextStream::increaseIndent): Deleted.
3194 (WebKit::RemoteScrollingTreeTextStream::decreaseIndent): Deleted.
3195 (WebKit::RemoteScrollingTreeTextStream::writeIndent): Deleted.
3196 (WebKit::dumpProperty): Deleted.
3197 (WebKit::RemoteScrollingTreeTextStream::operator<<): Deleted.
3198 (WebKit::RemoteScrollingTreeTextStream::dump): Deleted.
3199 (WebKit::RemoteScrollingTreeTextStream::recursiveDumpNodes): Deleted.
3200 * Shared/mac/RemoteLayerTreeTransaction.mm:
3201 (WebKit::operator<<):
3202 (WebKit::dumpChangedLayers):
3203 (WebKit::RemoteLayerTreeTransaction::description):
3204 (WebKit::RemoteLayerTreeTextStream::RemoteLayerTreeTextStream): Deleted.
3205 (WebKit::RemoteLayerTreeTextStream::increaseIndent): Deleted.
3206 (WebKit::RemoteLayerTreeTextStream::decreaseIndent): Deleted.
3207 (WebKit::dumpProperty): Deleted.
3208 (WebKit::RemoteLayerTreeTextStream::operator<<): Deleted.
3209 (WebKit::RemoteLayerTreeTextStream::writeIndent): Deleted.
3210 * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
3211 * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
3212 (WebKit::operator<<):
3214 2015-10-17 Hunseop Jeong <hs85.jeong@samsung.com>
3216 URTBF after r191194 to fix EFL build.
3217 https://bugs.webkit.org/show_bug.cgi?id=150272
3219 Reviewed by Csaba Osztrogonác.
3221 * UIProcess/efl/WebContextMenuProxyEfl.cpp:
3222 (WebKit::WebContextMenuProxyEfl::showContextMenu):
3223 * UIProcess/efl/WebContextMenuProxyEfl.h:
3225 2015-10-16 Wenson Hsieh <wenson_hsieh@apple.com>
3227 Add a WKWebView input delegate SPI
3228 https://bugs.webkit.org/show_bug.cgi?id=149646
3230 Reviewed by Dan Bernstein.
3232 Renames the existing _WKFormDelegate to _WKInputDelegate and adds a new delegate SPI method
3233 -[_WKInputDelegate _webView:focusShouldStartInputSession:] that allows clients to allow or
3234 disallow showing up the keyboard. To make this decision, clients are given a
3235 _WKFocusedElementInfo, which contains information about the focused element prior to the
3236 keyboard showing up so the client will be able to override default assistance behavior.
3238 While the information contained in a _WKFocusedElementInfo currently seems like overkill for
3239 _webView:focusShouldStartInputSession, our intentions are to give WebKit clients control over more
3240 details of how node assistance works, such as being able to use a custom editor for certain
3243 * Shared/API/Cocoa/WebKitPrivate.h: Added new header _WKFocusedElementInfo.h.
3244 * UIProcess/API/Cocoa/WKWebView.h:
3245 * UIProcess/API/Cocoa/WKWebView.mm:
3246 (-[WKWebView _inputDelegate]):
3247 (-[WKWebView _formDelegate]):
3248 (-[WKWebView _setInputDelegate:]):
3249 (-[WKWebView _setFormDelegate:]):
3250 (-[WKWebView initWithFrame:configuration:]): Deleted canAssistOnProgrammaticFocus flag.
3251 (-[WKWebView canAssistOnProgrammaticFocus]): Ditto.
3252 (-[WKWebView setCanAssistOnProgrammaticFocus:]): Ditto.
3253 * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
3254 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
3255 (-[WKWebViewConfiguration init]): Deleted.
3256 (-[WKWebViewConfiguration _canAssistOnProgrammaticFocus]): Deleted canAssistOnProgrammaticFocus flag.
3257 (-[WKWebViewConfiguration _setCanAssistOnProgrammaticFocus:]): Ditto.
3258 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3259 * UIProcess/API/Cocoa/_WKFocusedElementInfo.h: Added.
3260 * UIProcess/API/Cocoa/_WKFormDelegate.h:
3261 * UIProcess/API/Cocoa/_WKInputDelegate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKFormDelegate.h.
3262 * UIProcess/ios/WKContentViewInteraction.mm:
3263 (-[WKFocusedElementInfo initWithAssistedNodeInformation:isInteracting:]):
3264 (-[WKFocusedElementInfo type]):
3265 (-[WKFocusedElementInfo value]):
3266 (-[WKFocusedElementInfo isUserInitiated]):
3267 (-[WKContentView accessoryAutoFill]):
3268 (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]): If the input delegate responds to
3269 shouldStartInputSession, consult it to see if we should bring up the keyboard; otherwise, use our default behavior.
3270 * WebKit2.xcodeproj/project.pbxproj:
3272 2015-10-16 Simon Fraser <simon.fraser@apple.com>
3274 Make TextStream the canonical way to log classes in WebCore
3275 https://bugs.webkit.org/show_bug.cgi?id=150256
3277 Reviewed by Sam Weinig.
3279 We vacillated between PrintStream and TextStream as being the canonical way
3280 to stringify WebCore data structures. This patch solidifies TextStream
3281 as the solution, since it has convenient stream syntax, and is what we
3282 use for render tree dumps.
3284 Remove TextStream member functions that output non-simple structs
3285 (sizes, points and rects), replacing them with free operator<< functions
3286 in the .cpp file for the relevant class. Formatting is currently consistent
3287 with RenderTreeAsText output, to avoid breaking tests.
3289 Remove custom FloatRect outputting in SVG and RemoteLayerTreeTransaction.
3291 * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
3292 (WebKit::RemoteScrollingTreeTextStream::operator<<): Deleted.
3293 * Shared/mac/RemoteLayerTreeTransaction.mm:
3294 (WebKit::RemoteLayerTreeTextStream::operator<<): Deleted.
3296 2015-10-16 Anders Carlsson <andersca@apple.com>
3298 Remove some dead menu code
3299 https://bugs.webkit.org/show_bug.cgi?id=150247
3301 Reviewed by Andreas Kling.
3303 * Shared/WebContextMenuItemData.cpp:
3304 (WebKit::WebContextMenuItemData::WebContextMenuItemData):
3305 (WebKit::WebContextMenuItemData::encode): Deleted.
3306 * Shared/WebContextMenuItemData.h:
3307 (WebKit::WebContextMenuItemData::selectionHandler): Deleted.
3308 * UIProcess/mac/WebContextMenuProxyMac.mm:
3309 (WebKit::nsMenuItem):
3311 2015-10-16 Anders Carlsson <andersca@apple.com>
3313 Move more code to WebContextMenuProxyMac
3314 https://bugs.webkit.org/show_bug.cgi?id=150240
3316 Reviewed by Tim Horton.
3318 * UIProcess/WebContextMenuProxy.h:
3319 * UIProcess/WebPageProxy.cpp:
3320 (WebKit::WebPageProxy::internalShowContextMenu):
3321 * UIProcess/WebPageProxy.h:
3322 (WebKit::WebPageProxy::contextMenuClient):
3323 * UIProcess/mac/WebContextMenuProxyMac.h:
3324 * UIProcess/mac/WebContextMenuProxyMac.mm:
3325 (WebKit::WebContextMenuProxyMac::initializeShareMenuItem):
3326 (WebKit::WebContextMenuProxyMac::showContextMenu):
3327 * UIProcess/mac/WebPageProxyMac.mm:
3328 (WebKit::WebPageProxy::platformInitializeShareMenuItem): Deleted.
3330 2015-10-16 Tim Horton <timothy_horton@apple.com>
3332 Hook up autolayout intrinsic sizing for WKWebView
3333 https://bugs.webkit.org/show_bug.cgi?id=150219
3334 <rdar://problem/20016905>
3336 Reviewed by Simon Fraser.
3338 * UIProcess/API/Cocoa/WKWebView.mm:
3339 (-[WKWebView initWithFrame:configuration:]):
3340 (-[WKWebView intrinsicContentSize]):
3341 (-[WKWebView _setIntrinsicContentSize:]):
3342 (-[WKWebView _minimumLayoutWidth]):
3343 (-[WKWebView _setMinimumLayoutWidth:]):
3344 * UIProcess/API/Cocoa/WKWebViewInternal.h:
3345 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3346 Add a simple SPI to specify the minimum width that a WKWebView will attempt
3347 to lay out to, similar to WKView except just a width, not a size, and
3348 with no option to force the height to the view size. Similar behavior can
3349 be achieved by clients by setting custom autolayout constraints on the view.
3351 * UIProcess/mac/PageClientImpl.mm:
3352 (WebKit::PageClientImpl::intrinsicContentSizeDidChange):
3353 Forward intrinsic content size changes to the WKWebView, not its inner WKView,
3356 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3357 (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
3358 Only set the autosizing fixed minimum height if we're using that behavior;
3359 otherwise, setting it to the view's height will end up accidentally
3360 turning on that behavior (which involves an extra layout per resize!).
3362 2015-10-15 Anders Carlsson <andersca@apple.com>
3364 Use the ShowContextMenu message for service menus as well
3365 https://bugs.webkit.org/show_bug.cgi?id=150206
3367 Reviewed by Tim Horton.
3369 * Shared/ContextMenuContextData.cpp:
3370 (WebKit::ContextMenuContextData::ContextMenuContextData):
3371 (WebKit::ContextMenuContextData::encode):
3372 (WebKit::ContextMenuContextData::decode):
3373 * Shared/ContextMenuContextData.h:
3374 (WebKit::ContextMenuContextData::type):
3375 (WebKit::ContextMenuContextData::ContextMenuContextData):
3376 (WebKit::ContextMenuContextData::isServicesMenu):
3377 (WebKit::ContextMenuContextData::needsServicesMenu): Deleted.
3378 * UIProcess/WebPageProxy.cpp:
3379 (WebKit::WebPageProxy::showContextMenu):
3380 (WebKit::WebPageProxy::internalShowContextMenu):
3381 * UIProcess/WebPageProxy.h:
3382 * UIProcess/WebPageProxy.messages.in:
3383 * UIProcess/mac/WebContextMenuProxyMac.mm:
3384 (WebKit::WebContextMenuProxyMac::populate):
3385 (WebKit::WebContextMenuProxyMac::showContextMenu):
3386 * UIProcess/mac/WebPageProxyMac.mm:
3387 (WebKit::WebPageProxy::showSelectionServiceMenu): Deleted.
3388 * WebProcess/WebPage/mac/WebPageMac.mm:
3389 (WebKit::WebPage::handleSelectionServiceClick):
3391 2015-10-16 Hunseop Jeong <hs85.jeong@samsung.com>
3393 [GTK] Try to fix the build after r191137
3394 https://bugs.webkit.org/show_bug.cgi?id=150222
3396 Reviewed by Carlos Garcia Campos.
3398 * UIProcess/API/gtk/PageClientImpl.cpp:
3399 (WebKit::PageClientImpl::doneWithKeyEvent):
3400 (WebKit::PageClientImpl::createPopupMenuProxy):
3401 (WebKit::PageClientImpl::createContextMenuProxy):
3402 (WebKit::PageClientImpl::createColorPicker):
3403 * UIProcess/API/gtk/PageClientImpl.h:
3404 * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
3405 (WebKit::WebContextMenuProxyGtk::populate):
3406 (WebKit::WebContextMenuProxyGtk::showContextMenu):
3407 (WebKit::WebContextMenuProxyGtk::hideContextMenu):
3408 (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk):
3409 * UIProcess/gtk/WebContextMenuProxyGtk.h:
3410 (WebKit::WebContextMenuProxyGtk::create):
3411 (WebKit::WebContextMenuProxyGtk::gtkMenu):
3412 * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
3413 (WebKit::WebPopupMenuProxyGtk::WebPopupMenuProxyGtk):
3414 * UIProcess/gtk/WebPopupMenuProxyGtk.h:
3415 (WebKit::WebPopupMenuProxyGtk::create):
3416 (WebKit::WebPopupMenuProxyGtk::setCurrentlySelectedMenuItem):
3418 2015-10-15 Gyuyoung Kim <gyuyoung.kim@webkit.org>
3420 EFL build fix since r191137
3422 Unreviewed EFL build fix.
3424 * UIProcess/CoordinatedGraphics/WebView.cpp: Removed.
3426 2015-10-15 Myles C. Maxfield <mmaxfield@apple.com>
3428 Migrate to CGContextSetBaseCTM() and CGContextResetClip() from WKSI
3429 https://bugs.webkit.org/show_bug.cgi?id=150155
3431 Reviewed by Tim Horton.
3433 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3434 (InitWebCoreSystemInterface): Deleted.
3436 2015-10-15 Dean Jackson <dino@apple.com>
3438 Fix the iOS build. And hopefully not breaking the other builds
3441 * UIProcess/PageClient.h:
3442 * UIProcess/WebContextMenuProxy.cpp:
3443 * UIProcess/WebContextMenuProxy.h:
3444 * UIProcess/ios/PageClientImplIOS.h:
3445 * UIProcess/ios/PageClientImplIOS.mm:
3446 * UIProcess/mac/PageClientImpl.h:
3447 * UIProcess/mac/PageClientImpl.mm: