2016-03-16 Jiewen Tan URL Parsing should signal failure for illegal IDN https://bugs.webkit.org/show_bug.cgi?id=154945 Reviewed by Brent Fulgham. In this patch, we add new SPIs _webkit_URLWithUserTypedString, _webkit_decodeHostName and _webkit_encodeHostName which will return nil while dealing with illegal IDN. Old SPIs _web_URLWithUserTypedString, _web_decodeHostName and _web_encodeHostName are marked deprecated as they ignore URL parsing failure. * History/WebHistoryItem.mm: (-[WebHistoryItem initFromDictionaryRepresentation:]): * Misc/WebKitErrors.m: (+[NSError _webKitErrorWithCode:failingURL:]): * Misc/WebNSFileManagerExtras.mm: (-[NSFileManager _webkit_setMetadataURL:referrer:atPath:]): * Misc/WebNSPasteboardExtras.mm: (-[NSPasteboard _web_bestURL]): * Misc/WebNSURLExtras.h: * Misc/WebNSURLExtras.mm: (+[NSURL _web_URLWithUserTypedString:]): (+[NSURL _webkit_URLWithUserTypedString:relativeToURL:]): (+[NSURL _webkit_URLWithUserTypedString:]): (-[NSString _web_decodeHostName]): (-[NSString _web_encodeHostName]): (-[NSString _webkit_decodeHostName]): (-[NSString _webkit_encodeHostName]): * Panels/WebAuthenticationPanel.m: (-[WebAuthenticationPanel setUpForChallenge:]): * WebCoreSupport/WebEditorClient.mm: (WebEditorClient::canonicalizeURLString): 2016-02-15 Brent Fulgham [Mac] Gather some rudimentary statistics during resource load https://bugs.webkit.org/show_bug.cgi?id=153575 Reviewed by Brady Eidson. * Misc/WebKitNSStringExtras.h: * Misc/WebKitNSStringExtras.mm: (+[NSString _webkit_localStorageDirectoryWithBundleIdentifier:]): Added. * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (+[WebPreferences initialize]): (-[WebPreferences resourceLoadStatisticsEnabled]): Added. (-[WebPreferences setResourceLoadStatisticsEnabled:]): Added. * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (WebKitInitializeApplicationCachePathIfNecessary): (WebKitInitializeApplicationStatisticsStoragePathIfNecessary): Added. (-[WebView _commonInitializationWithFrameName:groupName:]): Add call to new initialization method. (-[WebView _preferencesChanged:]): Track changes in the user's desire to monitor resource load statistics. (+[WebView _applicationWillTerminate]): Write statistics to disk (if preferences say to do so.) 2016-02-13 Mark Lam Add thread violation checks to WebView public APIs. https://bugs.webkit.org/show_bug.cgi?id=154183 Reviewed by Timothy Hatcher. Re-landing r196527 with a newly added WebCoreThreadViolationCheckRoundThree(). Previously was using WebCoreThreadViolationCheckRoundTwo(). * Misc/WebKitVersionChecks.h: * WebView/WebFrameView.mm: (-[WebFrameView initWithFrame:]): * WebView/WebView.mm: (-[WebView setCustomTextEncodingName:]): (-[WebView stringByEvaluatingJavaScriptFromString:]): (-[WebView windowScriptObject]): (-[WebView setGroupName:]): (-[WebView setMainFrameURL:]): (-[WebView mainFrameTitle]): (-[WebView mainFrameIcon]): (-[WebView setDrawsBackground:]): (-[WebView setShouldUpdateWhileOffscreen:]): 2016-02-12 Commit Queue Unreviewed, rolling out r196527. https://bugs.webkit.org/show_bug.cgi?id=154204 "Need to redo as WebCoreThreadViolationCheckRoundThree" (Requested by mlam on #webkit). Reverted changeset: "Add thread violation checks to WebView public APIs." https://bugs.webkit.org/show_bug.cgi?id=154183 http://trac.webkit.org/changeset/196527 2016-02-12 Mark Lam Add thread violation checks to WebView public APIs. https://bugs.webkit.org/show_bug.cgi?id=154183 Reviewed by Geoffrey Garen. This will help clients of the API detect the violations sooner rather than having to debug mysterious crashes / failures later. To that end, I've added thread violation checks to the following functions because ... * WebView/WebView.mm: (-[WebView setCustomTextEncodingName:]): - Uses the FrameLoader (which is for the main thread only). (-[WebView stringByEvaluatingJavaScriptFromString:]): - Invokes JavaScript (which is for the main thread only). (-[WebView windowScriptObject]): - Invokes ScriptController::windowScriptObject() which requires the JSLock. (-[WebView setGroupName:]): - Manipulates the PageGroup and Page (which is for the main thread only). (-[WebView setMainFrameURL:]): - Uses the FrameLoader (which is for the main thread only). (-[WebView mainFrameTitle]): - Uses the FrameLoader::documentLoader() (via [WebFrame _dataSource]) which is RefPtr, and therefore not safe for other threads to access. (-[WebView mainFrameIcon]): - Uses the FrameLoader::documentLoader() (via [WebFrame _dataSource]) which is RefPtr, and therefore not safe for other threads to access. - Uses [WebIconDatabase sharedIconDatabase] which does a singleton instantiation but is not protected by a lock. (-[WebView setDrawsBackground:]): - Potentially manipulates a RenderView (via FrameView::setBaseBackgroundColor, via [WebFrame _updateBackgroundAndUpdatesWhileOffscreen]), and RenderView is for main thread only use. (-[WebView setShouldUpdateWhileOffscreen:]): - Uses [WebFrame _updateBackgroundAndUpdatesWhileOffscreen]. Hence, for the main thread only. 2016-02-12 Sukolsak Sakshuwong Update ICU header files to version 52 https://bugs.webkit.org/show_bug.cgi?id=154160 Reviewed by Alex Christensen. Update ICU header files to version 52 to allow the use of newer APIs. * icu/unicode/localpointer.h: * icu/unicode/platform.h: * icu/unicode/ptypes.h: * icu/unicode/putil.h: * icu/unicode/uchar.h: * icu/unicode/uconfig.h: * icu/unicode/uidna.h: * icu/unicode/uiter.h: * icu/unicode/umachine.h: * icu/unicode/unorm2.h: * icu/unicode/urename.h: * icu/unicode/uscript.h: * icu/unicode/ustring.h: * icu/unicode/utf.h: * icu/unicode/utf16.h: * icu/unicode/utf8.h: * icu/unicode/utf_old.h: * icu/unicode/utypes.h: * icu/unicode/uvernum.h: * icu/unicode/uversion.h: 2016-02-12 Beth Dakin NSRangeIsRelativeTo should not have NS prefix https://bugs.webkit.org/show_bug.cgi?id=154174 Reviewed by Tim Horton. NSRangeIsRelativeTo -> WebRangeIsRelativeTo * WebView/WebFrame.mm: (-[WebFrame _convertToDOMRange:]): (-[WebFrame _convertToDOMRange:rangeIsRelativeTo:]): * WebView/WebFrameInternal.h: * WebView/WebHTMLView.mm: (-[WebHTMLView insertText:]): 2016-02-11 Beth Dakin EditingRangeIsRelativeTo::Document and NSRangeIsRelativeTo::Document should be called EditableRoot instead https://bugs.webkit.org/show_bug.cgi?id=154138 Reviewed by Alexey Proskuryakov. EditableRoot is much more accurate than Document. * WebView/WebFrame.mm: (-[WebFrame _convertToDOMRange:]): (-[WebFrame _convertToDOMRange:rangeIsRelativeTo:]): * WebView/WebFrameInternal.h: * WebView/WebHTMLView.mm: (-[WebHTMLView insertText:]): 2016-02-11 Beth Dakin Soft spaces are often tracked in the wrong spot https://bugs.webkit.org/show_bug.cgi?id=154127 -and corresponding- rdar://problem/24493140 Reviewed by Sam Weinig. Soft spaces are in the wrong space now for two reasons. First of all, the NSRange we get from the accepted candidate is relative to the paragraph start, so without this patch, soft spaces are only ever right for the first paragraph. Secondly, if focus changes for any reason other than text insertion, soft spaces are also wrong because they need to be re-set. New version of _convertToDOMRange takes a NSRangeIsRelativeTo so that it can handle ranges relative to both the document and the paragraph. * WebView/WebFrame.mm: (-[WebFrame _convertToDOMRange:rangeIsRelativeTo:]): (-[WebFrame _convertNSRangeToDOMRange:]): New enum NSRangeIsRelativeTo. * WebView/WebFrameInternal.h: Re-set the softSpaceRange on selection changes so long as the WebCore::Editor is not currently handling an accepted candidate. * WebView/WebHTMLView.mm: (-[WebHTMLView _selectionChanged]): If needToRemoveSoftSpace is true, then the replacementRange is relative to the paragraph. (-[WebHTMLView insertText:]): 2016-02-10 Mark Lam WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture: should assert that it is being called from the "main" thread. https://bugs.webkit.org/show_bug.cgi?id=154059 Reviewed by Geoffrey Garen. This makes it so that misbehaving clients which call it (indirectly) from another thread (not the main thread) will fail faster. Otherwise, we get potential memory corruption that results in strange crashes elsewhere later. * WebView/WebFrame.mm: (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]): 2016-02-04 Jer Noble [Mac] Adopt NSURLSession properties in AVAssetResourceLoader https://bugs.webkit.org/show_bug.cgi?id=153873 Reviewed by Eric Carlson. Add a WebKit preference to control the WebCore isAVFoundationNSURLSessionEnabled() setting. * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (+[WebPreferences initialize]): (-[WebPreferences setAVFoundationNSURLSessionEnabled:]): (-[WebPreferences isAVFoundationNSURLSessionEnabled]): * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChanged:]): 2016-02-09 Eric Carlson checkValidity() sometimes asserts in WebUserMediaClient::pageDestroyed https://bugs.webkit.org/show_bug.cgi?id=154029 Reviewed by Alex Christensen. * WebCoreSupport/WebUserMediaClient.mm: (WebUserMediaClient::pageDestroyed): Copy map keys to a vector and clear the map before enumerating the vector and canceling the requests. ASSERT that the map is not modified during cleanup. Clean up the permission check map. (WebUserMediaClient::requestUserMediaAccess): Add the request to the map before calling the UI delegate in case it works synchronously (as it does in DRT). (WebUserMediaClient::checkUserMediaPermission): Ditto. (WebUserMediaClient::cancelUserMediaPermissionCheck): White-space cleanup. (-[WebUserMediaPolicyListener allow]): Ditto. 2016-02-08 Anders Carlsson Crash when trying to chain to the old -[NSView setNeedsDisplayInRect:] https://bugs.webkit.org/show_bug.cgi?id=154001 rdar://problem/24519975 Reviewed by Dan Bernstein. If our replaced -[NSView setNeedsDisplayInRect:] is called before the old IMP has been initialized, we can end up trying to call a null pointer. Fix this by using method_exchangeImplementations instead of method_setImplementation, since the former is done atomically. * WebView/WebHTMLView.mm: (-[NSView _web_setNeedsDisplayInRect:]): (+[WebHTMLViewPrivate initialize]): (setNeedsDisplayInRect): Deleted. 2016-02-07 Dan Bernstein [Cocoa] Replace __has_include guards around inclusion of Apple-internal-SDK headers with USE(APPLE_INTERNAL_SDK) https://bugs.webkit.org/show_bug.cgi?id=153963 Reviewed by Sam Weinig. * WebView/WebPDFView.mm: 2016-02-06 Darin Adler Finish auditing call sites of upper() and lower(), eliminate many, and rename the functions https://bugs.webkit.org/show_bug.cgi?id=153905 Reviewed by Sam Weinig. * Plugins/WebBasePluginPackage.mm: (-[WebBasePluginPackage getPluginInfoFromPLists]): Use modern for loops. (-[WebBasePluginPackage supportsExtension:]): Use convertToASCIILowercase for extension assert. Also use modern for loop. (-[WebBasePluginPackage supportsMIMEType:]): Ditto. (-[WebBasePluginPackage MIMETypeForExtension:]): Ditto. 2016-02-03 Jessie Berlin Build fix. [NSEvent context] has always returned nil. Replace uses with nullptr. * WebView/WebHTMLView.mm: (-[WebHTMLView _postFakeMouseMovedEventForFlagsChangedEvent:]): (-[WebHTMLView _updateMouseoverWithFakeEvent]): (-[WebHTMLView _updateMouseoverWithEvent:]): (-[WebHTMLView _autoscroll]): (-[WebHTMLView draggedImage:endedAt:operation:]): 2016-02-01 Dave Hyatt Add a line grid pagination SPI to WebKit. https://bugs.webkit.org/show_bug.cgi?id=153757 Reviewed by Anders Carlsson. * WebView/WebView.mm: (-[WebView _setPaginationLineGridEnabled:]): (-[WebView _paginationLineGridEnabled]): * WebView/WebViewPrivate.h: 2016-02-01 Joseph Pecoraro Web Inspector: High Level Memory Overview Instrument https://bugs.webkit.org/show_bug.cgi?id=153516 Reviewed by Brian Burg. * Configurations/FeatureDefines.xcconfig: 2016-01-31 Darin Adler Cut down on calls to String::lower; mostly replace with convertToASCIILowercase https://bugs.webkit.org/show_bug.cgi?id=153732 Reviewed by Dean Jackson. * WebView/WebHTMLRepresentation.mm: (newArrayWithStrings): Updated to use HashSet and also to use a modern for loop. 2016-01-31 Dan Bernstein [Cocoa] Remove __has_include guards around use of WebKitAdditions https://bugs.webkit.org/show_bug.cgi?id=153728 Reviewed by Andy Estes. Guard WebKitAdditions includes with #if USE(APPLE_INTERNAL_SDK) rather than with __has_include. * WebKitAdditions.mm: * WebView/WebView.mm: (-[WebView _commonInitializationWithFrameName:groupName:]): (-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]): 2016-01-29 Ada Chan Enable VIDEO_PRESENTATION_MODE only in Debug and Release builds on Mac https://bugs.webkit.org/show_bug.cgi?id=153665 Reviewed by Dan Bernstein. * Configurations/FeatureDefines.xcconfig: 2016-01-28 Darin Adler Remove equalIgnoringCase since all callers really wanted equalIgnoringASCIICase https://bugs.webkit.org/show_bug.cgi?id=153411 Reviewed by Ryosuke Niwa. * WebCoreSupport/WebFrameLoaderClient.mm: (parameterValue): Use equalIgnoringASCIICase. No behavior change because the only name we ever search for with this is "pluginspage". 2016-01-27 Enrica Casucci Cache results of data detection in the UI process when load completes. https://bugs.webkit.org/show_bug.cgi?id=153560 Reviewed by Tim Horton. Adding empty implementation for WK1. * WebCoreSupport/WebFrameLoaderClient.h: * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::dispatchDidFinishDataDetection): 2016-01-27 Anders Carlsson Add WebKitAdditions extension points to WebCore, WebKit and WebKitLegacy https://bugs.webkit.org/show_bug.cgi?id=153550 Reviewed by Sam Weinig. * Configurations/WebKitLegacy.xcconfig: Add WKA header search paths. * WebKitAdditions.mm: Added. Add addition files. * WebView/WebView.mm: (-[WebView _commonInitializationWithFrameName:groupName:]): (-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]): Add extension points. 2016-01-27 Chris Dumez window.atob() should ignore spaces in input https://bugs.webkit.org/show_bug.cgi?id=153522 Reviewed by Benjamin Poulain. * WebCoreSupport/WebInspectorClient.mm: (WebInspectorFrontendClient::save): 2016-01-27 Alexey Proskuryakov Remove ENABLE_CURRENTSRC https://bugs.webkit.org/show_bug.cgi?id=153545 Reviewed by Simon Fraser. * Configurations/FeatureDefines.xcconfig: 2016-01-25 Beth Dakin Build fix. * WebView/WebHTMLView.mm: (-[WebHTMLView initWithFrame:]): (-[WebHTMLView insertText:]): 2016-01-25 Beth Dakin WK1: Handle soft spaces after accepted candidates https://bugs.webkit.org/show_bug.cgi?id=153442 -and corresponding- rdar://problem/23958418 Reviewed by Tim Horton. The space at the end of candidates is a soft space. If that space exists, cache the range of the space in m_softSpaceRange. * WebCoreSupport/WebEditorClient.mm: (WebEditorClient::handleAcceptedCandidate): New ivar in WebHTMLViewPrivate softSpaceRange keeps track to the NSRange of a soft space if the last text that was inserted has a soft space at the end. * WebView/WebHTMLView.mm: (-[WebHTMLView initWithFrame:]): (-[WebHTMLView _setSoftSpaceRange:]): When new text is inserted, find out if it is being inserted right after a soft space. If it is, then [NSSpellChecker deletesAutospaceBeforeString] will tell us if the space needs to be removed. If that is the case, then set the replacementString to the soft space. (-[WebHTMLView insertText:]): * WebView/WebHTMLViewInternal.h: 2016-01-17 Ada Chan Add a mode parameter to MediaControllerInterface::supportsFullscreen() and ChromeClient::supportsVideoFullscreen(). https://bugs.webkit.org/show_bug.cgi?id=153220 Reviewed by Eric Carlson. * WebCoreSupport/WebChromeClient.h: * WebCoreSupport/WebChromeClient.mm: (WebChromeClient::supportsVideoFullscreen): 2016-01-22 Darin Adler Reduce use of equalIgnoringCase to just ignore ASCII case https://bugs.webkit.org/show_bug.cgi?id=153266 Reviewed by Ryosuke Niwa. * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::createPlugin): Use equalLettersIgnoringASCIICase. 2016-01-21 Brent Fulgham [Mac] Tooltips do not honor some types of obscuring windows https://bugs.webkit.org/show_bug.cgi?id=153263 Reviewed by Simon Fraser. * WebView/WebHTMLView.mm: (-[WebHTMLView _updateMouseoverWithEvent:]): When the WebView is not the key window, don't display tooltips. 2016-01-19 Ada Chan Make it possible to enable VIDEO_PRESENTATION_MODE on other Cocoa platforms. https://bugs.webkit.org/show_bug.cgi?id=153218 Reviewed by Eric Carlson. * Configurations/FeatureDefines.xcconfig: 2016-01-19 Beth Dakin 32-bit build fix. * WebView/WebView.mm: (-[WebView updateWebViewAdditions]): (-[WebView showCandidates:forString:inRect:view:completionHandler:]): * WebView/WebViewInternal.h: 2016-01-19 Beth Dakin Move away from NSSpellChecker's showCandidates method https://bugs.webkit.org/show_bug.cgi?id=153254 -and corresponding- rdar://problem/24216292 Reviewed by Tim Horton. * WebCoreSupport/WebEditorClient.mm: (WebEditorClient::handleRequestedCandidates): * WebView/WebView.mm: (-[WebView updateWebViewAdditions]): (-[WebView showCandidates:forString:inRect:view:completionHandler:]): * WebView/WebViewInternal.h: 2016-01-19 Enrica Casucci Add support for DataDetectors in WK (iOS). https://bugs.webkit.org/show_bug.cgi?id=152989 rdar://problem/22855960 Reviewed by Tim Horton. Adding feature definition for data detection. * Configurations/FeatureDefines.xcconfig: 2016-01-19 Commit Queue Unreviewed, rolling out r195300. https://bugs.webkit.org/show_bug.cgi?id=153244 enrica wants more time to fix Windows (Requested by thorton on #webkit). Reverted changeset: "Add support for DataDetectors in WK (iOS)." https://bugs.webkit.org/show_bug.cgi?id=152989 http://trac.webkit.org/changeset/195300 2016-01-19 Enrica Casucci Add support for DataDetectors in WK (iOS). https://bugs.webkit.org/show_bug.cgi?id=152989 rdar://problem/22855960 Reviewed by Tim Horton. Adding feature definition for data detection. * Configurations/FeatureDefines.xcconfig: 2016-01-16 Myles C. Maxfield Remove TextRun::allowsRoundingHacks() https://bugs.webkit.org/show_bug.cgi?id=153185 Reviewed by Simon Fraser. * Misc/WebKitNSStringExtras.mm: (-[NSString _web_drawAtPoint:font:textColor:allowingFontSmoothing:]): Deleted. (-[NSString _web_widthWithFont:]): Deleted. * WebView/WebView.mm: (+[WebView _setAllowsRoundingHacks:]): Deleted. (+[WebView _allowsRoundingHacks]): Deleted. * WebView/WebViewPrivate.h: 2016-01-15 Tim Horton Data detector yellow highlight location is vertically mirrored in WebKit1 https://bugs.webkit.org/show_bug.cgi?id=152216 Reviewed by Beth Dakin. * WebView/WebImmediateActionController.mm: (-[WebImmediateActionController _animationControllerForDataDetectedText]): (-[WebImmediateActionController _animationControllerForDataDetectedLink]): These assignments have no effect because they're operating on a copy, because TextIndicator::data() does not return a reference... so remove them. * WebView/WebView.mm: (-[WebView _setTextIndicator:withLifetime:]): Convert textBoundingRectInRootViewCoordinates to WebView coordinates before converting to Window coordinates from WebView coordinates so we get flipping right. (-[WebView _animationControllerForDictionaryLookupPopupInfo:]): (-[WebView _showDictionaryLookupPopup:]): Ditto for these, except in the aforementioned conversion callback. 2016-01-14 Brady Eidson Modern IDB: Support opening and deleting SQLite databases on disk. https://bugs.webkit.org/show_bug.cgi?id=153084 Reviewed by Alex Christensen, Sam Weinig and Andy Estes (oh my!). * Storage/WebDatabaseProvider.mm: Copied from Source/WebKit/Storage/WebDatabaseProvider.cpp. (WebDatabaseProvider::indexedDatabaseDirectoryPath): 2016-01-14 Beth Dakin WK1 and WK2 should share more candidate request code https://bugs.webkit.org/show_bug.cgi?id=153108 Reviewed by Simon Fraser. requestCandidatesForSelection() does not need to be exposed as an EditorClient function. WK1 can just call invoke this code from the existing respondToChangedSelection EditorClient function, which is what WK2 does. * WebCoreSupport/WebEditorClient.h: * WebCoreSupport/WebEditorClient.mm: (WebEditorClient::respondToChangedSelection): Cleanup — use some code that was moved to WebCore::Editor. (WebEditorClient::requestCandidatesForSelection): (WebEditorClient::handleRequestedCandidates): (textCheckingResultFromNSTextCheckingResult): (WebEditorClient::handleAcceptedCandidate): (candidateRangeForSelection): Deleted. (candidateWouldReplaceText): Deleted. 2016-01-13 Chris Dumez Unreviewed, rolling out r194900. Roll back in as this did not actually regress PLT Reverted changeset: "Unreviewed, rolling out r194826." https://bugs.webkit.org/show_bug.cgi?id=153020 http://trac.webkit.org/changeset/194900 2016-01-12 Ryosuke Niwa Add a build flag for custom element https://bugs.webkit.org/show_bug.cgi?id=153005 Reviewed by Alex Christensen. * Configurations/FeatureDefines.xcconfig: 2016-01-12 Commit Queue Unreviewed, rolling out r194826. https://bugs.webkit.org/show_bug.cgi?id=153020 Appears to have regressed PLT (Requested by kling on #webkit). Reverted changeset: "Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL cont'd" https://bugs.webkit.org/show_bug.cgi?id=152902 http://trac.webkit.org/changeset/194826 2016-01-11 Anders Carlsson Get rid of CFMakeCollectable, it is a no-op https://bugs.webkit.org/show_bug.cgi?id=152988 Reviewed by Sam Weinig. * Misc/WebNSDataExtras.m: (-[NSString _web_capitalizeRFC822HeaderFieldName]): (-[NSData _webkit_parseRFC822HeaderFields]): * Plugins/WebPluginController.mm: (-[WebPluginController initWithDocumentView:]): 2016-01-10 Andreas Kling Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL cont'd Reviewed by Andy Estes. Convert some more of the remaining clients to use NeverDestroyed. * History/WebBackForwardList.mm: (backForwardLists): * History/WebHistoryItem.mm: (historyItemWrappers): * Misc/WebNSPasteboardExtras.mm: (+[NSPasteboard _web_writableTypesForURL]): (_writableTypesForImageWithoutArchive): (_writableTypesForImageWithArchive): * Plugins/Hosted/NetscapePluginHostManager.mm: (WebKit::NetscapePluginHostManager::singleton): * Plugins/Hosted/NetscapePluginHostProxy.mm: (WebKit::pluginProxyMap): * Plugins/Hosted/NetscapePluginInstanceProxy.mm: (WebKit::globalExceptionString): * Plugins/Hosted/ProxyInstance.mm: (WebKit::proxyClass): * Plugins/WebNetscapePluginStream.mm: (streams): * Storage/WebDatabaseManager.mm: (transactionBackgroundTaskIdentifierLock): * WebCoreSupport/WebUserMediaClient.mm: (userMediaCheckMap): * WebView/WebHTMLRepresentation.mm: (regExpForLabels): * WebView/WebView.mm: (aeDescFromJSValue): 2016-01-09 Dan Bernstein [Cocoa] Allow overriding the frameworks directory independently of using a staging install path https://bugs.webkit.org/show_bug.cgi?id=152926 Reviewed by Tim Horton. Introduce a new build setting, WK_OVERRIDE_FRAMEWORKS_DIR. When not empty, it determines where the frameworks are installed. Setting USE_STAGING_INSTALL_PATH to YES sets WK_OVERRIDE_FRAMEWORKS_DIR to $(SYSTEM_LIBRARY_DIR)/StagedFrameworks/Safari. Account for the possibility of WK_OVERRIDE_FRAMEWORKS_DIR containing spaces. * Configurations/WebKitLegacy.xcconfig: - Replace STAGED_FRAMEWORKS_SEARCH_PATH in FRAMEWORK_SEARCH_PATHS with WK_OVERRIDE_FRAMEWORKS_DIR and add quotes to account for spaces. - Define WEBKIT_LEGACY_FRAMEWORKS_DIR, PRODUCTION_FRAMEWORKS_DIR, and WEBCORE_PRIVATE_HEADERS_DIR based on WK_OVERRIDE_FRAMEWORKS_DIR. * MigrateHeaders.make: Use a symlink under BUILT_PRODUCTS_DIR to the WebCore Private Headers. Use a BUILT_PRODUCTS_DIR-based path to the framework instead of a TARGET_BUILD_DIR-based one in order to avoid spaces. * migrate-headers.sh: Make the symlink to WEBCORE_PRIVATE_HEADERS_DIR that the makefile now uses. 2016-01-07 Tim Horton Can't play inline video in a stock WK1 WebView on Mac https://bugs.webkit.org/show_bug.cgi?id=152860 Rubber-stamped by Jer Noble. * WebView/WebPreferences.mm: (+[WebPreferences initialize]): The default for this preference is supposed to be NO on Mac. It is in Settings.in, and in WebKit2, but this one place got it wrong. 2016-01-06 Simon Fraser Add a setting and preferences to enable display-list drawing. Does nothing yet. https://bugs.webkit.org/show_bug.cgi?id=152807 Reviewed by Zalan Bujtas. WK1 pref for display-list drawing, defaults to off. * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (+[WebPreferences initialize]): (-[WebPreferences displayListDrawingEnabled]): (-[WebPreferences setDisplayListDrawingEnabled:]): * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]): (-[WebView _preferencesChanged:]): 2016-01-06 Simon Fraser [iOS] Revert overflow:hidden on the body affecting viewport scale (r186786) https://bugs.webkit.org/show_bug.cgi?id=152803 rdar://problem/22242515 Reviewed by Tim Horton. * WebView/WebView.mm: (-[WebView _contentsSizeRespectingOverflow]): Keep this function which is used by UIKit, but change the implementation to just return the document size. 2016-01-04 Tim Horton Turn on gesture events when building for Yosemite https://bugs.webkit.org/show_bug.cgi?id=152704 rdar://problem/24042472 Reviewed by Anders Carlsson. * Configurations/FeatureDefines.xcconfig: 2015-12-31 Andy Estes Replace WTF::move with WTFMove https://bugs.webkit.org/show_bug.cgi?id=152601 Reviewed by Brady Eidson. * History/WebHistoryItem.mm: (-[WebHistoryItem initFromDictionaryRepresentation:]): * Plugins/Hosted/HostedNetscapePluginStream.mm: (WebKit::HostedNetscapePluginStream::willSendRequest): * Plugins/Hosted/NetscapePluginInstanceProxy.h: (WebKit::NetscapePluginInstanceProxy::setCurrentReply): * Plugins/WebNetscapePluginStream.mm: (WebNetscapePluginStream::willSendRequest): * Plugins/WebNetscapePluginView.mm: (-[WebNetscapePluginView scheduleTimerWithInterval:repeat:timerFunc:]): * WebCoreSupport/WebContextMenuClient.mm: (WebContextMenuClient::imageForCurrentSharingServicePickerItem): * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::dispatchDecidePolicyForResponse): (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): (WebFrameLoaderClient::dispatchWillSubmitForm): (WebFrameLoaderClient::createDocumentLoader): * WebCoreSupport/WebInspectorClient.mm: (WebInspectorFrontendClient::WebInspectorFrontendClient): * WebView/WebArchive.mm: (-[WebArchive initWithMainResource:subresources:subframeArchives:]): * WebView/WebFrame.mm: (-[WebFrame _documentFragmentWithNodesAsParagraphs:]): * WebView/WebHTMLView.mm: (-[WebHTMLView _applyEditingStyleToSelection:withUndoAction:]): * WebView/WebMediaPlaybackTargetPicker.mm: (WebMediaPlaybackTargetPicker::setPlaybackTarget): * WebView/WebView.mm: (-[WebView _loadBackForwardListFromOtherView:]): (+[WebView _addUserScriptToGroup:world:source:url:whitelist:blacklist:injectionTime:injectedFrames:]): (+[WebView _addUserStyleSheetToGroup:world:source:url:whitelist:blacklist:injectedFrames:]): 2016-01-01 Simon Fraser Fix the iOS and EFL builds, after an over-eager commit-queue commit. * History/WebHistoryItem.mm: (-[WebHistoryItem initFromDictionaryRepresentation:]): 2016-01-01 Simon Fraser Fix naming in HistoryItem to refer to scrollPositions https://bugs.webkit.org/show_bug.cgi?id=152646 Reviewed by Zalan Bujtas. HistoryItem stores a scrollPosition, so call it that. * History/WebHistoryItem.mm: (-[WebHistoryItem scrollPoint]): 2016-01-01 Jeff Miller Update user-visible copyright strings to include 2016 https://bugs.webkit.org/show_bug.cgi?id=152531 Reviewed by Alexey Proskuryakov. * Info.plist: 2015-12-31 David Kilzer Stop using USE(CFNETWORK) path on iOS https://bugs.webkit.org/show_bug.cgi?id=142540 Step 1/2: Do everything but turn off USE(CFNETWORK) internally. Original patch by Antti Koivisto on 2015-03-10 Reviewed by Daniel Bates. * Misc/WebDownload.h: Add header guard to make NSURLDownloadSPI.h work when pre-declaring NSURLDownload object. * Misc/WebKitVersionChecks.h: Define WEBKIT_FIRST_VERSION_WITH_LOADING_DURING_COMMON_RUNLOOP_MODES for iOS. * WebView/WebView.mm: (-[WebView _commonInitializationWithFrameName:groupName:]): Use the correct runloop on iOS. * WebView/WebViewPrivate.h: (-[WebView(WebPendingPublic) scheduleInRunLoop:forMode:]): (-[WebView(WebPendingPublic) unscheduleFromRunLoop:forMode:]): - These are available on iOS now. 2015-12-31 Simon Fraser Clarify that scrollPositionChangedViaPlatformWidget takes offsets https://bugs.webkit.org/show_bug.cgi?id=152606 Reviewed by Zalan Bujtas. scrollPositionChangedViaPlatformWidget actually gets scroll offsets, since the values we get from AppKit are zero-based, so rename to scrollOffsetChangedViaPlatformWidget(). Change ScrollableArea's setScrollPosition() and requestScrollPositionUpdate() to take ScrollPositions. Add a FIXME noting that willRevealEdge events are probably broken in RTL documents. * WebView/WebHTMLView.mm: (-[WebHTMLView _frameOrBoundsChanged]): 2015-12-22 Andy Estes [CF] Replace CFNetwork-related WebKitSystemInterface calls with SPI https://bugs.webkit.org/show_bug.cgi?id=152463 Reviewed by Alexey Proskuryakov. Replaced WebkitSystemInterface calls that wrapped CFNetwork SPI with direct calls to SPI that is now forward declared in CFNetworkSPI.h. * Plugins/Hosted/HostedNetscapePluginStream.mm: (WebKit::HostedNetscapePluginStream::didReceiveResponse): * Plugins/WebNetscapePluginStream.mm: (WebNetscapePluginStream::didReceiveResponse): * WebCoreSupport/WebSystemInterface.mm: (InitWebCoreSystemInterface): Deleted. * WebView/WebPreferences.mm: (+[WebPreferences _setCurrentNetworkLoaderSessionCookieAcceptPolicy:]): 2015-12-20 Dan Bernstein Remove unused setToolbarHeight https://bugs.webkit.org/show_bug.cgi?id=152466 Reviewed by Darin Adler. * WebCoreSupport/WebInspectorClient.h: * WebCoreSupport/WebInspectorClient.mm:: (WebInspectorFrontendClient::setToolbarHeight): Deleted. 2015-12-19 Dan Bernstein [Mac] WebKit contains dead source code for OS X Mavericks and earlier https://bugs.webkit.org/show_bug.cgi?id=152462 Reviewed by Alexey Proskuryakov. - Removed build setting definitions for OS X 10.9 and earlier, and simplified defintions that became uniform across all OS X versions as a result: * Configurations/DebugRelease.xcconfig: * Configurations/FeatureDefines.xcconfig: * Configurations/Version.xcconfig: * Configurations/WebKitLegacy.xcconfig: - Simplified expressions involving __MAC_OS_X_VERSION_MIN_REQUIRED and removed code that was never getting compiled: * WebCoreSupport/WebInspectorClient.mm: * WebView/WebDynamicScrollBarsView.mm: * WebView/WebHTMLView.mm: * WebView/WebImmediateActionController.h: * WebView/WebImmediateActionController.mm: * WebView/WebView.mm: * WebView/WebViewData.h: * WebView/WebViewData.mm: * WebView/WebViewInternal.h: 2015-12-17 Tim Horton Data detector yellow highlight location is vertically mirrored in WebKit1 https://bugs.webkit.org/show_bug.cgi?id=152216 Reviewed by Darin Adler. * WebView/WebImmediateActionController.mm: (-[WebImmediateActionController _animationControllerForDataDetectedText]): Match the conversion we do at every other WK1 TextIndicator construction. 2015-12-16 Youenn Fablet [Fetch API] Add fetch API compile time flag https://bugs.webkit.org/show_bug.cgi?id=152254 Reviewed by Darin Adler. * Configurations/FeatureDefines.xcconfig: 2015-12-13 Tim Horton Adopt CGIOSurfaceContextCreateImageReference to avoid unnecessary readback https://bugs.webkit.org/show_bug.cgi?id=150988 Reviewed by Darin Adler. * WebCoreSupport/WebContextMenuClient.mm: (WebContextMenuClient::imageForCurrentSharingServicePickerItem): Adopt sinkIntoImage and drawConsumingImageBuffer in a few places. 2015-12-11 Eric Carlson [MediaStream] Add a setting to allow the mock media capture devices to be enabled and disabled https://bugs.webkit.org/show_bug.cgi?id=152197 Reviewed by Dean Jackson. * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (+[WebPreferences initialize]): (-[WebPreferences mockCaptureDevicesEnabled]): (-[WebPreferences setMockCaptureDevicesEnabled:]): * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChanged:]): 2015-12-11 Beth Dakin _touchEventRegions should return regions in the view's coordinates https://bugs.webkit.org/show_bug.cgi?id=152189 -and corresponding- rdar://problem/23188605 Reviewed by Dan Bernstein. The comment here was actually out of date. It claimed that touch rectangles are in the coordinate system of the document, but we had actually changed them to be in the view’s coordinate system in order to fix issues with handling touch events in UIWebView. But now we are going back to having the touch rectangles be in the document’s coordinate system, so we should fix the rtl bugs here by converting to view coordinates before handing the rects off to iOS WK1 clients. * WebView/WebView.mm: (-[WebView _touchEventRegions]): 2015-12-10 Eric Carlson [MediaStream] Expose media capture devices persistent permissions to WebCore https://bugs.webkit.org/show_bug.cgi?id=152087 Reviewed by Chris Dumez. Add methods and helpers for WK1 permission checker interface. * WebCoreSupport/WebUserMediaClient.h: * WebCoreSupport/WebUserMediaClient.mm: (userMediaRequestsMap): (AddRequestToRequestMap): (RemoveRequestFromRequestMap): (userMediaCheckMap): (AddPermissionCheckToMap): (RemovePermissionCheckFromMap): (WebUserMediaClient::WebUserMediaClient): (WebUserMediaClient::requestUserMediaAccess): (WebUserMediaClient::cancelUserMediaAccessRequest): (WebUserMediaClient::checkUserMediaPermission): (WebUserMediaClient::cancelUserMediaPermissionCheck): (-[WebUserMediaPolicyListener allow]): (-[WebUserMediaPolicyListener deny]): (-[WebUserMediaPolicyCheckerListener initWithUserMediaPermissionCheck:]): (-[WebUserMediaPolicyCheckerListener cancelUserMediaPermissionCheck]): (-[WebUserMediaPolicyCheckerListener allow]): (-[WebUserMediaPolicyCheckerListener deny]): (-[WebUserMediaPolicyCheckerListener denyOnlyThisRequest]): (-[WebUserMediaPolicyCheckerListener shouldClearCache]): (AddRequestToMap): Deleted. (RemoveRequestFromMap): Deleted. * WebView/WebUIDelegatePrivate.h: 2015-12-08 Beth Dakin Follow-up to: Add support for WebViewAdditions https://bugs.webkit.org/show_bug.cgi?id=151967 Rubber-stamped by Dan Bernstein. We should use the Web prefix for all category names. * WebView/WebView.mm: (-[WebView updateWebViewAdditions]): * WebView/WebViewInternal.h: 2015-12-08 Eric Carlson [MediaStream] Rename UserMediaClient and UserMediaController methods https://bugs.webkit.org/show_bug.cgi?id=152001 Reviewed by Brady Eidson. * WebCoreSupport/WebUserMediaClient.h: * WebCoreSupport/WebUserMediaClient.mm: (WebUserMediaClient::pageDestroyed): (WebUserMediaClient::requestUserMediaAccess): (WebUserMediaClient::cancelUserMediaAccessRequest): (-[WebUserMediaPolicyListener initWithUserMediaRequest:]): (-[WebUserMediaPolicyListener cancelUserMediaAccessRequest]): (WebUserMediaClient::requestPermission): Deleted. (WebUserMediaClient::cancelRequest): Deleted. (-[WebUserMediaPolicyListener cancelRequest]): Deleted. 2015-12-07 Alex Christensen Build fix after r193675. * WebView/WebViewData.h: 2015-12-07 Alex Christensen Build fix after r193661. Reviewed by Beth Dakin. * WebView/WebViewData.h: 2015-12-07 Beth Dakin Add support for WebViewAdditions https://bugs.webkit.org/show_bug.cgi?id=151967 Reviewed by Sam Weinig. * WebCoreSupport/WebEditorClient.mm: (WebEditorClient::respondToChangedSelection): * WebView/WebView.mm: (-[WebView _commonInitializationWithFrameName:groupName:]): (-[WebView updateWebViewAdditions]): * WebView/WebViewData.h: * WebView/WebViewInternal.h: 2015-12-07 Beth Dakin Hook up request and show for typing candidates in WK1 https://bugs.webkit.org/show_bug.cgi?id=151831 -and corresponding- Reviewed by Enrica Casucci. Add member variables to WebEditorClient. One is a WeakPtrFactory for the asynchronous handlers, and the other caches the VisibleSelection at the time candidates were requested so that we can make sure the candidates are still valid once we receive them. * WebCoreSupport/WebEditorClient.h: * WebCoreSupport/WebEditorClient.mm: (WebEditorClient::WebEditorClient): Call [NSSpellChecker requestCandidatesForSelectedRange] with the appropriate parameters. (WebEditorClient::requestCandidatesForSelection): Two helpers to compute information that we need for both of the handlers below. (candidateRangeForSelection): (candidateWouldReplaceText): In this handler, we just need to call [NSSpellChecker showCandidates] with the appropriate parameters. (WebEditorClient::handleRequestedCandidates): Once a candidate is accepted, it should be inserted in the right way. (WebEditorClient::handleAcceptedCandidate): 2015-12-03 Jer Noble Expose WebCore's InvisibleAutoplayNotPermitted setting to WebKit & WebKit2 https://bugs.webkit.org/show_bug.cgi?id=151830 Reviewed by Anders Carlsson. Add a new WebPreferences property invisibleAutoplayNotPermitted. * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (-[WebPreferences invisibleAutoplayNotPermitted]): (-[WebPreferences setInvisibleAutoplayNotPermitted:]): * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChanged:]): 2015-12-03 Anders Carlsson Remove Objective-C GC support https://bugs.webkit.org/show_bug.cgi?id=151819 rdar://problem/23746991 Reviewed by Dan Bernstein. * Carbon/CarbonWindowAdapter.mm: (+[CarbonWindowAdapter initialize]): Deleted. (-[CarbonWindowAdapter finalize]): Deleted. * Configurations/Base.xcconfig: * History/WebBackForwardList.mm: (+[WebBackForwardList initialize]): Deleted. (-[WebBackForwardList finalize]): Deleted. * History/WebHistory.mm: (-[WebHistoryPrivate finalize]): Deleted. (-[WebHistory finalize]): Deleted. * History/WebHistoryItem.mm: (+[WebHistoryItem initialize]): Deleted. (-[WebHistoryItem finalize]): Deleted. * Misc/WebElementDictionary.mm: (+[WebElementDictionary initialize]): Deleted. (-[WebElementDictionary finalize]): Deleted. * Plugins/Hosted/WebHostedNetscapePluginView.mm: (+[WebHostedNetscapePluginView initialize]): Deleted. * Plugins/WebBaseNetscapePluginView.mm: (-[WebBaseNetscapePluginView finalize]): Deleted. * Plugins/WebBasePluginPackage.mm: (-[WebBasePluginPackage finalize]): Deleted. * Plugins/WebNetscapePluginView.mm: (+[WebNetscapePluginView initialize]): Deleted. (-[WebNetscapePluginView finalize]): Deleted. * Plugins/WebPluginContainerCheck.mm: (-[WebPluginContainerCheck finalize]): Deleted. * WebCoreSupport/WebEditorClient.mm: (+[WebUndoStep initialize]): Deleted. (-[WebUndoStep finalize]): Deleted. * WebCoreSupport/WebFrameLoaderClient.mm: * WebCoreSupport/WebOpenPanelResultListener.mm: (-[WebOpenPanelResultListener finalize]): Deleted. * WebCoreSupport/WebSecurityOrigin.mm: (-[WebSecurityOrigin finalize]): Deleted. * WebView/WebArchive.mm: (+[WebArchivePrivate initialize]): Deleted. * WebView/WebDataSource.mm: (+[WebDataSource initialize]): Deleted. (-[WebDataSource finalize]): Deleted. * WebView/WebDynamicScrollBarsView.mm: (-[WebDynamicScrollBarsView finalize]): Deleted. * WebView/WebFrame.mm: (-[WebFramePrivate setWebFrameView:]): (-[WebFramePrivate finalize]): Deleted. (-[WebFrame finalize]): Deleted. * WebView/WebFrameView.mm: (-[WebFrameView finalize]): Deleted. * WebView/WebHTMLRepresentation.mm: (-[WebHTMLRepresentation finalize]): Deleted. * WebView/WebHTMLView.mm: (+[WebHTMLViewPrivate initialize]): (-[WebHTMLViewPrivate finalize]): Deleted. (+[WebHTMLView initialize]): Deleted. (-[WebHTMLView finalize]): Deleted. * WebView/WebResource.mm: (+[WebResourcePrivate initialize]): Deleted. (-[WebResourcePrivate finalize]): Deleted. * WebView/WebTextIterator.mm: (+[WebTextIteratorPrivate initialize]): Deleted. * WebView/WebView.mm: (-[WebView finalize]): Deleted. * WebView/WebViewData.mm: (+[WebViewPrivate initialize]): Deleted. (-[WebViewPrivate init]): Deleted. (-[WebViewPrivate finalize]): Deleted. 2015-12-02 Antti Koivisto Move ResourceLoadScheduler to WebKit1 https://bugs.webkit.org/show_bug.cgi?id=151743 Reviewed by Alex Christensen. * Plugins/Hosted/HostedNetscapePluginStream.mm: (WebKit::HostedNetscapePluginStream::start): (WebKit::HostedNetscapePluginStream::stop): * Plugins/WebNetscapePluginStream.mm: (WebNetscapePluginStream::start): (WebNetscapePluginStream::stop): * WebCoreSupport/WebPlatformStrategies.h: * WebCoreSupport/WebPlatformStrategies.mm: (WebPlatformStrategies::createLoaderStrategy): (WebPlatformStrategies::createPasteboardStrategy): (WebPlatformStrategies::createPluginStrategy): (WebPlatformStrategies::createBlobRegistry): (WebPlatformStrategies::cookiesForDOM): * WebView/WebView.mm: (-[WebView _dispatchPendingLoadRequests]): (+[WebView _setLoadResourcesSerially:]): (+[WebView _HTTPPipeliningEnabled]): 2015-12-01 Yusuke Suzuki [ES6] Implement LLInt/Baseline Support for ES6 Generators and enable this feature https://bugs.webkit.org/show_bug.cgi?id=150792 Reviewed by Saam Barati. * Configurations/FeatureDefines.xcconfig: 2015-12-01 Commit Queue Unreviewed, rolling out r192914. https://bugs.webkit.org/show_bug.cgi?id=151734 JSC tests for this change are failing on 32 and 64-bit bots (Requested by ryanhaddad on #webkit). Reverted changeset: "[ES6] Implement LLInt/Baseline Support for ES6 Generators and enable this feature" https://bugs.webkit.org/show_bug.cgi?id=150792 http://trac.webkit.org/changeset/192914 2015-12-01 Yusuke Suzuki [ES6] Implement LLInt/Baseline Support for ES6 Generators and enable this feature https://bugs.webkit.org/show_bug.cgi?id=150792 Reviewed by Saam Barati. * Configurations/FeatureDefines.xcconfig: 2015-11-30 Katlyn Graff Rename ActiveDOMObject/DOMWindow PageCacheSuspension code to support more reasons for suspension https://bugs.webkit.org/show_bug.cgi?id=151677 Reviewed by Ryosuke Niwa. * WebView/WebFrame.mm: (-[WebFrame _cacheabilityDictionary]): 2015-11-30 Jiewen Tan Null dereference loading Blink layout test http/tests/misc/detach-during-notifyDone.html https://bugs.webkit.org/show_bug.cgi?id=149309 Reviewed by Brent Fulgham. * WebView/WebDataSource.mm: (WebDataSourcePrivate::~WebDataSourcePrivate): Refine the assertion to treat . == Rolled over to ChangeLog-2015-11-21 ==