Add MediaCapabilities as an Experimental Feature
[WebKit-https.git] / Source / WebKitLegacy / mac / ChangeLog
1 2018-09-05  Jer Noble  <jer.noble@apple.com>
2
3         Add MediaCapabilities as an Experimental Feature
4         https://bugs.webkit.org/show_bug.cgi?id=189209
5
6         Reviewed by Eric Carlson.
7
8         RuntimeEnabledFeature -> Setting.
9
10         * WebView/WebView.mm:
11         (-[WebView _preferencesChanged:]):
12
13 2018-09-04  Frederic Wang  <fwang@igalia.com>
14
15         Add basic support for ScrollIntoViewOptions
16         https://bugs.webkit.org/show_bug.cgi?id=189258
17
18         Reviewed by Simon Fraser.
19
20         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElementGtk.cpp: Add ScrollIntoViewOptions
21         header so that this file can build despite the new scrollIntoView function.
22
23 2018-09-04  Wenson Hsieh  <wenson_hsieh@apple.com>
24
25         Populate "text/uri-list" with multiple URLs when the pasteboard contains multiple URLs
26         https://bugs.webkit.org/show_bug.cgi?id=188890
27         <rdar://problem/43648605>
28
29         Reviewed by Tim Horton.
30
31         Add some plumbing through pasteboard classes to support `Pasteboard::readAllStrings`. See WebCore ChangeLog for
32         more detail.
33
34         * WebCoreSupport/WebPlatformStrategies.h:
35         * WebCoreSupport/WebPlatformStrategies.mm:
36         (WebPlatformStrategies::allStringsForType):
37
38 2018-09-01  Darin Adler  <darin@apple.com>
39
40         [CFNetwork] Update CFNetwork SPI use to use CFNetworkSPI.h more consistently
41         https://bugs.webkit.org/show_bug.cgi?id=189072
42         Reviewed by Dan Bernstein.
43
44         * Misc/WebDownload.mm: Removed forward declaration of NSURLConnectionDelegateProxy
45         and declarations for NSURLDownload init methods.
46
47         * Misc/WebDownloadInternal.h: Removed.
48
49         * WebCoreSupport/WebFrameLoaderClient.mm: Removed include of WebDownloadInternal.h.
50         (WebFrameLoaderClient::convertMainResourceLoadToDownload): Ignore
51         "-Wdeprecated-declarations" because the method used here is deprecated.
52
53         * WebView/WebView.mm:
54         (-[WebView _downloadURL:]): Ignore "-Wdeprecated-declarations" because the method
55         used here is deprecated.
56
57 2018-08-31  Chris Dumez  <cdumez@apple.com>
58
59         Assertion hit in ~CompletionHandler() from ~WebFrame()
60         https://bugs.webkit.org/show_bug.cgi?id=189199
61         <rdar://problem/42657233>
62
63         Reviewed by Youenn Fablet.
64
65         * WebCoreSupport/WebFrameLoaderClient.h:
66         * WebCoreSupport/WebFrameLoaderClient.mm:
67         (WebFrameLoaderClient::dispatchWillSubmitForm):
68
69 2018-08-31  Antti Koivisto  <antti@apple.com>
70
71         Replace OptionSet |= and -= operators with add() and remove() functions
72         https://bugs.webkit.org/show_bug.cgi?id=189169
73
74         Reviewed by Anders Carlsson.
75
76         * WebView/WebFrame.mm:
77         (-[WebFrame _drawRect:contentsOnly:]):
78         * WebView/WebView.mm:
79         (coreOptions):
80
81 2018-08-31  Frederic Wang  <fwang@igalia.com>
82
83         Bug 182053 - [CSSOM View] Implement standard behavior for scrollingElement
84         https://bugs.webkit.org/show_bug.cgi?id=182053
85
86         Reviewed by Simon Fraser.
87
88         Add developer flag to use standard behavior for scrolling* attributes.
89
90         * WebView/WebPreferenceKeysPrivate.h:
91         * WebView/WebPreferences.mm:
92         (+[WebPreferences initialize]):
93         (-[WebPreferences CSSOMViewScrollingAPIEnabled]):
94         (-[WebPreferences setCSSOMViewScrollingAPIEnabled:]):
95         * WebView/WebPreferencesPrivate.h:
96         * WebView/WebView.mm:
97         (-[WebView _preferencesChanged:]):
98
99 2018-08-29  Olivia Barnett  <obarnett@apple.com>
100
101         Implement the Web Share API
102         https://bugs.webkit.org/show_bug.cgi?id=171100
103         <rdar://problem/31751734>
104
105         Reviewed by Tim Horton.
106
107         * WebCoreSupport/WebChromeClient.h:
108         * WebCoreSupport/WebChromeClient.mm:
109         (WebChromeClient::showShareSheet):
110         Empty declaration of showShareSheet.
111
112 2018-08-29  Youenn Fablet  <youenn@apple.com>
113
114         Remove WebRTC legacy API implementation
115         https://bugs.webkit.org/show_bug.cgi?id=189040
116
117         Reviewed by Eric Carlson.
118
119         * WebView/WebPreferenceKeysPrivate.h:
120         * WebView/WebPreferences.mm:
121         (+[WebPreferences initialize]):
122         (-[WebPreferences webRTCLegacyAPIEnabled]): Deleted.
123         (-[WebPreferences setWebRTCLegacyAPIEnabled:]): Deleted.
124         * WebView/WebPreferencesPrivate.h:
125         * WebView/WebView.mm:
126         (-[WebView _preferencesChanged:]):
127
128 2018-08-28  Wenson Hsieh  <wenson_hsieh@apple.com>
129
130         Work towards: [iOS] Consolidate the implementations of readString, stringForType, and readURL in PlatformPasteboardIOS.mm
131         https://bugs.webkit.org/show_bug.cgi?id=189054
132
133         Reviewed by Andy Estes.
134
135         Remove the pasteboard type argument from readURLFromPasteboard.
136
137         * WebCoreSupport/WebPlatformStrategies.h:
138         * WebCoreSupport/WebPlatformStrategies.mm:
139         (WebPlatformStrategies::readURLFromPasteboard):
140
141 2018-08-27  Keith Rollin  <krollin@apple.com>
142
143         Unreviewed build fix -- disable LTO for production builds
144
145         * Configurations/Base.xcconfig:
146
147 2018-08-27  Aditya Keerthi  <akeerthi@apple.com>
148
149         Consolidate ENABLE_INPUT_TYPE_COLOR and ENABLE_INPUT_TYPE_COLOR_POPOVER
150         https://bugs.webkit.org/show_bug.cgi?id=188931
151
152         Reviewed by Wenson Hsieh.
153
154         * Configurations/FeatureDefines.xcconfig: Removed ENABLE_INPUT_TYPE_COLOR_POPOVER.
155
156 2018-08-27  Keith Rollin  <krollin@apple.com>
157
158         Build system support for LTO
159         https://bugs.webkit.org/show_bug.cgi?id=187785
160         <rdar://problem/42353132>
161
162         Reviewed by Dan Bernstein.
163
164         Update Base.xcconfig and DebugRelease.xcconfig to optionally enable
165         LTO.
166
167         * Configurations/Base.xcconfig:
168         * Configurations/DebugRelease.xcconfig:
169
170 2018-08-24  Ryosuke Niwa  <rniwa@webkit.org>
171
172         Pass in IsComposed flag to Event constructors
173         https://bugs.webkit.org/show_bug.cgi?id=188720
174         <rdar://problem/43580387>
175
176         Reviewed by Simon Fraser.
177
178         * WebView/WebPDFView.mm:
179         (-[WebPDFView PDFViewWillClickOnLink:withURL:]): A trusted click event is composed regardless of
180         whether it's simulated or not.
181
182 2018-08-23  Mark Lam  <mark.lam@apple.com>
183
184         Move vmEntryGlobalObject() to VM from CallFrame.
185         https://bugs.webkit.org/show_bug.cgi?id=188900
186         <rdar://problem/43655753>
187
188         Reviewed by Michael Saboff.
189
190         * WebView/WebScriptDebugger.mm:
191         (WebScriptDebugger::sourceParsed):
192
193 2018-08-23  Andy Estes  <aestes@apple.com>
194
195         [Apple Pay] Introduce Apple Pay JS v4 on iOS 12 and macOS Mojave
196         https://bugs.webkit.org/show_bug.cgi?id=188829
197
198         Reviewed by Tim Horton.
199
200         * Configurations/FeatureDefines.xcconfig:
201
202 2018-08-21  Ryosuke Niwa  <rniwa@webkit.org>
203
204         Replace booleans for modifier keys in UIEventWithKeyState with OptionSet<Modifier>
205         https://bugs.webkit.org/show_bug.cgi?id=188777
206
207         Reviewed by Simon Fraser.
208
209         Create MouseEvent::create with IsSimulated set to Yes; correspoding to the last argument
210         being "true" before the code change.
211
212         Use modifiersForEvent to convert [nsEvent modifierFlags] to OptionSet<Modifier>.
213
214         * WebView/WebPDFView.mm:
215         (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
216
217 2018-08-21  Daniel Bates  <dabates@apple.com>
218
219         Replace TextCheckingTypeMask with OptionSet
220         https://bugs.webkit.org/show_bug.cgi?id=188678
221
222         Reviewed by Antti Koivisto.
223
224         Currently we have code in WebEditorClient::checkTextOfParagraph() that incorrectly assumes
225         that the enumerators of TextCheckingType have a one-to-one correspondence with NSTextCheckingType.
226         (This is not the case because there is not corresponding NSTextCheckingType for TextCheckingTypeShowCorrectionPanel).
227         We now explicitly convert from OptionSet<TextCheckingType> to NSTextCheckingTypes.
228
229         * WebCoreSupport/WebEditorClient.h:
230         * WebCoreSupport/WebEditorClient.mm:
231         (WebEditorClient::checkTextOfParagraph):
232         (WebEditorClient::shouldEraseMarkersAfterChangeSelection const):
233         (core): Fix up code style nits; compare resultType on the right-hand side instead of the
234         left as this is more readable and unncessary now that modern compilers like Clang have
235         diagnostics to catch accidental assignments when equality was intended.
236         (WebEditorClient::didCheckSucceed):
237         * WebView/WebView.mm:
238         (coreTextCheckingType):
239         (textCheckingResultFromNSTextCheckingResult):
240
241 2018-08-21  Daniel Bates  <dabates@apple.com>
242
243         [iOS][WK1] Support toggling continuous spell checking from tests
244         https://bugs.webkit.org/show_bug.cgi?id=188763
245
246         Reviewed by Simon Fraser.
247
248         Move some more code out from under a !PLATFORM(IOS)-guard so as to support toggling continuous
249         spell checking from tests in iOS WebKit Legacy.
250
251         * WebCoreSupport/WebEditorClient.h:
252         (WebEditorClient::toggleContinuousSpellChecking): Deleted.
253         * WebCoreSupport/WebEditorClient.mm:
254         * WebView/WebView.h:
255         * WebView/WebView.mm:
256         (-[WebView toggleContinuousSpellChecking:]):
257         (-[WebView toggleSmartInsertDelete:]):
258
259 2018-08-17  Alex Christensen  <achristensen@webkit.org>
260
261         Add some plumbing for safe browsing
262         https://bugs.webkit.org/show_bug.cgi?id=188709
263
264         Reviewed by Tim Horton.
265
266         * WebCoreSupport/WebFrameLoaderClient.h:
267         * WebCoreSupport/WebFrameLoaderClient.mm:
268         (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
269
270 2018-08-16  Ryosuke Niwa  <rniwa@webkit.org>
271
272         Replace canBubble and cancelable booleans in Event by enum classes
273         https://bugs.webkit.org/show_bug.cgi?id=188692
274
275         Reviewed by Alex Christensen.
276
277         * WebView/WebPDFView.mm:
278         (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
279         * WebView/WebView.mm:
280         (-[WebView _dispatchUnloadEvent]):
281
282 2018-08-16  Jer Noble  <jer.noble@apple.com>
283
284         Add Experimental Feature support for SourceBuffer.changeType()
285         https://bugs.webkit.org/show_bug.cgi?id=188626
286         <rdar://problem/43356021>
287
288         Reviewed by Eric Carlson.
289
290         Add a new WebPreference property mapping to the WebCore SourceBufferChangeTypeEnabled setting.
291
292         * WebView/WebPreferenceKeysPrivate.h:
293         * WebView/WebPreferences.mm:
294         (+[WebPreferences initialize]):
295         (-[WebPreferences sourceBufferChangeTypeEnabled]):
296         (-[WebPreferences setSourceBufferChangeTypeEnabled:]):
297         * WebView/WebPreferencesPrivate.h:
298         * WebView/WebView.mm:
299         (-[WebView _preferencesChanged:]):
300
301 2018-08-16  Aditya Keerthi  <akeerthi@apple.com>
302
303         Support drag-and-drop for input[type=color]
304         https://bugs.webkit.org/show_bug.cgi?id=188464
305
306         Reviewed by Wenson Hsieh.
307
308         * WebCoreSupport/WebPlatformStrategies.h:
309         * WebCoreSupport/WebPlatformStrategies.mm:
310         (WebPlatformStrategies::setColor):
311
312 2018-08-15  Tim Horton  <timothy_horton@apple.com>
313
314         Crashes in Quip under _dictionaryPopupInfoForRange, in setObject:forKey:
315         https://bugs.webkit.org/show_bug.cgi?id=188569
316         <rdar://problem/34201095>
317
318         Reviewed by Megan Gardner.
319
320         * WebView/WebImmediateActionController.mm:
321         (+[WebImmediateActionController _dictionaryPopupInfoForRange:inFrame:withLookupOptions:indicatorOptions:transition:]):
322         Speculative fix; the crashes indicate font is null, but we just checked it,
323         so it must be getting made null by convertFont:toSize:. Check again!
324
325 2018-08-13  Alex Christensen  <achristensen@webkit.org>
326
327         Use a 1-byte enum class for TextDirection
328         https://bugs.webkit.org/show_bug.cgi?id=188350
329
330         Reviewed by Simon Fraser.
331
332         * WebCoreSupport/PopupMenuMac.mm:
333         (PopupMenuMac::populate):
334         (PopupMenuMac::show):
335         * WebCoreSupport/WebFrameLoaderClient.mm:
336         (WebFrameLoaderClient::transitionToCommittedForNewPage):
337         * WebView/WebFrame.mm:
338         (-[WebFrame _dispatchDidReceiveTitle:]):
339
340 2018-08-09  Ali Juma  <ajuma@chromium.org>
341
342         Import WPTs for IntersectionObserver
343         https://bugs.webkit.org/show_bug.cgi?id=188416
344
345         Reviewed by Simon Fraser.
346
347         * WebView/WebPreferencesPrivate.h:
348
349 2018-08-08  Jonathan Bedard  <jbedard@apple.com>
350
351         Follow-up build fix for r234685
352         https://bugs.webkit.org/show_bug.cgi?id=188245
353
354         Unreviewed build fix.
355
356         * WebCoreSupport/WebSecurityOriginPrivate.h:
357
358 2018-08-05  Darin Adler  <darin@apple.com>
359
360         [Cocoa] More tweaks and refactoring to prepare for ARC
361         https://bugs.webkit.org/show_bug.cgi?id=188245
362
363         Reviewed by Dan Bernstein.
364
365         * Carbon/CarbonUtils.m: Updated include for rename: FoundationSPI.h -> objcSPI.h.
366
367         * Carbon/CarbonWindowFrame.m:
368         (-[CarbonWindowFrame dealloc]): Deleted. It was empty.
369
370         * DOM/DOM.mm:
371         (-[DOMElement _imageTIFFRepresentation]): Use a bridging cast.
372         (-[DOMNodeFilter finalize]): Deleted. WebKit no longer supports Objective-C
373         garbage collection so this method isn't useful.
374
375         * DOM/DOMXPath.mm:
376         (-[DOMNativeXPathNSResolver finalize]): Deleted. WebKit no longer supports
377         Objective-C garbage collection so this method isn't useful.
378
379         * History/WebHistory.mm:
380         (-[WebHistoryPrivate data]): Allocate an NSData instead of casting from a CFData.
381
382         * Misc/WebElementDictionary.mm:
383         (addLookupKey): Use a bridging cast.
384         (cacheValueForKey): Ditto.
385         (-[WebElementDictionary _fillCache]): Ditto.
386         (-[WebElementDictionary objectForKey:]): Ditto.
387
388         * Misc/WebKitNSStringExtras.mm:
389         (-[NSString _web_drawAtPoint:font:textColor:]): Use a bridging cast.
390         (-[NSString _web_widthWithFont:]): Ditto.
391         (-[NSString _webkit_stringByTrimmingWhitespace]): Ditto.
392
393         * Misc/WebLocalizableStrings.mm:
394         (WebLocalizedString): Use a bridging cast.
395
396         * Misc/WebNSDataExtras.mm:
397         (-[NSString _web_capitalizeRFC822HeaderFieldName]): Use a bridging cast
398         and use CFBridgingRelease instead of calling autorelease directly.
399         (-[NSData _webkit_parseRFC822HeaderFields]): Use NSString methods instead
400         of a mix of CFString and NSString. Also simplified logic a bit, and cut down
401         on the amount of explicit release and autorelease.
402
403         * Misc/WebNSDictionaryExtras.h: Deleted unused methods.
404         * Misc/WebNSDictionaryExtras.m:
405         (-[NSDictionary _webkit_intForKey:]): Deleted.
406         (-[NSMutableDictionary _webkit_setInt:forKey:]): Deleted.
407         (-[NSMutableDictionary _webkit_setFloat:forKey:]): Deleted.
408         (-[NSMutableDictionary _webkit_setBool:forKey:]): Deleted.
409         (-[NSMutableDictionary _webkit_setLongLong:forKey:]): Deleted.
410         (-[NSMutableDictionary _webkit_setUnsignedLongLong:forKey:]): Deleted.
411         (-[NSMutableDictionary _webkit_setUnsignedInt:forKey:]): Deleted.
412
413         * Misc/WebStringTruncator.mm:
414         (fontFromNSFont): Use a bridging cast.
415
416         * Plugins/Hosted/NetscapePluginHostManager.mm:
417         (WebKit::preferredBundleLocalizationName): Use a bridging cast and CFBridgingRelease.
418
419         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
420         (WebKit::NetscapePluginInstanceProxy::cleanup): Use a bridging cast.
421         (WebKit::NetscapePluginInstanceProxy::status): Ditto.
422         (WebKit::NetscapePluginInstanceProxy::loadURL): Ditto.
423         (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray): Ditto.
424         * Plugins/Hosted/ProxyInstance.mm:
425         (WebKit::ProxyInstance::getPropertyNames): Ditto.
426         * Plugins/WebBasePluginPackage.mm:
427         (-[WebBasePluginPackage _objectForInfoDictionaryKey:]): Ditto.
428         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
429         (WebNetscapePluginEventHandlerCocoa::platformWindow): Ditto.
430         * Plugins/WebNetscapePluginPackage.mm:
431         (-[WebNetscapePluginPackage _initWithPath:]): Ditto.
432
433         * Plugins/WebNetscapePluginView.mm:
434         (-[WebNetscapePluginView _postURL:target:len:buf:file:notifyData:sendNotification:allowHeaders:]):
435         Use bridging casts and use RetainPtr insteead of an explicit CFRelease.
436         (-[WebNetscapePluginView status:]): Use a bridging cast.
437         (-[WebNetscapePluginView popUpContextMenu:]): Ditto.
438
439         * Plugins/WebPluginController.mm:
440         (-[WebPluginController _cancelOutstandingChecks]): Use a bridging cast.
441
442         * Plugins/WebPluginDatabase.mm:
443         (checkCandidate): Use explicit __strong for out argument types.
444
445         * Plugins/npapi.mm:
446         (pluginViewForInstance): Use a bridging cast.
447
448         * Storage/WebDatabaseManager.mm:
449         (-[WebDatabaseManager detailsForDatabase:withOrigin:]): Use modern boxing instead of
450         explicit NSNumber and NSDictionary calls.
451
452         * WebCoreSupport/WebContextMenuClient.mm:
453         (WebContextMenuClient::speak): Remove an unnecessary copy/autorelease pair.
454
455         * WebCoreSupport/WebEditorClient.mm:
456         (WebEditorClient::handleKeyboardEvent): Added a missing typecast.
457         (WebEditorClient::handleInputMethodKeydown): Ditto.
458
459         * WebCoreSupport/WebFrameNetworkingContext.mm:
460         (WebFrameNetworkingContext::sourceApplicationAuditData const): Use a bridging cast.
461
462         * WebCoreSupport/WebSecurityOriginPrivate.h: Forward declare WebSecurityOriginPrivate
463         as a struct rather than an Objective-C class, since that's how it's defined.
464
465         * WebInspector/WebNodeHighlighter.mm: Added missing includes.
466
467         * WebView/WebFullScreenController.mm:
468         (-[WebFullScreenController enterFullScreen:]): Use a bridging cast.
469         * WebView/WebHTMLView.mm:
470         (-[WebHTMLView _writeSelectionWithPasteboardTypes:toPasteboard:cachedAttributedString:]):
471         Ditto.
472         (-[WebHTMLView pasteboard:provideDataForType:]): Ditto.
473
474         * WebView/WebImmediateActionController.mm:
475         (-[WebImmediateActionController performHitTestAtPoint:]): Removed redundant code to
476         go down to the document and then back to the frame.
477         (-[WebImmediateActionController immediateActionRecognizerDidUpdateAnimation:]): Ditto.
478         (-[WebImmediateActionController immediateActionRecognizerDidCancelAnimation:]): Ditto.
479         (-[WebImmediateActionController immediateActionRecognizerDidCompleteAnimation:]): Ditto.
480
481         * WebView/WebJSPDFDoc.mm:
482         (jsPDFDocInitialize): Removed some unneeded type casting.
483         (jsPDFDocFinalize): Ditto.
484         (jsPDFDocPrint): Use a bridging cast.
485
486         * WebView/WebPDFView.mm:
487         (_applicationInfoForMIMEType): Use bridging casts.
488
489         * WebView/WebPreferences.mm:
490         (-[WebPreferences _setIntegerValue:forKey:]): Use boxing and setObject directly
491         instead of methods from WebNSDictionaryExtras.
492         (-[WebPreferences _setUnsignedIntValue:forKey:]): Ditto.
493         (-[WebPreferences _setFloatValue:forKey:]): Ditto.
494         (-[WebPreferences _setBoolValue:forKey:]): Ditto.
495         (-[WebPreferences _setLongLongValue:forKey:]): Ditto.
496         (-[WebPreferences _setUnsignedLongLongValue:forKey:]): Ditto.
497
498         * WebView/WebView.mm:
499         (-[WebView _removeFromAllWebViewsSet]): Use bridging cast.
500         (-[WebView _addToAllWebViewsSet]): Ditto.
501         (+[WebView closeAllWebViews]): Use a modern for loop instead of NSEnumerator.
502         (-[WebView _windowVisibilityChanged:]): Moved this into the internal category
503         so it can be called from WebViewData methods.
504
505         * WebView/WebViewData.mm: Added an import so we can call an internal WebView
506         method, _windowVisibilityChanged:.
507
508         * WebView/WebViewInternal.h: Declared _windowVisibilityChanged: so it can be
509         called from WebViewData methods.
510
511 2018-08-06  Alex Christensen  <achristensen@webkit.org>
512
513         Use enum classes and OptionSets for PaintPhase and PaintBehavior
514         https://bugs.webkit.org/show_bug.cgi?id=188323
515
516         Reviewed by Simon Fraser.
517
518         * WebCoreSupport/WebContextMenuClient.mm:
519         (WebContextMenuClient::imageForCurrentSharingServicePickerItem):
520         * WebView/WebFrame.mm:
521         (-[WebFrame _paintBehaviorForDestinationContext:]):
522         (-[WebFrame _drawRect:contentsOnly:]):
523         * WebView/WebHTMLView.mm:
524         (imageFromRect):
525         (selectionImage):
526
527 2018-08-05  Yusuke Suzuki  <utatane.tea@gmail.com>
528
529         Add support for microtasks in workers
530         https://bugs.webkit.org/show_bug.cgi?id=188246
531
532         Reviewed by Darin Adler.
533
534         Rename JSMainThreadExecState.h to JSExecState.h.
535
536         * DOM/DOMAttr.mm:
537         * DOM/DOMBlob.mm:
538         * DOM/DOMCDATASection.mm:
539         * DOM/DOMCSSCharsetRule.mm:
540         * DOM/DOMCSSFontFaceRule.mm:
541         * DOM/DOMCSSImportRule.mm:
542         * DOM/DOMCSSMediaRule.mm:
543         * DOM/DOMCSSPageRule.mm:
544         * DOM/DOMCSSPrimitiveValue.mm:
545         * DOM/DOMCSSRule.mm:
546         * DOM/DOMCSSRuleList.mm:
547         * DOM/DOMCSSStyleDeclaration.mm:
548         * DOM/DOMCSSStyleRule.mm:
549         * DOM/DOMCSSStyleSheet.mm:
550         * DOM/DOMCSSUnknownRule.mm:
551         * DOM/DOMCSSValue.mm:
552         * DOM/DOMCSSValueList.mm:
553         * DOM/DOMCharacterData.mm:
554         * DOM/DOMComment.mm:
555         * DOM/DOMCounter.mm:
556         * DOM/DOMDocument.mm:
557         * DOM/DOMDocumentFragment.mm:
558         * DOM/DOMDocumentType.mm:
559         * DOM/DOMElement.mm:
560         * DOM/DOMEvent.mm:
561         * DOM/DOMFile.mm:
562         * DOM/DOMFileList.mm:
563         * DOM/DOMHTML.mm:
564         * DOM/DOMHTMLAnchorElement.mm:
565         * DOM/DOMHTMLAppletElement.mm:
566         * DOM/DOMHTMLAreaElement.mm:
567         * DOM/DOMHTMLBRElement.mm:
568         * DOM/DOMHTMLBaseElement.mm:
569         * DOM/DOMHTMLBaseFontElement.mm:
570         * DOM/DOMHTMLBodyElement.mm:
571         * DOM/DOMHTMLButtonElement.mm:
572         * DOM/DOMHTMLCanvasElement.mm:
573         * DOM/DOMHTMLCollection.mm:
574         * DOM/DOMHTMLDListElement.mm:
575         * DOM/DOMHTMLDirectoryElement.mm:
576         * DOM/DOMHTMLDivElement.mm:
577         * DOM/DOMHTMLDocument.mm:
578         * DOM/DOMHTMLElement.mm:
579         * DOM/DOMHTMLEmbedElement.mm:
580         * DOM/DOMHTMLFieldSetElement.mm:
581         * DOM/DOMHTMLFontElement.mm:
582         * DOM/DOMHTMLFormElement.mm:
583         * DOM/DOMHTMLFrameElement.mm:
584         * DOM/DOMHTMLFrameSetElement.mm:
585         * DOM/DOMHTMLHRElement.mm:
586         * DOM/DOMHTMLHeadElement.mm:
587         * DOM/DOMHTMLHeadingElement.mm:
588         * DOM/DOMHTMLHtmlElement.mm:
589         * DOM/DOMHTMLIFrameElement.mm:
590         * DOM/DOMHTMLImageElement.mm:
591         * DOM/DOMHTMLInputElement.mm:
592         * DOM/DOMHTMLLIElement.mm:
593         * DOM/DOMHTMLLabelElement.mm:
594         * DOM/DOMHTMLLegendElement.mm:
595         * DOM/DOMHTMLLinkElement.mm:
596         * DOM/DOMHTMLMapElement.mm:
597         * DOM/DOMHTMLMarqueeElement.mm:
598         * DOM/DOMHTMLMediaElement.mm:
599         * DOM/DOMHTMLMenuElement.mm:
600         * DOM/DOMHTMLMetaElement.mm:
601         * DOM/DOMHTMLModElement.mm:
602         * DOM/DOMHTMLOListElement.mm:
603         * DOM/DOMHTMLObjectElement.mm:
604         * DOM/DOMHTMLOptGroupElement.mm:
605         * DOM/DOMHTMLOptionElement.mm:
606         * DOM/DOMHTMLOptionsCollection.mm:
607         * DOM/DOMHTMLParagraphElement.mm:
608         * DOM/DOMHTMLParamElement.mm:
609         * DOM/DOMHTMLPreElement.mm:
610         * DOM/DOMHTMLQuoteElement.mm:
611         * DOM/DOMHTMLScriptElement.mm:
612         * DOM/DOMHTMLSelectElement.mm:
613         * DOM/DOMHTMLStyleElement.mm:
614         * DOM/DOMHTMLTableCaptionElement.mm:
615         * DOM/DOMHTMLTableCellElement.mm:
616         * DOM/DOMHTMLTableColElement.mm:
617         * DOM/DOMHTMLTableElement.mm:
618         * DOM/DOMHTMLTableRowElement.mm:
619         * DOM/DOMHTMLTableSectionElement.mm:
620         * DOM/DOMHTMLTextAreaElement.mm:
621         * DOM/DOMHTMLTitleElement.mm:
622         * DOM/DOMHTMLUListElement.mm:
623         * DOM/DOMHTMLVideoElement.mm:
624         * DOM/DOMImplementation.mm:
625         * DOM/DOMKeyboardEvent.mm:
626         * DOM/DOMMediaError.mm:
627         * DOM/DOMMediaList.mm:
628         * DOM/DOMMouseEvent.mm:
629         * DOM/DOMMutationEvent.mm:
630         * DOM/DOMNamedNodeMap.mm:
631         * DOM/DOMNode.mm:
632         * DOM/DOMNodeIterator.mm:
633         * DOM/DOMNodeList.mm:
634         * DOM/DOMOverflowEvent.mm:
635         * DOM/DOMProcessingInstruction.mm:
636         * DOM/DOMProgressEvent.mm:
637         * DOM/DOMRGBColor.mm:
638         * DOM/DOMRange.mm:
639         * DOM/DOMRect.mm:
640         * DOM/DOMStyleSheet.mm:
641         * DOM/DOMStyleSheetList.mm:
642         * DOM/DOMText.mm:
643         * DOM/DOMTextEvent.mm:
644         * DOM/DOMTimeRanges.mm:
645         * DOM/DOMTokenList.mm:
646         * DOM/DOMTreeWalker.mm:
647         * DOM/DOMUIEvent.mm:
648         * DOM/DOMWheelEvent.mm:
649         * DOM/DOMXPathExpression.mm:
650         * DOM/DOMXPathResult.mm:
651         * DOM/ObjCEventListener.mm:
652
653 2018-08-03  Alex Christensen  <achristensen@webkit.org>
654
655         Fix spelling of "overridden"
656         https://bugs.webkit.org/show_bug.cgi?id=188315
657
658         Reviewed by Darin Adler.
659
660         * Misc/WebKitVersionChecks.mm:
661         (setWebKitLinkTimeVersion):
662         (WebKitLinkTimeVersion):
663         * Plugins/WebBaseNetscapePluginView.mm:
664         (-[WebBaseNetscapePluginView handleMouseMoved:]):
665         * WebCoreSupport/PopupMenuMac.mm:
666         (PopupMenuMac::populate):
667
668 2018-08-01  Nan Wang  <n_wang@apple.com>
669
670         AX: AOM: Add ARIA IDL Attribute Reflection
671         https://bugs.webkit.org/show_bug.cgi?id=184676
672         <rdar://problem/39476882>
673
674         Reviewed by Chris Fleizach.
675
676         * WebView/WebPreferenceKeysPrivate.h:
677         * WebView/WebPreferences.mm:
678         (+[WebPreferences initialize]):
679         (-[WebPreferences ariaReflectionEnabled]):
680         (-[WebPreferences setAriaReflectionEnabled:]):
681         * WebView/WebPreferencesPrivate.h:
682         * WebView/WebView.mm:
683         (-[WebView _preferencesChanged:]):
684
685 2018-07-30  Simon Fraser  <simon.fraser@apple.com>
686
687         Shrink GraphicsLayerCA
688         https://bugs.webkit.org/show_bug.cgi?id=188141
689
690         Reviewed by Zalan Bujtas.
691
692         Shrink GraphicsLayerCA from 1040 to 880 bytes by:
693         * moving all the clone-related stuff into the lazily-allocated m_layerClones
694         * moving all the animation-related stuff into the lazily-allocated m_animations
695         * making enums be 8-bit
696         * re-ordering data members
697
698         * WebView/WebView.mm:
699         (-[WebView _setMediaLayer:forPluginView:]):
700
701 2018-07-30  Rob Buis  <rbuis@igalia.com>
702
703         Merge PlatformCookieJar functions into NetworkStorageSession
704         https://bugs.webkit.org/show_bug.cgi?id=188137
705
706         Adapt callsites to use NetworkStorageSession instead of CookieJar functions.
707
708         Reviewed by Alex Christensen.
709
710         * WebCoreSupport/WebPlatformStrategies.mm:
711         (WebPlatformStrategies::cookiesForDOM):
712         (WebPlatformStrategies::setCookiesFromDOM):
713         (WebPlatformStrategies::cookiesEnabled):
714         (WebPlatformStrategies::cookieRequestHeaderFieldValue):
715         (WebPlatformStrategies::getRawCookies):
716         (WebPlatformStrategies::deleteCookie):
717         * WebView/WebPreferences.mm:
718         (+[WebPreferences _clearNetworkLoaderSession]):
719
720 2018-07-28  Darin Adler  <darin@apple.com>
721
722         [Cocoa] Update more WebCore Objective-C code to be ARC compatible
723         https://bugs.webkit.org/show_bug.cgi?id=188140
724
725         Reviewed by Sam Weinig.
726
727         * WebView/WebImmediateActionController.mm:
728         (-[WebImmediateActionController _animationControllerForText]): Updated to use the
729         new DictionaryLookup function that returns a tuple instead of using an out argument.
730
731 2018-07-26  Andy VanWagoner  <andy@vanwagoner.family>
732
733         [INTL] Remove INTL sub-feature compile flags
734         https://bugs.webkit.org/show_bug.cgi?id=188081
735
736         Reviewed by Michael Catanzaro.
737
738         * Configurations/FeatureDefines.xcconfig:
739
740 2018-07-26  Commit Queue  <commit-queue@webkit.org>
741
742         Unreviewed, rolling out r234181 and r234189.
743         https://bugs.webkit.org/show_bug.cgi?id=188075
744
745         These are not needed right now (Requested by thorton on
746         #webkit).
747
748         Reverted changesets:
749
750         "Enable Web Content Filtering on watchOS"
751         https://bugs.webkit.org/show_bug.cgi?id=187979
752         https://trac.webkit.org/changeset/234181
753
754         "HAVE(PARENTAL_CONTROLS) should be true on watchOS"
755         https://bugs.webkit.org/show_bug.cgi?id=187985
756         https://trac.webkit.org/changeset/234189
757
758 2018-07-26  Timothy Hatcher  <timothy@apple.com>
759
760         Use the Page's appearance when converting pasteboard attributed strings.
761         https://bugs.webkit.org/show_bug.cgi?id=188067
762         rdar://problem/42632246
763
764         Reviewed by Wenson Hsieh.
765
766         * WebCoreSupport/WebEditorClient.mm:
767         (_WebCreateFragment): Create a LocalDefaultSystemAppearance based on the Page.
768
769 2018-07-25  Chris Dumez  <cdumez@apple.com>
770
771         navigator.userAgent may return outdated value after webView.customUserAgent is set
772         https://bugs.webkit.org/show_bug.cgi?id=188009
773         <rdar://problem/42566456>
774
775         Reviewed by Alex Christensen.
776
777         Let the page know when the user agent changes.
778
779         * WebView/WebView.mm:
780         (-[WebView _preferencesChanged:]):
781         (-[WebView setApplicationNameForUserAgent:]):
782         (-[WebView _invalidateUserAgentCache]):
783         (-[WebView setCustomUserAgent:]):
784         * WebView/WebViewInternal.h:
785
786 2018-07-24  Tim Horton  <timothy_horton@apple.com>
787
788         Enable Web Content Filtering on watchOS
789         https://bugs.webkit.org/show_bug.cgi?id=187979
790         <rdar://problem/42559346>
791
792         Reviewed by Wenson Hsieh.
793
794         * Configurations/FeatureDefines.xcconfig:
795
796 2018-07-20  Ryosuke Niwa  <rniwa@apple.com>
797
798         Picking a color from the color panel for typing attributes needs to inverse transform through color-filter
799         https://bugs.webkit.org/show_bug.cgi?id=187846
800
801         Reviewed by Simon Fraser.
802
803         Invert the filtered font and background colors when using font panels, font pasteboard, and other Objective-C APIs.
804
805         * WebView/WebHTMLView.mm:
806         (-[WebHTMLView _applyStyleToSelection:withUndoAction:]): Share code with _applyEditingStyleToSelection.
807         (-[WebHTMLView _applyEditingStyleToSelection:withUndoAction:]):
808
809 2018-07-11  Dean Jackson  <dino@apple.com>
810
811         Allow removal of white backgrounds
812         https://bugs.webkit.org/show_bug.cgi?id=187574
813         <rdar://problem/41146792>
814
815         Reviewed by Simon Fraser.
816
817         Add a new WebPreference for punching out white backgrounds.
818
819         * WebView/WebPreferenceKeysPrivate.h:
820         * WebView/WebPreferences.mm:
821         (+[WebPreferences initialize]):
822         (-[WebPreferences punchOutWhiteBackgroundsInDarkMode]):
823         (-[WebPreferences setPunchOutWhiteBackgroundsInDarkMode:]):
824         * WebView/WebPreferencesPrivate.h:
825         * WebView/WebView.mm:
826         (-[WebView _preferencesChanged:]):
827
828 2018-07-14  Kocsen Chung  <kocsen_chung@apple.com>
829
830         Ensure WebKit stack is ad-hoc signed
831         https://bugs.webkit.org/show_bug.cgi?id=187667
832
833         Reviewed by Alexey Proskuryakov.
834
835         * Configurations/Base.xcconfig:
836
837 2018-07-11  Aditya Keerthi  <akeerthi@apple.com>
838
839         REGRESSION (231276): Attempting to copy an image fails
840         https://bugs.webkit.org/show_bug.cgi?id=187212
841         <rdar://problem/41540074>
842
843         Reviewed by Ryosuke Niwa.
844
845         Renamed methods to make it clear that one URL and one title are being passed in.
846
847         * WebCoreSupport/WebPlatformStrategies.h:
848         * WebCoreSupport/WebPlatformStrategies.mm:
849         (WebPlatformStrategies::setURL):
850
851 2018-07-10  Ryosuke Niwa  <rniwa@webkit.org>
852
853         Disable cross-origin-window-policy by default
854         https://bugs.webkit.org/show_bug.cgi?id=187509
855
856         Reviewed by Chris Dumez.
857
858         * WebView/WebPreferences.mm:
859         (+[WebPreferences initialize]):
860
861 2018-07-09  Timothy Hatcher  <timothy@apple.com>
862
863         Semantic colors don't update when accessibility Increase Contrast mode is enabled.
864         https://bugs.webkit.org/show_bug.cgi?id=187425
865         rdar://problem/39948240
866
867         Reviewed by Tim Horton.
868
869         * WebView/WebView.mm:
870         (-[WebView _commonInitializationWithFrameName:groupName:]): Removed call to
871         _updateDefaultAppearance, which called setUseDarkAppearance. There is already
872         a call in this method to setUseDarkAppearance.
873         (-[WebView _setUseSystemAppearance:]): Just call the page, not setUseDarkAppearance.
874         (-[WebView viewDidChangeEffectiveAppearance]): Added. This is the proper NSView method to use.
875         (-[WebView _updateDefaultAppearance]): Deleted.
876         (-[WebView effectiveAppearanceDidChange]): Deleted. This method is a deprecated name.
877
878 2018-07-09  Simon Fraser  <simon.fraser@apple.com>
879
880         Shrink various loading-related enums to shrink CachedResource
881         https://bugs.webkit.org/show_bug.cgi?id=187443
882
883         Reviewed by Chris Dumez.
884
885         * WebCoreSupport/WebFrameLoaderClient.mm:
886         (WebFrameLoaderClient::convertMainResourceLoadToDownload):
887         (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
888         (WebFrameLoaderClient::assignIdentifierToInitialRequest):
889         (WebFrameLoaderClient::dispatchWillSendRequest):
890         (WebFrameLoaderClient::dispatchDecidePolicyForResponse):
891         (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
892         (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
893         (WebFrameLoaderClient::updateGlobalHistory):
894         (WebFrameLoaderClient::canHandleRequest const):
895         * WebView/WebDataSource.mm:
896         (-[WebDataSource initialRequest]):
897         (-[WebDataSource request]):
898
899 2018-07-09  Commit Queue  <commit-queue@webkit.org>
900
901         Unreviewed, rolling out r233612.
902         https://bugs.webkit.org/show_bug.cgi?id=187475
903
904         Revision caused the api test LinkColorWithSystemAppearance to
905         fail on all systems. (Requested by Truitt on #webkit).
906
907         Reverted changeset:
908
909         "Semantic colors don't update when accessibility Increase
910         Contrast mode is enabled."
911         https://bugs.webkit.org/show_bug.cgi?id=187425
912         https://trac.webkit.org/changeset/233612
913
914 2018-07-06  Timothy Hatcher  <timothy@apple.com>
915
916         Semantic colors don't update when accessibility Increase Contrast mode is enabled.
917         https://bugs.webkit.org/show_bug.cgi?id=187425
918         rdar://problem/39948240
919
920         Reviewed by Tim Horton.
921
922         * WebView/WebView.mm:
923         (-[WebView _commonInitializationWithFrameName:groupName:]): Removed call to
924         _updateDefaultAppearance, which called setUseDarkAppearance. There is already
925         a call in this method to setUseDarkAppearance.
926         (-[WebView _setUseSystemAppearance:]): Just call the page, not setUseDarkAppearance.
927         (-[WebView viewDidChangeEffectiveAppearance]): Added. This is the proper NSView method to use.
928         (-[WebView _updateDefaultAppearance]): Deleted.
929         (-[WebView effectiveAppearanceDidChange]): Deleted. This method is a deprecated name.
930
931 2018-07-05  Timothy Hatcher  <timothy@apple.com>
932
933         Rename and flip the meaning of defaultAppearance to be useDarkAppearance.
934         https://bugs.webkit.org/show_bug.cgi?id=187369
935         rdar://problem/41870420
936
937         Reviewed by Tim Horton.
938
939         * WebView/WebMediaPlaybackTargetPicker.mm:
940         (WebMediaPlaybackTargetPicker::showPlaybackTargetPicker):
941         * WebView/WebView.mm:
942         (-[WebView _commonInitializationWithFrameName:groupName:]):
943         (-[WebView _effectiveAppearanceIsDark]):
944         (-[WebView _updateDefaultAppearance]):
945         (-[WebView _defaultAppearance]): Deleted.
946
947 2018-07-04  Ryosuke Niwa  <rniwa@webkit.org>
948
949         Youtube video pages crash after a couple of minutes
950         https://bugs.webkit.org/show_bug.cgi?id=187316
951
952         Reviewed by Antti Koivisto.
953
954         * WebView/WebView.mm:
955         (-[WebView _preferencesChanged:]):
956
957 2018-07-04  Tim Horton  <timothy_horton@apple.com>
958
959         Introduce PLATFORM(IOSMAC)
960         https://bugs.webkit.org/show_bug.cgi?id=187315
961
962         Reviewed by Dan Bernstein.
963
964         * Configurations/Base.xcconfig:
965         * Configurations/FeatureDefines.xcconfig:
966
967 2018-06-28  Wenson Hsieh  <wenson_hsieh@apple.com>
968
969         [iOS] DataTransfer.getData always returns the empty string when dropping text
970         https://bugs.webkit.org/show_bug.cgi?id=187130
971         <rdar://problem/41014117>
972
973         Reviewed by Ryosuke Niwa.
974
975         Add plumbing to grab information for each item in the pasteboard. See WebCore ChangeLog for more detail.
976
977         * WebCoreSupport/WebPlatformStrategies.h:
978         * WebCoreSupport/WebPlatformStrategies.mm:
979         (WebPlatformStrategies::allPasteboardItemInfo):
980
981 2018-06-26  Eric Carlson  <eric.carlson@apple.com>
982
983         [Mac] AirPlay picker uses incorrect theme in Dark mode
984         https://bugs.webkit.org/show_bug.cgi?id=187054
985         <rdar://problem/41291093>
986
987         Reviewed by Timothy Hatcher.
988
989         * WebView/WebMediaPlaybackTargetPicker.mm:
990         (WebMediaPlaybackTargetPicker::showPlaybackTargetPicker): Pass page->defaultAppearance().
991
992 2018-06-23  Yusuke Suzuki  <utatane.tea@gmail.com>
993
994         [WTF] Add user-defined literal for ASCIILiteral
995         https://bugs.webkit.org/show_bug.cgi?id=186839
996
997         Reviewed by Darin Adler.
998
999         * DOM/ExceptionHandlers.mm:
1000         (raiseDOMErrorException):
1001         * Plugins/Hosted/ProxyInstance.mm:
1002         (WebKit::ProxyInstance::invokeMethod):
1003         * Storage/WebDatabaseProvider.mm:
1004         (WebDatabaseProvider::indexedDatabaseDirectoryPath):
1005
1006 2018-06-22  Timothy Hatcher  <timothy@apple.com>
1007
1008         Recalc styles every time defaultAppearance changes.
1009         https://bugs.webkit.org/show_bug.cgi?id=186866
1010         rdar://problem/41309805
1011
1012         Reviewed by Tim Horton.
1013
1014         * WebView/WebView.mm:
1015         (-[WebView _updateDefaultAppearance]):
1016         (-[WebView _setUseSystemAppearance:]):
1017         (-[WebView _useSystemAppearance]):
1018
1019 2018-06-20  Darin Adler  <darin@apple.com>
1020
1021         [Cocoa] Use the isDirectory: variants of NSURL methods more to eliminate unnecessary file system activity
1022         https://bugs.webkit.org/show_bug.cgi?id=186875
1023
1024         Reviewed by Anders Carlsson.
1025
1026         * WebView/WebHTMLView.mm:
1027         (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Use isDirectory:NO for the URL of the location
1028         to write te file to.
1029         * WebView/WebPreferences.mm:
1030         (-[WebPreferences userStyleSheetLocation]): Use isDirectory:NO to create a URL for the user style sheet.
1031         * WebView/WebView.mm:
1032         (-[WebView setMainFrameURL:]): Use isDirectory:NO to create a URL for a local webpage to load.
1033
1034 2018-06-12  Darin Adler  <darin@apple.com>
1035
1036         [Cocoa] Make some RetainPtr refinements to get more ready for ARC
1037         https://bugs.webkit.org/show_bug.cgi?id=186526
1038
1039         Reviewed by Anders Carlsson.
1040
1041         * Plugins/Hosted/NetscapePluginHostManager.mm:
1042         (WebKit::preferredBundleLocalizationName): Use bridgingAutorelease.
1043
1044         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1045         (-[WebHostedNetscapePluginView createPluginLayer]): Use move
1046         assignment rather than adoptNS/leakRef.
1047         * Plugins/WebNetscapePluginView.mm:
1048         (-[WebNetscapePluginView createPlugin]): Ditto.
1049
1050         * WebCoreSupport/WebContextMenuClient.mm:
1051         (WebContextMenuClient::contextMenuForEvent): Get rid of unnecessary use of
1052         RetainPtr::autorelease; no need to autorelease just to pass something as a function
1053         argument, so use RetainPtr::get instead.
1054
1055         * WebView/WebHTMLView.mm:
1056         (customMenuFromDefaultItems): Get rid of of unnecessary use of RetainPtr::autorelease.
1057         No need to autorelease the result when the return type is RetainPtr.
1058
1059         * WebView/WebPDFRepresentation.mm:
1060         (-[WebPDFRepresentation convertPostScriptDataSourceToPDF:]): Use bridgingAutorelease.
1061
1062 2018-06-13  Youenn Fablet  <youenn@apple.com>
1063
1064         Supported plugin check should be based on plugin identifier
1065         https://bugs.webkit.org/show_bug.cgi?id=186578
1066         <rdar://problem/40523828>
1067
1068         Reviewed by Darin Adler.
1069
1070         * WebCoreSupport/WebPluginInfoProvider.h:
1071         * WebCoreSupport/WebPluginInfoProvider.mm:
1072         (WebPluginInfoProvider::pluginInfo):
1073         (WebPluginInfoProvider::webVisiblePluginInfo):
1074
1075 2018-06-13  Chris Dumez  <cdumez@apple.com>
1076
1077         PSON: http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-collusion.html ASSERTS with process swap enabled
1078         https://bugs.webkit.org/show_bug.cgi?id=186545
1079
1080         Reviewed by Brady Eidson.
1081
1082         Update client delegate now that parameter type has changed.
1083
1084         * WebCoreSupport/WebFrameLoaderClient.h:
1085         * WebCoreSupport/WebFrameLoaderClient.mm:
1086         (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1087
1088 2018-06-11  Tim Horton  <timothy_horton@apple.com>
1089
1090         Link drag image is inconsistently unreadable in dark mode
1091         https://bugs.webkit.org/show_bug.cgi?id=186472
1092
1093         Reviewed by Timothy Hatcher.
1094
1095         * WebView/WebView.mm:
1096         (-[WebView _defaultAppearance]):
1097         Make defaultAppearance accurate even if useSystemAppearance is false.
1098         Some parts of WebKit (like the link drag image, but also context menus)
1099         want to be able to follow the system appearance regardless of whether
1100         the view or content has opted in.
1101
1102 2018-06-11  Chris Dumez  <cdumez@apple.com>
1103
1104         http/tests/security/cors-post-redirect-307.html fails with PSON enabled
1105         https://bugs.webkit.org/show_bug.cgi?id=186441
1106
1107         Reviewed by Brady Eidson.
1108
1109         Rename existing flag to something a bit more generic, now that it is used for
1110         more things than bypassing the navigation policy check.
1111
1112         * WebView/WebView.mm:
1113         (-[WebView _loadBackForwardListFromOtherView:]):
1114         (-[WebView goToBackForwardItem:]):
1115
1116 2018-06-09  Dan Bernstein  <mitz@apple.com>
1117
1118         [Xcode] Clean up and modernize some build setting definitions
1119         https://bugs.webkit.org/show_bug.cgi?id=186463
1120
1121         Reviewed by Sam Weinig.
1122
1123         * Configurations/Base.xcconfig: Removed definition for macOS 10.11.
1124         * Configurations/DebugRelease.xcconfig: Ditto.
1125         * Configurations/FeatureDefines.xcconfig: Simplified the definitions of ENABLE_APPLE_PAY and
1126           ENABLE_VIDEO_PRESENTATION_MODE now macOS 10.12 is the earliest supported version.
1127         * Configurations/Version.xcconfig: Removed definition for macOS 10.11.
1128         * Configurations/WebKitLegacy.xcconfig: Simplified the definition of WK_PRIVATE_FRAMEWORKS_DIR
1129           now that WK_XCODE_SUPPORTS_TEXT_BASED_STUBS is true for all supported Xcode versions.
1130         * Configurations/WebKitTargetConditionals.xcconfig: Removed definitions for macOS 10.11.
1131
1132 2018-06-08  Darin Adler  <darin@apple.com>
1133
1134         [Cocoa] Remove all uses of NSAutoreleasePool as part of preparation for ARC
1135         https://bugs.webkit.org/show_bug.cgi?id=186436
1136
1137         Reviewed by Anders Carlsson.
1138
1139         * Carbon/CarbonUtils.m: Updated include location of FoundationSPI.h.
1140         (getNSAutoreleasePoolCount): Use objc_autoreleasePoolPush/Pop.
1141         (WebInitForCarbon): Use objc_autoreleasePoolPush/Pop instead of NSAutoreleasePool object.
1142         (PoolCleaner): Ditto.
1143
1144         * History/WebHistory.mm:
1145         (-[WebHistoryPrivate loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]):
1146         Use @autoreleasepool instead of NSAutoreleasePool object. No need to do the "drain pool only
1147         every 50 times"; the -[WebHistory loadFromURL] family of methods were once used by Safari, and
1148         now hardly used if at all.
1149         * WebView/WebView.mm:
1150         (-[WebView rectsForTextMatches]): Ditto.
1151
1152 2018-06-08  Wenson Hsieh  <wenson_hsieh@apple.com>
1153
1154         [WebKit on watchOS] Upstream watchOS source additions to OpenSource (Part 1)
1155         https://bugs.webkit.org/show_bug.cgi?id=186442
1156         <rdar://problem/40879364>
1157
1158         Reviewed by Tim Horton.
1159
1160         * Configurations/FeatureDefines.xcconfig:
1161
1162 2018-06-08  Aditya Keerthi  <akeerthi@apple.com>
1163
1164         [Datalist] Allow TextFieldInputType to show and hide suggestions
1165         https://bugs.webkit.org/show_bug.cgi?id=186151
1166
1167         Reviewed by Tim Horton.
1168
1169         * WebCoreSupport/WebChromeClient.h:
1170         * WebCoreSupport/WebChromeClient.mm:
1171         (WebChromeClient::createDataListSuggestionPicker):
1172
1173 2018-06-07  Chris Dumez  <cdumez@apple.com>
1174
1175         Add base class to get WeakPtrFactory member and avoid some boilerplate code
1176         https://bugs.webkit.org/show_bug.cgi?id=186407
1177
1178         Reviewed by Brent Fulgham.
1179
1180         Add CanMakeWeakPtr base class to get WeakPtrFactory member and its getter, in
1181         order to avoid some boilerplate code in every class needing a WeakPtrFactory.
1182         This also gets rid of old-style createWeakPtr() methods in favor of the newer
1183         makeWeakPtr().
1184
1185         * WebCoreSupport/WebEditorClient.h:
1186         * WebCoreSupport/WebEditorClient.mm:
1187         (WebEditorClient::requestCandidatesForSelection):
1188
1189 2018-06-05  Chris Dumez  <cdumez@apple.com>
1190
1191         Regression(r232082): Websites get loaded inside of Messages App chat transcript
1192         https://bugs.webkit.org/show_bug.cgi?id=186331
1193         <rdar://problem/40735446>
1194
1195         Reviewed by Darin Adler.
1196
1197         r232082 made it so that if the client implements decidePolicyForMIMEType / decidePolicyForNavigationAction
1198         but does not call use / ignore on the listener, then we would do "use" by default.
1199         The intention was to restore pre-AsyncPolicyDelegates behavior and unbreak Box.app. However,
1200         the pre-AsyncPolicyDelegates behavior was only to "use" by default for decidePolicyForMIMEType,
1201         not decidePolicyForNavigationAction. Doing "use" by default for decidePolicyForNavigationAction
1202         is new behavior and it breaks Messages.app. This patch updates r232082 so that we now do call
1203         "use" by default on the listener for decidePolicyForMIMEType and "ignore" by default for other
1204         policy decisions. This should restore pre-AsyncPolicyDelegates behavior. This fixes Messages.app
1205         and Box.app is still working properly.
1206
1207         * WebCoreSupport/WebFrameLoaderClient.h:
1208         * WebCoreSupport/WebFrameLoaderClient.mm:
1209         (WebFrameLoaderClient::dispatchDecidePolicyForResponse):
1210         (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
1211         (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1212         (WebFrameLoaderClient::dispatchWillSubmitForm):
1213         (WebFrameLoaderClient::setUpPolicyListener):
1214         (-[WebFramePolicyListener initWithFrame:policyFunction:defaultPolicy:]):
1215         (-[WebFramePolicyListener initWithFrame:policyFunction:defaultPolicy:appLinkURL:]):
1216         (-[WebFramePolicyListener dealloc]):
1217         (-[WebFramePolicyListener initWithFrame:policyFunction:]): Deleted.
1218         (-[WebFramePolicyListener initWithFrame:policyFunction:appLinkURL:]): Deleted.
1219
1220 2018-06-05  Brent Fulgham  <bfulgham@apple.com>
1221
1222         Adjust compile and runtime flags to match shippable state of features
1223         https://bugs.webkit.org/show_bug.cgi?id=186319
1224         <rdar://problem/40352045>
1225
1226         Reviewed by Maciej Stachowiak, Jon Lee, and others.
1227
1228         * Configurations/DebugRelease.xcconfig: Don't build ENABLE_INPUT_TYPE_COLOR
1229         or ENABLE_INPUT_TYPE_COLOR_POPOVER.
1230         * Configurations/FeatureDefines.xcconfig: Update to match WebKit definition of
1231         WK_RELOCATABLE_FRAMEWORKS so that ENABLE(EXPERIMENTAL_FEATURES) is defined properly for
1232         Cocoa builds.
1233
1234 2018-06-05  Timothy Hatcher  <timothy@apple.com>
1235
1236         Clean up LocalDefaultSystemAppearance and prefers-dark-interface media query
1237
1238         https://bugs.webkit.org/show_bug.cgi?id=186323
1239         rdar://problem/38382252
1240
1241         Reviewed by Tim Horton.
1242
1243         * WebView/WebView.mm:
1244         (-[WebView _defaultAppearance]):
1245
1246 2018-06-05  Brent Fulgham  <bfulgham@apple.com>
1247
1248         Revise DEFAULT_EXPERIMENTAL_FEATURES_ENABLED to work properly on Apple builds
1249         https://bugs.webkit.org/show_bug.cgi?id=186286
1250         <rdar://problem/40782992>
1251
1252         Reviewed by Dan Bernstein.
1253
1254         Use the WK_RELOCATABLE_FRAMEWORKS flag (which is always defined for non-production builds)
1255         to define ENABLE(EXPERIMENTAL_FEATURES) so that we do not need to manually
1256         change this flag when preparing for a production release.
1257
1258         * Configurations/FeatureDefines.xcconfig: Use WK_RELOCATABLE_FRAMEWORKS to determine
1259         whether experimental features should be enabled, and use it to properly define the
1260         feature flag.
1261
1262 2018-06-03  Darin Adler  <darin@apple.com>
1263
1264         Simplify and remove some unused video element code (helpful for ARC-compatibility)
1265         https://bugs.webkit.org/show_bug.cgi?id=186258
1266
1267         Reviewed by Daniel Bates.
1268
1269         * WebView/WebVideoFullscreenController.h: Removed some unneeded includes and
1270         forward declarations. Removed methods that don't need to be public.
1271
1272         * WebView/WebVideoFullscreenController.mm: Added additional includes. Removed
1273         #if COMPILER(CLANG) since that's all we use on Mac. Moved fields into an
1274         unnamed category in here and also replaced the HUDWindowControllerDelegate
1275         with the unnamed category. Removed unused NSWindow category defining the
1276         isOnActiveSpace, which is not called anywhere in this file at this time.
1277         (-[WebVideoFullscreenController setupVideoOverlay:]): Deleted. Moved the code
1278         into setVideoElement.
1279         (-[WebVideoFullscreenController windowDidLoad]): Slightly rearranged the code
1280         and removed unneeded typecast.
1281         (-[WebVideoFullscreenController videoElement]): Updated to not rely on a
1282         using statement at the top of the file.
1283         (-[WebVideoFullscreenController setVideoElement:]): Added a comment about
1284         the many side effects and special considerations that this method that sounds
1285         like a setter has. Updated code to use the new
1286         MediaPlayer::objCAVFoundationAVPlayer function instead of the old
1287         HTMLVideoElement::platformMedia function. Also straightened out the logic a
1288         bit and added some FIXME comments about small problems noticed but not fixed.
1289         (-[WebVideoFullscreenController delegate]): Deleted. Was never called.
1290         (-[WebVideoFullscreenController setDelegate:]): Deleted. Was never called.
1291         (-[WebVideoFullscreenController windowDidExitFullscreen]): Removed unneeded
1292         typecast. Removed call to updatePowerAssertions method.
1293         (-[WebVideoFullscreenController windowDidEnterFullscreen]): Removed call to
1294         updatePowerAssertions method.
1295         (-[WebVideoFullscreenController updatePowerAssertions]): Deleted. This method
1296         set _displaySleepEnabler to nullptr, but nothing was ever setting it to anything
1297         else, so this was dead code that did nothing.
1298         (-[WebVideoFullscreenController rateChanged:]): Removed call to
1299         updatePowerAssertions method.
1300
1301 2018-06-04  Chris Dumez  <cdumez@apple.com>
1302
1303         Rename "Cross-Origin-Options" HTTP header to "Cross-Origin-Window-Policy"
1304         https://bugs.webkit.org/show_bug.cgi?id=186287
1305         <rdar://problem/40783352>
1306
1307         Reviewed by Youenn Fablet.
1308
1309         * WebView/WebPreferenceKeysPrivate.h:
1310         * WebView/WebPreferences.mm:
1311         (+[WebPreferences initialize]):
1312         (-[WebPreferences crossOriginWindowPolicySupportEnabled]):
1313         (-[WebPreferences setCrossOriginWindowPolicySupportEnabled:]):
1314         * WebView/WebPreferencesPrivate.h:
1315         * WebView/WebView.mm:
1316         (-[WebView _preferencesChanged:]):
1317
1318 2018-06-02  Darin Adler  <darin@apple.com>
1319
1320         [Cocoa] Update some code to be more ARC-compatible to prepare for future ARC adoption
1321         https://bugs.webkit.org/show_bug.cgi?id=186227
1322
1323         Reviewed by Dan Bernstein.
1324
1325         * Misc/WebKitErrors.m:
1326         (+[NSError _registerWebKitErrors]): Use @autoreleasepool instead of NSAutoreleasePool.
1327         * Plugins/WebPluginDatabase.mm:
1328         (-[WebPluginDatabase refresh]): Ditto.
1329         * WebCoreSupport/WebChromeClient.mm:
1330         (WebChromeClient::setStatusbarText): Ditto.
1331
1332 2018-06-01  Chris Dumez  <cdumez@apple.com>
1333
1334         REGRESSION (r231456): Colloquy is broken
1335         https://bugs.webkit.org/show_bug.cgi?id=186197
1336         <rdar://problem/40722960>
1337
1338         Reviewed by Timothy Hatcher.
1339
1340         Restore pre-r231456 behavior for Colloquy app so that it works again.
1341
1342         * WebView/WebView.mm:
1343         (-[WebView _needsFrameNameFallbackToIdQuirk]):
1344         (-[WebView _preferencesChanged:]):
1345
1346 2018-05-30  Yusuke Suzuki  <utatane.tea@gmail.com>
1347
1348         [JSC] Pass VM& parameter as much as possible
1349         https://bugs.webkit.org/show_bug.cgi?id=186085
1350
1351         Reviewed by Saam Barati.
1352
1353         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1354         (WebKit::NetscapePluginInstanceProxy::invoke):
1355
1356 2018-05-30  Daniel Bates  <dabates@apple.com>
1357
1358         NavigationAction does not need to hold initiating DOM Event
1359         https://bugs.webkit.org/show_bug.cgi?id=185958
1360         <rdar://problem/40531539>
1361
1362         Reviewed by Simon Fraser.
1363
1364         Write in terms of NavigationAction::{keyStateEventData, mouseEventDataForFirstMouseEvent}().
1365
1366         * WebCoreSupport/WebFrameLoaderClient.mm:
1367         (WebFrameLoaderClient::actionDictionary const):
1368         (findMouseEvent): Deleted.
1369
1370 2018-05-27  Dan Bernstein  <mitz@apple.com>
1371
1372         Reverted the changes made for https://webkit.org/b/186016
1373
1374         They broke the USE(APPLE_INTERNAL_SDK) Sierra build.
1375
1376
1377 2018-05-27  David Kilzer  <ddkilzer@apple.com>
1378
1379         [iOS] Fix warnings about leaks found by clang static analyzer
1380         <https://webkit.org/b/186009>
1381         <rdar://problem/40574267>
1382
1383         Reviewed by Daniel Bates.
1384
1385         * WebView/WebHTMLView.mm:
1386         (-[WebHTMLView doCommandBySelector:]): Fix use of an
1387         uninitialized boolean variable (`eventWasHandled`) that only
1388         happened on iOS.
1389
1390 2018-05-27  Dan Bernstein  <mitz@apple.com>
1391
1392         [Cocoa] Avoid importing directly from subumbrella frameworks
1393         https://bugs.webkit.org/show_bug.cgi?id=186016
1394
1395         Reviewed by Sam Weinig.
1396
1397         * Carbon/CarbonWindowAdapter.h: Import Carbon.h instead of HIToolbox headers.
1398         * Carbon/CarbonWindowAdapter.mm: Ditto.
1399         * Carbon/CarbonWindowFrame.m: Ditto.
1400         * Carbon/HIViewAdapter.h: Ditto.
1401         * Configurations/WebKitLegacy.xcconfig: Removed -iframework options from OTHER_CFLAGS and
1402           OTHER_CPLUSPLUSFLAGS.
1403         * Plugins/WebNetscapePluginEventHandlerCarbon.mm: Import Carbon.h instead of CarbonEvents.h.
1404         * WebView/WebPDFDocumentExtras.mm: Import Quartz.h instead of a PDFKit header.
1405         * WebView/WebPDFView.h: Ditto.
1406
1407 2018-05-27  Sam Weinig  <sam@webkit.org>
1408
1409         Modernize RenderStyleConstants.h - Part 3
1410         https://bugs.webkit.org/show_bug.cgi?id=186015
1411
1412         Reviewed by Yusuke Suzuki.
1413
1414         * WebView/WebView.mm:
1415         (-[WebView updateTextTouchBar]):
1416         Update for new enum name.
1417
1418 2018-05-25  Chris Dumez  <cdumez@apple.com>
1419
1420         Minor ApplicationCacheStorage clean up
1421         https://bugs.webkit.org/show_bug.cgi?id=185984
1422
1423         Reviewed by Youenn Fablet.
1424
1425         * WebCoreSupport/WebApplicationCache.mm:
1426         (+[WebApplicationCache originsWithCache]):
1427
1428 2018-05-25  David Kilzer  <ddkilzer@apple.com>
1429
1430         Fix issues with -dealloc methods found by clang static analyzer
1431         <https://webkit.org/b/185887>
1432
1433         Reviewed by Joseph Pecoraro.
1434
1435         * WebView/WebView.mm:
1436         (-[WebUITextIndicatorData dealloc]):
1437         - Move method implementation from (WebUITextIndicatorInternal)
1438           category to the main category since this is public API.  This
1439           fixes the false positive warning about a missing -dealloc
1440           method.
1441
1442 2018-05-24  Sam Weinig  <sam@webkit.org>
1443
1444         Modernize RenderStyleConstants.h - Part 2
1445         https://bugs.webkit.org/show_bug.cgi?id=185901
1446
1447         Reviewed by Simon Fraser.
1448
1449         * WebView/WebHTMLRepresentation.mm:
1450         (searchForLabelsBeforeElement):
1451         * WebView/WebView.mm:
1452         (nsTextAlignmentFromRenderStyle):
1453         Update for new enum names.
1454
1455 2018-05-22  Chris Dumez  <cdumez@apple.com>
1456
1457         Regression(AsyncPolicyDelegates): Box.app login Window is blank
1458         https://bugs.webkit.org/show_bug.cgi?id=185832
1459         <rdar://problem/40307871>
1460
1461         Reviewed by Geoffrey Garen.
1462
1463         We used to have a bug where where we would fail to wait for the policy decision for
1464         the navigation response from the client and the load would keep going, racing with
1465         the client's policy decision. If the client did not respond in time, the behavior
1466         would be the same as "Use" policy action.
1467
1468         Box.app fails to make any policy decision in its decidePolicyForMIMEType delegate
1469         but the load happened to proceed anyway due to our bug. Now that we've fixed the
1470         WebKit bug, however, the load would hang because the completion handler for the
1471         decidePolicyForNavigationResponse would never get called.
1472
1473         To work around the issue, I made the policy listener weak on the WebFrameLoaderClient
1474         instead of retaining it. If the policy listener object gets destroyed because getting
1475         resolved, we now use "Use" policy action in its dealloc function to maintain previous
1476         behavior.
1477
1478         * WebCoreSupport/WebFrameLoaderClient.h:
1479         * WebCoreSupport/WebFrameLoaderClient.mm:
1480         (WebFrameLoaderClient::cancelPolicyCheck):
1481         (WebFrameLoaderClient::setUpPolicyListener):
1482         (-[WebFramePolicyListener dealloc]):
1483
1484 2018-05-22  Ryan Haddad  <ryanhaddad@apple.com>
1485
1486         Unreviewed, rolling out r232052.
1487
1488         Breaks internal builds.
1489
1490         Reverted changeset:
1491
1492         "Use more C++17"
1493         https://bugs.webkit.org/show_bug.cgi?id=185176
1494         https://trac.webkit.org/changeset/232052
1495
1496 2018-05-21  Yusuke Suzuki  <utatane.tea@gmail.com>
1497
1498         Use more C++17
1499         https://bugs.webkit.org/show_bug.cgi?id=185176
1500
1501         Reviewed by JF Bastien.
1502
1503         * Configurations/Base.xcconfig:
1504         * Configurations/WebKitLegacy.xcconfig:
1505
1506 2018-05-21  Chris Nardi  <cnardi@chromium.org>
1507
1508         Remove dead exception in MediaList.appendMedium
1509         https://bugs.webkit.org/show_bug.cgi?id=185278
1510
1511         Reviewed by Chris Dumez.
1512
1513         Remove code pertaining to an exception being thrown by appendMedium().
1514
1515         * DOM/DOMMediaList.mm:
1516         (-[DOMMediaList appendMedium:]):
1517
1518 2018-05-21  Jer Noble  <jer.noble@apple.com>
1519
1520         Complete fix for enabling modern EME by default
1521         https://bugs.webkit.org/show_bug.cgi?id=185770
1522         <rdar://problem/40368220>
1523
1524         Reviewed by Eric Carlson.
1525
1526         * Configurations/FeatureDefines.xcconfig:
1527
1528 2018-05-21  Antti Koivisto  <antti@apple.com>
1529
1530         WebView._preferencesChanged should apply colorFilterEnabled preference before parsing user stylesheet
1531         https://bugs.webkit.org/show_bug.cgi?id=185815
1532         <rdar://problem/40310069>
1533
1534         Reviewed by Simon Fraser.
1535
1536         User stylesheet parsing may depend on the colorFilterEnabled preference.
1537
1538         * WebView/WebView.mm:
1539         (-[WebView _preferencesChanged:]):
1540
1541 2018-05-18  Commit Queue  <commit-queue@webkit.org>
1542
1543         Unreviewed, rolling out r231982.
1544         https://bugs.webkit.org/show_bug.cgi?id=185793
1545
1546         Caused layout test failures (Requested by realdawei on
1547         #webkit).
1548
1549         Reverted changeset:
1550
1551         "Complete fix for enabling modern EME by default"
1552         https://bugs.webkit.org/show_bug.cgi?id=185770
1553         https://trac.webkit.org/changeset/231982
1554
1555 2018-05-18  Jer Noble  <jer.noble@apple.com>
1556
1557         Complete fix for enabling modern EME by default
1558         https://bugs.webkit.org/show_bug.cgi?id=185770
1559         <rdar://problem/40368220>
1560
1561         Reviewed by Eric Carlson.
1562
1563         * Configurations/FeatureDefines.xcconfig:
1564
1565 2018-05-18  Chris Dumez  <cdumez@apple.com>
1566
1567         Avoid keeping the frame alive when ref'ing a WindowProxy
1568         https://bugs.webkit.org/show_bug.cgi?id=185737
1569         <rdar://problem/40004666>
1570
1571         Reviewed by Sam Weinig.
1572
1573         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1574         (WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
1575
1576 2018-05-16  Andy VanWagoner  <andy@vanwagoner.family>
1577
1578         Add support for Intl NumberFormat formatToParts
1579         https://bugs.webkit.org/show_bug.cgi?id=185375
1580
1581         Reviewed by Yusuke Suzuki.
1582
1583         Add flag for NumberFormat formatToParts.
1584
1585         * Configurations/FeatureDefines.xcconfig:
1586
1587 2018-05-16  Chris Nardi  <cnardi@chromium.org>
1588
1589         Fixup after r231849: Do not mark Mac API methods as deprecated
1590         https://bugs.webkit.org/show_bug.cgi?id=185684
1591
1592         Reviewed by Darin Adler.
1593
1594         Do not mark API methods for Document#selectedStylesheetSet/preferredStylesheetSet as deprecated
1595         as the entire class is already marked as deprecated, so it is unnecessary.
1596
1597         * DOM/DOMDocument.h:
1598
1599 2018-05-16  Chris Nardi  <cnardi@chromium.org>
1600
1601         Remove Document#selectedStylesheetSet/preferredStylesheetSet
1602         https://bugs.webkit.org/show_bug.cgi?id=185381
1603
1604         Reviewed by Darin Adler.
1605
1606         Mark API methods for Document#selectedStylesheetSet/preferredStylesheetSet as deprecated
1607         and make them do nothing.
1608
1609         * DOM/DOMDocument.h:
1610         * DOM/DOMDocument.mm:
1611         (-[DOMDocument preferredStylesheetSet]):
1612         (-[DOMDocument selectedStylesheetSet]):
1613         (-[DOMDocument setSelectedStylesheetSet:]):
1614
1615 2018-05-15  Antoine Quint  <graouts@apple.com>
1616
1617         [Web Animations] Expose Web Animations CSS integration as an experimental feature
1618         https://bugs.webkit.org/show_bug.cgi?id=185647
1619
1620         Reviewed by Dean Jackson.
1621
1622         Rename the Web Animations CSS integration flag.
1623
1624         * WebView/WebPreferenceKeysPrivate.h:
1625         * WebView/WebPreferences.mm:
1626         (+[WebPreferences initialize]):
1627         (-[WebPreferences webAnimationsCSSIntegrationEnabled]):
1628         (-[WebPreferences setWebAnimationsCSSIntegrationEnabled:]):
1629         (-[WebPreferences cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled]): Deleted.
1630         (-[WebPreferences setCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled:]): Deleted.
1631         * WebView/WebPreferencesPrivate.h:
1632         * WebView/WebView.mm:
1633         (-[WebView _preferencesChanged:]):
1634
1635 2018-05-14  Daniel Bates  <dabates@apple.com>
1636
1637         Fix the Apple Internal build
1638
1639         See <rdar://problem/40237873> for more details.
1640
1641         * WebView/WebFullScreenController.mm:
1642         (-[WebFullScreenController enterFullScreen:]):
1643         (-[WebFullScreenController finishedEnterFullScreenAnimation:]):
1644         (-[WebFullScreenController exitFullScreen]):
1645         (-[WebFullScreenController finishedExitFullScreenAnimation:]):
1646         (-[WebFullScreenController _startEnterFullScreenAnimationWithDuration:]):
1647         (-[WebFullScreenController _startExitFullScreenAnimationWithDuration:]):
1648
1649 2018-05-11  Timothy Hatcher  <timothy@apple.com>
1650
1651         WebHTMLView is not setting aside subviews when drawing.
1652
1653         https://bugs.webkit.org/show_bug.cgi?id=185561
1654         rdar://problem/40172894
1655
1656         Reviewed by Simon Fraser.
1657
1658         Use the new method signature for _recursive:displayRectIgnoringOpacity:shouldChangeFontReferenceColor:.
1659
1660         * WebView/WebHTMLView.mm:
1661         (-[WebHTMLView _recursive:displayRectIgnoringOpacity:inContext:shouldChangeFontReferenceColor:stopAtLayerBackedViews:]): Added.
1662
1663 2018-05-07  Daniel Bates  <dabates@apple.com>
1664
1665         Substitute CrossOriginPreflightResultCache::clear() for CrossOriginPreflightResultCache::empty()
1666         https://bugs.webkit.org/show_bug.cgi?id=185170
1667
1668         Reviewed by Per Arne Vollan.
1669
1670         * Misc/WebCache.mm:
1671         (+[WebCache empty]):
1672
1673 2018-05-04  Timothy Hatcher  <timothy@apple.com>
1674
1675         Deprecate legacy WebView and friends
1676         https://bugs.webkit.org/show_bug.cgi?id=185279
1677         rdar://problem/33268700
1678
1679         Reviewed by Tim Horton.
1680
1681         Added deprecation macros to all the classes, extern strings, and enums.
1682
1683         * Configurations/WebKitLegacy.xcconfig:
1684         Added BUILDING_WEBKIT define to disable the deprecation macros.
1685         * DOM/DOMAbstractView.h:
1686         * DOM/DOMAttr.h:
1687         * DOM/DOMBlob.h:
1688         * DOM/DOMCDATASection.h:
1689         * DOM/DOMCSSCharsetRule.h:
1690         * DOM/DOMCSSFontFaceRule.h:
1691         * DOM/DOMCSSImportRule.h:
1692         * DOM/DOMCSSMediaRule.h:
1693         * DOM/DOMCSSPageRule.h:
1694         * DOM/DOMCSSPrimitiveValue.h:
1695         * DOM/DOMCSSRule.h:
1696         * DOM/DOMCSSRuleList.h:
1697         * DOM/DOMCSSStyleDeclaration.h:
1698         * DOM/DOMCSSStyleRule.h:
1699         * DOM/DOMCSSStyleSheet.h:
1700         * DOM/DOMCSSUnknownRule.h:
1701         * DOM/DOMCSSValue.h:
1702         * DOM/DOMCSSValueList.h:
1703         * DOM/DOMCharacterData.h:
1704         * DOM/DOMComment.h:
1705         * DOM/DOMCounter.h:
1706         * DOM/DOMDocument.h:
1707         * DOM/DOMDocumentFragment.h:
1708         * DOM/DOMDocumentType.h:
1709         * DOM/DOMElement.h:
1710         * DOM/DOMEntity.h:
1711         * DOM/DOMEntityReference.h:
1712         * DOM/DOMEvent.h:
1713         * DOM/DOMEventException.h:
1714         * DOM/DOMEventListener.h:
1715         * DOM/DOMEventTarget.h:
1716         * DOM/DOMException.h:
1717         * DOM/DOMFile.h:
1718         * DOM/DOMFileList.h:
1719         * DOM/DOMHTMLAnchorElement.h:
1720         * DOM/DOMHTMLAppletElement.h:
1721         * DOM/DOMHTMLAreaElement.h:
1722         * DOM/DOMHTMLBRElement.h:
1723         * DOM/DOMHTMLBaseElement.h:
1724         * DOM/DOMHTMLBaseFontElement.h:
1725         * DOM/DOMHTMLBodyElement.h:
1726         * DOM/DOMHTMLButtonElement.h:
1727         * DOM/DOMHTMLCanvasElement.h:
1728         * DOM/DOMHTMLCollection.h:
1729         * DOM/DOMHTMLDListElement.h:
1730         * DOM/DOMHTMLDirectoryElement.h:
1731         * DOM/DOMHTMLDivElement.h:
1732         * DOM/DOMHTMLDocument.h:
1733         * DOM/DOMHTMLElement.h:
1734         * DOM/DOMHTMLEmbedElement.h:
1735         * DOM/DOMHTMLFieldSetElement.h:
1736         * DOM/DOMHTMLFontElement.h:
1737         * DOM/DOMHTMLFormElement.h:
1738         * DOM/DOMHTMLFrameElement.h:
1739         * DOM/DOMHTMLFrameSetElement.h:
1740         * DOM/DOMHTMLHRElement.h:
1741         * DOM/DOMHTMLHeadElement.h:
1742         * DOM/DOMHTMLHeadingElement.h:
1743         * DOM/DOMHTMLHtmlElement.h:
1744         * DOM/DOMHTMLIFrameElement.h:
1745         * DOM/DOMHTMLImageElement.h:
1746         * DOM/DOMHTMLInputElement.h:
1747         * DOM/DOMHTMLLIElement.h:
1748         * DOM/DOMHTMLLabelElement.h:
1749         * DOM/DOMHTMLLegendElement.h:
1750         * DOM/DOMHTMLLinkElement.h:
1751         * DOM/DOMHTMLMapElement.h:
1752         * DOM/DOMHTMLMarqueeElement.h:
1753         * DOM/DOMHTMLMediaElement.h:
1754         * DOM/DOMHTMLMenuElement.h:
1755         * DOM/DOMHTMLMetaElement.h:
1756         * DOM/DOMHTMLModElement.h:
1757         * DOM/DOMHTMLOListElement.h:
1758         * DOM/DOMHTMLObjectElement.h:
1759         * DOM/DOMHTMLOptGroupElement.h:
1760         * DOM/DOMHTMLOptionElement.h:
1761         * DOM/DOMHTMLOptionsCollection.h:
1762         * DOM/DOMHTMLParagraphElement.h:
1763         * DOM/DOMHTMLParamElement.h:
1764         * DOM/DOMHTMLPreElement.h:
1765         * DOM/DOMHTMLQuoteElement.h:
1766         * DOM/DOMHTMLScriptElement.h:
1767         * DOM/DOMHTMLSelectElement.h:
1768         * DOM/DOMHTMLStyleElement.h:
1769         * DOM/DOMHTMLTableCaptionElement.h:
1770         * DOM/DOMHTMLTableCellElement.h:
1771         * DOM/DOMHTMLTableColElement.h:
1772         * DOM/DOMHTMLTableElement.h:
1773         * DOM/DOMHTMLTableRowElement.h:
1774         * DOM/DOMHTMLTableSectionElement.h:
1775         * DOM/DOMHTMLTextAreaElement.h:
1776         * DOM/DOMHTMLTitleElement.h:
1777         * DOM/DOMHTMLUListElement.h:
1778         * DOM/DOMHTMLVideoElement.h:
1779         * DOM/DOMImplementation.h:
1780         * DOM/DOMKeyboardEvent.h:
1781         * DOM/DOMMediaError.h:
1782         * DOM/DOMMediaList.h:
1783         * DOM/DOMMouseEvent.h:
1784         * DOM/DOMMutationEvent.h:
1785         * DOM/DOMNamedNodeMap.h:
1786         * DOM/DOMNode.h:
1787         * DOM/DOMNodeFilter.h:
1788         * DOM/DOMNodeIterator.h:
1789         * DOM/DOMNodeList.h:
1790         * DOM/DOMObject.h:
1791         * DOM/DOMOverflowEvent.h:
1792         * DOM/DOMProcessingInstruction.h:
1793         * DOM/DOMProgressEvent.h:
1794         * DOM/DOMRGBColor.h:
1795         * DOM/DOMRange.h:
1796         * DOM/DOMRangeException.h:
1797         * DOM/DOMRect.h:
1798         * DOM/DOMStyleSheet.h:
1799         * DOM/DOMStyleSheetList.h:
1800         * DOM/DOMText.h:
1801         * DOM/DOMTextEvent.h:
1802         * DOM/DOMTimeRanges.h:
1803         * DOM/DOMTokenList.h:
1804         * DOM/DOMTreeWalker.h:
1805         * DOM/DOMUIEvent.h:
1806         * DOM/DOMWheelEvent.h:
1807         * DOM/DOMXPathException.h:
1808         * DOM/DOMXPathExpression.h:
1809         * DOM/DOMXPathNSResolver.h:
1810         * DOM/DOMXPathResult.h:
1811         * History/WebBackForwardList.h:
1812         * History/WebHistory.h:
1813         * History/WebHistoryItem.h:
1814         * Misc/WebDownload.h:
1815         * Misc/WebKitErrors.h:
1816         * Plugins/WebPluginViewFactory.h:
1817         * WebView/WebArchive.h:
1818         * WebView/WebDataSource.h:
1819         * WebView/WebDocument.h:
1820         * WebView/WebEditingDelegate.h:
1821         * WebView/WebFormDelegate.h:
1822         * WebView/WebFrame.h:
1823         * WebView/WebFrameLoadDelegate.h:
1824         * WebView/WebFrameView.h:
1825         * WebView/WebPolicyDelegate.h:
1826         * WebView/WebPreferences.h:
1827         * WebView/WebPreferencesPrivate.h:
1828         * WebView/WebResourceLoadDelegate.h:
1829         * WebView/WebUIDelegate.h:
1830         * WebView/WebUIDelegatePrivate.h:
1831         * WebView/WebView.h:
1832         * WebView/WebViewPrivate.h:
1833         * postprocess-headers.sh:
1834         Remove step that converts WEBKIT macros to NS macros.
1835         Change it to just remove the macros on iOS builds.
1836
1837 2018-05-01  Eric Carlson  <eric.carlson@apple.com>
1838
1839         [MediaStream] remove WK1 support
1840         https://bugs.webkit.org/show_bug.cgi?id=185136
1841
1842         Reviewed by Youenn Fablet.
1843
1844         * WebCoreSupport/WebUserMediaClient.h: Removed.
1845         * WebCoreSupport/WebUserMediaClient.mm: Removed.
1846         * WebView/WebView.mm:
1847         (-[WebView _commonInitializationWithFrameName:groupName:]):
1848         (-[WebView _preferencesChanged:]):
1849         (-[WebView _setUserMediaClient:]): Deleted.
1850         (-[WebView _userMediaClient]): Deleted.
1851         * WebView/WebViewData.h:
1852         * WebView/WebViewPrivate.h:
1853
1854 2018-05-01  Oleksandr Skachkov  <gskachkov@gmail.com>
1855
1856         WebAssembly: add support for stream APIs - JavaScript API
1857         https://bugs.webkit.org/show_bug.cgi?id=183442
1858
1859         Reviewed by Yusuke Suzuki and JF Bastien.
1860
1861         Add WEBASSEMBLY_STREAMINNG_API feature flag
1862
1863         * Configurations/FeatureDefines.xcconfig:
1864
1865 2018-04-30  JF Bastien  <jfbastien@apple.com>
1866
1867         Use some C++17 features
1868         https://bugs.webkit.org/show_bug.cgi?id=185135
1869
1870         Reviewed by Alex Christensen.
1871
1872         * Configurations/WebKitLegacy.xcconfig:
1873
1874 2018-04-27  Chris Dumez  <cdumez@apple.com>
1875
1876         Use WindowProxy instead of DOMWindow in our IDL
1877         https://bugs.webkit.org/show_bug.cgi?id=185022
1878
1879         Reviewed by Sam Weinig.
1880
1881         * DOM/DOMAbstractView.mm:
1882         (kit):
1883         (toWindowProxy):
1884         * DOM/DOMAbstractViewInternal.h:
1885         * DOM/DOMDocument.mm:
1886         (-[DOMDocument defaultView]):
1887         (-[DOMDocument getComputedStyle:pseudoElement:]):
1888         (-[DOMDocument getMatchedCSSRules:pseudoElement:authorOnly:]):
1889         * DOM/DOMHTMLFrameElement.mm:
1890         (-[DOMHTMLFrameElement contentWindow]):
1891         * DOM/DOMHTMLIFrameElement.mm:
1892         (-[DOMHTMLIFrameElement contentWindow]):
1893         * DOM/DOMKeyboardEvent.mm:
1894         (-[DOMKeyboardEvent initKeyboardEvent:canBubble:cancelable:view:keyIdentifier:location:ctrlKey:altKey:shiftKey:metaKey:altGraphKey:]):
1895         (-[DOMKeyboardEvent initKeyboardEvent:canBubble:cancelable:view:keyIdentifier:location:ctrlKey:altKey:shiftKey:metaKey:]):
1896         (-[DOMKeyboardEvent initKeyboardEvent:canBubble:cancelable:view:keyIdentifier:keyLocation:ctrlKey:altKey:shiftKey:metaKey:altGraphKey:]):
1897         (-[DOMKeyboardEvent initKeyboardEvent:canBubble:cancelable:view:keyIdentifier:keyLocation:ctrlKey:altKey:shiftKey:metaKey:]):
1898         * DOM/DOMMouseEvent.mm:
1899         (-[DOMMouseEvent initMouseEvent:canBubble:cancelable:view:detail:screenX:screenY:clientX:clientY:ctrlKey:altKey:shiftKey:metaKey:button:relatedTarget:]):
1900         * DOM/DOMTextEvent.mm:
1901         (-[DOMTextEvent initTextEvent:canBubbleArg:cancelableArg:viewArg:dataArg:]):
1902         * DOM/DOMUIEvent.mm:
1903         (-[DOMUIEvent view]):
1904         (-[DOMUIEvent initUIEvent:canBubble:cancelable:view:detail:]):
1905         * DOM/DOMWheelEvent.mm:
1906         (-[DOMWheelEvent initWheelEvent:wheelDeltaY:view:screenX:screenY:clientX:clientY:ctrlKey:altKey:shiftKey:metaKey:]):
1907
1908 2018-04-26  Simon Fraser  <simon.fraser@apple.com>
1909
1910         Implement rendering support for the color-filter CSS property
1911         https://bugs.webkit.org/show_bug.cgi?id=185047
1912         rdar://problem/39664967
1913
1914         Reviewed by Tim Horton.
1915         
1916         The body background should reflect the filtered color.
1917
1918         * WebView/WebFrame.mm:
1919         (-[WebFrame _bodyBackgroundColor]):
1920         * WebView/WebView.mm:
1921         (-[WebView updateTextTouchBar]): No logic change, just cleanup.
1922
1923 2018-04-26  Jer Noble  <jer.noble@apple.com>
1924
1925         WK_COCOA_TOUCH all the things.
1926         https://bugs.webkit.org/show_bug.cgi?id=185006
1927
1928         Reviewed by Tim Horton.
1929
1930         * Configurations/WebKitLegacy.xcconfig:
1931
1932 2018-04-26  Daniel Bates  <dabates@apple.com>
1933
1934         ASSERTION FAILED: ASSERT(!containsImage || MIMETypeRegistry::isSupportedImageResourceMIMEType([resource MIMEType])) in -[NSPasteboard(WebExtras) _web_writePromisedRTFDFromArchive:containsImage:]
1935         https://bugs.webkit.org/show_bug.cgi?id=184161
1936         <rdar://problem/39051645>
1937
1938         Reviewed by Dan Bernstein.
1939
1940         Fixes an assertion failure when quitting an app that uses a Legacy WebKit web view after dragging-and-
1941         dropping a PDF embedded using an HTML image element into the same web view.
1942
1943         When performing a drag-and-drop of a PDF document image (WebCore::PDFDocumentImage) we create a WebArchive
1944         from the main frame's WebHTMLView and promise AppKit that we will provide a Rich Text Format (RTF) document
1945         from this archive if needed. For some reason, on app termination AppKit requests that the WebHTMLView
1946         fulfill its RTF document promise for the WebArchive created at the start of the drag operation. To do this,
1947         we need to extract the image resource from the Web Archive. Currently we query MIMETypeRegistry::isSupportedImageResourceMIMEType()
1948         to see if the contained image is one that we can handle. However MIMETypeRegistry::isSupportedImageResourceMIMEType()
1949         only returns true if WebKit supports creating an image document for the specified MIME type. Disregarding
1950         the iOS motivated setting Settings::useImageDocumentForSubframePDF, PDFs and PostScripts do not create an
1951         image document when navigated to directly. Since we can support dragging PDF document images we need to
1952         query if MIMETypeRegistry::isPDFOrPostScriptMIMEType() in addition to querying MIMETypeRegistry::isSupportedImageResourceMIMEType().
1953         We need to do both such queries before falling back to using the main resource of the Web Archive as
1954         the image. Otherwise, we will cause an assertion failure if the main resource of the Web Archive is
1955         not an image document.
1956
1957         * Misc/WebNSPasteboardExtras.mm:
1958         (-[NSPasteboard _web_writePromisedRTFDFromArchive:containsImage:]):
1959
1960 2018-04-26  Per Arne Vollan  <pvollan@apple.com>
1961
1962         Disable content filtering in minimal simulator mode
1963         https://bugs.webkit.org/show_bug.cgi?id=185027
1964         <rdar://problem/39736091>
1965
1966         Reviewed by Jer Noble.
1967
1968         * Configurations/FeatureDefines.xcconfig:
1969
1970 2018-04-26  Andy VanWagoner  <thetalecrafter@gmail.com>
1971
1972         [INTL] Implement Intl.PluralRules
1973         https://bugs.webkit.org/show_bug.cgi?id=184312
1974
1975         Reviewed by JF Bastien.
1976
1977         Added Intl.PluralRules feature flag.
1978
1979         * Configurations/FeatureDefines.xcconfig:
1980
1981 2018-04-25  Jiewen Tan  <jiewen_tan@apple.com>
1982
1983         Remove access to keychain from the WebContent process
1984         https://bugs.webkit.org/show_bug.cgi?id=184428
1985         <rdar://problem/13150903>
1986
1987         Reviewed by Brent Fulgham.
1988
1989         This patch does the followings:
1990         1. Added necessary support to move HTMLKeygenElement's operation from WebCore space to Client space.
1991         2. Craft new SPI signedPublicKeyAndChallengeStringForWebView to supply HTMLKeygenElement with dummy data
1992         such that DumpRenderTree tests will not modify the underlying key store (e.g., the macOS Keychain).
1993
1994         * WebCoreSupport/WebChromeClient.h:
1995         * WebCoreSupport/WebChromeClient.mm:
1996         (WebChromeClient::signedPublicKeyAndChallengeString const):
1997         * WebView/WebUIDelegatePrivate.h:
1998
1999 2018-04-24  Jer Noble  <jer.noble@apple.com>
2000
2001         Don't add system framework paths to FRAMEWORK_SEARCH_PATHS
2002         https://bugs.webkit.org/show_bug.cgi?id=184786
2003
2004         Reviewed by Tim Horton.
2005
2006         * Configurations/WebKitLegacy.xcconfig:
2007         * MigrateHeaders.make:
2008
2009 2018-04-23  Daniel Bates  <dabates@apple.com>
2010
2011         Implement Same-Site cookies
2012         https://bugs.webkit.org/show_bug.cgi?id=159464
2013         <rdar://problem/27196358>
2014
2015         Reviewed by Brent Fulgham.
2016
2017         Pass the Same-Site info through the strategy.
2018
2019         * WebCoreSupport/WebPlatformStrategies.h:
2020         * WebCoreSupport/WebPlatformStrategies.mm:
2021         (WebPlatformStrategies::cookiesForDOM):
2022         (WebPlatformStrategies::setCookiesFromDOM):
2023         (WebPlatformStrategies::cookieRequestHeaderFieldValue):
2024         (WebPlatformStrategies::getRawCookies):
2025
2026 2018-04-23  Zalan Bujtas  <zalan@apple.com>
2027
2028         [LayoutFormattingContext] Initial commit.
2029         https://bugs.webkit.org/show_bug.cgi?id=184896
2030
2031         Reviewed by Antti Koivisto.
2032
2033         * Configurations/FeatureDefines.xcconfig:
2034
2035 2018-04-23  Daniel Bates  <dabates@apple.com>
2036
2037         Implement Same-Site cookies
2038         https://bugs.webkit.org/show_bug.cgi?id=159464
2039         <rdar://problem/27196358>
2040
2041         Reviewed by Brent Fulgham.
2042
2043         Pass the Same-Site info through the strategy.
2044
2045         * WebCoreSupport/WebPlatformStrategies.h:
2046         * WebCoreSupport/WebPlatformStrategies.mm:
2047         (WebPlatformStrategies::cookiesForDOM):
2048         (WebPlatformStrategies::setCookiesFromDOM):
2049         (WebPlatformStrategies::cookieRequestHeaderFieldValue):
2050         (WebPlatformStrategies::getRawCookies):
2051
2052 2018-04-20  Timothy Hatcher  <timothy@apple.com>
2053
2054         NULL dereference crash sometimes under [super initWithCoder:] in WebView
2055
2056         https://bugs.webkit.org/show_bug.cgi?id=184851
2057         rdar://problem/39611236
2058
2059         Reviewed by Tim Horton.
2060
2061         * WebView/WebView.mm:
2062         (-[WebView _commonInitializationWithFrameName:groupName:]):
2063         (-[WebView effectiveAppearanceDidChange]):
2064         Added a null check and call the code later in initialization.
2065
2066 2018-04-20  Tim Horton  <timothy_horton@apple.com>
2067
2068         Adjust geolocation feature flag
2069         https://bugs.webkit.org/show_bug.cgi?id=184856
2070
2071         Reviewed by Wenson Hsieh.
2072
2073         * Configurations/FeatureDefines.xcconfig:
2074
2075 2018-04-18  Jer Noble  <jer.noble@apple.com>
2076
2077         Don't put build products into WK_ALTERNATE_WEBKIT_SDK_PATH for engineering builds
2078         https://bugs.webkit.org/show_bug.cgi?id=184762
2079
2080         Reviewed by Dan Bernstein.
2081
2082         * Configurations/WebKitLegacy.xcconfig:
2083
2084 2018-04-20  Youenn Fablet  <youenn@apple.com>
2085
2086         Make PluginData cache its web visible plugins
2087         https://bugs.webkit.org/show_bug.cgi?id=184421
2088
2089         Reviewed by Chris Dumez.
2090
2091         * WebCoreSupport/WebPluginInfoProvider.h:
2092         * WebCoreSupport/WebPluginInfoProvider.mm:
2093         (WebPluginInfoProvider::pluginInfo):
2094         (WebPluginInfoProvider::webVisiblePluginInfo):
2095
2096 2018-04-19  Chris Dumez  <cdumez@apple.com>
2097
2098         Rename JSDOMWindowProxy to JSWindowProxy
2099         https://bugs.webkit.org/show_bug.cgi?id=184797
2100
2101         Reviewed by Sam Weinig.
2102
2103         Rename JSDOMWindowProxy to JSWindowProxy for consistency with WindowProxy.
2104
2105         * DOM/DOMUtility.mm:
2106         (createDOMWrapper):
2107         * WebView/WebFrame.mm:
2108         (-[WebFrame _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]):
2109
2110 2018-04-19  David Kilzer  <ddkilzer@apple.com>
2111
2112         Enable Objective-C weak references
2113         <https://webkit.org/b/184789>
2114         <rdar://problem/39571716>
2115
2116         Reviewed by Dan Bernstein.
2117
2118         * Configurations/Base.xcconfig:
2119         (CLANG_ENABLE_OBJC_WEAK): Enable.
2120
2121 2018-04-18  Chris Dumez  <cdumez@apple.com>
2122
2123         Rename WindowProxyController to WindowProxy
2124         https://bugs.webkit.org/show_bug.cgi?id=184756
2125
2126         Reviewed by Sam Weinig.
2127
2128         Rename WindowProxyController to WindowProxy for clarity. When the IDL uses WindowProxy, the implementation
2129         needed use WindowProxyController type, which was a bit confusing.
2130
2131         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2132         (WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
2133         * WebView/WebFrame.mm:
2134         (-[WebFrame _attachScriptDebugger]):
2135
2136 2018-04-17  Jonathan Bedard  <jbedard@apple.com>
2137
2138         Unreviewed rollout of r230632. Regression in memory usage.
2139
2140         That bug tracked in https://bugs.webkit.org/show_bug.cgi?id=184569.
2141
2142         * WebView/WebPreferences.mm:
2143         (+[WebPreferences initialize]):
2144
2145 2018-04-17  Chris Dumez  <cdumez@apple.com>
2146
2147         REGRESSION (r229831): CMD-clicking an iCloud web app link unexpectedly opens that link in a new tab and the current tab
2148         https://bugs.webkit.org/show_bug.cgi?id=184678
2149         <rdar://problem/39422122>
2150
2151         Reviewed by Alex Christensen.
2152
2153         Add new parameter to dispatchDecidePolicyForNavigationAction.
2154
2155         * WebCoreSupport/WebFrameLoaderClient.h:
2156         * WebCoreSupport/WebFrameLoaderClient.mm:
2157         (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2158
2159 2018-04-13  Chris Dumez  <cdumez@apple.com>
2160
2161         Split WindowProxy handling out of ScriptController and into a new class owned by AbstractFrame
2162         https://bugs.webkit.org/show_bug.cgi?id=184591
2163
2164         Reviewed by Sam Weinig.
2165
2166         Split WindowProxy handling out of ScriptController and into a new class owned by AbstractFrame.
2167         RemoteFrames do not need a ScriptController but do need to maintain WindowProxies.
2168         This is work towards fixing Bug 184515.
2169
2170         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2171         (WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
2172         * WebView/WebFrame.mm:
2173         (-[WebFrame _attachScriptDebugger]):
2174
2175 2018-04-12  Antoine Quint  <graouts@apple.com>
2176
2177         [Web Animations] Turn CSS Animations and CSS Transitions as Web Animations on by default
2178         https://bugs.webkit.org/show_bug.cgi?id=184569
2179         <rdar://problem/38671301>
2180
2181         Reviewed by Jon Lee.
2182
2183         * WebView/WebPreferences.mm:
2184
2185 2018-04-05  Yusuke Suzuki  <utatane.tea@gmail.com>
2186
2187         [WTF] Remove StaticLock
2188         https://bugs.webkit.org/show_bug.cgi?id=184332
2189
2190         Reviewed by Mark Lam.
2191
2192         * DOM/DOMInternal.mm:
2193         (getDOMWrapper):
2194         (addDOMWrapper):
2195         (removeDOMWrapper):
2196
2197 2018-04-04  Brent Fulgham  <bfulgham@apple.com>
2198
2199         Failures from mach port reference handling should be fatal
2200         https://bugs.webkit.org/show_bug.cgi?id=184202
2201         <rdar://problem/37771114>
2202
2203         Reviewed by Anders Carlsson.
2204
2205         * Plugins/Hosted/NetscapePluginHostManager.mm:
2206         (WebKit::NetscapePluginHostManager::spawnPluginHost): Adopt new 'safe mach_port_t deallocation' function.
2207
2208 2018-04-03  Andy Estes  <aestes@apple.com>
2209
2210         [Mac] Prioritize file promises over filenames during drag and drop
2211         https://bugs.webkit.org/show_bug.cgi?id=184237
2212         <rdar://problem/38278076>
2213
2214         Reviewed by Wenson Hsieh.
2215
2216         * WebView/WebView.mm:
2217         (-[WebView performDragOperation:]):
2218
2219 2018-04-03  Chris Dumez  <cdumez@apple.com>
2220
2221         Drop MainFrame class
2222         https://bugs.webkit.org/show_bug.cgi?id=184191
2223
2224         Reviewed by Darin Adler.
2225
2226         Drop MainFrame class and move contents into Page / Frame since there is a 1:1
2227         relationship between the Page and the MainFrame.
2228
2229         This is ground work for introducing LocalFrame / RemoteFrame concepts.
2230
2231         * WebCoreSupport/WebDragClient.mm:
2232         * WebCoreSupport/WebFrameLoaderClient.mm:
2233         * WebCoreSupport/WebInspectorClient.mm:
2234         * WebCoreSupport/WebPlatformStrategies.mm:
2235         * WebCoreSupport/WebPluginInfoProvider.mm:
2236         * WebView/WebFrame.mm:
2237         * WebView/WebFrameView.mm:
2238         * WebView/WebHTMLView.mm:
2239         * WebView/WebView.mm:
2240
2241 2018-04-02  Jer Noble  <jer.noble@apple.com>
2242
2243         Enable Legacy EME for all WebKit & WebKitLegacy clients
2244         https://bugs.webkit.org/show_bug.cgi?id=184018
2245         <rdar://problem/34887387>
2246
2247         Reviewed by Eric Carlson.
2248
2249         * WebView/WebPreferences.mm:
2250         (+[WebPreferences initialize]):
2251
2252 2018-03-29  JF Bastien  <jfbastien@apple.com>
2253
2254         Use Forward.h instead of forward-declaring WTF::String
2255         https://bugs.webkit.org/show_bug.cgi?id=184172
2256         <rdar://problem/39026146>
2257
2258         Reviewed by Yusuke Suzuki.
2259
2260         As part of #184164 I'm changing WTF::String, and the forward
2261         declarations are just wrong because I'm making it templated. We
2262         should use Forward.h anyways, so do that instead.
2263
2264         * WebView/WebScriptDebugger.h:
2265
2266 2018-03-28  Brent Fulgham  <bfulgham@apple.com>
2267
2268         Protect against invalid mach ports returned by mach_port_request_notification
2269         https://bugs.webkit.org/show_bug.cgi?id=184106
2270         <rdar://problem/37865316>
2271
2272         Reviewed by Chris Dumez.
2273
2274         * Plugins/Hosted/NetscapePluginHostProxy.mm:
2275         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy): Check return value from 'mach_port_request_notification'
2276         and clean up if it experienced an error.
2277         (WebKit::NetscapePluginHostProxy::processRequests): Drive-by-fix: Include formatted mach error message in logging.
2278
2279 2018-03-28  Brent Fulgham  <bfulgham@apple.com>
2280
2281         Avoid uninitialized mach ports
2282         https://bugs.webkit.org/show_bug.cgi?id=184090
2283         <rdar://problem/37261129>
2284
2285         Reviewed by Chris Dumez.
2286
2287         It is possible for mach_port_allocate to return an error, but we rarely check its return value. The value
2288         of the argument passed to mach_port_allocate is not guaranteed to be valid when it returns an error, so
2289         there is a potential for us to try to use invalid ports.
2290
2291         We should always check return values, and ensure that the mach port variables we seek to initialize are
2292         kept in a valid state.
2293
2294         Reviewed by Chris Dumez.
2295
2296         * Plugins/Hosted/NetscapePluginHostManager.h:
2297         * Plugins/Hosted/NetscapePluginHostManager.mm:
2298         (WebKit::NetscapePluginHostManager::hostForPlugin): Initialize port to a valid state, ASSERT if an invalid
2299         port is passed to an API function.
2300         (WebKit::NetscapePluginHostManager::spawnPluginHost): Ditto.
2301         (WebKit::NetscapePluginHostManager::initializeVendorPort): Ditto.
2302         * Plugins/Hosted/NetscapePluginHostProxy.h:
2303         * Plugins/Hosted/NetscapePluginHostProxy.mm:
2304         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy): Ditto.
2305         (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy): Ditto.
2306         (WebKit::NetscapePluginHostProxy::processRequests): Ditto.
2307         (WKPCStatusText): Ditto.
2308         (WKPCLoadURL): Ditto.
2309         (WKPCCancelLoadURL): Ditto.
2310         (WKPCInvalidateRect): Ditto.
2311         (WKPCGetScriptableNPObjectReply): Ditto.
2312         (WKPCBooleanReply): Ditto.
2313         (WKPCBooleanAndDataReply): Ditto.
2314         (WKPCInstantiatePluginReply): Ditto.
2315         (WKPCGetWindowNPObject): Ditto.
2316         (WKPCGetPluginElementNPObject): Ditto.
2317         (WKPCForgetBrowserObject): Ditto.
2318         (WKPCEvaluate): Ditto.
2319         (WKPCGetStringIdentifier): Ditto.
2320         (WKPCGetIntIdentifier): Ditto.
2321         (WKPCInvoke): Ditto.
2322         (WKPCInvokeDefault): Ditto.
2323         (WKPCConstruct): Ditto.
2324         (WKPCGetProperty): Ditto.
2325         (WKPCSetProperty): Ditto.
2326         (WKPCRemoveProperty): Ditto.
2327         (WKPCHasProperty): Ditto.
2328         (WKPCHasMethod): Ditto.
2329         (WKPCIdentifierInfo): Ditto.
2330         (WKPCEnumerate): Ditto.
2331         (WKPCSetMenuBarVisible): Ditto.
2332         (WKPCSetFullscreenWindowIsShowing): Ditto.
2333         (WKPCSetModal): Ditto.
2334         (WKPCGetCookies): Ditto.
2335         (WKPCGetProxy): Ditto.
2336         (WKPCSetCookies): Ditto.
2337         (WKPCGetAuthenticationInfo): Ditto.
2338         (WKPCConvertPoint): Ditto.
2339         (WKPCLayerHostingModeChanged): Ditto.
2340         (WKPCSetException): Ditto.
2341
2342 2018-03-26  Tim Horton  <timothy_horton@apple.com>
2343
2344         Adopt WK_ALTERNATE_FRAMEWORKS_DIR in WebKit
2345         https://bugs.webkit.org/show_bug.cgi?id=184030
2346         <rdar://problem/38895281>
2347
2348         Reviewed by Dan Bernstein.
2349
2350         * Configurations/Base.xcconfig:
2351
2352 2018-03-26  Chris Dumez  <cdumez@apple.com>
2353
2354         Use SecurityOriginData more consistently in Service Worker code
2355         https://bugs.webkit.org/show_bug.cgi?id=183969
2356
2357         Reviewed by Darin Adler.
2358
2359         Use SecurityOrigin::data() instead of SecurityOriginData::fromSecurityOrigin().
2360
2361         * Storage/WebDatabaseManager.mm:
2362         (-[WebDatabaseManager databasesWithOrigin:]):
2363         (-[WebDatabaseManager deleteOrigin:]):
2364         (-[WebDatabaseManager deleteDatabase:withOrigin:]):
2365         * Storage/WebDatabaseQuotaManager.mm:
2366         (-[WebDatabaseQuotaManager usage]):
2367         (-[WebDatabaseQuotaManager quota]):
2368         (-[WebDatabaseQuotaManager setQuota:]):
2369         * Storage/WebStorageManager.mm:
2370         (-[WebStorageManager deleteOrigin:]):
2371         * WebCoreSupport/WebSecurityOrigin.mm:
2372         (-[WebSecurityOrigin databaseIdentifier]):
2373         (-[WebSecurityOrigin usage]):
2374         (-[WebSecurityOrigin quota]):
2375         (-[WebSecurityOrigin setQuota:]):
2376
2377 2018-03-26  Brent Fulgham  <bfulgham@apple.com>
2378
2379         Warn against cookie access in the WebContent process using ProcessPrivilege assertions
2380         https://bugs.webkit.org/show_bug.cgi?id=183911
2381         <rdar://problem/38762306>
2382
2383         Reviewed by Youenn Fablet.
2384
2385         Initialize the ProcessPrivilege and Cookie API access levels for single-process use.
2386
2387         * WebView/WebView.mm:
2388         (+[WebView initialize]):
2389
2390 2018-03-26  Alex Christensen  <achristensen@webkit.org>
2391
2392         Merge ResourceHandleClient::willCacheResponseAsync with ResourceHandleClient::willCacheResponse
2393         https://bugs.webkit.org/show_bug.cgi?id=183965
2394
2395         Reviewed by Chris Dumez.
2396
2397         * WebCoreSupport/WebFrameLoaderClient.h:
2398         * WebCoreSupport/WebFrameLoaderClient.mm:
2399         (WebFrameLoaderClient::willCacheResponse const):
2400
2401 2018-03-25  Commit Queue  <commit-queue@webkit.org>
2402
2403         Unreviewed, rolling out r229954.
2404         https://bugs.webkit.org/show_bug.cgi?id=184000
2405
2406         Caused many layout tests to crash on Apple High Sierra,
2407         Sierra, iOS Simulator and GTK Linux Debug test bots (Requested
2408         by dydz on #webkit).
2409
2410         Reverted changeset:
2411
2412         "Use SecurityOriginData more consistently in Service Worker
2413         code"
2414         https://bugs.webkit.org/show_bug.cgi?id=183969
2415         https://trac.webkit.org/changeset/229954
2416
2417 2018-03-24  Chris Dumez  <cdumez@apple.com>
2418
2419         Use SecurityOriginData more consistently in Service Worker code
2420         https://bugs.webkit.org/show_bug.cgi?id=183969
2421
2422         Reviewed by Darin Adler.
2423
2424         Use SecurityOrigin::data() instead of SecurityOriginData::fromSecurityOrigin().
2425
2426         * Storage/WebDatabaseManager.mm:
2427         (-[WebDatabaseManager databasesWithOrigin:]):
2428         (-[WebDatabaseManager deleteOrigin:]):
2429         (-[WebDatabaseManager deleteDatabase:withOrigin:]):
2430         * Storage/WebDatabaseQuotaManager.mm:
2431         (-[WebDatabaseQuotaManager usage]):
2432         (-[WebDatabaseQuotaManager quota]):
2433         (-[WebDatabaseQuotaManager setQuota:]):
2434         * Storage/WebStorageManager.mm:
2435         (-[WebStorageManager deleteOrigin:]):
2436         * WebCoreSupport/WebSecurityOrigin.mm:
2437         (-[WebSecurityOrigin databaseIdentifier]):
2438         (-[WebSecurityOrigin usage]):
2439         (-[WebSecurityOrigin quota]):
2440         (-[WebSecurityOrigin setQuota:]):
2441
2442 2018-03-24  Timothy Horton  <timothy_horton@apple.com>
2443
2444         Fix the build
2445
2446         * WebView/WebView.mm:
2447
2448 2018-03-23  Tim Horton  <timothy_horton@apple.com>
2449
2450         Fix the build with no pasteboard
2451         https://bugs.webkit.org/show_bug.cgi?id=183973
2452
2453         Reviewed by Dan Bernstein.
2454
2455         * Configurations/FeatureDefines.xcconfig:
2456         * WebView/WebView.mm:
2457         (-[WebView _requestStartDataInteraction:globalPosition:]):
2458         (-[WebView _getDataInteractionData]):
2459         (-[WebView _dataOperationTextIndicator]):
2460         (-[WebView _dragSourceAction]):
2461         (-[WebView _draggedLinkTitle]):
2462         (-[WebView _draggedLinkURL]):
2463         (-[WebView _draggedElementBounds]):
2464         (-[WebView _enteredDataInteraction:client:global:operation:]):
2465         (-[WebView _updatedDataInteraction:client:global:operation:]):
2466         (-[WebView _exitedDataInteraction:client:global:operation:]):
2467         (-[WebView _performDataInteraction:client:global:operation:]):
2468         (-[WebView _tryToPerformDataInteraction:client:global:operation:]):
2469         (-[WebView _endedDataInteraction:global:]):
2470         (-[WebView _dataInteractionCaretRect]):
2471         * WebView/WebViewPrivate.h:
2472
2473 2018-03-23  Tim Horton  <timothy_horton@apple.com>
2474
2475         Adopt WK_ALTERNATE_FRAMEWORKS_DIR in WebKitLegacy and update install name
2476         https://bugs.webkit.org/show_bug.cgi?id=183960
2477         <rdar://problem/38812356>
2478
2479         Reviewed by Dan Bernstein.
2480
2481         * Configurations/WebKitLegacy.xcconfig:
2482
2483 2018-03-23  Tim Horton  <timothy_horton@apple.com>
2484
2485         Introduce and adopt HAVE(AUDIO_TOOLBOX_AUDIO_SESSION)
2486         https://bugs.webkit.org/show_bug.cgi?id=183954
2487         <rdar://problem/38808858>
2488
2489         Reviewed by Dan Bernstein.
2490
2491         * WebView/WebPreferences.mm:
2492         (-[WebPreferences setAudioSessionCategoryOverride:]):
2493
2494 2018-03-23  Tim Horton  <timothy_horton@apple.com>
2495
2496         Adopt WK_PLATFORM_NAME in WebKitLegacy
2497         https://bugs.webkit.org/show_bug.cgi?id=183948
2498         <rdar://problem/38803908>
2499
2500         Reviewed by Dan Bernstein.
2501
2502         * Configurations/WebKitLegacy.xcconfig:
2503         * MigrateHeaders.make:
2504         * postprocess-headers.sh:
2505
2506 2018-03-23  Brady Eidson  <beidson@apple.com>
2507
2508         Go to back/forward list items after a process-swapped navigation.
2509         <rdar://problem/38690544> and https://bugs.webkit.org/show_bug.cgi?id=183920
2510
2511         Reviewed by Andy Estes.
2512
2513         * WebView/WebView.mm:
2514         (-[WebView _loadBackForwardListFromOtherView:]):
2515         (-[WebView goToBackForwardItem:]):
2516
2517 2018-03-22  Tim Horton  <timothy_horton@apple.com>
2518
2519         Improve readability of WebCore's OTHER_LDFLAGS
2520         https://bugs.webkit.org/show_bug.cgi?id=183909
2521         <rdar://problem/38760992>
2522
2523         Reviewed by Dan Bernstein.
2524
2525         * Configurations/Base.xcconfig:
2526         * Configurations/FeatureDefines.xcconfig:
2527
2528 2018-03-20  Tim Horton  <timothy_horton@apple.com>
2529
2530         Enable the minimal simulator feature flag when appropriate
2531         https://bugs.webkit.org/show_bug.cgi?id=183807
2532
2533         Reviewed by Dan Bernstein.
2534
2535         * Configurations/FeatureDefines.xcconfig:
2536
2537 2018-03-20  Tim Horton  <timothy_horton@apple.com>
2538
2539         Add and adopt WK_PLATFORM_NAME and adjust default feature defines
2540         https://bugs.webkit.org/show_bug.cgi?id=183758
2541         <rdar://problem/38017644>
2542
2543         Reviewed by Dan Bernstein.
2544
2545         * Configurations/FeatureDefines.xcconfig:
2546
2547 2018-03-19  Megan Gardner  <megan_gardner@apple.com>
2548
2549         Clear style colors when setting default appearance
2550         https://bugs.webkit.org/show_bug.cgi?id=183759
2551
2552         Reviewed by Tim Horton.
2553
2554         Colors are cached and need to be cleared and recalculated.
2555         Refactor to do all style recalcs together.
2556
2557         * WebView/WebView.mm:
2558         (-[WebView _setDefaultAppearanceAndClearStyle]):
2559         (-[WebView _setUseSystemAppearance:]):
2560         (-[WebView effectiveAppearanceDidChange]):
2561
2562 2018-03-19  Jiewen Tan  <jiewen_tan@apple.com>
2563
2564         Unreviewed, another quick fix for r229699
2565
2566         Restricts ENABLE_WEB_AUTHN to only macOS and iOS.
2567
2568         * Configurations/FeatureDefines.xcconfig:
2569
2570 2018-03-16  Megan Gardner  <megan_gardner@apple.com>
2571
2572         Ensure that style is updated when the effective appearance changes
2573         https://bugs.webkit.org/show_bug.cgi?id=183690
2574         <rdar://problem/38385900>
2575
2576         Reviewed by Tim Horton and Wenson Hsieh.
2577
2578         Respond to and respect the effective appearance changing.
2579
2580         * WebView/WebView.mm:
2581         (-[WebView _setUseSystemAppearance:]):
2582         (-[WebView effectiveAppearanceDidChange]):
2583
2584 2018-03-15  Megan Gardner  <megan_gardner@apple.com>
2585
2586         Create MediaQueryParserContext to provide additional context for the evaluation of media queries
2587         https://bugs.webkit.org/show_bug.cgi?id=183677
2588
2589         Reviewed by Tim Horton.
2590
2591         We need additional context for parsing media queries to make sure they are parsed correctly and valid.
2592
2593         * DOM/DOM.mm:
2594         (-[DOMHTMLLinkElement _mediaQueryMatches]):
2595
2596 2018-03-14  Tim Horton  <timothy_horton@apple.com>
2597
2598         Fix the build after r229567
2599
2600         * Configurations/FeatureDefines.xcconfig:
2601
2602 2018-03-12  Tim Horton  <timothy_horton@apple.com>
2603
2604         Stop using SDK conditionals to control feature definitions
2605         https://bugs.webkit.org/show_bug.cgi?id=183430
2606         <rdar://problem/38251619>
2607
2608         Reviewed by Dan Bernstein.
2609
2610         * Configurations/FeatureDefines.xcconfig:
2611         * Configurations/WebKitTargetConditionals.xcconfig: Renamed.
2612
2613 2018-03-12  Yoav Weiss  <yoav@yoav.ws>
2614
2615         Runtime flag for link prefetch and remove link subresource.
2616         https://bugs.webkit.org/show_bug.cgi?id=183540
2617
2618         Reviewed by Chris Dumez.
2619
2620         Remove the LINK_PREFETCH build time flag.
2621
2622         * Configurations/FeatureDefines.xcconfig:
2623
2624 2018-03-12  Javier Fernandez  <jfernandez@igalia.com>
2625
2626         Remove GridLayout runtime flag
2627         https://bugs.webkit.org/show_bug.cgi?id=183484
2628
2629         Reviewed by Myles C. Maxfield.
2630
2631         The Grid Layout feature has been enabled by default for almost a
2632         year, so I think it's time to remove the runtime flag and the
2633
2634         * WebView/WebPreferenceKeysPrivate.h:
2635         * WebView/WebPreferences.mm:
2636         (+[WebPreferences initialize]):
2637         * WebView/WebPreferencesPrivate.h:
2638         * WebView/WebView.mm:
2639         (-[WebView _preferencesChanged:]):
2640
2641 2018-03-12  Antoine Quint  <graouts@apple.com>
2642
2643         [Web Animations] Implement CSS Animations and CSS Transitions as Web Animations
2644         https://bugs.webkit.org/show_bug.cgi?id=183504
2645         <rdar://problem/38372965>
2646
2647         Reviewed by Dean Jackson and Jon Lee.
2648
2649         Add the missing WebKitLegacy support the cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled flag
2650         which is required for the matching <!-- webkit-test-runner --> flag to work in DumpRenderTree.
2651
2652         * WebView/WebPreferenceKeysPrivate.h:
2653         * WebView/WebPreferences.mm:
2654         (+[WebPreferences initialize]):
2655         (-[WebPreferences setModernMediaControlsEnabled:]):
2656         (-[WebPreferences cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled]):
2657         (-[WebPreferences setCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled:]):
2658         * WebView/WebPreferencesPrivate.h:
2659         * WebView/WebView.mm:
2660         (-[WebView _preferencesChanged:]):
2661
2662 2018-03-10  Megan Gardner  <megan_gardner@apple.com>
2663
2664         Media query for default appearance
2665         https://bugs.webkit.org/show_bug.cgi?id=183539
2666         <rdar://problem/38326388>
2667
2668         Reviewed by Tim Horton.
2669
2670         Write a media query to evaluate appearance.
2671
2672         * WebView/WebView.mm:
2673         (-[WebView _commonInitializationWithFrameName:groupName:]):
2674         (-[WebView _setUseSystemAppearance:]):
2675
2676 2018-03-09  Andy Estes  <aestes@apple.com>
2677
2678         [Mac] WebKit fails to receive file promises when the embedding app is sandboxed
2679         https://bugs.webkit.org/show_bug.cgi?id=183489
2680         <rdar://problem/38267517>
2681
2682         WebKitLegacy calls -[NSFilePromiseReceiver receivePromisedFilesAtDestination:...] with
2683         NSTemporaryDirectory() as the destination for receiving file promise drops. AppKit attempts
2684         to issue a sandbox extension for this directory, but for security reasons App Sandbox
2685         refuses to do so for NSTemporaryDirectory() itself. As a result, AppKit will call our reader
2686         block with a nil error and a valid file URL, but no file will actually exist at that URL.
2687
2688         In order for App Sandbox to grant issuing the sandbox extension needed by AppKit, we need to
2689         use some other destination directory. This patch uses FileSystem::createTemporaryDirectory()
2690         to securely create a unique temporary directory inside NSTemporaryDirectory() for use as the
2691         drop destination.
2692
2693         Reviewed by Wenson Hsieh.
2694
2695         * WebView/WebView.mm:
2696         (-[WebView performDragOperation:]):
2697
2698 2018-03-08  Megan Gardner  <megan_gardner@apple.com>
2699
2700         Allow WebViews to disable system appearance
2701         https://bugs.webkit.org/show_bug.cgi?id=183418
2702         <rdar://problem/36975642>
2703
2704         Reviewed by Tim Horton.
2705
2706         Allow webviews to choose whether or not to follow the default system appearance.
2707
2708         * WebView/WebView.mm:
2709         (-[WebView _setUseSystemAppearance:]):
2710         (-[WebView _useSystemAppearance]):
2711         * WebView/WebViewPrivate.h:
2712
2713 2018-03-08  Youenn Fablet  <youenn@apple.com>
2714
2715         libwebrtc update broke internal builds
2716         https://bugs.webkit.org/show_bug.cgi?id=183454
2717
2718         Reviewed by Eric Carlson.
2719
2720         * Configurations/WebKitLegacy.xcconfig:
2721
2722 2018-03-08  Chris Dumez  <cdumez@apple.com>
2723
2724         Possible null dereference of the page under WebFrameNetworkingContext::storageSession()
2725         https://bugs.webkit.org/show_bug.cgi?id=183455
2726         <rdar://problem/38191749>
2727
2728         Reviewed by Youenn Fablet.
2729
2730         Add a null check for the page as we have evidence from crashes that it can be null.
2731         Other functions in WebFrameNetworkingContext already null check the page as well,
2732         not just the frame so this is consistent.
2733
2734         * WebCoreSupport/WebFrameNetworkingContext.mm:
2735         (WebFrameNetworkingContext::storageSession const):
2736
2737 2018-03-08  Yusuke Suzuki  <utatane.tea@gmail.com>
2738
2739         [JSC] Add inherits<T>(VM&) leveraging JSCast fast path
2740         https://bugs.webkit.org/show_bug.cgi?id=183429
2741
2742         Reviewed by Mark Lam.
2743
2744         * DOM/DOM.mm:
2745         (+[DOMNode _nodeFromJSWrapper:]):
2746         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2747         (WebKit::NetscapePluginInstanceProxy::retainLocalObject):
2748         (WebKit::NetscapePluginInstanceProxy::releaseLocalObject):
2749         * Plugins/Hosted/ProxyInstance.mm:
2750         (WebKit::ProxyInstance::invokeMethod):
2751         * WebView/WebView.mm:
2752         (aeDescFromJSValue):
2753
2754 2018-03-08  Tim Horton  <timothy_horton@apple.com>
2755
2756         Stop linking ApplicationServices directly
2757         https://bugs.webkit.org/show_bug.cgi?id=182867
2758         <rdar://problem/38252142>
2759
2760         Reviewed by Alex Christensen.
2761
2762         The frameworks that we use that live inside ApplicationServices
2763         have mostly moved out, so import them directly.
2764
2765         * Carbon/CarbonUtils.h:
2766         * WebKitPrefix.h:
2767         * WebView/WebHTMLView.mm:
2768         * WebView/WebPDFView.mm:
2769
2770 2018-03-07  Tim Horton  <timothy_horton@apple.com>
2771
2772         Sort and separate FeatureDefines.xcconfig
2773         https://bugs.webkit.org/show_bug.cgi?id=183427
2774
2775         Reviewed by Dan Bernstein.
2776
2777         * Configurations/FeatureDefines.xcconfig:
2778         Sort and split FeatureDefines into paragraphs
2779         (to make it easier to sort later).
2780
2781 2018-03-07  Youenn Fablet  <youenn@apple.com>
2782
2783         Match unsupported plugins based on domains and not origin
2784         https://bugs.webkit.org/show_bug.cgi?id=183384
2785
2786         Reviewed by Chris Dumez.
2787
2788         * WebCoreSupport/WebPluginInfoProvider.h:
2789         * WebCoreSupport/WebPluginInfoProvider.mm:
2790         (WebPluginInfoProvider::getPluginInfo):
2791         (WebPluginInfoProvider::getWebVisiblePluginInfo):
2792
2793 2018-03-05  Andy Estes  <aestes@apple.com>
2794
2795         [Mac] Teach WebCore::Pasteboard about file promise drags
2796         https://bugs.webkit.org/show_bug.cgi?id=183314
2797         <rdar://problem/38105493>
2798
2799         Reviewed by Darin Adler.
2800
2801         Added a FIXME comment.
2802
2803         * WebView/WebView.mm:
2804         (-[WebView performDragOperation:]):
2805
2806 2018-03-04  Yusuke Suzuki  <utatane.tea@gmail.com>
2807
2808         [WTF] Move currentCPUTime and sleep(Seconds) to CPUTime.h and Seconds.h respectively
2809         https://bugs.webkit.org/show_bug.cgi?id=183312
2810
2811         Reviewed by Mark Lam.
2812
2813         Remove wtf/CurrentTime.h include pragma.
2814
2815         * WebView/WebFrame.mm:
2816         * WebView/WebPDFView.mm:
2817
2818 2018-03-04  Tim Horton  <timothy_horton@apple.com>
2819
2820         Make !ENABLE(DATA_DETECTION) iOS build actually succeed
2821         https://bugs.webkit.org/show_bug.cgi?id=183283
2822         <rdar://problem/38062148>
2823
2824         Reviewed by Sam Weinig.
2825
2826         * Configurations/FeatureDefines.xcconfig:
2827
2828 2018-02-28  Alex Christensen  <achristensen@webkit.org>
2829
2830         Reduce use of NetworkingContext in WebKit
2831         https://bugs.webkit.org/show_bug.cgi?id=183213
2832
2833         Reviewed by Brady Eidson.
2834
2835         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2836         (WebKit::NetscapePluginInstanceProxy::getProxy):
2837         * Plugins/WebNetscapePluginView.mm:
2838         (-[WebNetscapePluginView getVariable:forURL:value:length:]):
2839
2840 2018-02-17  Darin Adler  <darin@apple.com>
2841
2842         Prepare for ExtendedColor changes (first step)
2843         https://bugs.webkit.org/show_bug.cgi?id=182904
2844
2845         Reviewed by Sam Weinig.
2846
2847         * Misc/WebKitNSStringExtras.mm:
2848         (-[NSString _web_drawAtPoint:font:textColor:]): Use colorFromNSColor.
2849
2850 2018-02-22  Yusuke Suzuki  <utatane.tea@gmail.com>
2851
2852         Remove currentTime() / currentTimeMS()
2853         https://bugs.webkit.org/show_bug.cgi?id=183052
2854
2855         Reviewed by Mark Lam.
2856
2857         * WebCoreSupport/WebFrameLoaderClient.h:
2858         * WebCoreSupport/WebFrameLoaderClient.mm:
2859         (WebFrameLoaderClient::dispatchWillPerformClientRedirect):
2860
2861 2018-02-16  Youenn Fablet  <youenn@apple.com>
2862
2863         Allow specifying which plug-ins are supported
2864         https://bugs.webkit.org/show_bug.cgi?id=182748
2865
2866         Reviewed by Chris Dumez.
2867
2868         * WebCoreSupport/WebPluginInfoProvider.h:
2869         * WebCoreSupport/WebPluginInfoProvider.mm:
2870         (WebPluginInfoProvider::getPluginInfo):
2871         (WebPluginInfoProvider::getWebVisiblePluginInfo):
2872
2873 2018-02-16  Brent Fulgham  <bfulgham@apple.com>
2874
2875         [Cocoa][WebKitLegacy] REGRESSION(r221559): Coda 2 crashes when switching views
2876         https://bugs.webkit.org/show_bug.cgi?id=182882
2877         <rdar://problem/35672661>
2878
2879         Reviewed by Dan Bernstein.
2880
2881         Make sure the smart pointer hold the collection of subviews lives at least as
2882         long as the loop using it.
2883
2884         * WebView/WebHTMLView.mm:
2885         (-[WebHTMLView _web_makePluginSubviewsPerformSelector:withObject:]):
2886
2887 2018-02-14  Daniel Bates  <dabates@apple.com>
2888
2889         Disallow cross-origin subresources from asking for credentials
2890         https://bugs.webkit.org/show_bug.cgi?id=182579
2891         <rdar://problem/36162271>
2892
2893         Reviewed by Andy Estes.
2894
2895         Add a private preference to toggle allowing non-mixed content cross-origin subresources to load.
2896         DumpRenderTree toggles this preference when it sees the test option allowCrossOriginSubresourcesToAskForCredential.
2897
2898         * WebView/WebPreferenceKeysPrivate.h:
2899         * WebView/WebPreferences.mm:
2900         (+[WebPreferences initialize]):
2901         (-[WebPreferences allowCrossOriginSubresourcesToAskForCredentials]):
2902         (-[WebPreferences setAllowCrossOriginSubresourcesToAskForCredentials:]):
2903         * WebView/WebPreferencesPrivate.h:
2904         * WebView/WebView.mm:
2905         (-[WebView _preferencesChanged:]):
2906
2907 2018-02-14  Ross Kirsling  <ross.kirsling@sony.com>
2908
2909         Remove ForwardingHeaders directory from WebKitLegacy/mac.
2910         https://bugs.webkit.org/show_bug.cgi?id=182738
2911
2912         Reviewed by Darin Adler.
2913
2914         * ForwardingHeaders/collector/handles/Global.h: Removed.
2915         * ForwardingHeaders/debugger/DebuggerCallFrame.h: Removed.
2916         * ForwardingHeaders/runtime/Completion.h: Removed.
2917         * ForwardingHeaders/runtime/Error.h: Removed.
2918         * ForwardingHeaders/runtime/JSCJSValue.h: Removed.
2919         * ForwardingHeaders/runtime/JSFunction.h: Removed.
2920         * ForwardingHeaders/runtime/JSLock.h: Removed.
2921         * ForwardingHeaders/runtime/JSObject.h: Removed.
2922         * ForwardingHeaders/runtime/JSString.h: Removed.
2923         * ForwardingHeaders/runtime/Protect.h: Removed.
2924         * ForwardingHeaders/runtime/SymbolTable.h: Removed.
2925
2926 2018-02-09  Per Arne Vollan  <pvollan@apple.com>
2927
2928         Follow-up fixes after moving WebVideoFullscreenController from WebCore to WebKitLegacy.
2929         https://bugs.webkit.org/show_bug.cgi?id=182641
2930
2931         Reviewed by Dan Bernstein.
2932
2933         Remove incorrect use of WEBCORE_EXPORT and namespace WebCore after the files were moved in
2934         https://trac.webkit.org/changeset/228308.
2935
2936         * WebView/WebVideoFullscreenController.h:
2937         * WebView/WebVideoFullscreenHUDWindowController.mm:
2938         * WebView/WebWindowAnimation.h:
2939         * WebView/WebWindowAnimation.mm:
2940         (WebCore::WebWindowAnimationDurationFromDuration): Deleted.
2941         (WebCore::scaledRect): Deleted.
2942         (WebCore::squaredDistance): Deleted.
2943
2944 2018-02-09  Per Arne Vollan  <pvollan@apple.com>
2945
2946         Unreviewed 32-bit build fix after <https://trac.webkit.org/changeset/228308>.
2947
2948         * WebView/WebWindowAnimation.mm:
2949         (-[WebWindowScaleAnimation additionalDurationNeededToReachFinalFrame]):
2950
2951 2018-02-08  Per Arne Vollan  <pvollan@apple.com>
2952
2953         Move WebVideoFullscreenController from WebCore to WebKitLegacy.
2954         https://bugs.webkit.org/show_bug.cgi?id=182615
2955
2956         Reviewed by Eric Carlson.
2957
2958         It is only used by WK1. Also there are a few references to NSApp in WebVideoFullscreenController.mm.
2959         Ideally, we should not reference NSApp in WebCore.
2960
2961         * WebView/WebFullScreenController.mm:
2962         * WebView/WebVideoFullscreenController.h: Copied from Source/WebCore/platform/mac/WebVideoFullscreenController.h.
2963         * WebView/WebVideoFullscreenController.mm: Copied from Source/WebCore/platform/mac/WebVideoFullscreenController.mm.
2964         * WebView/WebVideoFullscreenHUDWindowController.h: Copied from Source/WebCore/platform/mac/WebVideoFullscreenHUDWindowController.h.
2965         * WebView/WebVideoFullscreenHUDWindowController.mm: Copied from Source/WebCore/platform/mac/WebVideoFullscreenHUDWindowController.mm.
2966         * WebView/WebView.mm:
2967         * WebView/WebWindowAnimation.h: Copied from Source/WebCore/platform/mac/WebWindowAnimation.h.
2968         * WebView/WebWindowAnimation.mm: Copied from Source/WebCore/platform/mac/WebWindowAnimation.mm.
2969
2970 2018-01-13  Darin Adler  <darin@apple.com>
2971
2972         Event improvements
2973         https://bugs.webkit.org/show_bug.cgi?id=179591
2974
2975         Reviewed by Chris Dumez.
2976
2977         * DOM/DOMWheelEvent.mm:
2978         (-[DOMWheelEvent initWheelEvent:wheelDeltaY:view:screenX:screenY:clientX:clientY:ctrlKey:altKey:shiftKey:metaKey:]):
2979         Call initWebKitWheelEvent.
2980
2981         * Plugins/Hosted/NetscapePluginInstanceProxy.mm: Removed include of ScriptValue.h.
2982         * WebCoreSupport/WebInspectorClient.mm: Ditto.
2983         * WebView/WebFrame.mm: Ditto.
2984
2985         * WebView/WebHTMLView.mm:
2986         (-[WebHTMLView _interpretKeyEvent:savingCommands:]): Updated for name change from keyEvent to
2987         underlyingPlatformEvent.
2988         (-[WebHTMLView _handleEditingKeyEvent:]): Ditto.
2989
2990         * WebView/WebScriptWorld.mm:
2991         (+[WebScriptWorld scriptWorldForGlobalContext:]): Pass reference to currentWorld function.
2992
2993         * WebView/WebView.mm: Removed include of ScriptValue.h.
2994
2995 2018-02-06  Don Olmstead  <don.olmstead@sony.com>
2996
2997         Remove WebCore/ForwardingHeaders directory
2998         https://bugs.webkit.org/show_bug.cgi?id=182347
2999
3000         Reviewed by Keith Miller.
3001
3002         * Carbon/CarbonWindowAdapter.mm:
3003         * DOM/WebDOMOperations.mm:
3004         * History/WebBackForwardList.mm:
3005         * History/WebHistoryItem.mm:
3006         * Misc/WebCache.mm:
3007         * Misc/WebElementDictionary.mm:
3008         * Misc/WebIconDatabase.mm:
3009         * Misc/WebStringTruncator.mm:
3010         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3011         * Plugins/Hosted/ProxyInstance.mm:
3012         * Plugins/Hosted/ProxyRuntimeObject.mm:
3013         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
3014         * Plugins/WebBaseNetscapePluginView.mm:
3015         * Plugins/WebBasePluginPackage.mm:
3016         * Plugins/WebNetscapePluginStream.mm:
3017         * Plugins/WebNetscapePluginView.mm:
3018         * Plugins/WebPluginController.mm:
3019         * WebCoreSupport/WebEditorClient.mm:
3020         * WebCoreSupport/WebFrameLoaderClient.mm:
3021         * WebCoreSupport/WebInspectorClient.h:
3022         * WebCoreSupport/WebInspectorClient.mm:
3023         * WebView/WebDataSource.mm:
3024         * WebView/WebFrame.mm:
3025         * WebView/WebHTMLRepresentation.mm:
3026         * WebView/WebHTMLView.mm:
3027         * WebView/WebPreferences.mm:
3028         * WebView/WebScriptDebugDelegate.mm:
3029         * WebView/WebScriptDebugger.h:
3030         * WebView/WebTextIterator.mm:
3031         * WebView/WebView.mm:
3032         * WebView/WebViewData.mm:
3033
3034 2018-01-30  Don Olmstead  <don.olmstead@sony.com>
3035
3036         JSExports.h should be included as <JavaScriptCore/JSExportMacros.h>
3037         https://bugs.webkit.org/show_bug.cgi?id=182312
3038
3039         Reviewed by Michael Catanzaro.
3040
3041         * WebKitPrefix.h:
3042
3043 2018-01-29  Jiewen Tan  <jiewen_tan@apple.com>
3044
3045         [WebAuthN] Add a compile-time feature flag
3046         https://bugs.webkit.org/show_bug.cgi?id=182211
3047         <rdar://problem/36936365>
3048
3049         Reviewed by Brent Fulgham.
3050
3051         * Configurations/FeatureDefines.xcconfig:
3052
3053 2018-01-27  Dan Bernstein  <mitz@apple.com>
3054
3055         HaveInternalSDK includes should be "#include?"
3056         https://bugs.webkit.org/show_bug.cgi?id=179670
3057
3058         * Configurations/Base.xcconfig:
3059
3060 2018-01-24  Alex Christensen  <achristensen@webkit.org>
3061
3062         Remove unused QTKit preference
3063         https://bugs.webkit.org/show_bug.cgi?id=181968
3064
3065         Reviewed by Alexey Proskuryakov.
3066
3067         * WebView/WebPreferenceKeysPrivate.h:
3068         * WebView/WebPreferences.mm:
3069         (+[WebPreferences initialize]):
3070         (-[WebPreferences setQTKitEnabled:]): Deleted.
3071         (-[WebPreferences isQTKitEnabled]): Deleted.
3072         * WebView/WebPreferencesPrivate.h:
3073         * WebView/WebView.mm:
3074         (-[WebView _preferencesChanged:]):
3075
3076 2018-01-23  Wenson Hsieh  <wenson_hsieh@apple.com>
3077
3078         Harden against layout passes triggered when iterating through HTMLFormElement::associatedElements
3079         https://bugs.webkit.org/show_bug.cgi?id=182037
3080         <rdar://problem/36747812>
3081
3082         Reviewed by Ryosuke Niwa.
3083
3084         Rename associatedElements() to unsafeAssociatedElements(), and add ScriptDisallowedScopes. See WebCore ChangeLog
3085         for more details.
3086
3087         * WebView/WebHTMLRepresentation.mm:
3088         (-[WebHTMLRepresentation elementWithName:inForm:]):
3089         (-[WebHTMLRepresentation controlsInForm:]):
3090
3091 2018-01-23  Alex Christensen  <achristensen@webkit.org>
3092
3093         Use CompletionHandlers for ResourceHandleClient::didReceiveResponseAsync
3094         https://bugs.webkit.org/show_bug.cgi?id=181961
3095
3096         Reviewed by Michael Catanzaro.
3097
3098         * WebView/WebPreferences.mm:
3099
3100 2018-01-23  Commit Queue  <commit-queue@webkit.org>
3101
3102         Unreviewed, rolling out r227437.
3103         https://bugs.webkit.org/show_bug.cgi?id=182011
3104
3105         broke build (Requested by alexchristensen on #webkit).
3106
3107         Reverted changeset:
3108
3109         "Remove unused QTKit preference"
3110         https://bugs.webkit.org/show_bug.cgi?id=181968
3111         https://trac.webkit.org/changeset/227437
3112
3113 2018-01-23  Alex Christensen  <achristensen@webkit.org>
3114
3115         Remove unused QTKit preference
3116         https://bugs.webkit.org/show_bug.cgi?id=181968
3117
3118         Reviewed by Alexey Proskuryakov.
3119
3120         * WebView/WebPreferenceKeysPrivate.h:
3121         * WebView/WebPreferences.mm:
3122         (+[WebPreferences initialize]):
3123         (-[WebPreferences setQTKitEnabled:]): Deleted.
3124         (-[WebPreferences isQTKitEnabled]): Deleted.
3125         * WebView/WebPreferencesPrivate.h:
3126         * WebView/WebView.mm:
3127         (-[WebView _preferencesChanged:]):
3128
3129 2018-01-22  Wenson Hsieh  <wenson_hsieh@apple.com>
3130
3131         WebViews created via -initSimpleHTMLDocumentWithStyle: don't propagate attachmentElementEnabled state
3132         https://bugs.webkit.org/show_bug.cgi?id=181960
3133         <rdar://problem/36431678>
3134
3135         Reviewed by Tim Horton.
3136
3137         Mail's compose view is initialized via the -initSimpleHTMLDocumentWithStyle: codepath. This is intended to be
3138         a fast path for initializing WebViews, which bypasses certain initialization steps present in the regular -init
3139         path, such as calling -_preferencesChanged: to sync RuntimeEnabledFeatures with WebPreferences.
3140
3141         This means that even though we set -[WebPreferences attachmentElementEnabled] to YES for Mail, the value of the
3142         RuntimeEnabledFeature isn't updated to match. To fix this, we explicitly invoke
3143         RuntimeEnabledFeatures::setAttachmentElementEnabled here to make sure the value is in sync with WebPreferences.
3144
3145         * WebView/WebView.mm:
3146         (-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):
3147
3148 2018-01-21  Ryosuke Niwa  <rniwa@webkit.org>
3149
3150         Turning off custom pasteboard data doesn't actually turn it off in WK2
3151         https://bugs.webkit.org/show_bug.cgi?id=181920
3152         <rdar://problem/36686429>
3153
3154         Reviewed by Wenson Hsieh.
3155
3156         Always disable custom pasteboard data in WebKit1. See r226156 for details.
3157
3158         * WebView/WebPreferences.mm:
3159         (+[WebPreferences initialize]):
3160         * WebView/WebView.mm:
3161         (-[WebView _preferencesChanged:]):
3162
3163 2018-01-21  Wenson Hsieh  <wenson_hsieh@apple.com>
3164
3165         Add a new feature flag for EXTRA_ZOOM_MODE and reintroduce AdditionalFeatureDefines.h
3166         https://bugs.webkit.org/show_bug.cgi?id=181918
3167
3168         Reviewed by Tim Horton.
3169
3170         Add EXTRA_ZOOM_MODE to FeatureDefines.xconfig (off by default).
3171
3172         * Configurations/FeatureDefines.xcconfig:
3173
3174 2018-01-20  Andy Estes  <aestes@apple.com>
3175
3176         [Apple Pay] Stop eagerly loading PassKit.framework
3177         https://bugs.webkit.org/show_bug.cgi?id=181911
3178         <rdar://problem/36555369>
3179
3180         Reviewed by Tim Horton.
3181
3182         * WebCoreSupport/WebPaymentCoordinatorClient.h:
3183         * WebCoreSupport/WebPaymentCoordinatorClient.mm:
3184         (WebPaymentCoordinatorClient::validatedPaymentNetwork):
3185
3186         Implemented PaymentCoordinatorClient::validatedPaymentNetwork().
3187
3188 2018-01-19  Dean Jackson  <dino@apple.com>
3189
3190         REGRESSION (r221092): Swipe actions are hard to perform in FastMail app
3191         https://bugs.webkit.org/show_bug.cgi?id=181817
3192         <rdar://problem/35274055>
3193
3194         Reviewed by Simon Fraser.
3195
3196         Add a linked-on-or-after check to set passive touch listeners on document in WebCore.
3197
3198         * Misc/WebKitVersionChecks.h:
3199         * WebView/WebView.mm:
3200         (-[WebView _commonInitializationWithFrameName:groupName:]):
3201
3202 2018-01-19  Alex Christensen  <achristensen@webkit.org>
3203
3204         Remove unused WebViewPrivate _allowCookies
3205         https://bugs.webkit.org/show_bug.cgi?id=181812
3206
3207         Reviewed by Tim Horton.
3208
3209         * WebView/WebView.mm:
3210         (+[WebView _setAllowCookies:]): Deleted.
3211         (+[WebView _allowCookies]): Deleted.
3212         * WebView/WebViewPrivate.h:
3213
3214 2018-01-18  Alexey Proskuryakov  <ap@apple.com>
3215
3216         Build fix, remove a call to -[NSWindow setOneShot:]
3217         https://bugs.webkit.org/show_bug.cgi?id=181809
3218
3219         Reviewed by Tim Horton.
3220
3221         * WebView/WebTextCompletionController.mm:
3222         (-[WebTextCompletionController _buildUI]):
3223
3224 2018-01-18  Ryan Haddad  <ryanhaddad@apple.com>
3225
3226         Unreviewed, suppress deprecation warnings to fix the build with a newer SDK.
3227
3228         * Carbon/HIWebView.mm:
3229         (overrideCGContext):
3230         (restoreCGContext):
3231
3232 2018-01-18  Dan Bernstein  <mitz@apple.com>
3233
3234         [Xcode] Streamline and future-proof target-macOS-version-dependent build setting definitions
3235         https://bugs.webkit.org/show_bug.cgi?id=181803
3236
3237         Reviewed by Tim Horton.
3238
3239         * Configurations/Base.xcconfig: Updated.
3240         * Configurations/DebugRelease.xcconfig: Ditto.
3241         * Configurations/FeatureDefines.xcconfig: Adopted macOSTargetConditionals helpers.
3242         * Configurations/Version.xcconfig: Updated.
3243         * Configurations/macOSTargetConditionals.xcconfig: Added. Defines helper build settings
3244           useful for defining settings that depend on the target macOS version.
3245
3246 2018-01-17  Youenn Fablet  <youenn@apple.com>
3247
3248         Put fetch Request.keepalive behind a runtime flag
3249         https://bugs.webkit.org/show_bug.cgi?id=181592
3250
3251         Reviewed by Chris Dumez.
3252
3253         * WebView/WebPreferenceKeysPrivate.h:
3254         * WebView/WebPreferences.mm:
3255         (+[WebPreferences initialize]):
3256         (-[WebPreferences fetchAPIKeepAliveEnabled]):
3257         (-[WebPreferences setFetchAPIKeepAliveEnabled:]):
3258         * WebView/WebPreferencesPrivate.h:
3259         * WebView/WebView.mm:
3260         (-[WebView _preferencesChanged:]):
3261
3262 2018-01-17  Wenson Hsieh  <wenson_hsieh@apple.com>
3263
3264         Add injected bundle SPI to replace subresource URLs when dropping or pasting rich content
3265         https://bugs.webkit.org/show_bug.cgi?id=181637
3266         <rdar://problem/36508471>
3267
3268         Reviewed by Tim Horton.
3269
3270         Add a stub implementation of replacementURLForResource. See WebCore and WebKit ChangeLogs for more detail.
3271
3272         * WebCoreSupport/WebEditorClient.h:
3273         * WebCoreSupport/WebEditorClient.mm:
3274         (WebEditorClient::replacementURLForResource):
3275
3276 2018-01-11  Keith Miller  <keith_miller@apple.com>
3277
3278         Rename ENABLE_ASYNC_ITERATION to ENABLE_JS_ASYNC_ITERATION
3279         https://bugs.webkit.org/show_bug.cgi?id=181573
3280
3281         Reviewed by Simon Fraser.
3282
3283         * Configurations/FeatureDefines.xcconfig:
3284
3285 2018-01-11  Wenson Hsieh  <wenson_hsieh@apple.com>
3286
3287         Send PromisedBlobInfo to the client through DragItem instead of DragClient::prepareToDragPromisedBlob
3288         https://bugs.webkit.org/show_bug.cgi?id=181497
3289
3290         Reviewed by Tim Horton.
3291
3292         See other ChangeLogs for more detail.
3293
3294         * WebCoreSupport/WebDragClient.h:
3295
3296 2018-01-11  Tim Horton  <timothy_horton@apple.com>
3297
3298         Null deref in WebImmediateActionController _dictionaryPopupInfoForRange
3299         https://bugs.webkit.org/show_bug.cgi?id=181523
3300         <rdar://problem/28959131>
3301
3302         Reviewed by Alex Christensen.
3303
3304         * WebView/WebImmediateActionController.mm:
3305         (+[WebImmediateActionController _dictionaryPopupInfoForRange:inFrame:withLookupOptions:indicatorOptions:transition:]):
3306         Apply the change made in r216652 to WebKit1's immediate action controller.
3307
3308         Speculative (but successful in WebKit2) fix for non-reproducible crash when
3309         the startContainer of the range is in an anonymous node.
3310
3311 2018-01-11  Youenn Fablet  <youenn@apple.com>
3312
3313         Replace WebRTCLegacyAPIDisabled by WebRTCLegacyAPIEnabled and switch off WebRTC legacy flag by default
3314         https://bugs.webkit.org/show_bug.cgi?id=181480
3315
3316         Reviewed by Eric Carlson.
3317
3318         * WebView/WebPreferences.mm:
3319         (+[WebPreferences initialize]):
3320
3321 2018-01-08  David Kilzer  <ddkilzer@apple.com>
3322
3323         Fix check-webkit-style issues with WebNSDataExtras.mm
3324         <https://webkit.org/b/181369>
3325
3326         Reviewed by Alex Christensen.
3327
3328         * Misc/WebNSDataExtras.mm:
3329         (-[NSString _web_capitalizeRFC822HeaderFieldName]):
3330         (-[NSData _webkit_guessedMIMETypeForXML]):
3331         (-[NSData _webkit_guessedMIMEType]):
3332         (-[NSData _web_isCaseInsensitiveEqualToCString:]):
3333         (_findEOL):
3334         (-[NSData _webkit_parseRFC822HeaderFields]):
3335         (-[NSData _web_locationAfterFirstBlankLine]):
3336         - Fix all the check-webkit-style warnings.
3337
3338 2018-01-08  David Kilzer  <ddkilzer@apple.com>
3339
3340         Build fix #2: Enable -Wcast-qual for WebInspectorUI, WebKitLegacy, WebKit projects
3341         <https://webkit.org/b/181256>
3342         <rdar://problem/36281730>
3343
3344         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
3345         (WebNetscapePluginEventHandlerCocoa::handleTSMEvent):
3346         - Use reinterpret_cast<NPNSString*>(const_cast<CFMutableStringRef>())
3347           to avoid warnings from casting CFStringRef to NPNSString*.
3348           Note that CFMutableStringRef is the same as CFStringRef
3349           without the const modifier, hence its use in the const_cast<>
3350           above.
3351
3352 2018-01-08  David Kilzer  <ddkilzer@apple.com>
3353
3354         Build fix: Enable -Wcast-qual for WebInspectorUI, WebKitLegacy, WebKit projects
3355         <https://webkit.org/b/181256>
3356         <rdar://problem/36281730>
3357
3358         * Carbon/HIWebView.mm:
3359         (StartUpdateObserver): Include TypeCastsCF.h from WTF, and use
3360         checked_cf_cast<CFRunLoopRef>() to fix warning.
3361
3362 2018-01-07  David Kilzer  <ddkilzer@apple.com>
3363
3364         Enable -Wcast-qual for WebInspectorUI, WebKitLegacy, WebKit projects
3365         <https://webkit.org/b/181256>
3366         <rdar://problem/36281730>
3367
3368         Reviewed by Darin Adler.
3369
3370         * Carbon/CarbonUtils.m:
3371         (PoolCleaner):
3372         - Use #pragmas to ignore -Wcast-qual warnings when using a
3373           C-style cast from CFTypeRef to CFRunloopRef.
3374         * Carbon/CarbonWindowFrame.m:
3375         (-[CarbonWindowFrame title]):
3376         - Use #pragmas to ignore -Wcast-qual warnings when using a
3377           C-style cast from CFStringRef to NSString *.
3378         * Carbon/HIViewAdapter.m:
3379         (+[HIViewAdapter getHIViewForNSView:]):
3380         - Use #pragmas to ignore -Wcast-qual warnings when using a
3381           C-style cast from CFTypeRef to HIViewRef.
3382         * Configurations/Base.xcconfig:
3383         (WARNING_CFLAGS): Add -Wcast-qual.
3384         * Misc/WebElementDictionary.mm:
3385         (-[WebElementDictionary objectForKey:]):
3386         - Use static_cast<SEL>(const_cast<void*>()) to fix
3387           warning.
3388         * Misc/WebNSDataExtras.mm: Renamed from Source/WebKitLegacy/mac/Misc/WebNSDataExtras.m.
3389         (-[NSString _web_capitalizeRFC822HeaderFieldName]):
3390         (-[NSData _webkit_guessedMIMETypeForXML]):
3391         (-[NSData _webkit_guessedMIMEType]):
3392         (-[NSData _web_isCaseInsensitiveEqualToCString:]):
3393         (_findEOL):
3394         (-[NSData _webkit_parseRFC822HeaderFields]):
3395         (-[NSData _web_startsWithBlankLine]):
3396         (-[NSData _web_locationAfterFirstBlankLine]):
3397         - Rename WebNSDataExtras.m to WebNSDataExtras.mm and change file
3398           type to Objective-C++.  This fixes the warnings about
3399           discarding the `const` modifier when casing from CFStringRef
3400           to NSString * because in older clang versions, -Wcast-qual was
3401           completely broken when compiling C++ and Objective-C++ source
3402           files.  In newer clang versions, discarding the `const`
3403           modifier for toll-free bridged types is ignored when compiling
3404           Objective-C++ source.
3405         - Update copyright and license header.
3406         - Use reinterpret_cast<> and static_cast<> to fix warnings
3407           unrelated to (NSString *) C-style casts.
3408         - Replace use of MIN() macro with std::min<> template functions.
3409         - Fix location of `*` for local variables modified above.
3410         * Plugins/Hosted/NetscapePluginHostManager.mm:
3411         (WebKit::NetscapePluginHostManager::spawnPluginHost):
3412         (WebKit::NetscapePluginHostManager::initializeVendorPort):
3413         (WebKit::NetscapePluginHostManager::instantiatePlugin):
3414         - Use static_cast<uint8_t*>(const_cast<void*>()) to fix
3415           warnings.
3416         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3417         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
3418         - Use reinterpret_cast<mig_subsystem_t>(const_cast<struct WKWebKitPluginClient_subsystem*>())
3419           to fix warning.
3420         * Plugins/Hosted/ProxyInstance.mm:
3421         (WebKit::ProxyInstance::invoke):
3422         - Use static_cast<char*>(const_cast<void*>()) to fix
3423           warning when using -[NSData bytes].
3424         (WebKit::ProxyInstance::fieldValue const):
3425         - Use reinterpret_cast<char*>(const_cast<unsigned char*>())
3426           to fix warning when using CFDataGetBytePtr().
3427         * Plugins/Hosted/WebTextInputWindowController.m:
3428         (-[WebTextInputPanel _interpretKeyEvent:string:]):
3429         - Use #pragma to ignore -Wcast-qual warning since there
3430           is not a good way to avoid this warning in Objective-C.
3431         * Plugins/WebNetscapePluginStream.mm:
3432         (WebNetscapePluginStream::deliverData):
3433         - Use const_cast<void*>() to fix warning when using
3434           -[NSData bytes].
3435         * Plugins/WebNetscapePluginView.mm:
3436         (-[WebNetscapePluginView _createPlugin]):
3437         - Change C-style cast to const_cast<char*>() to fix
3438           warning.
3439         * WebCoreSupport/WebChromeClient.mm:
3440         (WebChromeClient::wrapCryptoKey const):
3441         (WebChromeClient::unwrapCryptoKey const):
3442         - Change C-style cast to
3443           static_cast<uint8_t*>(const_cast<void*>() to fix
3444           warning.
3445         * WebView/WebPDFView.mm:
3446         (_applicationInfoForMIMEType):
3447         - Change local variable type from 'NSURL *' to
3448           'CFURLRef' to fix warning.  Cast back to 'NSURL *'
3449           when calling -[NSURL path].
3450
3451 2018-01-05  Dan Bernstein  <mitz@apple.com>
3452
3453         Fixed the build following AppKit API deprecations in a recent SDKs
3454
3455         * WebView/WebFullScreenController.mm:
3456         (-[WebFullScreenController enterFullScreen:]): Suppressed deprecation warnings.
3457         (-[WebFullScreenController exitFullScreen]): Ditto.
3458         (-[WebFullScreenController _startEnterFullScreenAnimationWithDuration:]): Ditto.
3459         (-[WebFullScreenController _startExitFullScreenAnimationWithDuration:]): Ditto.
3460         * WebView/WebHTMLView.mm:
3461         (-[WebHTMLView drawRect:]): Ditto.
3462         (-[WebHTMLView _endPrintModeAndRestoreWindowAutodisplay]): Ditto.
3463         (-[WebHTMLView knowsPageRange:]): Ditto.
3464         * WebView/WebView.mm:
3465         (LayerFlushController::flushLayers): Ditto.
3466
3467 2018-01-03  Wenson Hsieh  <wenson_hsieh@apple.com>
3468
3469         [Attachment Support] Create attachment elements when dropping files on iOS
3470         https://bugs.webkit.org/show_bug.cgi?id=181192
3471         <rdar://problem/36280945>
3472
3473         Reviewed by Tim Horton.
3474
3475         Make some minor adjustments for changes to the pasteboard in WebCore. See WebCore/ChangeLog for more detail.
3476
3477         * WebCoreSupport/WebPlatformStrategies.h:
3478         * WebCoreSupport/WebPlatformStrategies.mm:
3479         (WebPlatformStrategies::informationForItemAtIndex):
3480         (WebPlatformStrategies::getFilenamesForDataInteraction): Deleted.
3481