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