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