1 2014-03-20 Anders Carlsson <andersca@apple.com>
3 Make WKProcessPoolConfiguration SPI
4 https://bugs.webkit.org/show_bug.cgi?id=130537
6 Reviewed by Tim Horton.
8 * UIProcess/API/Cocoa/WKProcessPool.h:
9 * UIProcess/API/Cocoa/WKProcessPool.mm:
10 (-[WKProcessPool init]):
11 (-[WKProcessPool dealloc]):
12 (-[WKProcessPool description]):
13 (-[WKProcessPool _configuration]):
14 (-[WKProcessPool API::]):
15 (-[WKProcessPool _initWithConfiguration:]):
16 * UIProcess/API/Cocoa/WKProcessPoolConfiguration.h:
17 * UIProcess/API/Cocoa/WKProcessPoolConfiguration.mm:
18 (-[WKProcessPoolConfiguration _injectedBundleURL]):
19 (-[WKProcessPoolConfiguration _setInjectedBundleURL:]):
20 * UIProcess/API/Cocoa/WKProcessPoolConfigurationPrivate.h:
21 * UIProcess/API/Cocoa/WKProcessPoolInternal.h:
22 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
23 * UIProcess/API/Cocoa/WKProcessPoolToBeRemoved.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h.
24 (-[WKProcessPool initWithConfiguration:]):
25 (-[WKProcessPool configuration]):
26 * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolConfigurationPrivate.h.
27 * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolConfiguration.mm.
28 (-[_WKProcessPoolConfiguration injectedBundleURL]):
29 (-[_WKProcessPoolConfiguration setInjectedBundleURL:]):
30 (-[_WKProcessPoolConfiguration description]):
31 (-[_WKProcessPoolConfiguration copyWithZone:]):
32 * WebKit2.xcodeproj/project.pbxproj:
34 2014-03-20 Tim Horton <timothy_horton@apple.com>
36 Add WebCore::IOSurface wrapper
37 https://bugs.webkit.org/show_bug.cgi?id=130529
39 Reviewed by Simon Fraser.
41 * Shared/mac/RemoteLayerBackingStore.h:
42 * Shared/mac/RemoteLayerBackingStore.mm:
43 (RemoteLayerBackingStore::encode):
44 (RemoteLayerBackingStore::decode):
45 (RemoteLayerBackingStore::display):
46 (RemoteLayerBackingStore::applyBackingStoreToLayer):
47 * UIProcess/ios/ViewGestureControllerIOS.mm:
48 (WebKit::ViewGestureController::beginSwipeGesture):
49 (WebKit::ViewGestureController::removeSwipeSnapshot):
50 * UIProcess/mac/ViewGestureController.h:
51 * UIProcess/mac/ViewGestureControllerMac.mm:
52 (WebKit::ViewGestureController::beginSwipeGesture):
53 (WebKit::ViewGestureController::removeSwipeSnapshot):
54 * UIProcess/mac/ViewSnapshotStore.h:
55 * UIProcess/mac/ViewSnapshotStore.mm:
56 (WebKit::createIOSurfaceFromImage):
57 (WebKit::ViewSnapshotStore::recordSnapshot):
58 Adopt WebCore::IOSurface.
60 2014-03-20 Alexey Proskuryakov <ap@apple.com>
62 Update iOS input method code to use new cross-platform async functions
63 https://bugs.webkit.org/show_bug.cgi?id=130530
65 Reviewed by Enrica Casucci.
67 Merge identical iOS and cross-platform functions.
69 Also tightened up ifdefs, and removed stub iOS implementations of sync methods,
70 which hopefully won't be ever needed. The only tricky case is sync cancelComposition,
71 will I'll investigate separately.
73 * UIProcess/WebPageProxy.h:
74 * UIProcess/ios/WKContentViewInteraction.mm:
75 (-[WKContentView setMarkedText:selectedRange:]):
76 (-[WKContentView unmarkText]):
77 (-[WKContentView insertText:]):
78 * UIProcess/ios/WebPageProxyIOS.mm:
79 (WebKit::WebPageProxy::cancelComposition):
80 * UIProcess/mac/WebPageProxyMac.mm:
81 (WebKit::WebPageProxy::cancelComposition):
82 (WebKit::WebPageProxy::insertDictatedTextAsync):
83 (WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):
84 (WebKit::WebPageProxy::attributedStringForCharacterRangeCallback):
85 * WebProcess/WebPage/WebPage.h:
86 * WebProcess/WebPage/WebPage.messages.in:
87 * WebProcess/WebPage/ios/WebPageIOS.mm:
88 * WebProcess/WebPage/mac/WebPageMac.mm:
89 (WebKit::WebPage::cancelComposition):
90 (WebKit::WebPage::insertDictatedTextAsync):
91 (WebKit::WebPage::attributedSubstringForCharacterRangeAsync):
93 2014-03-20 Alexey Proskuryakov <ap@apple.com>
95 ASSERTION FAILED: event == [NSApp currentEvent] hitting Command-+
96 https://bugs.webkit.org/show_bug.cgi?id=130526
97 <rdar://problem/16371612>
99 Reviewed by Anders Carlsson.
101 * UIProcess/API/mac/WKView.mm: (-[WKView performKeyEquivalent:]): Cut custom
102 processing short whenever we are redispatching an event, not just when the event
103 we are handling is the one being redispatched. There shouldn't be any other unrelated
104 events here, just the one being redispatched and synthetic ones generated from it by AppKit.
106 2014-03-20 Anders Carlsson <andersca@apple.com>
110 Rename WKPreferencesPrivate.h to WKPreferencesRefPrivate.h.
112 * UIProcess/API/C/WKPreferencesRefPrivate.h: Renamed from Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h.
113 * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
114 * WebKit2.xcodeproj/project.pbxproj:
116 2014-03-20 Gavin Barraclough <barraclough@apple.com>
118 Merge AtomicString, Identifier
119 https://bugs.webkit.org/show_bug.cgi?id=128624
121 Unreviewed build fix following r165982.
123 * WebProcess/Plugins/Netscape/NPJSObject.cpp:
126 2014-03-20 Sam Weinig <sam@webkit.org>
128 [WebKit2] Implement NetworkingContext::sourceApplicationAuditData() for WebKit2
129 https://bugs.webkit.org/show_bug.cgi?id=130528
131 Reviewed by Anders Carlsson.
133 * Platform/IPC/Connection.h:
134 * Platform/IPC/mac/ConnectionMac.cpp:
135 (IPC::Connection::getAuditToken):
136 Expose the audit data if available.
138 * NetworkProcess/mac/RemoteNetworkingContext.mm:
139 (WebKit::RemoteNetworkingContext::sourceApplicationAuditData):
140 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
141 (WebKit::WebFrameNetworkingContext::sourceApplicationAuditData):
142 Pass the audit data corresponding to the UIProcess.
144 2014-03-20 Sam Weinig <sam@webkit.org>
146 [Cocoa] Expose preference to enable telephone number detection
147 https://bugs.webkit.org/show_bug.cgi?id=130524
149 Reviewed by Anders Carlsson.
151 * UIProcess/API/Cocoa/WKPreferences.mm:
152 (-[WKPreferences _telephoneNumberDetectionIsEnabled]):
153 (-[WKPreferences _setTelephoneNumberDetectionIsEnabled:]):
154 * UIProcess/API/Cocoa/WKPreferencesInternal.h:
155 * UIProcess/API/Cocoa/WKPreferencesPrivate.h: Added.
156 * WebKit2.xcodeproj/project.pbxproj:
158 2014-03-19 Alexey Proskuryakov <ap@apple.com>
160 [Mac] Support asynchronous NSTextInputClient
161 https://bugs.webkit.org/show_bug.cgi?id=130479
163 Reviewed by Anders Carlsson.
165 The implementation is currently disabled, pending lower level support.
166 Most of the code is not under compile time guard however, to facilitate cross-platform
167 reuse, or at least under a PLATFORM(COCOA) guard to share the code with iOS.
169 * UIProcess/API/mac/WKView.mm: Added a compile time branch for USE(ASYNC_NSTEXTINPUTCLIENT).
170 We still implement sync NSTextInputClient here, in order to get assertions when
171 its methods are unexpectedly called.
172 The new code first sends an event to input method asynchronously, handling any callbacks
173 that may arrive. During this time, we no longer care about WKViewInterpretKeyEventsParameters
174 at all. Once done, we interpret key bindings synchronously, collecting them into
177 * UIProcess/API/mac/WKViewInternal.h: We no longer expose _interpretKeyEvent outside
180 * UIProcess/WebPageProxy.cpp:
181 * UIProcess/WebPageProxy.h:
182 Added async calls and callbacks. Removed unnecessary and slightly harmful .get() when moving
183 a callback pointer into map. Moved insertDictatedText() and getAttributedSubstringFromRange()
184 from PLATFORM(COCOA) to PLATFORM(MAC), because they are unused and unimplemented on
185 iOS, and unlikely to be needed any time soon. Changed USE(APPKIT) to PLATFORM(MAC),
186 because that's more accurate in this case (nothing depends on AppKit, it's just code
187 that we only need on Mac).
189 * UIProcess/WebPageProxy.messages.in: Added messages for new async IM responses.
191 * UIProcess/ios/WebPageProxyIOS.mm: Removed insertDictatedText() and getAttributedSubstringFromRange().
193 * UIProcess/mac/WebPageProxyMac.mm:
194 (WebKit::WebPageProxy::insertDictatedTextAsync):
195 (WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):
196 (WebKit::WebPageProxy::attributedStringForCharacterRangeCallback):
197 Added async calls and callbacks that are Mac only.
199 * WebProcess/WebPage/WebPage.cpp:
200 * WebProcess/WebPage/WebPage.h:
201 * WebProcess/WebPage/mac/WebPageMac.mm:
202 Added async implementations (which are essentially the same as sync ones, sadly).
204 * WebProcess/WebPage/WebPage.messages.in: Added async messages, moved some messages
207 * WebProcess/WebPage/ios/WebPageIOS.mm: More of deleting functions that are Mac only,
208 and cannot be easily implemented in WebPage.cpp with shared code.
210 2014-03-20 Martin Robinson <mrobinson@igalia.com>
212 Remove remaining GTK+ unused parameter warnings from WebKit2
213 https://bugs.webkit.org/show_bug.cgi?id=130518
215 Reviewed by Sergio Villar Senin.
217 Fix almost all unused parameter warnings in the WebKit2GTK+ build.
219 2014-03-20 Commit Queue <commit-queue@webkit.org>
221 Unreviewed, rolling out r165962.
222 https://bugs.webkit.org/show_bug.cgi?id=130512
224 It broke the build (Requested by Ossy on #webkit).
228 "[EFL][GTK] Get CMake to find Freetype2 properly"
229 https://bugs.webkit.org/show_bug.cgi?id=130150
230 http://trac.webkit.org/changeset/165962
232 2014-03-20 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
234 [EFL][GTK] Get CMake to find Freetype2 properly
235 https://bugs.webkit.org/show_bug.cgi?id=130150
237 Reviewed by Csaba Osztrogonác.
239 Newer versions of CMake are not able to find Freetype2 correctly.
240 FindFreetype2.cmake checks for the version number in freetype.h header, since it seems that bug exists in
241 freetype2 repo, because a completely different version number is found in freetype2.pc.
245 2014-03-20 Ryuan Choi <ryuan.choi@samsung.com>
247 [EFL][WK2] test_ewk2_application_cache_manager is flaky
248 https://bugs.webkit.org/show_bug.cgi?id=130501
250 Reviewed by Gyuyoung Kim.
252 * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
253 (timerCallback): Return ECORE_CALLBACK_CANCEL to clear the timer.
255 2014-03-19 Tim Horton <timothy_horton@apple.com>
257 Address late review comment and style nit after r165934.
259 * UIProcess/ios/ViewGestureControllerIOS.mm:
260 (WebKit::ViewGestureController::beginSwipeGesture):
262 2014-03-19 Tim Horton <timothy_horton@apple.com>
264 [iOS][WebKit2] Back-forward swipe doesn't always complete with fingers down
265 https://bugs.webkit.org/show_bug.cgi?id=130489
266 <rdar://problem/16027007>
268 Reviewed by Simon Fraser.
270 * UIProcess/ios/ViewGestureControllerIOS.mm:
271 (WebKit::ViewGestureController::beginSwipeGesture):
272 In order to have fingers-down swipe completion work correctly, we need
273 to give UIKit an empty interactive update block.
275 2014-03-19 Anders Carlsson <andersca@apple.com>
277 Get rid of two IPC::Connection functions by folding them into lambdas
278 https://bugs.webkit.org/show_bug.cgi?id=130482
280 Reviewed by Tim Horton.
282 * Platform/IPC/Connection.cpp:
283 (IPC::Connection::addWorkQueueMessageReceiver):
284 (IPC::Connection::removeWorkQueueMessageReceiver):
285 * Platform/IPC/Connection.h:
287 2014-03-19 Simon Fraser <simon.fraser@apple.com>
289 Expose text and page zoom in WK2 SPI, and hook them up in MiniBrowser
290 https://bugs.webkit.org/show_bug.cgi?id=130476
292 Reviewed by Anders Carlsson.
294 Expose page and text zoom as SPI.
296 * UIProcess/API/Cocoa/WKWebView.mm:
297 (-[WKWebView _supportsTextZoom]):
298 (-[WKWebView _textZoomFactor]):
299 (-[WKWebView _setTextZoomFactor:]):
300 (-[WKWebView _pageZoomFactor]):
301 (-[WKWebView _setPageZoomFactor:]):
302 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
304 2014-03-19 Benjamin Poulain <bpoulain@apple.com>
306 [iOS][WK2] Reduce the extended background's opacity when WKContentView is smaller than its WKWebView
307 https://bugs.webkit.org/show_bug.cgi?id=130436
309 Reviewed by Beth Dakin.
311 * UIProcess/API/Cocoa/WKWebView.mm:
312 (-[WKWebView _updateScrollViewBackground]):
314 2014-03-19 Benjamin Poulain <bpoulain@apple.com>
316 [iOS][WebKit2] <rdar://problem/16330387> Do not use the keyboard rect for computing the general unobscuredRect, only use it for centering
317 https://bugs.webkit.org/show_bug.cgi?id=130382
319 Reviewed by Simon Fraser.
321 Always accumulating the keyboard rect out of the exposedRect caused some issues (see <rdar://problem/16330387>).
322 This patch split the rect in two: unobscured rect for WebCore, and unobscuredContentRectIncludingKeyboard for centering
325 * UIProcess/API/Cocoa/WKWebView.mm:
326 (-[WKWebView _zoomToRect:WebCore::atScale:origin:WebCore::]):
327 (-[WKWebView _scrollToRect:WebCore::origin:WebCore::minimumScrollDistance:]):
328 (-[WKWebView _zoomToRect:WebCore::withOrigin:WebCore::fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]):
329 (-[WKWebView _contentRectForUserInteraction]):
330 (-[WKWebView _updateVisibleContentRects]):
332 2014-03-19 Anders Carlsson <andersca@apple.com>
334 Get rid of WKProcessClass
335 https://bugs.webkit.org/show_bug.cgi?id=130478
337 Reviewed by Dan Bernstein.
339 * UIProcess/API/Cocoa/WKProcessClass.h: Removed.
340 * UIProcess/API/Cocoa/WKProcessClass.mm: Removed.
341 * UIProcess/API/Cocoa/WKProcessClassConfiguration.h: Removed.
342 * UIProcess/API/Cocoa/WKProcessClassConfiguration.mm: Removed.
343 * UIProcess/API/Cocoa/WKProcessClassConfigurationPrivate.h: Removed.
344 * UIProcess/API/Cocoa/WKProcessClassPrivate.h: Removed.
345 * UIProcess/API/Cocoa/WKWebViewConfigurationToBeRemoved.mm: Removed.
346 * WebKit2.xcodeproj/project.pbxproj:
348 2014-03-19 Jer Noble <jer.noble@apple.com>
350 [Mac][EME] Query whether decoder support exists before creating a new MediaKeys object.
351 https://bugs.webkit.org/show_bug.cgi?id=130459
353 Reviewed by Eric Carlson.
355 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
356 (InitWebCoreSystemInterface): Initialize the new WCSI method.
358 2014-03-19 Brady Eidson <beidson@apple.com>
360 Filter out editable services from image menu for non-contenteditable images
361 <rdar://problem/16319645> and https://bugs.webkit.org/show_bug.cgi?id=130437
363 Reviewed by Tim Horton.
365 * UIProcess/mac/WebContextMenuProxyMac.h:
366 * UIProcess/mac/WebContextMenuProxyMac.mm:
367 (-[WKSharingServicePickerDelegate setIncludeEditorServices:]):
368 (-[WKSharingServicePickerDelegate sharingServicePicker:sharingServicesForItems:mask:proposedSharingServices:]):
369 Filter out editing services based on the includeEditorServices flag.
370 (WebKit::WebContextMenuProxyMac::setupImageServicesMenu):
371 (WebKit::WebContextMenuProxyMac::populate):
373 2014-03-19 Yongjun Zhang <yongjun_zhang@apple.com>
375 [iOS] WebKit2 Quicklook.
376 https://bugs.webkit.org/show_bug.cgi?id=130360
378 For WebKit2 resource loads, if we detect a quicklook content that QLConverter is able to
379 convert, handle the response data to QLConverter and use its delegate WKWebResourceQuickLookDelegate
380 to rounte the converted results (HTML) back into WebCore. Thie similiar logic has been in place
383 Reviewed by Tim Horton.
385 * WebKit2.xcodeproj/project.pbxproj: Add WebResourceLoaderIOS.mm to the project.
386 * WebProcess/Network/WebResourceLoadScheduler.cpp:
387 * WebProcess/ios/WebResourceLoaderIOS.mm: Added.
388 (-[WKWebResourceQuickLookDelegate initWithWebResourceLoader:WebKit::]): WKWebResourceQuickLookDelegate holds
389 the original WebResourceLoader so that we could send converted result to WebCore.
390 (-[WKWebResourceQuickLookDelegate connection:didReceiveDataArray:]):
391 (-[WKWebResourceQuickLookDelegate connection:didReceiveData:lengthReceived:]):
392 (-[WKWebResourceQuickLookDelegate connectionDidFinishLoading:]):
393 (-[WKWebResourceQuickLookDelegate connection:didFailWithError:]):
394 (-[WKWebResourceQuickLookDelegate clearHandle]):
395 (WebKit::WebResourceLoader::setUpQuickLookHandleIfNeeded):
397 2014-03-19 Tim Horton <timothy_horton@apple.com>
399 WebKit2 View Gestures: Swipe gesture can track vertical movement instead of horizontal movement
400 https://bugs.webkit.org/show_bug.cgi?id=130441
401 <rdar://problem/16337279>
403 Reviewed by Simon Fraser.
405 * UIProcess/mac/ViewGestureControllerMac.mm:
406 (WebKit::scrollEventCanBecomeSwipe):
407 Factor logic that determines if a scroll event can become a swipe
408 out into scrollEventCanBecomeSwipe.
409 Use <= instead of < when comparing the axes, because we don't want
410 to start a swipe on a completely diagonal scroll either (because AppKit
411 can start tracking a vertical swipe in that case).
413 (WebKit::ViewGestureController::handleScrollWheelEvent):
414 (WebKit::ViewGestureController::wheelEventWasNotHandledByWebCore):
415 Make use of scrollEventCanBecomeSwipe.
417 2014-03-18 Anders Carlsson <andersca@apple.com>
419 Add new functionality that will be required by the history item decoding
420 https://bugs.webkit.org/show_bug.cgi?id=130433
422 Reviewed by Sam Weinig.
424 * Shared/cf/KeyedDecoder.cpp:
425 (WebKit::KeyedDecoder::decodeUInt32):
426 (WebKit::KeyedDecoder::decodeInt32):
427 (WebKit::KeyedDecoder::decodeFloat):
428 * Shared/cf/KeyedDecoder.h:
430 2014-03-19 Tim Horton <timothy_horton@apple.com>
432 [iOS] WebPDFViewPlaceholder divides-by-zero with an empty document
433 https://bugs.webkit.org/show_bug.cgi?id=130444
434 <rdar://problem/15580682>
436 Reviewed by Sam Weinig.
438 * UIProcess/ios/WKPDFView.mm:
439 (-[WKPDFView web_setContentProviderData:]):
440 Don't make UIPDFPageViews for null pages.
442 2014-03-18 Tim Horton <timothy_horton@apple.com>
444 [iOS][WebKit2] Provide generic software-snapshotting API
445 https://bugs.webkit.org/show_bug.cgi?id=130385
446 <rdar://problem/16005957>
448 Reviewed by Sam Weinig.
450 * UIProcess/API/Cocoa/WKWebView.mm:
451 (-[WKWebView _didCommitLayerTree:WebKit::]):
452 (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
453 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
454 * UIProcess/API/Cocoa/_WKThumbnailView.mm:
455 (-[_WKThumbnailView initWithFrame:fromWKView:]):
456 (-[_WKThumbnailView _requestSnapshotIfNeeded]):
457 * UIProcess/WebPageProxy.cpp:
458 (WebKit::WebPageProxy::internalShowContextMenu):
459 * UIProcess/WebPageProxy.h:
460 * WebProcess/WebPage/WebPage.cpp:
461 (WebKit::WebPage::takeSnapshot):
462 (WebKit::WebPage::scaledSnapshotWithOptions):
463 (WebKit::WebPage::snapshotAtSize):
464 * WebProcess/WebPage/WebPage.h:
465 * WebProcess/WebPage/WebPage.messages.in:
466 Rename TakeThumbnailSnapshot message to TakeSnapshot.
468 Fill the snapshot image with the FrameView's background color, to avoid
469 half-pixel alpha around the edges.
471 Factor snapshotAtSize out of scaledSnapshotWithOptions.
473 Don't apply both the custom and device scale factor to the base CTM,
474 only the device scale factor. Custom scale factor should only be
475 applied to the user CTM.
477 * Shared/ImageOptions.h:
478 Add a snapshot option, RespectDrawingAreaTransform, that maps
479 the rect through the drawing area's root layer transform.
480 Use this in place of the thumbnail-specific code in TakeThumbnailSnapshot.
481 Add a snapshot option, ExcludeDeviceScaleFactor, which means that
482 snapshotting will not factor the device scale in (useful for drawing
483 to a bitmap at an exact requested size).
485 2014-03-18 Samuel White <samuel_white@apple.com>
487 AX: Not able to use arrow keys to read text with VoiceOver before selection is set someplace (anyplace).
488 https://bugs.webkit.org/show_bug.cgi?id=130250
490 Reviewed by Chris Fleizach.
492 Added ability to toggle enhanced accessibility on and off to support tests that require it.
494 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
495 (WKAccessibilityEnableEnhancedAccessibility):
496 (WKAccessibilityEnhancedAccessibilityEnabled):
497 * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
499 2014-03-18 Ryuan Choi <ryuan.choi@samsung.com>
501 [EFL][WK2] Rename async APIs for better consistency with EFL
502 https://bugs.webkit.org/show_bug.cgi?id=130319
504 Reviewed by Gyuyoung Kim.
506 There are inconsistency with async keyword in several ewebkit2 APIs.
507 This patch rename them to {module/feature}_async_{verb} for better consistency with EFL.
508 In addition, added Async keyword into their callback name.
510 * UIProcess/API/efl/ewk_application_cache_manager.cpp:
511 (EwkApplicationCacheOriginsAsyncData::EwkApplicationCacheOriginsAsyncData):
512 (getApplicationCacheOriginsCallback):
513 (ewk_application_cache_manager_origins_async_get):
514 * UIProcess/API/efl/ewk_application_cache_manager.h:
515 * UIProcess/API/efl/ewk_cookie_manager.cpp:
516 (EwkCookiePolicyAsyncData::EwkCookiePolicyAsyncData):
517 (getAcceptPolicyCallback):
518 (ewk_cookie_manager_accept_policy_async_get):
519 (EwkCookieHostnamesAsyncData::EwkCookieHostnamesAsyncData):
520 (getHostnamesWithCookiesCallback):
521 (ewk_cookie_manager_hostnames_with_cookies_async_get):
522 * UIProcess/API/efl/ewk_cookie_manager.h:
523 * UIProcess/API/efl/ewk_database_manager.cpp:
524 (EwkDatabaseOriginsAsyncData::EwkDatabaseOriginsAsyncData):
525 (getDatabaseOriginsCallback):
526 (ewk_database_manager_origins_async_get):
527 * UIProcess/API/efl/ewk_database_manager.h:
528 * UIProcess/API/efl/ewk_storage_manager.cpp:
529 (EwkStorageOriginsAsyncData::EwkStorageOriginsAsyncData):
530 (getStorageOriginsCallback):
531 (ewk_storage_manager_origins_async_get):
532 * UIProcess/API/efl/ewk_storage_manager.h:
533 * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
535 * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp:
536 (EWK2CookieManagerTest::getAcceptPolicy):
537 (EWK2CookieManagerTest::getHostnamesWithCookies):
538 * UIProcess/API/efl/tests/test_ewk2_database_manager.cpp:
539 (EWK2DatabaseManagerTest::timerCallback):
541 * UIProcess/API/efl/tests/test_ewk2_storage_manager.cpp:
542 (EWK2StorageManagerTest::timerCallback):
545 2014-03-18 Tim Horton <timothy_horton@apple.com>
547 [iOS][WebKit2] Mark layer contents as being opaque if they are
548 https://bugs.webkit.org/show_bug.cgi?id=130427
549 <rdar://problem/15540434>
551 Reviewed by Simon Fraser.
553 * Shared/mac/RemoteLayerBackingStore.h:
554 (WebKit::RemoteLayerBackingStore::isOpaque):
555 * Shared/mac/RemoteLayerBackingStore.mm:
556 (RemoteLayerBackingStore::RemoteLayerBackingStore):
557 (RemoteLayerBackingStore::ensureBackingStore):
558 (RemoteLayerBackingStore::encode):
559 (RemoteLayerBackingStore::decode):
560 (RemoteLayerBackingStore::display):
561 (RemoteLayerBackingStore::applyBackingStoreToLayer):
562 Move the code to set a RemoteLayerBackingStore as a CALayer's contents
563 from RemoteLayerTreePropertyApplier to RemoteLayerBackingStore (mostly
564 as a way to keep the USE(IOSURFACE) #ifs in one place).
565 Remove the surface() getter, because it's no longer needed, and make
566 image() private as it can be now (and rename it to createImageForFrontBuffer
569 Add an isOpaque argument to ensureBackingStore, encode/decode it, and
570 add a getter. If isOpaque is true when applying backing store to the
571 CALayer on the UI process side, set CALayer.contentsOpaque to let CA know.
573 Make opaque bitmaps if not using accelerated drawing. For the IOSurface
574 case, we can't make opaque IOSurfaces, but telling CA that we have filled
575 the whole bitmap still enables similar optimizations.
577 * Shared/mac/RemoteLayerTreePropertyApplier.mm:
578 (WebKit::applyPropertiesToLayer):
579 Reset contentsOpaque if the layer loses its backing store.
581 * Shared/mac/RemoteLayerTreeTransaction.mm:
582 (WebKit::RemoteLayerTreeTextStream::operator<<):
583 (WebKit::dumpChangedLayers):
584 Add a bit more logging about RemoteLayerBackingStore's opaqueness
587 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
588 (PlatformCALayerRemote::updateBackingStore):
589 (PlatformCALayerRemote::setOpaque):
590 Invalidate the RemoteLayerBackingStore if layer opaqueness changes.
592 2014-03-18 Brady Eidson <beidson@apple.com>
594 Make image controls menu work in WK2
595 <rdar://problem/16294412> and https://bugs.webkit.org/show_bug.cgi?id=130424
597 Reviewed by Tim Horton.
599 * Platform/SharedMemory.h:
600 * Platform/mac/SharedMemoryMac.cpp:
601 (WebKit::SharedMemory::Handle::~Handle):
602 (WebKit::SharedMemory::Handle::clear):
604 * Platform/unix/SharedMemoryUnix.cpp:
605 (WebKit::SharedMemory::Handle::~Handle):
606 (WebKit::SharedMemory::Handle::clear):
608 * Shared/ContextMenuContextData.cpp:
609 (WebKit::ContextMenuContextData::ContextMenuContextData):
610 (WebKit::ContextMenuContextData::operator=):
611 (WebKit::ContextMenuContextData::encode):
612 (WebKit::ContextMenuContextData::decode):
613 * Shared/ContextMenuContextData.h:
614 (WebKit::ContextMenuContextData::controlledImageHandle):
616 * Shared/ShareableBitmap.cpp:
617 (WebKit::ShareableBitmap::Handle::clear):
618 * Shared/ShareableBitmap.h:
619 * UIProcess/WebContextMenuProxy.h:
621 * UIProcess/WebPageProxy.cpp:
622 (WebKit::WebPageProxy::internalShowContextMenu):
623 (WebKit::WebPageProxy::replaceControlledImage):
624 * UIProcess/WebPageProxy.h:
626 * UIProcess/efl/WebContextMenuProxyEfl.cpp:
627 (WebKit::WebContextMenuProxyEfl::showContextMenu):
628 * UIProcess/efl/WebContextMenuProxyEfl.h:
630 * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
631 (WebKit::WebContextMenuProxyGtk::showContextMenu):
632 * UIProcess/gtk/WebContextMenuProxyGtk.h:
634 Add a sharing service context menu that lives side-by-side with the normal one:
635 * UIProcess/mac/WebContextMenuProxyMac.h:
636 * UIProcess/mac/WebContextMenuProxyMac.mm:
637 (+[WKSharingServicePickerDelegate sharedSharingServicePickerDelegate]):
638 (-[WKSharingServicePickerDelegate setMenuProxy:WebKit::]):
639 (-[WKSharingServicePickerDelegate setPicker:]):
640 (-[WKSharingServicePickerDelegate sharingServicePicker:delegateForSharingService:]):
641 (-[WKSharingServicePickerDelegate sharingService:willShareItems:]):
642 (-[WKSharingServicePickerDelegate sharingService:didShareItems:]):
643 (-[WKSharingServicePickerDelegate sharingService:sourceFrameOnScreenForShareItem:]):
644 (-[WKSharingServicePickerDelegate sharingService:transitionImageForShareItem:contentRect:]):
645 (-[WKSharingServicePickerDelegate sharingService:sourceWindowForShareItems:sharingContentScope:]):
646 (WebKit::WebContextMenuProxyMac::contextMenuItemSelected):
647 (WebKit::WebContextMenuProxyMac::setupImageServicesMenu):
648 (WebKit::WebContextMenuProxyMac::clearImageServicesMenu):
649 (WebKit::WebContextMenuProxyMac::populate):
650 (WebKit::WebContextMenuProxyMac::showContextMenu):
651 (WebKit::WebContextMenuProxyMac::window):
652 (WebKit::WebContextMenuProxyMac::replaceControlledImage):
654 * WebProcess/WebPage/WebContextMenu.cpp:
655 (WebKit::WebContextMenu::show):
656 (WebKit::WebContextMenu::replaceControlledImage):
657 * WebProcess/WebPage/WebContextMenu.h:
659 Teach the WebProcess how to accept the replaced image.
660 * WebProcess/WebPage/WebPage.cpp:
661 (WebKit::WebPage::replaceControlledImage):
662 * WebProcess/WebPage/WebPage.h:
663 * WebProcess/WebPage/WebPage.messages.in:
665 2014-03-18 Anders Carlsson <andersca@apple.com>
667 Begin cleaning up KeyedDecoder and KeyedEncoder
668 https://bugs.webkit.org/show_bug.cgi?id=130431
670 Reviewed by Tim Horton.
672 * Shared/cf/KeyedDecoder.cpp:
673 (WebKit::KeyedDecoder::KeyedDecoder):
674 If we can't parse the property list data, just add an empty dictionary to the stack.
676 (WebKit::KeyedDecoder::decodeBool):
677 Remove unneeded m_dictionaryStack.last() null check. m_dictionaryStack would either be empty
678 or at least have a root element; it would never have a null element.
680 (WebKit::KeyedDecoder::decodeDouble):
681 Remove the same check as above and remove the CFNumberGetType checks since CFNumberGetValue will
682 do the type conversion for us and return false if it's lossy.
684 (WebKit::KeyedDecoder::decodeInt64):
685 Remove the m_dictionaryStack.last() check.
687 (WebKit::KeyedDecoder::decodeUInt32):
690 (WebKit::KeyedDecoder::decodeString):
693 (WebKit::KeyedDecoder::beginObject):
696 (WebKit::KeyedDecoder::beginArray):
699 (WebKit::KeyedDecoder::beginArrayElement):
702 * Shared/cf/KeyedDecoder.h:
703 Sort functions to be in the same logical order as the base class.
705 * Shared/cf/KeyedEncoder.cpp:
706 (WebKit::KeyedEncoder::finishEncoding):
707 Don't check for a non-null CFErrorRef here (which we incidentally never released on error). Instead,
708 just null check the returned CFDataRef object.
710 2014-03-18 Joseph Pecoraro <pecoraro@apple.com>
712 Unreviewed typo build fix for r165846.
714 * Shared/WebPageCreationParameters.cpp:
715 (WebKit::WebPageCreationParameters::decode):
717 2014-03-18 Joseph Pecoraro <pecoraro@apple.com>
719 WebKit2 SPI to disable remote inspection on a WKWebView / WKPage
720 https://bugs.webkit.org/show_bug.cgi?id=130371
722 Reviewed by Dan Bernstein.
724 * Shared/WebPageCreationParameters.h:
725 * Shared/WebPageCreationParameters.cpp:
726 (WebKit::WebPageCreationParameters::encode):
727 (WebKit::WebPageCreationParameters::decode):
728 Add allowsRemoteInspection bool.
730 * UIProcess/API/C/WKPagePrivate.h:
731 * UIProcess/API/C/WKPage.cpp:
732 (WKPageGetAllowsRemoteInspection):
733 (WKPageSetAllowsRemoteInspection):
734 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
735 * UIProcess/API/Cocoa/WKWebView.mm:
736 (-[WKWebView _allowsRemoteInspection]):
737 (-[WKWebView _setAllowsRemoteInspection:]):
738 Getter and setter for allowing remote inspection state.
740 * UIProcess/WebPageProxy.h:
741 (WebKit::WebPageProxy::allowsRemoteInspection):
742 * UIProcess/WebPageProxy.cpp:
743 (WebKit::WebPageProxy::WebPageProxy):
744 (WebKit::WebPageProxy::setAllowsRemoteInspection):
745 (WebKit::WebPageProxy::creationParameters):
746 Cached allows remote inspection state, with getter and setter.
748 * WebProcess/WebPage/WebPage.h:
749 * WebProcess/WebPage/WebPage.messages.in:
750 * WebProcess/WebPage/WebPage.cpp:
751 (WebKit::WebPage::setAllowsRemoteInspection):
752 When setting, call into WebCore to adjust the Page's setting.
754 2014-03-18 Anders Carlsson <andersca@apple.com>
756 REGRESSION: Visited link coloring seems to be completely broken in tip of tree
757 https://bugs.webkit.org/show_bug.cgi?id=130419
758 <rdar://problem/16337850>
760 Reviewed by Dan Bernstein.
762 Make sure to send any queued up messages before calling connectionWillOpen so we'll ensure
763 FIFO ordering if any messages are sent from within connectionWillOpen.
765 * Shared/ChildProcessProxy.cpp:
766 (WebKit::ChildProcessProxy::didFinishLaunching):
768 2014-03-18 Joseph Pecoraro <pecoraro@apple.com>
770 WebPageCreationParameters colorSpace should be MAC not COCOA
771 https://bugs.webkit.org/show_bug.cgi?id=130414
773 Reviewed by Dan Bernstein.
775 The colorSpace param was only set and used on Mac, not iOS.
777 * Shared/WebPageCreationParameters.h:
778 * Shared/WebPageCreationParameters.cpp:
779 (WebKit::WebPageCreationParameters::encode):
780 (WebKit::WebPageCreationParameters::decode):
782 2014-03-18 Simon Fraser <simon.fraser@apple.com>
784 Dan says that options should be unsigned, and enums should be signed.
786 Reviewed by Dan Bernstein.
788 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
791 2014-03-17 Alexey Proskuryakov <ap@apple.com>
793 [WK2] Pass ranges over IPC in a cross-platform manner
794 https://bugs.webkit.org/show_bug.cgi?id=130376
796 Reviewed by Anders Carlsson.
798 Added an EditingRange class for IPC, which automatically converts to and from
799 NSRanges, knowing the difference between notFound and NSNotFound.
801 Manually applied the same fix to characterIndexForPoint.
803 * Scripts/webkit2/messages.py:
805 * Shared/EditingRange.h: Added.
806 (WebKit::EditingRange::EditingRange):
807 (WebKit::EditingRange::isValid):
808 (WebKit::EditingRange::operator NSRange):
809 * UIProcess/API/mac/WKView.mm:
810 (-[WKView insertText:replacementRange:]):
811 (-[WKView selectedRange]):
812 (-[WKView hasMarkedText]):
813 (-[WKView setMarkedText:selectedRange:replacementRange:]):
814 (-[WKView markedRange]):
815 (-[WKView attributedSubstringForProposedRange:actualRange:]):
816 (-[WKView characterIndexForPoint:]):
817 (-[WKView firstRectForCharacterRange:actualRange:]):
818 * UIProcess/WebPageProxy.h:
819 * UIProcess/ios/WKContentViewInteraction.mm:
820 (-[WKContentView setMarkedText:selectedRange:]):
821 (-[WKContentView insertText:]):
822 * UIProcess/ios/WebPageProxyIOS.mm:
823 (WebKit::WebPageProxy::setComposition):
824 (WebKit::WebPageProxy::insertText):
825 (WebKit::WebPageProxy::insertDictatedText):
826 (WebKit::WebPageProxy::getMarkedRange):
827 (WebKit::WebPageProxy::getSelectedRange):
828 (WebKit::WebPageProxy::getAttributedSubstringFromRange):
829 (WebKit::WebPageProxy::firstRectForCharacterRange):
830 * UIProcess/mac/WebPageProxyMac.mm:
831 (WebKit::WebPageProxy::setComposition):
832 (WebKit::WebPageProxy::insertText):
833 (WebKit::WebPageProxy::insertDictatedText):
834 (WebKit::WebPageProxy::getMarkedRange):
835 (WebKit::WebPageProxy::getSelectedRange):
836 (WebKit::WebPageProxy::getAttributedSubstringFromRange):
837 (WebKit::WebPageProxy::firstRectForCharacterRange):
838 * WebKit2.xcodeproj/project.pbxproj:
839 * WebProcess/WebPage/WebPage.cpp:
840 (WebKit::WebPage::rangeFromEditingRange):
841 * WebProcess/WebPage/WebPage.h:
842 * WebProcess/WebPage/WebPage.messages.in:
843 * WebProcess/WebPage/ios/WebPageIOS.mm:
844 (WebKit::WebPage::setComposition):
845 (WebKit::WebPage::insertText):
846 (WebKit::WebPage::insertDictatedText):
847 (WebKit::WebPage::getMarkedRange):
848 (WebKit::WebPage::getSelectedRange):
849 (WebKit::WebPage::getAttributedSubstringFromRange):
850 (WebKit::WebPage::firstRectForCharacterRange):
851 * WebProcess/WebPage/mac/WebPageMac.mm:
852 (WebKit::WebPage::setComposition):
853 (WebKit::WebPage::insertText):
854 (WebKit::WebPage::insertDictatedText):
855 (WebKit::WebPage::getMarkedRange):
856 (WebKit::WebPage::getSelectedRange):
857 (WebKit::WebPage::getAttributedSubstringFromRange):
858 (WebKit::WebPage::characterIndexForPoint):
859 (WebKit::WebPage::firstRectForCharacterRange):
861 2014-03-17 Filip Pizlo <fpizlo@apple.com>
865 Rubber stamped by Dan Bernstein.
867 * Configurations/FeatureDefines.xcconfig:
869 2014-03-17 Simon Fraser <simon.fraser@apple.com>
871 Renable pagination mode in WK2 MiniBrowser
872 https://bugs.webkit.org/show_bug.cgi?id=130374
874 Reviewed by Anders Carlsson.
876 Add SPI for pagination mode.
878 * UIProcess/API/Cocoa/WKWebView.mm:
879 (-[WKWebView _paginationMode]):
880 (-[WKWebView _setPaginationMode:]):
881 (-[WKWebView _paginationBehavesLikeColumns]):
882 (-[WKWebView _setPaginationBehavesLikeColumns:]):
883 (-[WKWebView _pageLength]):
884 (-[WKWebView _setPageLength:]):
885 (-[WKWebView _gapBetweenPages]):
886 (-[WKWebView _setGapBetweenPages:]):
887 (-[WKWebView _pageCount]):
888 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
891 2014-03-18 Ryuan Choi <ryuan.choi@samsung.com>
893 [CMAKE][WK2]Move CoordinatedGraphics related files out of WebKit2/CMakeLists.txt
894 https://bugs.webkit.org/show_bug.cgi?id=130390
896 Reviewed by Martin Robinson.
898 Now, only EFL port use CoordinatedGraphics among CMake based ports.
902 * PlatformGTK.cmake: Removed CoordinatedGraphics related files.
904 2014-03-18 Carlos Garcia Campos <cgarcia@igalia.com>
906 [GTK] Race condition when the socket event source is cancelled
907 https://bugs.webkit.org/show_bug.cgi?id=130395
909 Reviewed by Martin Robinson.
911 In some cases when the socket event source is cancelled the socket
912 event source callback is called with the condition of the previous
913 poll instead of 0. This can happen sometimes when the source is
914 cancelled from the socket event source callback. Once the socket
915 event source is cancelled, it's dispatched by glib without
916 polling, so the condition is never reset again and the callback is
917 called again and again with the previous condition. When the
918 condition is G_IO_IN, the source is re-scheduled entering into an
919 infinite loop. We should always check if the source has been
920 cancelled at the beginning of the callback to destroy the source
921 instead of relying on the condition being 0.
923 * Platform/gtk/WorkQueueGtk.cpp:
924 (WorkQueue::SocketEventSource::isCancelled):
925 (WorkQueue::SocketEventSource::eventCallback):
927 2014-03-18 Csaba Osztrogonác <ossy@webkit.org>
929 [GTK] URTFB after r165789. Stub function added.
931 * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
932 (WebKit::InjectedBundle::setBundleParameter):
934 2014-03-17 Jaehun Lim <ljaehun.lim@samsung.com>
936 Unreviewed, EFL build fix after r165789
938 * WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:
939 (WebKit::InjectedBundle::setBundleParameter): Implemented.
941 2014-03-17 Jae Hyun Park <jaepark@webkit.org>
943 [GTK] Build fix for debug build
947 finalizedListItem was actually used in ASSERT. So, use ASSERT_UNUSED
950 * UIProcess/API/gtk/WebKitBackForwardListItem.cpp:
951 (webkitBackForwardListItemFinalized):
953 2014-03-17 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
955 [WK2] Getting rid of compilation warnings
956 https://bugs.webkit.org/show_bug.cgi?id=130348
958 Reviewed by Benjamin Poulain.
960 * UIProcess/API/APIHistoryClient.h:
961 (API::HistoryClient::didPerformClientRedirect):
962 (API::HistoryClient::didPerformServerRedirect):
963 (API::HistoryClient::didUpdateHistoryTitle):
964 * UIProcess/API/APILoaderClient.h:
965 (API::LoaderClient::didStartProvisionalLoadForFrame):
966 (API::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
967 (API::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
968 (API::LoaderClient::didCommitLoadForFrame):
969 (API::LoaderClient::didFinishLoadForFrame):
970 (API::LoaderClient::didFailLoadWithErrorForFrame):
971 (API::LoaderClient::didChangeBackForwardList):
972 * UIProcess/API/APIPolicyClient.h:
973 (API::PolicyClient::decidePolicyForNavigationAction):
974 (API::PolicyClient::decidePolicyForNewWindowAction):
975 (API::PolicyClient::decidePolicyForResponse):
976 (API::PolicyClient::unableToImplementPolicy):
977 * UIProcess/API/APIUIClient.h:
978 (API::UIClient::exceededDatabaseQuota):
979 (API::UIClient::saveDataToFileInDownloadsFolder):
980 * UIProcess/API/C/WKPage.cpp:
981 (WKPageSetPageLoaderClient):
982 * UIProcess/APISession.cpp:
984 * WebProcess/Plugins/PluginView.cpp:
985 (WebKit::PluginView::viewStateDidChange):
987 2014-03-17 Anders Carlsson <andersca@apple.com>
989 Update the bundle parameters dictionary and send out KVO notifications
990 https://bugs.webkit.org/show_bug.cgi?id=130379
991 <rdar://problem/16213914>
993 Reviewed by Dan Bernstein.
995 * UIProcess/API/Cocoa/WKProcessPool.mm:
996 (-[WKProcessPool _setObject:forBundleParameter:]):
997 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h:
998 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm:
999 (-[WKWebProcessBundleParameters setParameter:forKey:]):
1000 * WebProcess/InjectedBundle/InjectedBundle.h:
1001 * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
1002 (WebKit::InjectedBundle::setBundleParameter):
1003 * WebProcess/WebProcess.cpp:
1004 (WebKit::WebProcess::setInjectedBundleParameter):
1005 * WebProcess/WebProcess.h:
1006 * WebProcess/WebProcess.messages.in:
1008 2014-03-17 Tim Horton <timothy_horton@apple.com>
1010 Address some style nits.
1012 * UIProcess/API/Cocoa/_WKThumbnailViewInternal.h:
1014 2014-03-17 Simon Fraser <simon.fraser@apple.com>
1016 Address some style nits.
1018 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1020 2014-03-17 Simon Fraser <simon.fraser@apple.com>
1022 Add transparent window support back into MiniBrowser
1023 https://bugs.webkit.org/show_bug.cgi?id=130363
1025 Reviewed by Anders Carlsson.
1027 Expose SPI for transparent window support.
1029 * UIProcess/API/Cocoa/WKWebView.mm:
1030 (-[WKWebView _drawsTransparentBackground]):
1031 (-[WKWebView _setDrawsTransparentBackground:]):
1032 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1034 2014-03-17 Alexey Proskuryakov <ap@apple.com>
1036 Undo some accidental Gtk changes from http://trac.webkit.org/changeset/165759
1038 * UIProcess/WebPageProxy.cpp:
1039 * WebProcess/WebPage/WebPage.messages.in:
1041 2014-03-17 Csaba Osztrogonác <ossy@webkit.org>
1043 [WK2] URTBF after r165755 for non Apple platforms, stub functions added.
1045 * WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:
1046 (WebKit::InjectedBundle::platformInitialize):
1047 * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
1048 (WebKit::InjectedBundle::platformInitialize):
1050 2014-03-17 Alexey Proskuryakov <ap@apple.com>
1052 Move convertToRange() helper to cross-platform WebPage.cpp
1053 https://bugs.webkit.org/show_bug.cgi?id=130365
1055 Reviewed by Tim Horton.
1057 Also renamed it to rangeFromEditingLocationAndLength().
1059 * WebProcess/WebPage/WebPage.cpp:
1060 (WebKit::WebPage::rangeFromEditingLocationAndLength):
1061 * WebProcess/WebPage/WebPage.h:
1062 * WebProcess/WebPage/ios/WebPageIOS.mm:
1063 (WebKit::WebPage::insertText):
1064 * WebProcess/WebPage/mac/WebPageMac.mm:
1065 (WebKit::WebPage::setComposition):
1066 (WebKit::WebPage::insertText):
1067 (WebKit::WebPage::insertDictatedText):
1068 (WebKit::WebPage::getAttributedSubstringFromRange):
1069 (WebKit::WebPage::characterIndexForPoint):
1070 (WebKit::WebPage::firstRectForCharacterRange):
1072 2014-03-17 Anders Carlsson <andersca@apple.com>
1076 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h:
1078 2014-03-17 Enrica Casucci <enrica@apple.com>
1080 WK2: support data detectors driven action sheet..
1081 https://bugs.webkit.org/show_bug.cgi?id=130362
1082 <rdar://problem/16319711>
1084 Reviewed by Benjamin Poulain.
1086 * UIProcess/ios/WKActionSheetAssistant.mm:
1087 (-[WKActionSheetAssistant showDataDetectorsSheet]):
1089 2014-03-17 Anders Carlsson <andersca@apple.com>
1091 Fix 32-bit OS X build.
1093 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h:
1094 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm:
1095 * WebProcess/InjectedBundle/InjectedBundle.h:
1096 * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
1097 (WebKit::InjectedBundle::platformInitialize):
1099 2014-03-17 Jae Hyun Park <jaepark@webkit.org>
1101 [GTK][CMake] Fix WebKit2 unused parameter warnings
1102 https://bugs.webkit.org/show_bug.cgi?id=130316
1104 Reviewed by Martin Robinson.
1106 * Platform/gtk/WorkQueueGtk.cpp: Fix unused parameter warnings.
1107 * UIProcess/API/gtk/PageClientImpl.cpp: Ditto.
1108 * UIProcess/API/gtk/WebKitBackForwardListItem.cpp: Ditto.
1109 * UIProcess/API/gtk/WebKitContextMenuClient.cpp: Ditto.
1110 * UIProcess/API/gtk/WebKitContextMenuItem.cpp: Ditto.
1111 * UIProcess/API/gtk/WebKitDownloadClient.cpp: Ditto.
1112 * UIProcess/API/gtk/WebKitFaviconDatabase.cpp: Ditto.
1113 * UIProcess/API/gtk/WebKitFindController.cpp: Ditto.
1114 * UIProcess/API/gtk/WebKitFormClient.cpp: Ditto.
1115 * UIProcess/API/gtk/WebKitGeolocationProvider.cpp: Ditto.
1116 * UIProcess/API/gtk/WebKitLoaderClient.cpp: Ditto.
1117 * UIProcess/API/gtk/WebKitPlugin.cpp: Ditto.
1118 * UIProcess/API/gtk/WebKitPolicyClient.cpp: Ditto.
1119 * UIProcess/API/gtk/WebKitRequestManagerClient.cpp: Ditto.
1120 * UIProcess/API/gtk/WebKitTextChecker.cpp: Ditto.
1121 * UIProcess/API/gtk/WebKitUIClient.cpp: Ditto.
1122 * UIProcess/API/gtk/WebKitURISchemeRequest.cpp: Ditto.
1123 * UIProcess/API/gtk/WebKitWebContext.cpp: Ditto.
1124 * UIProcess/API/gtk/WebKitWebInspector.cpp: Ditto.
1125 * UIProcess/API/gtk/WebKitWebView.cpp: Ditto.
1126 * UIProcess/API/gtk/WebKitWebViewBase.cpp: Ditto.
1127 * UIProcess/API/gtk/WebKitWebViewBaseAccessible.cpp: Ditto.
1128 * UIProcess/API/gtk/WebViewBaseInputMethodFilter.cpp: Ditto.
1129 * UIProcess/gtk/TextCheckerGtk.cpp: Ditto.
1130 * UIProcess/gtk/WebContextMenuProxyGtk.cpp: Ditto.
1131 * UIProcess/gtk/WebPopupMenuProxyGtk.cpp: Ditto.
1132 * WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp: Ditto.
1133 * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp: Ditto.
1134 * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp: Ditto.
1135 * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: Ditto.
1136 * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: Ditto.
1138 2014-03-17 Alexey Proskuryakov <ap@apple.com>
1140 [Mac] Standardize on start/length in text input IPC methods
1141 https://bugs.webkit.org/show_bug.cgi?id=130359
1143 Reviewed by Anders Carlsson.
1145 Some IPC methods used start/length, and others use start/end. This was confusing.
1147 While here, changed WebPageMac.mm to not use NSMakeRange where we don't need it
1148 (I want to move this code to WebPage.cpp, where it could be shared with iOS and
1149 other platforms, as it doesn't depend on Foundation much).
1151 * UIProcess/API/mac/WKView.mm:
1152 (-[WKView insertText:replacementRange:]):
1153 (-[WKView setMarkedText:selectedRange:replacementRange:]):
1154 (-[WKView attributedSubstringForProposedRange:actualRange:]):
1155 * UIProcess/WebPageProxy.cpp:
1156 (WebKit::WebPageProxy::internalShowContextMenu):
1157 * UIProcess/WebPageProxy.h:
1158 * UIProcess/ios/WebPageProxyIOS.mm:
1159 (WebKit::WebPageProxy::setComposition):
1160 (WebKit::WebPageProxy::insertText):
1161 * UIProcess/mac/WebPageProxyMac.mm:
1162 (WebKit::WebPageProxy::setComposition):
1163 (WebKit::WebPageProxy::insertText):
1164 (WebKit::WebPageProxy::insertDictatedText):
1165 (WebKit::WebPageProxy::getAttributedSubstringFromRange):
1166 * WebProcess/WebPage/WebPage.cpp:
1167 (WebKit::WebPage::setComposition):
1168 * WebProcess/WebPage/WebPage.h:
1169 * WebProcess/WebPage/WebPage.messages.in:
1170 * WebProcess/WebPage/ios/WebPageIOS.mm:
1171 (WebKit::WebPage::setComposition):
1172 (WebKit::WebPage::insertText):
1173 * WebProcess/WebPage/mac/WebPageMac.mm:
1174 (WebKit::WebPage::setComposition):
1175 (WebKit::WebPage::insertText):
1176 (WebKit::WebPage::insertDictatedText):
1177 (WebKit::WebPage::getAttributedSubstringFromRange):
1178 (WebKit::convertToRange):
1179 (WebKit::WebPage::firstRectForCharacterRange):
1181 2014-03-17 Tim Horton <timothy_horton@apple.com>
1183 Rename WKThumbnailView to _WKThumbnailView
1184 https://bugs.webkit.org/show_bug.cgi?id=130361
1186 Reviewed by Anders Carlsson.
1188 * UIProcess/API/Cocoa/_WKThumbnailView.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKThumbnailView.h.
1189 * UIProcess/API/Cocoa/_WKThumbnailView.mm: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKThumbnailView.mm.
1190 (-[_WKThumbnailView initWithFrame:fromWKView:]):
1191 (-[_WKThumbnailView _viewWasUnparented]):
1192 (-[_WKThumbnailView _viewWasParented]):
1193 (-[_WKThumbnailView _requestSnapshotIfNeeded]):
1194 (-[_WKThumbnailView _didTakeSnapshot:]):
1195 (-[_WKThumbnailView viewDidMoveToWindow]):
1196 (-[_WKThumbnailView setScale:]):
1197 (-[_WKThumbnailView setUsesSnapshot:]):
1198 (-[_WKThumbnailView _setThumbnailLayer:]):
1199 (-[_WKThumbnailView _thumbnailLayer]):
1200 * UIProcess/API/Cocoa/_WKThumbnailViewInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKThumbnailViewInternal.h.
1201 * UIProcess/API/mac/WKView.mm:
1202 (-[WKView _setThumbnailView:]):
1203 (-[WKView _thumbnailView]):
1204 (-[WKView _updateThumbnailViewLayer]):
1205 * UIProcess/API/mac/WKViewInternal.h:
1206 * UIProcess/mac/PageClientImpl.mm:
1207 * WebKit2.xcodeproj/project.pbxproj:
1209 2014-03-17 Anders Carlsson <andersca@apple.com>
1211 Add SPI for getting bundle parameters from the injected bundle
1212 https://bugs.webkit.org/show_bug.cgi?id=130355
1214 Reviewed by Dan Bernstein.
1216 * UIProcess/mac/WebContextMac.mm:
1217 (WebKit::WebContext::platformInitializeWebProcess):
1218 * WebKit2.xcodeproj/project.pbxproj:
1219 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h: Copied from Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h.
1220 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm: Copied from Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h.
1221 (-[WKWebProcessBundleParameters initWithDictionary:]):
1222 (-[WKWebProcessBundleParameters valueForKey:]):
1223 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:
1224 * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
1225 (-[WKWebProcessPlugInController parameters]):
1226 * WebProcess/InjectedBundle/InjectedBundle.cpp:
1227 (WebKit::InjectedBundle::InjectedBundle):
1228 * WebProcess/InjectedBundle/InjectedBundle.h:
1229 (WebKit::InjectedBundle::create):
1230 * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
1231 (WebKit::InjectedBundle::bundleParameters):
1232 (WebKit::InjectedBundle::platformInitialize):
1233 * WebProcess/WebProcess.cpp:
1234 (WebKit::WebProcess::initializeWebProcess):
1236 2014-03-17 Brent Fulgham <bfulgham@apple.com>
1238 Provide preference to enable additional AVFoundation options
1239 https://bugs.webkit.org/show_bug.cgi?id=130275
1241 Reviewed by Eric Carlson.
1243 * Shared/WebPreferencesStore.h: Added new preference.
1244 * UIProcess/API/C/WKPreferences.cpp:
1245 (WKPreferencesSetEnableInheritURIQueryComponent): Added.
1246 (WKPreferencesGetEnableInheritURIQueryComponent): Added.
1247 * UIProcess/API/C/WKPreferencesPrivate.h:
1248 * WebProcess/WebPage/WebPage.cpp:
1249 (WebKit::WebPage::updatePreferences): Handle new preference.
1251 2014-03-17 Alexey Proskuryakov <ap@apple.com>
1253 [Mac] getAttributedSubstringFromRange arguments are incorrectly named
1254 https://bugs.webkit.org/show_bug.cgi?id=130349
1256 Reviewed by Tim Horton.
1258 There is a mess of start/end and start/length pairs in IPC. One day we'll fix them
1259 all, but now, let's at least name them correctly.
1263 * UIProcess/WebPageProxy.h:
1264 * UIProcess/mac/WebPageProxyMac.mm:
1265 (WebKit::WebPageProxy::getAttributedSubstringFromRange):
1266 * WebProcess/WebPage/WebPage.h:
1267 * WebProcess/WebPage/WebPage.messages.in:
1268 * WebProcess/WebPage/mac/WebPageMac.mm:
1269 (WebKit::WebPage::getAttributedSubstringFromRange):
1271 2014-03-17 Tim Horton <timothy_horton@apple.com>
1273 WKThumbnailView should support snapshots
1274 https://bugs.webkit.org/show_bug.cgi?id=130335
1275 <rdar://problem/16255139>
1277 Reviewed by Simon Fraser.
1279 Add a mode where WKThumbnailView takes a software snapshot of the web content,
1280 replacing the live layer tree with said snapshot once it returns from the
1281 web process. This may improve animation performance in cases where the
1282 layer tree would otherwise be very complex.
1284 * UIProcess/API/Cocoa/WKThumbnailView.h:
1285 Add a property, usesSnapshot, which determines whether the thumbnail view
1286 should use the live layer tree or a snapshot of the content.
1288 * UIProcess/API/Cocoa/WKThumbnailView.mm:
1289 (-[WKThumbnailView initWithFrame:fromWKView:]):
1290 (-[WKThumbnailView _viewWasUnparented]):
1291 Clear the snapshot when unparented.
1293 (-[WKThumbnailView _viewWasParented]):
1294 Take a snapshot of the web content when parented, if needed.
1296 (-[WKThumbnailView _requestSnapshotIfNeeded]):
1297 If we're using snapshots, and haven't already dispatched an async snapshot request,
1298 and don't already have a snapshot, request a snapshot from the web process.
1300 When it returns, use it as the contents of the WKThumbnailView layer, and
1301 unparent the live layer tree.
1303 (-[WKThumbnailView setScale:]):
1304 (-[WKThumbnailView setUsesSnapshot:]):
1305 (-[WKThumbnailView _setThumbnailLayer:]):
1306 (-[WKThumbnailView _thumbnailLayer]):
1307 * UIProcess/API/Cocoa/WKThumbnailViewInternal.h:
1309 * UIProcess/API/mac/WKView.mm:
1310 (-[WKView _setAcceleratedCompositingModeRootLayer:]):
1311 (-[WKView _acceleratedCompositingModeRootLayer]):
1312 WKView should always keep track of the current root layer, instead of totally
1313 handing control over to WKThumbnailView when it is used.
1315 (-[WKView _setThumbnailView:]):
1316 (-[WKView _updateThumbnailViewLayer]):
1317 (-[WKView _reparentLayerTreeInThumbnailView]):
1318 If needed (either we're not using snapshots, or still waiting for the snapshot to be painted),
1319 push the WKView's live layer tree into the thumbnail view.
1321 * UIProcess/API/mac/WKViewInternal.h:
1322 * UIProcess/WebPageProxy.cpp:
1323 (WebKit::WebPageProxy::internalShowContextMenu):
1324 * UIProcess/WebPageProxy.h:
1325 * WebProcess/WebPage/WebPage.h:
1326 * WebProcess/WebPage/WebPage.messages.in:
1327 * WebProcess/WebPage/WebPage.cpp:
1328 (WebKit::WebPage::takeThumbnailSnapshot):
1329 Add a message that asynchronously returns a snapshot that respects the
1330 current thumbnail scale and position.
1332 (WebKit::WebPage::scaledSnapshotWithOptions):
1335 * WebProcess/WebPage/DrawingArea.cpp:
1336 (WebKit::DrawingArea::transform):
1337 * WebProcess/WebPage/DrawingArea.h:
1338 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1339 Add a getter for the DrawingArea's transform.
1340 Rename it to rootLayerTransform.
1342 2014-03-17 Zan Dobersek <zdobersek@igalia.com>
1344 Use RunLoop objects through references instead of pointers
1345 https://bugs.webkit.org/show_bug.cgi?id=130313
1347 Reviewed by Andreas Kling.
1349 Adjust the code accordingly now that RunLoop::current() and RunLoop::main()
1350 return RunLoop reference instead of a pointer.
1352 * DatabaseProcess/DatabaseProcess.cpp:
1353 (WebKit::DatabaseProcess::didClose):
1354 (WebKit::DatabaseProcess::didReceiveInvalidMessage):
1355 * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1356 (WebKit::UniqueIDBDatabase::postMainThreadTask):
1357 * NetworkProcess/NetworkProcess.cpp:
1358 (WebKit::NetworkProcess::didClose):
1359 (WebKit::NetworkProcess::didReceiveInvalidMessage):
1360 * NetworkProcess/NetworkResourceLoader.cpp:
1361 (WebKit::NetworkResourceLoader::continueWillSendRequest):
1362 * Platform/IPC/Connection.cpp:
1363 (IPC::Connection::SyncMessageState::getOrCreate):
1364 (IPC::Connection::SyncMessageState::SyncMessageState):
1365 (IPC::Connection::SyncMessageState::~SyncMessageState):
1366 (IPC::Connection::SyncMessageState::processIncomingMessage):
1367 (IPC::Connection::SyncMessageState::dispatchMessages):
1368 (IPC::Connection::createServerConnection):
1369 (IPC::Connection::createClientConnection):
1370 (IPC::Connection::Connection):
1371 (IPC::Connection::addWorkQueueMessageReceiver):
1372 (IPC::Connection::removeWorkQueueMessageReceiver):
1373 (IPC::Connection::sendSyncMessage):
1374 (IPC::Connection::sendSyncMessageFromSecondaryThread):
1375 (IPC::Connection::waitForSyncReply):
1376 (IPC::Connection::processIncomingMessage):
1377 (IPC::Connection::connectionDidClose):
1378 (IPC::Connection::dispatchDidReceiveInvalidMessage):
1379 (IPC::Connection::enqueueIncomingMessage):
1380 (IPC::Connection::wakeUpRunLoop):
1381 * Platform/IPC/Connection.h:
1382 * Platform/IPC/mac/ConnectionMac.cpp:
1383 (IPC::Connection::receiveSourceEventHandler):
1384 * Shared/ChildProcess.cpp:
1385 (WebKit::ChildProcess::stopRunLoop):
1386 * Shared/Plugins/NPObjectProxy.cpp:
1387 (WebKit::NPObjectProxy::NP_Deallocate):
1388 * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
1389 (WebKit::ProcessLauncher::launchProcess):
1390 * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
1391 (WebKit::ProcessLauncher::launchProcess):
1392 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1393 (WebKit::connectToService):
1394 (WebKit::tryPreexistingProcess):
1395 (WebKit::createProcess):
1396 * UIProcess/Storage/StorageManager.cpp:
1397 (WebKit::StorageManager::getOrigins):
1398 (WebKit::StorageManager::getStorageDetailsByOrigin):
1399 * UIProcess/Storage/StorageManager.h:
1400 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1401 (WebKit::NetscapePlugin::pluginThreadAsyncCall):
1402 * WebProcess/Plugins/PluginView.cpp:
1403 (WebKit::PluginView::unprotectPluginFromDestruction):
1404 * WebProcess/WebPage/EventDispatcher.cpp:
1405 (WebKit::EventDispatcher::wheelEvent):
1406 * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
1407 (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
1408 * WebProcess/WebPage/WebPage.cpp:
1409 (WebKit::WebPage::close):
1411 2014-03-17 Giovanni Campagna <gcampagna@src.gnome.org>
1413 [GTK] Don't busy loop when the socket is full
1414 https://bugs.webkit.org/show_bug.cgi?id=129802
1416 Reviewed by Carlos Garcia Campos.
1418 When the socket is full and we see EAGAIN or EWOULDBLOCK
1419 (because the socket is non blocking), don't busy loop by
1420 tring to write again, instead poll() until the socket
1423 * Platform/IPC/unix/ConnectionUnix.cpp:
1424 (IPC::Connection::sendOutgoingMessage):
1426 2014-03-17 Martin Robinson <mrobinson@igalia.com>
1428 [GTK][CMake] Ensure that HAVE_GTK_UNIX_PRINTING is defined when appropriate
1429 https://bugs.webkit.org/show_bug.cgi?id=130155
1431 Reviewed by Philippe Normand.
1433 * PlatformGTK.cmake: Add GTK_UNIX_PRINT flags to the build.
1435 2014-03-17 Ryuan Choi <ryuan.choi@samsung.com>
1437 [EFL][WK2] Restore cursor when moving mouse into webview
1438 https://bugs.webkit.org/show_bug.cgi?id=130182
1440 Reviewed by Gyuyoung Kim.
1442 We changed mouse cursor when the type of cursor is changed.
1443 But once mouse is moved out of webview, ewebkit will not know whether cursor
1446 So, this patch added a logic to restore the last applied type of cursor when
1447 mouse is moved into webview again.
1449 * UIProcess/API/efl/EwkView.cpp:
1450 (EwkViewEventHandler<EVAS_CALLBACK_MOUSE_IN>::handleEvent):
1451 Call updateCursor to restore the last applied type of cursor.
1453 (EwkView::updateCursor): Extracted from setCursor.
1454 (EwkView::setCursor):
1455 (EwkView::handleEvasObjectAdd):
1456 * UIProcess/API/efl/EwkView.h:
1458 2014-03-16 Ryuan Choi <ryuan.choi@samsung.com>
1460 [EFL][WK2] Add ewk_application_cache_manager APIs
1461 https://bugs.webkit.org/show_bug.cgi?id=102853
1463 Reviewed by Gyuyoung Kim.
1465 Implemented application cache manager to get list of origins which stores
1466 application cache and remove specified origin or all.
1468 * PlatformEfl.cmake: Added newly added files.
1469 * UIProcess/API/efl/ewk_application_cache_manager.cpp: Added.
1470 (EwkApplicationCacheManager::EwkApplicationCacheManager):
1471 (EwkApplicationCacheManager::~EwkApplicationCacheManager):
1472 (Get_Origins_Data::Get_Origins_Data):
1473 (getApplicationCacheOriginsCallback):
1474 (ewk_application_cache_manager_origins_get):
1475 (ewk_application_cache_origins_free):
1476 (ewk_application_cache_manager_delete_all):
1477 (ewk_application_cache_manager_delete):
1478 * UIProcess/API/efl/ewk_application_cache_manager.h: Added.
1479 * UIProcess/API/efl/ewk_application_cache_manager_private.h: Added.
1480 (EwkApplicationCacheManager::impl):
1481 * UIProcess/API/efl/ewk_context.cpp:
1482 (EwkContext::applicationCacheManager):
1483 (ewk_context_application_cache_manager_get):
1484 * UIProcess/API/efl/ewk_context.h:
1485 * UIProcess/API/efl/ewk_context_private.h:
1486 * UIProcess/API/efl/ewk_security_origin_private.h:
1487 (EwkSecurityOrigin::wkSecurityOrigin):
1488 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.cpp:
1489 (EWK2UnitTestServer::port):
1490 * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.h:
1491 * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
1492 Added to test application_cache_manager.
1494 (getOriginsCallback):
1497 * UIProcess/API/efl/tests/test_ewk2_context.cpp:
1498 Added test case to test getter of application_cache_manager.
1501 2014-03-16 Zan Dobersek <zdobersek@igalia.com>
1503 Move GTK WebKit2 code to std::unique_ptr
1504 https://bugs.webkit.org/show_bug.cgi?id=129672
1506 Reviewed by Anders Carlsson.
1508 Repace uses of OwnPtr and PassOwnPtr in GTK-specific WebKit2 code with std::unique_ptr.
1510 * Shared/Downloads/Download.h:
1511 * Shared/Downloads/soup/DownloadSoup.cpp:
1512 (WebKit::Download::start):
1513 (WebKit::Download::startWithHandle):
1514 (WebKit::Download::platformInvalidate):
1515 * UIProcess/API/gtk/PageClientImpl.cpp:
1516 * UIProcess/API/gtk/PageClientImpl.h:
1517 * UIProcess/API/gtk/WebKitContextMenuItem.cpp:
1518 (webkitContextMenuItemCreate):
1519 (webkitContextMenuItemCreateForGtkItem):
1520 (webkit_context_menu_item_new):
1521 (webkit_context_menu_item_new_from_stock_action):
1522 (webkit_context_menu_item_new_from_stock_action_with_label):
1523 (webkit_context_menu_item_new_with_submenu):
1524 (webkit_context_menu_item_new_separator):
1525 * UIProcess/API/gtk/WebKitTextChecker.h:
1526 * UIProcess/API/gtk/WebKitWebContext.cpp:
1527 (createDefaultWebContext):
1528 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1529 (webkitWebViewBaseConstructed):
1530 * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
1531 (WebKit::WebPrintOperationGtk::print):
1532 * WebProcess/gtk/WebGtkExtensionManager.cpp:
1533 (WebKit::WebGtkExtensionManager::initialize):
1534 * WebProcess/soup/WebKitSoupRequestInputStream.cpp:
1535 (webkitSoupRequestInputStreamPendingReadAsyncComplete):
1536 (webkitSoupRequestInputStreamReadAsync):
1537 * WebProcess/soup/WebSoupRequestManager.cpp:
1538 (WebKit::WebSoupRequestManager::send):
1539 * WebProcess/soup/WebSoupRequestManager.h:
1541 2014-03-16 Brian Burg <bburg@apple.com>
1543 Web Inspector: vended backend commands file should be generated as part of the build
1544 https://bugs.webkit.org/show_bug.cgi?id=130110
1546 Reviewed by Timothy Hatcher.
1548 * PlatformGTK.cmake: Copy over generated inspector backend commands files.
1550 2014-03-16 Darin Adler <darin@apple.com>
1552 Try to fix 32-bit Mac build.
1554 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: Add missing include.
1556 2014-03-16 Philippe Normand <pnormand@igalia.com>
1558 Unreviewed, GTK build fix after r165692.
1560 * UIProcess/gtk/TextCheckerGtk.cpp:
1561 (WebKit::TextChecker::checkSpellingOfString):
1562 (WebKit::TextChecker::checkGrammarOfString):
1564 2014-03-15 Darin Adler <darin@apple.com>
1566 Remove all uses of deprecatedCharacters from WebKit2
1567 https://bugs.webkit.org/show_bug.cgi?id=130197
1569 Reviewed by Andreas Kling.
1571 * Shared/APIString.h: Rewrote getCharacters to use StringView,
1572 substring, and getCharactersWithUpconvert. Added an 8-bit case
1575 * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
1576 (WebKit::writeByte): Added.
1577 (WebKit::writeCharacter): Added.
1578 (WebKit::writeLine): Added. Uses operator[] instead of characters16 to get
1579 the UTF-16 characters out of the string.
1580 (WebKit::NetscapePluginModule::scanPlugin): Replaced code that writes out
1581 text to stdout with much simpler version using the functions above.
1583 * UIProcess/TextChecker.h: Changed text arguments to use StringView instead
1586 * UIProcess/WebPageProxy.cpp:
1587 (WebKit::WebPageProxy::internalShowContextMenu): Updated to pass StringView.
1589 * UIProcess/efl/TextCheckerEfl.cpp:
1590 (WebKit::nextWordOffset): Changed function to use StringView and unsigned.
1591 (WebKit::TextChecker::checkTextOfParagraph): Changed to use StringView and
1593 (WebKit::TextChecker::checkSpellingOfString): Ditto.
1594 (WebKit::TextChecker::checkGrammarOfString): Ditto.
1595 (WebKit::TextChecker::requestCheckingOfString): Pass in a StringView, so no
1596 need to call deprecatedCharacters.
1598 * UIProcess/ios/TextCheckerIOS.mm:
1599 (WebKit::TextChecker::checkTextOfParagraph): Changed to take StringView.
1600 (WebKit::TextChecker::checkSpellingOfString): Ditto.
1601 (WebKit::TextChecker::checkGrammarOfString): Ditto.
1603 * UIProcess/mac/TextCheckerMac.mm:
1604 (WebKit::TextChecker::checkTextOfParagraph): Changed to take StringView and
1605 use StringView::createNSStringWithoutCopying.
1606 (WebKit::TextChecker::checkSpellingOfString): CHanged to take StringView.
1607 (WebKit::TextChecker::checkGrammarOfString): Ditto.
1609 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1610 (WebKit::convertStringToKeyCodes): Changed to take StringView and use
1611 upconvertedCharacters instead of deprecatedCharacters. Also use move instead
1613 (WebKit::NetscapePlugin::sendComplexTextInput): Updated to new style for loop.
1615 * WebProcess/WebPage/EncoderAdapter.cpp:
1616 (WebKit::EncoderAdapter::encodeString): Use StringView::upconvertedCharacters
1617 instead of String::deprecatedCharacters.
1619 2014-03-15 David Kilzer <ddkilzer@apple.com>
1621 [iOS] Define SYSTEM_VERSION_PREFIX consistently
1622 <http://webkit.org/b/130293>
1623 <rdar://problem/15926359>
1625 Reviewed by Dan Bernstein.
1627 * Configurations/Version.xcconfig:
1628 (SYSTEM_VERSION_PREFIX): Sync with
1629 Source/WebKit/mac/Version.xcconfig.
1631 2014-03-14 Alexey Proskuryakov <ap@apple.com>
1633 [Mac] Sync extended attribute related rules with AppSandbox profile
1634 https://bugs.webkit.org/show_bug.cgi?id=130263
1635 <rdar://problem/16318965>
1637 Reviewed by Sam Weinig.
1639 Update the fix to use a different syntax in some OS versions.
1641 * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
1642 * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
1643 * WebProcess/com.apple.WebProcess.sb.in:
1645 2014-03-14 Ryosuke Niwa <rniwa@webkit.org>
1647 Revert erroneous changes made to UIProcess/API/Cocoa in r165676.
1649 * UIProcess/API/Cocoa/WKBackForwardList.h:
1650 * UIProcess/API/Cocoa/WKBackForwardListItem.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKBackForwardListItem.h.
1651 * UIProcess/API/Cocoa/WKNavigation.h:
1652 * UIProcess/API/Cocoa/WKNavigationAction.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationAction.h.
1653 * UIProcess/API/Cocoa/WKNavigationDelegate.h:
1655 * UIProcess/API/Cocoa/WKNavigationResponse.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponse.h.
1656 * UIProcess/API/Cocoa/WKNavigationTrigger.h: Removed.
1657 * UIProcess/API/Cocoa/WKWebView.h:
1659 2014-03-14 Mark Rowe <mrowe@apple.com>
1661 Fix the production build.
1663 Don't rely on USE_INTERNAL_SDK being set for the Production configuration since UseInternalSDK.xcconfig won't
1664 be at the expected relative path when working from installed source.
1666 * Configurations/Base.xcconfig:
1668 2014-03-14 Maciej Stachowiak <mjs@apple.com>
1670 Replace "Apple Computer, Inc." with "Apple Inc." in copyright headers
1671 https://bugs.webkit.org/show_bug.cgi?id=130276
1672 <rdar://problem/16266927>
1674 Reviewed by Simon Fraser.
1676 * Shared/AsyncRequest.cpp:
1677 * Shared/AsyncRequest.h:
1678 * Shared/ContextMenuContextData.cpp:
1679 * Shared/ContextMenuContextData.h:
1680 * Shared/Databases/DatabaseProcessCreationParameters.h:
1681 * Shared/Databases/IndexedDB/IDBUtilities.cpp:
1682 * Shared/Databases/IndexedDB/IDBUtilities.h:
1683 * Shared/mac/RemoteLayerBackingStore.h:
1684 * Shared/mac/RemoteLayerBackingStore.mm:
1685 * UIProcess/API/Cocoa/WKBackForwardList.h:
1686 * UIProcess/API/Cocoa/WKBackForwardListItem.h: Removed.
1687 * UIProcess/API/Cocoa/WKNavigation.h:
1688 * UIProcess/API/Cocoa/WKNavigationAction.h: Removed.
1689 * UIProcess/API/Cocoa/WKNavigationDelegate.h:
1690 * UIProcess/API/Cocoa/WKNavigationResponse.h: Removed.
1691 * UIProcess/API/Cocoa/WKNavigationTrigger.h: Added.
1693 * UIProcess/API/Cocoa/WKWebView.h:
1694 * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.cpp:
1695 * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.h:
1696 * UIProcess/CoordinatedGraphics/WKCoordinatedSceneAPICast.h:
1697 * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
1698 * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
1699 * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
1700 * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
1701 * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
1702 * WebProcess/Databases/WebToDatabaseProcessConnection.h:
1703 * WebProcess/WebCoreSupport/WebAlternativeTextClient.h:
1704 * WebProcess/WebCoreSupport/mac/WebAlternativeTextClient.cpp:
1705 * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
1706 * WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
1707 * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
1708 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1709 * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
1710 * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
1711 * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
1712 * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
1713 * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
1715 2014-03-14 Simon Fraser <simon.fraser@apple.com>
1717 [iOS WK2] background-attachment: fixed renders oddly, moves around
1718 https://bugs.webkit.org/show_bug.cgi?id=130277
1719 <rdar://problem/16332883>
1721 Reviewed by Tim Horton.
1723 Actually send scrolling and counter-scrolling layers to the UI process!
1725 * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
1726 (ArgumentCoder<ScrollingStateScrollingNode>::encode):
1727 (ArgumentCoder<ScrollingStateScrollingNode>::decode):
1729 2014-03-14 Anders Carlsson <andersca@apple.com>
1731 Try to fix the iOS build.
1733 * UIProcess/mac/WebContextMac.mm:
1735 2014-03-14 Anders Carlsson <andersca@apple.com>
1737 Begin work on the bundle parameter API
1738 https://bugs.webkit.org/show_bug.cgi?id=130267
1740 Reviewed by Dan Bernstein.
1742 * Shared/WebProcessCreationParameters.cpp:
1743 (WebKit::WebProcessCreationParameters::encode):
1744 (WebKit::WebProcessCreationParameters::decode):
1745 * Shared/WebProcessCreationParameters.h:
1746 * UIProcess/API/Cocoa/WKProcessPool.mm:
1747 (-[WKProcessPool _objectForBundleParameter:]):
1748 (-[WKProcessPool _setObject:forBundleParameter:]):
1749 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
1750 * UIProcess/WebContext.h:
1751 (WebKit::WebContext::bundleParameters):
1752 * UIProcess/mac/WebContextMac.mm:
1753 (WebKit::WebContext::ensureBundleParameters):
1754 (WebKit::WebContext::platformInitializeWebProcess):
1756 2014-03-14 Alexey Proskuryakov <ap@apple.com>
1758 [Mac] Sync extended attribute related rules with AppSandbox profile
1759 https://bugs.webkit.org/show_bug.cgi?id=130263
1760 <rdar://problem/16318965>
1762 Reviewed by Sam Weinig.
1764 * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
1765 * Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb:
1766 * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
1767 * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
1768 * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
1769 * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb:
1770 * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:
1771 * WebProcess/com.apple.WebProcess.sb.in:
1773 2014-03-14 Simon Fraser <simon.fraser@apple.com>
1775 [iOS WK2] Improve behavior of fixed elments on zooming
1776 https://bugs.webkit.org/show_bug.cgi?id=130253
1778 Reviewed by Beth Dakin.
1780 Correctly reposition right- and bottom-relative position:fixed
1781 elements on zooming in WK2 iOS by telling the scrolling tree
1782 about zoom-related viewport changes.
1784 * Shared/mac/RemoteLayerTreeTransaction.h:
1785 (WebKit::RemoteLayerTreeTransaction::LayerProperties::notePropertiesChanged):
1786 Drive-by cleanup; typedef the flags field to an unsigned, to avoid ugly casting.
1787 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
1788 (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree): Pass out a flag to say
1789 if the update contained a new fixed or sticky layer.
1790 (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
1791 (WebKit::RemoteScrollingCoordinatorProxy::viewportChangedViaDelegatedScrolling):
1792 Call into the new ScrolingTree::viewportChangedViaDelegatedScrolling().
1793 * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
1794 * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm: If we got a new fixed
1795 or sticky layer, set fixedOrStickyLayerChanged to true.
1796 (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers): Ditto.
1797 * UIProcess/ios/WKContentView.mm:
1798 (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
1799 Remember both the old zoomScale and the filteredScale, since the fixed position rect
1800 should be computed using the unfiltered scale.
1801 Some FloatRect -> CGRect changes.
1802 Now call viewportChangedViaDelegatedScrolling() on the scrolling coordinator.
1803 (-[WKContentView fixedPositionRectFromExposedRect:scale:]): Call the
1804 FrameView function to compute the iOS fixed position rect.
1805 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1806 (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree): If the update
1807 got a new fixed or sticky layer, run the scrolling tree logic to make sure
1808 it gets into the right place.
1809 * UIProcess/mac/RemoteLayerTreeHost.mm:
1810 (WebKit::RemoteLayerTreeHost::updateLayerTree): If we logged here,
1811 we'd log twice if the tiled scrolling indicator was enabled, so
1812 hoisted the logging out into the caller.
1814 2014-03-14 Landry Breuil <landry@openbsd.org>
1816 Use the correct type in webkitSoupRequestInputStreamNew()'s declaration.
1817 Nhttps://bugs.webkit.org/show_bug.cgi?id=129974
1819 Reviewed by Andreas Kling.
1821 * WebProcess/soup/WebKitSoupRequestInputStream.h:
1823 2014-03-14 Anders Carlsson <andersca@apple.com>
1825 Fix crash when resizing the visited link table
1826 https://bugs.webkit.org/show_bug.cgi?id=130257
1827 <rdar://problem/16328177>
1829 Reviewed by Dan Bernstein.
1831 We're iterating over the old table, so use currentTableSize in the loop termination condition.
1833 * UIProcess/VisitedLinkProvider.cpp:
1834 (WebKit::VisitedLinkProvider::resizeTable):
1836 2014-03-14 Dan Bernstein <mitz@apple.com>
1838 [Cocoa] Expose a way to set the cookie accept policy
1839 https://bugs.webkit.org/show_bug.cgi?id=130251
1841 Reviewed by Anders Carlsson.
1843 * UIProcess/API/Cocoa/WKProcessPool.mm:
1844 (toHTTPCookieAcceptPolicy): Added a helper function that maps from NSHTTPCookieAcceptPolicy
1845 values to WebKit::HTTPCookieAcceptPolicy values.
1846 (-[WKProcessPool _setCookieAcceptPolicy:]): Added. Calls
1847 WebCookieManagerProxy::setHTTPCookieAcceptPolicy.
1848 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: Declared new method.
1850 2014-03-14 Carlos Garcia Campos <cgarcia@igalia.com>
1852 [GTK] WebKit2WebExtension GIR can't be used in vala
1853 https://bugs.webkit.org/show_bug.cgi?id=127179
1855 Reviewed by Martin Robinson.
1857 Do not include all WebKit2 gir symbols from WebKit2WebExtension gir
1861 * PlatformGTK.cmake:
1863 2014-03-14 Csaba Osztrogonác <ossy@webkit.org>
1865 [CMake] URTBF after r165619.
1867 * CMakeLists.txt: Add new files.
1869 2014-03-14 Anders Carlsson <andersca@apple.com>
1871 Remove WebContext::addVisitedLink
1872 https://bugs.webkit.org/show_bug.cgi?id=130242
1874 Reviewed by Dan Bernstein.
1876 Fold the function into WKContextAddVisitedLink instead.
1878 * UIProcess/API/C/WKContext.cpp:
1879 (WKContextAddVisitedLink):
1880 * UIProcess/WebContext.cpp:
1881 * UIProcess/WebContext.h:
1882 (WebKit::WebContext::visitedLinkProvider):
1884 2014-03-13 Anders Carlsson <andersca@apple.com>
1886 Move visited link handling to VisitedLinkTableController and VisitedLinkProvider
1887 https://bugs.webkit.org/show_bug.cgi?id=130223
1888 <rdar://problem/16315792>
1890 Reviewed by Dan Bernstein.
1892 * DerivedSources.make:
1893 Generate messages for VisitedLinkProvider and VisitedLinkTableController.
1895 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1896 (-[WKWebViewConfiguration copyWithZone:]):
1897 Set the visited link provider.
1899 * UIProcess/API/Cocoa/_WKVisitedLinkProvider.h:
1900 Add addVisitedLinkWithURL: method.
1902 * UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm:
1903 (-[_WKVisitedLinkProvider addVisitedLinkWithURL:]):
1904 Compute a link hash from the absolute URL string and pass it to the underlying VisitedLinkProvider object.
1906 * UIProcess/VisitedLinkProvider.cpp:
1907 (WebKit::VisitedLinkProvider::addProcess):
1908 Add the process to the m_processes HashCountedSet. If it's the first time we're adding the process,
1909 add the VisitedLinkProvider object as a message receiver and send the visited link table to the process.
1911 (WebKit::VisitedLinkProvider::removeProcess):
1912 Remove the process from the m_processes HashCountedSet. If we're removing the last reference to the process,
1913 remove ourselves as a message receiver.
1915 (WebKit::VisitedLinkProvider::addVisitedLinkHash):
1916 Rename this from addVisitedLink to better indicate what it's doing.
1918 (WebKit::tableSizeForKeyCount):
1919 Update for constant rename.
1921 (WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired):
1922 Compute the new pending visited links table size. If it's bigger than our current table, resize the table
1923 by calling resizeTable. Otherwise, simply try to add the pending hashes to our shared hash table. If successful,
1924 add the link hash to the addedVisitedLinks table and eventually send it to all processes associated with the visited link provider.
1926 (WebKit::VisitedLinkProvider::resizeTable):
1927 Create a new shared memory segment, Set it as the table backing store and add all visited links from the old table. Finally,
1928 add our pending visited link hashes and send the new table memory to all processes associated with the visited link provider.
1930 (WebKit::VisitedLinkProvider::sendTable):
1931 Helper function that creates a shared memory handle and sends it to a given web process.
1933 * UIProcess/VisitedLinkProvider.h:
1936 * UIProcess/VisitedLinkProvider.messages.in:
1939 * UIProcess/WebContext.cpp:
1940 (WebKit::WebContext::processDidFinishLaunching):
1941 (WebKit::WebContext::disconnectProcess):
1942 The WebContext no longer needs to inform the visited link provider about the processes coming and going, that's already handled
1943 by the WebPageProxy objects.
1945 (WebKit::WebContext::addVisitedLink):
1946 Call addVisitedLinkHash on the visited link provider.
1948 * UIProcess/WebContext.h:
1949 * UIProcess/WebContext.messages.in:
1950 Remove a message that is now implemented by the visited link provider.
1952 * WebKit2.xcodeproj/project.pbxproj:
1955 * WebProcess/WebPage/VisitedLinkTableController.cpp:
1956 (WebKit::VisitedLinkTableController::VisitedLinkTableController):
1957 Add the table controller as a message receiver.
1959 (WebKit::VisitedLinkTableController::~VisitedLinkTableController):
1960 Remove the table controller as a message receiver.
1962 (WebKit::VisitedLinkTableController::isLinkVisited):
1963 Check if the link is visited according to the visited link table.
1965 (WebKit::VisitedLinkTableController::addVisitedLink):
1966 Send the link hash to the UI process if it's not already visited.
1968 (WebKit::VisitedLinkTableController::setVisitedLinkTable):
1969 Set the backing store memory and invalidate all styles.
1971 (WebKit::VisitedLinkTableController::visitedLinkStateChanged):
1972 Invalidate the styles for the given links.
1974 (WebKit::VisitedLinkTableController::allVisitedLinkStateChanged):
1975 Invalidate the styles for all links.
1977 * WebProcess/WebPage/VisitedLinkTableController.h:
1980 * WebProcess/WebPage/VisitedLinkTableController.messages.in:
1983 * WebProcess/WebProcess.cpp:
1984 Remove unused functions; these are handled by VisitedLinkTableController now.
1986 * WebProcess/WebProcess.h:
1987 (WebKit::WebProcess::shouldTrackVisitedLinks):
1990 * WebProcess/WebProcess.messages.in:
1993 2014-03-12 Sergio Villar Senin <svillar@igalia.com>
1995 Rename DEFINE_STATIC_LOCAL to DEPRECATED_DEFINE_STATIC_LOCAL
1996 https://bugs.webkit.org/show_bug.cgi?id=129612
1998 Reviewed by Darin Adler.
2000 For new code use static NeverDestroyed<T> instead.
2002 * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
2003 (WebKit::getIndexStatement):
2004 (WebKit::getObjectStoreStatement):
2005 * Shared/linux/SeccompFilters/SeccompBroker.cpp:
2006 (WebKit::SeccompBrokerClient::shared):
2007 * UIProcess/InspectorServer/WebInspectorServer.cpp:
2008 (WebKit::WebInspectorServer::didReceiveWebSocketUpgradeHTTPRequest):
2010 2014-03-14 Dan Bernstein <mitz@apple.com>
2012 <rdar://problem/16319722> [Cocoa] WKHistoryDelegate is being called for subframes
2013 https://bugs.webkit.org/show_bug.cgi?id=130228
2015 Reviewed by Mark Rowe.
2017 * UIProcess/Cocoa/HistoryClient.mm:
2018 (WebKit::HistoryClient::didNavigateWithNavigationData): Bail out if the frame is not the
2020 (WebKit::HistoryClient::didPerformClientRedirect): Ditto.
2021 (WebKit::HistoryClient::didPerformServerRedirect): Ditto.
2022 (WebKit::HistoryClient::didUpdateHistoryTitle): Ditto.
2024 2014-03-13 Jinwoo Jeong <jw00.jeong@samsung.com>
2026 Refactor Vibration algorithm to use only one timer.
2027 https://bugs.webkit.org/show_bug.cgi?id=130059
2029 Reviewed by Darin Adler.
2031 This patch adds a vibration unit test regression after r161257.
2032 It consists of two short term requests to check
2033 that Vibration could work properly by sequential requests.
2035 Indeed this patch tightens condition of existing tests.
2037 * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2040 2014-03-13 Paul Hankes Drielsma <phd@apple.com>
2042 Add SPI to set a custom user agent on WKWebView
2043 https://bugs.webkit.org/show_bug.cgi?id=130164
2045 Reviewed by Dan Bernstein.
2047 * UIProcess/API/Cocoa/WKWebView.mm:
2048 (-[WKWebView _customUserAgent]):
2049 (-[WKWebView _setCustomUserAgent:]):
2050 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2052 2014-03-13 Paul Hankes Drielsma <phd@apple.com>
2054 Add SPI to run javascript in main frame on WKWebView
2055 https://bugs.webkit.org/show_bug.cgi?id=130047
2057 Reviewed by Anders Carlsson.
2059 * UIProcess/API/Cocoa/WKWebView.mm:
2060 (-[WKWebView _runJavaScriptInMainFrame:]):
2062 2014-03-13 Benjamin Poulain <bpoulain@apple.com>
2064 The viewport code should not depend on WebKitSystemInterface
2065 https://bugs.webkit.org/show_bug.cgi?id=130218
2067 Reviewed by Tim Horton.
2069 Get the viewport size from the UIProcess when creating a new WebProcess.
2070 From there, the value is stored in WebPage and used whenever we need to update
2071 the viewport parameters.
2073 * Shared/WebPageCreationParameters.cpp:
2074 (WebKit::WebPageCreationParameters::encode):
2075 (WebKit::WebPageCreationParameters::decode):
2076 * Shared/WebPageCreationParameters.h:
2077 * UIProcess/WebPageProxy.cpp:
2078 (WebKit::WebPageProxy::internalShowContextMenu):
2079 * UIProcess/WebPageProxy.h:
2080 * UIProcess/ios/WebPageProxyIOS.mm:
2081 (WebKit::WebPageProxy::viewportScreenSize):
2082 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2083 (WebKit::WebChromeClient::viewportScreenSize):
2084 * WebProcess/WebCoreSupport/WebChromeClient.h:
2085 * WebProcess/WebPage/WebPage.cpp:
2086 (WebKit::WebPage::WebPage):
2087 * WebProcess/WebPage/WebPage.h:
2088 * WebProcess/WebPage/ios/WebPageIOS.mm:
2089 (WebKit::WebPage::viewportScreenSize):
2091 2014-03-13 Beth Dakin <bdakin@apple.com>
2093 Do not show extended background during a pinch gesture on iOS
2094 https://bugs.webkit.org/show_bug.cgi?id=130152
2096 <rdar://problem/16303819>
2098 Reviewed by Simon Fraser.
2100 This patch refactors the backgroundColor-setting logic into its own method so that
2101 it can be called from both _didCommitLayerTree and scrollViewDidZoom.
2103 Only set the UIScrollView’s background color when the zoomScale is greater than or
2104 equal to the minimumZoomScale. Also do not set it during the zoom bounce
2105 animation. Otherwise, clear the background color by setting it to nil.
2106 * UIProcess/API/Cocoa/WKWebView.mm:
2107 (-[WKWebView updateScrollViewBackground]):
2108 (-[WKWebView _didCommitLayerTree:WebKit::]):
2109 (-[WKWebView scrollViewDidZoom:]):
2111 2014-03-13 Enrica Casucci <enrica@apple.com>
2113 [iOS WebKit2] block selection should avoid large blocks.
2114 https://bugs.webkit.org/show_bug.cgi?id=130208
2115 <rdar://problem/16251785>
2117 Reviewed by Benjamin Poulain.
2119 When creating a block selection, we should discard blocks that
2120 are larger than most of the visible portion of the document.
2121 This prevents the accidental selection the entire document, which
2122 is fairly common when tapping over empty areas.
2124 * Shared/InteractionInformationAtPosition.cpp:
2125 (WebKit::InteractionInformationAtPosition::encode):
2126 (WebKit::InteractionInformationAtPosition::decode):
2127 * Shared/InteractionInformationAtPosition.h: Removed selectionRects that was not really needed and
2128 added isSelectable to indicate whether the selection can start.
2129 (WebKit::InteractionInformationAtPosition::InteractionInformationAtPosition):
2130 * UIProcess/ios/WKContentViewInteraction.mm:
2131 (-[WKContentView hasSelectablePositionAtPoint:]): Now uses isSelectable.
2132 * WebProcess/WebPage/ios/WebPageIOS.mm:
2133 (WebKit::WebPage::getPositionInformation): Takes into account the userSelect property
2134 to figure out if the element can be selected and discards blocks that are
2135 larger than 97% of the visible area of the document.
2137 2014-03-13 Anders Carlsson <andersca@apple.com>
2139 Rename WKVisitedLinkProvider to _WKVisitedLinkProvider and make it private
2140 https://bugs.webkit.org/show_bug.cgi?id=130207
2142 Reviewed by Dan Bernstein.
2144 * UIProcess/API/Cocoa/WKVisitedLinkProviderPrivate.h: Removed.
2145 * UIProcess/API/Cocoa/WKWebView.mm:
2146 (-[WKWebView initWithFrame:configuration:]):
2147 * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
2148 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2149 (-[WKWebViewConfiguration _visitedLinkProvider]):
2150 (-[WKWebViewConfiguration _setVisitedLinkProvider:]):
2151 * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
2152 * UIProcess/API/Cocoa/_WKVisitedLinkProvider.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKVisitedLinkProvider.h.
2153 * UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKVisitedLinkProvider.mm.
2154 (-[_WKVisitedLinkProvider init]):
2155 * UIProcess/API/Cocoa/_WKVisitedLinkProviderInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKVisitedLinkProviderInternal.h.
2156 * WebKit2.xcodeproj/project.pbxproj:
2158 2014-03-13 Anders Carlsson <andersca@apple.com>
2160 Remove a commented out member function
2161 https://bugs.webkit.org/show_bug.cgi?id=130204
2163 Reviewed by Tim Horton.
2165 * Shared/ChildProcessProxy.h:
2166 (WebKit::ChildProcessProxy::canSendMessage):
2168 2014-03-13 Enrica Casucci <enrica@apple.com>
2170 [iOS WebKit2] Crash on iPad when displaying a select element with options.
2171 https://bugs.webkit.org/show_bug.cgi?id=130200
2172 <rdar://problem/16316187>
2174 Reviewed by Simon Fraser.
2176 _singleSelectionIndex should be initialized to NSNotFound for multiSelect elements.
2178 * UIProcess/ios/forms/WKFormSelectPopover.mm:
2179 (-[WKSelectTableViewController initWithView:hasGroups:]):
2181 2014-03-13 Carlos Garcia Campos <cgarcia@igalia.com>
2183 [GTK] Close the connection when we fail to read from the socket for any unhandled error
2184 https://bugs.webkit.org/show_bug.cgi?id=130191
2186 Reviewed by Martin Robinson.
2188 We currently show an error message, but we should close the
2189 connection avoid entering an infinite loop. Also provide more
2190 information in the error message to help when debugging the issue.
2192 * Platform/IPC/unix/ConnectionUnix.cpp:
2193 (IPC::Connection::readyReadHandler):
2195 2014-03-13 Radu Stavila <stavila@adobe.com>
2197 Webkit not building on XCode 5.1 due to garbage collection no longer being supported
2198 https://bugs.webkit.org/show_bug.cgi?id=130087
2200 Reviewed by Mark Rowe.
2202 Disable garbage collection on macosx when not using internal SDK.
2204 * Configurations/Base.xcconfig:
2206 2014-03-10 Darin Adler <darin@apple.com>
2208 Avoid copy-prone idiom "for (auto item : collection)"
2209 https://bugs.webkit.org/show_bug.cgi?id=129990
2211 Reviewed by Geoffrey Garen.
2213 * Shared/mac/RemoteLayerTreePropertyApplier.mm:
2214 (WebKit::RemoteLayerTreePropertyApplier::applyProperties): Use auto&.
2216 * Shared/mac/RemoteLayerTreeTransaction.mm:
2217 (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): Use auto&
2218 even though the type is a scalar. This does no harm and makes it easier
2219 to spot uses that trigger unnecessary copying with grep.
2220 (WebKit::RemoteLayerTreeTransaction::decode): Ditto.
2221 (WebKit::dumpChangedLayers): Ditto.
2222 * UIProcess/mac/RemoteLayerTreeHost.mm:
2223 (WebKit::RemoteLayerTreeHost::updateLayerTree): Ditto.
2224 * WebProcess/WebProcess.cpp:
2225 (WebKit::WebProcess::visitedLinkStateChanged): Ditto.
2227 2014-03-12 Brian Burg <bburg@apple.com>
2229 Web Inspector: Remove unused callId parameter from evaluateInWebInspector
2230 https://bugs.webkit.org/show_bug.cgi?id=129744
2232 Reviewed by Timothy Hatcher.
2234 * WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:
2235 (WKBundleInspectorEvaluateScriptForTest):
2236 * WebProcess/InjectedBundle/API/c/WKBundleInspector.h:
2237 * WebProcess/WebPage/WebInspector.cpp:
2238 (WebKit::WebInspector::evaluateScriptForTest):
2239 * WebProcess/WebPage/WebInspector.h:
2241 2014-03-13 Laszlo Vidacs <lvidacs.u-szeged@partner.samsung.com>
2243 Fix the !ENABLE(SQL_DATABASE) build
2244 https://bugs.webkit.org/show_bug.cgi?id=130130
2246 Reviewed by Csaba Osztrogonác.
2248 Add missing #ifdef guard to typedef.
2250 * UIProcess/API/C/WKDatabaseManager.cpp:
2252 2014-03-12 Dean Jackson <dino@apple.com>
2254 [WebGL] WebKit1 + WebKit2 iOS clients should check load policy
2255 https://bugs.webkit.org/show_bug.cgi?id=130162
2257 Reviewed by Simon Fraser.
2259 Implement webGLPolicyForURL() methods for iOS.
2261 * Configurations/WebContent-iOS.entitlements: Add the MobileAsset asset type.
2262 * Configurations/WebKit2.xcconfig: Add MobileAsset to iOS link list.
2263 * WebProcess/WebPage/WebPage.cpp: Exclude iOS.
2264 * WebProcess/WebPage/ios/WebPageIOS.mm:
2265 (WebKit::WebPage::webGLPolicyForURL): Call into WKSI.
2266 (WebKit::WebPage::resolveWebGLPolicyForURL):
2268 2014-03-12 Joseph Pecoraro <pecoraro@apple.com>
2270 Web Inspector: Disable REMOTE_INSPECTOR in earlier OS X releases
2271 https://bugs.webkit.org/show_bug.cgi?id=130118
2273 Reviewed by Timothy Hatcher.
2275 * Configurations/FeatureDefines.xcconfig:
2277 2014-03-12 Enrica Casucci <enrica@apple.com>
2279 [iOS WebKit2] Crash when trying to select inside a video element with longpress..
2280 https://bugs.webkit.org/show_bug.cgi?id=130095
2281 <rdar://problem/16294534>
2283 Reviewed by Benjamin Poulain.
2285 We only need to set the assisted node for nodes that will receive an
2286 input peripheral (keyboard, picker, popover, etc.).
2288 * WebProcess/WebPage/ios/WebPageIOS.mm:
2289 (WebKit::WebPage::rangeForWebSelectionAtPosition):
2290 (WebKit::WebPage::elementDidFocus):
2292 2014-03-12 Simon Fraser <simon.fraser@apple.com>
2294 Have the scrolling tree track the viewport size, not the viewport rect
2295 https://bugs.webkit.org/show_bug.cgi?id=130141
2297 Reviewed by Beth Dakin.
2299 The scrolling tree only needs to know the size of the viewport, not its
2300 origin, since the origin is deduced from the updated scroll position.
2302 * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
2303 (ArgumentCoder<ScrollingStateScrollingNode>::encode):
2304 (ArgumentCoder<ScrollingStateScrollingNode>::decode):
2306 2014-03-12 Commit Queue <commit-queue@webkit.org>
2308 Unreviewed, rolling out r165481.
2309 https://bugs.webkit.org/show_bug.cgi?id=130151
2311 That didn't go well. (Requested by kling on #webkit).
2315 https://bugs.webkit.org/show_bug.cgi?id=130140
2316 http://trac.webkit.org/changeset/165481
2318 2014-03-12 Carlos Garcia Campos <cgarcia@igalia.com>
2320 [GTK] Runtime error when page is closed while print operation is in progress
2321 https://bugs.webkit.org/show_bug.cgi?id=129869
2323 Reviewed by Anders Carlsson.
2325 Sometimes when the page is closed right after printing the web
2326 process aborts with the runtime message "pure virtual method
2327 called terminate called without an active exception".
2328 This happens because the page is closed when the pages have been
2329 printed, but print job is still ongoing sending the data to the
2330 printer. When print job finishes, we try to notify the UI process
2331 sending the print callback message using WebPage::send(), but the
2332 web page object has been destroyed. The virtual method it complains
2333 about is probably MessageSender::messageSenderDestinationID() used
2334 by send(). Since our print operation is always asynchronous, we
2335 need a way to notify the web page when the print operation has
2336 actually finished to clean it up, but also notify the print
2337 operation when the page has been closed to not try to notify the
2338 UI process in that case.
2340 * WebProcess/WebPage/WebPage.cpp:
2341 (WebKit::WebPage::close): Call disconnectFromPage to notify the
2342 print operation in case there's an ongoing print job.
2343 (WebKit::WebPage::endPrinting): Do not cleanup the print operation
2344 here, since the print opertation might not have finished yet.
2345 (WebKit::WebPage::didFinishPrintOperation): Send
2346 PrintFinishedCallback message to the Ui process and cleanup the
2348 * WebProcess/WebPage/WebPage.h:
2349 * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
2350 (WebKit::WebPrintOperationGtk::disconnectFromPage): Set m_webPage
2352 (WebKit::WebPrintOperationGtk::printDone): Call
2353 didFinishPrintOperation() is the web page hasn't been closed.
2354 * WebProcess/WebPage/gtk/WebPrintOperationGtk.h:
2356 2014-03-12 Andreas Kling <akling@apple.com>
2358 BundlePageDiagnosticLoggingClient leaks every string passing through it.
2359 <https://webkit.org/b/130140>
2360 <rdar://problem/15416838>
2362 Use toAPI() instead of toCopiedAPI() so the receiving end doesn't need
2363 to worry about adopting the WKStringRef.
2365 Reviewed by Anders Carlsson.
2367 * WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp:
2368 (WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessage):
2370 2014-03-12 Tim Horton <timothy_horton@apple.com>
2372 Hook up image controls for WebKit1
2373 https://bugs.webkit.org/show_bug.cgi?id=130062
2374 <rdar://problem/15964809>
2376 Reviewed by Brady Eidson.
2378 * Shared/ContextMenuContextData.cpp:
2379 (WebKit::ContextMenuContextData::ContextMenuContextData):
2381 2014-03-11 Alexey Proskuryakov <ap@apple.com>
2383 REGRESSION (r165356): [Mac] Multi-part key bindings don't work
2384 https://bugs.webkit.org/show_bug.cgi?id=130100
2386 Reviewed by Darin Adler.
2388 Restore the previous behavior, where we only interpreted keydowns (including those
2389 coming through performKeyEquivalent).
2391 In the future, we might send all events to input methods, but not to key bindings.
2393 * UIProcess/API/mac/WKView.mm:
2395 (-[WKView flagsChanged:]):
2397 2014-03-11 Beth Dakin <bdakin@apple.com>
2399 _pageExtendedBackgroundColor should not be exposed on WKWebView
2400 https://bugs.webkit.org/show_bug.cgi?id=130093
2402 Reviewed by Simon Fraser.
2404 Added comment indicating that _pageExtendedBackgroundColor is deprecated.
2405 * UIProcess/API/Cocoa/WKViewPrivate.h:
2407 _pageExtendedBackgroundColor now returns nil, but the conversation functionality
2408 is maintained with a convenience method pageExtendedBackgroundColor.
2409 * UIProcess/API/Cocoa/WKWebView.mm:
2410 (-[WKWebView pageExtendedBackgroundColor]):
2411 (-[WKWebView _didCommitLayerTree:WebKit::]):
2412 (-[WKWebView _pageExtendedBackgroundColor]):
2414 Added comment indicating that _pageExtendedBackgroundColor is deprecated.
2415 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2418 * UIProcess/API/ios/WKViewIOS.mm:
2419 (-[WKView _pageExtendedBackgroundColor]):
2421 2014-03-11 Jae Hyun Park <jaepark@webkit.org>
2423 [GTK][CMake] Add HARFBUZZ_INCLUDE_DIRS to WebKit and WebKit2
2424 https://bugs.webkit.org/show_bug.cgi?id=130070
2426 Reviewed by Martin Robinson.
2428 * PlatformGTK.cmake:
2430 2014-03-10 Dan Bernstein <mitz@apple.com>
2432 [Cocoa] Expose WebPageProxy::close
2433 https://bugs.webkit.org/show_bug.cgi?id=130068
2435 Reviewed by Adele Peterson.
2437 * UIProcess/API/Cocoa/WKWebView.mm:
2438 (-[WKWebView _close]):
2439 * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2441 2014-03-10 Benjamin Poulain <bpoulain@apple.com>
2443 [iOS][WebKit 2] Wire the unobscured rect in the WebProcess
2444 https://bugs.webkit.org/show_bug.cgi?id=130058
2446 Reviewed by Simon Fraser.
2448 * WebProcess/WebPage/ios/WebPageIOS.mm:
2449 (WebKit::WebPage::updateVisibleContentRects):
2451 2014-03-10 Simon Fraser <simon.fraser@apple.com>
2454 https://bugs.webkit.org/show_bug.cgi?id=130048
2456 Reviewed by Anders Carlsson.
2458 * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
2459 (decodeObject): Code is simpler and less leaky without the RetainPtr.
2460 * UIProcess/API/Cocoa/WKNavigationAction.mm: Fix _originalURL leak
2461 by making it a RetainPtr and implementing the getter and setter.
2462 (-[WKNavigationAction _setOriginalURL:]):
2463 (-[WKNavigationAction _originalURL]):
2465 2014-03-10 Beth Dakin <bdakin@apple.com>
2467 Set background color of WK2's UIScrollView to the pageExtendedBackgroundColor
2468 https://bugs.webkit.org/show_bug.cgi?id=129919
2470 Reviewed by Benjamin Poulain.
2472 Make the pageExtendedBackgroundColor part of a RemoteLayerTreeTransaction.
2473 * Shared/mac/RemoteLayerTreeTransaction.h:
2474 (WebKit::RemoteLayerTreeTransaction::pageExtendedBackgroundColor):
2475 (WebKit::RemoteLayerTreeTransaction::setPageExtendedBackgroundColor):
2476 * Shared/mac/RemoteLayerTreeTransaction.mm:
2477 (WebKit::RemoteLayerTreeTransaction::encode):
2478 (WebKit::RemoteLayerTreeTransaction::decode):
2480 Set the background color of the UIScrollView based on the
2481 pageExtendedBackgroundColor.
2482 * UIProcess/API/Cocoa/WKWebView.mm:
2483 (-[WKWebView _didCommitLayerTree:WebKit::]):
2485 For the sake of PLATFORM(MAC), continue to support the fact that this color can be
2486 set via a message from the WebProcess or the new RemoteLayerTreeTransaction.
2487 * UIProcess/WebPageProxy.h:
2489 Cache the pageExtendedBackgroundColor as provided by the
2490 RemoteLayerTreeTransaction.
2491 * UIProcess/ios/WebPageProxyIOS.mm:
2492 (WebKit::WebPageProxy::didCommitLayerTree):
2494 It’s not necessary to do anything here in non-Mac platforms anymore.
2495 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2496 (WebKit::WebChromeClient::pageExtendedBackgroundColorDidChange):
2498 Include the pageExtendedBackgroundColor in the RemoteLayerTreeTransaction.
2499 * WebProcess/WebPage/WebPage.cpp:
2500 (WebKit::WebPage::willCommitLayerTree):
2502 2014-03-10 Benjamin Poulain <bpoulain@apple.com>
2504 Generalize unobscured rect to all ports
2505 https://bugs.webkit.org/show_bug.cgi?id=130036
2507 Reviewed by Simon Fraser.
2509 * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
2510 (WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
2511 (WebKit::ViewGestureGeometryCollector::collectGeometryForMagnificationGesture):
2512 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2513 (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
2515 2014-03-10 Dan Bernstein <mitz@apple.com>
2517 <rdar://problem/16278716> [Cocoa] Allow setting a custom group identifier on a WKWebView
2518 https://bugs.webkit.org/show_bug.cgi?id=130033
2520 Reviewed by Tim Horton.
2522 * UIProcess/API/Cocoa/WKWebView.mm:
2523 (-[WKWebView initWithFrame:configuration:]): Create a page group with the group identifier
2524 from the configuration, if it’s non-empty.
2525 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2526 (-[WKWebViewConfiguration _groupIdentifier]): Added this accessor.
2527 (-[WKWebViewConfiguration _setGroupIdentifier:]): Ditto.
2528 * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: Declared _groupIdentifier property.
2530 2014-03-10 Enrica Casucci <enrica@apple.com>
2532 WebKit2: Crash in WebPage::getPositionInformation.
2533 https://bugs.webkit.org/show_bug.cgi?id=129936
2534 <rdar://problem/16264550>
2536 Reviewed by Eric Carlson.
2538 Missing null check on the node renderer in one code path.
2539 If the page body is smaller than the document, hit testing
2540 will return HTMLHtmlElement that has no renderer.
2542 * WebProcess/WebPage/ios/WebPageIOS.mm:
2543 (WebKit::WebPage::getPositionInformation):
2545 2014-03-10 Martin Robinson <mrobinson@igalia.com>
2547 [GTK] [CMake] Clean up library linking
2548 https://bugs.webkit.org/show_bug.cgi?id=129782
2550 Reviewed by Philippe Normand.
2552 * PlatformGTK.cmake: Use the new macro.
2554 2014-03-10 Carlos Garcia Campos <cgarcia@igalia.com>
2556 [GTK] The web process can finish while a print operation is still ongoing
2557 https://bugs.webkit.org/show_bug.cgi?id=129871
2559 Reviewed by Martin Robinson.
2561 This can happen when the last page is closed while the print job
2562 is sending data to the printer.
2564 * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: Disable web
2565 process termination when the print job is sending data to the
2566 printer and enable it again when job finishes.
2568 2014-03-09 Jeong Yong-uk <yong@company100.com>
2570 Update comment in NetworkResourceLoader
2571 https://bugs.webkit.org/show_bug.cgi?id=129997
2573 Reviewed by Andreas Kling.
2575 NetworkResourceLoader::resourceHandleStopped() has been renamed to
2576 NetworkResourceLoader::cleanup() but the comment is not updated.
2578 * NetworkProcess/NetworkResourceLoader.cpp:
2579 (WebKit::NetworkResourceLoader::start):
2581 2014-03-09 Alexey Proskuryakov <ap@apple.com>
2585 * WebProcess/WebPage/ios/WebPageIOS.mm: Include WebCore/KeyboardEvent.h.
2587 2014-03-06 Alexey Proskuryakov <ap@apple.com>
2589 [Mac] Don't perform a round-trip through WebProcess before interpreting key events
2590 https://bugs.webkit.org/show_bug.cgi?id=129812
2592 Reviewed by Darin Adler.
2594 * Shared/NativeWebKeyboardEvent.h:
2595 * Shared/WebEvent.h:
2596 (WebKit::WebKeyboardEvent::handledByInputMethod):
2597 (WebKit::WebKeyboardEvent::commands):
2598 * Shared/WebEventConversion.cpp:
2599 (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
2600 * Shared/WebKeyboardEvent.cpp:
2601 (WebKit::WebKeyboardEvent::WebKeyboardEvent):
2602 (WebKit::WebKeyboardEvent::~WebKeyboardEvent):
2603 (WebKit::WebKeyboardEvent::encode):
2604 (WebKit::WebKeyboardEvent::decode):
2605 * Shared/mac/NativeWebKeyboardEventMac.mm:
2606 (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):
2607 * Shared/mac/WebEventFactory.h:
2608 * Shared/mac/WebEventFactory.mm:
2609 (WebKit::WebEventFactory::createWebKeyboardEvent):
2610 Keyboard events now carry results of interpretation with them.
2611 Ideally, mouse events should also have a handledByInputMethod member, because IMs
2612 can handle events, but that can wait until we have actual bugs caused by not diabling
2613 default processing for these.
2615 * UIProcess/API/mac/WKView.mm:
2616 (-[WKView becomeFirstResponder]): Updated for new NativeWebKeyboardEvent contructor
2617 signature. We don't interpret the event in this code path.
2618 (-[WKView doCommandBySelector:]): Added logging.
2619 (-[WKView performKeyEquivalent:]): Reimplemented Esc and Cmd+period handling to avoid
2620 infinite loops and re-entrancy. These two work in a unique way in AppKit.
2621 Interpret key event before sending it down to WebProcess.
2622 (-[WKView keyUp:]): Interpret key event before sending it down to WebProcess.
2623 We need to tell IMs about the event, but key binding processing is moot, all commands
2624 are executed on keydown.
2625 (-[WKView keyDown:]): Interpret the event.
2626 (-[WKView flagsChanged:]): Ditto.
2627 (-[WKView _interpretKeyEvent:savingCommandsTo:WebCore::]): Added an assertion in
2628 consumedByIM code path.
2629 (-[WKView _executeSavedCommandBySelector:]): Added logging.
2631 * UIProcess/PageClient.h:
2632 * UIProcess/ios/PageClientImplIOS.h:
2633 * UIProcess/ios/PageClientImplIOS.mm:
2634 * UIProcess/mac/PageClientImpl.h:
2635 * UIProcess/mac/PageClientImpl.mm:
2636 * UIProcess/WebPageProxy.h:
2637 * UIProcess/WebPageProxy.messages.in:
2638 * UIProcess/ios/WebPageProxyIOS.mm:
2639 * UIProcess/mac/WebPageProxyMac.mm:
2640 Removed interpretQueuedKeyEvent/interpretKeyEvent, WebProcess no longer asks UIProcess to do this.
2642 * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
2643 (WebKit::WebEditorClient::handleKeyboardEvent):
2644 * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2645 (WebKit::WebEditorClient::handleKeyboardEvent):
2646 (WebKit::WebEditorClient::handleInputMethodKeydown):
2647 WebPage::handleEditingKeyboardEvent is now one function instead of two with a boolean
2648 switch between two behaviors.
2650 * WebProcess/WebPage/WebPage.cpp:(WebKit::WebPage::WebPage):
2651 * WebProcess/WebPage/WebPage.h:
2652 Removed m_keyboardEventBeingInterpreted, as we no longer send the event for interpretation.
2653 This means that we sometimes have to pass a null event down to WebCore, but I wasn't
2654 able to find any behavior differences from us doing so.
2656 * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::handleEditingKeyboardEvent):
2659 * WebProcess/WebPage/mac/WebPageMac.mm:
2660 (WebKit::WebPage::executeKeypressCommandsInternal): When we don't have an event,
2661 use current frame as a target, just like input method messages do.
2662 (WebKit::WebPage::handleEditingKeyboardEvent): This function no longer saves commands,
2663 it only interprets them.
2664 Added a check for Esc, as we don't want to handle it in keydown event handler.
2665 (WebKit::WebPage::insertText): Pass 0 instead of m_keyboardEventBeingInterpreted.
2666 (WebKit::WebPage::insertDictatedText): Ditto.
2667 (WebKit::WebPage::executeKeypressCommands): Ditto.
2669 2014-03-09 Zalan Bujtas <zalan@apple.com>
2671 Subpixel rendering: Pass FloatSize boxsize to transform animations to support device pixel sizing.
2672 https://bugs.webkit.org/show_bug.cgi?id=129985
2674 Reviewed by Simon Fraser.
2676 This is in preparation to stop passing integral positioned boxes to transform animations.
2678 No change in behavior.
2680 * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
2682 2014-03-08 Simon Fraser <simon.fraser@apple.com>
2684 [iOS Wk2] Can't scroll after going back to page in page cache
2685 https://bugs.webkit.org/show_bug.cgi?id=129989
2686 <rdar://problem/16217588>
2688 Reviewed by Dan Bernstein.
2690 iOS has a special FrameLoader::forceLayoutWithoutRecalculatingStyle()
2691 function that is called instead of FrameView::forceLayout(). This was unimplemented
2692 for the WK2 FrameLoaderClient, so no layout was forced, with the result
2693 that the contentSize was never updated and scrolling was broken.
2695 Fix by renaming the client function to forceLayoutOnRestoreFromPageCache()
2696 and having it return a bool to say whether the default forceLayout()
2697 should be done. WK1 can then continue to have its custom behavior,
2698 and Wk2 will simply do a forceLayout().
2700 Also remove FrameLaoderClient::forceLayout(), which was never called.
2702 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2703 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2704 * WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
2705 (WebKit::WebFrameLoaderClient::forceLayoutOnRestoreFromPageCache):
2707 2014-03-08 Simon Fraser <simon.fraser@apple.com>
2709 [iOS WK2] Get position:fixed working slighlty better
2710 https://bugs.webkit.org/show_bug.cgi?id=129988
2712 Reviewed by Dan Bernstein.
2714 iOS uses fixed layout, but does not want fixed elements laid
2715 out relative to the frame.
2717 * WebProcess/WebPage/WebPage.cpp:
2718 (WebKit::WebPage::setUseFixedLayout):
2720 2014-03-08 Jon Lee <jonlee@apple.com>
2722 iOS broken after r165342
2723 https://bugs.webkit.org/show_bug.cgi?id=129987
2725 Reviewed by Simon Fraser.
2727 * NetworkProcess/ios/NetworkProcessIOS.mm:
2728 (WebKit::NetworkProcess::platformLowMemoryHandler): Add missing stub implementation for
2729 platformLowMemoryHandler().
2731 2014-03-08 Eric Carlson <eric.carlson@apple.com>
2733 [iOS] media preferences not initialized correctly in WebKit2
2734 https://bugs.webkit.org/show_bug.cgi?id=129983
2736 Reviewed by Dan Bernstein.
2738 * Shared/WebPreferencesStore.h: Initialize mediaPlaybackAllowsInline and
2739 mediaPlaybackRequiresUserGesture correctly for iOS.
2741 2014-03-08 Jeremy Jones <jeremyj@apple.com>
2743 Allow media element to supply the video layer after fullscreen transition has already begun.
2744 https://bugs.webkit.org/show_bug.cgi?id=129870
2746 Reviewed by Eric Carlson.
2748 WebVideoFullscreenManager and WebVideoFullscreenManagerProxy do their own remote hosting of the video layer instead of needing the video layer to have already been hosted elsewhere. This allows the removal of the coordination with WebPageProxy via a RemoteLayerTreeTransaction.
2750 * Shared/mac/RemoteLayerTreeTransaction.h:
2751 Remove m_videoLayerIDsPendingFullscreen and accessors.
2753 * Shared/mac/RemoteLayerTreeTransaction.mm:
2754 (WebKit::RemoteLayerTreeTransaction::encode):
2755 Don't encode m_videoLayerIDsPendingFullscreen
2757 (WebKit::RemoteLayerTreeTransaction::decode):
2758 Don't decode m_videoLayerIDsPendingFullscreen
2760 * UIProcess/ios/WebPageProxyIOS.mm:
2761 (WebKit::WebPageProxy::didCommitLayerTree):
2762 Don't forward didCommitLayerTree to m_videoFullscreenManager.
2764 * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
2765 Remove code for synchronizing with the RenderTree.
2766 Add a hosting layer and methods to keep video layer frame and video gravity synchronized.
2768 * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
2769 Change IPC interface to fascilitate rehosting video layer with a instead of coordinating with the RenderTree by PlatformLayerID.
2771 * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2772 (WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy):
2773 Remove initialization for removed members.
2775 (WebKit::WebVideoFullscreenManagerProxy::enterFullscreenWithID):
2776 Rehost the video layer by id and pass on the layer.
2777 This replaces didCommitLayerTree() and willLendVideoLayerWithID().
2779 (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
2780 Cleanup the hosting layer.
2782 (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
2783 Forward on the video layer's frame to keep the hosted layer in sync with the interface.
2785 (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerGravity):
2786 Forward the videolayer gravity.
2788 * WebKit2.xcodeproj/project.pbxproj:
2789 Rename WebVideoFullscreenManager.cpp to WebVideoFullscreenManager.mm
2791 * WebProcess/WebPage/WebPage.cpp:
2792 (WebKit::WebPage::willCommitLayerTree):
2793 Don't invovle the m_videoFullscreenManager in layer tree transactions.
2795 * WebProcess/ios/WebVideoFullscreenManager.h:
2796 Remove code that synchronizes with the render tree via RemoteLayerTreeTransaction.
2797 Instead rehost the video layer directly.
2798 Instead of hoping the WebVideoFullscreenModel has a videoLayer, supply one into which
2799 it can add whatever it likes as needed.
2801 * WebProcess/ios/WebVideoFullscreenManager.messages.in:
2802 No more explicit borrowing and returning video layers.
2803 Add functions to keep video layer bounds and gravity in sync with the UI.
2805 * WebProcess/ios/WebVideoFullscreenManager.mm: Renamed from Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.cpp.
2806 Removed code for synchronizing via RemoteLAyerTreeTransaction.
2808 (WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager):
2809 Remove initialization for removed memeber m_sendUnparentVideoLayerTransaction.
2811 (WebKit::WebVideoFullscreenManager::enterFullscreenForNode):
2812 Creates a fullscreen layer, gives it to the WebVideoFullscreenModel to fill in,
2813 and hosts it in a context to send to the UIProcess.
2815 (WebKit::WebVideoFullscreenManager::exitFullscreenForNode):
2816 remove enterFullscreen() and just directly send the IPC message.
2818 (WebKit::WebVideoFullscreenManager::didExitFullscreen):
2819 Clean up the hosting context.
2821 (WebKit::WebVideoFullscreenManager::setVideoLayerGravityEnum):
2822 Forward on the video gravity. Type convert from unsigned to MediaPlayer::VideoGravity.
2824 2014-03-08 Andreas Kling <akling@apple.com>
2826 [WK2] Improve the network process low memory handler.
2827 <https://webkit.org/b/129977>
2829 Split the network process low memory handler into platform-specific
2830 and shared parts. The shared part tells FastMalloc to release freed
2831 pages back to the OS.
2833 For Mac, added a call to purge the in-memory part of CFURLCache.
2834 Remove the malloc_zone_pressure_relief() since that is now taken care
2835 of by the shared MemoryPressureHandler code.
2837 Reviewed by Darin Adler.
2839 * NetworkProcess/NetworkProcess.cpp:
2840 (WebKit::NetworkProcess::initializeNetworkProcess):
2841 (WebKit::NetworkProcess::lowMemoryHandler):
2842 (WebKit::NetworkProcess::platformLowMemoryHandler):
2843 * NetworkProcess/NetworkProcess.h:
2844 * NetworkProcess/mac/NetworkProcessMac.mm:
2845 (WebKit::NetworkProcess::platformLowMemoryHandler):
2846 (WebKit::NetworkProcess::platformInitializeNetworkProcess):
2848 2014-03-08 Jae Hyun Park <jaepark@webkit.org>
2850 Remove unnecessary casting in NetworkProcessMainUnix.cpp
2851 https://bugs.webkit.org/show_bug.cgi?id=129968
2853 Reviewed by Andreas Kling.
2855 * NetworkProcess/unix/NetworkProcessMainUnix.cpp:
2856 Since socket is an int, int casting is not necessary.
2858 (WebKit::NetworkProcessMain):
2860 2014-03-08 Aaron Golden <golden@inkling.com>
2862 Prevent processes spawned by WebProcess from trying to insert the SecItem shim.
2863 https://bugs.webkit.org/show_bug.cgi?id=129864
2865 Reviewed by Anders Carlsson.
2867 * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm:
2868 (WebKit::WebContentProcessMainDelegate::doPreInitializationWork):
2870 2014-03-07 Tim Horton <timothy_horton@apple.com>
2873 https://bugs.webkit.org/show_bug.cgi?id=129600
2874 <rdar://problem/15260216>
2876 Reviewed by Anders Carlsson.
2878 Add a single custom content provider which installs a very primitive PDF view
2879 in place of the WKContentView if a PDF is loaded in the main frame.
2881 * Configurations/WebKit2.xcconfig:
2882 Link against CorePDF, for UIPDFPageView.
2884 * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:
2885 (-[WKWebViewContentProviderRegistry init]):
2886 Initialize the registry, using WKPDFView for all PDF MIME types.
2888 * WebKit2.xcodeproj/project.pbxproj:
2889 * UIProcess/ios/WKPDFView.h: Added.
2890 * UIProcess/ios/WKPDFView.mm: Added.
2891 Add a very simple PDF view based on UIPDFPageView. Additional functionality
2892 can come in the future; right now, we just create one view for each page, and
2893 depend on CATiledLayer to only paint the pages that are being displayed.
2895 2014-03-07 Andreas Kling <akling@apple.com>
2897 ArgumentEncoder and ArgumentDecoder should be fastmalloced.
2898 <https://webkit.org/b/129960>
2900 Reviewed by Ryosuke Niwa.
2902 * Platform/IPC/ArgumentDecoder.h:
2903 * Platform/IPC/ArgumentEncoder.h:
2905 2014-03-07 Martin Robinson <mrobinson@igalia.com>
2907 Fix the GTK+ build after the recent iOS merge.
2909 * UIProcess/API/gtk/PageClientImpl.cpp: Make some methods available to non-Cocoa ports and fix some signatures.
2910 * UIProcess/WebPageProxy.h: Ditto.
2912 2014-03-07 Ryuan Choi <ryuan.choi@samsung.com>
2914 Unreviewed. Fix build on the EFL port after r165303
2916 * UIProcess/CoordinatedGraphics/WebView.cpp:
2917 (WebKit::WebView::didCommitLoadForMainFrame): Added new parameters.
2918 * UIProcess/CoordinatedGraphics/WebView.h: Ditto.
2919 * UIProcess/WebPageProxy.h:
2920 * UIProcess/efl/WebViewEfl.cpp: Added dummy didFinishLoadingDataForCustomContentProvider()
2921 (WebKit::WebViewEfl::exitFullScreen):
2922 (WebKit::WebViewEfl::didFinishLoadingDataForCustomContentProvider):
2923 * UIProcess/efl/WebViewEfl.h: Ditto.
2925 2014-03-07 Enrica Casucci <enrica@apple.com>
2927 [iOS WebKit2] Keyboard accessory comes up when I click a link.
2928 https://bugs.webkit.org/show_bug.cgi?id=129949
2929 <rdar://problem/16265305>
2931 Reviewed by Simon Fraser.
2933 We need to create the accessory view only when needed.
2935 * UIProcess/ios/WKContentViewInteraction.mm:
2936 (-[WKContentView requiresAccessoryView]):
2937 (-[WKContentView inputAccessoryView]):
2939 2014-03-07 Enrica Casucci <enrica@apple.com>
2941 [iOS WebKit2] Long-press on a link shows just "Copy".
2942 https://bugs.webkit.org/show_bug.cgi?id=129938
2943 <rdar://problem/16266054>
2945 Reviewed by Benjamin Poulain.
2947 When adding a FIXME comment, I accidentally removed the ! on
2948 the if (!element) condition.
2950 * WebProcess/WebPage/ios/WebPageIOS.mm:
2951 (WebKit::WebPage::getPositionInformation):
2953 2014-03-07 Tim Horton <timothy_horton@apple.com>
2955 [WebKit2][iOS] Main-frame custom content providers
2956 https://bugs.webkit.org/show_bug.cgi?id=129809
2958 Reviewed by Dan Bernstein.
2960 Re-introduce custom content providers to WebKit2 (removed in r152841), but
2963 * UIProcess/API/Cocoa/WKWebView.mm:
2964 (-[WKWebView initWithFrame:configuration:]):
2965 Send the initial MIME types that have custom content providers to the WebProcess.
2967 (-[WKWebView dealloc]):
2968 Unregister our page from the content provider registry.
2970 (-[WKWebView _setHasCustomContentView:loadedMIMEType:]):
2971 Install/uninstall the custom content provider. Create a view, if needed,
2972 based on the class that the registry has associated with the given MIME type.
2973 We unparent the WKContentView while the custom content provider is active,
2974 and re-use the existing WKScrollView to contain the custom content provider.
2976 (-[WKWebView _didFinishLoadingDataForCustomContentProviderWithSuggestedFilename:dataReference:]):
2977 Forward loaded data on to the custom content provider for display.
2979 (-[WKWebView _didCommitLayerTree:WebKit::]):
2980 Assert that we aren't getting layer tree commits while using a custom content provider.
2982 (-[WKWebView viewForZoomingInScrollView:]):
2983 If we're using a custom content provider, its view should be used for zooming
2984 instead of the (unparented) web content view.
2986 (-[WKWebView hasContentView]):
2987 (-[WKWebView scrollViewWillBeginZooming:withView:]):
2988 (-[WKWebView scrollViewWillBeginDragging:]):
2989 (-[WKWebView _didFinishScrolling]):
2990 (-[WKWebView _updateVisibleContentRects]):
2991 If we do not have a parented WKContentView because we are using a custom
2992 content provider, we should not forward scroll view related changes to it.
2994 (-[WKWebView _frameOrBoundsChanged]):
2995 Update the minimum size of the custom content provider if the web view size changes.
2997 * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2998 (-[WKWebViewConfiguration copyWithZone:]):
2999 (-[WKWebViewConfiguration _contentProviderRegistry]):
3000 (-[WKWebViewConfiguration _setContentProviderRegistry:]):
3001 * UIProcess/API/Cocoa/WKWebViewConfigurationInternal.h: Added.
3002 Add an internal WKWebViewConfiguration property, the WKWebViewContentProviderRegistry.
3004 * UIProcess/API/Cocoa/WKWebViewInternal.h:
3006 * UIProcess/Cocoa/WKWebViewContentProvider.h: Added.
3007 A minimal protocol for informing custom content providers of changes to
3008 the size of the view, the represented data, and the owning scroll view.
3010 * UIProcess/Cocoa/WKWebViewContentProviderRegistry.h: Added.
3011 * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: Added.
3012 (-[WKWebViewContentProviderRegistry addPage:]):
3013 (-[WKWebViewContentProviderRegistry removePage:]):
3014 (-[WKWebViewContentProviderRegistry registerProvider:forMIMEType:]):
3015 (-[WKWebViewContentProviderRegistry providerForMIMEType:]):
3016 (-[WKWebViewContentProviderRegistry mimeTypesWithContentProviders]):
3017 New class, keeps track of a mapping from MIME types to UIViews that
3018 conform to the WKWebViewContentProvider protocol.
3020 * UIProcess/WebPageProxy.cpp:
3021 (WebKit::WebPageProxy::WebPageProxy):
3022 (WebKit::WebPageProxy::didCommitLoadForFrame):
3023 * UIProcess/WebPageProxy.h:
3024 * UIProcess/WebPageProxy.messages.in:
3026 * UIProcess/PageClient.h:
3027 * UIProcess/ios/PageClientImplIOS.h:
3028 * UIProcess/ios/PageClientImplIOS.mm:
3029 (WebKit::PageClientImpl::PageClientImpl):
3030 (WebKit::PageClientImpl::didCommitLoadForMainFrame):
3031 (WebKit::PageClientImpl::didFinishLoadingDataForCustomContentProvider):
3032 * UIProcess/mac/PageClientImpl.h:
3033 * UIProcess/mac/PageClientImpl.mm:
3034 (WebKit::PageClientImpl::didCommitLoadForMainFrame):
3035 (WebKit::PageClientImpl::didFinishLoadingDataForCustomContentProvider):
3036 Add parameters to didCommitLoadForMainFrame, indicating if we should use
3037 a custom content provider to display the main frame, and what MIME type
3038 was loaded in said frame, and add didFinishLoadingDataForCustomContentProvider.
3039 On iOS, forward these to the WKWebView.
3040 Also, give PageClientImplIOS a reference to the WKWebView.
3042 * UIProcess/ios/WKContentView.mm:
3043 (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::webView:]):
3045 * WebKit2.xcodeproj/project.pbxproj:
3046 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
3047 (-[WKWebProcessPlugInFrame _hasCustomContentProvider]):
3048 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h:
3049 Expose whether or not a given frame has a custom content provider to the plug-in.
3051 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3052 (WebKit::WebFrameLoaderClient::WebFrameLoaderClient):
3053 (WebKit::WebFrameLoaderClient::hasHTMLView):
3054 (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
3055 (WebKit::WebFrameLoaderClient::committedLoad):
3056 (WebKit::WebFrameLoaderClient::finishedLoading):
3057 (WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
3058 (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
3059 (WebKit::WebFrameLoaderClient::canCachePage):
3060 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3061 (WebKit::WebFrameLoaderClient::frameHasCustomContentProvider):
3062 Restore WebFrameLoaderClient custom representation code, which ensures
3063 that data is routed correctly (to the UI process, and not to WebCore) and
3064 that we don't try to use the page cache for frames with content providers.
3066 * WebProcess/WebPage/WebPage.cpp:
3067 (WebKit::WebPage::mainFrameHasCustomContentProvider):
3068 (WebKit::WebPage::addMIMETypeWithCustomContentProvider):
3069 (WebKit::WebPage::shouldUseCustomContentProviderForResponse):
3070 (WebKit::WebPage::canShowMIMEType):
3071 * WebProcess/WebPage/WebPage.h:
3072 * WebProcess/WebPage/WebPage.messages.in:
3073 Keep a list of MIME types which can be displayed via custom content providers
3074 in WebPage, which will be pushed down from the registry as new providers
3075 are added. Plug-ins still take precendence over custom content providers.
3077 2014-03-07 Anders Carlsson <andersca@apple.com>
3079 MigrateHeaders.make should remove C SPI includes from WebKit2 headers
3080 https://bugs.webkit.org/show_bug.cgi?id=129937
3081 <rdar://problem/15920020>
3083 Reviewed by Tim Horton.
3085 * WebKit2.xcodeproj/project.pbxproj:
3086 Make WKPreferences.h and all headers it includes public. Update the post processing of WKBase.h
3087 to account for WKBase.h now being a public header again.
3089 2014-03-07 Alexey Proskuryakov <ap@apple.com>
3091 REGRESSION (r164847): Pressing the command key while hovering an element causes it to un-hover
3092 https://bugs.webkit.org/show_bug.cgi?id=129872
3094 Reviewed by Tim Horton.
3096 * UIProcess/API/Cocoa/WKViewPrivate.h: Changes in performDictionaryLookupAtCurrentMouseLocation
3097 were also not correct, because the current event could be a keyboard one (Cmd+Ctrl+D).
3098 But this SPI is unused, and can be simply removed.
3100 * UIProcess/API/mac/WKView.mm: (-[WKView _postFakeMouseMovedEventForFlagsChangedEvent:]):
3101 locationInWindow is undefined for keyboard events, so we have to use current location.
3102 Thankfully, there is a method that returns the location in appropriate coordinate
3103 space, unlike +[NSEvent mouseLocation] that we used before.
3105 2014-03-07 Andy Estes <aestes@apple.com>
3107 [iOS] Install WebKit2 XPC services to the correct place during iOS Simulator builds
3108 https://bugs.webkit.org/show_bug.cgi?id=129914
3110 Reviewed by Dan Bernstein.
3112 We weren't specifying INSTALL_PATH for iOS Simulator builds in
3113 BaseXPCService.xcconfig, and r164576 changed INSTALL_PATH to
3114 INSTALL_PATH_ACTUAL. This caused XPC services to start being installed
3115 to the root of the iOS Simulator SDK. Fix this by setting
3116 INSTALL_PATH_ACTUAL for iphonesimulator.
3118 * Configurations/BaseXPCService.xcconfig:
3120 2014-03-07 Andreas Kling <akling@apple.com>
3122 [Mac] Notify system malloc of fake memory pressure.
3123 <https://webkit.org/b/129908>
3125 Reviewed by Anders Carlsson.
3127 * NetworkProcess/mac/NetworkProcessMac.mm:
3128 (WebKit::NetworkProcess::platformInitializeNetworkProcess):
3130 Listen for the fake memory pressure notification and respond by
3131 just forwarding to system malloc. We don't do the full WebCore
3132 memory pressure handling here, since that will cause stuff that
3133 the network process doesn't need to get instantiated.
3135 2014-03-07 Dean Jackson <dino@apple.com>
3137 Attempt to fix the iOS build.
3139 * Configurations/WebKit2.xcconfig: Add -framework OpenGLES to linking.
3141 2014-03-07 Simon Fraser <simon.fraser@apple.com>
3143 [iOS] Add an updateID to visibleContentRect updates which is passed back in layer transactions, so we know whether transactions are stale
3144 https://bugs.webkit.org/show_bug.cgi?id=129897
3146 Reviewed by Benjamin Poulain.
3148 In WebKit2 on iOS we need to know when layer updates from the web process
3149 are stale with respect to visible rect updates from the UI process. Do so
3150 by adding an updateID to VisibleContentRectUpdateInfo, and storing it
3151 on each side, returning it in RemoteLayerTreeTransaction.
3153 Did some re-ordering of members and encoding order in RemoteLayerTreeTransaction
3154 to group like data members together.
3156 * Shared/VisibleContentRectUpdateInfo.cpp:
3157 (WebKit::VisibleContentRectUpdateInfo::encode):
3158 (WebKit::VisibleContentRectUpdateInfo::decode):
3159 * Shared/VisibleContentRectUpdateInfo.h:
3160 (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
3161 (WebKit::VisibleContentRectUpdateInfo::updateID):
3162 (WebKit::operator==):
3163 * Shared/mac/RemoteLayerTreeTransaction.h:
3164 (WebKit::RemoteLayerTreeTransaction::setLastVisibleContentRectUpdateID):
3165 (WebKit::RemoteLayerTreeTransaction::lastVisibleContentRectUpdateID):
3166 * Shared/mac/RemoteLayerTreeTransaction.mm:
3167 (WebKit::RemoteLayerTreeTransaction::encode):
3168 (WebKit::RemoteLayerTreeTransaction::decode):
3169 * UIProcess/WebPageProxy.h:
3170 (WebKit::WebPageProxy::nextVisibleContentRectUpdateID):
3171 (WebKit::WebPageProxy::lastVisibleContentRectUpdateID):
3172 * UIProcess/ios/WKContentView.mm:
3173 (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
3174 * WebProcess/WebPage/WebPage.cpp:
3175 (WebKit::WebPage::WebPage):
3176 (WebKit::WebPage::willCommitLayerTree):
3177 * WebProcess/WebPage/WebPage.h:
3178 * WebProcess/WebPage/ios/WebPageIOS.mm:
3179 (WebKit::WebPage::updateVisibleContentRects):
3181 2014-03-07 Roger Fong <roger_fong@apple.com>
3183 Replace setSystemWebGLLoadPolicy API with methods to query for WebGL blocking policy.
3184 https://bugs.webkit.org/show_bug.cgi?id=129873.
3186 Reviewed by Dean Jackson.
3188 Remove setSystemWebGLLoadPolicy API.
3189 * UIProcess/API/APILoaderClient.h:
3190 (API::LoaderClient::resolveWebGLLoadPolicy):
3191 * UIProcess/API/C/WKPage.cpp:
3192 (WKPageSetPageLoaderClient):
3193 * UIProcess/API/C/WKPageLoaderClient.h:
3194 * UIProcess/WebPageProxy.cpp:
3195 (WebKit::WebPageProxy::resolveWebGLPolicyForURL):
3196 * UIProcess/WebPageProxy.h:
3197 * UIProcess/WebPageProxy.messages.in:
3198 * WebProcess/WebPage/mac/WebPageMac.mm:
3199 (WebKit::WebPage::webGLPolicyForURL):
3201 Add API to directly query the WebGL blocking policies from WKSI.
3202 * UIProcess/API/C/mac/WKContextPrivateMac.h:
3203 * UIProcess/API/C/mac/WKContextPrivateMac.mm:
3204 (WKContextShouldBlockWebGL):
3205 (WKContextShouldSuggestBlockWebGL):
3207 2014-03-07 Eric Carlson <eric.carlson@apple.com>
3209 Initialize new WKSI functions for WebKit2
3210 https://bugs.webkit.org/show_bug.cgi?id=129889
3212 Reviewed by Simon Fraser.
3214 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3215 (InitWebCoreSystemInterface):
3217 2014-03-07 Carlos Garcia Campos <cgarcia@igalia.com>
3219 [GTK] Use final and override in WebPrintOperationGtk
3220 https://bugs.webkit.org/show_bug.cgi?id=129868
3222 Reviewed by Sergio Villar Senin.
3224 * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
3226 2014-03-06 Alexey Proskuryakov <ap@apple.com>
3228 [Mac] Allow com.apple.GSSCred in WebKit sandbox profiles
3229 https://bugs.webkit.org/show_bug.cgi?id=129777
3230 <rdar://problem/16050832>
3232 Reviewed by Anders Carlsson.
3234 * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
3235 * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
3236 * WebProcess/com.apple.WebProcess.sb.in:
3238 2014-03-06 Filip Pizlo <fpizlo@apple.com>
3240 If the FTL is build-time enabled then it should be run-time enabled.
3242 Rubber stamped by Geoffrey Garen.
3244 * Shared/WebProcessCreationParameters.cpp:
3245 (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
3246 (WebKit::WebProcessCreationParameters::encode):
3247 (WebKit::WebProcessCreationParameters::decode):
3248 * Shared/WebProcessCreationParameters.h:
3249 * UIProcess/mac/WebContextMac.mm:
3250 (WebKit::registerUserDefaultsIfNeeded):
3251 (WebKit::WebContext::platformInitializeWebProcess):
3252 * WebProcess/cocoa/WebProcessCocoa.mm:
3253 (WebKit::WebProcess::platformInitializeWebProcess):
3255 2014-03-06 Hyowon Kim <hw1008.kim@samsung.com>
3257 [EFL] Move EvasGL classes from WebKit to WebCore namespace.
3258 https://bugs.webkit.org/show_bug.cgi?id=129797
3260 Reviewed by Gyuyoung Kim.
3262 * UIProcess/API/efl/EwkView.h: namespace changes for EvasGLContext/Surface.
3264 2014-03-06 Simon Fraser <simon.fraser@apple.com>
3266 Remove one more setCustomFixedPositionRect() that I missed.
3268 * UIProcess/DrawingAreaProxy.h:
3270 2014-03-06 Simon Fraser <simon.fraser@apple.com>
3272 Send the fixed position rect to the WebProcess along with the other rects
3273 https://bugs.webkit.org/show_bug.cgi?id=129856
3275 Reviewed by Benjamin Poulain.
3277 Remove the functions that pass the custom fixed position rect through
3278 the DrawingArea, and replace them by adding this rect to the
3279 VisibleContentRectUpdateInfo, along with the "is stable" flag. We
3280 then set the custom fixed position rect in the web process for
3283 * Shared/VisibleContentRectUpdateInfo.cpp:
3284 (WebKit::VisibleContentRectUpdateInfo::encode):
3285 (WebKit::VisibleContentRectUpdateInfo::decode):
3286 * Shared/VisibleContentRectUpdateInfo.h:
3287 (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
3288 (WebKit::VisibleContentRectUpdateInfo::customFixedPositionRect):
3289 (WebKit::VisibleContentRectUpdateInfo::inStableState):
3290 (WebKit::operator==):
3291 * UIProcess/DrawingAreaProxy.cpp:
3292 * UIProcess/ios/WKContentView.mm:
3293 (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
3294 * WebProcess/WebPage/DrawingArea.h:
3295 * WebProcess/WebPage/DrawingArea.messages.in:
3296 * WebProcess/WebPage/ios/WebPageIOS.mm:
3297 (WebKit::WebPage::updateVisibleContentRects):
3298 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
3299 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3300 * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
3302 2014-03-06 Simon Fraser <simon.fraser@apple.com>
3304 Remove empty class extension in WKContentViewInteraction
3305 https://bugs.webkit.org/show_bug.cgi?id=129849
3307 Reviewed by Enrica Casucci.
3309 This empty class extension is cruft left over from refactoring.
3312 * UIProcess/ios/WKContentViewInteraction.mm:
3314 2014-03-06 Simon Fraser <simon.fraser@apple.com>
3316 [iOS] didUpdateVisibleRect: should use fabs, not abs
3317 https://bugs.webkit.org/show_bug.cgi?id=129843
3319 Reviewed by Benjamin Poulain.
3321 When zooming we sent messages to the web process with an unchanging
3322 zoom scale because of use of abs() rather than fabs().
3324 * UIProcess/ios/WKContentView.mm:
3325 (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
3327 2014-03-06 Anders Carlsson <andersca@apple.com>
3329 Remove WebKit1 header includes from WebKit2
3330 https://bugs.webkit.org/show_bug.cgi?id=129824
3332 Reviewed by Dan Bernstein.
3334 * UIProcess/mac/WKFullScreenWindowController.mm:
3335 (makeResponderFirstResponderIfDescendantOfView):
3336 Add a new function instead of calling an NSWindow category method that's defined in WebKit1.
3338 (-[WKFullScreenWindowController enterFullScreen:]):
3339 (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
3340 (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
3341 Call makeResponderFirstResponderIfDescendantOfView.
3343 * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
3344 Remove unused WebKit1 header import.
3346 * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
3347 (WebKit::WebEditorClient::documentFragmentFromAttributedString):
3348 Change a category to be on NSObject instead of WebResource.
3350 2014-03-06 Jon Lee <jonlee@apple.com>
3354 Reviewed by Simon Fraser.
3356 * UIProcess/ios/SmartMagnificationController.mm:
3358 2014-03-06 Joseph Pecoraro <pecoraro@apple.com>
3360 Web Inspector: Expose the console object in JSContexts to interact with Web Inspector
3361 https://bugs.webkit.org/show_bug.cgi?id=127944
3363 Reviewed by Geoffrey Garen.
3365 * WebProcess/WebCoreSupport/WebChromeClient.h:
3368 2014-03-06 Carlos Garcia Campos <cgarcia@igalia.com>
3370 [GTK] Close the page when the view is disposed instead of when finalized
3371 https://bugs.webkit.org/show_bug.cgi?id=129783
3373 Reviewed by Sergio Villar Senin.
3375 When a GtkWidget is destroyed, the GObject is disposed, but not
3376 finalized if it has additional references. When the destroyed
3377 widget is leaked by the application, we leak the page proxy and
3378 what is more important the web process in multi-process mode.
3380 * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3381 (webkitWebViewBaseDispose): Close the WebPageProxy.
3383 2014-03-05 Chris Fleizach <cfleizach@apple.com>
3385 AX: Support IOS Accessibility in WK2
3386 https://bugs.webkit.org/show_bug.cgi?id=129527
3390 * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
3391 (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
3393 2014-03-05 Chris Fleizach <cfleizach@apple.com>
3395 AX: Support IOS Accessibility in WK2
3396 https://bugs.webkit.org/show_bug.cgi?id=129527
3398 Address review comments from Simon noted in bug.
3400 * UIProcess/ios/WKContentView.mm:
3401 (-[WKContentView _accessibilityRegisterUIProcessTokens]):
3402 * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
3403 (-[WKAccessibilityWebPageObject init]):
3404 (-[WKAccessibilityWebPageObject dealloc]):
3405 * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.h:
3406 * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
3407 (-[WKAccessibilityWebPageObject accessibilityAttributeNames]):
3408 (-[WKAccessibilityWebPageObject accessibilitySetValue:forAttribute:]):
3409 (-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):
3410 (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
3411 (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
3413 2014-03-05 Dean Jackson <dino@apple.com>
3415 [WebGL] Use WKSI to see what the system policy for WebGL is
3416 https://bugs.webkit.org/show_bug.cgi?id=129722
3417 <rdar://problem/15790542>
3419 Reviewed by Tim Horton.
3421 Use the WebKitSystemInterface methods WKShouldBlockWebGL
3422 and WKShouldSuggestBlockingWebGL to query what the host
3423 system thinks about the hardware. Tell the client about
3424 the result in a new WebPage method setSystemWebGLPolicy.
3426 * UIProcess/API/APILoaderClient.h:
3427 (API::LoaderClient::setSystemWebGLLoadPolicy): New empty definition.
3428 * UIProcess/API/C/WKAPICast.h:
3429 (WebKit::toAPI): Convert a WebGLLoadPolicy into a WKWebGLLoadPolicy.
3430 * UIProcess/API/C/WKPage.cpp: Call setSystemWebGLLoadPolicy.
3431 (WKPageSetPageLoaderClient):
3432 * UIProcess/API/C/WKPageLoaderClient.h: New typedef and entry in client structure.
3433 * UIProcess/WebPageProxy.cpp:
3434 (WebKit::WebPageProxy::setSystemWebGLPolicy):
3435 * UIProcess/WebPageProxy.h:
3436 * UIProcess/WebPageProxy.messages.in: Add SetSystemWebGLPolicy.
3437 * Source/WebKit2/Configurations/WebKit2.xcconfig: We have to link against OpenGL now, because WKSI
3438 uses it for hardware detection.
3439 * WebProcess/WebPage/WebPage.cpp: Remove the implementation here, but leave
3440 empty methods for non-Apple platforms.
3441 (WebKit::WebPage::WebPage):
3442 (WebKit::WebPage::webGLPolicyForURL):
3443 (WebKit::WebPage::resolveWebGLPolicyForURL):
3444 * WebProcess/WebPage/WebPage.h: Add m_systemWebGLPolicy.
3445 * WebProcess/WebPage/mac/WebPageMac.mm:
3446 (WebKit::WebPage::webGLPolicyForURL): Moved in from WebPage, but now they call
3447 into WKSI and send the result to the client if necessary.
3448 (WebKit::WebPage::resolveWebGLPolicyForURL):
3450 2014-03-05 Simon Fraser <simon.fraser@apple.com>
3452 Fix a stupid error in r165118 that caused userVisibleString()
3453 to call itself recursively.
3455 * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
3456 (WebKit::WebEditorClient::userVisibleString):
3458 2014-03-05 Benjamin Poulain <bpoulain@apple.com>
3460 [iOS] Rename the various VisibleExtent variations to exposedContentRect
3461 https://bugs.webkit.org/show_bug.cgi?id=129728
3463 Reviewed by Simon Fraser.
3465 * WebProcess/WebPage/DrawingArea.h:
3466 * WebProcess/WebPage/ios/WebPageIOS.mm:
3467 (WebKit::WebPage::updateVisibleContentRects):
3468 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
3469 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3470 (WebKit::RemoteLayerTreeDrawingArea::setExposedContentRect):
3472 2014-03-05 Dean Jackson <dino@apple.com>
3474 Unreviewed. Fix the Apple-internal builds.
3476 * Configurations/WebKit2.xcconfig: Add -framework OpenGL.
3478 2014-03-05 Simon Fraser <simon.fraser@apple.com>
3480 ObjC exception when dropping files into a WKView: drag and drop uses code from WebKit.framework
3481 https://bugs.webkit.org/show_bug.cgi?id=129752
3483 Reviewed by Enrica Casucci.
3485 Get WebDragClientMac off of all WebKit headers, and WebEditorClientMac off
3486 all but one by using C functions from WebCoreNSURLExtras.h rather than
3489 * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
3490 (WebKit::WebDragClient::declareAndWriteDragImage):
3491 * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
3492 (WebKit::WebEditorClient::userVisibleString):
3493 (WebKit::WebEditorClient::canonicalizeURL):
3494 (WebKit::WebEditorClient::canonicalizeURLString):
3496 2014-03-05 Martin Hock <mhock@apple.com>
3498 Add support for sessions to MemoryCache.
3499 https://bugs.webkit.org/show_bug.cgi?id=127794
3501 Reviewed by Sam Weinig.