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