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