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