1 2014-10-24 Tim Horton <timothy_horton@apple.com>
3 [Mac][WebKit2] Move action menu code into its own file
4 https://bugs.webkit.org/show_bug.cgi?id=138034
5 <rdar://problem/18758758>
7 * UIProcess/mac/WKActionMenuController.mm:
8 (-[WKActionMenuController prepareForMenu:withEvent:]):
9 (-[WKActionMenuController _addImageToPhotos:]):
10 Review comments that were not previously addressed.
12 2014-10-24 Tim Horton <timothy_horton@apple.com>
14 [Mac][WebKit2] Move action menu code into its own file
15 https://bugs.webkit.org/show_bug.cgi?id=138034
16 <rdar://problem/18758758>
18 Reviewed by Dan Bernstein.
20 * UIProcess/API/mac/WKView.mm:
21 (-[WKView initWithFrame:context:configuration:webView:]):
22 Make a WKActionMenuController if needed.
24 (-[WKView prepareForMenu:withEvent:]):
25 (-[WKView willOpenMenu:withEvent:]):
26 (-[WKView didCloseMenu:withEvent:]):
27 (-[WKView _didPerformActionMenuHitTest:]):
28 Forward these to WKActionMenuController.
30 (-[WKView _openURLFromActionMenu:]): Deleted.
31 (-[WKView _addToReadingListFromActionMenu:]): Deleted.
32 (-[WKView _quickLookURLFromActionMenu:]): Deleted.
33 (-[WKView _createActionMenuItemForTag:]): Deleted.
34 (webKitBundleImageNamed): Deleted.
35 (-[WKView _copyImage:]): Deleted.
36 (-[WKView _saveImageToDownloads:]): Deleted.
37 (temporaryPhotosDirectoryPath): Deleted.
38 (pathToPhotoOnDisk): Deleted.
39 (-[WKView _addImageToPhotos:]): Deleted.
40 (-[WKView _defaultMenuItemsForImage]): Deleted.
41 (-[WKView _defaultMenuItems]): Deleted.
42 (-[WKView _updateActionMenu]): Deleted.
43 Moved to WKActionMenuController.
45 * UIProcess/mac/WKActionMenuController.h: Added.
46 * UIProcess/mac/WKActionMenuController.mm: Added.
47 (-[WKActionMenuController initWithPage:view:]):
48 (-[WKActionMenuController prepareForMenu:withEvent:]):
49 (-[WKActionMenuController willOpenMenu:withEvent:]):
50 (-[WKActionMenuController didCloseMenu:withEvent:]):
51 (-[WKActionMenuController didPerformActionMenuHitTest:]):
52 (-[WKActionMenuController _defaultMenuItemsForLink]):
53 (-[WKActionMenuController _openURLFromActionMenu:]):
54 (-[WKActionMenuController _addToReadingListFromActionMenu:]):
55 (-[WKActionMenuController _quickLookURLFromActionMenu:]):
56 (-[WKActionMenuController _defaultMenuItemsForImage]):
57 (-[WKActionMenuController _copyImage:]):
58 (-[WKActionMenuController _saveImageToDownloads:]):
59 (temporaryPhotosDirectoryPath):
61 (-[WKActionMenuController _addImageToPhotos:]):
62 (-[WKActionMenuController _createActionMenuItemForTag:]):
63 (webKitBundleImageNamed):
64 (imageForResource:name::if):
65 (-[WKActionMenuController _updateActionMenuItems]):
68 * WebKit2.xcodeproj/project.pbxproj:
70 2014-10-24 Marcos ChavarrÃa Teijeiro <chavarria1991@gmail.com>
72 [GTK] Implement is_selected method on WebKitHitTestResult
73 https://bugs.webkit.org/show_bug.cgi?id=137110
75 Reviewed by Tim Horton.
77 Expose CONTEXT_SELECTION for WebKitHitTestResult.
79 * Shared/WebHitTestResult.cpp: Add is_selected field and getter for this field.
80 (WebKit::WebHitTestResult::Data::Data):
81 (WebKit::WebHitTestResult::Data::encode):
82 (WebKit::WebHitTestResult::Data::decode):
83 * Shared/WebHitTestResult.h:
84 (WebKit::WebHitTestResult::isSelected):
85 * UIProcess/API/gtk/WebKitHitTestResult.cpp: Add WEBKIT_HIT_TEST_RESULT_CONTEXT_SELECTION context and method to check it.
86 (webkitHitTestResultCreate):
87 (webkitHitTestResultCompare):
88 (webkit_hit_test_result_context_is_selection):
89 * UIProcess/API/gtk/WebKitHitTestResult.h:
90 * UIProcess/API/gtk/WebKitWebView.cpp: Modify context-menu callback to set the new context option.
91 (webkitWebViewPopulateContextMenu):
92 * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add documentation about new function.
94 2014-10-23 Carlos Garcia Campos <cgarcia@igalia.com>
96 [GTK][Cairo] Remove GTK dependency of WidgetBackingStoreGtkX11
97 https://bugs.webkit.org/show_bug.cgi?id=138004
99 Reviewed by Gustavo Noronha Silva.
101 * UIProcess/BackingStore.h: Rename m_backingStore as m_backend,
102 since it's a bit confusing that a BackingStore class has a
103 m_backingStore member and WidgetBackingStore has been renamed as
104 BackingStoreBackendCairo.
105 * UIProcess/cairo/BackingStoreCairo.cpp:
106 (WebKit::BackingStore::createBackend): Helper function to create
107 the BackingStore backend depending on the platform.
108 (WebKit::BackingStore::paint): Use m_backend instead of m_backingStore.
109 (WebKit::BackingStore::incorporateUpdate): Ditto.
110 (WebKit::BackingStore::scroll): Ditto.
111 (WebKit::createBackingStoreForGTK): Deleted.
113 2014-10-23 Benjamin Poulain <bpoulain@apple.com>
115 Fix a bad find-and-replace in r175153
117 Looks like I messed up the commit on landing.
119 * UIProcess/WebPageProxy.cpp:
120 (WebKit::WebPageProxy::WebPageProxy):
121 (WebKit::WebPageProxy::didCommitLoadForFrame):
123 2014-10-23 Benjamin Poulain <bpoulain@apple.com>
125 [iOS WK2] If a page has the exact same VisibleContentRect as the page before, its VisibleContentRectUpdate can be ignored
126 https://bugs.webkit.org/show_bug.cgi?id=138031
127 rdar://problem/18739335
129 Reviewed by Simon Fraser.
131 Since any VisibleContentRectUpdate is costly for the WebProcess, we avoid sending updates
132 if none of the important parameters have changed (scale and geometry).
134 One unintended side effect is that the update of a page can be blocked if the parameters
135 of the previous page were identical.
138 1) Page [A] sends its content rect update as needed. WebPageProxy saves the last update
139 in m_lastVisibleContentRectUpdate and use that value to avoid useless updates.
140 2) Page [B] load after page [A] and have the exact VisibleContentRect. When receiving the first
141 layer tree commit after didCommitLoadForFrame, WKWebView sends its VisibleContentRect
142 to WebPageProxy to synchronize the state of the WebProcess with what is on screen.
143 3) Since the two VisibleContentRect update has the same value as the ones of page [A], WebPageProxy
144 discards the update. The WebProcess has its initialization viewport and is not udpated until
145 a major parameter changes (scale or position).
147 In rdar://problem/18739335, the problem is the similar but with a different failure point:
148 1) Everything above happened already.
149 2) The layer tree transaction has a scrolling request. This is processed by WKWebView.
150 3) Since the scrolling position is invalid, the request is ignored and we send the last
151 VisibleContentRect to the WebProcess with WebPageProxy::resendLastVisibleContentRects().
152 4) Since the VisibleContentRect was never updated after didCommitLoadForFrame, the one we send
153 is for the previous page, which the web process correctly ignores.
155 This patch solves the problem by nuking the cached m_lastVisibleContentRectUpdate before
156 any valid VisibleContentRectUpdate for a new page.
158 * UIProcess/WebPageProxy.cpp:
159 (WebKit::WebPageProxy::WebPageProxy):
160 (WebKit::WebPageProxy::didCommitLoadForFrame):
161 * UIProcess/WebPageProxy.h:
162 * UIProcess/ios/WebPageProxyIOS.mm:
163 (WebKit::WebPageProxy::didCommitLayerTree):
165 2014-10-23 Joseph Pecoraro <pecoraro@apple.com>
167 Web Inspector: Provide a way to have alternate inspector agents
168 https://bugs.webkit.org/show_bug.cgi?id=137901
170 Reviewed by Brian Burg.
172 * Configurations/FeatureDefines.xcconfig:
174 2014-10-23 Tim Horton <timothy_horton@apple.com>
176 Add some SPI headers for NSExtension and NSSharingService{Picker}
177 https://bugs.webkit.org/show_bug.cgi?id=138027
179 Reviewed by Anders Carlsson.
181 * UIProcess/API/mac/WKView.mm:
182 * UIProcess/mac/ServicesController.mm:
183 * UIProcess/mac/WebContextMenuProxyMac.mm:
184 Replace redefinitions with SPI header #imports.
186 2014-10-23 Benjamin Poulain <bpoulain@apple.com>
188 [iOS WK2] Make sure any dynamic viewport update schedules a layer tree commit
189 https://bugs.webkit.org/show_bug.cgi?id=138021
191 Reviewed by Simon Fraser.
193 * WebProcess/WebPage/ios/WebPageIOS.mm:
194 (WebKit::WebPage::dynamicViewportSizeUpdate):
195 Sometimes, the clients can do a dynamic viewport update but only change the minimum
196 layout size (see rdar://problem/18755250).
198 When that happens, it is possible to do the full state update without ever scheduling
199 a layer tree commit. For example, if the new minimum layout height is only a few pixels
200 smaller than the old value and the layout of the page is equal or larger than the old value,
201 the layout is done without any side effect to the content (assuming a viewport configuration
204 The contract with the client is that the next layer tree commit after a dynamic viewport update
205 carries all the valid parameters for the new viewport size. Since the new layout never scheduled
206 a layer tree commit, the UIProcess is just waiting for one, discarding all input.
208 This patch solves the issue by explicitely scheduling a layer flush after updating all the layout
209 and view parameters to their final values. In most cases, this makes no difference since a layer
210 tree commit was already scheduled. In the rare cases where nothing was scheduled, scheduling
211 the layer tree commit ensure we unlock the UIProcess.
213 2014-10-23 Ryosuke Niwa <rniwa@webkit.org>
215 WebContent crash in WebKit::WebPage::expandedRangeFromHandle
216 https://bugs.webkit.org/show_bug.cgi?id=138023
218 Reviewed by Enrica Casucci.
220 The crashes are caused by rangeForBlockAtPoint returning a null Range.
221 Exit early or continue if a range is null in various places.
223 * WebProcess/WebPage/ios/WebPageIOS.mm:
224 (WebKit::WebPage::expandedRangeFromHandle): Continue looking for another point if the range returned by
225 rangeForBlockAtPoint is null.
226 (WebKit::WebPage::contractedRangeFromHandle): Ditto.
227 (WebKit::WebPage::computeExpandAndShrinkThresholdsForHandle): Removed the FIXME now that Enrica has
228 verified that this early exit added in r173788 is correct.
230 2014-10-23 Joseph Pecoraro <pecoraro@apple.com>
232 [iOS] iPhone unselecting items in <select multiple> shows incorrect values selected
233 https://bugs.webkit.org/show_bug.cgi?id=137989
235 Reviewed by Alexey Proskuryakov.
237 * UIProcess/ios/forms/WKFormSelectPicker.mm:
238 (-[WKMultipleSelectPicker pickerView:row:column:checked:]):
239 The second argument is "allowsMultipleSelection" and should only be set
240 when we are making a selection in a <select multiple>.
242 2014-10-23 Tim Horton <timothy_horton@apple.com>
244 Assertion failures in ImageKit soft linking
245 https://bugs.webkit.org/show_bug.cgi?id=138009
247 Reviewed by Anders Carlsson.
249 * UIProcess/API/mac/WKView.mm:
250 Soft-link ImageKit correctly.
251 ImageKit is inside the Quartz umbrella framework.
253 2014-10-23 Daniel Bates <dabates@apple.com>
255 [iOS] Fix the build after <http://trac.webkit.org/changeset/175079>
256 (https://bugs.webkit.org/show_bug.cgi?id=137995)
258 Rubber-stamped by Anders Carlsson.
260 Remove PageClientImpl::didPerformActionMenuHitTest() for iOS.
262 * UIProcess/ios/PageClientImplIOS.h:
263 * UIProcess/ios/PageClientImplIOS.mm:
264 (WebKit::PageClientImpl::didPerformActionMenuHitTest): Deleted.
266 2014-10-23 Krzysztof Czech <k.czech@samsung.com>
268 [EFL] Fix build problem after r175098
269 https://bugs.webkit.org/show_bug.cgi?id=138002
271 Reviewed by Gyuyoung Kim.
273 Add ECORE_X dependency to avoid linking problems while building unit tests.
277 2014-10-23 Krzysztof Czech <k.czech@samsung.com>
279 [EFL] Set proper default value for WebPageAccessibilityObject
280 https://bugs.webkit.org/show_bug.cgi?id=137951
282 Reviewed by Csaba Osztrogonác.
284 Initial value for WebPageAccessibilityObject should be nullptr.
286 * WebProcess/WebPage/WebPage.cpp:
287 (WebKit::WebPage::WebPage):
289 2014-10-23 Krzysztof Czech <k.czech@samsung.com>
291 [EFL] Introduce EFL Accessibility in WebKit
292 https://bugs.webkit.org/show_bug.cgi?id=137819
294 Reviewed by Gyuyoung Kim.
296 EFL Accessibility provides an API that is used to notify clients that certain
297 Accessibility events occur. Utilizing it makes WebKit-EFL coherent with EFL native
298 accessibility approach.
301 * UIProcess/API/efl/EwkView.cpp:
303 * UIProcess/API/efl/EwkView.h:
304 (EwkView::webAccessibility):
305 * UIProcess/API/efl/WebAccessibility.cpp: Added.
306 (WebKit::WebAccessibility::WebAccessibility):
307 (WebKit::WebAccessibility::~WebAccessibility):
308 (WebKit::WebAccessibility::eventHandler):
309 (WebKit::WebAccessibility::executeGestureAction):
310 (WebKit::WebAccessibility::activate):
311 (WebKit::WebAccessibility::read):
312 (WebKit::WebAccessibility::readNext):
313 (WebKit::WebAccessibility::readPrev):
314 (WebKit::WebAccessibility::up):
315 (WebKit::WebAccessibility::down):
316 (WebKit::WebAccessibility::scroll):
317 (WebKit::WebAccessibility::mouse):
318 (WebKit::WebAccessibility::enable):
319 (WebKit::WebAccessibility::disable):
320 * UIProcess/API/efl/WebAccessibility.h: Added.
321 (WebKit::WebAccessibility::activateAction):
322 (WebKit::WebAccessibility::nextAction):
323 (WebKit::WebAccessibility::prevAction):
324 (WebKit::WebAccessibility::readAction):
325 * UIProcess/API/efl/ewk_view.cpp:
326 (ewk_view_accessibility_action_activate_get):
327 (ewk_view_accessibility_action_next_get):
328 (ewk_view_accessibility_action_prev_get):
329 (ewk_view_accessibility_action_read_by_point_get):
330 * UIProcess/API/efl/ewk_view.h:
331 * UIProcess/API/efl/tests/test_ewk2_accessibility.cpp: Added.
332 (EWK2Accessibility::xwindow):
334 * UIProcess/WebPageProxy.h:
335 * UIProcess/efl/WebPageProxyEfl.cpp:
336 (WebKit::WebPageProxy::accessibilityObjectReadByPoint):
337 (WebKit::WebPageProxy::accessibilityObjectReadPrevious):
338 (WebKit::WebPageProxy::accessibilityObjectReadNext):
340 2014-10-22 Benjamin Poulain <bpoulain@apple.com>
342 [iOS WK2] Protect WKWebView dynamic viewport change against empty sizes
343 https://bugs.webkit.org/show_bug.cgi?id=137988
344 rdar://problem/17785162
346 Reviewed by Simon Fraser.
348 * UIProcess/API/Cocoa/WKWebView.mm:
349 (-[WKWebView _beginAnimatedResizeWithUpdates:]):
350 The algorithm behind dynamic size update finds the best content area to put in the viewport
351 after a viewport change. If an initial size or a target size is empty, it is impossible to
352 compute a reasonable area to keep in the view. We end up handling NaN scales
353 and/or sizes and CoreAnimation raises an exception when applying that value.
355 This patch add early exits when that occurs and fallback to the common code.
357 On Input, things are easy. If any of the initial values is empty, we just execute the updateBlock
358 without attempting any of the dynamic behaviors.
360 For the target values, things are trickier. We do not know what the values are going to be before we execute
361 the block. But once we executed the block, we have already skipped all the setters that call the web process.
363 To handle that, every value is set manually on WebPageProxy. This is a bit unfortunate because the setters
364 get yet another entry point.
366 2014-10-22 Gyuyoung Kim <gyuyoung.kim@samsung.com>
368 EFL and GTK ports have broken since r175075
369 https://bugs.webkit.org/show_bug.cgi?id=137995
371 Unreviewed, EFL and GTK ports build fix.
373 Need to use PLATFORM(MAC) guard for ActionMenuHitTest functions.
375 * UIProcess/PageClient.h:
376 * UIProcess/WebPageProxy.cpp:
377 (WebKit::WebPageProxy::removeNavigationGestureSnapshot):
378 * UIProcess/WebPageProxy.h:
379 * UIProcess/WebPageProxy.messages.in:
380 * WebProcess/WebPage/WebPage.cpp:
381 * WebProcess/WebPage/WebPage.h:
382 * WebProcess/WebPage/WebPage.messages.in:
384 2014-10-22 Tim Horton <timothy_horton@apple.com>
386 Add action menu support for images
387 https://bugs.webkit.org/show_bug.cgi?id=137987
388 <rdar://problem/18717767>
390 Reviewed by Anders Carlsson, Sam Weinig, and Beth Dakin.
392 * Resources/AddImageToPhotos.pdf: Added.
393 * Resources/CopyImage.pdf: Added.
394 * Resources/SaveImageToDownloads.pdf: Added.
395 * Resources/ShareImage.pdf: Added.
396 Add some temporary artwork.
398 * Scripts/webkit/messages.py:
400 ActionMenuHitTestResult is a struct.
402 * Shared/API/c/WKActionMenuItemTypes.h:
403 Add new items for image menus.
405 * Shared/mac/ActionMenuHitTestResult.cpp:
406 (WebKit::ActionMenuHitTestResult::encode):
407 (WebKit::ActionMenuHitTestResult::decode):
408 For now, pass the hit image data across to the UI process as a ShareableBitmap.
410 * Shared/mac/ActionMenuHitTestResult.h:
412 * UIProcess/API/mac/WKView.mm:
413 (-[WKView _createActionMenuItemForTag:]):
414 Refactor action menu item creation into a single function, so that
415 callers can share code and be much simpler.
417 (webKitBundleImageNamed):
418 Add a helper to acquire an image from the WebKit2 bundle.
420 (-[WKView _copyImage:]):
421 (-[WKView _saveImageToDownloads:]):
422 (temporaryPhotosDirectoryPath):
424 (-[WKView _addImageToPhotos:]):
425 Add rudimentary implementations of image actions.
427 (-[WKView _defaultMenuItemsForImage]):
428 Support the image menu, plus a submenu acquired from NSSharingServicePicker
431 (-[WKView _defaultMenuItems]):
432 Call _defaultMenuItemsForImage if needed.
434 (-[WKView _updateActionMenu]):
435 Refactor _updateActionMenu out of prepareForMenu:withEvent:.
437 (-[WKView prepareForMenu:withEvent:]):
438 Ask the Web process to re-hit-test under the location that the menu
439 will appear. Mark the menu as pending.
441 (-[WKView _didPerformActionMenuHitTest:]):
442 When we get the hit test reply, record the result for future use.
444 (-[WKView willOpenMenu:withEvent:]):
445 If we got a hit test reply, rebuild the menu immediately. If not, wait
446 up to 500ms for the reply to come in. This eventually needs to be
447 cancellable if the menu is rejected in the interim.
449 (-[WKView didCloseMenu:withEvent:]):
450 Clear all state when the menu closes.
452 * UIProcess/API/mac/WKViewInternal.h:
453 * UIProcess/PageClient.h:
454 * UIProcess/WebPageProxy.cpp:
455 (WebKit::WebPageProxy::performActionMenuHitTestAtLocation):
456 (WebKit::WebPageProxy::didPerformActionMenuHitTest):
457 * UIProcess/WebPageProxy.h:
458 * UIProcess/WebPageProxy.messages.in:
459 * UIProcess/mac/PageClientImpl.h:
460 * UIProcess/mac/PageClientImpl.mm:
461 (WebKit::PageClientImpl::didPerformActionMenuHitTest):
462 * UIProcess/ios/PageClientImplIOS.h:
463 * UIProcess/ios/PageClientImplIOS.mm:
464 * WebProcess/WebPage/WebPage.h:
465 * WebProcess/WebPage/WebPage.messages.in:
466 Plumb didPerformActionMenuHitTest back from WebPageProxy to WKView.
468 * WebProcess/WebPage/WebPage.cpp:
469 (WebKit::WebPage::performActionMenuHitTestAtLocation):
470 Hit test at the given location, recording the image data if there is any,
471 and return the result to the UI process.
473 * WebKit2.xcodeproj/project.pbxproj:
476 2014-10-22 Gyuyoung Kim <gyuyoung.kim@samsung.com>
478 Remove WidgetBackingStoreCairo::create() factory function
479 https://bugs.webkit.org/show_bug.cgi?id=137943
481 Reviewed by Darin Adler.
483 WidgetBackingStoreCairo::create() can be replaced by std::make_unique<>.
484 Thus this patch removes it, then use std::make_unique<>|std::unique_ptr<>.
486 * UIProcess/BackingStore.h:
487 * UIProcess/cairo/BackingStoreCairo.cpp:
488 (WebKit::createBackingStoreForGTK):
489 (WebKit::BackingStore::incorporateUpdate):
491 2014-10-22 Gyuyoung Kim <gyuyoung.kim@samsung.com>
493 Remove TextCheckerEnchant::create() factory function
494 https://bugs.webkit.org/show_bug.cgi?id=137944
496 Reviewed by Darin Adler.
498 TextCheckerEnchant::create() can be replaced by std::make_unique<> and std::unique_ptr<>.
500 * UIProcess/API/gtk/WebKitTextChecker.cpp:
501 (WebKitTextChecker::WebKitTextChecker):
502 * UIProcess/API/gtk/WebKitTextChecker.h:
503 * UIProcess/efl/TextCheckerClientEfl.cpp:
504 (TextCheckerClientEfl::TextCheckerClientEfl):
505 * UIProcess/efl/TextCheckerClientEfl.h:
507 2014-10-22 Antti Koivisto <antti@apple.com>
509 Revert fix for REGRESSION (r173356): Safari can't install a profile, gets 'Download Failed error
510 (https://bugs.webkit.org/show_bug.cgi?id=137493)
512 Turns out the root cause was a bug in MIME type sniffing, https://bugs.webkit.org/show_bug.cgi?id=137855
514 Remove the workaround.
516 * Shared/Downloads/ios/DownloadIOS.mm:
517 (WebKit::Download::startWithHandle):
518 * Shared/Downloads/mac/DownloadMac.mm:
519 (WebKit::Download::startWithHandle):
521 2014-10-22 Beth Dakin <bdakin@apple.com>
523 Remove action menu web preference
524 https://bugs.webkit.org/show_bug.cgi?id=137975
526 Reviewed by Tim Horton.
528 * Shared/WebPreferencesDefinitions.h:
529 * UIProcess/API/C/WKPreferences.cpp:
530 (WKPreferencesSetActionMenuSupportEnabled): Deleted.
531 (WKPreferencesGetActionMenuSupportEnabled): Deleted.
532 * UIProcess/API/C/WKPreferencesRefPrivate.h:
533 * UIProcess/API/mac/WKView.mm:
534 (-[WKView initWithFrame:context:configuration:webView:]):
536 2014-10-22 Chris Dumez <cdumez@apple.com>
538 [Mac][WK2] Fix applicationIsSafari() detection
539 https://bugs.webkit.org/show_bug.cgi?id=137893
541 Reviewed by Alexey Proskuryakov.
543 Provide an implementation for FrameLoaderClient's new
544 needsQuickLookResourceCachingQuirks(), which accesses the flag stored
545 on the WebProcess, which is initialized upon WebProcess creation.
547 QuickLookMac::computeNeedsQuickLookResourceCachingQuirks() is called
548 on UIProcess side so that it works reliably and the flag is passed as
549 parameter when constructing the WebProcess.
551 * Shared/WebProcessCreationParameters.cpp:
552 (WebKit::WebProcessCreationParameters::encode):
553 (WebKit::WebProcessCreationParameters::decode):
554 * Shared/WebProcessCreationParameters.h:
555 * UIProcess/mac/WebContextMac.mm:
556 (WebKit::WebContext::platformInitializeWebProcess):
557 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
558 (WebKit::WebFrameLoaderClient::needsQuickLookResourceCachingQuirks):
559 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
560 * WebProcess/WebProcess.cpp:
561 (WebKit::WebProcess::WebProcess):
562 * WebProcess/WebProcess.h:
563 (WebKit::WebProcess::needsQuickLookResourceCachingQuirks):
564 * WebProcess/cocoa/WebProcessCocoa.mm:
565 (WebKit::WebProcess::platformInitializeWebProcess):
567 2014-10-22 Carlos Garcia Campos <cgarcia@igalia.com>
569 Unreviewed. Fix GTK+ debug build after r175046.
571 Remove invalid ASSERT.
573 * UIProcess/gtk/InputMethodFilter.cpp:
574 (WebKit::InputMethodFilter::setCursorRect):
576 2014-10-22 Carlos Garcia Campos <cgarcia@igalia.com>
578 [GTK] Move GtkInputMethodFilter from Platform to WebKit2
579 https://bugs.webkit.org/show_bug.cgi?id=137884
581 Reviewed by Gustavo Noronha Silva.
583 Merge WebViewBaseInputMethodFilter and GtkInputMethodFilter into a
584 single class InputMethodFilter. The code is mostly the same, but
585 instead of having a setWebView method only to get the WebPageProxy,
586 it has a setPage method that passes the WebPageProxy. The GtkIMContext
587 client window is set by the WebView when it's realized/unrealized.
590 * Shared/NativeWebKeyboardEvent.h:
591 * Shared/gtk/NativeWebKeyboardEventGtk.cpp:
592 (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):
593 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
594 (webkitWebViewBaseRealize):
595 (webkitWebViewBaseUnrealize):
596 (webkit_web_view_base_class_init):
597 (webkitWebViewBaseCreateWebPage):
598 (webkitWebViewBaseEnterFullScreen): Deleted.
599 * UIProcess/API/gtk/WebViewBaseInputMethodFilter.cpp: Removed.
600 * UIProcess/API/gtk/WebViewBaseInputMethodFilter.h: Removed.
601 * UIProcess/gtk/InputMethodFilter.cpp: Added.
602 (WebKit::InputMethodFilter::handleCommitCallback):
603 (WebKit::InputMethodFilter::handlePreeditStartCallback):
604 (WebKit::InputMethodFilter::handlePreeditChangedCallback):
605 (WebKit::InputMethodFilter::handlePreeditEndCallback):
606 (WebKit::InputMethodFilter::InputMethodFilter):
607 (WebKit::InputMethodFilter::~InputMethodFilter):
608 (WebKit::InputMethodFilter::setEnabled):
609 (WebKit::InputMethodFilter::setCursorRect):
610 (WebKit::InputMethodFilter::handleKeyboardEvent):
611 (WebKit::InputMethodFilter::handleKeyboardEventWithCompositionResults):
612 (WebKit::InputMethodFilter::filterKeyEvent):
613 (WebKit::InputMethodFilter::confirmComposition):
614 (WebKit::InputMethodFilter::updatePreedit):
615 (WebKit::InputMethodFilter::notifyFocusedIn):
616 (WebKit::InputMethodFilter::notifyFocusedOut):
617 (WebKit::InputMethodFilter::notifyMouseButtonPress):
618 (WebKit::InputMethodFilter::confirmCurrentComposition):
619 (WebKit::InputMethodFilter::cancelContextComposition):
620 (WebKit::InputMethodFilter::sendCompositionAndPreeditWithFakeKeyEvents):
621 (WebKit::InputMethodFilter::handleCommit):
622 (WebKit::InputMethodFilter::handlePreeditStart):
623 (WebKit::InputMethodFilter::handlePreeditChanged):
624 (WebKit::InputMethodFilter::handlePreeditEnd):
625 (WebKit::InputMethodFilter::logHandleKeyboardEventForTesting):
626 (WebKit::InputMethodFilter::logHandleKeyboardEventWithCompositionResultsForTesting):
627 (WebKit::InputMethodFilter::logConfirmCompositionForTesting):
628 (WebKit::InputMethodFilter::logSetPreeditForTesting):
629 * UIProcess/gtk/InputMethodFilter.h: Added.
630 (WebKit::InputMethodFilter::context):
631 (WebKit::InputMethodFilter::setPage):
632 (WebKit::InputMethodFilter::setTestingMode):
633 (WebKit::InputMethodFilter::events):
635 2014-10-21 Tim Horton <timothy_horton@apple.com>
637 Quick Look preview bubble has unnecessary controls
638 https://bugs.webkit.org/show_bug.cgi?id=137940
639 <rdar://problem/18731860>
641 Reviewed by Simon Fraser.
643 * UIProcess/API/mac/WKView.mm:
644 (-[WKView _quickLookURLFromActionMenu:]):
645 Temporarily use more SPI to allow us to hide the preview bubble's controls.
647 2014-10-21 Jeff Miller <jeffm@apple.com>
649 Remove const from WKURLRequestRef parameter to WKContextDownloadURLRequest()
650 https://bugs.webkit.org/show_bug.cgi?id=137928
652 Reviewed by Darin Adler.
654 * UIProcess/API/C/WKContext.cpp:
655 (WKContextDownloadURLRequest):
656 * UIProcess/API/C/WKContext.h:
658 2014-10-21 Anders Carlsson <andersca@apple.com>
660 WKRemoteObjectCoder should handle floats
661 https://bugs.webkit.org/show_bug.cgi?id=137926
662 <rdar://problem/18695126>
664 Reviewed by Beth Dakin.
666 * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
668 (-[WKRemoteObjectEncoder encodeFloat:forKey:]):
669 (decodeInvocationArguments):
670 (-[WKRemoteObjectDecoder decodeFloatForKey:]):
672 2014-10-21 Jeff Miller <jeffm@apple.com>
674 WKContext needs to provide an API to resume a download
675 https://bugs.webkit.org/show_bug.cgi?id=137507
677 Reviewed by Darin Adler.
679 This patch adds WKContextResumeDownload(), which is only supported on the Mac, and requires the
680 resume data from WKDownloadGetResumeData().
682 We have to create a sandbox extension for the partially downloaded file in the UI process so the
683 network or web process can resume writing to it.
685 * NetworkProcess/NetworkProcess.cpp:
686 (WebKit::NetworkProcess::resumeDownload):
687 Added, calls through to DownloadManager::resumeDownload().
689 * NetworkProcess/NetworkProcess.h:
690 Added resumeDownload().
692 * NetworkProcess/NetworkProcess.messages.in:
693 Added ResumeDownload message.
695 * Shared/Downloads/Download.h:
698 * Shared/Downloads/DownloadManager.cpp:
699 (WebKit::DownloadManager::resumeDownload):
700 Added. The URL being downloaded is part of the opaque resumeData, so we can't specify it when the
701 Download is constructed.
703 * Shared/Downloads/DownloadManager.h:
704 Added resumeDownload().
706 * Shared/Downloads/ios/DownloadIOS.mm:
707 (WebKit::Download::resume):
708 Added, not implemented on this platform.
710 * Shared/Downloads/mac/DownloadMac.mm:
711 (WebKit::Download::resume):
712 Added. Consumes the sandbox extension, resumes the download, and sets m_request after the
713 NSURLDownload has been created. Note that we already have code to revoke the sandbox extension when
714 the download is finished, canceled, or fails.
716 * Shared/Downloads/soup/DownloadSoup.cpp:
717 (WebKit::Download::resume):
718 Added, not implemented on this platform.
720 * UIProcess/API/C/WKContext.cpp:
721 (WKContextResumeDownload):
724 * UIProcess/API/C/WKContext.h:
725 Added WKContextResumeDownload().
727 * UIProcess/WebContext.cpp:
728 (WebKit::WebContext::resumeDownload):
729 Added. Creates a sandbox extension for the existing file and includes it in the message to the
730 network or web process.
732 * UIProcess/WebContext.h:
733 Added resumeDownload().
735 * WebProcess/WebProcess.cpp:
736 (WebKit::WebProcess::resumeDownload):
737 Added, calls through to DownloadManager::resumeDownload().
739 * WebProcess/WebProcess.h:
740 Added resumeDownload().
742 * WebProcess/WebProcess.messages.in:
743 Added ResumeDownload message.
745 2014-10-20 Michael Catanzaro <mcatanzaro@igalia.com>
747 Change the default TLS errors policy to WEBKIT_TLS_ERRORS_POLICY_FAIL
748 https://bugs.webkit.org/show_bug.cgi?id=137832
750 Reviewed by Carlos Garcia Campos.
752 Too many general-purpose browsers that really need this policy
753 are not selecting it, so let's do so for them.
755 * UIProcess/API/gtk/WebKitWebContext.cpp:
756 (createDefaultWebContext):
758 2014-10-21 Michael Catanzaro <mcatanzaro@igalia.com>
761 https://bugs.webkit.org/show_bug.cgi?id=137859
763 Reviewed by Carlos Garcia Campos.
765 Set G_TLS_GNUTLS_PRIORITY if unset.
767 * NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp:
769 * WebProcess/EntryPoint/unix/WebProcessMain.cpp:
772 2014-10-20 Chris Dumez <cdumez@apple.com>
774 ResourceRequest deserialization unnecessarily calls partitionName() on encoded cache partition
775 https://bugs.webkit.org/show_bug.cgi?id=137797
777 Reviewed by Darin Adler.
779 This patch adds a |needsValidation| argument to
780 ResourceRequest::setCachePartition() setter so that the caller can
781 indicate that the partition name is valid (because it was already
782 processed by partitionName() before). Use this new argument in
783 ArgumentCoder<ResourceRequest>::decode() to spent a bit less time
784 deserializing resource requests.
786 * Shared/WebCoreArgumentCoders.cpp:
787 (IPC::ArgumentCoder<ResourceRequest>::decode):
789 2014-10-20 Beth Dakin <bdakin@apple.com>
791 Action menu items should have tags
792 https://bugs.webkit.org/show_bug.cgi?id=137898
794 Reviewed by Anders Carlsson.
796 * Shared/API/c/WKActionMenuItemTypes.h: Added.
797 * UIProcess/API/mac/WKView.mm:
798 (-[WKView _defaultMenuItemsForLink]):
799 * WebKit2.xcodeproj/project.pbxproj:
801 2014-10-20 Beth Dakin <bdakin@apple.com>
803 Add support for action menus
804 https://bugs.webkit.org/show_bug.cgi?id=137891
805 rdar://problem/18451638
806 rdar://problem/18694470
808 Reviewed by Anders Carlsson.
810 Temporary artwork needed for menu item.
811 * Resources/OpenInNewWindowTemplate.pdf: Added.
812 * WebKit2.xcodeproj/project.pbxproj:
814 Add a preference that defaults to false for action menu support.
815 * Shared/WebPreferencesDefinitions.h:
816 * UIProcess/API/C/WKPreferences.cpp:
817 (WKPreferencesSetActionMenuSupportEnabled):
818 (WKPreferencesGetActionMenuSupportEnabled):
819 * UIProcess/API/C/WKPreferencesRefPrivate.h:
821 New SPI. WebKit clients can implement this method to customize the action menu.
822 * UIProcess/API/Cocoa/WKViewPrivate.h:
824 Create the action menu if it is supported.
825 * UIProcess/API/mac/WKView.mm:
826 (-[WKView initWithFrame:context:configuration:webView:]):
828 Methods to implement the default menu actions.
829 (-[WKView _openURLFromActionMenu:]):
830 (-[WKView _addToReadingListFromActionMenu:]):
831 (-[WKView _quickLookURLFromActionMenu:]):
833 Add action menus support for links. Populate the menu at the right time.
834 (-[WKView _defaultMenuItemsForLink]):
835 (-[WKView _defaultMenuItems]):
836 (-[WKView prepareForMenu:withEvent:]):
837 (-[WKView _actionMenuItemsForHitTestResult:defaultActionMenuItems:]):
839 New member variable caches the HitTestResult on mouse move.
840 * UIProcess/WebPageProxy.cpp:
841 (WebKit::WebPageProxy::mouseDidMoveOverElement):
842 * UIProcess/WebPageProxy.h:
843 (WebKit::WebPageProxy::activeActionMenuHitTestResult):
845 2014-10-20 Timothy Hatcher <timothy@apple.com>
847 Web Inspector: Delay and white area when Web Inspector crashes
848 https://bugs.webkit.org/show_bug.cgi?id=137230
850 Reviewed by Anders Carlsson.
852 * UIProcess/WebInspectorProxy.cpp:
853 (WebKit::processDidCrash): Added.
854 (WebKit::WebInspectorProxy::eagerlyCreateInspectorPage): Hook up loader client.
856 2014-10-20 Joseph Pecoraro <pecoraro@apple.com>
858 Web Inspector: Generate all Inspector domains together in JavaScriptCore
859 https://bugs.webkit.org/show_bug.cgi?id=137748
861 Reviewed by Brian Burg.
865 2014-10-19 Antti Koivisto <antti@apple.com>
867 Avoid unnecessary NSURLResponse construction for QuickLook on iOS
868 https://bugs.webkit.org/show_bug.cgi?id=137876
870 Reviewed by Andy Estes.
872 * WebProcess/Network/WebResourceLoader.cpp:
873 (WebKit::WebResourceLoader::didReceiveResponse):
875 Switch to the modified QuickLookHandle interface that does not need NSURLResponse.
877 2014-10-16 Andy Estes <aestes@apple.com>
879 [iOS] Capture WKActionSheetAssistant's interaction with WKContentView in a @protocol
880 https://bugs.webkit.org/show_bug.cgi?id=137792
882 Reviewed by Tim Horton.
884 WKPDFView would like to use WKActionSheetAssistant to show an action sheet when long-pressing a link, but it
885 can't so long as WKActionSheetAssistant is tightly coupled to WKContentView. Resolve this by factoring
886 WKActionSheetAssistant's interaction with WKContentView into a new protocol called
887 WKActionSheetAssistantDelegate and having WKContentView conform to this protocol.
889 * UIProcess/API/Cocoa/_WKElementAction.mm:
890 (+[_WKElementAction elementActionWithTitle:actionHandler:]): Changed instances of WKContentView * to id <WKActionSheetAssistantDelegate>.
891 (+[_WKElementAction elementActionWithType:customTitle:]): Ditto.
892 (-[_WKElementAction _runActionWithElementInfo:delegate:]): Ditto.
893 (copyElement): Deleted.
894 (saveImage): Deleted.
895 (-[_WKElementAction _runActionWithElementInfo:view:]): Deleted.
896 * UIProcess/API/Cocoa/_WKElementActionInternal.h:
897 * UIProcess/ios/WKActionSheet.h:
898 * UIProcess/ios/WKActionSheet.mm:
899 (-[WKActionSheet init]): Renamed from initWithView: since WKActionSheet no longer needs to know about a view.
900 (-[WKActionSheet _didRotateAndLayout]): Called -[WKActionSheetDelegate updatePositionInformation].
901 (-[WKActionSheet initWithView:]): Deleted.
902 * UIProcess/ios/WKActionSheetAssistant.h:
903 * UIProcess/ios/WKActionSheetAssistant.mm:
904 (-[WKActionSheetAssistant delegate]): Added a getter for the delegate property.
905 (-[WKActionSheetAssistant setDelegate:]): Added a setter for the delegate property.
906 (-[WKActionSheetAssistant initWithView:]): Changed argument type from WKContentView * to UIView *.
907 (-[WKActionSheetAssistant initialPresentationRectInHostViewForSheet]): Returned CGRectZero if there is no delegate.
908 Otherwise, retrieved positionInformation from the delegate.
909 (-[WKActionSheetAssistant presentationRectInHostViewForSheet]): Ditto.
910 (-[WKActionSheetAssistant updatePositionInformation]): Called -[WKActionSheetAssistantDelegate updatePositionInformation].
911 (-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]): Returned early if there is no delegate.
912 Otherwise, retrieved positionInformation from the delegate.
913 (-[WKActionSheetAssistant showImageSheet]): Ditto.
914 (-[WKActionSheetAssistant showLinkSheet]): Ditto.
915 (-[WKActionSheetAssistant showDataDetectorsSheet]): Ditto.
916 (-[WKActionSheetAssistant cleanupSheet]):
917 * UIProcess/ios/WKContentViewInteraction.h:
918 * UIProcess/ios/WKContentViewInteraction.mm:
919 (-[WKContentView setupInteraction]): Installed self as WKActionSheetAssistant's delegate.
920 (-[WKContentView updatePositionInformation]): Renamed from _updatePositionInformation.
921 (-[WKContentView performAction:]): Renamed from _performAction:.
922 (-[WKContentView openElementAtLocation:]): Called _attemptClickAtLocation:.
923 (-[WKContentView actionsForElement:defaultActions:]): Called API::UIClient::actionsForElement().
924 (-[WKContentView startInteractionWithElement:]): Called WebPageProxy::startInteractionWithElementAtPosition().
925 (-[WKContentView stopInteraction]): Called WebPageProxy::stopInteraction().
926 (-[WKContentView _updatePositionInformation]): Deleted.
927 (-[WKContentView _performAction:]): Deleted.
929 2014-10-20 Carlos Garnacho <carlosg@gnome.org>
931 [GTK] Improve zooming gesture positioning
932 https://bugs.webkit.org/show_bug.cgi?id=137822
934 Reviewed by Carlos Garcia Campos.
936 * UIProcess/WebPageProxy.h:
937 * UIProcess/gtk/GestureController.cpp:
938 (WebKit::GestureController::ZoomGesture::center):
939 (WebKit::GestureController::ZoomGesture::begin):
940 (WebKit::GestureController::ZoomGesture::handleZoom):
941 (WebKit::GestureController::ZoomGesture::scaleChanged): Calculate
942 the proper view coordinates for the current offset/scale, based
943 on the initial gesture center point in document coordinates, and
944 the current center/scale.
945 * UIProcess/gtk/GestureController.h:
946 * UIProcess/gtk/WebPageProxyGtk.cpp:
947 (WebKit::WebPageProxy::getCenterForZoomGesture): Added. Synchronous
948 call to retrieve the zoom gesture anchor point, in document coordinates.
949 * WebProcess/WebPage/WebPage.h:
950 * WebProcess/WebPage/WebPage.messages.in: Added stub.
951 * WebProcess/WebPage/gtk/WebPageGtk.cpp:
952 (WebKit::WebPage::getCenterForZoomGesture): Added. Getter for the
953 translated coordinates used as the anchor point of the zoom gesture.
955 2014-10-20 Carlos Garcia Campos <cgarcia@igalia.com>
957 [GTK] Remove the factory method from DragAndDropHandler
958 https://bugs.webkit.org/show_bug.cgi?id=137872
960 Reviewed by Sergio Villar Senin.
962 Make the constructor public and use std::make_unique instead.
964 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
965 (webkitWebViewBaseDragAndDropHandler):
966 * UIProcess/gtk/DragAndDropHandler.cpp:
967 (WebKit::DragAndDropHandler::create): Deleted.
968 * UIProcess/gtk/DragAndDropHandler.h:
970 2014-10-20 Carlos Garcia Campos <cgarcia@igalia.com>
972 [GTK] Add initial gestures support
973 https://bugs.webkit.org/show_bug.cgi?id=137812
975 Reviewed by Sergio Villar Senin.
977 Now that GTK+ has support for gestures, we can use it to handle
978 touch events and allow to scroll, zoom and tap with the fingers.
980 * PlatformGTK.cmake: Add new files to compilation.
981 * UIProcess/API/gtk/PageClientImpl.cpp:
982 (WebKit::PageClientImpl::doneWithTouchEvent): When the touch event
983 hasn't been handled by the web process pass it to the
984 GestureController and only fallback to pointer emulation when the
985 GestureController doesn't handle the event.
986 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
987 (webkitWebViewBaseTouchEvent): If the GestureController is
988 currently processing gestures is because the START touch event was
989 not handled by the web process, so pass any successive touch
990 events to the GestureController directly.
991 (webkitWebViewBaseGestureController): Create the GestureController
992 on demand and return a reference.
993 * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
994 * UIProcess/gtk/GestureController.cpp: Added.
995 (WebKit::GestureController::create): Create a GestureController.
996 (WebKit::GestureController::GestureController): Initialize the
998 (WebKit::GestureController::handleEvent): Pass the event to the gestures.
999 (WebKit::GestureController::isProcessingGestures): Whether
1000 Gestures are active.
1001 (WebKit::GestureController::Gesture::Gesture): Base class for gestures.
1002 (WebKit::GestureController::Gesture::isActive): Whether the
1004 (WebKit::GestureController::Gesture::handleEvent): Pass the event
1005 to the GtkGesture to process it.
1006 (WebKit::GestureController::DragGesture::handleDrag): Send a wheel
1007 event corresponding to the drag gesture to the web process.
1008 (WebKit::GestureController::DragGesture::handleTap): Send move,
1009 press and release events corresponding to a tap gesture to the web process.
1010 (WebKit::GestureController::DragGesture::begin): Start a drag
1011 gesture and schedule a timer to discard tap gesture in case of
1013 (WebKit::GestureController::DragGesture::update): If the actual
1014 drag hasn't started yet, check the drag threshold to decide
1015 whether to start the drag or not. Otherwise call handleDrag() to
1016 send the appropriate events to the web process.
1017 (WebKit::GestureController::DragGesture::end): If the drag gesture
1018 finishes and the drag didn't happen (it wasn't a long press and
1019 drag threshold was not reached), call handleTap() to emulate a
1021 (WebKit::GestureController::DragGesture::DragGesture): Initialize
1023 (WebKit::GestureController::ZoomGesture::begin): Save the current
1024 page scale factor and the center point of the gesture.
1025 (WebKit::GestureController::ZoomGesture::scaleChanged): Schedule a
1026 page scale change in an idle for the given scale value.
1027 (WebKit::GestureController::ZoomGesture::ZoomGesture): Initialize
1029 * UIProcess/gtk/GestureController.h: Added.
1031 2014-10-19 Chris Dumez <cdumez@apple.com>
1033 Use is<>() / downcast<>() for all remaining RenderObject subclasses
1034 https://bugs.webkit.org/show_bug.cgi?id=137845
1036 Reviewed by Darin Adler.
1038 Use is<>() / downcast<>() for all remaining RenderObject subclasses and
1039 clean up the surrounding code.
1041 * WebProcess/Plugins/PluginView.cpp:
1042 (WebKit::PluginView::pluginProcessCrashed):
1043 * WebProcess/WebPage/WebPage.cpp:
1044 (WebKit::WebPage::createPlugin):
1046 2014-10-19 Carlos Garcia Campos <cgarcia@igalia.com>
1048 [GTK] Move GtkDragAndDropHelper from Platform to WebKit2
1049 https://bugs.webkit.org/show_bug.cgi?id=137422
1051 Reviewed by Martin Robinson.
1053 WebKitWebViewBase is currently the only user of
1054 GtkDragAndDropHelper, that was added to share the code with
1055 WebKit1. Move all the drag and drop logic to a new class
1058 * PlatformGTK.cmake: Add new files to compilation.
1059 * UIProcess/API/gtk/PageClientImpl.cpp:
1060 (WebKit::PageClientImpl::startDrag):
1061 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1062 (webkitWebViewBaseConstructed):
1063 (webkitWebViewBaseDragDataGet):
1064 (webkitWebViewBaseDragEnd):
1065 (webkitWebViewBaseDragDataReceived):
1066 (webkitWebViewBaseDragMotion):
1067 (webkitWebViewBaseDragLeave):
1068 (webkitWebViewBaseDragDrop):
1069 (webkitWebViewBaseDragAndDropHandler):
1070 (dragExitedCallback): Deleted.
1071 (webkitWebViewBaseStartDrag): Deleted.
1072 * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
1073 * UIProcess/gtk/DragAndDropHandler.cpp: Added.
1074 (WebKit::DragAndDropHandler::create):
1075 (WebKit::DragAndDropHandler::DragAndDropHandler):
1076 (WebKit::DragAndDropHandler::DroppingContext::DroppingContext):
1077 (WebKit::dragOperationToGdkDragActions):
1078 (WebKit::dragOperationToSingleGdkDragAction):
1079 (WebKit::gdkDragActionToDragOperation):
1080 (WebKit::DragAndDropHandler::startDrag):
1081 (WebKit::DragAndDropHandler::fillDragData):
1082 (WebKit::DragAndDropHandler::finishDrag):
1083 (WebKit::DragAndDropHandler::dataObjectForDropData):
1084 (WebKit::DragAndDropHandler::dragEntered):
1085 (WebKit::DragAndDropHandler::requestDragData):
1086 (WebKit::DragAndDropHandler::dragMotion):
1087 (WebKit::DragAndDropHandler::dragLeave):
1088 (WebKit::DragAndDropHandler::drop):
1089 * UIProcess/gtk/DragAndDropHandler.h: Added.
1091 2014-10-18 Dan Bernstein <mitz@apple.com>
1093 WorkQueue dispatches functions but isn’t a FunctionDispatcher
1094 https://bugs.webkit.org/show_bug.cgi?id=137853
1096 Reviewed by Anders Carlsson.
1098 * Platform/WorkQueue.h: Changed to inherit from FunctionDispatcher.
1100 2014-10-18 Michael Catanzaro <mcatanzaro@igalia.com>
1102 [GTK] Improve documentation of webkit_web_view_get_tls_info()
1103 https://bugs.webkit.org/show_bug.cgi?id=137852
1105 Reviewed by Martin Robinson.
1107 * UIProcess/API/gtk/WebKitWebView.cpp:
1109 2014-10-17 Chris Dumez <cdumez@apple.com>
1111 Use is<>() / downcast<>() for RenderBox
1112 https://bugs.webkit.org/show_bug.cgi?id=137804
1114 Reviewed by Andreas Kling.
1116 Use is<>() / downcast<>() for RenderBox and clean up the surrounding
1119 * WebProcess/WebPage/WebPage.cpp:
1120 (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
1121 (WebKit::WebPage::plugInIsPrimarySize):
1122 * WebProcess/WebPage/ios/WebPageIOS.mm:
1123 (WebKit::WebPage::sendTapHighlightForNodeIfNecessary):
1125 2014-10-16 Simon Fraser <simon.fraser@apple.com>
1127 [iOS] Turn off font autosizing for iOS WebKitTestRunner
1128 https://bugs.webkit.org/show_bug.cgi?id=137806
1130 Reviewed by Sam Weinig.
1132 Confusingly, WKPreferencesSetTextAutosizingEnabled() does nothing on iOS.
1133 Instead, we have to add WKPreferencesSetMinimumZoomFontSize() and set it to 0
1134 to disable font autosizing.
1136 * UIProcess/API/C/WKPreferences.cpp:
1137 (WKPreferencesSetMinimumZoomFontSize):
1138 (WKPreferencesGetMinimumZoomFontSize):
1139 * UIProcess/API/C/WKPreferencesRefPrivate.h:
1141 2014-10-17 Gyuyoung Kim <gyuyoung.kim@samsung.com>
1143 [EFL] REGRESSION(r173929): It broke the Web Inspector
1144 https://bugs.webkit.org/show_bug.cgi?id=137522
1146 Reviewed by Csaba Osztrogonác.
1148 r173929 let web inspector use a separate web process. Besides it changed that the inspector is shown
1149 as docking mode by default. However EFL port doesn't support to show web inspector as docking window yet.
1150 This patch is to show web inspector on EFL new window as before. Docking mode should be implemented by
1153 * UIProcess/efl/WebInspectorProxyEfl.cpp:
1154 (WebKit::WebInspectorProxy::platformAttach):
1156 2014-10-17 Carlos Garcia Campos <cgarcia@igalia.com>
1158 [GLIB] Add API to GMainLoopSource to schedule sources after a delay in microseconds
1159 https://bugs.webkit.org/show_bug.cgi?id=137782
1161 Reviewed by Sergio Villar Senin.
1163 * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
1164 (WebKit::LayerTreeHostGtk::layerFlushTimerFired): Use microseconds
1165 instead of milliseconds.
1167 2014-10-17 Carlos Garcia Campos <cgarcia@igalia.com>
1169 [GTK] Move touch events handling from Platform to WebKit2
1170 https://bugs.webkit.org/show_bug.cgi?id=137735
1172 Reviewed by Sergio Villar Senin.
1174 GtkTouchContextHelper was only used by WebKitWebViewBase, since
1175 it's the only one that can create touch events. The code has been
1176 simplified by processing the events in the view, and the native
1177 touch events are now created with the native event and touch points.
1179 * Shared/NativeWebTouchEvent.h:
1180 (WebKit::NativeWebTouchEvent::touchContext): Deleted.
1181 * Shared/gtk/NativeWebTouchEventGtk.cpp:
1182 (WebKit::NativeWebTouchEvent::NativeWebTouchEvent): Pass touch
1183 points instead of touch context to WebEventFactory::createWebTouchEvent().
1184 * Shared/gtk/WebEventFactory.cpp:
1185 (WebKit::WebEventFactory::createWebTouchEvent): Create the
1186 WebTouchEvent for the given native event and points.
1187 (WebKit::touchPhaseFromEvents): Deleted.
1188 (WebKit::appendTouchEvent): Deleted.
1189 * Shared/gtk/WebEventFactory.h:
1190 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1191 (appendTouchEvent): Helper function to create a
1192 WebPlatformTouchPoint for the given native event and add it to the
1193 list of touch points.
1194 (webkitWebViewBaseGetTouchPointForEvent): Build the touch point
1196 (webkitWebViewBaseTouchEvent): Process the touch event.
1197 (webkitWebViewBaseDragDataReceived): Deleted.
1199 2014-10-16 Pascal Jacquemart <p.jacquemart@samsung.com>
1201 Removing CUSTOM_PROTOCOLS guard
1202 https://bugs.webkit.org/show_bug.cgi?id=137741
1204 Reviewed by Benjamin Poulain.
1206 * NetworkProcess/NetworkProcess.cpp:
1207 (WebKit::NetworkProcess::NetworkProcess):
1208 * Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
1209 * Shared/Network/CustomProtocols/CustomProtocolManager.h:
1210 * Shared/Network/CustomProtocols/CustomProtocolManager.messages.in:
1211 * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp:
1212 * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.h:
1213 * Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp:
1214 * Shared/Network/NetworkProcessCreationParameters.cpp:
1215 (WebKit::NetworkProcessCreationParameters::encode):
1216 (WebKit::NetworkProcessCreationParameters::decode):
1217 * Shared/Network/NetworkProcessCreationParameters.h:
1218 * Shared/WebProcessCreationParameters.cpp:
1219 (WebKit::WebProcessCreationParameters::encode):
1220 (WebKit::WebProcessCreationParameters::decode):
1221 * Shared/WebProcessCreationParameters.h:
1222 * UIProcess/API/C/soup/WKAPICastSoup.h:
1223 * UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.cpp:
1224 (WKSoupCustomProtocolRequestManagerGetTypeID):
1225 (WKSoupCustomProtocolRequestManagerSetClient):
1226 * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
1227 * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.messages.in:
1228 * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
1229 * UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp:
1230 * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp:
1231 * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.h:
1232 * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp:
1233 * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.h:
1234 * UIProcess/Network/NetworkProcessProxy.cpp:
1235 (WebKit::NetworkProcessProxy::NetworkProcessProxy):
1236 * UIProcess/Network/NetworkProcessProxy.h:
1237 * UIProcess/WebContext.cpp:
1238 (WebKit::WebContext::WebContext):
1239 (WebKit::WebContext::unregisterGlobalURLSchemeAsHavingCustomProtocolHandlers):
1240 (WebKit::WebContext::unregisterSchemeForCustomProtocol):
1241 * UIProcess/WebContext.h:
1242 * UIProcess/WebProcessProxy.cpp:
1243 (WebKit::WebProcessProxy::WebProcessProxy):
1244 * UIProcess/WebProcessProxy.h:
1245 * UIProcess/mac/WebContextMac.mm:
1246 (WebKit::WebContext::platformInitializeWebProcess):
1247 (WebKit::WebContext::platformInitializeNetworkProcess):
1249 * WebProcess/WebProcess.cpp:
1250 (WebKit::WebProcess::WebProcess):
1251 * WebProcess/soup/WebKitSoupRequestGeneric.cpp:
1252 (webkitSoupRequestGenericSendAsync):
1253 (webkitSoupRequestGenericSendFinish):
1254 * WebProcess/soup/WebKitSoupRequestGeneric.h:
1256 2014-10-16 Simon Fraser <simon.fraser@apple.com>
1258 Crash under RemoteLayerTreeHost::getLayer() when closing a tab
1259 https://bugs.webkit.org/show_bug.cgi?id=137796
1260 rdar://problem/18547565
1262 Reviewed by Tim Horton.
1264 CA can call our animation delegate after the RemoteLayerTreeHost has been
1265 destroyed. CAAnimation retains its delegate, so it's safe for us to null out
1266 the WKAnimationDelegate's pointer to the RemoteLayerTreeHost when tearing down
1267 the RemoteLayerTreeHost.
1269 * UIProcess/mac/RemoteLayerTreeHost.mm:
1270 (WebKit::RemoteLayerTreeHost::~RemoteLayerTreeHost):
1271 (WebKit::RemoteLayerTreeHost::animationDidEnd):
1272 * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
1273 (-[WKAnimationDelegate invalidate]):
1274 (-[WKAnimationDelegate animationDidStart:]):
1275 (-[WKAnimationDelegate animationDidStop:finished:]):
1277 2014-10-16 Tim Horton <timothy_horton@apple.com>
1279 Implement selection services menu for Legacy WebKit
1280 https://bugs.webkit.org/show_bug.cgi?id=137582
1281 <rdar://problem/18604241>
1283 Reviewed by Brady Eidson.
1285 * UIProcess/mac/WebContextMenuProxyMac.mm:
1286 (-[WKSharingServicePickerDelegate sharingService:didShareItems:]):
1287 Add a note that we should transition to using replaceSelectionWithAttributedString.
1289 * WebProcess/WebPage/mac/WebPageMac.mm:
1290 (WebKit::WebPage::handleSelectionServiceClick):
1291 Allow editor services in editable-but-not-rich-text areas, just like in WebKit1.
1293 2014-10-16 Tim Horton <timothy_horton@apple.com>
1295 Various crashes in ViewGestureControllerIOS when closing a tab while a swipe gesture is in progress
1296 https://bugs.webkit.org/show_bug.cgi?id=137770
1297 <rdar://problem/17916459>
1299 Reviewed by Dan Bernstein.
1301 When tearing down a WKWebView in the middle of a swipe gesture, a variety of
1302 UI process crashes were observed. First, two uses of potentially deleted objects
1303 (the WebBackForwardListItem and ViewGestureController), which were fixed by
1304 extending the object's lifetime and checking for its liveness, respectively.
1305 Second, a potential null-deref of DrawingArea if the timing of endSwipeGesture
1306 vs. page teardown was such that DrawingArea was null but everything else was in line.
1307 Lastly, another case of messaging a potentially deleted object (specifically,
1308 the _UIViewControllerTransitionContext's animator) in a callback from CA, which
1309 was fixed by nulling out the animator (and a few other properties) when tearing
1310 down the ViewGestureController.
1312 * UIProcess/ios/ViewGestureControllerIOS.mm:
1313 (-[WKSwipeTransitionController invalidate]):
1314 Clear the soon-to-be-invalid ViewGestureController pointer.
1316 (WebKit::ViewGestureController::~ViewGestureController):
1317 Call [WKSwipeTransitionController invalidate] upon destruction.
1318 Clear our transition context's interactor and animator, and inform it that
1319 the transition is not in flight. This avoids a crash when calling back
1320 to the already-destroyed animator later.
1322 (WebKit::ViewGestureController::beginSwipeGesture):
1323 Keep a reference to the target WebBackForwardListItem; this avoids
1324 it being deleted between here and the transition completion block firing.
1326 Look up the ViewGestureController by pageID, just like we do in endSwipeGesture,
1327 to avoid situations where the callback fires after the WKWebView/ViewGestureController
1330 Hold on to our _UIViewControllerOneToOneTransitionContext, so that we can do the
1331 aforementioned clearing upon deallocation.
1333 (WebKit::ViewGestureController::endSwipeGesture):
1334 Null check the DrawingArea. If it is null, instead of doing our normal delayed logic
1335 for swipe snapshot teardown, just put things back together immediately.
1337 (WebKit::ViewGestureController::removeSwipeSnapshot):
1338 Clear m_swipeTransitionContext.
1340 2014-10-16 Antti Koivisto <antti@apple.com>
1342 REGRESSION (r173356): Downloading a disk image appends ".txt" to it
1343 https://bugs.webkit.org/show_bug.cgi?id=137493
1344 <rdar://problem/18321947>
1346 Reviewed by Alexey Proskuryakov.
1348 * Shared/Downloads/ios/DownloadIOS.mm:
1349 (WebKit::Download::startWithHandle):
1350 * Shared/Downloads/mac/DownloadMac.mm:
1351 (WebKit::Download::startWithHandle):
1353 It appears that the synthesized NS/CFURLResponse fails to serialize the suggested filename correctly
1354 unless it has been accessed first.
1356 2014-10-15 Dan Bernstein <mitz@apple.com>
1358 [Cocoa] "Plug-in will handle load" error isn't declared in the modern API
1359 https://bugs.webkit.org/show_bug.cgi?id=137747
1361 Reviewed by Anders Carlsson.
1363 * UIProcess/API/Cocoa/WKError.mm: Define _WKLegacyErrorDomain.
1364 * UIProcess/API/Cocoa/WKErrorInternal.h: Changed to import WKErrorPrivate.h.
1365 * UIProcess/API/Cocoa/WKErrorPrivate.h: Added. Declares _WKLegacyErrorDomain
1366 and _WKLegacyErrorPlugInWillHandleLoad.
1367 * WebKit2.xcodeproj/project.pbxproj: Added new private header.
1369 2014-10-15 Chris Dumez <cdumez@apple.com>
1371 Use is<>() / downcast<>() for TransformOperation subclasses
1372 https://bugs.webkit.org/show_bug.cgi?id=137731
1374 Reviewed by Darin Adler.
1376 Use is<>() / downcast<>() for TransformOperation subclasses and clean
1377 up the surrounding code.
1379 * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
1380 (IPC::ArgumentCoder<TransformOperations>::encode):
1382 2014-10-15 Alexey Proskuryakov <ap@apple.com>
1384 [Mac] Allow some Kerberos related paths in sandbox
1385 https://bugs.webkit.org/show_bug.cgi?id=137666
1386 rdar://problem/17965010
1388 Reviewed by Darin Adler.
1390 * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
1391 * WebProcess/com.apple.WebProcess.sb.in:
1393 2014-10-15 Alexey Proskuryakov <ap@apple.com>
1395 [Mac] Allow plug-ins to read managed preferences
1396 https://bugs.webkit.org/show_bug.cgi?id=137665
1397 <rdar://problem/18255601>
1399 Reviewed by Darin Adler.
1401 * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
1403 2014-10-14 Joonghun Park <jh718.park@samsung.com>
1405 [WK2][EFL] Fix the problem that threads created by a DispatchQueueEfl are not destroyed
1406 even after the DispatchQueueEfl has been destructed
1407 https://bugs.webkit.org/show_bug.cgi?id=137195
1409 Reviewed by Gyuyoung Kim.
1411 Linux and Unix System's pthreads are created in joinable state by default.
1412 If threads aren't destructed explicitly, it will be still live
1413 until process which created the thread is dead.
1414 Besides it may cause out of capacity range of thread creation in a process.
1415 It is one of hidden defects.
1416 This patch calls detachThread() to detach thread immediately after it is created.
1417 So the thread can be destroyed as soon as the thread's ThreadContext::function()
1420 * Platform/efl/DispatchQueueEfl.cpp:
1421 (DispatchQueue::ThreadContext::start):
1423 2014-10-14 Chris Dumez <cdumez@apple.com>
1425 Use is<>() / downcast<>() for PlatformCAAnimation subclasses
1426 https://bugs.webkit.org/show_bug.cgi?id=137722
1428 Reviewed by Simon Fraser.
1430 Use is<>() / downcast<>() for PlatformCAAnimation subclasses and clean
1431 up the surrounding code.
1433 * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
1434 * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
1435 (WebKit::PlatformCAAnimationRemote::copy):
1436 (WebKit::PlatformCAAnimationRemote::copyTimingFunctionFrom):
1437 (WebKit::PlatformCAAnimationRemote::copyFromValueFrom):
1438 (WebKit::PlatformCAAnimationRemote::copyToValueFrom):
1439 (WebKit::PlatformCAAnimationRemote::copyValuesFrom):
1440 (WebKit::PlatformCAAnimationRemote::copyKeyTimesFrom):
1441 (WebKit::PlatformCAAnimationRemote::copyTimingFunctionsFrom):
1442 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1443 (WebKit::PlatformCALayerRemote::addAnimationForKey):
1444 (WebKit::PlatformCALayerRemote::animationStarted):
1445 * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
1446 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1447 (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
1449 2014-10-14 Alexey Proskuryakov <ap@apple.com>
1451 REGRESSION (r165356): Issues with Japanese text input
1452 https://bugs.webkit.org/show_bug.cgi?id=137719
1453 rdar://problem/18431952
1454 rdar://problem/18483741
1456 Reviewed by Darin Adler.
1458 * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didChangeSelection):
1459 In sync code path, ensure consistent message delivery order by adding
1460 a DispatchMessageEvenWhenWaitingForSyncReply flag. This way, delayed
1461 EditorStateChanged messages won't confuse UI process.
1463 2014-10-14 Anders Carlsson <andersca@apple.com>
1465 Hide the find indicator when starting a swipe
1466 https://bugs.webkit.org/show_bug.cgi?id=137711
1468 Reviewed by Tim Horton.
1470 * UIProcess/mac/PageClientImpl.mm:
1471 (WebKit::PageClientImpl::navigationGestureDidBegin):
1473 2014-10-14 Chris Dumez <cdumez@apple.com>
1475 Use is<>() / downcast<>() for RenderImage
1476 https://bugs.webkit.org/show_bug.cgi?id=137683
1478 Reviewed by Mihnea Ovidenie.
1480 Use is<>() / downcast<>() for RenderImage.
1482 * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
1483 (WebKit::cachedImage):
1484 * WebProcess/WebPage/ios/WebPageIOS.mm:
1485 (WebKit::WebPage::performActionOnElement):
1487 2014-10-13 Carlos Garcia Campos <cgarcia@igalia.com>
1489 [GTK][CMake] Non-ninja build is broken since r174422
1490 https://bugs.webkit.org/show_bug.cgi?id=137656
1492 Reviewed by Philippe Normand.
1494 Make WebKit2-forwarding-headers depend only on static,
1495 non-generated sources.
1498 * PlatformGTK.cmake:
1500 2014-10-13 Chris Dumez <cdumez@apple.com>
1502 Use is<>() / downcast<>() for PlatformCALayer subclasses
1503 https://bugs.webkit.org/show_bug.cgi?id=137661
1505 Reviewed by Simon Fraser.
1507 Use is<>() / downcast<>() for PlatformCALayer subclasses and clean up
1508 the surrounding code.
1510 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1511 (WebKit::PlatformCALayerRemote::~PlatformCALayerRemote):
1512 (WebKit::PlatformCALayerRemote::updateClonedLayerProperties):
1513 (WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
1514 (WebKit::PlatformCALayerRemote::setSublayers):
1515 (WebKit::PlatformCALayerRemote::appendSublayer):
1516 (WebKit::PlatformCALayerRemote::insertSublayer):
1517 (WebKit::PlatformCALayerRemote::replaceSublayer):
1518 (WebKit::PlatformCALayerRemote::adoptSublayers):
1519 (WebKit::PlatformCALayerRemote::setMask):
1520 (WebKit::PlatformCALayerRemote::copyFiltersFrom):
1521 * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
1522 * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
1523 * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
1524 (WebKit::RemoteLayerTreeContext::buildTransaction):
1526 2014-10-13 Chris Dumez <cdumez@apple.com>
1528 Use is<>() / downcast<>() for Filter / FilterOperation subclasses
1529 https://bugs.webkit.org/show_bug.cgi?id=137644
1531 Reviewed by Darin Adler.
1533 Use is<>() / downcast<>() for Filter / FilterOperation subclasses.
1535 * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
1536 (IPC::ArgumentCoder<WebCore::FilterOperations>::encode):
1537 * Shared/WebCoreArgumentCoders.cpp:
1538 (IPC::ArgumentCoder<FilterOperation>::encode):
1539 * Shared/mac/RemoteLayerTreeTransaction.mm:
1540 (WebKit::RemoteLayerTreeTextStream::operator<<):
1542 2014-10-12 Sergio Villar Senin <svillar@igalia.com>
1544 [SOUP] [WK2] WebProcess and NetworkProcess initialization clears cache contents
1545 https://bugs.webkit.org/show_bug.cgi?id=137489
1547 Reviewed by Carlos Garcia Campos.
1549 Temporarily set the SoupCache's maximum size to a huge value
1550 before calling soup_cache_load() so that the cache is not shrinked
1551 to the default value.
1553 * NetworkProcess/soup/NetworkProcessSoup.cpp:
1554 (WebKit::NetworkProcess::platformInitializeNetworkProcess):
1555 * WebProcess/soup/WebProcessSoup.cpp:
1556 (WebKit::WebProcess::platformInitializeWebProcess):
1558 2014-10-12 Ryuan Choi <ryuan.choi@gmail.com>
1560 [EFL] Introduce EWebKit_Extension
1561 https://bugs.webkit.org/show_bug.cgi?id=134921
1563 Reviewed by Gyuyoung Kim.
1565 EWebKit2 does not provide the functionality to extend WebProcess.
1566 Although there is ewk_context_new_with_injected_bundle_path() in ewebkit2 APIs,
1567 application developers can not make bundle object without touching WK APIs
1568 which ewebkit2 does not expose.
1570 This patch introduces EWebKit_Extension, basic structure for the extension of WebProcess.
1572 * PlatformEfl.cmake:
1573 Added files for the EWebKit_Extension and install them properly.
1574 * UIProcess/API/efl/ewk_context.cpp:
1575 (EwkContext::EwkContext):
1576 (bundlePathForExtension):
1577 (EwkContext::create):
1578 (EwkContext::getInjectedBundleInitializationUserData):
1579 (EwkContext::setMessageFromInjectedBundleCallback):
1580 (ewk_context_new_with_extensions_path):
1581 Deleted because ewebkit2 does not have a way to make injected bundle.
1582 Instead, Ewk_Extension will cover the same functionalities.
1583 (ewk_context_new_with_injected_bundle_path): Deleted.
1584 * UIProcess/API/efl/ewk_context.h:
1585 * UIProcess/API/efl/ewk_context_private.h:
1586 (EwkContext::extensionsPath):
1587 * UIProcess/API/efl/tests/InjectedBundle/injected_bundle_sample.cpp: Removed.
1588 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp:
1589 (EWK2UnitTest::EWK2UnitTestEnvironment::extensionSample):
1590 (EWK2UnitTest::EWK2UnitTestEnvironment::injectedBundleSample): Renamed injectedBundleSample to extensionSample.
1591 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h:
1592 * UIProcess/API/efl/tests/extensions/extension_sample.cpp: Copied from Source/WebKit2/UIProcess/API/efl/tests/InjectedBundle/injected_bundle_sample.cpp.
1593 * UIProcess/API/efl/tests/test_ewk2_context.cpp: Renamed ewk_context_new_with_injected_bundle_path to ewk_context_new_with_extensions_path.
1595 * WebProcess/InjectedBundle/API/efl/EWebKit_Extension.h: Added.
1596 * WebProcess/InjectedBundle/API/efl/ewk_extension.cpp: Added.
1597 (EwkExtension::append):
1598 (EwkExtension::remove):
1599 (ewk_extension_client_add):
1600 (ewk_extension_client_del):
1601 * WebProcess/InjectedBundle/API/efl/ewk_extension.h: Added.
1602 * WebProcess/InjectedBundle/API/efl/ewk_extension_private.h: Added.
1603 (EwkExtension::EwkExtension):
1604 (EwkExtension::~EwkExtension):
1605 * WebProcess/efl/ExtensionManagerEfl.cpp: Added.
1606 (WebKit::ExtensionManagerEfl::shared):
1607 (WebKit::ExtensionManagerEfl::ExtensionManagerEfl):
1608 (WebKit::ExtensionManagerEfl::initialize):
1609 * WebProcess/efl/ExtensionManagerEfl.h: Added.
1610 * WebProcess/efl/WebInjectedBundleMainEfl.cpp: Added.
1611 (WKBundleInitialize):
1612 * efl/ewebkit2-extension.pc.in: Added.
1614 2014-10-10 Chris Dumez <cdumez@apple.com>
1616 Use is<>() / downcast<>() for Image subclasses
1617 https://bugs.webkit.org/show_bug.cgi?id=137625
1619 Reviewed by Andreas Kling.
1621 Use is<>() / downcast<>() for Image subclasses.
1623 * WebProcess/Plugins/PluginView.cpp:
1624 (WebKit::PluginView::pluginSnapshotTimerFired):
1626 2014-10-10 Chris Dumez <cdumez@apple.com>
1628 Use is<>() / downcast<>() for GraphicsLayer subclasses
1629 https://bugs.webkit.org/show_bug.cgi?id=137595
1631 Reviewed by Darin Adler.
1633 Use is<>() / downcast<>() for GraphicsLayer subclasses and clean up the
1636 * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
1637 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1638 (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
1639 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1640 (WebKit::TiledCoreAnimationDrawingArea::layerForTransientZoom):
1641 (WebKit::TiledCoreAnimationDrawingArea::shadowLayerForTransientZoom):
1643 2014-10-10 Pascal Jacquemart <p.jacquemart@samsung.com>
1645 Fix debug build on EFL after r174584
1646 https://bugs.webkit.org/show_bug.cgi?id=137613
1648 Reviewed by Christophe Dumez.
1650 * UIProcess/efl/RequestManagerClientEfl.cpp:
1651 (WebKit::RequestManagerClientEfl::RequestManagerClientEfl):
1653 2014-10-10 Chris Dumez <cdumez@apple.com>
1655 Use is<>() / downcast<>() for RenderBoxModelObject
1656 https://bugs.webkit.org/show_bug.cgi?id=137587
1658 Reviewed by Mihnea Ovidenie.
1660 Use is<>() / downcast<>() for RenderBoxModelObject and clean up the
1663 * WebProcess/Plugins/PluginView.cpp:
1664 (WebKit::PluginView::renderer):
1665 (WebKit::PluginView::invalidateRect):
1667 2014-10-10 Pascal Jacquemart <p.jacquemart@samsung.com>
1669 [SOUP] Remove custom URI schemes implementation
1670 https://bugs.webkit.org/show_bug.cgi?id=128169
1672 Reviewed by Carlos Garcia Campos.
1674 * Shared/WebProcessCreationParameters.cpp:
1675 (WebKit::WebProcessCreationParameters::encode):
1676 (WebKit::WebProcessCreationParameters::decode):
1677 * Shared/WebProcessCreationParameters.h:
1678 * UIProcess/API/C/soup/WKAPICastSoup.h:
1679 * UIProcess/API/C/soup/WKContextSoup.cpp: Removed.
1680 * UIProcess/API/C/soup/WKSoupRequestManager.cpp: Removed.
1681 * UIProcess/WebContext.cpp:
1682 (WebKit::WebContext::WebContext):
1683 * UIProcess/WebPageProxy.cpp:
1684 (WebKit::WebPageProxy::didReceiveURIRequest): Deleted.
1685 * UIProcess/WebPageProxy.h:
1686 * UIProcess/WebPageProxy.messages.in:
1687 * UIProcess/soup/WebSoupRequestManagerClient.cpp: Removed.
1688 * UIProcess/soup/WebSoupRequestManagerProxy.cpp: Removed.
1689 * UIProcess/soup/WebSoupRequestManagerProxy.messages.in: Removed.
1690 * WebProcess/WebProcess.cpp:
1691 (WebKit::WebProcess::WebProcess):
1692 * WebProcess/soup/WebKitSoupRequestGeneric.cpp:
1693 (webkitSoupRequestGenericSendAsync):
1694 (webkitSoupRequestGenericSendFinish):
1695 * WebProcess/soup/WebProcessSoup.cpp:
1696 (WebKit::WebProcess::platformInitializeWebProcess):
1697 * WebProcess/soup/WebSoupRequestManager.cpp: Removed.
1698 * WebProcess/soup/WebSoupRequestManager.messages.in: Removed.
1700 2014-10-09 Dean Jackson <dino@apple.com>
1702 Remove ENABLE_CSS3_CONDITIONAL_RULES
1703 https://bugs.webkit.org/show_bug.cgi?id=137571
1705 Reviewed by Simon Fraser.
1707 * Configurations/FeatureDefines.xcconfig:
1709 2014-10-09 Tim Horton <timothy_horton@apple.com>
1711 Move ServicesOverlayController to WebCore
1712 https://bugs.webkit.org/show_bug.cgi?id=137416
1713 <rdar://problem/18546283>
1715 Reviewed by Anders Carlsson.
1717 * Platform/Logging.h:
1718 Move Services logging channel to WebCore.
1720 * WebKit2.xcodeproj/project.pbxproj:
1721 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1722 (WebKit::WebChromeClient::handleTelephoneNumberClick):
1723 (WebKit::WebChromeClient::handleSelectionServiceClick):
1724 (WebKit::WebChromeClient::hasRelevantSelectionServices):
1725 Implement services-related ChromeClient callbacks.
1726 Clicks are forwarded to WebPageMac where they do what they used to;
1727 hasRelevantSelectionServices is implemented as it was when it lived
1728 inside ServicesOverlayController.
1730 * WebProcess/WebCoreSupport/WebChromeClient.h:
1731 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1732 (WebKit::WebEditorClient::selectedTelephoneNumberRangesChanged): Deleted.
1733 (WebKit::WebEditorClient::selectionRectsDidChange): Deleted.
1734 * WebProcess/WebCoreSupport/WebEditorClient.h:
1735 Remove WebEditorClient overrides for now-removed functions.
1737 * WebProcess/WebPage/WebPage.cpp:
1738 (WebKit::WebPage::WebPage):
1739 (WebKit::WebPage::updatePreferences):
1740 Forward serviceControlsEnabled setting to WebCore.
1742 (WebKit::WebPage::servicesOverlayController): Deleted.
1743 * WebProcess/WebPage/WebPage.h:
1744 (WebKit::WebPage::serviceControlsEnabled): Deleted.
1746 2014-10-09 Andy Estes <aestes@apple.com>
1748 [iOS] Crash in CFURLDownloadClient.didFail if the download has a null resumeData
1749 https://bugs.webkit.org/show_bug.cgi?id=137551
1751 Reviewed by David Kilzer.
1753 CFDataGetBytePtr() and CFDataGetLength() crash if passed a null value.
1755 * Shared/Downloads/ios/DownloadIOS.mm:
1756 (WebKit::setUpDownloadClient):
1758 2014-10-09 Carlos Garcia Campos <cgarcia@igalia.com>
1760 [X11] Plugin process crashes in NetscapePlugin::platformPostInitialize()
1761 https://bugs.webkit.org/show_bug.cgi?id=137426
1763 Reviewed by Darin Adler.
1765 For some reason flash crashes when NPP_GetValue is called with
1766 NPPVpluginCancelSrcStream, but only in windowed mode. Not calling
1767 NPP_GetValue and unconditionally loading the source URL in the
1768 browser fixes the crash and plugins work normally. We can handle
1769 this particular case with a new quirk.
1771 * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
1772 (WebKit::NetscapePluginModule::determineQuirks): Add
1773 DoNotCancelSrcStreamInWindowedMode quirk if it's flash plugin.
1774 * Shared/Plugins/PluginQuirks.h: Add
1775 DoNotCancelSrcStreamInWindowedMode quirk.
1776 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1777 (WebKit::NetscapePlugin::shouldLoadSrcURL): Return early if plugin
1778 is windowed and DoNotCancelSrcStreamInWindowedMode quirk is present.
1780 2014-10-09 Chris Dumez <cdumez@apple.com>
1782 Use is<>() / downcast<>() for Widget subclasses
1783 https://bugs.webkit.org/show_bug.cgi?id=137549
1785 Reviewed by Darin Adler.
1787 Use is<>() / downcast<>() for Widget subclasses and clean up the
1790 * Shared/WebRenderObject.cpp:
1791 (WebKit::WebRenderObject::WebRenderObject):
1793 2014-10-08 Carlos Garcia Campos <cgarcia@igalia.com>
1795 [GTK] Use the PageLoadState observer also to monitor title and estimated load progress
1796 https://bugs.webkit.org/show_bug.cgi?id=136997
1798 Reviewed by Gustavo Noronha Silva.
1800 * UIProcess/API/gtk/WebKitLoaderClient.cpp:
1801 (attachLoaderClientToView): Remove implementation of
1802 didReceiveTitleForFrame, didStartProgress, didChangeProgress and
1804 (didReceiveTitleForFrame): Deleted.
1805 (didChangeProgress): Deleted.
1806 * UIProcess/API/gtk/WebKitWebView.cpp:
1807 (webkit_web_view_get_estimated_load_progress): Return the value
1808 directly from the PageLoadState object, since we don't need to
1809 cache the value anymore.
1810 (webkitWebViewSetTitle): Deleted.
1811 (webkitWebViewSetEstimatedLoadProgress): Deleted.
1812 * UIProcess/API/gtk/WebKitWebViewPrivate.h:
1814 2014-10-08 Carlos Garcia Campos <cgarcia@igalia.com>
1816 Race condition with WebKitWebView:is-loading after starting page load
1817 https://bugs.webkit.org/show_bug.cgi?id=136692
1819 Reviewed by Gustavo Noronha Silva.
1821 Use PageLoadState::Observer to update both is-loading and uri
1822 properties, instead of manually update them. This ensures that our
1823 web view is always in sync with the WebPageProxy so that
1824 webkit_web_view_is_loading() returns true right after requesting
1825 any load. We still need to manually set the is-loading property
1826 only in the case where we delay the emission of the load-changed
1827 signals when waiting for the main resource. The bahaviour is a bit
1828 different but still consistent with what our API documentation says.
1830 * UIProcess/API/gtk/WebKitLoaderClient.cpp:
1831 (attachLoaderClientToView): Remove
1832 didSameDocumentNavigationForFrame implementation, since we are
1833 already notified about the URL change by the PageLoadState::Observer.
1834 (didSameDocumentNavigationForFrame): Deleted.
1835 * UIProcess/API/gtk/WebKitWebView.cpp:
1836 (webkitWebViewSetIsLoading): No longer update the URI when
1837 changing the is-loading property.
1838 (webkitWebViewConstructed): Crate a PageLoadStateObserver and add
1839 it to the PageLoadState.
1840 (webkitWebViewDispose): Remove the PageLoadStateObserver from the PageLoadState.
1841 (webkitWebViewEmitLoadChanged): Add isDelayedEvent parameter to
1842 update the is-loading property accordingly when emitting the
1844 (webkitWebViewEmitDelayedLoadEvents): Pass true as isDelayedEvent
1845 parameter of webkitWebViewEmitLoadChanged().
1846 (webkitWebViewLoadChanged): Pass false as isDelayedEvent parameter
1847 of webkitWebViewEmitLoadChanged().
1848 (webkitWebViewLoadFailed):
1849 (webkitWebViewLoadFailedWithTLSErrors):
1850 (webkitWebViewUpdateURI): Deleted.
1851 * UIProcess/API/gtk/WebKitWebViewPrivate.h:
1853 2014-10-08 Christophe Dumez <cdumez@apple.com>
1855 Use is<>() / downcast<>() for RenderBlock objects
1856 https://bugs.webkit.org/show_bug.cgi?id=137512
1858 Reviewed by Darin Adler.
1860 Use is<>() / downcast<>() for RenderBlock objects and clean up the
1863 * WebProcess/WebPage/ios/WebPageIOS.mm:
1864 (WebKit::WebPage::rangeForWebSelectionAtPosition):
1865 (WebKit::WebPage::contractedRangeFromHandle):
1867 2014-10-08 Ada Chan <adachan@apple.com>
1869 Implement WKPageIsPlayingAudio().
1870 https://bugs.webkit.org/show_bug.cgi?id=137048
1872 Reviewed by Darin Adler.
1874 * UIProcess/API/C/WKPage.cpp:
1875 (WKPageIsPlayingAudio):
1877 2014-10-08 Gyuyoung Kim <gyuyoung.kim@samsung.com>
1879 [EFL][CoordinatedGraphics] All EFL layout tests are broken since r174231
1880 https://bugs.webkit.org/show_bug.cgi?id=137443
1882 Reviewed by Zoltan Herczeg.
1884 EFL layout test and MiniBrowser have broken since r174231. r174231 was to move PageOverlay implementation
1885 from WebKit2 to WebCore with lazy initializing of PageOverlayController. It caused all EFL layout tests
1886 crash and build break. To restore EFL layout test, this patch sets viewOverlayRootLayer through
1887 attachViewOverlayGraphicsLayer() as mac port's one in r174231.
1889 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
1890 (WebKit::CoordinatedDrawingArea::attachViewOverlayGraphicsLayer):
1891 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
1892 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1893 (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
1894 (WebKit::CoordinatedLayerTreeHost::updateRootLayers):
1895 (WebKit::CoordinatedLayerTreeHost::setViewOverlayRootLayer):
1896 (WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer):
1897 (WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
1898 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
1900 2014-10-08 Commit Queue <commit-queue@webkit.org>
1902 Unreviewed, rolling out r174335.
1903 https://bugs.webkit.org/show_bug.cgi?id=137515
1905 It broke EFL layout test totally (Requested by gyuyoung on
1910 "[EFL] Introduce EWebKit_Extension"
1911 https://bugs.webkit.org/show_bug.cgi?id=134921
1912 http://trac.webkit.org/changeset/174335
1914 2014-10-08 Carlos Garcia Campos <cgarcia@igalia.com>
1916 [GTK] Make forwarding headers generation depend on source code
1917 https://bugs.webkit.org/show_bug.cgi?id=137394
1919 Reviewed by Philippe Normand.
1921 Only run generate-forwarding-headers.pl when source code changes
1922 and use a different target for the symlinks.
1924 * PlatformGTK.cmake:
1926 2014-10-07 Pascal Jacquemart <p.jacquemart@samsung.com>
1928 [EFL] Enable custom URI schemes with CustomProtocols
1929 https://bugs.webkit.org/show_bug.cgi?id=128177
1931 Reviewed by Gyuyoung Kim.
1933 Fixing ewk_context_url_scheme_register() ewebkit2 API
1934 rely on r162449 - CustomProtocols implementation from Carlos Garcia Campos
1936 * PlatformEfl.cmake:
1937 * UIProcess/API/efl/ewk_context.h:
1938 * UIProcess/API/efl/ewk_url_scheme_request.cpp:
1939 (EwkUrlSchemeRequest::EwkUrlSchemeRequest):
1940 (EwkUrlSchemeRequest::finish):
1941 * UIProcess/API/efl/ewk_url_scheme_request_private.h:
1942 (EwkUrlSchemeRequest::create):
1943 * UIProcess/API/efl/tests/test_ewk2_context.cpp:
1945 * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp:
1946 * UIProcess/efl/RequestManagerClientEfl.cpp:
1947 (WebKit::RequestManagerClientEfl::RequestManagerClientEfl):
1948 (WebKit::RequestManagerClientEfl::startLoading):
1949 (WebKit::RequestManagerClientEfl::stopLoading):
1950 (WebKit::RequestManagerClientEfl::registerURLSchemeHandler):
1951 (WebKit::EwkUrlSchemeHandler::EwkUrlSchemeHandler): Deleted.
1952 (WebKit::RequestManagerClientEfl::didReceiveURIRequest): Deleted.
1953 * UIProcess/efl/RequestManagerClientEfl.h:
1954 * UIProcess/efl/WebContextEfl.cpp:
1955 (WebKit::WebContext::platformInitializeWebProcess):
1956 * UIProcess/soup/WebContextSoup.cpp:
1957 (WebKit::WebContext::platformInitializeNetworkProcess):
1959 2014-10-07 Sungmann Cho <sungmann.cho@navercorp.com>
1961 Remove WKPageCreateSnapshotOfVisibleContent API.
1962 https://bugs.webkit.org/show_bug.cgi?id=66979
1964 Reviewed by Darin Adler.
1966 After the landing of the first patch of webkit.org/b/66979,
1967 WKPageCreateSnapshotOfVisibleContent API has been neglected for years.
1968 Currently, this is not used anywhere and does not break the nightlies.
1969 So we can remove this.
1971 * UIProcess/API/C/WKPage.cpp:
1972 (WKPageCreateSnapshotOfVisibleContent): Deleted.
1973 * UIProcess/API/C/WKPagePrivate.h:
1975 2014-10-07 Sungmann Cho <sungmann.cho@navercorp.com>
1977 Remove WKPageSetInvalidMessageFunction.
1978 https://bugs.webkit.org/show_bug.cgi?id=137509
1980 Reviewed by Benjamin Poulain.
1982 According to the FIXME comment in WKPageSetInvalidMessageFunction,
1983 we can remove this function when doing so won't break the nightlies.
1984 Currently, this is not used anywhere and does not break the nightlies.
1985 So we can remove this.
1987 * UIProcess/API/C/WKPage.cpp:
1988 (WKPageSetInvalidMessageFunction): Deleted.
1989 * UIProcess/API/C/WKPagePrivate.h:
1991 2014-10-07 Christophe Dumez <cdumez@apple.com>
1993 [WK2] Use is<>() / downcast<>() for DrawingArea subclasses
1994 https://bugs.webkit.org/show_bug.cgi?id=137497
1996 Reviewed by Benjamin Poulain.
1998 Use is<>() / downcast<>() for DrawingArea subclasses.
2000 * WebProcess/WebPage/DrawingArea.h:
2001 * WebProcess/WebPage/WebPage.cpp:
2002 (WebKit::WebPage::didCommitLoad):
2003 * WebProcess/WebPage/ios/WebPageIOS.mm:
2004 (WebKit::WebPage::synchronizeDynamicViewportUpdate):
2005 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2006 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2008 2014-10-07 Simon Fraser <simon.fraser@apple.com>
2010 Roll-over Changelogs.
2012 * ChangeLog-2014-10-07: Copied from Source/WebKit2/ChangeLog.
2014 == Rolled over to ChangeLog-2014-10-07 ==