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