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