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