Fix false positive leaks when using custom -init methods that don't start with -init
[WebKit-https.git] / Source / WebKitLegacy / mac / ChangeLog
1 2018-10-23  David Kilzer  <ddkilzer@apple.com>
2
3         Fix false positive leaks when using custom -init methods that don't start with -init
4         <https://webkit.org/b/190818>
5         <rdar://problem/45476042>
6
7         Reviewed by Dan Bernstein.
8
9         * Misc/WebKitErrors.m: Move `descriptions` static global so that
10         it is accessible by both categories.
11         (-[NSError _webkit_initWithDomain:code:URL:]): Declare new
12         NSError (WebKitInternal) category.  Add attribute to make this
13         behave like an -init method.
14         (-[NSError _webkit_initWithDomain:code:URL:]): Move into new
15         NSError (WebKitInternal) category.  Modernize method.  Replace
16         constant NSString with `NSURLErrorFailingURLStringErrorKey`.
17
18 2018-10-18  Alexey Proskuryakov  <ap@apple.com>
19
20         Switch from PLATFORM(IOS) to PLATFORM(IOS_FAMILY)
21         https://bugs.webkit.org/show_bug.cgi?id=190729
22
23         Reviewed by Tim Horton.
24
25         * DOM/DOM.mm:
26         (-[DOMNode boundingBox]):
27         * DOM/DOMElement.mm:
28         * DOM/DOMHTML.mm:
29         * DOM/DOMInternal.mm:
30         * DOM/DOMUIKitExtensions.mm:
31         * DOM/WebDOMOperations.mm:
32         * DefaultDelegates/WebDefaultContextMenuDelegate.mm:
33         * DefaultDelegates/WebDefaultEditingDelegate.m:
34         * DefaultDelegates/WebDefaultPolicyDelegate.m:
35         (-[WebDefaultPolicyDelegate webView:decidePolicyForNavigationAction:request:frame:decisionListener:]):
36         * DefaultDelegates/WebDefaultUIDelegate.h:
37         * DefaultDelegates/WebDefaultUIDelegate.mm:
38         (-[WebDefaultUIDelegate webViewClose:]):
39         (-[WebDefaultUIDelegate webViewFocus:]):
40         (-[WebDefaultUIDelegate webViewUnfocus:]):
41         (-[WebDefaultUIDelegate webViewIsResizable:]):
42         (-[WebDefaultUIDelegate webView:setResizable:]):
43         (-[WebDefaultUIDelegate webView:setFrame:]):
44         (-[WebDefaultUIDelegate webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:]):
45         * History/BackForwardList.h:
46         * History/BackForwardList.mm:
47         * History/WebBackForwardList.mm:
48         (+[WebBackForwardList initialize]):
49         (bumperCarBackForwardHackNeeded):
50         * History/WebHistory.mm:
51         (-[WebHistoryPrivate addItem:discardDuplicate:]):
52         (-[WebHistory _sendNotification:entries:]):
53         (-[WebHistory loadFromURL:error:]):
54         (-[WebHistory saveToURL:error:]):
55         * History/WebHistoryItem.mm:
56         (WKNotifyHistoryItemChanged):
57         (+[WebHistoryItem initialize]):
58         (-[WebHistoryItem initFromDictionaryRepresentation:]):
59         * History/WebURLsWithTitles.m:
60         * Misc/WebCache.mm:
61         (+[WebCache initialize]):
62         * Misc/WebDownload.mm:
63         (-[WebDownloadInternal download:didReceiveAuthenticationChallenge:]):
64         * Misc/WebElementDictionary.mm:
65         (+[WebElementDictionary initialize]):
66         (+[WebElementDictionary initializeLookupTable]):
67         * Misc/WebIconDatabase.mm:
68         * Misc/WebKitNSStringExtras.mm:
69         (+[NSString _webkit_localCacheDirectoryWithBundleIdentifier:]):
70         * Misc/WebKitVersionChecks.h:
71         * Misc/WebKitVersionChecks.mm:
72         (WebKitLinkedOnOrAfter):
73         (WebKitLinkTimeVersion):
74         * Misc/WebLocalizableStrings.mm:
75         * Misc/WebNSControlExtras.h:
76         * Misc/WebNSControlExtras.m:
77         * Misc/WebNSEventExtras.m:
78         * Misc/WebNSFileManagerExtras.mm:
79         * Misc/WebNSImageExtras.h:
80         * Misc/WebNSImageExtras.m:
81         * Misc/WebNSPasteboardExtras.mm:
82         * Misc/WebNSPrintOperationExtras.h:
83         * Misc/WebNSPrintOperationExtras.m:
84         * Misc/WebNSViewExtras.m:
85         * Misc/WebNSWindowExtras.m:
86         * Panels/WebAuthenticationPanel.h:
87         * Panels/WebAuthenticationPanel.m:
88         * Panels/WebPanelAuthenticationHandler.m:
89         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
90         (+[WebHostedNetscapePluginView initialize]):
91         * Plugins/WebBasePluginPackage.h:
92         * Plugins/WebBasePluginPackage.mm:
93         * Plugins/WebJavaPlugIn.h:
94         * Plugins/WebPluginContainerCheck.mm:
95         * Plugins/WebPluginController.h:
96         * Plugins/WebPluginController.mm:
97         (-[WebPluginController plugInViewWithArguments:fromPluginPackage:]):
98         (-[WebPluginController addPlugin:]):
99         (-[WebPluginController destroyPlugin:]):
100         (-[WebPluginController destroyAllPlugins]):
101         * Plugins/WebPluginDatabase.mm:
102         (+[WebPluginDatabase _defaultPlugInPaths]):
103         * Plugins/WebPluginPackage.mm:
104         (-[WebPluginPackage initWithPath:]):
105         * Storage/WebDatabaseManager.mm:
106         (-[WebDatabaseManager deleteAllDatabases]):
107         * Storage/WebDatabaseManagerClient.h:
108         * Storage/WebDatabaseManagerClient.mm:
109         (WebDatabaseManagerClient::WebDatabaseManagerClient):
110         (WebDatabaseManagerClient::~WebDatabaseManagerClient):
111         * Storage/WebStorageManager.mm:
112         (-[WebStorageManager deleteAllOrigins]):
113         (WebKitInitializeStorageIfNecessary):
114         * WebCoreSupport/WebAlternativeTextClient.h:
115         * WebCoreSupport/WebApplicationCache.mm:
116         (applicationCacheBundleIdentifier):
117         * WebCoreSupport/WebChromeClient.h:
118         * WebCoreSupport/WebChromeClient.mm:
119         (WebChromeClient::setWindowRect):
120         (WebChromeClient::windowRect):
121         (WebChromeClient::takeFocus):
122         (WebChromeClient::addMessageToConsole):
123         (WebChromeClient::enableSuddenTermination):
124         (WebChromeClient::disableSuddenTermination):
125         (WebChromeClient::createPopupMenu const):
126         (WebChromeClient::createSearchPopupMenu const):
127         (WebChromeClient::shouldPaintEntireContents const):
128         (WebChromeClient::supportsVideoFullscreen):
129         (WebChromeClient::supportsFullScreenForElement):
130         (WebChromeClient::enterFullScreenForElement):
131         (WebChromeClient::exitFullScreenForElement):
132         * WebCoreSupport/WebContextMenuClient.mm:
133         * WebCoreSupport/WebDragClient.mm:
134         * WebCoreSupport/WebEditorClient.h:
135         * WebCoreSupport/WebEditorClient.mm:
136         (+[WebUndoStep initialize]):
137         (updateFontPanel):
138         (WebEditorClient::didBeginEditing):
139         (WebEditorClient::respondToChangedContents):
140         (WebEditorClient::respondToChangedSelection):
141         (WebEditorClient::canceledComposition):
142         (WebEditorClient::didEndEditing):
143         (WebEditorClient::didWriteSelectionToPasteboard):
144         (attributesForAttributedStringConversion):
145         (WebEditorClient::setInsertionPasteboard):
146         (WebEditorClient::registerUndoOrRedoStep):
147         (WebEditorClient::handleKeyboardEvent):
148         (WebEditorClient::handleInputMethodKeydown):
149         (WebEditorClient::textDidChangeInTextField):
150         (WebEditorClient::requestCheckingOfString):
151         * WebCoreSupport/WebFrameLoaderClient.h:
152         * WebCoreSupport/WebFrameLoaderClient.mm:
153         (WebFrameLoaderClient::detachedFromParent2):
154         (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
155         (WebFrameLoaderClient::assignIdentifierToInitialRequest):
156         (WebFrameLoaderClient::dispatchWillSendRequest):
157         (WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
158         (WebFrameLoaderClient::dispatchDidReceiveResponse):
159         (WebFrameLoaderClient::willCacheResponse const):
160         (WebFrameLoaderClient::dispatchDidReceiveContentLength):
161         (WebFrameLoaderClient::dispatchDidFinishLoading):
162         (WebFrameLoaderClient::dispatchDidFailLoading):
163         (WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
164         (WebFrameLoaderClient::dispatchWillClose):
165         (WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
166         (WebFrameLoaderClient::dispatchDidCommitLoad):
167         (WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
168         (WebFrameLoaderClient::dispatchDidFailLoad):
169         (WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
170         (WebFrameLoaderClient::dispatchDidFinishLoad):
171         (WebFrameLoaderClient::dispatchDidReachLayoutMilestone):
172         (WebFrameLoaderClient::willChangeTitle):
173         (WebFrameLoaderClient::didChangeTitle):
174         (WebFrameLoaderClient::didReplaceMultipartContent):
175         (WebFrameLoaderClient::updateGlobalHistory):
176         (WebFrameLoaderClient::saveViewStateToItem):
177         (WebFrameLoaderClient::restoreViewState):
178         (WebFrameLoaderClient::provisionalLoadStarted):
179         (WebFrameLoaderClient::prepareForDataSourceReplacement):
180         (WebFrameLoaderClient::setTitle):
181         (WebFrameLoaderClient::savePlatformDataToCachedFrame):
182         (WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
183         (WebFrameLoaderClient::transitionToCommittedForNewPage):
184         (WebFrameLoaderClient::didRestoreFromPageCache):
185         (WebFrameLoaderClient::actionDictionary const):
186         (WebFrameLoaderClient::createPlugin):
187         (WebFrameLoaderClient::getLoadDecisionForIcons):
188         (WebFrameLoaderClient::finishedLoadingIcon):
189         (+[WebFramePolicyListener initialize]):
190         * WebCoreSupport/WebFrameNetworkingContext.mm:
191         * WebCoreSupport/WebGeolocationClient.h:
192         * WebCoreSupport/WebGeolocationClient.mm:
193         (WebGeolocationClient::requestPermission):
194         * WebCoreSupport/WebInspectorClient.h:
195         * WebCoreSupport/WebJavaScriptTextInputPanel.m:
196         * WebCoreSupport/WebNotificationClient.mm:
197         * WebCoreSupport/WebOpenPanelResultListener.mm:
198         * WebCoreSupport/WebPlatformStrategies.h:
199         * WebCoreSupport/WebPlatformStrategies.mm:
200         * WebCoreSupport/WebProgressTrackerClient.h:
201         * WebCoreSupport/WebProgressTrackerClient.mm:
202         (WebProgressTrackerClient::progressStarted):
203         (WebProgressTrackerClient::progressEstimateChanged):
204         (WebProgressTrackerClient::progressFinished):
205         * WebCoreSupport/WebSecurityOrigin.mm:
206         * WebInspector/WebNodeHighlight.h:
207         * WebInspector/WebNodeHighlight.mm:
208         (-[WebNodeHighlight initWithTargetView:inspectorController:]):
209         (-[WebNodeHighlight dealloc]):
210         (-[WebNodeHighlight attach]):
211         * WebInspector/WebNodeHighlightView.h:
212         * WebInspector/WebNodeHighlightView.mm:
213         (-[WebNodeHighlightView initWithWebNodeHighlight:]):
214         (-[WebNodeHighlightView dealloc]):
215         * WebInspector/WebNodeHighlighter.mm:
216         (-[WebNodeHighlighter highlight]):
217         * WebView/WebArchive.mm:
218         (+[WebArchivePrivate initialize]):
219         * WebView/WebClipView.h:
220         * WebView/WebDataSource.mm:
221         (WebDataSourcePrivate::WebDataSourcePrivate):
222         (+[WebDataSource initialize]):
223         (+[WebDataSource _repTypesAllowImageTypeOmission:]):
224         (-[WebDataSource _makeRepresentation]):
225         * WebView/WebDelegateImplementationCaching.h:
226         * WebView/WebDelegateImplementationCaching.mm:
227         (CallDelegate):
228         (CallDelegateReturningFloat):
229         (CallDelegateReturningBoolean):
230         (CallUIDelegate):
231         (CallUIDelegateReturningFloat):
232         (CallUIDelegateReturningBoolean):
233         (CallFrameLoadDelegate):
234         (CallFrameLoadDelegateReturningBoolean):
235         (CallResourceLoadDelegate):
236         (CallScriptDebugDelegate):
237         (CallFormDelegate):
238         (CallFormDelegateReturningBoolean):
239         * WebView/WebDeviceOrientation.mm:
240         (-[WebDeviceOrientation initWithCanProvideAlpha:alpha:canProvideBeta:beta:canProvideGamma:gamma:]):
241         * WebView/WebDocumentInternal.h:
242         * WebView/WebDocumentLoaderMac.mm:
243         (needsDataLoadWorkaround):
244         * WebView/WebDynamicScrollBarsViewInternal.h:
245         * WebView/WebFormDelegate.m:
246         * WebView/WebFrame.mm:
247         (-[WebFrame _updateBackgroundAndUpdatesWhileOffscreen]):
248         (-[WebFrame _unmarkAllMisspellings]):
249         (-[WebFrame _paintBehaviorForDestinationContext:]):
250         (-[WebFrame _drawRect:contentsOnly:]):
251         (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
252         (-[WebFrame _scrollDOMRangeToVisible:]):
253         (-[WebFrame _bodyBackgroundColor]):
254         (-[WebFrame accessibilityRoot]):
255         (needsMicrosoftMessengerDOMDocumentWorkaround):
256         * WebView/WebFrameInternal.h:
257         * WebView/WebFrameView.mm:
258         (-[WebFrameView _setDocumentView:]):
259         (+[WebFrameView _viewTypesAllowImageTypeOmission:]):
260         (-[WebFrameView _viewClassForMIMEType:]):
261         (-[WebFrameView initWithFrame:]):
262         (-[WebFrameView drawRect:]):
263         (-[WebFrameView _firstResponderIsFormControl]):
264         (-[WebFrameView keyDown:keyDown:]):
265         (-[WebFrameView _isScrollable]):
266         * WebView/WebFullScreenController.h:
267         * WebView/WebFullScreenController.mm:
268         * WebView/WebHTMLRepresentation.mm:
269         * WebView/WebHTMLView.mm:
270         (-[WebHTMLView hitTest:]):
271         (-[WebHTMLView initWithFrame:]):
272         (-[WebHTMLView dealloc]):
273         (-[WebHTMLView addSubview:]):
274         (-[WebHTMLView mouseDown:]):
275         (-[WebHTMLView mouseUp:]):
276         (-[WebHTMLView resignFirstResponder]):
277         (-[WebHTMLView accessibilityHitTest:]):
278         (-[WebHTMLView selectionImageForcingBlackText:selectionImageForcingBlackText:]):
279         * WebView/WebHTMLViewInternal.h:
280         * WebView/WebIndicateLayer.h:
281         * WebView/WebIndicateLayer.mm:
282         * WebView/WebMediaPlaybackTargetPicker.h:
283         * WebView/WebMediaPlaybackTargetPicker.mm:
284         * WebView/WebPDFDocumentExtras.h:
285         * WebView/WebPDFDocumentExtras.mm:
286         * WebView/WebPDFRepresentation.h:
287         * WebView/WebPDFRepresentation.mm:
288         * WebView/WebPDFView.h:
289         * WebView/WebPreferences.mm:
290         (cacheModelForMainBundle):
291         (WebPreferencesPrivate::WebPreferencesPrivate):
292         (-[WebPreferences initWithIdentifier:sendChangeNotification:initWithIdentifier:]):
293         (-[WebPreferences encodeWithCoder:]):
294         (+[WebPreferences standardPreferences]):
295         (+[WebPreferences initialize]):
296         (-[WebPreferences _valueForKey:]):
297         (-[WebPreferences _setStringValue:forKey:]):
298         (-[WebPreferences _setIntegerValue:forKey:]):
299         (-[WebPreferences _setUnsignedIntValue:forKey:]):
300         (-[WebPreferences _setFloatValue:forKey:]):
301         (-[WebPreferences _setBoolValue:forKey:]):
302         (-[WebPreferences _setLongLongValue:forKey:]):
303         (-[WebPreferences _setUnsignedLongLongValue:forKey:]):
304         (-[WebPreferences _postCacheModelChangedNotification]):
305         (-[WebPreferences _postPreferencesChangedNotification]):
306         (+[WebPreferences _switchNetworkLoaderToNewTestingSession]):
307         (-[WebPreferences setStorageBlockingPolicy:]):
308         * WebView/WebResource.mm:
309         (+[WebResourcePrivate initialize]):
310         * WebView/WebTextCompletionController.h:
311         * WebView/WebTextIterator.mm:
312         (+[WebTextIteratorPrivate initialize]):
313         * WebView/WebView.mm:
314         (shouldEnableLoadDeferring):
315         (shouldRestrictWindowFocus):
316         (shouldRespectPriorityInCSSAttributeSetters):
317         (shouldUseLegacyBackgroundSizeShorthandBehavior):
318         (shouldAllowPictureInPictureMediaPlayback):
319         (shouldAllowContentSecurityPolicySourceStarToMatchAnyProtocol):
320         (shouldAllowWindowOpenWithoutUserGesture):
321         (shouldConvertInvalidURLsToBlank):
322         (shouldRequireUserGestureToLoadVideo):
323         (-[WebView _commonInitializationWithFrameName:groupName:]):
324         (+[WebView _viewClass:andRepresentationClass:forMIMEType:allowingPlugins:]):
325         (-[WebView _viewClass:andRepresentationClass:forMIMEType:]):
326         (-[WebView _closePluginDatabases]):
327         (-[WebView _closeWithFastTeardown]):
328         (-[WebView _close]):
329         (+[WebView _MIMETypeForFile:]):
330         (-[WebView setShowingInspectorIndication:]):
331         (-[WebView _setFormDelegate:]):
332         (-[WebView _needsPreHTML5ParserQuirks]):
333         (-[WebView _preferencesChangedNotification:]):
334         (-[WebView _preferencesChanged:]):
335         (-[WebView _cacheResourceLoadDelegateImplementations]):
336         (-[WebView _cacheFrameLoadDelegateImplementations]):
337         (-[WebView _policyDelegateForwarder]):
338         (-[WebView _UIDelegateForwarder]):
339         (-[WebView _editingDelegateForwarder]):
340         (-[WebView _updateActiveState]):
341         (-[_WebSafeForwarder forwardInvocation:]):
342         (+[WebView initialize]):
343         (-[WebView _pluginForMIMEType:]):
344         (-[WebView _pluginForExtension:]):
345         (-[WebView _isMIMETypeRegisteredAsPlugin:]):
346         (+[WebView canShowMIMETypeAsHTML:]):
347         (-[WebView _initWithArguments:]):
348         (-[WebView initWithFrame:frameName:groupName:]):
349         (-[WebView dealloc]):
350         (-[WebView close]):
351         (-[WebView viewDidMoveToWindow]):
352         (-[WebView setUIDelegate:]):
353         (-[WebView setResourceLoadDelegate:]):
354         (-[WebView setPolicyDelegate:]):
355         (-[WebView setFrameLoadDelegate:]):
356         (-[WebView goBack]):
357         (-[WebView goForward]):
358         (-[WebView stringByEvaluatingJavaScriptFromString:]):
359         (-[WebView setHostWindow:]):
360         (-[WebView becomeFirstResponder]):
361         (+[WebView _cacheModelChangedNotification:]):
362         (-[WebView _frameViewAtWindowPoint:]):
363         (+[WebView _preflightSpellCheckerNow:]):
364         (+[WebView _preflightSpellChecker]):
365         (-[WebView canGoBack]):
366         (-[WebView canGoForward]):
367         (-[WebView stopLoading:]):
368         (-[WebView reload:]):
369         (-[WebView setMainFrameDocumentReady:]):
370         (-[WebView _shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]):
371         (-[WebView setContinuousSpellCheckingEnabled:]):
372         (-[WebView undoManager]):
373         (-[WebView isAutomaticQuoteSubstitutionEnabled]):
374         (-[WebView isAutomaticLinkDetectionEnabled]):
375         (-[WebView isAutomaticDashSubstitutionEnabled]):
376         (-[WebView isAutomaticTextReplacementEnabled]):
377         (-[WebView isAutomaticSpellingCorrectionEnabled]):
378         (+[WebView _setCacheModel:]):
379         (-[WebView _retrieveKeyboardUIModeFromPreferences:]):
380         (-[WebView _keyboardUIMode]):
381         (LayerFlushController::flushLayers):
382         (-[WebView _scheduleCompositingLayerFlush]):
383         (-[WebView _enterVideoFullscreenForVideoElement:mode:]):
384         (-[WebView fullScreenPlaceholderView]):
385         (WebInstallMemoryPressureHandler):
386         * WebView/WebViewData.h:
387         * WebView/WebViewData.mm:
388         (+[WebViewPrivate initialize]):
389         (-[WebViewPrivate init]):
390         (-[WebViewPrivate dealloc]):
391         * WebView/WebViewInternal.h:
392
393 2018-10-18  Alex Christensen  <achristensen@webkit.org>
394
395         Clean up FrameLoader two-state enums
396         https://bugs.webkit.org/show_bug.cgi?id=190731
397
398         Reviewed by Chris Dumez.
399
400         * WebCoreSupport/WebFrameLoaderClient.h:
401         * WebCoreSupport/WebFrameLoaderClient.mm:
402         (WebFrameLoaderClient::dispatchWillPerformClientRedirect):
403
404 2018-10-18  Alex Christensen  <achristensen@webkit.org>
405
406         Unreviewed, rolling out r237137.
407
408         SPI is actually used
409
410         Reverted changeset:
411
412         "Remove unused WebFrame._loadType"
413         https://bugs.webkit.org/show_bug.cgi?id=190583
414         https://trac.webkit.org/changeset/237137
415
416 2018-10-17  Wenson Hsieh  <wenson_hsieh@apple.com>
417
418         Enable the datalist element by default on iOS and macOS
419         https://bugs.webkit.org/show_bug.cgi?id=190594
420         <rdar://problem/45281159>
421
422         Reviewed by Ryosuke Niwa and Tim Horton.
423
424         * Configurations/FeatureDefines.xcconfig:
425
426 2018-10-17  Alex Christensen  <achristensen@webkit.org>
427
428         BackForwardClient needs to be able to support UIProcess-only back/forward lists
429         https://bugs.webkit.org/show_bug.cgi?id=190675
430
431         Reviewed by Chris Dumez.
432
433         * History/BackForwardList.h:
434         * History/BackForwardList.mm:
435         (BackForwardList::backItem):
436         (BackForwardList::currentItem):
437         (BackForwardList::forwardItem):
438         (BackForwardList::backListCount const):
439         (BackForwardList::forwardListCount const):
440         (BackForwardList::itemAtIndex):
441         * History/WebBackForwardList.mm:
442         (-[WebBackForwardList backItem]):
443         (-[WebBackForwardList currentItem]):
444         (-[WebBackForwardList forwardItem]):
445         (-[WebBackForwardList itemAtIndex:]):
446
447 2018-10-16  Timothy Hatcher  <timothy@apple.com>
448
449         Add <meta name="supported-color-schemes"> to control what color schemes the page supports
450         https://bugs.webkit.org/show_bug.cgi?id=190526
451         rdar://problem/45230140
452
453         Reviewed by Dean Jackson.
454
455         * WebCoreSupport/WebEditorClient.mm:
456         (_WebCreateFragment): Update use of LocalDefaultSystemAppearance.
457
458 2018-10-16  Justin Michaud  <justin_michaud@apple.com>
459
460         Implement feature flag and bindings for CSS Painting API
461         https://bugs.webkit.org/show_bug.cgi?id=190237
462
463         Reviewed by Ryosuke Niwa.
464
465         * Configurations/FeatureDefines.xcconfig:
466
467 2018-10-16  Alex Christensen  <achristensen@webkit.org>
468
469         Replace HistoryItem* with HistoryItem& where possible
470         https://bugs.webkit.org/show_bug.cgi?id=190617
471
472         Reviewed by Chris Dumez.
473
474         * History/BackForwardList.h:
475         * History/BackForwardList.mm:
476         (BackForwardList::goToItem):
477         * History/WebBackForwardList.mm:
478         (-[WebBackForwardList goToItem:]):
479         * History/WebHistoryItem.mm:
480         (WKNotifyHistoryItemChanged):
481         * History/WebHistoryItemInternal.h:
482
483 2018-10-16  Alex Christensen  <achristensen@webkit.org>
484
485         Remove unused WebHistoryItem._transientPropertyForKey
486         https://bugs.webkit.org/show_bug.cgi?id=190606
487
488         Reviewed by Chris Dumez.
489
490         * History/WebHistoryItem.mm:
491         * History/WebHistoryItemPrivate.h:
492
493 2018-10-15  Justin Fan  <justin_fan@apple.com>
494
495         Add WebGPU 2018 feature flag and experimental feature flag
496         https://bugs.webkit.org/show_bug.cgi?id=190509
497
498         Reviewed by Dean Jackson.
499
500         Re-add ENABLE_WEBGPU, an experimental feature flag, and a RuntimeEnabledFeature
501         for the 2018 WebGPU prototype.
502
503         * Configurations/FeatureDefines.xcconfig:
504         * WebView/WebPreferenceKeysPrivate.h:
505         * WebView/WebPreferences.mm:
506         (+[WebPreferences initialize]):
507         (-[WebPreferences webGPUEnabled]):
508         (-[WebPreferences setWebGPUEnabled:]):
509         * WebView/WebPreferencesPrivate.h:
510         * WebView/WebView.mm:
511         (-[WebView _preferencesChanged:]):
512
513 2018-10-15  Alex Christensen  <achristensen@webkit.org>
514
515         Fix iOS build after r237157
516
517         * WebView/WebView.mm:
518         (-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):
519
520 2018-10-15  Alex Christensen  <achristensen@webkit.org>
521
522         Modernize BackForwardClient.h
523         https://bugs.webkit.org/show_bug.cgi?id=190610
524
525         Reviewed by Chris Dumez.
526
527         * History/BackForwardList.h:
528         * History/BackForwardList.mm:
529         (BackForwardList::backListCount const):
530         (BackForwardList::forwardListCount const):
531         (BackForwardList::backListCount): Deleted.
532         (BackForwardList::forwardListCount): Deleted.
533         * History/WebBackForwardList.mm:
534         (-[WebBackForwardList init]):
535         * WebCoreSupport/WebFrameLoaderClient.mm:
536         (WebFrameLoaderClient::canCachePage const):
537         * WebView/WebFrameView.mm:
538         (-[WebFrameView keyDown:keyDown:]):
539         * WebView/WebView.mm:
540         (-[WebView _commonInitializationWithFrameName:groupName:]):
541         (-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):
542         (-[WebView _loadBackForwardListFromOtherView:]):
543         (-[WebView initWithCoder:]):
544         (-[WebView encodeWithCoder:]):
545         (-[WebView backForwardList]):
546         (-[WebView setMaintainsBackForwardList:]):
547
548 2018-10-15  Timothy Hatcher  <timothy@apple.com>
549
550         Add support for prefers-color-scheme media query
551         https://bugs.webkit.org/show_bug.cgi?id=190499
552         rdar://problem/45212025
553
554         Reviewed by Dean Jackson.
555
556         * Configurations/FeatureDefines.xcconfig: Added ENABLE_DARK_MODE_CSS.
557
558 2018-10-15  Alex Christensen  <achristensen@webkit.org>
559
560         Remove unused WebView._globalHistoryItem
561         https://bugs.webkit.org/show_bug.cgi?id=190601
562
563         Reviewed by Chris Dumez.
564
565         * WebCoreSupport/WebFrameLoaderClient.h:
566         * WebCoreSupport/WebFrameLoaderClient.mm:
567         (WebFrameLoaderClient::updateGlobalHistoryItemForPage): Deleted.
568         * WebView/WebView.mm:
569         (-[WebView _globalHistoryItem]): Deleted.
570         (-[WebView _setGlobalHistoryItem:]): Deleted.
571         * WebView/WebViewData.h:
572         * WebView/WebViewInternal.h:
573         * WebView/WebViewPrivate.h:
574
575 2018-10-15  Alex Christensen  <achristensen@webkit.org>
576
577         Remove unused parameters from FrameLoaderClient::createFrame
578         https://bugs.webkit.org/show_bug.cgi?id=190587
579
580         Reviewed by Chris Dumez.
581
582         * WebCoreSupport/WebFrameLoaderClient.h:
583         * WebCoreSupport/WebFrameLoaderClient.mm:
584         (WebFrameLoaderClient::createFrame):
585
586 2018-10-15  Alex Christensen  <achristensen@webkit.org>
587
588         Remove unused WebFrame._loadType
589         https://bugs.webkit.org/show_bug.cgi?id=190583
590
591         Reviewed by Chris Dumez.
592
593         This is unused, and this concept needs to not be exposed from WebCore to WebKitLegacy for me to fix history bugs.
594
595         * WebView/WebFrame.mm:
596         (toWebFrameLoadType): Deleted.
597         (-[WebFrame _loadType]): Deleted.
598         * WebView/WebFramePrivate.h:
599
600 2018-10-15  Chris Dumez  <cdumez@apple.com>
601
602         Restrict browsing context lookup by name to frames that are related to one another
603         https://bugs.webkit.org/show_bug.cgi?id=190475
604
605         Reviewed by Alex Christensen.
606
607         * WebView/WebFrame.mm:
608         (-[WebFrame findFrameNamed:]):
609
610 2018-10-15  Alex Christensen  <achristensen@webkit.org>
611
612         Remove InjectedBundle processing of back/forward lists
613         https://bugs.webkit.org/show_bug.cgi?id=190459
614
615         Reviewed by Chris Dumez.
616
617         * WebCoreSupport/WebFrameLoaderClient.h:
618         * WebCoreSupport/WebFrameLoaderClient.mm:
619         (WebFrameLoaderClient::shouldGoToHistoryItem const):
620
621 2018-10-14  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
622
623         [JSC] Remove Option::useAsyncIterator
624         https://bugs.webkit.org/show_bug.cgi?id=190567
625
626         Reviewed by Saam Barati.
627
628         * Configurations/FeatureDefines.xcconfig:
629
630 2018-10-12  Alex Christensen  <achristensen@webkit.org>
631
632         Allow encoding of small enum classes
633         https://bugs.webkit.org/show_bug.cgi?id=190531
634
635         Reviewed by Tim Horton.
636
637         * WebCoreSupport/WebFrameLoaderClient.mm:
638         (-[WebFramePolicyListener dealloc]):
639
640 2018-10-11  Keith Rollin  <krollin@apple.com>
641
642         CURRENT_ARCH should not be used in Run Script phase.
643         https://bugs.webkit.org/show_bug.cgi?id=190407
644         <rdar://problem/45133556>
645
646         Reviewed by Alexey Proskuryakov.
647
648         CURRENT_ARCH is used in a number of Xcode Run Script phases. However,
649         CURRENT_ARCH is not well-defined during this phase (and may even have
650         the value "undefined") since this phase is run just once per build
651         rather than once per supported architecture. Migrate away from
652         CURRENT_ARCH in favor of ARCHS, either by iterating over ARCHS and
653         performing an operation for each value, or by picking the first entry
654         in ARCHS and using that as a representative value.
655
656         * Configurations/WebKitLegacy.xcconfig: When generating
657         WebKitLegacy.*.exp, generate both 32- and 64-bit versions for
658         macosx platforms.
659
660         * MigrateHeaders.make:
661         * migrate-headers.sh: When generating ReexportedWebCoreSymbols_*.exp,
662         generate one for each architecture in ARCHS.
663
664 2018-10-10  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
665
666         [JSC] Rename createXXX to tryCreateXXX if it can return RefPtr
667         https://bugs.webkit.org/show_bug.cgi?id=190429
668
669         Reviewed by Saam Barati.
670
671         Use `tryCreate` or new `create`. If we use new `create`, we can use Ref<> and remove null check.
672
673         * WebView/WebPDFRepresentation.mm:
674         (-[WebPDFRepresentation finishedLoadingWithDataSource:]):
675
676 2018-10-08  Justin Fan  <justin_fan@apple.com>
677
678         WebGPU: Rename old WebGPU prototype to WebMetal
679         https://bugs.webkit.org/show_bug.cgi?id=190325
680         <rdar://problem/44990443>
681
682         Reviewed by Dean Jackson.
683
684         Rename WebGPU prototype files to WebMetal in preparation for implementing the new (Oct 2018) WebGPU interface.
685
686         * Configurations/FeatureDefines.xcconfig:
687         * WebView/WebPreferenceKeysPrivate.h:
688         * WebView/WebPreferences.mm:
689         (+[WebPreferences initialize]):
690         (-[WebPreferences webMetalEnabled]):
691         (-[WebPreferences setWebMetalEnabled:]):
692         (-[WebPreferences webGPUEnabled]): Deleted.
693         (-[WebPreferences setWebGPUEnabled:]): Deleted.
694         * WebView/WebPreferencesPrivate.h:
695         * WebView/WebView.mm:
696         (-[WebView _preferencesChanged:]):
697
698 2018-10-08  Aditya Keerthi  <akeerthi@apple.com>
699
700         Make <input type=color> a runtime enabled (on-by-default) feature
701         https://bugs.webkit.org/show_bug.cgi?id=189162
702
703         Reviewed by Wenson Hsieh and Tim Horton.
704
705         * Configurations/FeatureDefines.xcconfig:
706
707 2018-10-07  Dan Bernstein  <mitz@apple.com>
708
709         Fixed building with the latest macOS SDK
710
711         * Plugins/WebNetscapePluginPackage.mm:
712         (-[WebNetscapePluginPackage openResourceFile]):
713         (-[WebNetscapePluginPackage closeResourceFile:]):
714
715 2018-10-04  Dan Bernstein  <mitz@apple.com>
716
717         More Carbon build-fixing.
718
719         * Carbon/CarbonWindowAdapter.mm:
720         (-[CarbonWindowAdapter _destroyRealWindow:]):
721         (-[CarbonWindowAdapter _growBoxRect]):
722
723 2018-10-04  Dan Bernstein  <mitz@apple.com>
724
725         Retried to fix 32-bit macOS builds after r236846.
726
727         * WebView/WebHTMLView.mm:
728         (-[WebHTMLView setMarkedText:selectedRange:]):
729
730 2018-10-04  Dan Bernstein  <mitz@apple.com>
731
732         Retried to fix 32-bit macOS builds after r236846.
733
734         * Carbon/HIWebView.mm:
735         (ActiveStateChanged):
736
737 2018-10-04  Dan Bernstein  <mitz@apple.com>
738
739         Tried to fix 32-bit macOS builds after r236846.
740
741         * Carbon/HIWebView.mm:
742         (_NSSelectorForHICommand):
743
744 2018-10-04  Dan Bernstein  <mitz@apple.com>
745
746         WebKitLegacy part of [Xcode] Update some build settings as recommended by Xcode 10
747         https://bugs.webkit.org/show_bug.cgi?id=190250
748
749         Reviewed by Andy Estes.
750
751         * Configurations/Base.xcconfig: Enabled CLANG_WARN_COMMA, CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF,
752           CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS, and CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED.
753           Also enabled GCC_WARN_UNDECLARED_SELECTOR by deleting the line that set it to NO, which let
754           an earlier line set it to YES.
755
756         Enabling -Wundeclared-selector exposed some long-standing mistakes and required the most
757         changes below.
758
759         * DefaultDelegates/WebDefaultContextMenuDelegate.mm: Imported an internal header that
760           provides some missing method declarations.
761
762         * Misc/WebDownload.mm:
763         (-[WebDownload initWithRequest:delegate:]): Suppressed warning about this implementation of
764           a deprecated method.
765
766         * Misc/WebIconDatabase.mm: Suppressed warning around our implementation of a deprecated class.
767
768         * Misc/WebNSObjectExtras.mm: Declare a category that is implemented in this file, because
769           other code in the file uses a method from it.
770
771         * Plugins/WebBaseNetscapePluginView.mm:
772         (-[WebBaseNetscapePluginView renewGState]): Suppressed warning about this implementation of
773           a deprecated method.
774
775         * Plugins/WebPluginController.mm:
776         (installFlip4MacPlugInWorkaroundIfNecessary): Suppressed the undeclared selector warning
777           around use of a selector that may be present in some WebKit client.
778
779         * Plugins/WebPluginDatabase.mm: Imported an internal header that provides some missing
780           method declarations.
781
782         * WebCoreSupport/PopupMenuMac.mm: Imported a header that delcares delegate methods we call
783           from here.
784
785         * WebCoreSupport/WebCachedFramePlatformData.h: Imported an internal header that provides some
786           missing method declarations.
787
788         * WebCoreSupport/WebChromeClient.mm: Imported a header that declares delegate methods we call
789           from here.
790
791         * WebCoreSupport/WebFrameLoaderClient.mm: Imported headers that declare delegate methods we
792           call from here.
793         (WebFrameLoaderClient::setTitle): Suppressed the undeclared selector warning around use of
794           an obsolete delegate method for binary compatibility.
795         (pluginView): Ditto.
796
797         * WebCoreSupport/WebVisitedLinkStore.mm: Imported a header that declares delegate methods we
798           call from here.
799
800         * WebView/WebDeviceOrientationInternal.h: Declared -setController in a new
801           WebDeviceOrientationProviderMock protocol.
802
803         * WebView/WebDeviceOrientationProviderMock.mm:
804         (-[WebDeviceOrientationProviderMock setController:]): Moved from an internal category to the
805           main @implementation.
806
807         * WebView/WebDeviceOrientationProviderMockInternal.h: Declared that
808           WebDeviceOrientationProviderMock conforms to WebDeviceOrientationProviderMock.
809
810         * WebView/WebDynamicScrollBarsView.mm:
811         (-[WebDynamicScrollBarsView accessibilityIsIgnored]): Suppressed warning about this implementation
812           of a deprecated method.
813
814         * WebView/WebHTMLView.mm:
815         (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): Suppressed the undeclared
816           selector warning around action methods that are not declared anywhere in WebKit.
817
818         (-[WebHTMLView dragImage:at:offset:event:pasteboard:source:slideBack:]): Suppressed warning
819           about implementing this deprecated method.
820         (-[WebHTMLView draggingSourceOperationMaskForLocal:]): Ditto.
821         (-[WebHTMLView draggedImage:endedAt:operation:]): Ditto.
822         (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Ditto.
823         (-[WebHTMLView accessibilityAttributeValue:]): Ditto.
824         (-[WebHTMLView characterIndexForPoint:]): Ditto.
825         (-[WebHTMLView firstRectForCharacterRange:]): Ditto.
826         (-[WebHTMLView attributedSubstringFromRange:]): Ditto.
827         (-[WebHTMLView setMarkedText:selectedRange:]): Ditto.
828         (-[WebHTMLView doCommandBySelector:]): Ditto.
829         (-[WebHTMLView insertText:]): Ditto.
830
831         * WebView/WebHTMLViewInternal.h: Declared an internal method that’s used from another file.
832
833         * WebView/WebJSPDFDoc.mm: Imported a header that declares delegate methods we call from here.
834
835         * WebView/WebPDFView.h: Removed previewView ivar.
836
837         * WebView/WebPDFView.mm:
838           Removed declaration of FileInternal category and merged its implementation with the main
839           implementation.
840         (-[WebPDFView dealloc]): Removed previewView ivar.
841         (-[WebPDFView initWithFrame:]): Removed code to deal with PDFPreviewView, which doesn’t
842           exist in macOS versions we support.
843         (+[WebPDFView _PDFPreviewViewClass]): Deleted. PDFPreviewView doesn’t exist anymore.
844         (-[WebPDFView _canLookUpInDictionary]): Suppressed undeclared selector warning around use of
845           action methods internal to PDFKit.
846         (-[WebPDFView _lookUpInDictionaryFromMenu:]): Ditto.
847         (-[WebPDFView _menuItemsFromPDFKitForEvent:]): Ditto.
848
849         * WebView/WebUIDelegatePrivate.h: Restored declarations of the delegate methods we actually
850           call on macOS, even though in r86988 we started calling different methods on iOS.
851
852         * WebView/WebView.mm:
853         - Imported headers that declare delegate methods that we call.
854         - Removed declaration of WebFileInternal category and merged its implementation with the
855           main implementation.
856         - Many internal methods were inexplicibly implemented as part of the WebViewEditingInMail
857           category, which made them impossible to call from the main implementation. Moved those
858           into the main implementation. One of those had to be declared in a class extension,
859           because it is called from a method implemented in the WebPrivate category, and that
860           category’s implementation appears first in the file.
861
862         (-[WebView _cacheHistoryDelegateImplementations]): Suppressed undeclared selector warning
863           around use of obsolete delegate method for binary compatibility.
864
865         * WebView/WebViewInternal.h: Declared an internal method that’s used from another file.
866
867 2018-10-04  YUHAN WU  <yuhan_wu@apple.com>
868
869         Runtime flag and IDL for MediaRecorder
870         https://bugs.webkit.org/show_bug.cgi?id=190018
871
872         Reviewed by Youenn Fablet and Chris Dumez.
873
874         * WebView/WebPreferenceKeysPrivate.h:
875         * WebView/WebPreferences.mm:
876         (+[WebPreferences initialize]):
877         (-[WebPreferences mediaRecorderEnabled]):
878         (-[WebPreferences setMediaRecorderEnabled:]):
879         * WebView/WebPreferencesPrivate.h:
880         * WebView/WebView.mm:
881         (-[WebView _preferencesChanged:]):
882
883 2018-10-03  Ryosuke Niwa  <rniwa@webkit.org>
884
885         Enable selectionAcrossShadowBoundariesEnabled by default in WebKitLegacy
886         https://bugs.webkit.org/show_bug.cgi?id=190238
887
888         Reviewed by Antti Koivisto.
889
890         Enabled the feature by default.
891
892         * WebView/WebPreferences.mm:
893         (+[WebPreferences initialize]):
894
895 2018-10-01  Dean Jackson  <dino@apple.com>
896
897         [macOS] Switching to discrete GPU should be done in the UI process
898         https://bugs.webkit.org/show_bug.cgi?id=189361
899         <rdar://problem/43949622>
900
901         Reviewed by Simon Fraser.
902
903         Implement a no-op SwitchingGPUClient instance in legacy WebKit. We will
904         not support swapping to the discrete GPU in this configuration.
905
906         * WebCoreSupport/WebSwitchingGPUClient.cpp: Added.
907         (WebKit::WebSwitchingGPUClient::singleton):
908         * WebCoreSupport/WebSwitchingGPUClient.h: Added.
909         * WebView/WebView.mm:
910         (-[WebView _commonInitializationWithFrameName:groupName:]):
911
912 2018-10-02  Alex Christensen  <achristensen@webkit.org>
913
914         Remove ParsedURLString
915         https://bugs.webkit.org/show_bug.cgi?id=190154
916
917         Reviewed by Chris Dumez.
918
919         * WebView/WebScriptDebugger.mm:
920         (toNSURL):
921
922 2018-10-01  Dean Jackson  <dino@apple.com>
923
924         Remove CSS Animation Triggers
925         https://bugs.webkit.org/show_bug.cgi?id=190175
926         <rdar://problem/44925626>
927
928         Reviewed by Simon Fraser.
929
930         * Configurations/FeatureDefines.xcconfig:
931
932 2018-10-02  Commit Queue  <commit-queue@webkit.org>
933
934         Unreviewed, rolling out r236624 and r236671.
935         https://bugs.webkit.org/show_bug.cgi?id=190207
936
937         The change in r236624 introduced crashes on the bots
938         (Requested by ryanhaddad on #webkit).
939
940         Reverted changesets:
941
942         "Refactoring: eliminate raw pointer usage in Fullscreen code"
943         https://bugs.webkit.org/show_bug.cgi?id=188747
944         https://trac.webkit.org/changeset/236624
945
946         "Unify implementation in VideoFullscreenInterfaceAVKit"
947         https://bugs.webkit.org/show_bug.cgi?id=190091
948         https://trac.webkit.org/changeset/236671
949
950 2018-10-01  Alex Christensen  <achristensen@webkit.org>
951
952         URL should not use TextEncoding internally
953         https://bugs.webkit.org/show_bug.cgi?id=190111
954
955         Reviewed by Andy Estes.
956
957         * Misc/WebNSURLExtras.mm:
958
959 2018-09-28  Jer Noble  <jer.noble@apple.com>
960
961         Refactoring: eliminate raw pointer usage in Fullscreen code
962         https://bugs.webkit.org/show_bug.cgi?id=188747
963         <rdar://problem/43541164>
964
965         Reviewed by Alex Christensen.
966
967         PlaybackSessionInterface no longer has an invalidate() method.
968
969         * WebView/WebView.mm:
970         (-[WebView _clearPlaybackControlsManager]):
971
972 2018-09-28  Chris Dumez  <cdumez@apple.com>
973
974         Drop support for cross-origin-window-policy header
975         https://bugs.webkit.org/show_bug.cgi?id=190081
976
977         Reviewed by Ryosuke Niwa.
978
979         * WebView/WebPreferenceKeysPrivate.h:
980         * WebView/WebPreferences.mm:
981         (+[WebPreferences initialize]):
982         * WebView/WebPreferencesPrivate.h:
983         * WebView/WebView.mm:
984         (-[WebView _preferencesChanged:]):
985
986 2018-09-28  Ryosuke Niwa  <rniwa@webkit.org>
987
988         Rename createMarkup to serializePreservingVisualAppearance
989         https://bugs.webkit.org/show_bug.cgi?id=190086
990
991         Reviewed by Wenson Hsieh.
992
993         * DOM/WebDOMOperations.mm:
994         (-[DOMRange markupString]):
995
996 2018-09-28  Commit Queue  <commit-queue@webkit.org>
997
998         Unreviewed, rolling out r236605.
999         https://bugs.webkit.org/show_bug.cgi?id=190087
1000
1001         caused three API test timeouts (Requested by jernoble on
1002         #webkit).
1003
1004         Reverted changeset:
1005
1006         "Refactoring: eliminate raw pointer usage in Fullscreen code"
1007         https://bugs.webkit.org/show_bug.cgi?id=188747
1008         https://trac.webkit.org/changeset/236605
1009
1010 2018-09-28  Jer Noble  <jer.noble@apple.com>
1011
1012         Refactoring: eliminate raw pointer usage in Fullscreen code
1013         https://bugs.webkit.org/show_bug.cgi?id=188747
1014         <rdar://problem/43541164>
1015
1016         Reviewed by Alex Christensen.
1017
1018         PlaybackSessionInterface no longer has an invalidate() method.
1019
1020         * WebView/WebView.mm:
1021         (-[WebView _clearPlaybackControlsManager]):
1022
1023 2018-09-26  Ryosuke Niwa  <rniwa@webkit.org>
1024
1025         Use enum class in createMarkup arguments
1026         https://bugs.webkit.org/show_bug.cgi?id=190028
1027
1028         Reviewed by Wenson Hsieh.
1029
1030         * DOM/WebDOMOperations.mm:
1031         (-[DOMNode markupString]): Moved the code from WebCore/editing/markup.cpp
1032         (-[DOMRange markupString]): Ditto.
1033
1034 2018-09-27  Antoine Quint  <graouts@apple.com>
1035
1036         [Web Animations] Turn Web Animations with CSS integration on
1037         https://bugs.webkit.org/show_bug.cgi?id=184819
1038         <rdar://problem/39597337>
1039
1040         Reviewed by Dean Jackson.
1041
1042         * WebView/WebPreferences.mm:
1043         (+[WebPreferences initialize]):
1044
1045 2018-09-26  Ryosuke Niwa  <rniwa@webkit.org>
1046
1047         Selection should work across shadow boundary when initiated by a mouse drag
1048         https://bugs.webkit.org/show_bug.cgi?id=151380
1049         <rdar://problem/24363872>
1050
1051         Reviewed by Wenson Hsieh.
1052
1053         Added selectionAcrossShadowBoundariesEnabled as a preference to be used in DumpRenderTree.
1054
1055         * WebView/WebPreferenceKeysPrivate.h:
1056         * WebView/WebPreferences.mm:
1057         (+[WebPreferences initialize]):
1058         (-[WebPreferences selectionAcrossShadowBoundariesEnabled]):
1059         (-[WebPreferences setSelectionAcrossShadowBoundariesEnabled:]):
1060         * WebView/WebPreferencesPrivate.h:
1061         * WebView/WebView.mm:
1062         (-[WebView _preferencesChanged:]):
1063
1064 2018-09-24  Wenson Hsieh  <wenson_hsieh@apple.com>
1065
1066         Refactor Editor::fontAttributesForSelectionStart to be platform-agnostic
1067         https://bugs.webkit.org/show_bug.cgi?id=189918
1068         Work towards <rdar://problem/44648705>
1069
1070         Reviewed by Tim Horton.
1071
1072         Replace call sites of fontAttributesForSelectionStart() to fontAttributesAtSelectionStart().createDictionary().
1073
1074         * WebView/WebHTMLView.mm:
1075         (-[WebHTMLView _selectionStartFontAttributesAsRTF]):
1076         (-[WebHTMLView _updateFontPanel]):
1077         * WebView/WebView.mm:
1078         (-[WebView typingAttributes]):
1079
1080 2018-09-17  Darin Adler  <darin@apple.com>
1081
1082         Use OpaqueJSString rather than JSRetainPtr inside WebKit
1083         https://bugs.webkit.org/show_bug.cgi?id=189652
1084
1085         Reviewed by Saam Barati.
1086
1087         * WebView/WebPDFRepresentation.mm:
1088         (-[WebPDFRepresentation finishedLoadingWithDataSource:]): Use OpaqueJSString::create.
1089
1090 2018-09-14  Jer Noble  <jer.noble@apple.com>
1091
1092         Turn SourceBufferChangeTypeEnabled on by default
1093         https://bugs.webkit.org/show_bug.cgi?id=189527
1094
1095         Reviewed by Eric Carlson.
1096
1097         * WebView/WebPreferences.mm:
1098         (+[WebPreferences initialize]):
1099
1100 2018-09-12  Alex Christensen  <achristensen@webkit.org>
1101
1102         Fix an internal build after r235935
1103         https://bugs.webkit.org/show_bug.cgi?id=188996
1104
1105         * Carbon/HIWebView.mm:
1106         (Draw):
1107         r235935 fixed a mismatched macro with deprecated functions below it.  To quickly fix the build, I'm just going to restore the imbalance.
1108
1109 2018-09-12  Guillaume Emont  <guijemont@igalia.com>
1110
1111         Add IGNORE_WARNING_.* macros
1112         https://bugs.webkit.org/show_bug.cgi?id=188996
1113
1114         Reviewed by Michael Catanzaro.
1115
1116         * Carbon/CarbonUtils.m:
1117         (PoolCleaner):
1118         * Carbon/CarbonWindowAdapter.mm:
1119         (-[CarbonWindowAdapter initWithCarbonWindowRef:takingOwnership:disableOrdering:carbon:]):
1120         (-[CarbonWindowAdapter setViewsNeedDisplay:]):
1121         (-[CarbonWindowAdapter reconcileToCarbonWindowBounds]):
1122         (-[CarbonWindowAdapter _termWindowIfOwner]):
1123         (-[CarbonWindowAdapter _windowMovedToRect:]):
1124         (-[CarbonWindowAdapter setContentView:]):
1125         (-[CarbonWindowAdapter _handleRootBoundsChanged]):
1126         (-[CarbonWindowAdapter _handleContentBoundsChanged]):
1127         * Carbon/CarbonWindowFrame.m:
1128         (-[CarbonWindowFrame title]):
1129         * Carbon/HIViewAdapter.m:
1130         (+[HIViewAdapter getHIViewForNSView:]):
1131         * Carbon/HIWebView.mm:
1132         (overrideCGContext):
1133         (restoreCGContext):
1134         (Draw):
1135         * DOM/DOM.mm:
1136         * History/WebHistory.mm:
1137         (-[WebHistoryPrivate loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]):
1138         * History/WebHistoryItem.mm:
1139         (-[WebHistoryItem icon]):
1140         * Misc/WebKitNSStringExtras.mm:
1141         (-[NSString _web_drawAtPoint:font:textColor:]):
1142         * Misc/WebNSImageExtras.m:
1143         (-[NSImage _web_scaleToMaxSize:]):
1144         (-[NSImage _web_dissolveToFraction:]):
1145         * Misc/WebNSPasteboardExtras.mm:
1146         (+[NSPasteboard _web_setFindPasteboardString:withOwner:]):
1147         (-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):
1148         * Panels/WebAuthenticationPanel.m:
1149         (-[WebAuthenticationPanel loadNib]):
1150         * Plugins/Hosted/NetscapePluginHostManager.mm:
1151         (WebKit::NetscapePluginHostManager::spawnPluginHost):
1152         (WebKit::NetscapePluginHostManager::didCreateWindow):
1153         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1154         (WebKit::NetscapePluginHostProxy::makeCurrentProcessFrontProcess):
1155         (WebKit::NetscapePluginHostProxy::makePluginHostProcessFrontProcess const):
1156         (WebKit::NetscapePluginHostProxy::isPluginHostProcessFrontProcess const):
1157         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1158         (WebKit::NetscapePluginInstanceProxy::mouseEvent):
1159         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1160         (-[WebHostedNetscapePluginView drawRect:]):
1161         * Plugins/Hosted/WebTextInputWindowController.m:
1162         (-[WebTextInputPanel _interpretKeyEvent:string:]):
1163         * Plugins/WebBaseNetscapePluginView.mm:
1164         (-[WebBaseNetscapePluginView convertFromX:andY:space:toX:andY:space:]):
1165         * Plugins/WebNetscapePluginPackage.mm:
1166         (-[WebNetscapePluginPackage _tryLoad]):
1167         * Plugins/WebNetscapePluginView.mm:
1168         (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
1169         (-[WebNetscapePluginView sendDrawRectEvent:]):
1170         (-[WebNetscapePluginView drawRect:]):
1171         * Plugins/WebPluginController.mm:
1172         (WebKit_TSUpdateCheck_alertDidEnd_returnCode_contextInfo_):
1173         (WebKit_NSAlert_beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_):
1174         * WebCoreSupport/PopupMenuMac.mm:
1175         (PopupMenuMac::populate):
1176         * WebCoreSupport/WebAlternativeTextClient.h:
1177         * WebCoreSupport/WebDragClient.mm:
1178         (WebDragClient::startDrag):
1179         * WebCoreSupport/WebFrameLoaderClient.mm:
1180         (WebFrameLoaderClient::convertMainResourceLoadToDownload):
1181         (webGetNSImage):
1182         * WebInspector/WebNodeHighlight.mm:
1183         * WebInspector/WebNodeHighlightView.mm:
1184         (-[WebNodeHighlightView drawRect:]):
1185         * WebView/WebClipView.mm:
1186         (-[WebClipView initWithFrame:]):
1187         * WebView/WebFrame.mm:
1188         (-[WebFrame _updateBackgroundAndUpdatesWhileOffscreen]):
1189         (-[WebFrame _drawRect:contentsOnly:]):
1190         (-[WebFrame accessibilityRoot]):
1191         * WebView/WebFullScreenController.mm:
1192         (-[WebFullScreenController enterFullScreen:]):
1193         (-[WebFullScreenController finishedEnterFullScreenAnimation:]):
1194         (-[WebFullScreenController exitFullScreen]):
1195         (-[WebFullScreenController finishedExitFullScreenAnimation:]):
1196         (-[WebFullScreenController _startEnterFullScreenAnimationWithDuration:]):
1197         (-[WebFullScreenController _startExitFullScreenAnimationWithDuration:]):
1198         * WebView/WebHTMLView.mm:
1199         (-[NSWindow _web_borderView]):
1200         (-[WebHTMLView _updateMouseoverWithFakeEvent]):
1201         (-[WebHTMLView _setAsideSubviews]):
1202         (-[WebHTMLView _autoscroll]):
1203         (-[WebHTMLView drawRect:]):
1204         (-[WebHTMLView mouseDown:]):
1205         (-[WebHTMLView mouseDragged:]):
1206         (-[WebHTMLView mouseUp:]):
1207         (-[WebHTMLView _endPrintModeAndRestoreWindowAutodisplay]):
1208         (-[WebHTMLView knowsPageRange:]):
1209         (-[WebHTMLView accessibilityHitTest:]):
1210         (-[WebHTMLView _fontAttributesFromFontPasteboard]):
1211         (-[WebHTMLView _colorAsString:]):
1212         (-[WebHTMLView copyFont:]):
1213         (-[WebHTMLView _executeSavedKeypressCommands]):
1214         (-[WebHTMLView attachRootLayer:]):
1215         (-[WebHTMLView textStorage]):
1216         (-[WebHTMLView _updateSelectionForInputManager]):
1217         * WebView/WebPDFView.mm:
1218         (_applicationInfoForMIMEType):
1219         (-[WebPDFView centerSelectionInVisibleArea:]):
1220         (-[WebPDFView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
1221         (-[WebPDFView _recursiveDisplayAllDirtyWithLockFocus:visRect:]):
1222         (-[WebPDFView _recursive:displayRectIgnoringOpacity:inContext:topView:]):
1223         (-[WebPDFView searchFor:direction:caseSensitive:wrap:startInSelection:]):
1224         * WebView/WebTextCompletionController.mm:
1225         (-[WebTextCompletionController _buildUI]):
1226         (-[WebTextCompletionController _placePopupWindow:]):
1227         * WebView/WebVideoFullscreenController.mm:
1228         * WebView/WebVideoFullscreenHUDWindowController.mm:
1229         (createMediaUIBackgroundView):
1230         * WebView/WebView.mm:
1231         (-[WebTextListTouchBarViewController initWithWebView:]):
1232         (-[WebView _dispatchTileDidDraw:]):
1233         (-[WebView encodeWithCoder:]):
1234         (-[WebView mainFrameIcon]):
1235         (LayerFlushController::flushLayers):
1236         * WebView/WebWindowAnimation.mm:
1237         (setScaledFrameForWindow):
1238
1239 2018-09-10  Fujii Hironori  <Hironori.Fujii@sony.com>
1240
1241         Remove unused needsDestruction class variables from HashTraits
1242         https://bugs.webkit.org/show_bug.cgi?id=189490
1243
1244         Reviewed by Daniel Bates.
1245
1246         * History/BinaryPropertyList.cpp: Removed needsDestruction.
1247
1248 2018-09-07  Frederic Wang  <fwang@igalia.com>
1249
1250         [CSSOM View] Handle the scrollingElement in Element::scroll(Left/Top/Width/Height/To)
1251         https://bugs.webkit.org/show_bug.cgi?id=182230
1252
1253         Reviewed by Simon Fraser.
1254
1255         * DOM/DOMDocument.mm:
1256         (-[DOMDocument scrollingElement]): Use the new name.
1257
1258 2018-09-06  Wenson Hsieh  <wenson_hsieh@apple.com>
1259
1260         Refactor WebCore::EditAction to be an 8-bit enum class
1261         https://bugs.webkit.org/show_bug.cgi?id=189383
1262
1263         Reviewed by Dan Bernstein.
1264
1265         * WebCoreSupport/WebEditorClient.mm:
1266         (undoNameForEditAction):
1267         * WebView/WebHTMLView.mm:
1268         (-[WebHTMLView pasteFont:]):
1269         (-[WebHTMLView changeFont:]):
1270         (-[WebHTMLView changeAttributes:]):
1271         (-[WebHTMLView _undoActionFromColorPanelWithSelector:]):
1272         (-[WebHTMLView changeColor:]):
1273         * WebView/WebView.mm:
1274         (-[WebView setTypingStyle:]):
1275
1276 2018-09-06  Frederic Wang  <fwang@igalia.com>
1277
1278         Group options of scrollRectToVisible into a struct
1279         https://bugs.webkit.org/show_bug.cgi?id=189352
1280
1281         Reviewed by Simon Fraser.
1282
1283         * WebView/WebFrame.mm: Add header to use ScrollRectToVisibleOptions.
1284         (-[WebFrame _scrollDOMRangeToVisible:]): Pass options via a struct.
1285         (-[WebFrame _scrollDOMRangeToVisible:withInset:]): Ditto.
1286
1287 2018-09-06  Wenson Hsieh  <wenson_hsieh@apple.com>
1288
1289         [macOS] Cannot change font size at selection until font panel is shown
1290         https://bugs.webkit.org/show_bug.cgi?id=189295
1291         <rdar://problem/35593389>
1292
1293         Reviewed by Ryosuke Niwa.
1294
1295         Remove code in WebKitLegacy for diffing NSFonts to figure out which style properties need to be changed. See
1296         WebCore ChangeLog for more details.
1297
1298         * WebView/WebHTMLView.mm:
1299         (-[WebHTMLView changeFont:]):
1300         (-[WebHTMLView changeAttributes:]):
1301         (-[WebHTMLView _originalFontA]): Deleted.
1302         (-[WebHTMLView _originalFontB]): Deleted.
1303         (fontNameForDescription): Deleted.
1304         (-[WebHTMLView _addToStyle:fontA:fontB:]): Deleted.
1305         (-[WebHTMLView _styleFromFontManagerOperation]): Deleted.
1306         (-[WebHTMLView _styleForAttributeChange:]): Deleted.
1307
1308 2018-09-05  Jer Noble  <jer.noble@apple.com>
1309
1310         Add MediaCapabilities as an Experimental Feature
1311         https://bugs.webkit.org/show_bug.cgi?id=189209
1312
1313         Reviewed by Eric Carlson.
1314
1315         RuntimeEnabledFeature -> Setting.
1316
1317         * WebView/WebView.mm:
1318         (-[WebView _preferencesChanged:]):
1319
1320 2018-09-04  Frederic Wang  <fwang@igalia.com>
1321
1322         Add basic support for ScrollIntoViewOptions
1323         https://bugs.webkit.org/show_bug.cgi?id=189258
1324
1325         Reviewed by Simon Fraser.
1326
1327         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElementGtk.cpp: Add ScrollIntoViewOptions
1328         header so that this file can build despite the new scrollIntoView function.
1329
1330 2018-09-04  Wenson Hsieh  <wenson_hsieh@apple.com>
1331
1332         Populate "text/uri-list" with multiple URLs when the pasteboard contains multiple URLs
1333         https://bugs.webkit.org/show_bug.cgi?id=188890
1334         <rdar://problem/43648605>
1335
1336         Reviewed by Tim Horton.
1337
1338         Add some plumbing through pasteboard classes to support `Pasteboard::readAllStrings`. See WebCore ChangeLog for
1339         more detail.
1340
1341         * WebCoreSupport/WebPlatformStrategies.h:
1342         * WebCoreSupport/WebPlatformStrategies.mm:
1343         (WebPlatformStrategies::allStringsForType):
1344
1345 2018-09-01  Darin Adler  <darin@apple.com>
1346
1347         [CFNetwork] Update CFNetwork SPI use to use CFNetworkSPI.h more consistently
1348         https://bugs.webkit.org/show_bug.cgi?id=189072
1349         Reviewed by Dan Bernstein.
1350
1351         * Misc/WebDownload.mm: Removed forward declaration of NSURLConnectionDelegateProxy
1352         and declarations for NSURLDownload init methods.
1353
1354         * Misc/WebDownloadInternal.h: Removed.
1355
1356         * WebCoreSupport/WebFrameLoaderClient.mm: Removed include of WebDownloadInternal.h.
1357         (WebFrameLoaderClient::convertMainResourceLoadToDownload): Ignore
1358         "-Wdeprecated-declarations" because the method used here is deprecated.
1359
1360         * WebView/WebView.mm:
1361         (-[WebView _downloadURL:]): Ignore "-Wdeprecated-declarations" because the method
1362         used here is deprecated.
1363
1364 2018-08-31  Chris Dumez  <cdumez@apple.com>
1365
1366         Assertion hit in ~CompletionHandler() from ~WebFrame()
1367         https://bugs.webkit.org/show_bug.cgi?id=189199
1368         <rdar://problem/42657233>
1369
1370         Reviewed by Youenn Fablet.
1371
1372         * WebCoreSupport/WebFrameLoaderClient.h:
1373         * WebCoreSupport/WebFrameLoaderClient.mm:
1374         (WebFrameLoaderClient::dispatchWillSubmitForm):
1375
1376 2018-08-31  Antti Koivisto  <antti@apple.com>
1377
1378         Replace OptionSet |= and -= operators with add() and remove() functions
1379         https://bugs.webkit.org/show_bug.cgi?id=189169
1380
1381         Reviewed by Anders Carlsson.
1382
1383         * WebView/WebFrame.mm:
1384         (-[WebFrame _drawRect:contentsOnly:]):
1385         * WebView/WebView.mm:
1386         (coreOptions):
1387
1388 2018-08-31  Frederic Wang  <fwang@igalia.com>
1389
1390         Bug 182053 - [CSSOM View] Implement standard behavior for scrollingElement
1391         https://bugs.webkit.org/show_bug.cgi?id=182053
1392
1393         Reviewed by Simon Fraser.
1394
1395         Add developer flag to use standard behavior for scrolling* attributes.
1396
1397         * WebView/WebPreferenceKeysPrivate.h:
1398         * WebView/WebPreferences.mm:
1399         (+[WebPreferences initialize]):
1400         (-[WebPreferences CSSOMViewScrollingAPIEnabled]):
1401         (-[WebPreferences setCSSOMViewScrollingAPIEnabled:]):
1402         * WebView/WebPreferencesPrivate.h:
1403         * WebView/WebView.mm:
1404         (-[WebView _preferencesChanged:]):
1405
1406 2018-08-29  Olivia Barnett  <obarnett@apple.com>
1407
1408         Implement the Web Share API
1409         https://bugs.webkit.org/show_bug.cgi?id=171100
1410         <rdar://problem/31751734>
1411
1412         Reviewed by Tim Horton.
1413
1414         * WebCoreSupport/WebChromeClient.h:
1415         * WebCoreSupport/WebChromeClient.mm:
1416         (WebChromeClient::showShareSheet):
1417         Empty declaration of showShareSheet.
1418
1419 2018-08-29  Youenn Fablet  <youenn@apple.com>
1420
1421         Remove WebRTC legacy API implementation
1422         https://bugs.webkit.org/show_bug.cgi?id=189040
1423
1424         Reviewed by Eric Carlson.
1425
1426         * WebView/WebPreferenceKeysPrivate.h:
1427         * WebView/WebPreferences.mm:
1428         (+[WebPreferences initialize]):
1429         (-[WebPreferences webRTCLegacyAPIEnabled]): Deleted.
1430         (-[WebPreferences setWebRTCLegacyAPIEnabled:]): Deleted.
1431         * WebView/WebPreferencesPrivate.h:
1432         * WebView/WebView.mm:
1433         (-[WebView _preferencesChanged:]):
1434
1435 2018-08-28  Wenson Hsieh  <wenson_hsieh@apple.com>
1436
1437         Work towards: [iOS] Consolidate the implementations of readString, stringForType, and readURL in PlatformPasteboardIOS.mm
1438         https://bugs.webkit.org/show_bug.cgi?id=189054
1439
1440         Reviewed by Andy Estes.
1441
1442         Remove the pasteboard type argument from readURLFromPasteboard.
1443
1444         * WebCoreSupport/WebPlatformStrategies.h:
1445         * WebCoreSupport/WebPlatformStrategies.mm:
1446         (WebPlatformStrategies::readURLFromPasteboard):
1447
1448 2018-08-27  Keith Rollin  <krollin@apple.com>
1449
1450         Unreviewed build fix -- disable LTO for production builds
1451
1452         * Configurations/Base.xcconfig:
1453
1454 2018-08-27  Aditya Keerthi  <akeerthi@apple.com>
1455
1456         Consolidate ENABLE_INPUT_TYPE_COLOR and ENABLE_INPUT_TYPE_COLOR_POPOVER
1457         https://bugs.webkit.org/show_bug.cgi?id=188931
1458
1459         Reviewed by Wenson Hsieh.
1460
1461         * Configurations/FeatureDefines.xcconfig: Removed ENABLE_INPUT_TYPE_COLOR_POPOVER.
1462
1463 2018-08-27  Keith Rollin  <krollin@apple.com>
1464
1465         Build system support for LTO
1466         https://bugs.webkit.org/show_bug.cgi?id=187785
1467         <rdar://problem/42353132>
1468
1469         Reviewed by Dan Bernstein.
1470
1471         Update Base.xcconfig and DebugRelease.xcconfig to optionally enable
1472         LTO.
1473
1474         * Configurations/Base.xcconfig:
1475         * Configurations/DebugRelease.xcconfig:
1476
1477 2018-08-24  Ryosuke Niwa  <rniwa@webkit.org>
1478
1479         Pass in IsComposed flag to Event constructors
1480         https://bugs.webkit.org/show_bug.cgi?id=188720
1481         <rdar://problem/43580387>
1482
1483         Reviewed by Simon Fraser.
1484
1485         * WebView/WebPDFView.mm:
1486         (-[WebPDFView PDFViewWillClickOnLink:withURL:]): A trusted click event is composed regardless of
1487         whether it's simulated or not.
1488
1489 2018-08-23  Mark Lam  <mark.lam@apple.com>
1490
1491         Move vmEntryGlobalObject() to VM from CallFrame.
1492         https://bugs.webkit.org/show_bug.cgi?id=188900
1493         <rdar://problem/43655753>
1494
1495         Reviewed by Michael Saboff.
1496
1497         * WebView/WebScriptDebugger.mm:
1498         (WebScriptDebugger::sourceParsed):
1499
1500 2018-08-23  Andy Estes  <aestes@apple.com>
1501
1502         [Apple Pay] Introduce Apple Pay JS v4 on iOS 12 and macOS Mojave
1503         https://bugs.webkit.org/show_bug.cgi?id=188829
1504
1505         Reviewed by Tim Horton.
1506
1507         * Configurations/FeatureDefines.xcconfig:
1508
1509 2018-08-21  Ryosuke Niwa  <rniwa@webkit.org>
1510
1511         Replace booleans for modifier keys in UIEventWithKeyState with OptionSet<Modifier>
1512         https://bugs.webkit.org/show_bug.cgi?id=188777
1513
1514         Reviewed by Simon Fraser.
1515
1516         Create MouseEvent::create with IsSimulated set to Yes; correspoding to the last argument
1517         being "true" before the code change.
1518
1519         Use modifiersForEvent to convert [nsEvent modifierFlags] to OptionSet<Modifier>.
1520
1521         * WebView/WebPDFView.mm:
1522         (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
1523
1524 2018-08-21  Daniel Bates  <dabates@apple.com>
1525
1526         Replace TextCheckingTypeMask with OptionSet
1527         https://bugs.webkit.org/show_bug.cgi?id=188678
1528
1529         Reviewed by Antti Koivisto.
1530
1531         Currently we have code in WebEditorClient::checkTextOfParagraph() that incorrectly assumes
1532         that the enumerators of TextCheckingType have a one-to-one correspondence with NSTextCheckingType.
1533         (This is not the case because there is not corresponding NSTextCheckingType for TextCheckingTypeShowCorrectionPanel).
1534         We now explicitly convert from OptionSet<TextCheckingType> to NSTextCheckingTypes.
1535
1536         * WebCoreSupport/WebEditorClient.h:
1537         * WebCoreSupport/WebEditorClient.mm:
1538         (WebEditorClient::checkTextOfParagraph):
1539         (WebEditorClient::shouldEraseMarkersAfterChangeSelection const):
1540         (core): Fix up code style nits; compare resultType on the right-hand side instead of the
1541         left as this is more readable and unncessary now that modern compilers like Clang have
1542         diagnostics to catch accidental assignments when equality was intended.
1543         (WebEditorClient::didCheckSucceed):
1544         * WebView/WebView.mm:
1545         (coreTextCheckingType):
1546         (textCheckingResultFromNSTextCheckingResult):
1547
1548 2018-08-21  Daniel Bates  <dabates@apple.com>
1549
1550         [iOS][WK1] Support toggling continuous spell checking from tests
1551         https://bugs.webkit.org/show_bug.cgi?id=188763
1552
1553         Reviewed by Simon Fraser.
1554
1555         Move some more code out from under a !PLATFORM(IOS)-guard so as to support toggling continuous
1556         spell checking from tests in iOS WebKit Legacy.
1557
1558         * WebCoreSupport/WebEditorClient.h:
1559         (WebEditorClient::toggleContinuousSpellChecking): Deleted.
1560         * WebCoreSupport/WebEditorClient.mm:
1561         * WebView/WebView.h:
1562         * WebView/WebView.mm:
1563         (-[WebView toggleContinuousSpellChecking:]):
1564         (-[WebView toggleSmartInsertDelete:]):
1565
1566 2018-08-17  Alex Christensen  <achristensen@webkit.org>
1567
1568         Add some plumbing for safe browsing
1569         https://bugs.webkit.org/show_bug.cgi?id=188709
1570
1571         Reviewed by Tim Horton.
1572
1573         * WebCoreSupport/WebFrameLoaderClient.h:
1574         * WebCoreSupport/WebFrameLoaderClient.mm:
1575         (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1576
1577 2018-08-16  Ryosuke Niwa  <rniwa@webkit.org>
1578
1579         Replace canBubble and cancelable booleans in Event by enum classes
1580         https://bugs.webkit.org/show_bug.cgi?id=188692
1581
1582         Reviewed by Alex Christensen.
1583
1584         * WebView/WebPDFView.mm:
1585         (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
1586         * WebView/WebView.mm:
1587         (-[WebView _dispatchUnloadEvent]):
1588
1589 2018-08-16  Jer Noble  <jer.noble@apple.com>
1590
1591         Add Experimental Feature support for SourceBuffer.changeType()
1592         https://bugs.webkit.org/show_bug.cgi?id=188626
1593         <rdar://problem/43356021>
1594
1595         Reviewed by Eric Carlson.
1596
1597         Add a new WebPreference property mapping to the WebCore SourceBufferChangeTypeEnabled setting.
1598
1599         * WebView/WebPreferenceKeysPrivate.h:
1600         * WebView/WebPreferences.mm:
1601         (+[WebPreferences initialize]):
1602         (-[WebPreferences sourceBufferChangeTypeEnabled]):
1603         (-[WebPreferences setSourceBufferChangeTypeEnabled:]):
1604         * WebView/WebPreferencesPrivate.h:
1605         * WebView/WebView.mm:
1606         (-[WebView _preferencesChanged:]):
1607
1608 2018-08-16  Aditya Keerthi  <akeerthi@apple.com>
1609
1610         Support drag-and-drop for input[type=color]
1611         https://bugs.webkit.org/show_bug.cgi?id=188464
1612
1613         Reviewed by Wenson Hsieh.
1614
1615         * WebCoreSupport/WebPlatformStrategies.h:
1616         * WebCoreSupport/WebPlatformStrategies.mm:
1617         (WebPlatformStrategies::setColor):
1618
1619 2018-08-15  Tim Horton  <timothy_horton@apple.com>
1620
1621         Crashes in Quip under _dictionaryPopupInfoForRange, in setObject:forKey:
1622         https://bugs.webkit.org/show_bug.cgi?id=188569
1623         <rdar://problem/34201095>
1624
1625         Reviewed by Megan Gardner.
1626
1627         * WebView/WebImmediateActionController.mm:
1628         (+[WebImmediateActionController _dictionaryPopupInfoForRange:inFrame:withLookupOptions:indicatorOptions:transition:]):
1629         Speculative fix; the crashes indicate font is null, but we just checked it,
1630         so it must be getting made null by convertFont:toSize:. Check again!
1631
1632 2018-08-13  Alex Christensen  <achristensen@webkit.org>
1633
1634         Use a 1-byte enum class for TextDirection
1635         https://bugs.webkit.org/show_bug.cgi?id=188350
1636
1637         Reviewed by Simon Fraser.
1638
1639         * WebCoreSupport/PopupMenuMac.mm:
1640         (PopupMenuMac::populate):
1641         (PopupMenuMac::show):
1642         * WebCoreSupport/WebFrameLoaderClient.mm:
1643         (WebFrameLoaderClient::transitionToCommittedForNewPage):
1644         * WebView/WebFrame.mm:
1645         (-[WebFrame _dispatchDidReceiveTitle:]):
1646
1647 2018-08-09  Ali Juma  <ajuma@chromium.org>
1648
1649         Import WPTs for IntersectionObserver
1650         https://bugs.webkit.org/show_bug.cgi?id=188416
1651
1652         Reviewed by Simon Fraser.
1653
1654         * WebView/WebPreferencesPrivate.h:
1655
1656 2018-08-08  Jonathan Bedard  <jbedard@apple.com>
1657
1658         Follow-up build fix for r234685
1659         https://bugs.webkit.org/show_bug.cgi?id=188245
1660
1661         Unreviewed build fix.
1662
1663         * WebCoreSupport/WebSecurityOriginPrivate.h:
1664
1665 2018-08-05  Darin Adler  <darin@apple.com>
1666
1667         [Cocoa] More tweaks and refactoring to prepare for ARC
1668         https://bugs.webkit.org/show_bug.cgi?id=188245
1669
1670         Reviewed by Dan Bernstein.
1671
1672         * Carbon/CarbonUtils.m: Updated include for rename: FoundationSPI.h -> objcSPI.h.
1673
1674         * Carbon/CarbonWindowFrame.m:
1675         (-[CarbonWindowFrame dealloc]): Deleted. It was empty.
1676
1677         * DOM/DOM.mm:
1678         (-[DOMElement _imageTIFFRepresentation]): Use a bridging cast.
1679         (-[DOMNodeFilter finalize]): Deleted. WebKit no longer supports Objective-C
1680         garbage collection so this method isn't useful.
1681
1682         * DOM/DOMXPath.mm:
1683         (-[DOMNativeXPathNSResolver finalize]): Deleted. WebKit no longer supports
1684         Objective-C garbage collection so this method isn't useful.
1685
1686         * History/WebHistory.mm:
1687         (-[WebHistoryPrivate data]): Allocate an NSData instead of casting from a CFData.
1688
1689         * Misc/WebElementDictionary.mm:
1690         (addLookupKey): Use a bridging cast.
1691         (cacheValueForKey): Ditto.
1692         (-[WebElementDictionary _fillCache]): Ditto.
1693         (-[WebElementDictionary objectForKey:]): Ditto.
1694
1695         * Misc/WebKitNSStringExtras.mm:
1696         (-[NSString _web_drawAtPoint:font:textColor:]): Use a bridging cast.
1697         (-[NSString _web_widthWithFont:]): Ditto.
1698         (-[NSString _webkit_stringByTrimmingWhitespace]): Ditto.
1699
1700         * Misc/WebLocalizableStrings.mm:
1701         (WebLocalizedString): Use a bridging cast.
1702
1703         * Misc/WebNSDataExtras.mm:
1704         (-[NSString _web_capitalizeRFC822HeaderFieldName]): Use a bridging cast
1705         and use CFBridgingRelease instead of calling autorelease directly.
1706         (-[NSData _webkit_parseRFC822HeaderFields]): Use NSString methods instead
1707         of a mix of CFString and NSString. Also simplified logic a bit, and cut down
1708         on the amount of explicit release and autorelease.
1709
1710         * Misc/WebNSDictionaryExtras.h: Deleted unused methods.
1711         * Misc/WebNSDictionaryExtras.m:
1712         (-[NSDictionary _webkit_intForKey:]): Deleted.
1713         (-[NSMutableDictionary _webkit_setInt:forKey:]): Deleted.
1714         (-[NSMutableDictionary _webkit_setFloat:forKey:]): Deleted.
1715         (-[NSMutableDictionary _webkit_setBool:forKey:]): Deleted.
1716         (-[NSMutableDictionary _webkit_setLongLong:forKey:]): Deleted.
1717         (-[NSMutableDictionary _webkit_setUnsignedLongLong:forKey:]): Deleted.
1718         (-[NSMutableDictionary _webkit_setUnsignedInt:forKey:]): Deleted.
1719
1720         * Misc/WebStringTruncator.mm:
1721         (fontFromNSFont): Use a bridging cast.
1722
1723         * Plugins/Hosted/NetscapePluginHostManager.mm:
1724         (WebKit::preferredBundleLocalizationName): Use a bridging cast and CFBridgingRelease.
1725
1726         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1727         (WebKit::NetscapePluginInstanceProxy::cleanup): Use a bridging cast.
1728         (WebKit::NetscapePluginInstanceProxy::status): Ditto.
1729         (WebKit::NetscapePluginInstanceProxy::loadURL): Ditto.
1730         (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray): Ditto.
1731         * Plugins/Hosted/ProxyInstance.mm:
1732         (WebKit::ProxyInstance::getPropertyNames): Ditto.
1733         * Plugins/WebBasePluginPackage.mm:
1734         (-[WebBasePluginPackage _objectForInfoDictionaryKey:]): Ditto.
1735         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
1736         (WebNetscapePluginEventHandlerCocoa::platformWindow): Ditto.
1737         * Plugins/WebNetscapePluginPackage.mm:
1738         (-[WebNetscapePluginPackage _initWithPath:]): Ditto.
1739
1740         * Plugins/WebNetscapePluginView.mm:
1741         (-[WebNetscapePluginView _postURL:target:len:buf:file:notifyData:sendNotification:allowHeaders:]):
1742         Use bridging casts and use RetainPtr insteead of an explicit CFRelease.
1743         (-[WebNetscapePluginView status:]): Use a bridging cast.
1744         (-[WebNetscapePluginView popUpContextMenu:]): Ditto.
1745
1746         * Plugins/WebPluginController.mm:
1747         (-[WebPluginController _cancelOutstandingChecks]): Use a bridging cast.
1748
1749         * Plugins/WebPluginDatabase.mm:
1750         (checkCandidate): Use explicit __strong for out argument types.
1751
1752         * Plugins/npapi.mm:
1753         (pluginViewForInstance): Use a bridging cast.
1754
1755         * Storage/WebDatabaseManager.mm:
1756         (-[WebDatabaseManager detailsForDatabase:withOrigin:]): Use modern boxing instead of
1757         explicit NSNumber and NSDictionary calls.
1758
1759         * WebCoreSupport/WebContextMenuClient.mm:
1760         (WebContextMenuClient::speak): Remove an unnecessary copy/autorelease pair.
1761
1762         * WebCoreSupport/WebEditorClient.mm:
1763         (WebEditorClient::handleKeyboardEvent): Added a missing typecast.
1764         (WebEditorClient::handleInputMethodKeydown): Ditto.
1765
1766         * WebCoreSupport/WebFrameNetworkingContext.mm:
1767         (WebFrameNetworkingContext::sourceApplicationAuditData const): Use a bridging cast.
1768
1769         * WebCoreSupport/WebSecurityOriginPrivate.h: Forward declare WebSecurityOriginPrivate
1770         as a struct rather than an Objective-C class, since that's how it's defined.
1771
1772         * WebInspector/WebNodeHighlighter.mm: Added missing includes.
1773
1774         * WebView/WebFullScreenController.mm:
1775         (-[WebFullScreenController enterFullScreen:]): Use a bridging cast.
1776         * WebView/WebHTMLView.mm:
1777         (-[WebHTMLView _writeSelectionWithPasteboardTypes:toPasteboard:cachedAttributedString:]):
1778         Ditto.
1779         (-[WebHTMLView pasteboard:provideDataForType:]): Ditto.
1780
1781         * WebView/WebImmediateActionController.mm:
1782         (-[WebImmediateActionController performHitTestAtPoint:]): Removed redundant code to
1783         go down to the document and then back to the frame.
1784         (-[WebImmediateActionController immediateActionRecognizerDidUpdateAnimation:]): Ditto.
1785         (-[WebImmediateActionController immediateActionRecognizerDidCancelAnimation:]): Ditto.
1786         (-[WebImmediateActionController immediateActionRecognizerDidCompleteAnimation:]): Ditto.
1787
1788         * WebView/WebJSPDFDoc.mm:
1789         (jsPDFDocInitialize): Removed some unneeded type casting.
1790         (jsPDFDocFinalize): Ditto.
1791         (jsPDFDocPrint): Use a bridging cast.
1792
1793         * WebView/WebPDFView.mm:
1794         (_applicationInfoForMIMEType): Use bridging casts.
1795
1796         * WebView/WebPreferences.mm:
1797         (-[WebPreferences _setIntegerValue:forKey:]): Use boxing and setObject directly
1798         instead of methods from WebNSDictionaryExtras.
1799         (-[WebPreferences _setUnsignedIntValue:forKey:]): Ditto.
1800         (-[WebPreferences _setFloatValue:forKey:]): Ditto.
1801         (-[WebPreferences _setBoolValue:forKey:]): Ditto.
1802         (-[WebPreferences _setLongLongValue:forKey:]): Ditto.
1803         (-[WebPreferences _setUnsignedLongLongValue:forKey:]): Ditto.
1804
1805         * WebView/WebView.mm:
1806         (-[WebView _removeFromAllWebViewsSet]): Use bridging cast.
1807         (-[WebView _addToAllWebViewsSet]): Ditto.
1808         (+[WebView closeAllWebViews]): Use a modern for loop instead of NSEnumerator.
1809         (-[WebView _windowVisibilityChanged:]): Moved this into the internal category
1810         so it can be called from WebViewData methods.
1811
1812         * WebView/WebViewData.mm: Added an import so we can call an internal WebView
1813         method, _windowVisibilityChanged:.
1814
1815         * WebView/WebViewInternal.h: Declared _windowVisibilityChanged: so it can be
1816         called from WebViewData methods.
1817
1818 2018-08-06  Alex Christensen  <achristensen@webkit.org>
1819
1820         Use enum classes and OptionSets for PaintPhase and PaintBehavior
1821         https://bugs.webkit.org/show_bug.cgi?id=188323
1822
1823         Reviewed by Simon Fraser.
1824
1825         * WebCoreSupport/WebContextMenuClient.mm:
1826         (WebContextMenuClient::imageForCurrentSharingServicePickerItem):
1827         * WebView/WebFrame.mm:
1828         (-[WebFrame _paintBehaviorForDestinationContext:]):
1829         (-[WebFrame _drawRect:contentsOnly:]):
1830         * WebView/WebHTMLView.mm:
1831         (imageFromRect):
1832         (selectionImage):
1833
1834 2018-08-05  Yusuke Suzuki  <utatane.tea@gmail.com>
1835
1836         Add support for microtasks in workers
1837         https://bugs.webkit.org/show_bug.cgi?id=188246
1838
1839         Reviewed by Darin Adler.
1840
1841         Rename JSMainThreadExecState.h to JSExecState.h.
1842
1843         * DOM/DOMAttr.mm:
1844         * DOM/DOMBlob.mm:
1845         * DOM/DOMCDATASection.mm:
1846         * DOM/DOMCSSCharsetRule.mm:
1847         * DOM/DOMCSSFontFaceRule.mm:
1848         * DOM/DOMCSSImportRule.mm:
1849         * DOM/DOMCSSMediaRule.mm:
1850         * DOM/DOMCSSPageRule.mm:
1851         * DOM/DOMCSSPrimitiveValue.mm:
1852         * DOM/DOMCSSRule.mm:
1853         * DOM/DOMCSSRuleList.mm:
1854         * DOM/DOMCSSStyleDeclaration.mm:
1855         * DOM/DOMCSSStyleRule.mm:
1856         * DOM/DOMCSSStyleSheet.mm:
1857         * DOM/DOMCSSUnknownRule.mm:
1858         * DOM/DOMCSSValue.mm:
1859         * DOM/DOMCSSValueList.mm:
1860         * DOM/DOMCharacterData.mm:
1861         * DOM/DOMComment.mm:
1862         * DOM/DOMCounter.mm:
1863         * DOM/DOMDocument.mm:
1864         * DOM/DOMDocumentFragment.mm:
1865         * DOM/DOMDocumentType.mm:
1866         * DOM/DOMElement.mm:
1867         * DOM/DOMEvent.mm:
1868         * DOM/DOMFile.mm:
1869         * DOM/DOMFileList.mm:
1870         * DOM/DOMHTML.mm:
1871         * DOM/DOMHTMLAnchorElement.mm:
1872         * DOM/DOMHTMLAppletElement.mm:
1873         * DOM/DOMHTMLAreaElement.mm:
1874         * DOM/DOMHTMLBRElement.mm:
1875         * DOM/DOMHTMLBaseElement.mm:
1876         * DOM/DOMHTMLBaseFontElement.mm:
1877         * DOM/DOMHTMLBodyElement.mm:
1878         * DOM/DOMHTMLButtonElement.mm:
1879         * DOM/DOMHTMLCanvasElement.mm:
1880         * DOM/DOMHTMLCollection.mm:
1881         * DOM/DOMHTMLDListElement.mm:
1882         * DOM/DOMHTMLDirectoryElement.mm:
1883         * DOM/DOMHTMLDivElement.mm:
1884         * DOM/DOMHTMLDocument.mm:
1885         * DOM/DOMHTMLElement.mm:
1886         * DOM/DOMHTMLEmbedElement.mm:
1887         * DOM/DOMHTMLFieldSetElement.mm:
1888         * DOM/DOMHTMLFontElement.mm:
1889         * DOM/DOMHTMLFormElement.mm:
1890         * DOM/DOMHTMLFrameElement.mm:
1891         * DOM/DOMHTMLFrameSetElement.mm:
1892         * DOM/DOMHTMLHRElement.mm:
1893         * DOM/DOMHTMLHeadElement.mm:
1894         * DOM/DOMHTMLHeadingElement.mm:
1895         * DOM/DOMHTMLHtmlElement.mm:
1896         * DOM/DOMHTMLIFrameElement.mm:
1897         * DOM/DOMHTMLImageElement.mm:
1898         * DOM/DOMHTMLInputElement.mm:
1899         * DOM/DOMHTMLLIElement.mm:
1900         * DOM/DOMHTMLLabelElement.mm:
1901         * DOM/DOMHTMLLegendElement.mm:
1902         * DOM/DOMHTMLLinkElement.mm:
1903         * DOM/DOMHTMLMapElement.mm:
1904         * DOM/DOMHTMLMarqueeElement.mm:
1905         * DOM/DOMHTMLMediaElement.mm:
1906         * DOM/DOMHTMLMenuElement.mm:
1907         * DOM/DOMHTMLMetaElement.mm:
1908         * DOM/DOMHTMLModElement.mm:
1909         * DOM/DOMHTMLOListElement.mm:
1910         * DOM/DOMHTMLObjectElement.mm:
1911         * DOM/DOMHTMLOptGroupElement.mm:
1912         * DOM/DOMHTMLOptionElement.mm:
1913         * DOM/DOMHTMLOptionsCollection.mm:
1914         * DOM/DOMHTMLParagraphElement.mm:
1915         * DOM/DOMHTMLParamElement.mm:
1916         * DOM/DOMHTMLPreElement.mm:
1917         * DOM/DOMHTMLQuoteElement.mm:
1918         * DOM/DOMHTMLScriptElement.mm:
1919         * DOM/DOMHTMLSelectElement.mm:
1920         * DOM/DOMHTMLStyleElement.mm:
1921         * DOM/DOMHTMLTableCaptionElement.mm:
1922         * DOM/DOMHTMLTableCellElement.mm:
1923         * DOM/DOMHTMLTableColElement.mm:
1924         * DOM/DOMHTMLTableElement.mm:
1925         * DOM/DOMHTMLTableRowElement.mm:
1926         * DOM/DOMHTMLTableSectionElement.mm:
1927         * DOM/DOMHTMLTextAreaElement.mm:
1928         * DOM/DOMHTMLTitleElement.mm:
1929         * DOM/DOMHTMLUListElement.mm:
1930         * DOM/DOMHTMLVideoElement.mm:
1931         * DOM/DOMImplementation.mm:
1932         * DOM/DOMKeyboardEvent.mm:
1933         * DOM/DOMMediaError.mm:
1934         * DOM/DOMMediaList.mm:
1935         * DOM/DOMMouseEvent.mm:
1936         * DOM/DOMMutationEvent.mm:
1937         * DOM/DOMNamedNodeMap.mm:
1938         * DOM/DOMNode.mm:
1939         * DOM/DOMNodeIterator.mm:
1940         * DOM/DOMNodeList.mm:
1941         * DOM/DOMOverflowEvent.mm:
1942         * DOM/DOMProcessingInstruction.mm:
1943         * DOM/DOMProgressEvent.mm:
1944         * DOM/DOMRGBColor.mm:
1945         * DOM/DOMRange.mm:
1946         * DOM/DOMRect.mm:
1947         * DOM/DOMStyleSheet.mm:
1948         * DOM/DOMStyleSheetList.mm:
1949         * DOM/DOMText.mm:
1950         * DOM/DOMTextEvent.mm:
1951         * DOM/DOMTimeRanges.mm:
1952         * DOM/DOMTokenList.mm:
1953         * DOM/DOMTreeWalker.mm:
1954         * DOM/DOMUIEvent.mm:
1955         * DOM/DOMWheelEvent.mm:
1956         * DOM/DOMXPathExpression.mm:
1957         * DOM/DOMXPathResult.mm:
1958         * DOM/ObjCEventListener.mm:
1959
1960 2018-08-03  Alex Christensen  <achristensen@webkit.org>
1961
1962         Fix spelling of "overridden"
1963         https://bugs.webkit.org/show_bug.cgi?id=188315
1964
1965         Reviewed by Darin Adler.
1966
1967         * Misc/WebKitVersionChecks.mm:
1968         (setWebKitLinkTimeVersion):
1969         (WebKitLinkTimeVersion):
1970         * Plugins/WebBaseNetscapePluginView.mm:
1971         (-[WebBaseNetscapePluginView handleMouseMoved:]):
1972         * WebCoreSupport/PopupMenuMac.mm:
1973         (PopupMenuMac::populate):
1974
1975 2018-08-01  Nan Wang  <n_wang@apple.com>
1976
1977         AX: AOM: Add ARIA IDL Attribute Reflection
1978         https://bugs.webkit.org/show_bug.cgi?id=184676
1979         <rdar://problem/39476882>
1980
1981         Reviewed by Chris Fleizach.
1982
1983         * WebView/WebPreferenceKeysPrivate.h:
1984         * WebView/WebPreferences.mm:
1985         (+[WebPreferences initialize]):
1986         (-[WebPreferences ariaReflectionEnabled]):
1987         (-[WebPreferences setAriaReflectionEnabled:]):
1988         * WebView/WebPreferencesPrivate.h:
1989         * WebView/WebView.mm:
1990         (-[WebView _preferencesChanged:]):
1991
1992 2018-07-30  Simon Fraser  <simon.fraser@apple.com>
1993
1994         Shrink GraphicsLayerCA
1995         https://bugs.webkit.org/show_bug.cgi?id=188141
1996
1997         Reviewed by Zalan Bujtas.
1998
1999         Shrink GraphicsLayerCA from 1040 to 880 bytes by:
2000         * moving all the clone-related stuff into the lazily-allocated m_layerClones
2001         * moving all the animation-related stuff into the lazily-allocated m_animations
2002         * making enums be 8-bit
2003         * re-ordering data members
2004
2005         * WebView/WebView.mm:
2006         (-[WebView _setMediaLayer:forPluginView:]):
2007
2008 2018-07-30  Rob Buis  <rbuis@igalia.com>
2009
2010         Merge PlatformCookieJar functions into NetworkStorageSession
2011         https://bugs.webkit.org/show_bug.cgi?id=188137
2012
2013         Adapt callsites to use NetworkStorageSession instead of CookieJar functions.
2014
2015         Reviewed by Alex Christensen.
2016
2017         * WebCoreSupport/WebPlatformStrategies.mm:
2018         (WebPlatformStrategies::cookiesForDOM):
2019         (WebPlatformStrategies::setCookiesFromDOM):
2020         (WebPlatformStrategies::cookiesEnabled):
2021         (WebPlatformStrategies::cookieRequestHeaderFieldValue):
2022         (WebPlatformStrategies::getRawCookies):
2023         (WebPlatformStrategies::deleteCookie):
2024         * WebView/WebPreferences.mm:
2025         (+[WebPreferences _clearNetworkLoaderSession]):
2026
2027 2018-07-28  Darin Adler  <darin@apple.com>
2028
2029         [Cocoa] Update more WebCore Objective-C code to be ARC compatible
2030         https://bugs.webkit.org/show_bug.cgi?id=188140
2031
2032         Reviewed by Sam Weinig.
2033
2034         * WebView/WebImmediateActionController.mm:
2035         (-[WebImmediateActionController _animationControllerForText]): Updated to use the
2036         new DictionaryLookup function that returns a tuple instead of using an out argument.
2037
2038 2018-07-26  Andy VanWagoner  <andy@vanwagoner.family>
2039
2040         [INTL] Remove INTL sub-feature compile flags
2041         https://bugs.webkit.org/show_bug.cgi?id=188081
2042
2043         Reviewed by Michael Catanzaro.
2044
2045         * Configurations/FeatureDefines.xcconfig:
2046
2047 2018-07-26  Commit Queue  <commit-queue@webkit.org>
2048
2049         Unreviewed, rolling out r234181 and r234189.
2050         https://bugs.webkit.org/show_bug.cgi?id=188075
2051
2052         These are not needed right now (Requested by thorton on
2053         #webkit).
2054
2055         Reverted changesets:
2056
2057         "Enable Web Content Filtering on watchOS"
2058         https://bugs.webkit.org/show_bug.cgi?id=187979
2059         https://trac.webkit.org/changeset/234181
2060
2061         "HAVE(PARENTAL_CONTROLS) should be true on watchOS"
2062         https://bugs.webkit.org/show_bug.cgi?id=187985
2063         https://trac.webkit.org/changeset/234189
2064
2065 2018-07-26  Timothy Hatcher  <timothy@apple.com>
2066
2067         Use the Page's appearance when converting pasteboard attributed strings.
2068         https://bugs.webkit.org/show_bug.cgi?id=188067
2069         rdar://problem/42632246
2070
2071         Reviewed by Wenson Hsieh.
2072
2073         * WebCoreSupport/WebEditorClient.mm:
2074         (_WebCreateFragment): Create a LocalDefaultSystemAppearance based on the Page.
2075
2076 2018-07-25  Chris Dumez  <cdumez@apple.com>
2077
2078         navigator.userAgent may return outdated value after webView.customUserAgent is set
2079         https://bugs.webkit.org/show_bug.cgi?id=188009
2080         <rdar://problem/42566456>
2081
2082         Reviewed by Alex Christensen.
2083
2084         Let the page know when the user agent changes.
2085
2086         * WebView/WebView.mm:
2087         (-[WebView _preferencesChanged:]):
2088         (-[WebView setApplicationNameForUserAgent:]):
2089         (-[WebView _invalidateUserAgentCache]):
2090         (-[WebView setCustomUserAgent:]):
2091         * WebView/WebViewInternal.h:
2092
2093 2018-07-24  Tim Horton  <timothy_horton@apple.com>
2094
2095         Enable Web Content Filtering on watchOS
2096         https://bugs.webkit.org/show_bug.cgi?id=187979
2097         <rdar://problem/42559346>
2098
2099         Reviewed by Wenson Hsieh.
2100
2101         * Configurations/FeatureDefines.xcconfig:
2102
2103 2018-07-20  Ryosuke Niwa  <rniwa@apple.com>
2104
2105         Picking a color from the color panel for typing attributes needs to inverse transform through color-filter
2106         https://bugs.webkit.org/show_bug.cgi?id=187846
2107
2108         Reviewed by Simon Fraser.
2109
2110         Invert the filtered font and background colors when using font panels, font pasteboard, and other Objective-C APIs.
2111
2112         * WebView/WebHTMLView.mm:
2113         (-[WebHTMLView _applyStyleToSelection:withUndoAction:]): Share code with _applyEditingStyleToSelection.
2114         (-[WebHTMLView _applyEditingStyleToSelection:withUndoAction:]):
2115
2116 2018-07-11  Dean Jackson  <dino@apple.com>
2117
2118         Allow removal of white backgrounds
2119         https://bugs.webkit.org/show_bug.cgi?id=187574
2120         <rdar://problem/41146792>
2121
2122         Reviewed by Simon Fraser.
2123
2124         Add a new WebPreference for punching out white backgrounds.
2125
2126         * WebView/WebPreferenceKeysPrivate.h:
2127         * WebView/WebPreferences.mm:
2128         (+[WebPreferences initialize]):
2129         (-[WebPreferences punchOutWhiteBackgroundsInDarkMode]):
2130         (-[WebPreferences setPunchOutWhiteBackgroundsInDarkMode:]):
2131         * WebView/WebPreferencesPrivate.h:
2132         * WebView/WebView.mm:
2133         (-[WebView _preferencesChanged:]):
2134
2135 2018-07-14  Kocsen Chung  <kocsen_chung@apple.com>
2136
2137         Ensure WebKit stack is ad-hoc signed
2138         https://bugs.webkit.org/show_bug.cgi?id=187667
2139
2140         Reviewed by Alexey Proskuryakov.
2141
2142         * Configurations/Base.xcconfig:
2143
2144 2018-07-11  Aditya Keerthi  <akeerthi@apple.com>
2145
2146         REGRESSION (231276): Attempting to copy an image fails
2147         https://bugs.webkit.org/show_bug.cgi?id=187212
2148         <rdar://problem/41540074>
2149
2150         Reviewed by Ryosuke Niwa.
2151
2152         Renamed methods to make it clear that one URL and one title are being passed in.
2153
2154         * WebCoreSupport/WebPlatformStrategies.h:
2155         * WebCoreSupport/WebPlatformStrategies.mm:
2156         (WebPlatformStrategies::setURL):
2157
2158 2018-07-10  Ryosuke Niwa  <rniwa@webkit.org>
2159
2160         Disable cross-origin-window-policy by default
2161         https://bugs.webkit.org/show_bug.cgi?id=187509
2162
2163         Reviewed by Chris Dumez.
2164
2165         * WebView/WebPreferences.mm:
2166         (+[WebPreferences initialize]):
2167
2168 2018-07-09  Timothy Hatcher  <timothy@apple.com>
2169
2170         Semantic colors don't update when accessibility Increase Contrast mode is enabled.
2171         https://bugs.webkit.org/show_bug.cgi?id=187425
2172         rdar://problem/39948240
2173
2174         Reviewed by Tim Horton.
2175
2176         * WebView/WebView.mm:
2177         (-[WebView _commonInitializationWithFrameName:groupName:]): Removed call to
2178         _updateDefaultAppearance, which called setUseDarkAppearance. There is already
2179         a call in this method to setUseDarkAppearance.
2180         (-[WebView _setUseSystemAppearance:]): Just call the page, not setUseDarkAppearance.
2181         (-[WebView viewDidChangeEffectiveAppearance]): Added. This is the proper NSView method to use.
2182         (-[WebView _updateDefaultAppearance]): Deleted.
2183         (-[WebView effectiveAppearanceDidChange]): Deleted. This method is a deprecated name.
2184
2185 2018-07-09  Simon Fraser  <simon.fraser@apple.com>
2186
2187         Shrink various loading-related enums to shrink CachedResource
2188         https://bugs.webkit.org/show_bug.cgi?id=187443
2189
2190         Reviewed by Chris Dumez.
2191
2192         * WebCoreSupport/WebFrameLoaderClient.mm:
2193         (WebFrameLoaderClient::convertMainResourceLoadToDownload):
2194         (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
2195         (WebFrameLoaderClient::assignIdentifierToInitialRequest):
2196         (WebFrameLoaderClient::dispatchWillSendRequest):
2197         (WebFrameLoaderClient::dispatchDecidePolicyForResponse):
2198         (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
2199         (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2200         (WebFrameLoaderClient::updateGlobalHistory):
2201         (WebFrameLoaderClient::canHandleRequest const):
2202         * WebView/WebDataSource.mm:
2203         (-[WebDataSource initialRequest]):
2204         (-[WebDataSource request]):
2205
2206 2018-07-09  Commit Queue  <commit-queue@webkit.org>
2207
2208         Unreviewed, rolling out r233612.
2209         https://bugs.webkit.org/show_bug.cgi?id=187475
2210
2211         Revision caused the api test LinkColorWithSystemAppearance to
2212         fail on all systems. (Requested by Truitt on #webkit).
2213
2214         Reverted changeset:
2215
2216         "Semantic colors don't update when accessibility Increase
2217         Contrast mode is enabled."
2218         https://bugs.webkit.org/show_bug.cgi?id=187425
2219         https://trac.webkit.org/changeset/233612
2220
2221 2018-07-06  Timothy Hatcher  <timothy@apple.com>
2222
2223         Semantic colors don't update when accessibility Increase Contrast mode is enabled.
2224         https://bugs.webkit.org/show_bug.cgi?id=187425
2225         rdar://problem/39948240
2226
2227         Reviewed by Tim Horton.
2228
2229         * WebView/WebView.mm:
2230         (-[WebView _commonInitializationWithFrameName:groupName:]): Removed call to
2231         _updateDefaultAppearance, which called setUseDarkAppearance. There is already
2232         a call in this method to setUseDarkAppearance.
2233         (-[WebView _setUseSystemAppearance:]): Just call the page, not setUseDarkAppearance.
2234         (-[WebView viewDidChangeEffectiveAppearance]): Added. This is the proper NSView method to use.
2235         (-[WebView _updateDefaultAppearance]): Deleted.
2236         (-[WebView effectiveAppearanceDidChange]): Deleted. This method is a deprecated name.
2237
2238 2018-07-05  Timothy Hatcher  <timothy@apple.com>
2239
2240         Rename and flip the meaning of defaultAppearance to be useDarkAppearance.
2241         https://bugs.webkit.org/show_bug.cgi?id=187369
2242         rdar://problem/41870420
2243
2244         Reviewed by Tim Horton.
2245
2246         * WebView/WebMediaPlaybackTargetPicker.mm:
2247         (WebMediaPlaybackTargetPicker::showPlaybackTargetPicker):
2248         * WebView/WebView.mm:
2249         (-[WebView _commonInitializationWithFrameName:groupName:]):
2250         (-[WebView _effectiveAppearanceIsDark]):
2251         (-[WebView _updateDefaultAppearance]):
2252         (-[WebView _defaultAppearance]): Deleted.
2253
2254 2018-07-04  Ryosuke Niwa  <rniwa@webkit.org>
2255
2256         Youtube video pages crash after a couple of minutes
2257         https://bugs.webkit.org/show_bug.cgi?id=187316
2258
2259         Reviewed by Antti Koivisto.
2260
2261         * WebView/WebView.mm:
2262         (-[WebView _preferencesChanged:]):
2263
2264 2018-07-04  Tim Horton  <timothy_horton@apple.com>
2265
2266         Introduce PLATFORM(IOSMAC)
2267         https://bugs.webkit.org/show_bug.cgi?id=187315
2268
2269         Reviewed by Dan Bernstein.
2270
2271         * Configurations/Base.xcconfig:
2272         * Configurations/FeatureDefines.xcconfig:
2273
2274 2018-06-28  Wenson Hsieh  <wenson_hsieh@apple.com>
2275
2276         [iOS] DataTransfer.getData always returns the empty string when dropping text
2277         https://bugs.webkit.org/show_bug.cgi?id=187130
2278         <rdar://problem/41014117>
2279
2280         Reviewed by Ryosuke Niwa.
2281
2282         Add plumbing to grab information for each item in the pasteboard. See WebCore ChangeLog for more detail.
2283
2284         * WebCoreSupport/WebPlatformStrategies.h:
2285         * WebCoreSupport/WebPlatformStrategies.mm:
2286         (WebPlatformStrategies::allPasteboardItemInfo):
2287
2288 2018-06-26  Eric Carlson  <eric.carlson@apple.com>
2289
2290         [Mac] AirPlay picker uses incorrect theme in Dark mode
2291         https://bugs.webkit.org/show_bug.cgi?id=187054
2292         <rdar://problem/41291093>
2293
2294         Reviewed by Timothy Hatcher.
2295
2296         * WebView/WebMediaPlaybackTargetPicker.mm:
2297         (WebMediaPlaybackTargetPicker::showPlaybackTargetPicker): Pass page->defaultAppearance().
2298
2299 2018-06-23  Yusuke Suzuki  <utatane.tea@gmail.com>
2300
2301         [WTF] Add user-defined literal for ASCIILiteral
2302         https://bugs.webkit.org/show_bug.cgi?id=186839
2303
2304         Reviewed by Darin Adler.
2305
2306         * DOM/ExceptionHandlers.mm:
2307         (raiseDOMErrorException):
2308         * Plugins/Hosted/ProxyInstance.mm:
2309         (WebKit::ProxyInstance::invokeMethod):
2310         * Storage/WebDatabaseProvider.mm:
2311         (WebDatabaseProvider::indexedDatabaseDirectoryPath):
2312
2313 2018-06-22  Timothy Hatcher  <timothy@apple.com>
2314
2315         Recalc styles every time defaultAppearance changes.
2316         https://bugs.webkit.org/show_bug.cgi?id=186866
2317         rdar://problem/41309805
2318
2319         Reviewed by Tim Horton.
2320
2321         * WebView/WebView.mm:
2322         (-[WebView _updateDefaultAppearance]):
2323         (-[WebView _setUseSystemAppearance:]):
2324         (-[WebView _useSystemAppearance]):
2325
2326 2018-06-20  Darin Adler  <darin@apple.com>
2327
2328         [Cocoa] Use the isDirectory: variants of NSURL methods more to eliminate unnecessary file system activity
2329         https://bugs.webkit.org/show_bug.cgi?id=186875
2330
2331         Reviewed by Anders Carlsson.
2332
2333         * WebView/WebHTMLView.mm:
2334         (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Use isDirectory:NO for the URL of the location
2335         to write te file to.
2336         * WebView/WebPreferences.mm:
2337         (-[WebPreferences userStyleSheetLocation]): Use isDirectory:NO to create a URL for the user style sheet.
2338         * WebView/WebView.mm:
2339         (-[WebView setMainFrameURL:]): Use isDirectory:NO to create a URL for a local webpage to load.
2340
2341 2018-06-12  Darin Adler  <darin@apple.com>
2342
2343         [Cocoa] Make some RetainPtr refinements to get more ready for ARC
2344         https://bugs.webkit.org/show_bug.cgi?id=186526
2345
2346         Reviewed by Anders Carlsson.
2347
2348         * Plugins/Hosted/NetscapePluginHostManager.mm:
2349         (WebKit::preferredBundleLocalizationName): Use bridgingAutorelease.
2350
2351         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
2352         (-[WebHostedNetscapePluginView createPluginLayer]): Use move
2353         assignment rather than adoptNS/leakRef.
2354         * Plugins/WebNetscapePluginView.mm:
2355         (-[WebNetscapePluginView createPlugin]): Ditto.
2356
2357         * WebCoreSupport/WebContextMenuClient.mm:
2358         (WebContextMenuClient::contextMenuForEvent): Get rid of unnecessary use of
2359         RetainPtr::autorelease; no need to autorelease just to pass something as a function
2360         argument, so use RetainPtr::get instead.
2361
2362         * WebView/WebHTMLView.mm:
2363         (customMenuFromDefaultItems): Get rid of of unnecessary use of RetainPtr::autorelease.
2364         No need to autorelease the result when the return type is RetainPtr.
2365
2366         * WebView/WebPDFRepresentation.mm:
2367         (-[WebPDFRepresentation convertPostScriptDataSourceToPDF:]): Use bridgingAutorelease.
2368
2369 2018-06-13  Youenn Fablet  <youenn@apple.com>
2370
2371         Supported plugin check should be based on plugin identifier
2372         https://bugs.webkit.org/show_bug.cgi?id=186578
2373         <rdar://problem/40523828>
2374
2375         Reviewed by Darin Adler.
2376
2377         * WebCoreSupport/WebPluginInfoProvider.h:
2378         * WebCoreSupport/WebPluginInfoProvider.mm:
2379         (WebPluginInfoProvider::pluginInfo):
2380         (WebPluginInfoProvider::webVisiblePluginInfo):
2381
2382 2018-06-13  Chris Dumez  <cdumez@apple.com>
2383
2384         PSON: http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-collusion.html ASSERTS with process swap enabled
2385         https://bugs.webkit.org/show_bug.cgi?id=186545
2386
2387         Reviewed by Brady Eidson.
2388
2389         Update client delegate now that parameter type has changed.
2390
2391         * WebCoreSupport/WebFrameLoaderClient.h:
2392         * WebCoreSupport/WebFrameLoaderClient.mm:
2393         (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2394
2395 2018-06-11  Tim Horton  <timothy_horton@apple.com>
2396
2397         Link drag image is inconsistently unreadable in dark mode
2398         https://bugs.webkit.org/show_bug.cgi?id=186472
2399
2400         Reviewed by Timothy Hatcher.
2401
2402         * WebView/WebView.mm:
2403         (-[WebView _defaultAppearance]):
2404         Make defaultAppearance accurate even if useSystemAppearance is false.
2405         Some parts of WebKit (like the link drag image, but also context menus)
2406         want to be able to follow the system appearance regardless of whether
2407         the view or content has opted in.
2408
2409 2018-06-11  Chris Dumez  <cdumez@apple.com>
2410
2411         http/tests/security/cors-post-redirect-307.html fails with PSON enabled
2412         https://bugs.webkit.org/show_bug.cgi?id=186441
2413
2414         Reviewed by Brady Eidson.
2415
2416         Rename existing flag to something a bit more generic, now that it is used for
2417         more things than bypassing the navigation policy check.
2418
2419         * WebView/WebView.mm:
2420         (-[WebView _loadBackForwardListFromOtherView:]):
2421         (-[WebView goToBackForwardItem:]):
2422
2423 2018-06-09  Dan Bernstein  <mitz@apple.com>
2424
2425         [Xcode] Clean up and modernize some build setting definitions
2426         https://bugs.webkit.org/show_bug.cgi?id=186463
2427
2428         Reviewed by Sam Weinig.
2429
2430         * Configurations/Base.xcconfig: Removed definition for macOS 10.11.
2431         * Configurations/DebugRelease.xcconfig: Ditto.
2432         * Configurations/FeatureDefines.xcconfig: Simplified the definitions of ENABLE_APPLE_PAY and
2433           ENABLE_VIDEO_PRESENTATION_MODE now macOS 10.12 is the earliest supported version.
2434         * Configurations/Version.xcconfig: Removed definition for macOS 10.11.
2435         * Configurations/WebKitLegacy.xcconfig: Simplified the definition of WK_PRIVATE_FRAMEWORKS_DIR
2436           now that WK_XCODE_SUPPORTS_TEXT_BASED_STUBS is true for all supported Xcode versions.
2437         * Configurations/WebKitTargetConditionals.xcconfig: Removed definitions for macOS 10.11.
2438
2439 2018-06-08  Darin Adler  <darin@apple.com>
2440
2441         [Cocoa] Remove all uses of NSAutoreleasePool as part of preparation for ARC
2442         https://bugs.webkit.org/show_bug.cgi?id=186436
2443
2444         Reviewed by Anders Carlsson.
2445
2446         * Carbon/CarbonUtils.m: Updated include location of FoundationSPI.h.
2447         (getNSAutoreleasePoolCount): Use objc_autoreleasePoolPush/Pop.
2448         (WebInitForCarbon): Use objc_autoreleasePoolPush/Pop instead of NSAutoreleasePool object.
2449         (PoolCleaner): Ditto.
2450
2451         * History/WebHistory.mm:
2452         (-[WebHistoryPrivate loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]):
2453         Use @autoreleasepool instead of NSAutoreleasePool object. No need to do the "drain pool only
2454         every 50 times"; the -[WebHistory loadFromURL] family of methods were once used by Safari, and
2455         now hardly used if at all.
2456         * WebView/WebView.mm:
2457         (-[WebView rectsForTextMatches]): Ditto.
2458
2459 2018-06-08  Wenson Hsieh  <wenson_hsieh@apple.com>
2460
2461         [WebKit on watchOS] Upstream watchOS source additions to OpenSource (Part 1)
2462         https://bugs.webkit.org/show_bug.cgi?id=186442
2463         <rdar://problem/40879364>
2464
2465         Reviewed by Tim Horton.
2466
2467         * Configurations/FeatureDefines.xcconfig:
2468
2469 2018-06-08  Aditya Keerthi  <akeerthi@apple.com>
2470
2471         [Datalist] Allow TextFieldInputType to show and hide suggestions
2472         https://bugs.webkit.org/show_bug.cgi?id=186151
2473
2474         Reviewed by Tim Horton.
2475
2476         * WebCoreSupport/WebChromeClient.h:
2477         * WebCoreSupport/WebChromeClient.mm:
2478         (WebChromeClient::createDataListSuggestionPicker):
2479
2480 2018-06-07  Chris Dumez  <cdumez@apple.com>
2481
2482         Add base class to get WeakPtrFactory member and avoid some boilerplate code
2483         https://bugs.webkit.org/show_bug.cgi?id=186407
2484
2485         Reviewed by Brent Fulgham.
2486
2487         Add CanMakeWeakPtr base class to get WeakPtrFactory member and its getter, in
2488         order to avoid some boilerplate code in every class needing a WeakPtrFactory.
2489         This also gets rid of old-style createWeakPtr() methods in favor of the newer
2490         makeWeakPtr().
2491
2492         * WebCoreSupport/WebEditorClient.h:
2493         * WebCoreSupport/WebEditorClient.mm:
2494         (WebEditorClient::requestCandidatesForSelection):
2495
2496 2018-06-05  Chris Dumez  <cdumez@apple.com>
2497
2498         Regression(r232082): Websites get loaded inside of Messages App chat transcript
2499         https://bugs.webkit.org/show_bug.cgi?id=186331
2500         <rdar://problem/40735446>
2501
2502         Reviewed by Darin Adler.
2503
2504         r232082 made it so that if the client implements decidePolicyForMIMEType / decidePolicyForNavigationAction
2505         but does not call use / ignore on the listener, then we would do "use" by default.
2506         The intention was to restore pre-AsyncPolicyDelegates behavior and unbreak Box.app. However,
2507         the pre-AsyncPolicyDelegates behavior was only to "use" by default for decidePolicyForMIMEType,
2508         not decidePolicyForNavigationAction. Doing "use" by default for decidePolicyForNavigationAction
2509         is new behavior and it breaks Messages.app. This patch updates r232082 so that we now do call
2510         "use" by default on the listener for decidePolicyForMIMEType and "ignore" by default for other
2511         policy decisions. This should restore pre-AsyncPolicyDelegates behavior. This fixes Messages.app
2512         and Box.app is still working properly.
2513
2514         * WebCoreSupport/WebFrameLoaderClient.h:
2515         * WebCoreSupport/WebFrameLoaderClient.mm:
2516         (WebFrameLoaderClient::dispatchDecidePolicyForResponse):
2517         (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
2518         (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2519         (WebFrameLoaderClient::dispatchWillSubmitForm):
2520         (WebFrameLoaderClient::setUpPolicyListener):
2521         (-[WebFramePolicyListener initWithFrame:policyFunction:defaultPolicy:]):
2522         (-[WebFramePolicyListener initWithFrame:policyFunction:defaultPolicy:appLinkURL:]):
2523         (-[WebFramePolicyListener dealloc]):
2524         (-[WebFramePolicyListener initWithFrame:policyFunction:]): Deleted.
2525         (-[WebFramePolicyListener initWithFrame:policyFunction:appLinkURL:]): Deleted.
2526
2527 2018-06-05  Brent Fulgham  <bfulgham@apple.com>
2528
2529         Adjust compile and runtime flags to match shippable state of features
2530         https://bugs.webkit.org/show_bug.cgi?id=186319
2531         <rdar://problem/40352045>
2532
2533         Reviewed by Maciej Stachowiak, Jon Lee, and others.
2534
2535         * Configurations/DebugRelease.xcconfig: Don't build ENABLE_INPUT_TYPE_COLOR
2536         or ENABLE_INPUT_TYPE_COLOR_POPOVER.
2537         * Configurations/FeatureDefines.xcconfig: Update to match WebKit definition of
2538         WK_RELOCATABLE_FRAMEWORKS so that ENABLE(EXPERIMENTAL_FEATURES) is defined properly for
2539         Cocoa builds.
2540
2541 2018-06-05  Timothy Hatcher  <timothy@apple.com>
2542
2543         Clean up LocalDefaultSystemAppearance and prefers-dark-interface media query
2544
2545         https://bugs.webkit.org/show_bug.cgi?id=186323
2546         rdar://problem/38382252
2547
2548         Reviewed by Tim Horton.
2549
2550         * WebView/WebView.mm:
2551         (-[WebView _defaultAppearance]):
2552
2553 2018-06-05  Brent Fulgham  <bfulgham@apple.com>
2554
2555         Revise DEFAULT_EXPERIMENTAL_FEATURES_ENABLED to work properly on Apple builds
2556         https://bugs.webkit.org/show_bug.cgi?id=186286
2557         <rdar://problem/40782992>
2558
2559         Reviewed by Dan Bernstein.
2560
2561         Use the WK_RELOCATABLE_FRAMEWORKS flag (which is always defined for non-production builds)
2562         to define ENABLE(EXPERIMENTAL_FEATURES) so that we do not need to manually
2563         change this flag when preparing for a production release.
2564
2565         * Configurations/FeatureDefines.xcconfig: Use WK_RELOCATABLE_FRAMEWORKS to determine
2566         whether experimental features should be enabled, and use it to properly define the
2567         feature flag.
2568
2569 2018-06-03  Darin Adler  <darin@apple.com>
2570
2571         Simplify and remove some unused video element code (helpful for ARC-compatibility)
2572         https://bugs.webkit.org/show_bug.cgi?id=186258
2573
2574         Reviewed by Daniel Bates.
2575
2576         * WebView/WebVideoFullscreenController.h: Removed some unneeded includes and
2577         forward declarations. Removed methods that don't need to be public.
2578
2579         * WebView/WebVideoFullscreenController.mm: Added additional includes. Removed
2580         #if COMPILER(CLANG) since that's all we use on Mac. Moved fields into an
2581         unnamed category in here and also replaced the HUDWindowControllerDelegate
2582         with the unnamed category. Removed unused NSWindow category defining the
2583         isOnActiveSpace, which is not called anywhere in this file at this time.
2584         (-[WebVideoFullscreenController setupVideoOverlay:]): Deleted. Moved the code
2585         into setVideoElement.
2586         (-[WebVideoFullscreenController windowDidLoad]): Slightly rearranged the code
2587         and removed unneeded typecast.
2588         (-[WebVideoFullscreenController videoElement]): Updated to not rely on a
2589         using statement at the top of the file.
2590         (-[WebVideoFullscreenController setVideoElement:]): Added a comment about
2591         the many side effects and special considerations that this method that sounds
2592         like a setter has. Updated code to use the new
2593         MediaPlayer::objCAVFoundationAVPlayer function instead of the old
2594         HTMLVideoElement::platformMedia function. Also straightened out the logic a
2595         bit and added some FIXME comments about small problems noticed but not fixed.
2596         (-[WebVideoFullscreenController delegate]): Deleted. Was never called.
2597         (-[WebVideoFullscreenController setDelegate:]): Deleted. Was never called.
2598         (-[WebVideoFullscreenController windowDidExitFullscreen]): Removed unneeded
2599         typecast. Removed call to updatePowerAssertions method.
2600         (-[WebVideoFullscreenController windowDidEnterFullscreen]): Removed call to
2601         updatePowerAssertions method.
2602         (-[WebVideoFullscreenController updatePowerAssertions]): Deleted. This method
2603         set _displaySleepEnabler to nullptr, but nothing was ever setting it to anything
2604         else, so this was dead code that did nothing.
2605         (-[WebVideoFullscreenController rateChanged:]): Removed call to
2606         updatePowerAssertions method.
2607
2608 2018-06-04  Chris Dumez  <cdumez@apple.com>
2609
2610         Rename "Cross-Origin-Options" HTTP header to "Cross-Origin-Window-Policy"
2611         https://bugs.webkit.org/show_bug.cgi?id=186287
2612         <rdar://problem/40783352>
2613
2614         Reviewed by Youenn Fablet.
2615
2616         * WebView/WebPreferenceKeysPrivate.h:
2617         * WebView/WebPreferences.mm:
2618         (+[WebPreferences initialize]):
2619         (-[WebPreferences crossOriginWindowPolicySupportEnabled]):
2620         (-[WebPreferences setCrossOriginWindowPolicySupportEnabled:]):
2621         * WebView/WebPreferencesPrivate.h:
2622         * WebView/WebView.mm:
2623         (-[WebView _preferencesChanged:]):
2624
2625 2018-06-02  Darin Adler  <darin@apple.com>
2626
2627         [Cocoa] Update some code to be more ARC-compatible to prepare for future ARC adoption
2628         https://bugs.webkit.org/show_bug.cgi?id=186227
2629
2630         Reviewed by Dan Bernstein.
2631
2632         * Misc/WebKitErrors.m:
2633         (+[NSError _registerWebKitErrors]): Use @autoreleasepool instead of NSAutoreleasePool.
2634         * Plugins/WebPluginDatabase.mm:
2635         (-[WebPluginDatabase refresh]): Ditto.
2636         * WebCoreSupport/WebChromeClient.mm:
2637         (WebChromeClient::setStatusbarText): Ditto.
2638
2639 2018-06-01  Chris Dumez  <cdumez@apple.com>
2640
2641         REGRESSION (r231456): Colloquy is broken
2642         https://bugs.webkit.org/show_bug.cgi?id=186197
2643         <rdar://problem/40722960>
2644
2645         Reviewed by Timothy Hatcher.
2646
2647         Restore pre-r231456 behavior for Colloquy app so that it works again.
2648
2649         * WebView/WebView.mm:
2650         (-[WebView _needsFrameNameFallbackToIdQuirk]):
2651         (-[WebView _preferencesChanged:]):
2652
2653 2018-05-30  Yusuke Suzuki  <utatane.tea@gmail.com>
2654
2655         [JSC] Pass VM& parameter as much as possible
2656         https://bugs.webkit.org/show_bug.cgi?id=186085
2657
2658         Reviewed by Saam Barati.
2659
2660         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2661         (WebKit::NetscapePluginInstanceProxy::invoke):
2662
2663 2018-05-30  Daniel Bates  <dabates@apple.com>
2664
2665         NavigationAction does not need to hold initiating DOM Event
2666         https://bugs.webkit.org/show_bug.cgi?id=185958
2667         <rdar://problem/40531539>
2668
2669         Reviewed by Simon Fraser.
2670
2671         Write in terms of NavigationAction::{keyStateEventData, mouseEventDataForFirstMouseEvent}().
2672
2673         * WebCoreSupport/WebFrameLoaderClient.mm:
2674         (WebFrameLoaderClient::actionDictionary const):
2675         (findMouseEvent): Deleted.
2676
2677 2018-05-27  Dan Bernstein  <mitz@apple.com>
2678
2679         Reverted the changes made for https://webkit.org/b/186016
2680
2681         They broke the USE(APPLE_INTERNAL_SDK) Sierra build.
2682
2683
2684 2018-05-27  David Kilzer  <ddkilzer@apple.com>
2685
2686         [iOS] Fix warnings about leaks found by clang static analyzer
2687         <https://webkit.org/b/186009>
2688         <rdar://problem/40574267>
2689
2690         Reviewed by Daniel Bates.
2691
2692         * WebView/WebHTMLView.mm:
2693         (-[WebHTMLView doCommandBySelector:]): Fix use of an
2694         uninitialized boolean variable (`eventWasHandled`) that only
2695         happened on iOS.
2696
2697 2018-05-27  Dan Bernstein  <mitz@apple.com>
2698
2699         [Cocoa] Avoid importing directly from subumbrella frameworks
2700         https://bugs.webkit.org/show_bug.cgi?id=186016
2701
2702         Reviewed by Sam Weinig.
2703
2704         * Carbon/CarbonWindowAdapter.h: Import Carbon.h instead of HIToolbox headers.
2705         * Carbon/CarbonWindowAdapter.mm: Ditto.
2706         * Carbon/CarbonWindowFrame.m: Ditto.
2707         * Carbon/HIViewAdapter.h: Ditto.
2708         * Configurations/WebKitLegacy.xcconfig: Removed -iframework options from OTHER_CFLAGS and
2709           OTHER_CPLUSPLUSFLAGS.
2710         * Plugins/WebNetscapePluginEventHandlerCarbon.mm: Import Carbon.h instead of CarbonEvents.h.
2711         * WebView/WebPDFDocumentExtras.mm: Import Quartz.h instead of a PDFKit header.
2712         * WebView/WebPDFView.h: Ditto.
2713
2714 2018-05-27  Sam Weinig  <sam@webkit.org>
2715
2716         Modernize RenderStyleConstants.h - Part 3
2717         https://bugs.webkit.org/show_bug.cgi?id=186015
2718
2719         Reviewed by Yusuke Suzuki.
2720
2721         * WebView/WebView.mm:
2722         (-[WebView updateTextTouchBar]):
2723         Update for new enum name.
2724
2725 2018-05-25  Chris Dumez  <cdumez@apple.com>
2726
2727         Minor ApplicationCacheStorage clean up
2728         https://bugs.webkit.org/show_bug.cgi?id=185984
2729
2730         Reviewed by Youenn Fablet.
2731
2732         * WebCoreSupport/WebApplicationCache.mm:
2733         (+[WebApplicationCache originsWithCache]):
2734
2735 2018-05-25  David Kilzer  <ddkilzer@apple.com>
2736
2737         Fix issues with -dealloc methods found by clang static analyzer
2738         <https://webkit.org/b/185887>
2739
2740         Reviewed by Joseph Pecoraro.
2741
2742         * WebView/WebView.mm:
2743         (-[WebUITextIndicatorData dealloc]):
2744         - Move method implementation from (WebUITextIndicatorInternal)
2745           category to the main category since this is public API.  This
2746           fixes the false positive warning about a missing -dealloc
2747           method.
2748
2749 2018-05-24  Sam Weinig  <sam@webkit.org>
2750
2751         Modernize RenderStyleConstants.h - Part 2
2752         https://bugs.webkit.org/show_bug.cgi?id=185901
2753
2754         Reviewed by Simon Fraser.
2755
2756         * WebView/WebHTMLRepresentation.mm:
2757         (searchForLabelsBeforeElement):
2758         * WebView/WebView.mm:
2759         (nsTextAlignmentFromRenderStyle):
2760         Update for new enum names.
2761
2762 2018-05-22  Chris Dumez  <cdumez@apple.com>
2763
2764         Regression(AsyncPolicyDelegates): Box.app login Window is blank
2765         https://bugs.webkit.org/show_bug.cgi?id=185832
2766         <rdar://problem/40307871>
2767
2768         Reviewed by Geoffrey Garen.
2769
2770         We used to have a bug where where we would fail to wait for the policy decision for
2771         the navigation response from the client and the load would keep going, racing with
2772         the client's policy decision. If the client did not respond in time, the behavior
2773         would be the same as "Use" policy action.
2774
2775         Box.app fails to make any policy decision in its decidePolicyForMIMEType delegate
2776         but the load happened to proceed anyway due to our bug. Now that we've fixed the
2777         WebKit bug, however, the load would hang because the completion handler for the
2778         decidePolicyForNavigationResponse would never get called.
2779
2780         To work around the issue, I made the policy listener weak on the WebFrameLoaderClient
2781         instead of retaining it. If the policy listener object gets destroyed because getting
2782         resolved, we now use "Use" policy action in its dealloc function to maintain previous
2783         behavior.
2784
2785         * WebCoreSupport/WebFrameLoaderClient.h:
2786         * WebCoreSupport/WebFrameLoaderClient.mm:
2787         (WebFrameLoaderClient::cancelPolicyCheck):
2788         (WebFrameLoaderClient::setUpPolicyListener):
2789         (-[WebFramePolicyListener dealloc]):
2790
2791 2018-05-22  Ryan Haddad  <ryanhaddad@apple.com>
2792
2793         Unreviewed, rolling out r232052.
2794
2795         Breaks internal builds.
2796
2797         Reverted changeset:
2798
2799         "Use more C++17"
2800         https://bugs.webkit.org/show_bug.cgi?id=185176
2801         https://trac.webkit.org/changeset/232052
2802
2803 2018-05-21  Yusuke Suzuki  <utatane.tea@gmail.com>
2804
2805         Use more C++17
2806         https://bugs.webkit.org/show_bug.cgi?id=185176
2807
2808         Reviewed by JF Bastien.
2809
2810         * Configurations/Base.xcconfig:
2811         * Configurations/WebKitLegacy.xcconfig:
2812
2813 2018-05-21  Chris Nardi  <cnardi@chromium.org>
2814
2815         Remove dead exception in MediaList.appendMedium
2816         https://bugs.webkit.org/show_bug.cgi?id=185278
2817
2818         Reviewed by Chris Dumez.
2819
2820         Remove code pertaining to an exception being thrown by appendMedium().
2821
2822         * DOM/DOMMediaList.mm:
2823         (-[DOMMediaList appendMedium:]):
2824
2825 2018-05-21  Jer Noble  <jer.noble@apple.com>
2826
2827         Complete fix for enabling modern EME by default
2828         https://bugs.webkit.org/show_bug.cgi?id=185770
2829         <rdar://problem/40368220>
2830
2831         Reviewed by Eric Carlson.
2832
2833         * Configurations/FeatureDefines.xcconfig:
2834
2835 2018-05-21  Antti Koivisto  <antti@apple.com>
2836
2837         WebView._preferencesChanged should apply colorFilterEnabled preference before parsing user stylesheet
2838         https://bugs.webkit.org/show_bug.cgi?id=185815
2839         <rdar://problem/40310069>
2840
2841         Reviewed by Simon Fraser.
2842
2843         User stylesheet parsing may depend on the colorFilterEnabled preference.
2844
2845         * WebView/WebView.mm:
2846         (-[WebView _preferencesChanged:]):
2847
2848 2018-05-18  Commit Queue  <commit-queue@webkit.org>
2849
2850         Unreviewed, rolling out r231982.
2851         https://bugs.webkit.org/show_bug.cgi?id=185793
2852
2853         Caused layout test failures (Requested by realdawei on
2854         #webkit).
2855
2856         Reverted changeset:
2857
2858         "Complete fix for enabling modern EME by default"
2859         https://bugs.webkit.org/show_bug.cgi?id=185770
2860         https://trac.webkit.org/changeset/231982
2861
2862 2018-05-18  Jer Noble  <jer.noble@apple.com>
2863
2864         Complete fix for enabling modern EME by default
2865         https://bugs.webkit.org/show_bug.cgi?id=185770
2866         <rdar://problem/40368220>
2867
2868         Reviewed by Eric Carlson.
2869
2870         * Configurations/FeatureDefines.xcconfig:
2871
2872 2018-05-18  Chris Dumez  <cdumez@apple.com>
2873
2874         Avoid keeping the frame alive when ref'ing a WindowProxy
2875         https://bugs.webkit.org/show_bug.cgi?id=185737
2876         <rdar://problem/40004666>
2877
2878         Reviewed by Sam Weinig.
2879
2880         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2881         (WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
2882
2883 2018-05-16  Andy VanWagoner  <andy@vanwagoner.family>
2884
2885         Add support for Intl NumberFormat formatToParts
2886         https://bugs.webkit.org/show_bug.cgi?id=185375
2887
2888         Reviewed by Yusuke Suzuki.
2889
2890         Add flag for NumberFormat formatToParts.
2891
2892         * Configurations/FeatureDefines.xcconfig:
2893
2894 2018-05-16  Chris Nardi  <cnardi@chromium.org>
2895
2896         Fixup after r231849: Do not mark Mac API methods as deprecated
2897         https://bugs.webkit.org/show_bug.cgi?id=185684
2898
2899         Reviewed by Darin Adler.
2900
2901         Do not mark API methods for Document#selectedStylesheetSet/preferredStylesheetSet as deprecated
2902         as the entire class is already marked as deprecated, so it is unnecessary.
2903
2904         * DOM/DOMDocument.h:
2905
2906 2018-05-16  Chris Nardi  <cnardi@chromium.org>
2907
2908         Remove Document#selectedStylesheetSet/preferredStylesheetSet
2909         https://bugs.webkit.org/show_bug.cgi?id=185381
2910
2911         Reviewed by Darin Adler.
2912
2913         Mark API methods for Document#selectedStylesheetSet/preferredStylesheetSet as deprecated
2914         and make them do nothing.
2915
2916         * DOM/DOMDocument.h:
2917         * DOM/DOMDocument.mm:
2918         (-[DOMDocument preferredStylesheetSet]):
2919         (-[DOMDocument selectedStylesheetSet]):
2920         (-[DOMDocument setSelectedStylesheetSet:]):
2921
2922 2018-05-15  Antoine Quint  <graouts@apple.com>
2923
2924         [Web Animations] Expose Web Animations CSS integration as an experimental feature
2925         https://bugs.webkit.org/show_bug.cgi?id=185647
2926
2927         Reviewed by Dean Jackson.
2928
2929         Rename the Web Animations CSS integration flag.
2930
2931         * WebView/WebPreferenceKeysPrivate.h:
2932         * WebView/WebPreferences.mm:
2933         (+[WebPreferences initialize]):
2934         (-[WebPreferences webAnimationsCSSIntegrationEnabled]):
2935         (-[WebPreferences setWebAnimationsCSSIntegrationEnabled:]):
2936         (-[WebPreferences cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled]): Deleted.
2937         (-[WebPreferences setCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled:]): Deleted.
2938         * WebView/WebPreferencesPrivate.h:
2939         * WebView/WebView.mm:
2940         (-[WebView _preferencesChanged:]):
2941
2942 2018-05-14  Daniel Bates  <dabates@apple.com>
2943
2944         Fix the Apple Internal build
2945
2946         See <rdar://problem/40237873> for more details.
2947
2948         * WebView/WebFullScreenController.mm:
2949         (-[WebFullScreenController enterFullScreen:]):
2950         (-[WebFullScreenController finishedEnterFullScreenAnimation:]):
2951         (-[WebFullScreenController exitFullScreen]):
2952         (-[WebFullScreenController finishedExitFullScreenAnimation:]):
2953         (-[WebFullScreenController _startEnterFullScreenAnimationWithDuration:]):
2954         (-[WebFullScreenController _startExitFullScreenAnimationWithDuration:]):
2955
2956 2018-05-11  Timothy Hatcher  <timothy@apple.com>
2957
2958         WebHTMLView is not setting aside subviews when drawing.
2959
2960         https://bugs.webkit.org/show_bug.cgi?id=185561
2961         rdar://problem/40172894
2962
2963         Reviewed by Simon Fraser.
2964
2965         Use the new method signature for _recursive:displayRectIgnoringOpacity:shouldChangeFontReferenceColor:.
2966
2967         * WebView/WebHTMLView.mm:
2968         (-[WebHTMLView _recursive:displayRectIgnoringOpacity:inContext:shouldChangeFontReferenceColor:stopAtLayerBackedViews:]): Added.
2969
2970 2018-05-07  Daniel Bates  <dabates@apple.com>
2971
2972         Substitute CrossOriginPreflightResultCache::clear() for CrossOriginPreflightResultCache::empty()
2973         https://bugs.webkit.org/show_bug.cgi?id=185170
2974
2975         Reviewed by Per Arne Vollan.
2976
2977         * Misc/WebCache.mm:
2978         (+[WebCache empty]):
2979
2980 2018-05-04  Timothy Hatcher  <timothy@apple.com>
2981
2982         Deprecate legacy WebView and friends
2983         https://bugs.webkit.org/show_bug.cgi?id=185279
2984         rdar://problem/33268700
2985
2986         Reviewed by Tim Horton.
2987
2988         Added deprecation macros to all the classes, extern strings, and enums.
2989
2990         * Configurations/WebKitLegacy.xcconfig:
2991         Added BUILDING_WEBKIT define to disable the deprecation macros.
2992         * DOM/DOMAbstractView.h:
2993         * DOM/DOMAttr.h:
2994         * DOM/DOMBlob.h:
2995         * DOM/DOMCDATASection.h:
2996         * DOM/DOMCSSCharsetRule.h:
2997         * DOM/DOMCSSFontFaceRule.h:
2998         * DOM/DOMCSSImportRule.h:
2999         * DOM/DOMCSSMediaRule.h:
3000         * DOM/DOMCSSPageRule.h:
3001         * DOM/DOMCSSPrimitiveValue.h:
3002         * DOM/DOMCSSRule.h:
3003         * DOM/DOMCSSRuleList.h:
3004         * DOM/DOMCSSStyleDeclaration.h:
3005         * DOM/DOMCSSStyleRule.h:
3006         * DOM/DOMCSSStyleSheet.h:
3007         * DOM/DOMCSSUnknownRule.h:
3008         * DOM/DOMCSSValue.h:
3009         * DOM/DOMCSSValueList.h:
3010         * DOM/DOMCharacterData.h:
3011         * DOM/DOMComment.h:
3012         * DOM/DOMCounter.h:
3013         * DOM/DOMDocument.h:
3014         * DOM/DOMDocumentFragment.h:
3015         * DOM/DOMDocumentType.h:
3016         * DOM/DOMElement.h:
3017         * DOM/DOMEntity.h:
3018         * DOM/DOMEntityReference.h:
3019         * DOM/DOMEvent.h:
3020         * DOM/DOMEventException.h:
3021         * DOM/DOMEventListener.h:
3022         * DOM/DOMEventTarget.h:
3023         * DOM/DOMException.h:
3024         * DOM/DOMFile.h:
3025         * DOM/DOMFileList.h:
3026         * DOM/DOMHTMLAnchorElement.h:
3027         * DOM/DOMHTMLAppletElement.h:
3028         * DOM/DOMHTMLAreaElement.h:
3029         * DOM/DOMHTMLBRElement.h:
3030         * DOM/DOMHTMLBaseElement.h:
3031         * DOM/DOMHTMLBaseFontElement.h:
3032         * DOM/DOMHTMLBodyElement.h:
3033         * DOM/DOMHTMLButtonElement.h:
3034         * DOM/DOMHTMLCanvasElement.h:
3035         * DOM/DOMHTMLCollection.h:
3036         * DOM/DOMHTMLDListElement.h:
3037         * DOM/DOMHTMLDirectoryElement.h:
3038         * DOM/DOMHTMLDivElement.h:
3039         * DOM/DOMHTMLDocument.h:
3040         * DOM/DOMHTMLElement.h:
3041         * DOM/DOMHTMLEmbedElement.h:
3042         * DOM/DOMHTMLFieldSetElement.h:
3043         * DOM/DOMHTMLFontElement.h:
3044         * DOM/DOMHTMLFormElement.h:
3045         * DOM/DOMHTMLFrameElement.h:
3046         * DOM/DOMHTMLFrameSetElement.h:
3047         * DOM/DOMHTMLHRElement.h:
3048         * DOM/DOMHTMLHeadElement.h:
3049         * DOM/DOMHTMLHeadingElement.h:
3050         * DOM/DOMHTMLHtmlElement.h:
3051         * DOM/DOMHTMLIFrameElement.h:
3052         * DOM/DOMHTMLImageElement.h:
3053         * DOM/DOMHTMLInputElement.h:
3054         * DOM/DOMHTMLLIElement.h:
3055         * DOM/DOMHTMLLabelElement.h:
3056         * DOM/DOMHTMLLegendElement.h:
3057         * DOM/DOMHTMLLinkElement.h:
3058         * DOM/DOMHTMLMapElement.h:
3059         * DOM/DOMHTMLMarqueeElement.h:
3060         * DOM/DOMHTMLMediaElement.h:
3061         * DOM/DOMHTMLMenuElement.h:
3062         * DOM/DOMHTMLMetaElement.h:
3063         * DOM/DOMHTMLModElement.h:
3064         * DOM/DOMHTMLOListElement.h:
3065         * DOM/DOMHTMLObjectElement.h:
3066         * DOM/DOMHTMLOptGroupElement.h:
3067         * DOM/DOMHTMLOptionElement.h:
3068         * DOM/DOMHTMLOptionsCollection.h:
3069         * DOM/DOMHTMLParagraphElement.h:
3070         * DOM/DOMHTMLParamElement.h:
3071         * DOM/DOMHTMLPreElement.h:
3072         * DOM/DOMHTMLQuoteElement.h:
3073         * DOM/DOMHTMLScriptElement.h:
3074         * DOM/DOMHTMLSelectElement.h:
3075         * DOM/DOMHTMLStyleElement.h:
3076         * DOM/DOMHTMLTableCaptionElement.h:
3077         * DOM/DOMHTMLTableCellElement.h:
3078         * DOM/DOMHTMLTableColElement.h:
3079         * DOM/DOMHTMLTableElement.h:
3080         * DOM/DOMHTMLTableRowElement.h:
3081         * DOM/DOMHTMLTableSectionElement.h:
3082         * DOM/DOMHTMLTextAreaElement.h:
3083         * DOM/DOMHTMLTitleElement.h:
3084         * DOM/DOMHTMLUListElement.h:
3085         * DOM/DOMHTMLVideoElement.h:
3086         * DOM/DOMImplementation.h:
3087         * DOM/DOMKeyboardEvent.h:
3088         * DOM/DOMMediaError.h:
3089         * DOM/DOMMediaList.h:
3090         * DOM/DOMMouseEvent.h:
3091         * DOM/DOMMutationEvent.h:
3092         * DOM/DOMNamedNodeMap.h:
3093         * DOM/DOMNode.h:
3094         * DOM/DOMNodeFilter.h:
3095         * DOM/DOMNodeIterator.h:
3096         * DOM/DOMNodeList.h:
3097         * DOM/DOMObject.h:
3098         * DOM/DOMOverflowEvent.h:
3099         * DOM/DOMProcessingInstruction.h:
3100         * DOM/DOMProgressEvent.h:
3101         * DOM/DOMRGBColor.h:
3102         * DOM/DOMRange.h:
3103         * DOM/DOMRangeException.h:
3104         * DOM/DOMRect.h:
3105         * DOM/DOMStyleSheet.h:
3106         * DOM/DOMStyleSheetList.h:
3107         * DOM/DOMText.h:
3108         * DOM/DOMTextEvent.h:
3109         * DOM/DOMTimeRanges.h:
3110         * DOM/DOMTokenList.h:
3111         * DOM/DOMTreeWalker.h:
3112         * DOM/DOMUIEvent.h:
3113         * DOM/DOMWheelEvent.h:
3114         * DOM/DOMXPathException.h:
3115         * DOM/DOMXPathExpression.h:
3116         * DOM/DOMXPathNSResolver.h:
3117         * DOM/DOMXPathResult.h:
3118         * History/WebBackForwardList.h:
3119         * History/WebHistory.h:
3120         * History/WebHistoryItem.h:
3121         * Misc/WebDownload.h:
3122         * Misc/WebKitErrors.h:
3123         * Plugins/WebPluginViewFactory.h:
3124         * WebView/WebArchive.h:
3125         * WebView/WebDataSource.h:
3126         * WebView/WebDocument.h:
3127         * WebView/WebEditingDelegate.h:
3128         * WebView/WebFormDelegate.h:
3129         * WebView/WebFrame.h:
3130         * WebView/WebFrameLoadDelegate.h:
3131         * WebView/WebFrameView.h:
3132         * WebView/WebPolicyDelegate.h:
3133         * WebView/WebPreferences.h:
3134         * WebView/WebPreferencesPrivate.h:
3135         * WebView/WebResourceLoadDelegate.h:
3136         * WebView/WebUIDelegate.h:
3137         * WebView/WebUIDelegatePrivate.h:
3138         * WebView/WebView.h:
3139         * WebView/WebViewPrivate.h:
3140         * postprocess-headers.sh:
3141         Remove step that converts WEBKIT macros to NS macros.
3142         Change it to just remove the macros on iOS builds.
3143
3144 2018-05-01  Eric Carlson  <eric.carlson@apple.com>
3145
3146         [MediaStream] remove WK1 support
3147         https://bugs.webkit.org/show_bug.cgi?id=185136
3148
3149         Reviewed by Youenn Fablet.
3150
3151         * WebCoreSupport/WebUserMediaClient.h: Removed.
3152         * WebCoreSupport/WebUserMediaClient.mm: Removed.
3153         * WebView/WebView.mm:
3154         (-[WebView _commonInitializationWithFrameName:groupName:]):
3155         (-[WebView _preferencesChanged:]):
3156         (-[WebView _setUserMediaClient:]): Deleted.
3157         (-[WebView _userMediaClient]): Deleted.
3158         * WebView/WebViewData.h:
3159         * WebView/WebViewPrivate.h:
3160
3161 2018-05-01  Oleksandr Skachkov  <gskachkov@gmail.com>
3162
3163         WebAssembly: add support for stream APIs - JavaScript API
3164         https://bugs.webkit.org/show_bug.cgi?id=183442
3165
3166         Reviewed by Yusuke Suzuki and JF Bastien.
3167
3168         Add WEBASSEMBLY_STREAMINNG_API feature flag
3169
3170         * Configurations/FeatureDefines.xcconfig:
3171
3172 2018-04-30  JF Bastien  <jfbastien@apple.com>
3173
3174         Use some C++17 features
3175         https://bugs.webkit.org/show_bug.cgi?id=185135
3176
3177         Reviewed by Alex Christensen.
3178
3179         * Configurations/WebKitLegacy.xcconfig:
3180
3181 2018-04-27  Chris Dumez  <cdumez@apple.com>
3182
3183         Use WindowProxy instead of DOMWindow in our IDL
3184         https://bugs.webkit.org/show_bug.cgi?id=185022
3185
3186         Reviewed by Sam Weinig.
3187
3188         * DOM/DOMAbstractView.mm:
3189         (kit):
3190         (toWindowProxy):
3191         * DOM/DOMAbstractViewInternal.h:
3192         * DOM/DOMDocument.mm:
3193         (-[DOMDocument defaultView]):
3194         (-[DOMDocument getComputedStyle:pseudoElement:]):
3195         (-[DOMDocument getMatchedCSSRules:pseudoElement:authorOnly:]):
3196         * DOM/DOMHTMLFrameElement.mm:
3197         (-[DOMHTMLFrameElement contentWindow]):
3198         * DOM/DOMHTMLIFrameElement.mm:
3199         (-[DOMHTMLIFrameElement contentWindow]):
3200         * DOM/DOMKeyboardEvent.mm:
3201         (-[DOMKeyboardEvent initKeyboardEvent:canBubble:cancelable:view:keyIdentifier:location:ctrlKey:altKey:shiftKey:metaKey:altGraphKey:]):
3202         (-[DOMKeyboardEvent initKeyboardEvent:canBubble:cancelable:view:keyIdentifier:location:ctrlKey:altKey:shiftKey:metaKey:]):
3203         (-[DOMKeyboardEvent initKeyboardEvent:canBubble:cancelable:view:keyIdentifier:keyLocation:ctrlKey:altKey:shiftKey:metaKey:altGraphKey:]):
3204         (-[DOMKeyboardEvent initKeyboardEvent:canBubble:cancelable:view:keyIdentifier:keyLocation:ctrlKey:altKey:shiftKey:metaKey:]):
3205         * DOM/DOMMouseEvent.mm:
3206         (-[DOMMouseEvent initMouseEvent:canBubble:cancelable:view:detail:screenX:screenY:clientX:clientY:ctrlKey:altKey:shiftKey:metaKey:button:relatedTarget:]):
3207         * DOM/DOMTextEvent.mm:
3208         (-[DOMTextEvent initTextEvent:canBubbleArg:cancelableArg:viewArg:dataArg:]):
3209         * DOM/DOMUIEvent.mm:
3210         (-[DOMUIEvent view]):
3211         (-[DOMUIEvent initUIEvent:canBubble:cancelable:view:detail:]):
3212         * DOM/DOMWheelEvent.mm:
3213         (-[DOMWheelEvent initWheelEvent:wheelDeltaY:view:screenX:screenY:clientX:clientY:ctrlKey:altKey:shiftKey:metaKey:]):
3214
3215 2018-04-26  Simon Fraser  <simon.fraser@apple.com>
3216
3217         Implement rendering support for the color-filter CSS property
3218         https://bugs.webkit.org/show_bug.cgi?id=185047
3219         rdar://problem/39664967
3220
3221         Reviewed by Tim Horton.
3222         
3223         The body background should reflect the filtered color.
3224
3225         * WebView/WebFrame.mm:
3226         (-[WebFrame _bodyBackgroundColor]):
3227         * WebView/WebView.mm:
3228         (-[WebView updateTextTouchBar]): No logic change, just cleanup.
3229
3230 2018-04-26  Jer Noble  <jer.noble@apple.com>
3231
3232         WK_COCOA_TOUCH all the things.
3233         https://bugs.webkit.org/show_bug.cgi?id=185006
3234
3235         Reviewed by Tim Horton.
3236
3237         * Configurations/WebKitLegacy.xcconfig:
3238
3239 2018-04-26  Daniel Bates  <dabates@apple.com>
3240
3241         ASSERTION FAILED: ASSERT(!containsImage || MIMETypeRegistry::isSupportedImageResourceMIMEType([resource MIMEType])) in -[NSPasteboard(WebExtras) _web_writePromisedRTFDFromArchive:containsImage:]
3242         https://bugs.webkit.org/show_bug.cgi?id=184161
3243         <rdar://problem/39051645>
3244
3245         Reviewed by Dan Bernstein.
3246
3247         Fixes an assertion failure when quitting an app that uses a Legacy WebKit web view after dragging-and-
3248         dropping a PDF embedded using an HTML image element into the same web view.
3249
3250         When performing a drag-and-drop of a PDF document image (WebCore::PDFDocumentImage) we create a WebArchive
3251         from the main frame's WebHTMLView and promise AppKit that we will provide a Rich Text Format (RTF) document
3252         from this archive if needed. For some reason, on app termination AppKit requests that the WebHTMLView
3253         fulfill its RTF document promise for the WebArchive created at the start of the drag operation. To do this,
3254         we need to extract the image resource from the Web Archive. Currently we query MIMETypeRegistry::isSupportedImageResourceMIMEType()
3255         to see if the contained image is one that we can handle. However MIMETypeRegistry::isSupportedImageResourceMIMEType()
3256         only returns true if WebKit supports creating an image document for the specified MIME type. Disregarding
3257         the iOS motivated setting Settings::useImageDocumentForSubframePDF, PDFs and PostScripts do not create an
3258         image document when navigated to directly. Since we can support dragging PDF document images we need to
3259         query if MIMETypeRegistry::isPDFOrPostScriptMIMEType() in addition to querying MIMETypeRegistry::isSupportedImageResourceMIMEType().
3260         We need to do both such queries before falling back to using the main resource of the Web Archive as
3261         the image. Otherwise, we will cause an assertion failure if the main resource of the Web Archive is
3262         not an image document.
3263
3264         * Misc/WebNSPasteboardExtras.mm:
3265         (-[NSPasteboard _web_writePromisedRTFDFromArchive:containsImage:]):
3266
3267 2018-04-26  Per Arne Vollan  <pvollan@apple.com>
3268
3269         Disable content filtering in minimal simulator mode
3270         https://bugs.webkit.org/show_bug.cgi?id=185027
3271         <rdar://problem/39736091>
3272
3273         Reviewed by Jer Noble.
3274
3275         * Configurations/FeatureDefines.xcconfig:
3276
3277 2018-04-26  Andy VanWagoner  <thetalecrafter@gmail.com>
3278
3279         [INTL] Implement Intl.PluralRules
3280         https://bugs.webkit.org/show_bug.cgi?id=184312
3281
3282         Reviewed by JF Bastien.
3283
3284         Added Intl.PluralRules feature flag.
3285
3286         * Configurations/FeatureDefines.xcconfig:
3287
3288 2018-04-25  Jiewen Tan  <jiewen_tan@apple.com>
3289
3290         Remove access to keychain from the WebContent process
3291         https://bugs.webkit.org/show_bug.cgi?id=184428
3292         <rdar://problem/13150903>
3293
3294         Reviewed by Brent Fulgham.
3295
3296         This patch does the followings:
3297         1. Added necessary support to move HTMLKeygenElement's operation from WebCore space to Client space.
3298         2. Craft new SPI signedPublicKeyAndChallengeStringForWebView to supply HTMLKeygenElement with dummy data
3299         such that DumpRenderTree tests will not modify the underlying key store (e.g., the macOS Keychain).
3300
3301         * WebCoreSupport/WebChromeClient.h:
3302         * WebCoreSupport/WebChromeClient.mm:
3303         (WebChromeClient::signedPublicKeyAndChallengeString const):
3304         * WebView/WebUIDelegatePrivate.h:
3305
3306 2018-04-24  Jer Noble  <jer.noble@apple.com>
3307
3308         Don't add system framework paths to FRAMEWORK_SEARCH_PATHS
3309         https://bugs.webkit.org/show_bug.cgi?id=184786
3310
3311         Reviewed by Tim Horton.
3312
3313         * Configurations/WebKitLegacy.xcconfig:
3314         * MigrateHeaders.make:
3315
3316 2018-04-23  Daniel Bates  <dabates@apple.com>
3317
3318         Implement Same-Site cookies
3319         https://bugs.webkit.org/show_bug.cgi?id=159464
3320         <rdar://problem/27196358>
3321
3322         Reviewed by Brent Fulgham.
3323
3324         Pass the Same-Site info through the strategy.
3325
3326         * WebCoreSupport/WebPlatformStrategies.h:
3327         * WebCoreSupport/WebPlatformStrategies.mm:
3328         (WebPlatformStrategies::cookiesForDOM):
3329         (WebPlatformStrategies::setCookiesFromDOM):
3330         (WebPlatformStrategies::cookieRequestHeaderFieldValue):
3331         (WebPlatformStrategies::getRawCookies):
3332
3333 2018-04-23  Zalan Bujtas  <zalan@apple.com>
3334
3335         [LayoutFormattingContext] Initial commit.
3336         https://bugs.webkit.org/show_bug.cgi?id=184896
3337
3338         Reviewed by Antti Koivisto.
3339
3340         * Configurations/FeatureDefines.xcconfig:
3341
3342 2018-04-23  Daniel Bates  <dabates@apple.com>
3343
3344         Implement Same-Site cookies
3345         https://bugs.webkit.org/show_bug.cgi?id=159464
3346         <rdar://problem/27196358>
3347
3348         Reviewed by Brent Fulgham.
3349
3350         Pass the Same-Site info through the strategy.
3351
3352         * WebCoreSupport/WebPlatformStrategies.h:
3353         * WebCoreSupport/WebPlatformStrategies.mm:
3354         (WebPlatformStrategies::cookiesForDOM):
3355         (WebPlatformStrategies::setCookiesFromDOM):
3356         (WebPlatformStrategies::cookieRequestHeaderFieldValue):
3357         (WebPlatformStrategies::getRawCookies):
3358
3359 2018-04-20  Timothy Hatcher  <timothy@apple.com>
3360
3361         NULL dereference crash sometimes under [super initWithCoder:] in WebView
3362
3363         https://bugs.webkit.org/show_bug.cgi?id=184851
3364         rdar://problem/39611236
3365
3366         Reviewed by Tim Horton.
3367
3368         * WebView/WebView.mm:
3369         (-[WebView _commonInitializationWithFrameName:groupName:]):
3370         (-[WebView effectiveAppearanceDidChange]):
3371         Added a null check and call the code later in initialization.
3372
3373 2018-04-20  Tim Horton  <timothy_horton@apple.com>
3374
3375         Adjust geolocation feature flag
3376         https://bugs.webkit.org/show_bug.cgi?id=184856
3377
3378         Reviewed by Wenson Hsieh.
3379
3380         * Configurations/FeatureDefines.xcconfig:
3381
3382 2018-04-18  Jer Noble  <jer.noble@apple.com>
3383
3384         Don't put build products into WK_ALTERNATE_WEBKIT_SDK_PATH for engineering builds
3385         https://bugs.webkit.org/show_bug.cgi?id=184762
3386
3387         Reviewed by Dan Bernstein.
3388
3389         * Configurations/WebKitLegacy.xcconfig:
3390
3391 2018-04-20  Youenn Fablet  <youenn@apple.com>
3392
3393         Make PluginData cache its web visible plugins
3394         https://bugs.webkit.org/show_bug.cgi?id=184421
3395
3396         Reviewed by Chris Dumez.
3397
3398         * WebCoreSupport/WebPluginInfoProvider.h:
3399         * WebCoreSupport/WebPluginInfoProvider.mm:
3400         (WebPluginInfoProvider::pluginInfo):
3401         (WebPluginInfoProvider::webVisiblePluginInfo):
3402
3403 2018-04-19  Chris Dumez  <cdumez@apple.com>
3404
3405         Rename JSDOMWindowProxy to JSWindowProxy
3406         https://bugs.webkit.org/show_bug.cgi?id=184797
3407
3408         Reviewed by Sam Weinig.
3409
3410         Rename JSDOMWindowProxy to JSWindowProxy for consistency with WindowProxy.
3411
3412         * DOM/DOMUtility.mm:
3413         (createDOMWrapper):
3414         * WebView/WebFrame.mm:
3415         (-[WebFrame _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]):
3416
3417 2018-04-19  David Kilzer  <ddkilzer@apple.com>
3418
3419         Enable Objective-C weak references
3420         <https://webkit.org/b/184789>
3421         <rdar://problem/39571716>
3422
3423         Reviewed by Dan Bernstein.
3424
3425         * Configurations/Base.xcconfig:
3426         (CLANG_ENABLE_OBJC_WEAK): Enable.
3427
3428 2018-04-18  Chris Dumez  <cdumez@apple.com>
3429
3430         Rename WindowProxyController to WindowProxy
3431         https://bugs.webkit.org/show_bug.cgi?id=184756
3432
3433         Reviewed by Sam Weinig.
3434
3435         Rename WindowProxyController to WindowProxy for clarity. When the IDL uses WindowProxy, the implementation
3436         needed use WindowProxyController type, which was a bit confusing.
3437
3438         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3439         (WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
3440         * WebView/WebFrame.mm:
3441         (-[WebFrame _attachScriptDebugger]):
3442
3443 2018-04-17  Jonathan Bedard  <jbedard@apple.com>
3444
3445         Unreviewed rollout of r230632. Regression in memory usage.
3446
3447         That bug tracked in https://bugs.webkit.org/show_bug.cgi?id=184569.
3448
3449         * WebView/WebPreferences.mm:
3450         (+[WebPreferences initialize]):
3451
3452 2018-04-17  Chris Dumez  <cdumez@apple.com>
3453
3454         REGRESSION (r229831): CMD-clicking an iCloud web app link unexpectedly opens that link in a new tab and the current tab
3455         https://bugs.webkit.org/show_bug.cgi?id=184678
3456         <rdar://problem/39422122>
3457
3458         Reviewed by Alex Christensen.
3459
3460         Add new parameter to dispatchDecidePolicyForNavigationAction.
3461
3462         * WebCoreSupport/WebFrameLoaderClient.h:
3463         * WebCoreSupport/WebFrameLoaderClient.mm:
3464         (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
3465
3466 2018-04-13  Chris Dumez  <cdumez@apple.com>
3467
3468         Split WindowProxy handling out of ScriptController and into a new class owned by AbstractFrame
3469         https://bugs.webkit.org/show_bug.cgi?id=184591
3470
3471         Reviewed by Sam Weinig.
3472
3473         Split WindowProxy handling out of ScriptController and into a new class owned by AbstractFrame.
3474         RemoteFrames do not need a ScriptController but do need to maintain WindowProxies.
3475         This is work towards fixing Bug 184515.
3476
3477         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3478         (WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
3479         * WebView/WebFrame.mm:
3480         (-[WebFrame _attachScriptDebugger]):
3481
3482 2018-04-12  Antoine Quint  <graouts@apple.com>
3483
3484         [Web Animations] Turn CSS Animations and CSS Transitions as Web Animations on by default
3485         https://bugs.webkit.org/show_bug.cgi?id=184569
3486         <rdar://problem/38671301>
3487
3488         Reviewed by Jon Lee.
3489
3490         * WebView/WebPreferences.mm:
3491
3492 2018-04-05  Yusuke Suzuki  <utatane.tea@gmail.com>
3493
3494         [WTF] Remove StaticLock
3495         https://bugs.webkit.org/show_bug.cgi?id=184332
3496
3497         Reviewed by Mark Lam.
3498
3499         * DOM/DOMInternal.mm:
3500         (getDOMWrapper):
3501         (addDOMWrapper):
3502         (removeDOMWrapper):
3503
3504 2018-04-04  Brent Fulgham  <bfulgham@apple.com>
3505
3506         Failures from mach port reference handling should be fatal
3507         https://bugs.webkit.org/show_bug.cgi?id=184202
3508         <rdar://problem/37771114>
3509
3510         Reviewed by Anders Carlsson.
3511
3512         * Plugins/Hosted/NetscapePluginHostManager.mm:
3513         (WebKit::NetscapePluginHostManager::spawnPluginHost): Adopt new 'safe mach_port_t deallocation' function.
3514
3515 2018-04-03  Andy Estes  <aestes@apple.com>
3516
3517         [Mac] Prioritize file promises over filenames during drag and drop
3518         https://bugs.webkit.org/show_bug.cgi?id=184237
3519         <rdar://problem/38278076>
3520
3521         Reviewed by Wenson Hsieh.
3522
3523         * WebView/WebView.mm:
3524         (-[WebView performDragOperation:]):
3525
3526 2018-04-03  Chris Dumez  <cdumez@apple.com>
3527
3528         Drop MainFrame class
3529         https://bugs.webkit.org/show_bug.cgi?id=184191
3530
3531         Reviewed by Darin Adler.
3532
3533         Drop MainFrame class and move contents into Page / Frame since there is a 1:1
3534         relationship between the Page and the MainFrame.
3535
3536         This is ground work for introducing LocalFrame / RemoteFrame concepts.
3537
3538         * WebCoreSupport/WebDragClient.mm:
3539         * WebCoreSupport/WebFrameLoaderClient.mm:
3540         * WebCoreSupport/WebInspectorClient.mm:
3541         * WebCoreSupport/WebPlatformStrategies.mm:
3542         * WebCoreSupport/WebPluginInfoProvider.mm:
3543         * WebView/WebFrame.mm:
3544         * WebView/WebFrameView.mm:
3545         * WebView/WebHTMLView.mm:
3546         * WebView/WebView.mm:
3547
3548 2018-04-02  Jer Noble  <jer.noble@apple.com>
3549
3550         Enable Legacy EME for all WebKit & WebKitLegacy clients
3551         https://bugs.webkit.org/show_bug.cgi?id=184018
3552         <rdar://problem/34887387>
3553
3554         Reviewed by Eric Carlson.
3555
3556         * WebView/WebPreferences.mm:
3557         (+[WebPreferences initialize]):
3558
3559 2018-03-29  JF Bastien  <jfbastien@apple.com>
3560
3561         Use Forward.h instead of forward-declaring WTF::String
3562         https://bugs.webkit.org/show_bug.cgi?id=184172
3563         <rdar://problem/39026146>
3564
3565         Reviewed by Yusuke Suzuki.
3566
3567         As part of #184164 I'm changing WTF::String, and the forward
3568         declarations are just wrong because I'm making it templated. We
3569         should use Forward.h anyways, so do that instead.
3570
3571         * WebView/WebScriptDebugger.h:
3572
3573 2018-03-28  Brent Fulgham  <bfulgham@apple.com>
3574
3575         Protect against invalid mach ports returned by mach_port_request_notification
3576         https://bugs.webkit.org/show_bug.cgi?id=184106
3577         <rdar://problem/37865316>
3578
3579         Reviewed by Chris Dumez.
3580
3581         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3582         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy): Check return value from 'mach_port_request_notification'
3583         and clean up if it experienced an error.
3584         (WebKit::NetscapePluginHostProxy::processRequests): Drive-by-fix: Include formatted mach error message in logging.
3585
3586 2018-03-28  Brent Fulgham  <bfulgham@apple.com>
3587
3588         Avoid uninitialized mach ports
3589         https://bugs.webkit.org/show_bug.cgi?id=184090
3590         <rdar://problem/37261129>
3591
3592         Reviewed by Chris Dumez.
3593
3594         It is possible for mach_port_allocate to return an error, but we rarely check its return value. The value
3595         of the argument passed to mach_port_allocate is not guaranteed to be valid when it returns an error, so
3596         there is a potential for us to try to use invalid ports.
3597
3598         We should always check return values, and ensure that the mach port variables we seek to initialize are
3599         kept in a valid state.
3600
3601         Reviewed by Chris Dumez.
3602
3603         * Plugins/Hosted/NetscapePluginHostManager.h:
3604         * Plugins/Hosted/NetscapePluginHostManager.mm:
3605         (WebKit::NetscapePluginHostManager::hostForPlugin): Initialize port to a valid state, ASSERT if an invalid
3606         port is passed to an API function.
3607         (WebKit::NetscapePluginHostManager::spawnPluginHost): Ditto.
3608         (WebKit::NetscapePluginHostManager::initializeVendorPort): Ditto.
3609         * Plugins/Hosted/NetscapePluginHostProxy.h:
3610         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3611         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy): Ditto.
3612         (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy): Ditto.
3613         (WebKit::NetscapePluginHostProxy::processRequests): Ditto.
3614         (WKPCStatusText): Ditto.
3615         (WKPCLoadURL): Ditto.
3616         (WKPCCancelLoadURL): Ditto.
3617         (WKPCInvalidateRect): Ditto.
3618         (WKPCGetScriptableNPObjectReply): Ditto.
3619         (WKPCBooleanReply): Ditto.
3620         (WKPCBooleanAndDataReply): Ditto.
3621         (WKPCInstantiatePluginReply): Ditto.
3622         (WKPCGetWindowNPObject): Ditto.
3623         (WKPCGetPluginElementNPObject): Ditto.
3624         (WKPCForgetBrowserObject): Ditto.
3625         (WKPCEvaluate): Ditto.
3626         (WKPCGetStringIdentifier): Ditto.
3627         (WKPCGetIntIdentifier): Ditto.
3628         (WKPCInvoke): Ditto.
3629         (WKPCInvokeDefault): Ditto.
3630         (WKPCConstruct): Ditto.
3631         (WKPCGetProperty): Ditto.
3632         (WKPCSetProperty): Ditto.
3633         (WKPCRemoveProperty): Ditto.
3634         (WKPCHasProperty): Ditto.
3635         (WKPCHasMethod): Ditto.
3636         (WKPCIdentifierInfo): Ditto.
3637         (WKPCEnumerate): Ditto.
3638         (WKPCSetMenuBarVisible): Ditto.
3639         (WKPCSetFullscreenWindowIsShowing): Ditto.
3640         (WKPCSetModal): Ditto.
3641         (WKPCGetCookies): Ditto.
3642         (WKPCGetProxy): Ditto.
3643         (WKPCSetCookies): Ditto.
3644         (WKPCGetAuthenticationInfo): Ditto.
3645         (WKPCConvertPoint): Ditto.
3646         (WKPCLayerHostingModeChanged): Ditto.
3647         (WKPCSetException): Ditto.
3648
3649 2018-03-26  Tim Horton  <timothy_horton@apple.com>
3650
3651         Adopt WK_ALTERNATE_FRAMEWORKS_DIR in WebKit
3652         https://bugs.webkit.org/show_bug.cgi?id=184030
3653         <rdar://problem/38895281>
3654
3655         Reviewed by Dan Bernstein.
3656
3657         * Configurations/Base.xcconfig:
3658
3659 2018-03-26  Chris Dumez  <cdumez@apple.com>
3660
3661         Use SecurityOriginData more consistently in Service Worker code
3662         https://bugs.webkit.org/show_bug.cgi?id=183969
3663
3664         Reviewed by Darin Adler.
3665
3666         Use SecurityOrigin::data() instead of SecurityOriginData::fromSecurityOrigin().
3667
3668         * Storage/WebDatabaseManager.mm:
3669         (-[WebDatabaseManager databasesWithOrigin:]):
3670         (-[WebDatabaseManager deleteOrigin:]):
3671         (-[WebDatabaseManager deleteDatabase:withOrigin:]):
3672         * Storage/WebDatabaseQuotaManager.mm:
3673         (-[WebDatabaseQuotaManager usage]):
3674         (-[WebDatabaseQuotaManager quota]):
3675         (-[WebDatabaseQuotaManager setQuota:]):
3676         * Storage/WebStorageManager.mm:
3677         (-[WebStorageManager deleteOrigin:]):
3678         * WebCoreSupport/WebSecurityOrigin.mm:
3679         (-[WebSecurityOrigin databaseIdentifier]):
3680         (-[WebSecurityOrigin usage]):
3681         (-[WebSecurityOrigin quota]):
3682         (-[WebSecurityOrigin setQuota:]):
3683
3684 2018-03-26  Brent Fulgham  <bfulgham@apple.com>
3685
3686         Warn against cookie access in the WebContent process using ProcessPrivilege assertions
3687         https://bugs.webkit.org/show_bug.cgi?id=183911
3688         <rdar://problem/38762306>
3689
3690         Reviewed by Youenn Fablet.
3691
3692         Initialize the ProcessPrivilege and Cookie API access levels for single-process use.
3693
3694         * WebView/WebView.mm:
3695         (+[WebView initialize]):
3696
3697 2018-03-26  Alex Christensen  <achristensen@webkit.org>
3698
3699         Merge ResourceHandleClient::willCacheResponseAsync with ResourceHandleClient::willCacheResponse
3700         https://bugs.webkit.org/show_bug.cgi?id=183965
3701
3702         Reviewed by Chris Dumez.
3703
3704         * WebCoreSupport/WebFrameLoaderClient.h:
3705         * WebCoreSupport/WebFrameLoaderClient.mm:
3706         (WebFrameLoaderClient::willCacheResponse const):
3707
3708 2018-03-25  Commit Queue  <commit-queue@webkit.org>
3709
3710         Unreviewed, rolling out r229954.
3711         https://bugs.webkit.org/show_bug.cgi?id=184000
3712
3713         Caused many layout tests to crash on Apple High Sierra,
3714         Sierra, iOS Simulator and GTK Linux Debug test bots (Requested
3715         by dydz on #webkit).
3716
3717         Reverted changeset:
3718
3719         "Use SecurityOriginData more consistently in Service Worker
3720         code"
3721         https://bugs.webkit.org/show_bug.cgi?id=183969
3722         https://trac.webkit.org/changeset/229954
3723
3724 2018-03-24  Chris Dumez  <cdumez@apple.com>
3725
3726         Use SecurityOriginData more consistently in Service Worker code
3727         https://bugs.webkit.org/show_bug.cgi?id=183969
3728
3729         Reviewed by Darin Adler.
3730
3731         Use SecurityOrigin::data() instead of SecurityOriginData::fromSecurityOrigin().
3732
3733         * Storage/WebDatabaseManager.mm:
3734         (-[WebDatabaseManager databasesWithOrigin:]):
3735         (-[WebDatabaseManager deleteOrigin:]):
3736         (-[WebDatabaseManager deleteDatabase:withOrigin:]):
3737         * Storage/WebDatabaseQuotaManager.mm:
3738         (-[WebDatabaseQuotaManager usage]):
3739         (-[WebDatabaseQuotaManager quota]):
3740         (-[WebDatabaseQuotaManager setQuota:]):
3741         * Storage/WebStorageManager.mm:
3742         (-[WebStorageManager deleteOrigin:]):
3743         * WebCoreSupport/WebSecurityOrigin.mm:
3744         (-[WebSecurityOrigin databaseIdentifier]):
3745         (-[WebSecurityOrigin usage]):
3746         (-[WebSecurityOrigin quota]):
3747         (-[WebSecurityOrigin setQuota:]):
3748
3749 2018-03-24  Timothy Horton  <timothy_horton@apple.com>
3750
3751         Fix the build
3752
3753         * WebView/WebView.mm:
3754
3755 2018-03-23  Tim Horton  <timothy_horton@apple.com>
3756
3757         Fix the build with no pasteboard
3758         https://bugs.webkit.org/show_bug.cgi?id=183973
3759
3760         Reviewed by Dan Bernstein.
3761
3762         * Configurations/FeatureDefines.xcconfig:
3763         * WebView/WebView.mm:
3764         (-[WebView _requestStartDataInteraction:globalPosition:]):
3765         (-[WebView _getDataInteractionData]):
3766         (-[WebView _dataOperationTextIndicator]):
3767         (-[WebView _dragSourceAction]):
3768         (-[WebView _draggedLinkTitle]):
3769         (-[WebView _draggedLinkURL]):
3770         (-[WebView _draggedElementBounds]):
3771         (-[WebView _enteredDataInteraction:client:global:operation:]):
3772         (-[WebView _updatedDataInteraction:client:global:operation:]):
3773         (-[WebView _exitedDataInteraction:client:global:operation:]):
3774         (-[WebView _performDataInteraction:client:global:operation:]):
3775         (-[WebView _tryToPerformDataInteraction:client:global:operation:]):
3776         (-[WebView _endedDataInteraction:global:]):
3777         (-[WebView _dataInteractionCaretRect]):
3778         * WebView/WebViewPrivate.h:
3779
3780 2018-03-23  Tim Horton  <timothy_horton@apple.com>
3781
3782         Adopt WK_ALTERNATE_FRAMEWORKS_DIR in WebKitLegacy and update install name
3783         https://bugs.webkit.org/show_bug.cgi?id=183960
3784         <rdar://problem/38812356>
3785
3786         Reviewed by Dan Bernstein.
3787
3788         * Configurations/WebKitLegacy.xcconfig:
3789
3790 2018-03-23  Tim Horton  <timothy_horton@apple.com>
3791
3792         Introduce and adopt HAVE(AUDIO_TOOLBOX_AUDIO_SESSION)
3793         https://bugs.webkit.org/show_bug.cgi?id=183954
3794         <rdar://problem/38808858>
3795
3796         Reviewed by Dan Bernstein.
3797
3798         * WebView/WebPreferences.mm:
3799         (-[WebPreferences setAudioSessionCategoryOverride:]):
3800
3801 2018-03-23  Tim Horton  <timothy_horton@apple.com>
3802
3803         Adopt WK_PLATFORM_NAME in WebKitLegacy
3804         https://bugs.webkit.org/show_bug.cgi?id=183948
3805         <rdar://problem/38803908>
3806
3807         Reviewed by Dan Bernstein.
3808
3809         * Configurations/WebKitLegacy.xcconfig:
3810         * MigrateHeaders.make:
3811         * postprocess-headers.sh:
3812
3813 2018-03-23  Brady Eidson  <beidson@apple.com>
3814
3815         Go to back/forward list items after a process-swapped navigation.
3816         <rdar://problem/38690544> and https://bugs.webkit.org/show_bug.cgi?id=183920
3817
3818         Reviewed by Andy Estes.
3819
3820         * WebView/WebView.mm:
3821         (-[WebView _loadBackForwardListFromOtherView:]):
3822         (-[WebView goToBackForwardItem:]):
3823
3824 2018-03-22  Tim Horton  <timothy_horton@apple.com>
3825
3826         Improve readability of WebCore's OTHER_LDFLAGS
3827         https://bugs.webkit.org/show_bug.cgi?id=183909
3828         <rdar://problem/38760992>
3829
3830         Reviewed by Dan Bernstein.
3831
3832         * Configurations/Base.xcconfig:
3833         * Configurations/FeatureDefines.xcconfig:
3834
3835 2018-03-20  Tim Horton  <timothy_horton@apple.com>
3836
3837         Enable the minimal simulator feature flag when appropriate
3838         https://bugs.webkit.org/show_bug.cgi?id=183807
3839
3840         Reviewed by Dan Bernstein.
3841
3842         * Configurations/FeatureDefines.xcconfig:
3843
3844 2018-03-20  Tim Horton  <timothy_horton@apple.com>
3845
3846         Add and adopt WK_PLATFORM_NAME and adjust default feature defines
3847         https://bugs.webkit.org/show_bug.cgi?id=183758
3848         <rdar://problem/38017644>
3849
3850         Reviewed by Dan Bernstein.
3851
3852         * Configurations/FeatureDefines.xcconfig:
3853
3854 2018-03-19  Megan Gardner  <megan_gardner@apple.com>
3855
3856         Clear style colors when setting default appearance
3857         https://bugs.webkit.org/show_bug.cgi?id=183759
3858
3859         Reviewed by Tim Horton.
3860
3861         Colors are cached and need to be cleared and recalculated.
3862         Refactor to do all style recalcs together.
3863
3864         * WebView/WebView.mm:
3865         (-[WebView _setDefaultAppearanceAndClearStyle]):
3866         (-[WebView _setUseSystemAppearance:]):
3867         (-[WebView effectiveAppearanceDidChange]):
3868
3869 2018-03-19  Jiewen Tan  <jiewen_tan@apple.com>
3870
3871         Unreviewed, another quick fix for r229699
3872
3873         Restricts ENABLE_WEB_AUTHN to only macOS and iOS.
3874
3875         * Configurations/FeatureDefines.xcconfig:
3876
3877 2018-03-16  Megan Gardner  <megan_gardner@apple.com>
3878
3879         Ensure that style is updated when the effective appearance changes
3880         https://bugs.webkit.org/show_bug.cgi?id=183690
3881         <rdar://problem/38385900>
3882
3883         Reviewed by Tim Horton and Wenson Hsieh.
3884
3885         Respond to and respect the effective appearance changing.
3886
3887         * WebView/WebView.mm:
3888         (-[WebView _setUseSystemAppearance:]):
3889         (-[WebView effectiveAppearanceDidChange]):
3890
3891 2018-03-15  Megan Gardner  <megan_gardner@apple.com>
3892
3893         Create MediaQueryParserContext to provide additional context for the evaluation of media queries
3894         https://bugs.webkit.org/show_bug.cgi?id=183677
3895
3896         Reviewed by Tim Horton.
3897
3898         We need additional context for parsing media queries to make sure they are parsed correctly and valid.
3899
3900         * DOM/DOM.mm:
3901         (-[DOMHTMLLinkElement _mediaQueryMatches]):
3902
3903 2018-03-14  Tim Horton  <timothy_horton@apple.com>
3904
3905         Fix the build after r229567
3906
3907         * Configurations/FeatureDefines.xcconfig:
3908
3909 2018-03-12  Tim Horton  <timothy_horton@apple.com>
3910
3911         Stop using SDK conditionals to control feature definitions
3912         https://bugs.webkit.org/show_bug.cgi?id=183430
3913         <rdar://problem/38251619>
3914
3915         Reviewed by Dan Bernstein.
3916
3917         * Configurations/FeatureDefines.xcconfig:
3918         * Configurations/WebKitTargetConditionals.xcconfig: Renamed.
3919
3920 2018-03-12  Yoav Weiss  <yoav@yoav.ws>
3921
3922         Runtime flag for link prefetch and remove link subresource.
3923         https://bugs.webkit.org/show_bug.cgi?id=183540
3924
3925         Reviewed by Chris Dumez.
3926
3927         Remove the LINK_PREFETCH build time flag.
3928
3929         * Configurations/FeatureDefines.xcconfig:
3930
3931 2018-03-12  Javier Fernandez  <jfernandez@igalia.com>
3932
3933         Remove GridLayout runtime flag
3934         https://bugs.webkit.org/show_bug.cgi?id=183484
3935
3936         Reviewed by Myles C. Maxfield.
3937
3938         The Grid Layout feature has been enabled by default for almost a
3939         year, so I think it's time to remove the runtime flag and the
3940
3941         * WebView/WebPreferenceKeysPrivate.h:
3942         * WebView/WebPreferences.mm:
3943         (+[WebPreferences initialize]):
3944         * WebView/WebPreferencesPrivate.h:
3945         * WebView/WebView.mm:
3946         (-[WebView _preferencesChanged:]):
3947
3948 2018-03-12  Antoine Quint  <graouts@apple.com>
3949
3950         [Web Animations] Implement CSS Animations and CSS Transitions as Web Animations
3951         https://bugs.webkit.org/show_bug.cgi?id=183504
3952         <rdar://problem/38372965>
3953
3954         Reviewed by Dean Jackson and Jon Lee.
3955
3956         Add the missing WebKitLegacy support the cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled flag
3957         which is required for the matching <!-- webkit-test-runner --> flag to work in DumpRenderTree.
3958
3959         * WebView/WebPreferenceKeysPrivate.h:
3960         * WebView/WebPreferences.mm:
3961         (+[WebPreferences initialize]):
3962         (-[WebPreferences setModernMediaControlsEnabled:]):
3963         (-[WebPreferences cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled]):
3964         (-[WebPreferences setCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled:]):
3965         * WebView/WebPreferencesPrivate.h:
3966         * WebView/WebView.mm:
3967         (-[WebView _preferencesChanged:]):
3968
3969 2018-03-10  Megan Gardner  <megan_gardner@apple.com>
3970
3971         Media query for default appearance
3972         https://bugs.webkit.org/show_bug.cgi?id=183539
3973         <rdar://problem/38326388>
3974
3975         Reviewed by Tim Horton.
3976
3977         Write a media query to evaluate appearance.
3978
3979         * WebView/WebView.mm:
3980         (-[WebView _commonInitializationWithFrameName:groupName:]):
3981         (-[WebView _setUseSystemAppearance:]):
3982
3983 2018-03-09  Andy Estes  <aestes@apple.com>
3984
3985         [Mac] WebKit fails to receive file promises when the embedding app is sandboxed
3986         https://bugs.webkit.org/show_bug.cgi?id=183489
3987         <rdar://problem/38267517>
3988
3989         WebKitLegacy calls -[NSFilePromiseReceiver receivePromisedFilesAtDestination:...] with
3990         NSTemporaryDirectory() as the destination for receiving file promise drops. AppKit attempts
3991         to issue a sandbox extension for this directory, but for security reasons App Sandbox
3992         refuses to do so for NSTemporaryDirectory() itself. As a result, AppKit will call our reader
3993         block with a nil error and a valid file URL, but no file will actually exist at that URL.
3994
3995         In order for App Sandbox to grant issuing the sandbox extension needed by AppKit, we need to
3996         use some other destination directory. This patch uses FileSystem::createTemporaryDirectory()
3997         to securely create a unique temporary directory inside NSTemporaryDirectory() for use as the
3998         drop destination.
3999
4000         Reviewed by Wenson Hsieh.
4001
4002         * WebView/WebView.mm:
4003         (-[WebView performDragOperation:]):
4004
4005 2018-03-08  Megan Gardner  <megan_gardner@apple.com>
4006
4007         Allow WebViews to disable system appearance
4008         https://bugs.webkit.org/show_bug.cgi?id=183418
4009         <rdar://problem/36975642>
4010
4011         Reviewed by Tim Horton.
4012
4013         Allow webviews to choose whether or not to follow the default system appearance.
4014
4015         * WebView/WebView.mm:
4016         (-[WebView _setUseSystemAppearance:]):
4017         (-[WebView _useSystemAppearance]):
4018         * WebView/WebViewPrivate.h:
4019
4020 2018-03-08  Youenn Fablet  <youenn@apple.com>
4021
4022         libwebrtc update broke internal builds
4023         https://bugs.webkit.org/show_bug.cgi?id=183454
4024
4025         Reviewed by Eric Carlson.
4026
4027         * Configurations/WebKitLegacy.xcconfig:
4028
4029 2018-03-08  Chris Dumez  <cdumez@apple.com>
4030
4031         Possible null dereference of the page under WebFrameNetworkingContext::storageSession()
4032         https://bugs.webkit.org/show_bug.cgi?id=183455
4033         <rdar://problem/38191749>
4034
4035         Reviewed by Youenn Fablet.
4036
4037         Add a null check for the page as we have evidence from crashes that it can be null.
4038         Other functions in WebFrameNetworkingContext already null check the page as well,
4039         not just the frame so this is consistent.
4040
4041         * WebCoreSuppor