36085f475c6303742c5598a0dfabc34fd381ea4d
[WebKit-https.git] / Source / WebKitLegacy / mac / ChangeLog
1 2018-05-14  Daniel Bates  <dabates@apple.com>
2
3         Fix the Apple Internal build
4
5         See <rdar://problem/40237873> for more details.
6
7         * WebView/WebFullScreenController.mm:
8         (-[WebFullScreenController enterFullScreen:]):
9         (-[WebFullScreenController finishedEnterFullScreenAnimation:]):
10         (-[WebFullScreenController exitFullScreen]):
11         (-[WebFullScreenController finishedExitFullScreenAnimation:]):
12         (-[WebFullScreenController _startEnterFullScreenAnimationWithDuration:]):
13         (-[WebFullScreenController _startExitFullScreenAnimationWithDuration:]):
14
15 2018-05-11  Timothy Hatcher  <timothy@apple.com>
16
17         WebHTMLView is not setting aside subviews when drawing.
18
19         https://bugs.webkit.org/show_bug.cgi?id=185561
20         rdar://problem/40172894
21
22         Reviewed by Simon Fraser.
23
24         Use the new method signature for _recursive:displayRectIgnoringOpacity:shouldChangeFontReferenceColor:.
25
26         * WebView/WebHTMLView.mm:
27         (-[WebHTMLView _recursive:displayRectIgnoringOpacity:inContext:shouldChangeFontReferenceColor:stopAtLayerBackedViews:]): Added.
28
29 2018-05-07  Daniel Bates  <dabates@apple.com>
30
31         Substitute CrossOriginPreflightResultCache::clear() for CrossOriginPreflightResultCache::empty()
32         https://bugs.webkit.org/show_bug.cgi?id=185170
33
34         Reviewed by Per Arne Vollan.
35
36         * Misc/WebCache.mm:
37         (+[WebCache empty]):
38
39 2018-05-04  Timothy Hatcher  <timothy@apple.com>
40
41         Deprecate legacy WebView and friends
42         https://bugs.webkit.org/show_bug.cgi?id=185279
43         rdar://problem/33268700
44
45         Reviewed by Tim Horton.
46
47         Added deprecation macros to all the classes, extern strings, and enums.
48
49         * Configurations/WebKitLegacy.xcconfig:
50         Added BUILDING_WEBKIT define to disable the deprecation macros.
51         * DOM/DOMAbstractView.h:
52         * DOM/DOMAttr.h:
53         * DOM/DOMBlob.h:
54         * DOM/DOMCDATASection.h:
55         * DOM/DOMCSSCharsetRule.h:
56         * DOM/DOMCSSFontFaceRule.h:
57         * DOM/DOMCSSImportRule.h:
58         * DOM/DOMCSSMediaRule.h:
59         * DOM/DOMCSSPageRule.h:
60         * DOM/DOMCSSPrimitiveValue.h:
61         * DOM/DOMCSSRule.h:
62         * DOM/DOMCSSRuleList.h:
63         * DOM/DOMCSSStyleDeclaration.h:
64         * DOM/DOMCSSStyleRule.h:
65         * DOM/DOMCSSStyleSheet.h:
66         * DOM/DOMCSSUnknownRule.h:
67         * DOM/DOMCSSValue.h:
68         * DOM/DOMCSSValueList.h:
69         * DOM/DOMCharacterData.h:
70         * DOM/DOMComment.h:
71         * DOM/DOMCounter.h:
72         * DOM/DOMDocument.h:
73         * DOM/DOMDocumentFragment.h:
74         * DOM/DOMDocumentType.h:
75         * DOM/DOMElement.h:
76         * DOM/DOMEntity.h:
77         * DOM/DOMEntityReference.h:
78         * DOM/DOMEvent.h:
79         * DOM/DOMEventException.h:
80         * DOM/DOMEventListener.h:
81         * DOM/DOMEventTarget.h:
82         * DOM/DOMException.h:
83         * DOM/DOMFile.h:
84         * DOM/DOMFileList.h:
85         * DOM/DOMHTMLAnchorElement.h:
86         * DOM/DOMHTMLAppletElement.h:
87         * DOM/DOMHTMLAreaElement.h:
88         * DOM/DOMHTMLBRElement.h:
89         * DOM/DOMHTMLBaseElement.h:
90         * DOM/DOMHTMLBaseFontElement.h:
91         * DOM/DOMHTMLBodyElement.h:
92         * DOM/DOMHTMLButtonElement.h:
93         * DOM/DOMHTMLCanvasElement.h:
94         * DOM/DOMHTMLCollection.h:
95         * DOM/DOMHTMLDListElement.h:
96         * DOM/DOMHTMLDirectoryElement.h:
97         * DOM/DOMHTMLDivElement.h:
98         * DOM/DOMHTMLDocument.h:
99         * DOM/DOMHTMLElement.h:
100         * DOM/DOMHTMLEmbedElement.h:
101         * DOM/DOMHTMLFieldSetElement.h:
102         * DOM/DOMHTMLFontElement.h:
103         * DOM/DOMHTMLFormElement.h:
104         * DOM/DOMHTMLFrameElement.h:
105         * DOM/DOMHTMLFrameSetElement.h:
106         * DOM/DOMHTMLHRElement.h:
107         * DOM/DOMHTMLHeadElement.h:
108         * DOM/DOMHTMLHeadingElement.h:
109         * DOM/DOMHTMLHtmlElement.h:
110         * DOM/DOMHTMLIFrameElement.h:
111         * DOM/DOMHTMLImageElement.h:
112         * DOM/DOMHTMLInputElement.h:
113         * DOM/DOMHTMLLIElement.h:
114         * DOM/DOMHTMLLabelElement.h:
115         * DOM/DOMHTMLLegendElement.h:
116         * DOM/DOMHTMLLinkElement.h:
117         * DOM/DOMHTMLMapElement.h:
118         * DOM/DOMHTMLMarqueeElement.h:
119         * DOM/DOMHTMLMediaElement.h:
120         * DOM/DOMHTMLMenuElement.h:
121         * DOM/DOMHTMLMetaElement.h:
122         * DOM/DOMHTMLModElement.h:
123         * DOM/DOMHTMLOListElement.h:
124         * DOM/DOMHTMLObjectElement.h:
125         * DOM/DOMHTMLOptGroupElement.h:
126         * DOM/DOMHTMLOptionElement.h:
127         * DOM/DOMHTMLOptionsCollection.h:
128         * DOM/DOMHTMLParagraphElement.h:
129         * DOM/DOMHTMLParamElement.h:
130         * DOM/DOMHTMLPreElement.h:
131         * DOM/DOMHTMLQuoteElement.h:
132         * DOM/DOMHTMLScriptElement.h:
133         * DOM/DOMHTMLSelectElement.h:
134         * DOM/DOMHTMLStyleElement.h:
135         * DOM/DOMHTMLTableCaptionElement.h:
136         * DOM/DOMHTMLTableCellElement.h:
137         * DOM/DOMHTMLTableColElement.h:
138         * DOM/DOMHTMLTableElement.h:
139         * DOM/DOMHTMLTableRowElement.h:
140         * DOM/DOMHTMLTableSectionElement.h:
141         * DOM/DOMHTMLTextAreaElement.h:
142         * DOM/DOMHTMLTitleElement.h:
143         * DOM/DOMHTMLUListElement.h:
144         * DOM/DOMHTMLVideoElement.h:
145         * DOM/DOMImplementation.h:
146         * DOM/DOMKeyboardEvent.h:
147         * DOM/DOMMediaError.h:
148         * DOM/DOMMediaList.h:
149         * DOM/DOMMouseEvent.h:
150         * DOM/DOMMutationEvent.h:
151         * DOM/DOMNamedNodeMap.h:
152         * DOM/DOMNode.h:
153         * DOM/DOMNodeFilter.h:
154         * DOM/DOMNodeIterator.h:
155         * DOM/DOMNodeList.h:
156         * DOM/DOMObject.h:
157         * DOM/DOMOverflowEvent.h:
158         * DOM/DOMProcessingInstruction.h:
159         * DOM/DOMProgressEvent.h:
160         * DOM/DOMRGBColor.h:
161         * DOM/DOMRange.h:
162         * DOM/DOMRangeException.h:
163         * DOM/DOMRect.h:
164         * DOM/DOMStyleSheet.h:
165         * DOM/DOMStyleSheetList.h:
166         * DOM/DOMText.h:
167         * DOM/DOMTextEvent.h:
168         * DOM/DOMTimeRanges.h:
169         * DOM/DOMTokenList.h:
170         * DOM/DOMTreeWalker.h:
171         * DOM/DOMUIEvent.h:
172         * DOM/DOMWheelEvent.h:
173         * DOM/DOMXPathException.h:
174         * DOM/DOMXPathExpression.h:
175         * DOM/DOMXPathNSResolver.h:
176         * DOM/DOMXPathResult.h:
177         * History/WebBackForwardList.h:
178         * History/WebHistory.h:
179         * History/WebHistoryItem.h:
180         * Misc/WebDownload.h:
181         * Misc/WebKitErrors.h:
182         * Plugins/WebPluginViewFactory.h:
183         * WebView/WebArchive.h:
184         * WebView/WebDataSource.h:
185         * WebView/WebDocument.h:
186         * WebView/WebEditingDelegate.h:
187         * WebView/WebFormDelegate.h:
188         * WebView/WebFrame.h:
189         * WebView/WebFrameLoadDelegate.h:
190         * WebView/WebFrameView.h:
191         * WebView/WebPolicyDelegate.h:
192         * WebView/WebPreferences.h:
193         * WebView/WebPreferencesPrivate.h:
194         * WebView/WebResourceLoadDelegate.h:
195         * WebView/WebUIDelegate.h:
196         * WebView/WebUIDelegatePrivate.h:
197         * WebView/WebView.h:
198         * WebView/WebViewPrivate.h:
199         * postprocess-headers.sh:
200         Remove step that converts WEBKIT macros to NS macros.
201         Change it to just remove the macros on iOS builds.
202
203 2018-05-01  Eric Carlson  <eric.carlson@apple.com>
204
205         [MediaStream] remove WK1 support
206         https://bugs.webkit.org/show_bug.cgi?id=185136
207
208         Reviewed by Youenn Fablet.
209
210         * WebCoreSupport/WebUserMediaClient.h: Removed.
211         * WebCoreSupport/WebUserMediaClient.mm: Removed.
212         * WebView/WebView.mm:
213         (-[WebView _commonInitializationWithFrameName:groupName:]):
214         (-[WebView _preferencesChanged:]):
215         (-[WebView _setUserMediaClient:]): Deleted.
216         (-[WebView _userMediaClient]): Deleted.
217         * WebView/WebViewData.h:
218         * WebView/WebViewPrivate.h:
219
220 2018-05-01  Oleksandr Skachkov  <gskachkov@gmail.com>
221
222         WebAssembly: add support for stream APIs - JavaScript API
223         https://bugs.webkit.org/show_bug.cgi?id=183442
224
225         Reviewed by Yusuke Suzuki and JF Bastien.
226
227         Add WEBASSEMBLY_STREAMINNG_API feature flag
228
229         * Configurations/FeatureDefines.xcconfig:
230
231 2018-04-30  JF Bastien  <jfbastien@apple.com>
232
233         Use some C++17 features
234         https://bugs.webkit.org/show_bug.cgi?id=185135
235
236         Reviewed by Alex Christensen.
237
238         * Configurations/WebKitLegacy.xcconfig:
239
240 2018-04-27  Chris Dumez  <cdumez@apple.com>
241
242         Use WindowProxy instead of DOMWindow in our IDL
243         https://bugs.webkit.org/show_bug.cgi?id=185022
244
245         Reviewed by Sam Weinig.
246
247         * DOM/DOMAbstractView.mm:
248         (kit):
249         (toWindowProxy):
250         * DOM/DOMAbstractViewInternal.h:
251         * DOM/DOMDocument.mm:
252         (-[DOMDocument defaultView]):
253         (-[DOMDocument getComputedStyle:pseudoElement:]):
254         (-[DOMDocument getMatchedCSSRules:pseudoElement:authorOnly:]):
255         * DOM/DOMHTMLFrameElement.mm:
256         (-[DOMHTMLFrameElement contentWindow]):
257         * DOM/DOMHTMLIFrameElement.mm:
258         (-[DOMHTMLIFrameElement contentWindow]):
259         * DOM/DOMKeyboardEvent.mm:
260         (-[DOMKeyboardEvent initKeyboardEvent:canBubble:cancelable:view:keyIdentifier:location:ctrlKey:altKey:shiftKey:metaKey:altGraphKey:]):
261         (-[DOMKeyboardEvent initKeyboardEvent:canBubble:cancelable:view:keyIdentifier:location:ctrlKey:altKey:shiftKey:metaKey:]):
262         (-[DOMKeyboardEvent initKeyboardEvent:canBubble:cancelable:view:keyIdentifier:keyLocation:ctrlKey:altKey:shiftKey:metaKey:altGraphKey:]):
263         (-[DOMKeyboardEvent initKeyboardEvent:canBubble:cancelable:view:keyIdentifier:keyLocation:ctrlKey:altKey:shiftKey:metaKey:]):
264         * DOM/DOMMouseEvent.mm:
265         (-[DOMMouseEvent initMouseEvent:canBubble:cancelable:view:detail:screenX:screenY:clientX:clientY:ctrlKey:altKey:shiftKey:metaKey:button:relatedTarget:]):
266         * DOM/DOMTextEvent.mm:
267         (-[DOMTextEvent initTextEvent:canBubbleArg:cancelableArg:viewArg:dataArg:]):
268         * DOM/DOMUIEvent.mm:
269         (-[DOMUIEvent view]):
270         (-[DOMUIEvent initUIEvent:canBubble:cancelable:view:detail:]):
271         * DOM/DOMWheelEvent.mm:
272         (-[DOMWheelEvent initWheelEvent:wheelDeltaY:view:screenX:screenY:clientX:clientY:ctrlKey:altKey:shiftKey:metaKey:]):
273
274 2018-04-26  Simon Fraser  <simon.fraser@apple.com>
275
276         Implement rendering support for the color-filter CSS property
277         https://bugs.webkit.org/show_bug.cgi?id=185047
278         rdar://problem/39664967
279
280         Reviewed by Tim Horton.
281         
282         The body background should reflect the filtered color.
283
284         * WebView/WebFrame.mm:
285         (-[WebFrame _bodyBackgroundColor]):
286         * WebView/WebView.mm:
287         (-[WebView updateTextTouchBar]): No logic change, just cleanup.
288
289 2018-04-26  Jer Noble  <jer.noble@apple.com>
290
291         WK_COCOA_TOUCH all the things.
292         https://bugs.webkit.org/show_bug.cgi?id=185006
293
294         Reviewed by Tim Horton.
295
296         * Configurations/WebKitLegacy.xcconfig:
297
298 2018-04-26  Daniel Bates  <dabates@apple.com>
299
300         ASSERTION FAILED: ASSERT(!containsImage || MIMETypeRegistry::isSupportedImageResourceMIMEType([resource MIMEType])) in -[NSPasteboard(WebExtras) _web_writePromisedRTFDFromArchive:containsImage:]
301         https://bugs.webkit.org/show_bug.cgi?id=184161
302         <rdar://problem/39051645>
303
304         Reviewed by Dan Bernstein.
305
306         Fixes an assertion failure when quitting an app that uses a Legacy WebKit web view after dragging-and-
307         dropping a PDF embedded using an HTML image element into the same web view.
308
309         When performing a drag-and-drop of a PDF document image (WebCore::PDFDocumentImage) we create a WebArchive
310         from the main frame's WebHTMLView and promise AppKit that we will provide a Rich Text Format (RTF) document
311         from this archive if needed. For some reason, on app termination AppKit requests that the WebHTMLView
312         fulfill its RTF document promise for the WebArchive created at the start of the drag operation. To do this,
313         we need to extract the image resource from the Web Archive. Currently we query MIMETypeRegistry::isSupportedImageResourceMIMEType()
314         to see if the contained image is one that we can handle. However MIMETypeRegistry::isSupportedImageResourceMIMEType()
315         only returns true if WebKit supports creating an image document for the specified MIME type. Disregarding
316         the iOS motivated setting Settings::useImageDocumentForSubframePDF, PDFs and PostScripts do not create an
317         image document when navigated to directly. Since we can support dragging PDF document images we need to
318         query if MIMETypeRegistry::isPDFOrPostScriptMIMEType() in addition to querying MIMETypeRegistry::isSupportedImageResourceMIMEType().
319         We need to do both such queries before falling back to using the main resource of the Web Archive as
320         the image. Otherwise, we will cause an assertion failure if the main resource of the Web Archive is
321         not an image document.
322
323         * Misc/WebNSPasteboardExtras.mm:
324         (-[NSPasteboard _web_writePromisedRTFDFromArchive:containsImage:]):
325
326 2018-04-26  Per Arne Vollan  <pvollan@apple.com>
327
328         Disable content filtering in minimal simulator mode
329         https://bugs.webkit.org/show_bug.cgi?id=185027
330         <rdar://problem/39736091>
331
332         Reviewed by Jer Noble.
333
334         * Configurations/FeatureDefines.xcconfig:
335
336 2018-04-26  Andy VanWagoner  <thetalecrafter@gmail.com>
337
338         [INTL] Implement Intl.PluralRules
339         https://bugs.webkit.org/show_bug.cgi?id=184312
340
341         Reviewed by JF Bastien.
342
343         Added Intl.PluralRules feature flag.
344
345         * Configurations/FeatureDefines.xcconfig:
346
347 2018-04-25  Jiewen Tan  <jiewen_tan@apple.com>
348
349         Remove access to keychain from the WebContent process
350         https://bugs.webkit.org/show_bug.cgi?id=184428
351         <rdar://problem/13150903>
352
353         Reviewed by Brent Fulgham.
354
355         This patch does the followings:
356         1. Added necessary support to move HTMLKeygenElement's operation from WebCore space to Client space.
357         2. Craft new SPI signedPublicKeyAndChallengeStringForWebView to supply HTMLKeygenElement with dummy data
358         such that DumpRenderTree tests will not modify the underlying key store (e.g., the macOS Keychain).
359
360         * WebCoreSupport/WebChromeClient.h:
361         * WebCoreSupport/WebChromeClient.mm:
362         (WebChromeClient::signedPublicKeyAndChallengeString const):
363         * WebView/WebUIDelegatePrivate.h:
364
365 2018-04-24  Jer Noble  <jer.noble@apple.com>
366
367         Don't add system framework paths to FRAMEWORK_SEARCH_PATHS
368         https://bugs.webkit.org/show_bug.cgi?id=184786
369
370         Reviewed by Tim Horton.
371
372         * Configurations/WebKitLegacy.xcconfig:
373         * MigrateHeaders.make:
374
375 2018-04-23  Daniel Bates  <dabates@apple.com>
376
377         Implement Same-Site cookies
378         https://bugs.webkit.org/show_bug.cgi?id=159464
379         <rdar://problem/27196358>
380
381         Reviewed by Brent Fulgham.
382
383         Pass the Same-Site info through the strategy.
384
385         * WebCoreSupport/WebPlatformStrategies.h:
386         * WebCoreSupport/WebPlatformStrategies.mm:
387         (WebPlatformStrategies::cookiesForDOM):
388         (WebPlatformStrategies::setCookiesFromDOM):
389         (WebPlatformStrategies::cookieRequestHeaderFieldValue):
390         (WebPlatformStrategies::getRawCookies):
391
392 2018-04-23  Zalan Bujtas  <zalan@apple.com>
393
394         [LayoutFormattingContext] Initial commit.
395         https://bugs.webkit.org/show_bug.cgi?id=184896
396
397         Reviewed by Antti Koivisto.
398
399         * Configurations/FeatureDefines.xcconfig:
400
401 2018-04-23  Daniel Bates  <dabates@apple.com>
402
403         Implement Same-Site cookies
404         https://bugs.webkit.org/show_bug.cgi?id=159464
405         <rdar://problem/27196358>
406
407         Reviewed by Brent Fulgham.
408
409         Pass the Same-Site info through the strategy.
410
411         * WebCoreSupport/WebPlatformStrategies.h:
412         * WebCoreSupport/WebPlatformStrategies.mm:
413         (WebPlatformStrategies::cookiesForDOM):
414         (WebPlatformStrategies::setCookiesFromDOM):
415         (WebPlatformStrategies::cookieRequestHeaderFieldValue):
416         (WebPlatformStrategies::getRawCookies):
417
418 2018-04-20  Timothy Hatcher  <timothy@apple.com>
419
420         NULL dereference crash sometimes under [super initWithCoder:] in WebView
421
422         https://bugs.webkit.org/show_bug.cgi?id=184851
423         rdar://problem/39611236
424
425         Reviewed by Tim Horton.
426
427         * WebView/WebView.mm:
428         (-[WebView _commonInitializationWithFrameName:groupName:]):
429         (-[WebView effectiveAppearanceDidChange]):
430         Added a null check and call the code later in initialization.
431
432 2018-04-20  Tim Horton  <timothy_horton@apple.com>
433
434         Adjust geolocation feature flag
435         https://bugs.webkit.org/show_bug.cgi?id=184856
436
437         Reviewed by Wenson Hsieh.
438
439         * Configurations/FeatureDefines.xcconfig:
440
441 2018-04-18  Jer Noble  <jer.noble@apple.com>
442
443         Don't put build products into WK_ALTERNATE_WEBKIT_SDK_PATH for engineering builds
444         https://bugs.webkit.org/show_bug.cgi?id=184762
445
446         Reviewed by Dan Bernstein.
447
448         * Configurations/WebKitLegacy.xcconfig:
449
450 2018-04-20  Youenn Fablet  <youenn@apple.com>
451
452         Make PluginData cache its web visible plugins
453         https://bugs.webkit.org/show_bug.cgi?id=184421
454
455         Reviewed by Chris Dumez.
456
457         * WebCoreSupport/WebPluginInfoProvider.h:
458         * WebCoreSupport/WebPluginInfoProvider.mm:
459         (WebPluginInfoProvider::pluginInfo):
460         (WebPluginInfoProvider::webVisiblePluginInfo):
461
462 2018-04-19  Chris Dumez  <cdumez@apple.com>
463
464         Rename JSDOMWindowProxy to JSWindowProxy
465         https://bugs.webkit.org/show_bug.cgi?id=184797
466
467         Reviewed by Sam Weinig.
468
469         Rename JSDOMWindowProxy to JSWindowProxy for consistency with WindowProxy.
470
471         * DOM/DOMUtility.mm:
472         (createDOMWrapper):
473         * WebView/WebFrame.mm:
474         (-[WebFrame _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]):
475
476 2018-04-19  David Kilzer  <ddkilzer@apple.com>
477
478         Enable Objective-C weak references
479         <https://webkit.org/b/184789>
480         <rdar://problem/39571716>
481
482         Reviewed by Dan Bernstein.
483
484         * Configurations/Base.xcconfig:
485         (CLANG_ENABLE_OBJC_WEAK): Enable.
486
487 2018-04-18  Chris Dumez  <cdumez@apple.com>
488
489         Rename WindowProxyController to WindowProxy
490         https://bugs.webkit.org/show_bug.cgi?id=184756
491
492         Reviewed by Sam Weinig.
493
494         Rename WindowProxyController to WindowProxy for clarity. When the IDL uses WindowProxy, the implementation
495         needed use WindowProxyController type, which was a bit confusing.
496
497         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
498         (WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
499         * WebView/WebFrame.mm:
500         (-[WebFrame _attachScriptDebugger]):
501
502 2018-04-17  Jonathan Bedard  <jbedard@apple.com>
503
504         Unreviewed rollout of r230632. Regression in memory usage.
505
506         That bug tracked in https://bugs.webkit.org/show_bug.cgi?id=184569.
507
508         * WebView/WebPreferences.mm:
509         (+[WebPreferences initialize]):
510
511 2018-04-17  Chris Dumez  <cdumez@apple.com>
512
513         REGRESSION (r229831): CMD-clicking an iCloud web app link unexpectedly opens that link in a new tab and the current tab
514         https://bugs.webkit.org/show_bug.cgi?id=184678
515         <rdar://problem/39422122>
516
517         Reviewed by Alex Christensen.
518
519         Add new parameter to dispatchDecidePolicyForNavigationAction.
520
521         * WebCoreSupport/WebFrameLoaderClient.h:
522         * WebCoreSupport/WebFrameLoaderClient.mm:
523         (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
524
525 2018-04-13  Chris Dumez  <cdumez@apple.com>
526
527         Split WindowProxy handling out of ScriptController and into a new class owned by AbstractFrame
528         https://bugs.webkit.org/show_bug.cgi?id=184591
529
530         Reviewed by Sam Weinig.
531
532         Split WindowProxy handling out of ScriptController and into a new class owned by AbstractFrame.
533         RemoteFrames do not need a ScriptController but do need to maintain WindowProxies.
534         This is work towards fixing Bug 184515.
535
536         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
537         (WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
538         * WebView/WebFrame.mm:
539         (-[WebFrame _attachScriptDebugger]):
540
541 2018-04-12  Antoine Quint  <graouts@apple.com>
542
543         [Web Animations] Turn CSS Animations and CSS Transitions as Web Animations on by default
544         https://bugs.webkit.org/show_bug.cgi?id=184569
545         <rdar://problem/38671301>
546
547         Reviewed by Jon Lee.
548
549         * WebView/WebPreferences.mm:
550
551 2018-04-05  Yusuke Suzuki  <utatane.tea@gmail.com>
552
553         [WTF] Remove StaticLock
554         https://bugs.webkit.org/show_bug.cgi?id=184332
555
556         Reviewed by Mark Lam.
557
558         * DOM/DOMInternal.mm:
559         (getDOMWrapper):
560         (addDOMWrapper):
561         (removeDOMWrapper):
562
563 2018-04-04  Brent Fulgham  <bfulgham@apple.com>
564
565         Failures from mach port reference handling should be fatal
566         https://bugs.webkit.org/show_bug.cgi?id=184202
567         <rdar://problem/37771114>
568
569         Reviewed by Anders Carlsson.
570
571         * Plugins/Hosted/NetscapePluginHostManager.mm:
572         (WebKit::NetscapePluginHostManager::spawnPluginHost): Adopt new 'safe mach_port_t deallocation' function.
573
574 2018-04-03  Andy Estes  <aestes@apple.com>
575
576         [Mac] Prioritize file promises over filenames during drag and drop
577         https://bugs.webkit.org/show_bug.cgi?id=184237
578         <rdar://problem/38278076>
579
580         Reviewed by Wenson Hsieh.
581
582         * WebView/WebView.mm:
583         (-[WebView performDragOperation:]):
584
585 2018-04-03  Chris Dumez  <cdumez@apple.com>
586
587         Drop MainFrame class
588         https://bugs.webkit.org/show_bug.cgi?id=184191
589
590         Reviewed by Darin Adler.
591
592         Drop MainFrame class and move contents into Page / Frame since there is a 1:1
593         relationship between the Page and the MainFrame.
594
595         This is ground work for introducing LocalFrame / RemoteFrame concepts.
596
597         * WebCoreSupport/WebDragClient.mm:
598         * WebCoreSupport/WebFrameLoaderClient.mm:
599         * WebCoreSupport/WebInspectorClient.mm:
600         * WebCoreSupport/WebPlatformStrategies.mm:
601         * WebCoreSupport/WebPluginInfoProvider.mm:
602         * WebView/WebFrame.mm:
603         * WebView/WebFrameView.mm:
604         * WebView/WebHTMLView.mm:
605         * WebView/WebView.mm:
606
607 2018-04-02  Jer Noble  <jer.noble@apple.com>
608
609         Enable Legacy EME for all WebKit & WebKitLegacy clients
610         https://bugs.webkit.org/show_bug.cgi?id=184018
611         <rdar://problem/34887387>
612
613         Reviewed by Eric Carlson.
614
615         * WebView/WebPreferences.mm:
616         (+[WebPreferences initialize]):
617
618 2018-03-29  JF Bastien  <jfbastien@apple.com>
619
620         Use Forward.h instead of forward-declaring WTF::String
621         https://bugs.webkit.org/show_bug.cgi?id=184172
622         <rdar://problem/39026146>
623
624         Reviewed by Yusuke Suzuki.
625
626         As part of #184164 I'm changing WTF::String, and the forward
627         declarations are just wrong because I'm making it templated. We
628         should use Forward.h anyways, so do that instead.
629
630         * WebView/WebScriptDebugger.h:
631
632 2018-03-28  Brent Fulgham  <bfulgham@apple.com>
633
634         Protect against invalid mach ports returned by mach_port_request_notification
635         https://bugs.webkit.org/show_bug.cgi?id=184106
636         <rdar://problem/37865316>
637
638         Reviewed by Chris Dumez.
639
640         * Plugins/Hosted/NetscapePluginHostProxy.mm:
641         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy): Check return value from 'mach_port_request_notification'
642         and clean up if it experienced an error.
643         (WebKit::NetscapePluginHostProxy::processRequests): Drive-by-fix: Include formatted mach error message in logging.
644
645 2018-03-28  Brent Fulgham  <bfulgham@apple.com>
646
647         Avoid uninitialized mach ports
648         https://bugs.webkit.org/show_bug.cgi?id=184090
649         <rdar://problem/37261129>
650
651         Reviewed by Chris Dumez.
652
653         It is possible for mach_port_allocate to return an error, but we rarely check its return value. The value
654         of the argument passed to mach_port_allocate is not guaranteed to be valid when it returns an error, so
655         there is a potential for us to try to use invalid ports.
656
657         We should always check return values, and ensure that the mach port variables we seek to initialize are
658         kept in a valid state.
659
660         Reviewed by Chris Dumez.
661
662         * Plugins/Hosted/NetscapePluginHostManager.h:
663         * Plugins/Hosted/NetscapePluginHostManager.mm:
664         (WebKit::NetscapePluginHostManager::hostForPlugin): Initialize port to a valid state, ASSERT if an invalid
665         port is passed to an API function.
666         (WebKit::NetscapePluginHostManager::spawnPluginHost): Ditto.
667         (WebKit::NetscapePluginHostManager::initializeVendorPort): Ditto.
668         * Plugins/Hosted/NetscapePluginHostProxy.h:
669         * Plugins/Hosted/NetscapePluginHostProxy.mm:
670         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy): Ditto.
671         (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy): Ditto.
672         (WebKit::NetscapePluginHostProxy::processRequests): Ditto.
673         (WKPCStatusText): Ditto.
674         (WKPCLoadURL): Ditto.
675         (WKPCCancelLoadURL): Ditto.
676         (WKPCInvalidateRect): Ditto.
677         (WKPCGetScriptableNPObjectReply): Ditto.
678         (WKPCBooleanReply): Ditto.
679         (WKPCBooleanAndDataReply): Ditto.
680         (WKPCInstantiatePluginReply): Ditto.
681         (WKPCGetWindowNPObject): Ditto.
682         (WKPCGetPluginElementNPObject): Ditto.
683         (WKPCForgetBrowserObject): Ditto.
684         (WKPCEvaluate): Ditto.
685         (WKPCGetStringIdentifier): Ditto.
686         (WKPCGetIntIdentifier): Ditto.
687         (WKPCInvoke): Ditto.
688         (WKPCInvokeDefault): Ditto.
689         (WKPCConstruct): Ditto.
690         (WKPCGetProperty): Ditto.
691         (WKPCSetProperty): Ditto.
692         (WKPCRemoveProperty): Ditto.
693         (WKPCHasProperty): Ditto.
694         (WKPCHasMethod): Ditto.
695         (WKPCIdentifierInfo): Ditto.
696         (WKPCEnumerate): Ditto.
697         (WKPCSetMenuBarVisible): Ditto.
698         (WKPCSetFullscreenWindowIsShowing): Ditto.
699         (WKPCSetModal): Ditto.
700         (WKPCGetCookies): Ditto.
701         (WKPCGetProxy): Ditto.
702         (WKPCSetCookies): Ditto.
703         (WKPCGetAuthenticationInfo): Ditto.
704         (WKPCConvertPoint): Ditto.
705         (WKPCLayerHostingModeChanged): Ditto.
706         (WKPCSetException): Ditto.
707
708 2018-03-26  Tim Horton  <timothy_horton@apple.com>
709
710         Adopt WK_ALTERNATE_FRAMEWORKS_DIR in WebKit
711         https://bugs.webkit.org/show_bug.cgi?id=184030
712         <rdar://problem/38895281>
713
714         Reviewed by Dan Bernstein.
715
716         * Configurations/Base.xcconfig:
717
718 2018-03-26  Chris Dumez  <cdumez@apple.com>
719
720         Use SecurityOriginData more consistently in Service Worker code
721         https://bugs.webkit.org/show_bug.cgi?id=183969
722
723         Reviewed by Darin Adler.
724
725         Use SecurityOrigin::data() instead of SecurityOriginData::fromSecurityOrigin().
726
727         * Storage/WebDatabaseManager.mm:
728         (-[WebDatabaseManager databasesWithOrigin:]):
729         (-[WebDatabaseManager deleteOrigin:]):
730         (-[WebDatabaseManager deleteDatabase:withOrigin:]):
731         * Storage/WebDatabaseQuotaManager.mm:
732         (-[WebDatabaseQuotaManager usage]):
733         (-[WebDatabaseQuotaManager quota]):
734         (-[WebDatabaseQuotaManager setQuota:]):
735         * Storage/WebStorageManager.mm:
736         (-[WebStorageManager deleteOrigin:]):
737         * WebCoreSupport/WebSecurityOrigin.mm:
738         (-[WebSecurityOrigin databaseIdentifier]):
739         (-[WebSecurityOrigin usage]):
740         (-[WebSecurityOrigin quota]):
741         (-[WebSecurityOrigin setQuota:]):
742
743 2018-03-26  Brent Fulgham  <bfulgham@apple.com>
744
745         Warn against cookie access in the WebContent process using ProcessPrivilege assertions
746         https://bugs.webkit.org/show_bug.cgi?id=183911
747         <rdar://problem/38762306>
748
749         Reviewed by Youenn Fablet.
750
751         Initialize the ProcessPrivilege and Cookie API access levels for single-process use.
752
753         * WebView/WebView.mm:
754         (+[WebView initialize]):
755
756 2018-03-26  Alex Christensen  <achristensen@webkit.org>
757
758         Merge ResourceHandleClient::willCacheResponseAsync with ResourceHandleClient::willCacheResponse
759         https://bugs.webkit.org/show_bug.cgi?id=183965
760
761         Reviewed by Chris Dumez.
762
763         * WebCoreSupport/WebFrameLoaderClient.h:
764         * WebCoreSupport/WebFrameLoaderClient.mm:
765         (WebFrameLoaderClient::willCacheResponse const):
766
767 2018-03-25  Commit Queue  <commit-queue@webkit.org>
768
769         Unreviewed, rolling out r229954.
770         https://bugs.webkit.org/show_bug.cgi?id=184000
771
772         Caused many layout tests to crash on Apple High Sierra,
773         Sierra, iOS Simulator and GTK Linux Debug test bots (Requested
774         by dydz on #webkit).
775
776         Reverted changeset:
777
778         "Use SecurityOriginData more consistently in Service Worker
779         code"
780         https://bugs.webkit.org/show_bug.cgi?id=183969
781         https://trac.webkit.org/changeset/229954
782
783 2018-03-24  Chris Dumez  <cdumez@apple.com>
784
785         Use SecurityOriginData more consistently in Service Worker code
786         https://bugs.webkit.org/show_bug.cgi?id=183969
787
788         Reviewed by Darin Adler.
789
790         Use SecurityOrigin::data() instead of SecurityOriginData::fromSecurityOrigin().
791
792         * Storage/WebDatabaseManager.mm:
793         (-[WebDatabaseManager databasesWithOrigin:]):
794         (-[WebDatabaseManager deleteOrigin:]):
795         (-[WebDatabaseManager deleteDatabase:withOrigin:]):
796         * Storage/WebDatabaseQuotaManager.mm:
797         (-[WebDatabaseQuotaManager usage]):
798         (-[WebDatabaseQuotaManager quota]):
799         (-[WebDatabaseQuotaManager setQuota:]):
800         * Storage/WebStorageManager.mm:
801         (-[WebStorageManager deleteOrigin:]):
802         * WebCoreSupport/WebSecurityOrigin.mm:
803         (-[WebSecurityOrigin databaseIdentifier]):
804         (-[WebSecurityOrigin usage]):
805         (-[WebSecurityOrigin quota]):
806         (-[WebSecurityOrigin setQuota:]):
807
808 2018-03-24  Timothy Horton  <timothy_horton@apple.com>
809
810         Fix the build
811
812         * WebView/WebView.mm:
813
814 2018-03-23  Tim Horton  <timothy_horton@apple.com>
815
816         Fix the build with no pasteboard
817         https://bugs.webkit.org/show_bug.cgi?id=183973
818
819         Reviewed by Dan Bernstein.
820
821         * Configurations/FeatureDefines.xcconfig:
822         * WebView/WebView.mm:
823         (-[WebView _requestStartDataInteraction:globalPosition:]):
824         (-[WebView _getDataInteractionData]):
825         (-[WebView _dataOperationTextIndicator]):
826         (-[WebView _dragSourceAction]):
827         (-[WebView _draggedLinkTitle]):
828         (-[WebView _draggedLinkURL]):
829         (-[WebView _draggedElementBounds]):
830         (-[WebView _enteredDataInteraction:client:global:operation:]):
831         (-[WebView _updatedDataInteraction:client:global:operation:]):
832         (-[WebView _exitedDataInteraction:client:global:operation:]):
833         (-[WebView _performDataInteraction:client:global:operation:]):
834         (-[WebView _tryToPerformDataInteraction:client:global:operation:]):
835         (-[WebView _endedDataInteraction:global:]):
836         (-[WebView _dataInteractionCaretRect]):
837         * WebView/WebViewPrivate.h:
838
839 2018-03-23  Tim Horton  <timothy_horton@apple.com>
840
841         Adopt WK_ALTERNATE_FRAMEWORKS_DIR in WebKitLegacy and update install name
842         https://bugs.webkit.org/show_bug.cgi?id=183960
843         <rdar://problem/38812356>
844
845         Reviewed by Dan Bernstein.
846
847         * Configurations/WebKitLegacy.xcconfig:
848
849 2018-03-23  Tim Horton  <timothy_horton@apple.com>
850
851         Introduce and adopt HAVE(AUDIO_TOOLBOX_AUDIO_SESSION)
852         https://bugs.webkit.org/show_bug.cgi?id=183954
853         <rdar://problem/38808858>
854
855         Reviewed by Dan Bernstein.
856
857         * WebView/WebPreferences.mm:
858         (-[WebPreferences setAudioSessionCategoryOverride:]):
859
860 2018-03-23  Tim Horton  <timothy_horton@apple.com>
861
862         Adopt WK_PLATFORM_NAME in WebKitLegacy
863         https://bugs.webkit.org/show_bug.cgi?id=183948
864         <rdar://problem/38803908>
865
866         Reviewed by Dan Bernstein.
867
868         * Configurations/WebKitLegacy.xcconfig:
869         * MigrateHeaders.make:
870         * postprocess-headers.sh:
871
872 2018-03-23  Brady Eidson  <beidson@apple.com>
873
874         Go to back/forward list items after a process-swapped navigation.
875         <rdar://problem/38690544> and https://bugs.webkit.org/show_bug.cgi?id=183920
876
877         Reviewed by Andy Estes.
878
879         * WebView/WebView.mm:
880         (-[WebView _loadBackForwardListFromOtherView:]):
881         (-[WebView goToBackForwardItem:]):
882
883 2018-03-22  Tim Horton  <timothy_horton@apple.com>
884
885         Improve readability of WebCore's OTHER_LDFLAGS
886         https://bugs.webkit.org/show_bug.cgi?id=183909
887         <rdar://problem/38760992>
888
889         Reviewed by Dan Bernstein.
890
891         * Configurations/Base.xcconfig:
892         * Configurations/FeatureDefines.xcconfig:
893
894 2018-03-20  Tim Horton  <timothy_horton@apple.com>
895
896         Enable the minimal simulator feature flag when appropriate
897         https://bugs.webkit.org/show_bug.cgi?id=183807
898
899         Reviewed by Dan Bernstein.
900
901         * Configurations/FeatureDefines.xcconfig:
902
903 2018-03-20  Tim Horton  <timothy_horton@apple.com>
904
905         Add and adopt WK_PLATFORM_NAME and adjust default feature defines
906         https://bugs.webkit.org/show_bug.cgi?id=183758
907         <rdar://problem/38017644>
908
909         Reviewed by Dan Bernstein.
910
911         * Configurations/FeatureDefines.xcconfig:
912
913 2018-03-19  Megan Gardner  <megan_gardner@apple.com>
914
915         Clear style colors when setting default appearance
916         https://bugs.webkit.org/show_bug.cgi?id=183759
917
918         Reviewed by Tim Horton.
919
920         Colors are cached and need to be cleared and recalculated.
921         Refactor to do all style recalcs together.
922
923         * WebView/WebView.mm:
924         (-[WebView _setDefaultAppearanceAndClearStyle]):
925         (-[WebView _setUseSystemAppearance:]):
926         (-[WebView effectiveAppearanceDidChange]):
927
928 2018-03-19  Jiewen Tan  <jiewen_tan@apple.com>
929
930         Unreviewed, another quick fix for r229699
931
932         Restricts ENABLE_WEB_AUTHN to only macOS and iOS.
933
934         * Configurations/FeatureDefines.xcconfig:
935
936 2018-03-16  Megan Gardner  <megan_gardner@apple.com>
937
938         Ensure that style is updated when the effective appearance changes
939         https://bugs.webkit.org/show_bug.cgi?id=183690
940         <rdar://problem/38385900>
941
942         Reviewed by Tim Horton and Wenson Hsieh.
943
944         Respond to and respect the effective appearance changing.
945
946         * WebView/WebView.mm:
947         (-[WebView _setUseSystemAppearance:]):
948         (-[WebView effectiveAppearanceDidChange]):
949
950 2018-03-15  Megan Gardner  <megan_gardner@apple.com>
951
952         Create MediaQueryParserContext to provide additional context for the evaluation of media queries
953         https://bugs.webkit.org/show_bug.cgi?id=183677
954
955         Reviewed by Tim Horton.
956
957         We need additional context for parsing media queries to make sure they are parsed correctly and valid.
958
959         * DOM/DOM.mm:
960         (-[DOMHTMLLinkElement _mediaQueryMatches]):
961
962 2018-03-14  Tim Horton  <timothy_horton@apple.com>
963
964         Fix the build after r229567
965
966         * Configurations/FeatureDefines.xcconfig:
967
968 2018-03-12  Tim Horton  <timothy_horton@apple.com>
969
970         Stop using SDK conditionals to control feature definitions
971         https://bugs.webkit.org/show_bug.cgi?id=183430
972         <rdar://problem/38251619>
973
974         Reviewed by Dan Bernstein.
975
976         * Configurations/FeatureDefines.xcconfig:
977         * Configurations/WebKitTargetConditionals.xcconfig: Renamed.
978
979 2018-03-12  Yoav Weiss  <yoav@yoav.ws>
980
981         Runtime flag for link prefetch and remove link subresource.
982         https://bugs.webkit.org/show_bug.cgi?id=183540
983
984         Reviewed by Chris Dumez.
985
986         Remove the LINK_PREFETCH build time flag.
987
988         * Configurations/FeatureDefines.xcconfig:
989
990 2018-03-12  Javier Fernandez  <jfernandez@igalia.com>
991
992         Remove GridLayout runtime flag
993         https://bugs.webkit.org/show_bug.cgi?id=183484
994
995         Reviewed by Myles C. Maxfield.
996
997         The Grid Layout feature has been enabled by default for almost a
998         year, so I think it's time to remove the runtime flag and the
999
1000         * WebView/WebPreferenceKeysPrivate.h:
1001         * WebView/WebPreferences.mm:
1002         (+[WebPreferences initialize]):
1003         * WebView/WebPreferencesPrivate.h:
1004         * WebView/WebView.mm:
1005         (-[WebView _preferencesChanged:]):
1006
1007 2018-03-12  Antoine Quint  <graouts@apple.com>
1008
1009         [Web Animations] Implement CSS Animations and CSS Transitions as Web Animations
1010         https://bugs.webkit.org/show_bug.cgi?id=183504
1011         <rdar://problem/38372965>
1012
1013         Reviewed by Dean Jackson and Jon Lee.
1014
1015         Add the missing WebKitLegacy support the cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled flag
1016         which is required for the matching <!-- webkit-test-runner --> flag to work in DumpRenderTree.
1017
1018         * WebView/WebPreferenceKeysPrivate.h:
1019         * WebView/WebPreferences.mm:
1020         (+[WebPreferences initialize]):
1021         (-[WebPreferences setModernMediaControlsEnabled:]):
1022         (-[WebPreferences cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled]):
1023         (-[WebPreferences setCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled:]):
1024         * WebView/WebPreferencesPrivate.h:
1025         * WebView/WebView.mm:
1026         (-[WebView _preferencesChanged:]):
1027
1028 2018-03-10  Megan Gardner  <megan_gardner@apple.com>
1029
1030         Media query for default appearance
1031         https://bugs.webkit.org/show_bug.cgi?id=183539
1032         <rdar://problem/38326388>
1033
1034         Reviewed by Tim Horton.
1035
1036         Write a media query to evaluate appearance.
1037
1038         * WebView/WebView.mm:
1039         (-[WebView _commonInitializationWithFrameName:groupName:]):
1040         (-[WebView _setUseSystemAppearance:]):
1041
1042 2018-03-09  Andy Estes  <aestes@apple.com>
1043
1044         [Mac] WebKit fails to receive file promises when the embedding app is sandboxed
1045         https://bugs.webkit.org/show_bug.cgi?id=183489
1046         <rdar://problem/38267517>
1047
1048         WebKitLegacy calls -[NSFilePromiseReceiver receivePromisedFilesAtDestination:...] with
1049         NSTemporaryDirectory() as the destination for receiving file promise drops. AppKit attempts
1050         to issue a sandbox extension for this directory, but for security reasons App Sandbox
1051         refuses to do so for NSTemporaryDirectory() itself. As a result, AppKit will call our reader
1052         block with a nil error and a valid file URL, but no file will actually exist at that URL.
1053
1054         In order for App Sandbox to grant issuing the sandbox extension needed by AppKit, we need to
1055         use some other destination directory. This patch uses FileSystem::createTemporaryDirectory()
1056         to securely create a unique temporary directory inside NSTemporaryDirectory() for use as the
1057         drop destination.
1058
1059         Reviewed by Wenson Hsieh.
1060
1061         * WebView/WebView.mm:
1062         (-[WebView performDragOperation:]):
1063
1064 2018-03-08  Megan Gardner  <megan_gardner@apple.com>
1065
1066         Allow WebViews to disable system appearance
1067         https://bugs.webkit.org/show_bug.cgi?id=183418
1068         <rdar://problem/36975642>
1069
1070         Reviewed by Tim Horton.
1071
1072         Allow webviews to choose whether or not to follow the default system appearance.
1073
1074         * WebView/WebView.mm:
1075         (-[WebView _setUseSystemAppearance:]):
1076         (-[WebView _useSystemAppearance]):
1077         * WebView/WebViewPrivate.h:
1078
1079 2018-03-08  Youenn Fablet  <youenn@apple.com>
1080
1081         libwebrtc update broke internal builds
1082         https://bugs.webkit.org/show_bug.cgi?id=183454
1083
1084         Reviewed by Eric Carlson.
1085
1086         * Configurations/WebKitLegacy.xcconfig:
1087
1088 2018-03-08  Chris Dumez  <cdumez@apple.com>
1089
1090         Possible null dereference of the page under WebFrameNetworkingContext::storageSession()
1091         https://bugs.webkit.org/show_bug.cgi?id=183455
1092         <rdar://problem/38191749>
1093
1094         Reviewed by Youenn Fablet.
1095
1096         Add a null check for the page as we have evidence from crashes that it can be null.
1097         Other functions in WebFrameNetworkingContext already null check the page as well,
1098         not just the frame so this is consistent.
1099
1100         * WebCoreSupport/WebFrameNetworkingContext.mm:
1101         (WebFrameNetworkingContext::storageSession const):
1102
1103 2018-03-08  Yusuke Suzuki  <utatane.tea@gmail.com>
1104
1105         [JSC] Add inherits<T>(VM&) leveraging JSCast fast path
1106         https://bugs.webkit.org/show_bug.cgi?id=183429
1107
1108         Reviewed by Mark Lam.
1109
1110         * DOM/DOM.mm:
1111         (+[DOMNode _nodeFromJSWrapper:]):
1112         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1113         (WebKit::NetscapePluginInstanceProxy::retainLocalObject):
1114         (WebKit::NetscapePluginInstanceProxy::releaseLocalObject):
1115         * Plugins/Hosted/ProxyInstance.mm:
1116         (WebKit::ProxyInstance::invokeMethod):
1117         * WebView/WebView.mm:
1118         (aeDescFromJSValue):
1119
1120 2018-03-08  Tim Horton  <timothy_horton@apple.com>
1121
1122         Stop linking ApplicationServices directly
1123         https://bugs.webkit.org/show_bug.cgi?id=182867
1124         <rdar://problem/38252142>
1125
1126         Reviewed by Alex Christensen.
1127
1128         The frameworks that we use that live inside ApplicationServices
1129         have mostly moved out, so import them directly.
1130
1131         * Carbon/CarbonUtils.h:
1132         * WebKitPrefix.h:
1133         * WebView/WebHTMLView.mm:
1134         * WebView/WebPDFView.mm:
1135
1136 2018-03-07  Tim Horton  <timothy_horton@apple.com>
1137
1138         Sort and separate FeatureDefines.xcconfig
1139         https://bugs.webkit.org/show_bug.cgi?id=183427
1140
1141         Reviewed by Dan Bernstein.
1142
1143         * Configurations/FeatureDefines.xcconfig:
1144         Sort and split FeatureDefines into paragraphs
1145         (to make it easier to sort later).
1146
1147 2018-03-07  Youenn Fablet  <youenn@apple.com>
1148
1149         Match unsupported plugins based on domains and not origin
1150         https://bugs.webkit.org/show_bug.cgi?id=183384
1151
1152         Reviewed by Chris Dumez.
1153
1154         * WebCoreSupport/WebPluginInfoProvider.h:
1155         * WebCoreSupport/WebPluginInfoProvider.mm:
1156         (WebPluginInfoProvider::getPluginInfo):
1157         (WebPluginInfoProvider::getWebVisiblePluginInfo):
1158
1159 2018-03-05  Andy Estes  <aestes@apple.com>
1160
1161         [Mac] Teach WebCore::Pasteboard about file promise drags
1162         https://bugs.webkit.org/show_bug.cgi?id=183314
1163         <rdar://problem/38105493>
1164
1165         Reviewed by Darin Adler.
1166
1167         Added a FIXME comment.
1168
1169         * WebView/WebView.mm:
1170         (-[WebView performDragOperation:]):
1171
1172 2018-03-04  Yusuke Suzuki  <utatane.tea@gmail.com>
1173
1174         [WTF] Move currentCPUTime and sleep(Seconds) to CPUTime.h and Seconds.h respectively
1175         https://bugs.webkit.org/show_bug.cgi?id=183312
1176
1177         Reviewed by Mark Lam.
1178
1179         Remove wtf/CurrentTime.h include pragma.
1180
1181         * WebView/WebFrame.mm:
1182         * WebView/WebPDFView.mm:
1183
1184 2018-03-04  Tim Horton  <timothy_horton@apple.com>
1185
1186         Make !ENABLE(DATA_DETECTION) iOS build actually succeed
1187         https://bugs.webkit.org/show_bug.cgi?id=183283
1188         <rdar://problem/38062148>
1189
1190         Reviewed by Sam Weinig.
1191
1192         * Configurations/FeatureDefines.xcconfig:
1193
1194 2018-02-28  Alex Christensen  <achristensen@webkit.org>
1195
1196         Reduce use of NetworkingContext in WebKit
1197         https://bugs.webkit.org/show_bug.cgi?id=183213
1198
1199         Reviewed by Brady Eidson.
1200
1201         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1202         (WebKit::NetscapePluginInstanceProxy::getProxy):
1203         * Plugins/WebNetscapePluginView.mm:
1204         (-[WebNetscapePluginView getVariable:forURL:value:length:]):
1205
1206 2018-02-17  Darin Adler  <darin@apple.com>
1207
1208         Prepare for ExtendedColor changes (first step)
1209         https://bugs.webkit.org/show_bug.cgi?id=182904
1210
1211         Reviewed by Sam Weinig.
1212
1213         * Misc/WebKitNSStringExtras.mm:
1214         (-[NSString _web_drawAtPoint:font:textColor:]): Use colorFromNSColor.
1215
1216 2018-02-22  Yusuke Suzuki  <utatane.tea@gmail.com>
1217
1218         Remove currentTime() / currentTimeMS()
1219         https://bugs.webkit.org/show_bug.cgi?id=183052
1220
1221         Reviewed by Mark Lam.
1222
1223         * WebCoreSupport/WebFrameLoaderClient.h:
1224         * WebCoreSupport/WebFrameLoaderClient.mm:
1225         (WebFrameLoaderClient::dispatchWillPerformClientRedirect):
1226
1227 2018-02-16  Youenn Fablet  <youenn@apple.com>
1228
1229         Allow specifying which plug-ins are supported
1230         https://bugs.webkit.org/show_bug.cgi?id=182748
1231
1232         Reviewed by Chris Dumez.
1233
1234         * WebCoreSupport/WebPluginInfoProvider.h:
1235         * WebCoreSupport/WebPluginInfoProvider.mm:
1236         (WebPluginInfoProvider::getPluginInfo):
1237         (WebPluginInfoProvider::getWebVisiblePluginInfo):
1238
1239 2018-02-16  Brent Fulgham  <bfulgham@apple.com>
1240
1241         [Cocoa][WebKitLegacy] REGRESSION(r221559): Coda 2 crashes when switching views
1242         https://bugs.webkit.org/show_bug.cgi?id=182882
1243         <rdar://problem/35672661>
1244
1245         Reviewed by Dan Bernstein.
1246
1247         Make sure the smart pointer hold the collection of subviews lives at least as
1248         long as the loop using it.
1249
1250         * WebView/WebHTMLView.mm:
1251         (-[WebHTMLView _web_makePluginSubviewsPerformSelector:withObject:]):
1252
1253 2018-02-14  Daniel Bates  <dabates@apple.com>
1254
1255         Disallow cross-origin subresources from asking for credentials
1256         https://bugs.webkit.org/show_bug.cgi?id=182579
1257         <rdar://problem/36162271>
1258
1259         Reviewed by Andy Estes.
1260
1261         Add a private preference to toggle allowing non-mixed content cross-origin subresources to load.
1262         DumpRenderTree toggles this preference when it sees the test option allowCrossOriginSubresourcesToAskForCredential.
1263
1264         * WebView/WebPreferenceKeysPrivate.h:
1265         * WebView/WebPreferences.mm:
1266         (+[WebPreferences initialize]):
1267         (-[WebPreferences allowCrossOriginSubresourcesToAskForCredentials]):
1268         (-[WebPreferences setAllowCrossOriginSubresourcesToAskForCredentials:]):
1269         * WebView/WebPreferencesPrivate.h:
1270         * WebView/WebView.mm:
1271         (-[WebView _preferencesChanged:]):
1272
1273 2018-02-14  Ross Kirsling  <ross.kirsling@sony.com>
1274
1275         Remove ForwardingHeaders directory from WebKitLegacy/mac.
1276         https://bugs.webkit.org/show_bug.cgi?id=182738
1277
1278         Reviewed by Darin Adler.
1279
1280         * ForwardingHeaders/collector/handles/Global.h: Removed.
1281         * ForwardingHeaders/debugger/DebuggerCallFrame.h: Removed.
1282         * ForwardingHeaders/runtime/Completion.h: Removed.
1283         * ForwardingHeaders/runtime/Error.h: Removed.
1284         * ForwardingHeaders/runtime/JSCJSValue.h: Removed.
1285         * ForwardingHeaders/runtime/JSFunction.h: Removed.
1286         * ForwardingHeaders/runtime/JSLock.h: Removed.
1287         * ForwardingHeaders/runtime/JSObject.h: Removed.
1288         * ForwardingHeaders/runtime/JSString.h: Removed.
1289         * ForwardingHeaders/runtime/Protect.h: Removed.
1290         * ForwardingHeaders/runtime/SymbolTable.h: Removed.
1291
1292 2018-02-09  Per Arne Vollan  <pvollan@apple.com>
1293
1294         Follow-up fixes after moving WebVideoFullscreenController from WebCore to WebKitLegacy.
1295         https://bugs.webkit.org/show_bug.cgi?id=182641
1296
1297         Reviewed by Dan Bernstein.
1298
1299         Remove incorrect use of WEBCORE_EXPORT and namespace WebCore after the files were moved in
1300         https://trac.webkit.org/changeset/228308.
1301
1302         * WebView/WebVideoFullscreenController.h:
1303         * WebView/WebVideoFullscreenHUDWindowController.mm:
1304         * WebView/WebWindowAnimation.h:
1305         * WebView/WebWindowAnimation.mm:
1306         (WebCore::WebWindowAnimationDurationFromDuration): Deleted.
1307         (WebCore::scaledRect): Deleted.
1308         (WebCore::squaredDistance): Deleted.
1309
1310 2018-02-09  Per Arne Vollan  <pvollan@apple.com>
1311
1312         Unreviewed 32-bit build fix after <https://trac.webkit.org/changeset/228308>.
1313
1314         * WebView/WebWindowAnimation.mm:
1315         (-[WebWindowScaleAnimation additionalDurationNeededToReachFinalFrame]):
1316
1317 2018-02-08  Per Arne Vollan  <pvollan@apple.com>
1318
1319         Move WebVideoFullscreenController from WebCore to WebKitLegacy.
1320         https://bugs.webkit.org/show_bug.cgi?id=182615
1321
1322         Reviewed by Eric Carlson.
1323
1324         It is only used by WK1. Also there are a few references to NSApp in WebVideoFullscreenController.mm.
1325         Ideally, we should not reference NSApp in WebCore.
1326
1327         * WebView/WebFullScreenController.mm:
1328         * WebView/WebVideoFullscreenController.h: Copied from Source/WebCore/platform/mac/WebVideoFullscreenController.h.
1329         * WebView/WebVideoFullscreenController.mm: Copied from Source/WebCore/platform/mac/WebVideoFullscreenController.mm.
1330         * WebView/WebVideoFullscreenHUDWindowController.h: Copied from Source/WebCore/platform/mac/WebVideoFullscreenHUDWindowController.h.
1331         * WebView/WebVideoFullscreenHUDWindowController.mm: Copied from Source/WebCore/platform/mac/WebVideoFullscreenHUDWindowController.mm.
1332         * WebView/WebView.mm:
1333         * WebView/WebWindowAnimation.h: Copied from Source/WebCore/platform/mac/WebWindowAnimation.h.
1334         * WebView/WebWindowAnimation.mm: Copied from Source/WebCore/platform/mac/WebWindowAnimation.mm.
1335
1336 2018-01-13  Darin Adler  <darin@apple.com>
1337
1338         Event improvements
1339         https://bugs.webkit.org/show_bug.cgi?id=179591
1340
1341         Reviewed by Chris Dumez.
1342
1343         * DOM/DOMWheelEvent.mm:
1344         (-[DOMWheelEvent initWheelEvent:wheelDeltaY:view:screenX:screenY:clientX:clientY:ctrlKey:altKey:shiftKey:metaKey:]):
1345         Call initWebKitWheelEvent.
1346
1347         * Plugins/Hosted/NetscapePluginInstanceProxy.mm: Removed include of ScriptValue.h.
1348         * WebCoreSupport/WebInspectorClient.mm: Ditto.
1349         * WebView/WebFrame.mm: Ditto.
1350
1351         * WebView/WebHTMLView.mm:
1352         (-[WebHTMLView _interpretKeyEvent:savingCommands:]): Updated for name change from keyEvent to
1353         underlyingPlatformEvent.
1354         (-[WebHTMLView _handleEditingKeyEvent:]): Ditto.
1355
1356         * WebView/WebScriptWorld.mm:
1357         (+[WebScriptWorld scriptWorldForGlobalContext:]): Pass reference to currentWorld function.
1358
1359         * WebView/WebView.mm: Removed include of ScriptValue.h.
1360
1361 2018-02-06  Don Olmstead  <don.olmstead@sony.com>
1362
1363         Remove WebCore/ForwardingHeaders directory
1364         https://bugs.webkit.org/show_bug.cgi?id=182347
1365
1366         Reviewed by Keith Miller.
1367
1368         * Carbon/CarbonWindowAdapter.mm:
1369         * DOM/WebDOMOperations.mm:
1370         * History/WebBackForwardList.mm:
1371         * History/WebHistoryItem.mm:
1372         * Misc/WebCache.mm:
1373         * Misc/WebElementDictionary.mm:
1374         * Misc/WebIconDatabase.mm:
1375         * Misc/WebStringTruncator.mm:
1376         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1377         * Plugins/Hosted/ProxyInstance.mm:
1378         * Plugins/Hosted/ProxyRuntimeObject.mm:
1379         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1380         * Plugins/WebBaseNetscapePluginView.mm:
1381         * Plugins/WebBasePluginPackage.mm:
1382         * Plugins/WebNetscapePluginStream.mm:
1383         * Plugins/WebNetscapePluginView.mm:
1384         * Plugins/WebPluginController.mm:
1385         * WebCoreSupport/WebEditorClient.mm:
1386         * WebCoreSupport/WebFrameLoaderClient.mm:
1387         * WebCoreSupport/WebInspectorClient.h:
1388         * WebCoreSupport/WebInspectorClient.mm:
1389         * WebView/WebDataSource.mm:
1390         * WebView/WebFrame.mm:
1391         * WebView/WebHTMLRepresentation.mm:
1392         * WebView/WebHTMLView.mm:
1393         * WebView/WebPreferences.mm:
1394         * WebView/WebScriptDebugDelegate.mm:
1395         * WebView/WebScriptDebugger.h:
1396         * WebView/WebTextIterator.mm:
1397         * WebView/WebView.mm:
1398         * WebView/WebViewData.mm:
1399
1400 2018-01-30  Don Olmstead  <don.olmstead@sony.com>
1401
1402         JSExports.h should be included as <JavaScriptCore/JSExportMacros.h>
1403         https://bugs.webkit.org/show_bug.cgi?id=182312
1404
1405         Reviewed by Michael Catanzaro.
1406
1407         * WebKitPrefix.h:
1408
1409 2018-01-29  Jiewen Tan  <jiewen_tan@apple.com>
1410
1411         [WebAuthN] Add a compile-time feature flag
1412         https://bugs.webkit.org/show_bug.cgi?id=182211
1413         <rdar://problem/36936365>
1414
1415         Reviewed by Brent Fulgham.
1416
1417         * Configurations/FeatureDefines.xcconfig:
1418
1419 2018-01-27  Dan Bernstein  <mitz@apple.com>
1420
1421         HaveInternalSDK includes should be "#include?"
1422         https://bugs.webkit.org/show_bug.cgi?id=179670
1423
1424         * Configurations/Base.xcconfig:
1425
1426 2018-01-24  Alex Christensen  <achristensen@webkit.org>
1427
1428         Remove unused QTKit preference
1429         https://bugs.webkit.org/show_bug.cgi?id=181968
1430
1431         Reviewed by Alexey Proskuryakov.
1432
1433         * WebView/WebPreferenceKeysPrivate.h:
1434         * WebView/WebPreferences.mm:
1435         (+[WebPreferences initialize]):
1436         (-[WebPreferences setQTKitEnabled:]): Deleted.
1437         (-[WebPreferences isQTKitEnabled]): Deleted.
1438         * WebView/WebPreferencesPrivate.h:
1439         * WebView/WebView.mm:
1440         (-[WebView _preferencesChanged:]):
1441
1442 2018-01-23  Wenson Hsieh  <wenson_hsieh@apple.com>
1443
1444         Harden against layout passes triggered when iterating through HTMLFormElement::associatedElements
1445         https://bugs.webkit.org/show_bug.cgi?id=182037
1446         <rdar://problem/36747812>
1447
1448         Reviewed by Ryosuke Niwa.
1449
1450         Rename associatedElements() to unsafeAssociatedElements(), and add ScriptDisallowedScopes. See WebCore ChangeLog
1451         for more details.
1452
1453         * WebView/WebHTMLRepresentation.mm:
1454         (-[WebHTMLRepresentation elementWithName:inForm:]):
1455         (-[WebHTMLRepresentation controlsInForm:]):
1456
1457 2018-01-23  Alex Christensen  <achristensen@webkit.org>
1458
1459         Use CompletionHandlers for ResourceHandleClient::didReceiveResponseAsync
1460         https://bugs.webkit.org/show_bug.cgi?id=181961
1461
1462         Reviewed by Michael Catanzaro.
1463
1464         * WebView/WebPreferences.mm:
1465
1466 2018-01-23  Commit Queue  <commit-queue@webkit.org>
1467
1468         Unreviewed, rolling out r227437.
1469         https://bugs.webkit.org/show_bug.cgi?id=182011
1470
1471         broke build (Requested by alexchristensen on #webkit).
1472
1473         Reverted changeset:
1474
1475         "Remove unused QTKit preference"
1476         https://bugs.webkit.org/show_bug.cgi?id=181968
1477         https://trac.webkit.org/changeset/227437
1478
1479 2018-01-23  Alex Christensen  <achristensen@webkit.org>
1480
1481         Remove unused QTKit preference
1482         https://bugs.webkit.org/show_bug.cgi?id=181968
1483
1484         Reviewed by Alexey Proskuryakov.
1485
1486         * WebView/WebPreferenceKeysPrivate.h:
1487         * WebView/WebPreferences.mm:
1488         (+[WebPreferences initialize]):
1489         (-[WebPreferences setQTKitEnabled:]): Deleted.
1490         (-[WebPreferences isQTKitEnabled]): Deleted.
1491         * WebView/WebPreferencesPrivate.h:
1492         * WebView/WebView.mm:
1493         (-[WebView _preferencesChanged:]):
1494
1495 2018-01-22  Wenson Hsieh  <wenson_hsieh@apple.com>
1496
1497         WebViews created via -initSimpleHTMLDocumentWithStyle: don't propagate attachmentElementEnabled state
1498         https://bugs.webkit.org/show_bug.cgi?id=181960
1499         <rdar://problem/36431678>
1500
1501         Reviewed by Tim Horton.
1502
1503         Mail's compose view is initialized via the -initSimpleHTMLDocumentWithStyle: codepath. This is intended to be
1504         a fast path for initializing WebViews, which bypasses certain initialization steps present in the regular -init
1505         path, such as calling -_preferencesChanged: to sync RuntimeEnabledFeatures with WebPreferences.
1506
1507         This means that even though we set -[WebPreferences attachmentElementEnabled] to YES for Mail, the value of the
1508         RuntimeEnabledFeature isn't updated to match. To fix this, we explicitly invoke
1509         RuntimeEnabledFeatures::setAttachmentElementEnabled here to make sure the value is in sync with WebPreferences.
1510
1511         * WebView/WebView.mm:
1512         (-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):
1513
1514 2018-01-21  Ryosuke Niwa  <rniwa@webkit.org>
1515
1516         Turning off custom pasteboard data doesn't actually turn it off in WK2
1517         https://bugs.webkit.org/show_bug.cgi?id=181920
1518         <rdar://problem/36686429>
1519
1520         Reviewed by Wenson Hsieh.
1521
1522         Always disable custom pasteboard data in WebKit1. See r226156 for details.
1523
1524         * WebView/WebPreferences.mm:
1525         (+[WebPreferences initialize]):
1526         * WebView/WebView.mm:
1527         (-[WebView _preferencesChanged:]):
1528
1529 2018-01-21  Wenson Hsieh  <wenson_hsieh@apple.com>
1530
1531         Add a new feature flag for EXTRA_ZOOM_MODE and reintroduce AdditionalFeatureDefines.h
1532         https://bugs.webkit.org/show_bug.cgi?id=181918
1533
1534         Reviewed by Tim Horton.
1535
1536         Add EXTRA_ZOOM_MODE to FeatureDefines.xconfig (off by default).
1537
1538         * Configurations/FeatureDefines.xcconfig:
1539
1540 2018-01-20  Andy Estes  <aestes@apple.com>
1541
1542         [Apple Pay] Stop eagerly loading PassKit.framework
1543         https://bugs.webkit.org/show_bug.cgi?id=181911
1544         <rdar://problem/36555369>
1545
1546         Reviewed by Tim Horton.
1547
1548         * WebCoreSupport/WebPaymentCoordinatorClient.h:
1549         * WebCoreSupport/WebPaymentCoordinatorClient.mm:
1550         (WebPaymentCoordinatorClient::validatedPaymentNetwork):
1551
1552         Implemented PaymentCoordinatorClient::validatedPaymentNetwork().
1553
1554 2018-01-19  Dean Jackson  <dino@apple.com>
1555
1556         REGRESSION (r221092): Swipe actions are hard to perform in FastMail app
1557         https://bugs.webkit.org/show_bug.cgi?id=181817
1558         <rdar://problem/35274055>
1559
1560         Reviewed by Simon Fraser.
1561
1562         Add a linked-on-or-after check to set passive touch listeners on document in WebCore.
1563
1564         * Misc/WebKitVersionChecks.h:
1565         * WebView/WebView.mm:
1566         (-[WebView _commonInitializationWithFrameName:groupName:]):
1567
1568 2018-01-19  Alex Christensen  <achristensen@webkit.org>
1569
1570         Remove unused WebViewPrivate _allowCookies
1571         https://bugs.webkit.org/show_bug.cgi?id=181812
1572
1573         Reviewed by Tim Horton.
1574
1575         * WebView/WebView.mm:
1576         (+[WebView _setAllowCookies:]): Deleted.
1577         (+[WebView _allowCookies]): Deleted.
1578         * WebView/WebViewPrivate.h:
1579
1580 2018-01-18  Alexey Proskuryakov  <ap@apple.com>
1581
1582         Build fix, remove a call to -[NSWindow setOneShot:]
1583         https://bugs.webkit.org/show_bug.cgi?id=181809
1584
1585         Reviewed by Tim Horton.
1586
1587         * WebView/WebTextCompletionController.mm:
1588         (-[WebTextCompletionController _buildUI]):
1589
1590 2018-01-18  Ryan Haddad  <ryanhaddad@apple.com>
1591
1592         Unreviewed, suppress deprecation warnings to fix the build with a newer SDK.
1593
1594         * Carbon/HIWebView.mm:
1595         (overrideCGContext):
1596         (restoreCGContext):
1597
1598 2018-01-18  Dan Bernstein  <mitz@apple.com>
1599
1600         [Xcode] Streamline and future-proof target-macOS-version-dependent build setting definitions
1601         https://bugs.webkit.org/show_bug.cgi?id=181803
1602
1603         Reviewed by Tim Horton.
1604
1605         * Configurations/Base.xcconfig: Updated.
1606         * Configurations/DebugRelease.xcconfig: Ditto.
1607         * Configurations/FeatureDefines.xcconfig: Adopted macOSTargetConditionals helpers.
1608         * Configurations/Version.xcconfig: Updated.
1609         * Configurations/macOSTargetConditionals.xcconfig: Added. Defines helper build settings
1610           useful for defining settings that depend on the target macOS version.
1611
1612 2018-01-17  Youenn Fablet  <youenn@apple.com>
1613
1614         Put fetch Request.keepalive behind a runtime flag
1615         https://bugs.webkit.org/show_bug.cgi?id=181592
1616
1617         Reviewed by Chris Dumez.
1618
1619         * WebView/WebPreferenceKeysPrivate.h:
1620         * WebView/WebPreferences.mm:
1621         (+[WebPreferences initialize]):
1622         (-[WebPreferences fetchAPIKeepAliveEnabled]):
1623         (-[WebPreferences setFetchAPIKeepAliveEnabled:]):
1624         * WebView/WebPreferencesPrivate.h:
1625         * WebView/WebView.mm:
1626         (-[WebView _preferencesChanged:]):
1627
1628 2018-01-17  Wenson Hsieh  <wenson_hsieh@apple.com>
1629
1630         Add injected bundle SPI to replace subresource URLs when dropping or pasting rich content
1631         https://bugs.webkit.org/show_bug.cgi?id=181637
1632         <rdar://problem/36508471>
1633
1634         Reviewed by Tim Horton.
1635
1636         Add a stub implementation of replacementURLForResource. See WebCore and WebKit ChangeLogs for more detail.
1637
1638         * WebCoreSupport/WebEditorClient.h:
1639         * WebCoreSupport/WebEditorClient.mm:
1640         (WebEditorClient::replacementURLForResource):
1641
1642 2018-01-11  Keith Miller  <keith_miller@apple.com>
1643
1644         Rename ENABLE_ASYNC_ITERATION to ENABLE_JS_ASYNC_ITERATION
1645         https://bugs.webkit.org/show_bug.cgi?id=181573
1646
1647         Reviewed by Simon Fraser.
1648
1649         * Configurations/FeatureDefines.xcconfig:
1650
1651 2018-01-11  Wenson Hsieh  <wenson_hsieh@apple.com>
1652
1653         Send PromisedBlobInfo to the client through DragItem instead of DragClient::prepareToDragPromisedBlob
1654         https://bugs.webkit.org/show_bug.cgi?id=181497
1655
1656         Reviewed by Tim Horton.
1657
1658         See other ChangeLogs for more detail.
1659
1660         * WebCoreSupport/WebDragClient.h:
1661
1662 2018-01-11  Tim Horton  <timothy_horton@apple.com>
1663
1664         Null deref in WebImmediateActionController _dictionaryPopupInfoForRange
1665         https://bugs.webkit.org/show_bug.cgi?id=181523
1666         <rdar://problem/28959131>
1667
1668         Reviewed by Alex Christensen.
1669
1670         * WebView/WebImmediateActionController.mm:
1671         (+[WebImmediateActionController _dictionaryPopupInfoForRange:inFrame:withLookupOptions:indicatorOptions:transition:]):
1672         Apply the change made in r216652 to WebKit1's immediate action controller.
1673
1674         Speculative (but successful in WebKit2) fix for non-reproducible crash when
1675         the startContainer of the range is in an anonymous node.
1676
1677 2018-01-11  Youenn Fablet  <youenn@apple.com>
1678
1679         Replace WebRTCLegacyAPIDisabled by WebRTCLegacyAPIEnabled and switch off WebRTC legacy flag by default
1680         https://bugs.webkit.org/show_bug.cgi?id=181480
1681
1682         Reviewed by Eric Carlson.
1683
1684         * WebView/WebPreferences.mm:
1685         (+[WebPreferences initialize]):
1686
1687 2018-01-08  David Kilzer  <ddkilzer@apple.com>
1688
1689         Fix check-webkit-style issues with WebNSDataExtras.mm
1690         <https://webkit.org/b/181369>
1691
1692         Reviewed by Alex Christensen.
1693
1694         * Misc/WebNSDataExtras.mm:
1695         (-[NSString _web_capitalizeRFC822HeaderFieldName]):
1696         (-[NSData _webkit_guessedMIMETypeForXML]):
1697         (-[NSData _webkit_guessedMIMEType]):
1698         (-[NSData _web_isCaseInsensitiveEqualToCString:]):
1699         (_findEOL):
1700         (-[NSData _webkit_parseRFC822HeaderFields]):
1701         (-[NSData _web_locationAfterFirstBlankLine]):
1702         - Fix all the check-webkit-style warnings.
1703
1704 2018-01-08  David Kilzer  <ddkilzer@apple.com>
1705
1706         Build fix #2: Enable -Wcast-qual for WebInspectorUI, WebKitLegacy, WebKit projects
1707         <https://webkit.org/b/181256>
1708         <rdar://problem/36281730>
1709
1710         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
1711         (WebNetscapePluginEventHandlerCocoa::handleTSMEvent):
1712         - Use reinterpret_cast<NPNSString*>(const_cast<CFMutableStringRef>())
1713           to avoid warnings from casting CFStringRef to NPNSString*.
1714           Note that CFMutableStringRef is the same as CFStringRef
1715           without the const modifier, hence its use in the const_cast<>
1716           above.
1717
1718 2018-01-08  David Kilzer  <ddkilzer@apple.com>
1719
1720         Build fix: Enable -Wcast-qual for WebInspectorUI, WebKitLegacy, WebKit projects
1721         <https://webkit.org/b/181256>
1722         <rdar://problem/36281730>
1723
1724         * Carbon/HIWebView.mm:
1725         (StartUpdateObserver): Include TypeCastsCF.h from WTF, and use
1726         checked_cf_cast<CFRunLoopRef>() to fix warning.
1727
1728 2018-01-07  David Kilzer  <ddkilzer@apple.com>
1729
1730         Enable -Wcast-qual for WebInspectorUI, WebKitLegacy, WebKit projects
1731         <https://webkit.org/b/181256>
1732         <rdar://problem/36281730>
1733
1734         Reviewed by Darin Adler.
1735
1736         * Carbon/CarbonUtils.m:
1737         (PoolCleaner):
1738         - Use #pragmas to ignore -Wcast-qual warnings when using a
1739           C-style cast from CFTypeRef to CFRunloopRef.
1740         * Carbon/CarbonWindowFrame.m:
1741         (-[CarbonWindowFrame title]):
1742         - Use #pragmas to ignore -Wcast-qual warnings when using a
1743           C-style cast from CFStringRef to NSString *.
1744         * Carbon/HIViewAdapter.m:
1745         (+[HIViewAdapter getHIViewForNSView:]):
1746         - Use #pragmas to ignore -Wcast-qual warnings when using a
1747           C-style cast from CFTypeRef to HIViewRef.
1748         * Configurations/Base.xcconfig:
1749         (WARNING_CFLAGS): Add -Wcast-qual.
1750         * Misc/WebElementDictionary.mm:
1751         (-[WebElementDictionary objectForKey:]):
1752         - Use static_cast<SEL>(const_cast<void*>()) to fix
1753           warning.
1754         * Misc/WebNSDataExtras.mm: Renamed from Source/WebKitLegacy/mac/Misc/WebNSDataExtras.m.
1755         (-[NSString _web_capitalizeRFC822HeaderFieldName]):
1756         (-[NSData _webkit_guessedMIMETypeForXML]):
1757         (-[NSData _webkit_guessedMIMEType]):
1758         (-[NSData _web_isCaseInsensitiveEqualToCString:]):
1759         (_findEOL):
1760         (-[NSData _webkit_parseRFC822HeaderFields]):
1761         (-[NSData _web_startsWithBlankLine]):
1762         (-[NSData _web_locationAfterFirstBlankLine]):
1763         - Rename WebNSDataExtras.m to WebNSDataExtras.mm and change file
1764           type to Objective-C++.  This fixes the warnings about
1765           discarding the `const` modifier when casing from CFStringRef
1766           to NSString * because in older clang versions, -Wcast-qual was
1767           completely broken when compiling C++ and Objective-C++ source
1768           files.  In newer clang versions, discarding the `const`
1769           modifier for toll-free bridged types is ignored when compiling
1770           Objective-C++ source.
1771         - Update copyright and license header.
1772         - Use reinterpret_cast<> and static_cast<> to fix warnings
1773           unrelated to (NSString *) C-style casts.
1774         - Replace use of MIN() macro with std::min<> template functions.
1775         - Fix location of `*` for local variables modified above.
1776         * Plugins/Hosted/NetscapePluginHostManager.mm:
1777         (WebKit::NetscapePluginHostManager::spawnPluginHost):
1778         (WebKit::NetscapePluginHostManager::initializeVendorPort):
1779         (WebKit::NetscapePluginHostManager::instantiatePlugin):
1780         - Use static_cast<uint8_t*>(const_cast<void*>()) to fix
1781           warnings.
1782         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1783         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
1784         - Use reinterpret_cast<mig_subsystem_t>(const_cast<struct WKWebKitPluginClient_subsystem*>())
1785           to fix warning.
1786         * Plugins/Hosted/ProxyInstance.mm:
1787         (WebKit::ProxyInstance::invoke):
1788         - Use static_cast<char*>(const_cast<void*>()) to fix
1789           warning when using -[NSData bytes].
1790         (WebKit::ProxyInstance::fieldValue const):
1791         - Use reinterpret_cast<char*>(const_cast<unsigned char*>())
1792           to fix warning when using CFDataGetBytePtr().
1793         * Plugins/Hosted/WebTextInputWindowController.m:
1794         (-[WebTextInputPanel _interpretKeyEvent:string:]):
1795         - Use #pragma to ignore -Wcast-qual warning since there
1796           is not a good way to avoid this warning in Objective-C.
1797         * Plugins/WebNetscapePluginStream.mm:
1798         (WebNetscapePluginStream::deliverData):
1799         - Use const_cast<void*>() to fix warning when using
1800           -[NSData bytes].
1801         * Plugins/WebNetscapePluginView.mm:
1802         (-[WebNetscapePluginView _createPlugin]):
1803         - Change C-style cast to const_cast<char*>() to fix
1804           warning.
1805         * WebCoreSupport/WebChromeClient.mm:
1806         (WebChromeClient::wrapCryptoKey const):
1807         (WebChromeClient::unwrapCryptoKey const):
1808         - Change C-style cast to
1809           static_cast<uint8_t*>(const_cast<void*>() to fix
1810           warning.
1811         * WebView/WebPDFView.mm:
1812         (_applicationInfoForMIMEType):
1813         - Change local variable type from 'NSURL *' to
1814           'CFURLRef' to fix warning.  Cast back to 'NSURL *'
1815           when calling -[NSURL path].
1816
1817 2018-01-05  Dan Bernstein  <mitz@apple.com>
1818
1819         Fixed the build following AppKit API deprecations in a recent SDKs
1820
1821         * WebView/WebFullScreenController.mm:
1822         (-[WebFullScreenController enterFullScreen:]): Suppressed deprecation warnings.
1823         (-[WebFullScreenController exitFullScreen]): Ditto.
1824         (-[WebFullScreenController _startEnterFullScreenAnimationWithDuration:]): Ditto.
1825         (-[WebFullScreenController _startExitFullScreenAnimationWithDuration:]): Ditto.
1826         * WebView/WebHTMLView.mm:
1827         (-[WebHTMLView drawRect:]): Ditto.
1828         (-[WebHTMLView _endPrintModeAndRestoreWindowAutodisplay]): Ditto.
1829         (-[WebHTMLView knowsPageRange:]): Ditto.
1830         * WebView/WebView.mm:
1831         (LayerFlushController::flushLayers): Ditto.
1832
1833 2018-01-03  Wenson Hsieh  <wenson_hsieh@apple.com>
1834
1835         [Attachment Support] Create attachment elements when dropping files on iOS
1836         https://bugs.webkit.org/show_bug.cgi?id=181192
1837         <rdar://problem/36280945>
1838
1839         Reviewed by Tim Horton.
1840
1841         Make some minor adjustments for changes to the pasteboard in WebCore. See WebCore/ChangeLog for more detail.
1842
1843         * WebCoreSupport/WebPlatformStrategies.h:
1844         * WebCoreSupport/WebPlatformStrategies.mm:
1845         (WebPlatformStrategies::informationForItemAtIndex):
1846         (WebPlatformStrategies::getFilenamesForDataInteraction): Deleted.
1847
1848 2018-01-03  Wenson Hsieh  <wenson_hsieh@apple.com>
1849
1850         [Attachment Support] Add plumbing for starting a drag with promised blob data
1851         https://bugs.webkit.org/show_bug.cgi?id=181201
1852
1853         Reviewed by Tim Horton.
1854
1855         Minor adjustment to account for a DragClient interface change. See WebCore ChangeLog for more details.
1856
1857         * WebCoreSupport/WebDragClient.h:
1858
1859 2018-01-02  Jiewen Tan  <jiewen_tan@apple.com>
1860
1861         Add a WebAuthentication runtime feature flag
1862         https://bugs.webkit.org/show_bug.cgi?id=181220
1863         <rdar://problem/36055305>
1864
1865         Reviewed by Brent Fulgham.
1866
1867         Renames the CredentialManagement runtime feature flag into WebAuthentication.
1868
1869         * WebView/WebPreferenceKeysPrivate.h:
1870         * WebView/WebPreferences.mm:
1871         (+[WebPreferences initialize]):
1872         (-[WebPreferences webAuthenticationEnabled]):
1873         (-[WebPreferences setWebAuthenticationEnabled:]):
1874         (-[WebPreferences credentialManagementEnabled]): Deleted.
1875         (-[WebPreferences setCredentialManagementEnabled:]): Deleted.
1876         * WebView/WebPreferencesPrivate.h:
1877         * WebView/WebView.mm:
1878         (-[WebView _preferencesChanged:]):
1879
1880 2017-12-22  Jeff Miller  <jeffm@apple.com>
1881
1882         Update user-visible copyright strings to include 2018
1883         https://bugs.webkit.org/show_bug.cgi?id=181141
1884
1885         Reviewed by Dan Bernstein.
1886
1887         * Info.plist:
1888
1889 2017-12-30  Wenson Hsieh  <wenson_hsieh@apple.com>
1890
1891         [Attachment Support] Remove current macOS support for dragging file-backed attachments
1892         https://bugs.webkit.org/show_bug.cgi?id=181188
1893
1894         Reviewed by Dan Bernstein.
1895
1896         See WebCore/ChangeLog for more detail.
1897
1898         * WebCoreSupport/WebDragClient.h:
1899         * WebCoreSupport/WebDragClient.mm:
1900         (WebDragClient::declareAndWriteAttachment): Deleted.
1901         * WebView/WebHTMLView.mm:
1902         (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
1903
1904 2017-12-22  Wenson Hsieh  <wenson_hsieh@apple.com>
1905
1906         Unreviewed, continue to fix build failures due to AppKit API deprecation
1907
1908         Wraps more code in -Wdeprecated-declarations.
1909
1910         * Carbon/HIWebView.mm:
1911         (overrideCGContext):
1912
1913 2017-12-22  Wenson Hsieh  <wenson_hsieh@apple.com>
1914
1915         Unreviewed, fix build failures due to using deprecated AppKit symbols when building 32-bit
1916
1917         Wrap some more code in -Wdeprecated-declarations to try and fix the 32-bit build using the newest SDK.
1918
1919         * Carbon/CarbonWindowAdapter.mm:
1920         (-[CarbonWindowAdapter setViewsNeedDisplay:]):
1921         * Plugins/WebNetscapePluginView.mm:
1922         (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
1923         (-[WebNetscapePluginView sendDrawRectEvent:]):
1924         (-[WebNetscapePluginView drawRect:]):
1925
1926 2017-12-22  Wenson Hsieh  <wenson_hsieh@apple.com>
1927
1928         Fix build failures due to using deprecated AppKit symbols
1929         https://bugs.webkit.org/show_bug.cgi?id=181110
1930         <rdar://problem/36162865>
1931
1932         Reviewed by Dan Bernstein and Tim Horton.
1933
1934         See WebCore ChangeLog for more details. Additionally makes a few minor adjustments to pass our style checker.
1935
1936         * Misc/WebKitNSStringExtras.mm:
1937         (-[NSString _web_drawAtPoint:font:textColor:]):
1938         * Misc/WebNSPasteboardExtras.h:
1939         * Misc/WebNSPasteboardExtras.mm:
1940         (+[NSPasteboard _web_writableTypesForURL]):
1941         (_createWritableTypesForImageWithoutArchive):
1942         (_createWritableTypesForImageWithArchive):
1943         (+[NSPasteboard _web_dragTypesForURL]):
1944         (-[NSPasteboard _web_bestURL]):
1945         (-[NSPasteboard _web_writeURL:andTitle:types:]):
1946         (+[NSPasteboard _web_setFindPasteboardString:withOwner:]):
1947         (-[NSPasteboard _web_writeFileWrapperAsRTFDAttachment:]):
1948         (-[NSPasteboard _web_writeImage:element:URL:title:archive:types:source:]):
1949         (-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):
1950         * Panels/WebAuthenticationPanel.m:
1951         (-[WebAuthenticationPanel runAsModalDialogWithChallenge:]):
1952         (-[WebAuthenticationPanel sheetDidEnd:returnCode:contextInfo:]):
1953         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1954         (-[WebHostedNetscapePluginView drawRect:]):
1955         * WebInspector/WebNodeHighlightView.mm:
1956         (-[WebNodeHighlightView drawRect:]):
1957         * WebView/WebFrame.mm:
1958         (-[WebFrame _updateBackgroundAndUpdatesWhileOffscreen]):
1959         (-[WebFrame _drawRect:contentsOnly:]):
1960         * WebView/WebHTMLView.mm:
1961         (kit):
1962         (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:]):
1963         (-[WebHTMLView _plainTextFromPasteboard:]):
1964         (-[WebHTMLView _writeSelectionWithPasteboardTypes:toPasteboard:cachedAttributedString:]):
1965         (+[WebHTMLView _insertablePasteboardTypes]):
1966         (+[WebHTMLView _selectionPasteboardTypes]):
1967         (-[WebHTMLView pasteboard:provideDataForType:]):
1968         (-[WebHTMLView _writeSelectionToPasteboard:]):
1969         (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
1970         (-[WebHTMLView validRequestorForSendType:returnType:]):
1971         (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
1972         (createMenuItem):
1973         (-[WebHTMLView _fontAttributesFromFontPasteboard]):
1974         (-[WebHTMLView _colorAsString:]):
1975         (-[WebHTMLView copyFont:]):
1976         * WebView/WebPDFView.mm:
1977         (-[WebPDFView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
1978         (-[WebPDFView _recursiveDisplayAllDirtyWithLockFocus:visRect:]):
1979         (-[WebPDFView _recursive:displayRectIgnoringOpacity:inContext:topView:]):
1980         (-[WebPDFView pasteboardTypesForSelection]):
1981         (-[WebPDFView writeSelectionWithPasteboardTypes:toPasteboard:]):
1982         * WebView/WebView.h:
1983         * WebView/WebView.mm:
1984         (-[WebView performDragOperation:]):
1985         (-[WebView validateUserInterfaceItemWithoutDelegate:]):
1986         (-[WebView _searchWithGoogleFromMenu:]):
1987
1988 2017-12-21  Youenn Fablet  <youenn@apple.com>
1989
1990         ServiceWorkerThreadProxy should set the correct cookie and cache partitioning options
1991         https://bugs.webkit.org/show_bug.cgi?id=181000
1992
1993         Reviewed by Chris Dumez.
1994
1995         * Misc/WebCache.mm:
1996         (+[WebCache addImageToCache:forURL:forFrame:]):
1997
1998 2017-12-21  Jeremy Jones  <jeremyj@apple.com>
1999
2000         Update FULLSCREEN_API feature defines.
2001         https://bugs.webkit.org/show_bug.cgi?id=181015
2002
2003         Reviewed by Tim Horton.
2004
2005         Change enabled iphone sdk for FULLSCREEN_API.
2006
2007         * Configurations/FeatureDefines.xcconfig:
2008
2009 2017-12-21  Jer Noble  <jer.noble@apple.com>
2010
2011         Add initial DOM support for Media Capabilities
2012         https://bugs.webkit.org/show_bug.cgi?id=181064
2013
2014         Reviewed by Eric Carlson.
2015
2016         Add a new preference to enable the (disabled-by-default) Media Capabilities API.
2017
2018         * WebView/WebPreferenceKeysPrivate.h:
2019         * WebView/WebPreferences.mm:
2020         (+[WebPreferences initialize]):
2021         (-[WebPreferences mediaCapabilitiesEnabled]):
2022         (-[WebPreferences setMediaCapabilitiesEnabled:]):
2023         * WebView/WebPreferencesPrivate.h:
2024         * WebView/WebView.mm:
2025         (-[WebView _preferencesChanged:]):
2026
2027 2017-12-21  Jeremy Jones  <jeremyj@apple.com>
2028
2029         Enable picture-in-picture from inline element on suspend.
2030         https://bugs.webkit.org/show_bug.cgi?id=180942
2031         rdar://problem/34745234
2032
2033         Reviewed by Jer Noble.
2034
2035         Update signature of enterVideoFullscreenForVideoElement().
2036
2037         * WebCoreSupport/WebChromeClient.h:
2038         * WebCoreSupport/WebChromeClient.mm:
2039         (WebChromeClient::enterVideoFullscreenForVideoElement):
2040
2041 2017-12-20  Daniel Bates  <dabates@apple.com>
2042
2043         Remove Alternative Presentation Button
2044         https://bugs.webkit.org/show_bug.cgi?id=180500
2045         <rdar://problem/35891047>
2046
2047         Reviewed by Simon Fraser.
2048
2049         We no longer need the alternative presentation button.
2050
2051         * Configurations/FeatureDefines.xcconfig:
2052
2053 2017-12-19  Jer Noble  <jer.noble@apple.com>
2054
2055         Playing media elements which call "pause(); play()" will have the play promise rejected.
2056         https://bugs.webkit.org/show_bug.cgi?id=180781
2057         <rdar://problem/33191377>
2058
2059         Reviewed by Eric Carlson.
2060
2061         shouldRequireUserGestureToLoadVideo() should default to false on Mac.
2062
2063         * WebView/WebView.mm:
2064         (shouldRequireUserGestureToLoadVideo):
2065
2066 2017-12-19  Wenson Hsieh  <wenson_hsieh@apple.com>
2067
2068         API test WKAttachmentTests.InsertPastedAttributedStringContainingMultipleAttachments is failing on El Capitan and Sierra
2069         https://bugs.webkit.org/show_bug.cgi?id=180977
2070
2071         Reviewed by Tim Horton.
2072
2073         Fixes a failing API test by updating markup deserialization codepaths in WebKitLegacy to behave like the modern
2074         WebCore counterpart. When determining element tags to exclude when generating markup from an attributed string,
2075         don't add "object" as an element to exclude if the attachment element runtime feature is enabled.
2076
2077         * WebCoreSupport/WebEditorClient.mm:
2078         (attributesForAttributedStringConversion):
2079         * WebView/WebHTMLView.mm:
2080         (+[WebHTMLView _excludedElementsForAttributedStringConversion]):
2081
2082 2017-12-18  David Kilzer  <ddkilzer@apple.com>
2083
2084         BUILD FIX: Ignore NSWindow deprecation warnings from the mysterious future
2085
2086         Attempt to fix the following warnings:
2087
2088             AppKit instance variables are private, and the ability to access them will be removed in a future release. [-Werror,-Wdeprecated-declarations]
2089
2090         For the following instance variables:
2091
2092             _borderView
2093             _contentView
2094             _frame
2095             _wFlags
2096
2097         * Carbon/CarbonWindowAdapter.mm:
2098         (-[CarbonWindowAdapter initWithCarbonWindowRef:takingOwnership:disableOrdering:carbon:]):
2099         (-[CarbonWindowAdapter reconcileToCarbonWindowBounds]):
2100         (-[CarbonWindowAdapter _termWindowIfOwner]):
2101         (-[CarbonWindowAdapter _windowMovedToRect:]):
2102         (-[CarbonWindowAdapter setContentView:]):
2103         (-[CarbonWindowAdapter _handleRootBoundsChanged]):
2104         (-[CarbonWindowAdapter _handleContentBoundsChanged]):
2105
2106 2017-12-16  Dan Bernstein  <mitz@apple.com>
2107
2108         WKWebView has no equivalent of -[WebView setAlwaysShowVerticalScroller:]
2109         https://bugs.webkit.org/show_bug.cgi?id=180613
2110         <rdar://problem/35946124>
2111
2112         Reviewed by Geoff Garen.
2113
2114         * WebKit.mac.exp: Removed WebCoreScrollbarAlwaysOn, which is no longer being used by any
2115           clients.
2116         * WebView/WebDynamicScrollBarsView.h: Ditto.
2117         * WebView/WebDynamicScrollBarsView.mm: Ditto.
2118
2119 2017-12-14  David Kilzer  <ddkilzer@apple.com>
2120
2121         Enable -Wstrict-prototypes for WebKit
2122         <https://webkit.org/b/180757>
2123         <rdar://problem/36024132>
2124
2125         Rubber-stamped by Joseph Pecoraro.
2126
2127         * Configurations/Base.xcconfig:
2128         (CLANG_WARN_STRICT_PROTOTYPES): Add. Set to YES.
2129
2130 2017-12-14  John Wilander  <wilander@apple.com>
2131
2132         Storage Access API: Implement frame-specific access in the document.cookie layer
2133         https://bugs.webkit.org/show_bug.cgi?id=180682
2134         <rdar://problem/35982257>
2135
2136         Reviewed by Alex Christensen.
2137
2138         CookiesStrategy::cookiesForDOM(), CookiesStrategy::setCookiesFromDOM(),
2139         CookiesStrategy::cookieRequestHeaderFieldValue(), and
2140         CookiesStrategy::getRawCookies() now take optional parameters for
2141         frameID and pageID to allow frame-specific scoping of cookies.
2142
2143         This change makes the return values of FrameLoaderClient::frameID()
2144         and FrameLoaderClient::pageID() std::optional<uint64_t> so that
2145         WebCore can call those getters and get the right return values in
2146         WebKit and std:nullopt in WebKitLegacy.
2147
2148         * WebCoreSupport/WebFrameLoaderClient.h:
2149         * WebCoreSupport/WebFrameLoaderClient.mm:
2150         (WebFrameLoaderClient::pageID const):
2151         (WebFrameLoaderClient::frameID const):
2152         * WebCoreSupport/WebPlatformStrategies.h:
2153         * WebCoreSupport/WebPlatformStrategies.mm:
2154         (WebPlatformStrategies::cookiesForDOM):
2155         (WebPlatformStrategies::setCookiesFromDOM):
2156         (WebPlatformStrategies::cookieRequestHeaderFieldValue):
2157         (WebPlatformStrategies::getRawCookies):
2158
2159 2017-12-12  Simon Fraser  <simon.fraser@apple.com>
2160
2161         Remove ColorSpaceDeviceRGB and most users of the obsolete deviceRGB colorspace
2162         https://bugs.webkit.org/show_bug.cgi?id=180689
2163
2164         Reviewed by Tim Horton.
2165
2166         Use sRGBColorSpaceRef() from WebCore.
2167
2168         * WebView/WebHTMLView.mm:
2169         (imageFromRect):
2170
2171 2017-12-11  Tim Horton  <timothy_horton@apple.com>
2172
2173         Stop using deprecated target conditional for simulator builds
2174         https://bugs.webkit.org/show_bug.cgi?id=180662
2175         <rdar://problem/35136156>
2176
2177         Reviewed by Simon Fraser.
2178
2179         * postprocess-headers.sh:
2180
2181 2017-12-11  David Quesada  <david_quesada@apple.com>
2182
2183         Turn on ENABLE_APPLICATION_MANIFEST
2184         https://bugs.webkit.org/show_bug.cgi?id=180562
2185         rdar://problem/35924737
2186
2187         Reviewed by Geoffrey Garen.
2188
2189         * Configurations/FeatureDefines.xcconfig:
2190
2191 2017-12-08  Yusuke Suzuki  <utatane.tea@gmail.com>
2192
2193         Remove pthread_once in favor of dispatch_once
2194         https://bugs.webkit.org/show_bug.cgi?id=180591
2195
2196         Reviewed by Saam Barati.
2197
2198         * Misc/WebKitErrors.m:
2199         (+[NSError _registerWebKitErrors]):
2200         (registerErrors): Deleted.
2201         * Storage/WebStorageManager.mm:
2202         (+[WebStorageManager _storageDirectoryPath]):
2203         (initializeLocalStoragePath): Deleted.
2204
2205 2017-12-07  Darin Adler  <darin@apple.com>
2206
2207         Remove some unused code from WebKitLegacy
2208         https://bugs.webkit.org/show_bug.cgi?id=180567
2209
2210         Reviewed by Anders Carlsson.
2211
2212         * Misc/WebKitNSStringExtras.h: Researched which of these functions are used in
2213         macOS (back a few versions) and iOS and removed unused
2214         _web_drawAtPoint:font:textColor:allowingFontSmoothing:,
2215         _web_drawDoubledAtPoint:withTopColor:bottomColor:font:,
2216         _web_stringByStrippingReturnCharacters, _webkit_hasCaseInsensitiveSubstring:,
2217         _webkit_stringByCollapsingNonPrintingCharacters,
2218         _webkit_stringByCollapsingWhitespaceCharacters,
2219         _web_stringWithData:textEncodingName:, and
2220         _webkit_localStorageDirectoryWithBundleIdentifier:.
2221
2222         * Misc/WebKitNSStringExtras.mm: Made WebKitLocalCacheDefaultsKey private to
2223         this source file.
2224         (canUseFastRenderer): Made this faster by not calling u_charDirection for
2225         Latin-1 characters, and also added special cases for U_DIR_NON_SPACING_MARK
2226         and U_BOUNDARY_NEUTRAL, which should not prevent use of the fast renderer.
2227         (-[NSString _web_drawAtPoint:font:textColor:allowingFontSmoothing:]): Deleted.
2228         (-[NSString _web_drawAtPoint:font:textColor:]): Removed unneeded code to
2229         handle font smoothing options.
2230         (-[NSString _web_drawDoubledAtPoint:withTopColor:bottomColor:font:]): Deleted.
2231         (-[NSString _web_stringByAbbreviatingWithTildeInPath]): Moved comment here
2232         from header and made it a little clearer.
2233         (-[NSString _web_stringByStrippingReturnCharacters]): Deleted.
2234         (-[NSString _webkit_hasCaseInsensitiveSubstring:]): Deleted.
2235         (-[NSString _webkit_stringByCollapsingNonPrintingCharacters]): Deleted.
2236         (-[NSString _webkit_stringByCollapsingWhitespaceCharacters]): Deleted.
2237         (+[NSString _web_stringWithData:textEncodingName:]): Deleted.
2238         (+[NSString _webkit_localCacheDirectoryWithBundleIdentifier:]): Streamlined
2239         implementation a bit and used whole words instead of abbreviations.
2240         (+[NSString _webkit_localStorageDirectoryWithBundleIdentifier:]): Deleted.
2241
2242         * Misc/WebNSFileManagerExtras.mm:
2243         (-[NSFileManager _webkit_pathWithUniqueFilenameForPath:]): Use the
2244         filenameByFixingIllegalCharacters function from WebCore directly instead of
2245         indirectly through the method _webkit_filenameByFixingIllegalCharacters.
2246
2247         * Plugins/WebBaseNetscapePluginView.mm:
2248         (-[WebBaseNetscapePluginView URLWithCString:]): Rewrote to use simple
2249         string replacements instead of _web_stringByStrippingReturnCharacters
2250         and to use NSString methods instead of CFString functions.
2251
2252 2017-12-07  Jessie Berlin  <jberlin@webkit.org>
2253
2254         Ignore deprecation warnings.
2255
2256         * WebView/WebHTMLView.mm:
2257         (-[NSWindow _web_borderView]):
2258         (-[WebHTMLView _setAsideSubviews]):
2259         * WebView/WebView.mm:
2260         (-[WebView encodeWithCoder:]):
2261
2262 2017-12-02  Darin Adler  <darin@apple.com>
2263
2264         Modernize some aspects of text codecs, eliminate WebKit use of strcasecmp
2265         https://bugs.webkit.org/show_bug.cgi?id=180009
2266
2267         Reviewed by Alex Christensen.
2268
2269         * History/HistoryPropertyList.mm: Removed include of StringExtras.h.
2270
2271         * Plugins/WebBaseNetscapePluginView.mm:
2272         (WebKit::getAuthenticationInfo): Use equalLettersIgnoringASCIICase instead
2273         of strcasecmp.
2274
2275         * WebView/WebPreferences.mm:
2276         (contains): Ditto. Also made this a template so it's easier to call on an array.
2277         (cacheModelForMainBundle): Take advantage of the above to make it cleaner.
2278
2279 2017-12-05  Brent Fulgham  <bfulgham@apple.com>
2280
2281         Limit user agent versioning to an upper bound
2282         https://bugs.webkit.org/show_bug.cgi?id=180365
2283         <rdar://problem/34550617>
2284
2285         Reviewed by Joseph Pecoraro.
2286
2287         * WebView/WebView.mm:
2288         (+[WebView _standardUserAgentWithApplicationName:]): Don't pass the WebKit bundle version when
2289         creating the User Agent string.
2290         (webKitBundleVersionString): Deleted.
2291
2292 2017-12-05  Andy Estes  <aestes@apple.com>
2293
2294         [Cocoa] Stop specifying TARGET_OS_EMBEDDED in postprocess-headers.sh's unifdef options
2295         https://bugs.webkit.org/show_bug.cgi?id=180457
2296         <rdar://problem/35143007>
2297
2298         Reviewed by Tim Horton.
2299
2300         None of WebKitLegacy's framework headers mention TARGET_OS_EMBEDDED, so there's no need to
2301         check for this macro during post-processing.
2302
2303         * postprocess-headers.sh:
2304
2305 2017-12-04  David Quesada  <david_quesada@apple.com>
2306
2307         Add a class for parsing application manifests
2308         https://bugs.webkit.org/show_bug.cgi?id=177973
2309         rdar://problem/34747949
2310
2311         Reviewed by Geoffrey Garen.
2312
2313         * Configurations/FeatureDefines.xcconfig: Add ENABLE_APPLICATION_MANIFEST feature flag.
2314
2315 2017-11-30  Stephan Szabo  <stephan.szabo@sony.com>
2316
2317         Make LegacyCustomProtocolManager optional for network process
2318         https://bugs.webkit.org/show_bug.cgi?id=176230
2319
2320         Reviewed by Alex Christensen.
2321
2322         * Configurations/FeatureDefines.xcconfig:
2323
2324 2017-11-30  Joseph Pecoraro  <pecoraro@apple.com>
2325
2326         Fix some NSOperationQueue leaks
2327         https://bugs.webkit.org/show_bug.cgi?id=180221
2328
2329         Reviewed by Wenson Hsieh.
2330
2331         * WebView/WebView.mm:
2332         (-[WebView performDragOperation:]):
2333
2334 2017-11-30  Darin Adler  <darin@apple.com>
2335
2336         [Mac] remove unneeded RetainPtr use introduced in r225142
2337         https://bugs.webkit.org/show_bug.cgi?id=180202
2338
2339         Reviewed by Tim Horton.
2340
2341         * WebView/WebImmediateActionController.mm:
2342         (-[WebImmediateActionController _animationControllerForText]): Got rid of unnecessary
2343         RetainPtr.
2344
2345 2017-11-29  Said Abou-Hallawa  <sabouhallawa@apple.com>
2346
2347         Remove the ImageSource from the class hierarchy that connects BitmapImage to ImageFrame
2348         https://bugs.webkit.org/show_bug.cgi?id=175595
2349
2350         Reviewed by Darin Adler.
2351
2352         * WebView/WebPreferences.mm:
2353
2354 2017-11-27  Tim Horton  <timothy_horton@apple.com>
2355
2356         One too many zeroes in macOS version number in FeatureDefines
2357         https://bugs.webkit.org/show_bug.cgi?id=180011
2358
2359         Reviewed by Dan Bernstein.
2360
2361         * Configurations/FeatureDefines.xcconfig:
2362
2363 2017-11-23  Darin Adler  <darin@apple.com>
2364
2365         Fix dictionary leak in lookup, convert FindOptions to OptionSet, tweak code style nearby
2366         https://bugs.webkit.org/show_bug.cgi?id=179981
2367
2368         Reviewed by Sam Weinig.
2369
2370         * WebView/WebImmediateActionController.mm:
2371         (-[WebImmediateActionController _animationControllerForText]): Use RetainPtr so we don't leak.
2372         * WebView/WebView.mm:
2373         (coreOptions): Use |= instead of | to build up FindOptions.
2374
2375 2017-11-23  Sam Weinig  <sam@webkit.org>
2376
2377         Remove unneeded ScriptController::processingUserGesture() forwarding functions
2378         https://bugs.webkit.org/show_bug.cgi?id=179954
2379
2380         Reviewed by Darin Adler.
2381
2382         Replace ScriptController::processingUserGesture() and ScriptController::processingUserGestureForMedia()
2383         with direct calls to the corresponding UserGestureIndicator functions.
2384
2385         * Plugins/WebPluginController.mm:
2386         (-[WebPluginController processingUserGesture]):
2387         * WebView/WebView.mm:
2388         (-[WebView _isProcessingUserGesture]):
2389
2390 2017-11-23  Darin Adler  <darin@apple.com>
2391
2392         Reduce WTF::String operations that do unnecessary Unicode operations instead of ASCII
2393         https://bugs.webkit.org/show_bug.cgi?id=179907
2394
2395         Reviewed by Sam Weinig.
2396
2397         * History/BinaryPropertyList.cpp:
2398         (BinaryPropertyListPlan::writeStringObject): Use isAllASCII.
2399         (BinaryPropertyListSerializer::appendStringObject): Ditto.
2400         * WebView/WebHTMLRepresentation.mm:
2401         (regExpForLabels): Removed TextCaseSensitive since it is now the default.
2402         (matchLabelsAgainstString): Use JSC::Yarr::TextCaseInsensitive.
2403
2404 2017-11-22  Ali Juma  <ajuma@chromium.org>
2405
2406         Implement VisualViewport API attributes
2407         https://bugs.webkit.org/show_bug.cgi?id=179385
2408
2409         Reviewed by Frédéric Wang.
2410
2411         Add a VisualViewportAPI preference.
2412
2413         * WebView/WebPreferenceKeysPrivate.h:
2414         * WebView/WebPreferences.mm:
2415         (+[WebPreferences initialize]):
2416         (-[WebPreferences visualViewportAPIEnabled]):
2417         (-[WebPreferences setVisualViewportAPIEnabled:]):
2418         * WebView/WebPreferencesPrivate.h:
2419         * WebView/WebView.mm:
2420         (-[WebView _preferencesChanged:]):
2421
2422 2017-11-22  Christopher Reid  <chris.reid@sony.com>
2423
2424         WebCoreObjCExtras.h is being included in too many places
2425         https://bugs.webkit.org/show_bug.cgi?id=179931
2426
2427         Reviewed by Darin Adler.
2428
2429         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
2430         * Plugins/WebBaseNetscapePluginView.mm:
2431         * Plugins/WebBasePluginPackage.mm:
2432         * Plugins/WebNetscapePluginStream.mm:
2433         * Plugins/WebNetscapePluginView.mm:
2434         * WebView/WebTextIterator.mm:
2435         * WebView/WebViewData.mm:
2436
2437 2017-11-22  Commit Queue  <commit-queue@webkit.org>
2438
2439         Unreviewed, rolling out r225093.
2440         https://bugs.webkit.org/show_bug.cgi?id=179938
2441
2442         Compilation failed on WinCairo 64-bit Release (Requested by
2443         fredw on #webkit).
2444
2445         Reverted changeset:
2446
2447         "Implement VisualViewport API attributes"
2448         https://bugs.webkit.org/show_bug.cgi?id=179385
2449         https://trac.webkit.org/changeset/225093
2450
2451 2017-11-21  Ali Juma  <ajuma@chromium.org>
2452
2453         Implement VisualViewport API attributes
2454         https://bugs.webkit.org/show_bug.cgi?id=179385
2455
2456         Reviewed by Frédéric Wang.
2457
2458         Add a VisualViewportAPI preference.
2459
2460         * WebView/WebPreferenceKeysPrivate.h:
2461         * WebView/WebPreferences.mm:
2462         (+[WebPreferences initialize]):
2463         (-[WebPreferences visualViewportAPIEnabled]):
2464         (-[WebPreferences setVisualViewportAPIEnabled:]):
2465         * WebView/WebPreferencesPrivate.h:
2466         * WebView/WebView.mm:
2467         (-[WebView _preferencesChanged:]):
2468
2469 2017-11-21  Christopher Reid  <chris.reid@sony.com>
2470
2471         [PAL] Remove FileSystem's dependency on WebCoreNSStringExtras
2472         https://bugs.webkit.org/show_bug.cgi?id=179504
2473
2474         Reviewed by Darin Adler.
2475
2476         * Misc/WebKitNSStringExtras.mm:
2477         * Plugins/Hosted/NetscapePluginHostManager.mm:
2478         * Plugins/WebBasePluginPackage.mm:
2479
2480 2017-11-19  Tim Horton  <timothy_horton@apple.com>
2481
2482         Remove unused TOUCH_ICON_LOADING feature flag
2483         https://bugs.webkit.org/show_bug.cgi?id=179873
2484
2485         Reviewed by Simon Fraser.
2486
2487         * Configurations/FeatureDefines.xcconfig:
2488
2489 2017-11-19  Tim Horton  <timothy_horton@apple.com>
2490
2491         Remove unused LEGACY_VENDOR_PREFIXES feature flag
2492         https://bugs.webkit.org/show_bug.cgi?id=179872
2493
2494         Reviewed by Darin Adler.
2495
2496         * Configurations/FeatureDefines.xcconfig:
2497
2498 2017-11-16  Daniel Bates  <dabates@apple.com>
2499
2500         Add feature define for alternative presentation button element
2501         https://bugs.webkit.org/show_bug.cgi?id=179692
2502         Part of <rdar://problem/34917108>
2503
2504         Reviewed by Andy Estes.
2505
2506         Only enabled on Cocoa platforms by default.
2507
2508         * Configurations/FeatureDefines.xcconfig:
2509
2510 2017-11-14  Nan Wang  <n_wang@apple.com>
2511
2512         AX: AOM: Implement AccessibleNode class and support label and role attributes
2513         https://bugs.webkit.org/show_bug.cgi?id=179494
2514
2515         Reviewed by Ryosuke Niwa.
2516
2517         * WebView/WebPreferenceKeysPrivate.h:
2518         * WebView/WebPreferences.mm:
2519         (+[WebPreferences initialize]):
2520         (-[WebPreferences accessibilityObjectModelEnabled]):
2521         (-[WebPreferences setAccessibilityObjectModelEnabled:]):
2522         * WebView/WebPreferencesPrivate.h:
2523         * WebView/WebView.mm:
2524         (-[WebView _preferencesChanged:]):
2525
2526 2017-11-14  Alex Christensen  <achristensen@webkit.org>
2527
2528         Remove Cocoa CFURLConnection loading code
2529         https://bugs.webkit.org/show_bug.cgi?id=179688
2530
2531         Reviewed by Antti Koivisto.
2532
2533         * Misc/WebDownload.mm:
2534         (-[WebDownload _initWithLoadingCFURLConnection:request:response:delegate:proxy:]): Deleted.
2535         * Misc/WebDownloadInternal.h:
2536         * Plugins/WebBaseNetscapePluginView.mm:
2537         * WebCoreSupport/WebFrameLoaderClient.mm:
2538         (WebFrameLoaderClient::convertMainResourceLoadToDownload):
2539         * WebView/WebView.mm:
2540         (-[WebView scheduleInRunLoop:forMode:]):
2541         (-[WebView unscheduleFromRunLoop:forMode:]):
2542
2543 2017-11-14  Daniel Bates  <dabates@apple.com>
2544
2545         Update comment in FeatureDefines.xcconfig to reflect location of Visual Studio property files
2546         for feature defines
2547
2548         Following r195498 and r201917 the Visual Studio property files for feature defines have
2549         moved from directory WebKitLibraries/win/tools/vsprops to directory Source/cmake/tools/vsprops.
2550         Update the comment in FeatureDefines.xcconfig to reflect the new location and names of these
2551         files.
2552
2553         * Configurations/FeatureDefines.xcconfig:
2554
2555 2017-11-14  Jer Noble  <jer.noble@apple.com>
2556
2557         Enable Modern EME tests in DumpRenderTree
2558         https://bugs.webkit.org/show_bug.cgi?id=179544
2559
2560         Reviewed by Alex Christensen.
2561
2562         Add a WebPreferences property to enable the (modern) EME API.
2563
2564         * WebView/WebPreferenceKeysPrivate.h:
2565         * WebView/WebPreferences.mm:
2566         (+[WebPreferences initialize]):
2567         (-[WebPreferences encryptedMediaAPIEnabled]):
2568         (-[WebPreferences setEncryptedMediaAPIEnabled:]):
2569         * WebView/WebPreferencesPrivate.h:
2570         * WebView/WebView.mm:
2571         (-[WebView _preferencesChanged:]):
2572
2573 2017-11-14  Antti Koivisto  <antti@apple.com>
2574
2575         Enable display:contents by default
2576         https://bugs.webkit.org/show_bug.cgi?id=179655
2577
2578         Reviewed by Sam Weinig.
2579
2580         * WebView/WebPreferences.mm:
2581         (+[WebPreferences initialize]):
2582
2583 2017-11-13  Alex Christensen  <achristensen@webkit.org>
2584
2585         Merge NetworkProcess::EnsurePrivateBrowsingSession and NetworkProcess::AddWebsiteDataStore into one message type
2586         https://bugs.webkit.org/show_bug.cgi?id=178751
2587
2588         Reviewed by Brady Eidson.
2589
2590         * WebCoreSupport/WebFrameNetworkingContext.mm:
2591         (WebFrameNetworkingContext::ensurePrivateBrowsingSession):
2592
2593 2017-11-08  Keith Miller  <keith_miller@apple.com>
2594
2595         Async iteration should only fetch the next method once and add feature flag
2596         https://bugs.webkit.org/show_bug.cgi?id=179451
2597
2598         Reviewed by Geoffrey Garen.
2599
2600         Add feature flag for Async iteration.
2601
2602         * Configurations/FeatureDefines.xcconfig:
2603
2604 2017-11-13  Mark Lam  <mark.lam@apple.com>
2605
2606         Add more overflow check book-keeping for MarkedArgumentBuffer.
2607         https://bugs.webkit.org/show_bug.cgi?id=179634
2608         <rdar://problem/35492517>
2609
2610         Reviewed by Saam Barati.
2611
2612         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2613         (WebKit::NetscapePluginInstanceProxy::invoke):
2614         (WebKit::NetscapePluginInstanceProxy::invokeDefault):
2615         (WebKit::NetscapePluginInstanceProxy::construct):
2616
2617 2017-11-12  Darin Adler  <darin@apple.com>
2618
2619         More is<> and downcast<>, less static_cast<>
2620         https://bugs.webkit.org/show_bug.cgi?id=179600
2621
2622         Reviewed by Chris Dumez.
2623
2624         * DOM/DOM.mm:
2625         (kit): Use is/downcast.
2626         * WebCoreSupport/WebEditorClient.mm:
2627         (WebEditorClient::handleKeyboardEvent): Ditto.
2628         (WebEditorClient::handleInputMethodKeydown): Ditto.
2629         * WebView/WebHTMLView.mm:
2630         (-[WebHTMLView _interpretKeyEvent:savingCommands:]): Ditto.
2631
2632 2017-11-10  Frederik Riedel  <frederik.riedel@frogg.io>
2633
2634         [iOS] Use new class name from UIKit when checking UITextSuggestion type for WebKitLegacy
2635         https://bugs.webkit.org/show_bug.cgi?id=179397
2636
2637         Reviewed by Wenson Hsieh.
2638
2639         * DOM/DOMHTMLInputElement.mm:
2640         (-[DOMHTMLInputElement insertTextSuggestion:]):
2641
2642 2017-11-08  Jeremy Jones  <jeremyj@apple.com>
2643
2644         HTMLMediaElement should not use element fullscreen on iOS
2645         https://bugs.webkit.org/show_bug.cgi?id=179418
2646         rdar://problem/35409277
2647
2648         Reviewed by Eric Carlson.
2649
2650         Add ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN to determine if HTMLMediaElement should use element full screen or not.
2651
2652         * Configurations/FeatureDefines.xcconfig:
2653
2654 2017-11-06  Alex Christensen  <achristensen@webkit.org>
2655
2656         Make ResourceLoader::willSendRequestInternal asynchronous
2657         https://bugs.webkit.org/show_bug.cgi?id=179251
2658
2659         Reviewed by Andy Estes.
2660
2661         * Plugins/Hosted/HostedNetscapePluginStream.mm:
2662         (WebKit::HostedNetscapePluginStream::start):
2663         * Plugins/WebNetscapePluginStream.mm:
2664         (WebNetscapePluginStream::start):
2665
2666 2017-11-01  Darin Adler  <darin@apple.com>
2667
2668         Simplify event dispatch code and make it a bit more consistent
2669         https://bugs.webkit.org/show_bug.cgi?id=178991
2670
2671         Reviewed by Chris Dumez.
2672
2673         * DOM/DOMEvent.mm:
2674         (-[DOMEvent srcElement]): Call target instead of srcElement.
2675
2676 2017-11-04  Aishwarya Nirmal  <anirmal@apple.com>
2677
2678         [Touch Bar Web API] Add support for menuitem tag
2679         https://bugs.webkit.org/show_bug.cgi?id=179020
2680
2681         Reviewed by Ryosuke Niwa.
2682
2683         Adds in properties and methods that allow the menuitem runtime feature
2684         to be enabled or disabled.
2685
2686         * WebView/WebPreferenceKeysPrivate.h:
2687         * WebView/WebPreferences.mm:
2688         (-[WebPreferences menuItemElementEnabled]):
2689         (-[WebPreferences setMenuItemElementEnabled:]):
2690         * WebView/WebPreferencesPrivate.h:
2691         * WebView/WebView.mm:
2692         (-[WebView _preferencesChanged:]):
2693
2694 2017-11-02  Alex Christensen  <achristensen@webkit.org>
2695
2696         Use CompletionHandlers for redirects
2697         https://bugs.webkit.org/show_bug.cgi?id=179163
2698
2699         Reviewed by Tim Horton.
2700
2701         * Plugins/Hosted/HostedNetscapePluginStream.h:
2702         * Plugins/Hosted/HostedNetscapePluginStream.mm:
2703         (WebKit::HostedNetscapePluginStream::willSendRequest):
2704         * Plugins/WebNetscapePluginStream.h:
2705         * Plugins/WebNetscapePluginStream.mm:
2706         (WebNetscapePluginStream::willSendRequest):
2707
2708 2017-11-02  Christopher Reid  <chris.reid@sony.com>
2709
2710         Add a FileSystem namespace to FileSystem.cpp
2711         https://bugs.webkit.org/show_bug.cgi?id=179063
2712
2713         Reviewed by Darin Adler.
2714
2715         * Misc/WebNSFileManagerExtras.mm:
2716         * Storage/WebDatabaseProvider.mm:
2717
2718 2017-11-02  Frederic Wang  <fwang@igalia.com>
2719
2720         Add references to bug 179167 in FIXME comments
2721         https://bugs.webkit.org/show_bug.cgi?id=179168
2722
2723         Reviewed by Daniel Bates.
2724
2725         * Configurations/FeatureDefines.xcconfig:
2726
2727 2017-11-01  Jeremy Jones  <jeremyj@apple.com>
2728
2729         Implement WKFullscreenWindowController for iOS.
2730         https://bugs.webkit.org/show_bug.cgi?id=178924
2731         rdar://problem/34697120
2732
2733         Reviewed by Simon Fraser.
2734
2735         Enable ENABLE_FULLSCREEN_API for iOS. Fix a build error.
2736
2737         * Configurations/FeatureDefines.xcconfig:
2738         * WebView/WebView.mm:
2739         (-[WebView fullScreenPlaceholderView]):
2740
2741 2017-10-31  Tim Horton  <timothy_horton@apple.com>
2742
2743         Clean up some drag and drop feature flags
2744         https://bugs.webkit.org/show_bug.cgi?id=179082
2745
2746         Reviewed by Simon Fraser.
2747
2748         * Configurations/FeatureDefines.xcconfig:
2749
2750 2017-10-31  Simon Fraser  <simon.fraser@apple.com>
2751
2752         Make it possible to test rubber-banding in overflow scroll
2753         https://bugs.webkit.org/show_bug.cgi?id=179078
2754
2755         Reviewed by Sam Weinig.
2756
2757         Add internals.unconstrainedScrollTo(element, x, y) and plumb through ScrollClamping
2758         (which replaces RenderLayer::ScrollOffsetClamping) to support it.
2759
2760         Flip the default from unclamped to clamped for various RenderLayer scrolling-related
2761         functions, since most callers want clamped.
2762
2763         * DOM/DOMHTML.mm:
2764         (-[DOMHTMLElement setScrollXOffset:scrollYOffset:adjustForIOSCaret:]):
2765
2766 2017-10-31  Tim Horton  <timothy_horton@apple.com>
2767
2768         Fix up some content filtering feature flags
2769         https://bugs.webkit.org/show_bug.cgi?id=179079
2770
2771         Reviewed by Simon Fraser.
2772
2773         * Configurations/FeatureDefines.xcconfig:
2774
2775 2017-10-28  Zalan Bujtas  <zalan@apple.com>
2776
2777         [FrameView::layout cleanup] Move core layout logic to a separate class.
2778         https://bugs.webkit.org/show_bug.cgi?id=178771
2779         <rdar://problem/35166542>
2780
2781         Reviewed by Simon Fraser.
2782
2783         Move layout code out from FrameView to LayoutContext.
2784
2785         * WebView/WebClipView.mm:
2786         (-[WebClipView _immediateScrollToPoint:]):
2787         * WebView/WebFrame.mm:
2788         (-[WebFrame layoutCount]):
2789
2790 2017-10-26  Simon Fraser  <simon.fraser@apple.com>
2791
2792         Fix issues with WebView subframe painting
2793         https://bugs.webkit.org/show_bug.cgi?id=178842
2794         rdar://problem/34072253
2795
2796         Reviewed by Daniel Bates.
2797         
2798         WebHTMLView overrides some NSView internal methods to make sure that AppKit doesn't paint
2799         subframes (WebKit controls subframe painting). The method signature of one of these changed in macOS
2800         High Sierra, so match the new signature.
2801
2802         Also rename the 'rect' param to 'displayRect' to match AppKit code.
2803
2804         * WebView/WebHTMLView.mm:
2805         (-[WebHTMLView _recursive:displayRectIgnoringOpacity:inGraphicsContext:shouldChangeFontReferenceColor:_recursive:displayRectIgnoringOpacity:inGraphicsContext:CGContext:topView:shouldChangeFontReferenceColor:]):
2806         (-[WebHTMLView _recursive:displayRectIgnoringOpacity:inGraphicsContext:CGContext:shouldChangeFontReferenceColor:_recursive:displayRectIgnoringOpacity:inGraphicsContext:CGContext:topView:shouldChangeFontReferenceColor:]): Deleted.
2807
2808 2017-10-25  Youenn Fablet  <youenn@apple.com>
2809
2810         Enable ServiceWorker to fetch resources
2811         https://bugs.webkit.org/show_bug.cgi?id=178673
2812
2813         Reviewed by Brady Eidson.
2814
2815         * WebCoreSupport/WebFrameLoaderClient.mm:
2816         (WebFrameLoaderClient::pageID const):
2817         (WebFrameLoaderClient::frameID const):
2818         (WebFrameLoaderClient::sessionID const):
2819
2820         Added implementation to the new getters.
2821         They are noop in the context of WK1.
2822
2823 2017-10-24  Eric Carlson  <eric.carlson@apple.com>
2824
2825         Web Inspector: Enable WebKit logging configuration and display
2826         https://bugs.webkit.org/show_bug.cgi?id=177027
2827         <rdar://problem/33964767>
2828
2829         Reviewed by Joseph Pecoraro.
2830
2831         * WebCoreSupport/WebChromeClient.mm:
2832         (stringForMessageSource): Deal with Media and WebRTC message sources.
2833
2834 2017-10-20  Antoine Quint  <graouts@apple.com>
2835
2836         [Web Animations] Provide basic timeline and animation interfaces
2837         https://bugs.webkit.org/show_bug.cgi?id=178526
2838
2839         Reviewed by Dean Jackson.
2840
2841         Remove the WEB_ANIMATIONS compile-time flag.
2842
2843         * Configurations/FeatureDefines.xcconfig:
2844         * WebView/WebPreferences.mm:
2845         (+[WebPreferences initialize]):
2846         * WebView/WebView.mm:
2847         (-[WebView _preferencesChanged:]):
2848
2849 2017-10-19  Sam Weinig  <sam@webkit.org>
2850
2851         [Settings] Move global settings into their own file
2852         https://bugs.webkit.org/show_bug.cgi?id=178512
2853
2854         Reviewed by Darin Adler.
2855
2856         Moves all global settigns out of SettingsBase and into the new DeprecatedGlobalSettings.
2857
2858         * WebCoreSupport/WebChromeClient.mm:
2859         (WebChromeClient::supportsVideoFullscreen):
2860         * WebView/WebDynamicScrollBarsView.mm:
2861         (+[WebDynamicScrollBarsView _horizontalScrollerClass]):
2862         (+[WebDynamicScrollBarsView _verticalScrollerClass]):
2863         * WebView/WebPreferences.mm:
2864         (+[WebPreferences initialize]):
2865         * WebView/WebView.mm:
2866         (-[WebView _commonInitializationWithFrameName:groupName:]):
2867         (-[WebView _preferencesChanged:]):
2868         (+[WebView _doNotStartObservingNetworkReachability]):
2869
2870 2017-10-17  Jiewen Tan  <jiewen_tan@apple.com>
2871
2872         Replace some stack raw pointers with RefPtrs within WebCore/html
2873         https://bugs.webkit.org/show_bug.cgi?id=178201
2874         <rdar://problem/34841692>
2875
2876         Reviewed by Ryosuke Niwa.
2877
2878         * DOM/DOM.mm:
2879         (kit):
2880         Change the type of node as toNode() is changed to return RefPtr.
2881
2882 2017-10-18  Chris Dumez  <cdumez@apple.com>
2883
2884         [Service Worker] Add stubs for Client / WindowClient / Clients
2885         https://bugs.webkit.org/show_bug.cgi?id=178469
2886
2887         Reviewed by Youenn Fablet.
2888
2889         Rename PageVisiblityState to VisibilityState.
2890
2891         * WebView/WebView.mm:
2892         (kit):
2893
2894 2017-10-18  Wenson Hsieh  <wenson_hsieh@apple.com>
2895
2896         Unreviewed, rolling out r223291.
2897
2898         See WebCore ChangeLog for more detail.
2899
2900         Reverted changeset:
2901
2902         "Remove Editor::simplifyMarkup"
2903         https://bugs.webkit.org/show_bug.cgi?id=178271
2904         https://trac.webkit.org/changeset/223291
2905
2906 2017-10-17  Keith Miller  <keith_miller@apple.com>
2907
2908         Change WebCore sources to work with unified source builds
2909         https://bugs.webkit.org/show_bug.cgi?id=178229
2910
2911         Rubber stamped by Tim Horton.
2912
2913         * Configurations/FeatureDefines.xcconfig:
2914
2915 2017-10-16  Sam Weinig  <sam@webkit.org>
2916
2917         [Settings] Remove all custom code from Settings.h/cpp
2918         https://bugs.webkit.org/show_bug.cgi?id=178330
2919
2920         Reviewed by Simon Fraser.
2921
2922         * WebView/WebPreferences.mm:
2923         (+[WebPreferences initialize]):
2924         
2925             Update for naming changes of FrameFlattening now that it is an enum class.
2926
2927 2017-10-13  Alex Christensen  <achristensen@webkit.org>
2928
2929         Remove Editor::simplifyMarkup
2930         https://bugs.webkit.org/show_bug.cgi?id=178271
2931
2932         Reviewed by Wenson Hsieh.
2933
2934         * WebView/WebView.mm:
2935         (-[WebView _simplifyMarkup:endNode:]):
2936
2937 2017-10-12  Chris Dumez  <cdumez@apple.com>
2938
2939         [Mac] Add support for MouseEvent.buttons
2940         https://bugs.webkit.org/show_bug.cgi?id=178214
2941
2942         Reviewed by Ryosuke Niwa.
2943
2944         * WebView/WebPDFView.mm:
2945         (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
2946
2947 2017-10-11  Sam Weinig  <sam@webkit.org>
2948
2949         Remove out-parameter variants of copyToVector
2950         https://bugs.webkit.org/show_bug.cgi?id=178155
2951
2952         Reviewed by Tim Horton.
2953
2954         * Plugins/WebNetscapePluginView.mm:
2955         (-[WebNetscapePluginView destroyPlugin]):
2956         * WebView/WebHTMLRepresentation.mm:
2957         (newArrayWithStrings):
2958
2959             Replace out-parameter based copyToVector, with one that returns a Vector.
2960
2961 2017-10-11  Ryosuke Niwa  <rniwa@webkit.org>
2962
2963         Sanitize URL in pasteboard for other applications and cross origin content
2964         https://bugs.webkit.org/show_bug.cgi?id=178060
2965         <rdar://problem/34874518>
2966
2967         Reviewed by Wenson Hsieh.
2968
2969         * WebCoreSupport/WebPlatformStrategies.h:
2970         * WebCoreSupport/WebPlatformStrategies.mm:
2971         (WebPlatformStrategies::typesSafeForDOMToReadAndWrite):
2972
2973 2017-10-11  Chris Dumez  <cdumez@apple.com>
2974
2975         Modernize Geolocation code
2976         https://bugs.webkit.org/show_bug.cgi?id=178148
2977
2978         Reviewed by Ryosuke Niwa.
2979
2980         * WebCoreSupport/WebGeolocationClient.h:
2981         * WebCoreSupport/WebGeolocationClient.mm:
2982         (WebGeolocationClient::lastPosition):
2983         * WebView/WebGeolocationPosition.mm:
2984         (-[WebGeolocationPositionInternal initWithCoreGeolocationPosition:]):
2985         (core):
2986         (-[WebGeolocationPosition initWithTimestamp:latitude:longitude:accuracy:]):
2987         (-[WebGeolocationPosition initWithGeolocationPosition:]):
2988         * WebView/WebGeolocationPositionInternal.h:
2989
2990 2017-10-10  Ryosuke Niwa  <rniwa@webkit.org>
2991
2992         Enable custom pasteboard data in DumpRenderTree and WebKitTestRunner
2993         https://bugs.webkit.org/show_bug.cgi?id=178154
2994
2995         Reviewed by Wenson Hsieh.
2996
2997         Enable custom pasteboard data by default.
2998
2999         * WebView/WebPreferenceKeysPrivate.h:
3000         * WebView/WebPreferences.mm:
3001         (+[WebPreferences initialize]):
3002         (-[WebPreferences customPasteboardDataEnabled]): Added.
3003         (-[WebPreferences setCustomPasteboardDataEnabled:]): Added.
3004         * WebView/WebPreferencesPrivate.h:
3005         * WebView/WebView.mm:
3006         (-[WebView _preferencesChanged:]):
3007
3008 2017-10-10  Sam Weinig  <sam@webkit.org>
3009
3010         Replace copyKeysToVector/copyValuesToVector with copyToVector(map.keys())/copyToVector(map.values())
3011         https://bugs.webkit.org/show_bug.cgi?id=178102
3012
3013         Reviewed by Tim Horton.
3014
3015         * History/WebHistory.mm:
3016         (-[WebHistoryPrivate rebuildHistoryByDayIfNeeded:]):
3017         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3018         (WebKit::NetscapePluginInstanceProxy::stopAllStreams):
3019         * WebCoreSupport/WebUserMediaClient.mm:
3020         (WebUserMediaClient::pageDestroyed):
3021
3022 2017-10-09  Robin Morisset  <rmorisset@apple.com>
3023
3024         Make the names of the options consistent
3025         https://bugs.webkit.org/show_bug.cgi?id=177933
3026
3027         Reviewed by Saam Barati.
3028
3029         * WebView/WebFrame.h:
3030         * WebView/WebHTMLView.mm:
3031         (-[WebHTMLView setMarkedText:selectedRange:]):
3032         * WebView/WebView.h:
3033
3034 2017-10-06  Wenson Hsieh  <wenson_hsieh@apple.com>
3035
3036         [iOS] Tweak support for classifying form controls (followup to r222487)
3037         https://bugs.webkit.org/show_bug.cgi?id=177917
3038         <rdar://problem/34820122>
3039
3040         Reviewed by Dean Jackson.
3041
3042         Implement _autofillContext in legacy WebKit, and remove the two previous SPI hooks.
3043
3044         * DOM/DOMHTMLInputElement.mm:
3045         (-[DOMHTMLInputElement _autofillContext]):
3046         (-[DOMHTMLInputElement acceptsAutofilledLoginCredentials]): Deleted.
3047         (-[DOMHTMLInputElement representingPageURL]): Deleted.
3048
3049 2017-10-05  Keith Miller  <keith_miller@apple.com>
3050
3051         Unreviewed, tapi builds without optimization so we should have TAPI passes -DRELEASE_WITHOUT_OPTIMIZATIONS.
3052
3053         * Configurations/WebKitLegacy.xcconfig:
3054
3055 2017-10-05  Jer Noble  <jer.noble@apple.com>
3056
3057         [Cocoa] Enable ENABLE_ENCRYPTED_MEDIA build-time setting
3058         https://bugs.webkit.org/show_bug.cgi?id=177261
3059
3060         Reviewed by Eric Carlson.
3061
3062         * Configurations/FeatureDefines.xcconfig:
3063
3064 2017-10-05  Chris Dumez  <cdumez@apple.com>
3065
3066         Drop unused parameters for CookiesStrategy::cookiesEnabled()
3067         https://bugs.webkit.org/show_bug.cgi?id=177957
3068
3069         Reviewed by Alex Christensen.
3070
3071         * WebCoreSupport/WebPlatformStrategies.h:
3072         * WebCoreSupport/WebPlatformStrategies.mm:
3073         (WebPlatformStrategies::cookiesEnabled):
3074
3075 2017-10-05  Youenn Fablet  <youenn@apple.com>
3076
3077         Make LibWebRTCProvider port agnostic
3078         https://bugs.webkit.org/show_bug.cgi?id=177747
3079
3080         Reviewed by Alex Christensen & Alex Garcia.
3081
3082         * WebView/WebView.mm:
3083         (-[WebView _commonInitializationWithFrameName:groupName:]):
3084         (-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):
3085
3086 2017-10-04  Alex Christensen  <achristensen@webkit.org>
3087
3088         Stop linking with WebKitSystemInterface
3089         https://bugs.webkit.org/show_bug.cgi?id=177915
3090
3091         Reviewed by Antti Koivisto.
3092
3093         * Configurations/DebugRelease.xcconfig:
3094         * Configurations/WebKitLegacy.xcconfig:
3095
3096 2017-10-04  Alex Christensen  <achristensen@webkit.org>
3097
3098         Remove unnecessary includes of WebKitSystemInterface on Cocoa platforms
3099         https://bugs.webkit.org/show_bug.cgi?id=177912
3100
3101         Reviewed by Saam Barati.
3102
3103         * Carbon/CarbonUtils.m:
3104         * Carbon/CarbonWindowAdapter.mm:
3105         * Carbon/HIWebView.mm:
3106         * DefaultDelegates/WebDefaultContextMenuDelegate.mm:
3107         * Misc/WebNSFileManagerExtras.mm:
3108         * Misc/WebNSPasteboardExtras.mm:
3109         * Misc/WebNSURLExtras.mm:
3110         * Plugins/Hosted/HostedNetscapePluginStream.mm:
3111         * Plugins/Hosted/NetscapePluginHostManager.mm:
3112         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3113         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3114         * Plugins/Hosted/WebHostedNetscapePluginView.h:
3115         * Plugins/Hosted/WebTextInputWindowController.m:
3116         * Plugins/WebBaseNetscapePluginView.mm:
3117         * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
3118         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
3119         * Plugins/WebNetscapePluginStream.mm:
3120         * Plugins/WebNetscapePluginView.mm:
3121         * Plugins/WebPluginDatabase.mm:
3122         * WebCoreSupport/PopupMenuMac.mm:
3123         * WebCoreSupport/WebChromeClient.mm:
3124         * WebCoreSupport/WebFrameLoaderClient.mm:
3125         * WebCoreSupport/WebInspectorClient.mm:
3126         * WebCoreSupport/WebPlatformStrategies.mm:
3127         * WebCoreSupport/WebSystemInterface.mm:
3128         * WebView/WebDynamicScrollBarsView.mm:
3129         * WebView/WebFrame.mm:
3130         * WebView/WebFrameView.mm:
3131         * WebView/WebFullScreenController.mm:
3132         * WebView/WebHTMLView.mm:
3133         * WebView/WebPreferences.mm:
3134         * WebView/WebView.mm:
3135
3136 2017-09-29  Alexey Proskuryakov  <ap@apple.com>
3137
3138         Follow-up to https://trac.webkit.org/r222239 to fix crashes.
3139         rdar://problem/34705779
3140
3141         Addressing review comments that I somehow landed without.
3142
3143         * WebView/WebHTMLView.mm: Undo adding #if guards around -_web_uniqueWebDataURL
3144
3145 2017-09-29  Chris Dumez  <cdumez@apple.com>
3146
3147         Split some logic out of VisitedLinkStore and make it reusable
3148         https://bugs.webkit.org/show_bug.cgi?id=177575
3149
3150         Reviewed by Alex Christensen.
3151
3152         * WebCoreSupport/WebVisitedLinkStore.h:
3153         * WebCoreSupport/WebVisitedLinkStore.mm:
3154         (WebVisitedLinkStore::addVisitedLink):
3155         (WebVisitedLinkStore::removeVisitedLink):
3156         (WebVisitedLinkStore::isLinkVisited):
3157         (WebVisitedLinkStore::addVisitedLinkHash):
3158
3159 2017-09-28  Jonathan Bedard  <jbedard@apple.com>
3160
3161         Build fix for High Sierra 32 bit Mac
3162         https://bugs.webkit.org/show_bug.cgi?id=177551
3163         <rdar://problem/34690283>
3164
3165         Reviewed by Alexey Proskuryakov.
3166
3167         Some assertions have been removed from the SDK. Replace these assertions with equivalent
3168         WTF assert code.  Since the files in this patch are using tabs, some style changes were
3169         also made.
3170
3171         * Carbon/CarbonWindowAdapter.mm:
3172         (+[CarbonWindowAdapter frameViewClassForStyleMask:]):
3173         (-[CarbonWindowAdapter initWithContentRect:styleMask:backing:defer:]):
3174         (-[CarbonWindowAdapter initWithCarbonWindowRef:takingOwnership:disableOrdering:carbon:]):
3175         (-[CarbonWindowAdapter setViewsNeedDisplay:]):
3176         (-[CarbonWindowAdapter initWithCarbonWindowRef:takingOwnership:]):
3177         (-[CarbonWindowAdapter dealloc]):
3178         (-[CarbonWindowAdapter windowRef]):
3179         (-[CarbonWindowAdapter _hasWindowRef]):
3180         (-[CarbonWindowAdapter _managesWindowRef]):
3181         (-[CarbonWindowAdapter _removeWindowRef]):
3182         (-[CarbonWindowAdapter _carbonWindowClass]):
3183         (-[CarbonWindowAdapter reconcileToCarbonWindowBounds]):
3184         (-[CarbonWindowAdapter sendSuperEvent:]):
3185         (-[CarbonWindowAdapter relinquishFocus]):
3186         (-[CarbonWindowAdapter _cancelKey:]):
3187         (-[CarbonWindowAdapter _commonAwake]):
3188         (-[CarbonWindowAdapter _destroyRealWindow:]):
3189         (-[CarbonWindowAdapter _oldPlaceWindow:]):
3190         (-[CarbonWindowAdapter _termWindowIfOwner]):
3191         (-[CarbonWindowAdapter _windowMovedToRect:]):
3192         (-[CarbonWindowAdapter constrainFrameRect:toScreen:]):
3193         (-[CarbonWindowAdapter selectKeyViewFollowingView:]):
3194         (-[CarbonWindowAdapter selectKeyViewPrecedingView:]):
3195         (-[CarbonWindowAdapter canBecomeKeyWindow]):
3196         (-[CarbonWindowAdapter canBecomeMainWindow]):
3197         (-[CarbonWindowAdapter encodeWithCoder:]):
3198         (-[CarbonWindowAdapter initWithCoder:]):
3199         (-[CarbonWindowAdapter setContentView:]):
3200         (-[CarbonWindowAdapter worksWhenModal]):
3201         (-[CarbonWindowAdapter _setModalWindowLevel]):
3202         (-[CarbonWindowAdapter _clearModalWindowLevel]):
3203         (-[CarbonWindowAdapter carbonHICommandIDFromActionSelector:]):
3204         (-[CarbonWindowAdapter sendCarbonProcessHICommandEvent:]):
3205         (-[CarbonWindowAdapter sendCarbonUpdateHICommandStatusEvent:withMenuRef:andMenuItemIndex:]):
3206         (-[CarbonWindowAdapter _handleRootBoundsChanged]):
3207         (-[CarbonWindowAdapter _handleContentBoundsChanged]):
3208         (-[CarbonWindowAdapter _handleCarbonEvent:callRef:]):
3209         (NSCarbonWindowHandleEvent):
3210         (-[CarbonWindowAdapter _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:]):
3211         (-[CarbonWindowAdapter _growBoxRect]):
3212         * Carbon/HIWebView.mm:
3213         (HIWebViewGetWebView):
3214         (HIWebViewConstructor):
3215         (HIWebViewDestructor):
3216         (HIWebViewRegisterClass):
3217         (GetBehaviors):
3218         (Draw):
3219         (HitTest):
3220         (GetRegion):
3221         (GetWindowRef):
3222         (CreateNSEventAdoptingCGEvent):
3223         (CopyEventCGEvent):
3224         (CreateNSEventWithCarbonClickEvent):
3225         (Click):
3226         (CreateNSEventWithCarbonEvent):
3227         (MouseUp):
3228         (CreateNSEventWithCarbonMouseMoveEvent):
3229         (MouseMoved):
3230         (MouseDragged):
3231         (MouseWheelMoved):
3232         (ContextMenuClick):
3233         (GetKind):
3234         (BoundsChanged):
3235         (OwningWindowChanged):
3236         (WindowHandler):
3237         (SyncFrame):
3238         (SetFocusPart):
3239         (AdvanceFocus):
3240         (RelinquishFocus):
3241         (ActiveStateChanged):
3242         (ProcessCommand):
3243         (UpdateCommandStatus):
3244         (_NSSelectorForHICommand):
3245         (HIWebViewEventHandler):
3246         (StartUpdateObserver):
3247         (StopUpdateObserver):
3248         (UpdateObserver):
3249
3250 2017-09-27  Wenson Hsieh  <wenson_hsieh@apple.com>
3251
3252         Drag event DataTransfer has unexpected types "dyn.ah62d4..."
3253         https://bugs.webkit.org/show_bug.cgi?id=172526
3254         <rdar://problem/32396081>
3255
3256         Reviewed by Ryosuke Niwa.
3257
3258         Adjust for changes in WebCore. See WebCore ChangeLog for more details.
3259
3260         * WebCoreSupport/WebPlatformStrategies.h:
3261         * WebCoreSupport/WebPlatformStrategies.mm:
3262         (WebPlatformStrategies::webExposedTypes):
3263         (WebPlatformStrategies::writeCustomData):
3264
3265 2017-09-27  Matt Lewis  <jlewis3@apple.com>
3266
3267         Unreviewed, rolling out r222567.
3268
3269         This broke and internal build.
3270
3271         Reverted changeset:
3272
3273         "Build fix for High Sierra 32 bit Mac"
3274         https://bugs.webkit.org/show_bug.cgi?id=177551
3275         http://trac.webkit.org/changeset/222567
3276
3277 2017-09-27  Jonathan Bedard  <jbedard@apple.com>
3278
3279         Build fix for High Sierra 32 bit Mac
3280         https://bugs.webkit.org/show_bug.cgi?id=177551
3281         <rdar://problem/34690283>
3282
3283         Reviewed by Alexey Proskuryakov.
3284
3285         Some assertions have been removed from the SDK. Replace these assertions with equivalent
3286         WTF assert code.  Since the files in this patch are using tabs, some style changes were
3287         also made.
3288
3289         * Carbon/CarbonWindowAdapter.mm:
3290         (+[CarbonWindowAdapter frameViewClassForStyleMask:]):
3291         (-[CarbonWindowAdapter initWithContentRect:styleMask:backing:defer:]):
3292         (-[CarbonWindowAdapter initWithCarbonWindowRef:takingOwnership:disableOrdering:carbon:]):
3293         (-[CarbonWindowAdapter setViewsNeedDisplay:]):
3294         (-[CarbonWindowAdapter initWithCarbonWindowRef:takingOwnership:]):
3295         (-[CarbonWindowAdapter dealloc]):
3296         (-[CarbonWindowAdapter windowRef]):
3297         (-[CarbonWindowAdapter _hasWindowRef]):
3298         (-[CarbonWindowAdapter _managesWindowRef]):
3299         (-[CarbonWindowAdapter _removeWindowRef]):
3300         (-[CarbonWindowAdapter _carbonWindowClass]):
3301         (-[CarbonWindowAdapter reconcileToCarbonWindowBounds]):
3302         (-[CarbonWindowAdapter sendSuperEvent:]):
3303         (-[CarbonWindowAdapter relinquishFocus]):
3304         (-[CarbonWindowAdapter _cancelKey:]):
3305         (-[CarbonWindowAdapter _commonAwake]):
3306         (-[CarbonWindowAdapter _destroyRealWindow:]):
3307         (-[CarbonWindowAdapter _oldPlaceWindow:]):
3308         (-[CarbonWindowAdapter _termWindowIfOwner]):
3309         (-[CarbonWindowAdapter _windowMovedToRect:]):
3310         (-[CarbonWindowAdapter constrainFrameRect:toScreen:]):
3311         (-[CarbonWindowAdapter selectKeyViewFollowingView:]):
3312         (-[CarbonWindowAdapter selectKeyViewPrecedingView:]):
3313         (-[CarbonWindowAdapter canBecomeKeyWindow]):
3314         (-[CarbonWindowAdapter canBecomeMainWindow]):
3315         (-[CarbonWindowAdapter encodeWithCoder:]):
3316         (-[CarbonWindowAdapter initWithCoder:]):
3317         (-[CarbonWindowAdapter setContentView:]):
3318         (-[CarbonWindowAdapter worksWhenModal]):
3319         (-[CarbonWindowAdapter _setModalWindowLevel]):
3320         (-[CarbonWindowAdapter _clearModalWindowLevel]):
3321         (-[CarbonWindowAdapter carbonHICommandIDFromActionSelector:]):
3322         (-[CarbonWindowAdapter sendCarbonProcessHICommandEvent:]):
3323         (-[CarbonWindowAdapter sendCarbonUpdateHICommandStatusEvent:withMenuRef:andMenuItemIndex:]):
3324         (-[CarbonWindowAdapter _handleRootBoundsChanged]):
3325         (-[CarbonWindowAdapter _handleContentBoundsChanged]):
3326         (-[CarbonWindowAdapter _handleCarbonEvent:callRef:]):
3327         (NSCarbonWindowHandleEvent):
3328         (-[CarbonWindowAdapter _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:]):
3329         (-[CarbonWindowAdapter _growBoxRect]):
3330         * Carbon/HIWebView.mm:
3331         (HIWebViewGetWebView):
3332         (HIWebViewConstructor):
3333         (HIWebViewDestructor):
3334         (HIWebViewRegisterClass):
3335         (GetBehaviors):
3336         (Draw):
3337         (HitTest):
3338         (GetRegion):
3339         (GetWindowRef):
3340         (CreateNSEventAdoptingCGEvent):
3341         (CopyEventCGEvent):
3342         (CreateNSEventWithCarbonClickEvent):
3343         (Click):
3344         (CreateNSEventWithCarbonEvent):
3345         (MouseUp):
3346         (CreateNSEventWithCarbonMouseMoveEvent):
3347         (MouseMoved):
3348         (MouseDragged):
3349         (MouseWheelMoved):
3350         (ContextMenuClick):
3351         (GetKind):
3352         (BoundsChanged):
3353         (OwningWindowChanged):
3354         (WindowHandler):
3355         (SyncFrame):
3356         (SetFocusPart):
3357         (AdvanceFocus):
3358         (RelinquishFocus):
3359         (ActiveStateChanged):
3360         (ProcessCommand):
3361         (UpdateCommandStatus):
3362         (_NSSelectorForHICommand):
3363         (HIWebViewEventHandler):
3364         (StartUpdateObserver):
3365         (StopUpdateObserver):
3366         (UpdateObserver):
3367
3368 2017-09-25  Alex Christensen  <achristensen@webkit.org>
3369
3370         Make PolicyAction an encodable enum class
3371         https://bugs.webkit.org/show_bug.cgi?id=177480
3372
3373         Reviewed by Antti Koivisto.
3374
3375         * Plugins/WebPluginContainerCheck.mm:
3376         (-[WebPluginContainerCheck _continueWithPolicy:]):
3377         (-[WebPluginContainerCheck _isForbiddenFileLoad]):
3378         * WebCoreSupport/WebFrameLoaderClient.mm:
3379         (-[WebFramePolicyListener invalidate]):
3380         (-[WebFramePolicyListener ignore]):
3381         (-[WebFramePolicyListener download]):
3382         (-[WebFramePolicyListener use]):
3383         (-[WebFramePolicyListener continue]):
3384         * WebView/WebPolicyDelegate.mm:
3385         (-[WebPolicyDecisionListener use]):
3386         (-[WebPolicyDecisionListener ignore]):
3387         (-[WebPolicyDecisionListener download]):
3388
3389 2017-09-25  Frederik Riedel  <riedel@apple.com>
3390
3391         Expose way to set values of classified form controls as {Legacy WebKit, WebKit} SPI
3392         https://bugs.webkit.org/show_bug.cgi?id=174394
3393         <rdar://problem/33183504>
3394
3395         Reviewed by Ryosuke Niwa.
3396
3397         * DOM/DOMHTMLInputElement.h:
3398         * DOM/DOMHTMLInputElement.mm:
3399         (-[DOMHTMLInputElement acceptsAutofilledLoginCredentials]):
3400         Determines if this HTMLInputElement is part of a login screen.
3401         (-[DOMHTMLInputElement representingPageUrl]):
3402         Returns the webpage's URL that is currently displayed in the Web View.
3403         (-[DOMHTMLInputElement insertTextSuggestion:]):
3404         Inserts login credentials into the Web View.
3405
3406 2017-09-25  Sam Weinig  <sam@webkit.org>
3407
3408         Remove unused EditorClient functions
3409         https://bugs.webkit.org/show_bug.cgi?id=177463
3410
3411         Reviewed by Alex Christensen.
3412
3413         Remove unused EditorClient functions.
3414
3415         * WebCoreSupport/WebEditorClient.h:
3416         * WebCoreSupport/WebEditorClient.mm:
3417         (WebEditorClient::canonicalizeURL): Deleted.
3418         (WebEditorClient::canonicalizeURLString): Deleted.
3419         (WebEditorClient::writeDataToPasteboard): Deleted.
3420         (WebEditorClient::supportedPasteboardTypesForCurrentSelection): Deleted.
3421         (WebEditorClient::readDataFromPasteboard): Deleted.
3422         (WebEditorClient::pasteboardChangeCount): Deleted.
3423
3424 2017-09-25  Alex Christensen  <achristensen@webkit.org>
3425
3426         Stop using PolicyCallback
3427         https://bugs.webkit.org/show_bug.cgi?id=176088
3428
3429         Reviewed by Andy Estes.
3430
3431         * WebCoreSupport/WebFrameLoaderClient.mm:
3432         (-[WebFramePolicyListener invalidate]):
3433         (-[WebFramePolicyListener receivedPolicyDecision:]):
3434
3435 2017-09-25  Sam Weinig  <sam@webkit.org>
3436
3437         Remove unnecessary userVisibleString EditorClient function
3438         https://bugs.webkit.org/show_bug.cgi?id=177456
3439
3440         Reviewed by Dan Bernstein.
3441
3442         * WebCoreSupport/WebEditorClient.h:
3443         * WebCoreSupport/WebEditorClient.mm:
3444         (WebEditorClient::userVisibleString): Deleted.
3445
3446             Remove userVisibleString client function.
3447
3448 2017-09-25  Alex Christensen  <achristensen@webkit.org>
3449
3450         Separate form submission from PolicyChecker infrastructure
3451         https://bugs.webkit.org/show_bug.cgi?id=177396
3452
3453         Reviewed by Geoffrey Garen.
3454
3455         * WebCoreSupport/WebFrameLoaderClient.h:
3456         * WebCoreSupport/WebFrameLoaderClient.mm:
3457         (WebFrameLoaderClient::dispatchWillSubmitForm):
3458
3459 2017-09-22  Zalan Bujtas  <zalan@apple.com>
3460
3461         WeakPtrFactory should populate m_ref lazily.
3462         https://bugs.webkit.org/show_bug.cgi?id=177375
3463
3464         Reviewed by Geoffrey Garen.
3465
3466         * WebCoreSupport/WebEditorClient.mm:
3467         (WebEditorClient::WebEditorClient):
3468         (WebEditorClient::requestCandidatesForSelection):
3469
3470 2017-09-22  Chris Dumez  <cdumez@apple.com>
3471
3472         Use high resolution timestamp for event time
3473         https://bugs.webkit.org/show_bug.cgi?id=154246
3474         <rdar://problem/34333304>
3475
3476         Reviewed by Ryosuke Niwa.
3477
3478         Use WallTime / MonotonicTime instead of double type for clarity.
3479
3480         * DOM/DOMEvent.mm:
3481         (-[DOMEvent timeStamp]):
3482         * WebView/WebFrame.mm:
3483         (-[WebFrame _dragSourceEndedAt:operation:]):
3484         * WebView/WebPDFView.mm:
3485         (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
3486
3487 2017-09-21  Ryosuke Niwa  <rniwa@webkit.org>
3488
3489         Enable dataTransfer.items on macOS and iOS
3490         https://bugs.webkit.org/show_bug.cgi?id=177335
3491
3492         Reviewed by Sam Weinig.
3493
3494         * WebView/WebPreferences.mm:
3495         (+[WebPreferences initialize]):
3496
3497 2017-09-20  Joseph Pecoraro  <pecoraro@apple.com>
3498
3499         Web Inspector: WebView indication highlights sticks around for WebKitLegacy views
3500         https://bugs.webkit.org/show_bug.cgi?id=177101
3501         <rdar://problem/34500648>
3502
3503         Reviewed by Brian Burg.
3504
3505         * WebInspector/WebNodeHighlight.mm:
3506         Ensure we close the window that we have just removed.
3507
3508 2017-09-20  Antti Koivisto  <antti@apple.com>
3509
3510         Remove DOM and styling support for CSS Regions
3511         https://bugs.webkit.org/show_bug.cgi?id=177221
3512
3513         Reviewed by Andreas Kling.
3514
3515         * Configurations/FeatureDefines.xcconfig:
3516         * DOM/DOMCSS.mm:
3517         (kitClass):
3518         * DOM/DOMElement.mm:
3519         (-[DOMElement webkitRegionOverset]): Deleted.
3520
3521 2017-09-19  Alexey Proskuryakov  <ap@apple.com>
3522
3523         Layering violation in Editor::createFragment
3524         https://bugs.webkit.org/show_bug.cgi?id=176123
3525
3526         Reviewed by Darin Adler.
3527
3528         * Misc/WebNSURLExtras.h:
3529         * Misc/WebNSURLExtras.mm:
3530         * WebView/WebFrame.mm:
3531         * WebView/WebHTMLView.mm:
3532         Removed multiple copies of webkit-fake-url creation code, switching to URL::fakeURLWithRelativePart().
3533
3534         * WebCoreSupport/WebEditorClient.mm:
3535         (_WebCreateFragment): Added a stub implementation for older OSes. This is needed
3536         because WebKitLegacy.exp is not passed through preprocessor, so there is no sane
3537         way to avoid exporting the symbol just on newer OSes.
3538
3539 2017-09-19  Ryosuke Niwa  <rniwa@webkit.org>
3540
3541         On iOS, getData can't get text set by setData during copy event
3542         https://bugs.webkit.org/show_bug.cgi?id=176980
3543         <rdar://problem/34453915>
3544
3545         Reviewed by Darin Adler.
3546
3547         * WebCoreSupport/WebPlatformStrategies.h:
3548         * WebCoreSupport/WebPlatformStrategies.mm:
3549         (WebPlatformStrategies::copy): Deleted.
3550
3551 2017-09-18  Andy Estes  <aestes@apple.com>
3552
3553         [Mac] Upstream miscellaneous WebKitSystemInterface functions
3554         https://bugs.webkit.org/show_bug.cgi?id=177029
3555
3556         Reviewed by Alex Christensen.
3557
3558         * DefaultDelegates/WebDefaultContextMenuDelegate.mm:
3559         (-[WebDefaultUIDelegate menuItemWithTag:target:representedObject:]):
3560         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3561         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
3562         * WebCoreSupport/PopupMenuMac.mm:
3563         (PopupMenuMac::show):
3564         * WebCoreSupport/WebSystemInterface.mm:
3565         (InitWebCoreSystemInterface):
3566         * WebView/WebHTMLView.mm:
3567         (-[WebHTMLView setDataSource:]):
3568         (-[WebHTMLView attachRootLayer:]):
3569         * WebView/WebView.mm:
3570         (-[WebView _needsAdobeFrameReloadingQuirk]):
3571         (-[WebView _needsLinkElementTextCSSQuirk]):
3572         (-[WebView _needsIsLoadingInAPISenseQuirk]):
3573         (-[WebView _needsFrameLoadDelegateRetainQuirk]):
3574         (-[WebView _preferencesChanged:]):
3575
3576 2017-09-15  Andy Estes  <aestes@apple.com>
3577
3578         [Cocoa] Upstream MediaRemote and VideoToolbox WebKitSystemInterface functions
3579         https://bugs.webkit.org/show_bug.cgi?id=176953
3580
3581         Reviewed by Eric Carlson.
3582
3583         * WebCoreSupport/WebSystemInterface.mm:
3584         (InitWebCoreSystemInterface):
3585
3586 2017-09-14  Andy Estes  <aestes@apple.com>
3587
3588         [Mac] Upstream SpeechSynthesis-related WebKitSystemInterface functions
3589         https://bugs.webkit.org/show_bug.cgi?id=176931
3590
3591         Reviewed by Joseph Pecoraro.
3592
3593         * WebCoreSupport/WebSystemInterface.mm:
3594         (InitWebCoreSystemInterface):
3595
3596 2017-09-14  Yusuke Suzuki  <utatane.tea@gmail.com>
3597
3598         [JSC] Add PrivateSymbolMode::{Include,Exclude} for PropertyNameArray
3599         https://bugs.webkit.org/show_bug.cgi?id=176867
3600
3601         Reviewed by Sam Weinig.
3602
3603         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3604         (WebKit::NetscapePluginInstanceProxy::enumerate):
3605
3606 2017-09-13  Andy Estes  <aestes@apple.com>
3607
3608         [CF] Upstream CFNetwork-related WebKitSystemInterface functions
3609         https://bugs.webkit.org/show_bug.cgi?id=176729
3610
3611         Reviewed by Alex Christensen.
3612
3613         * WebCoreSupport/WebSystemInterface.mm:
3614         (InitWebCoreSystemInterface):
3615         * WebView/WebView.mm:
3616         (+[WebView _setCacheModel:]):
3617
3618 2017-09-13  Ryosuke Niwa  <rniwa@webkit.org>
3619
3620         Refactor WebContentReader out of EditorMac and EditorIOS
3621         https://bugs.webkit.org/show_bug.cgi?id=176770
3622
3623         Reviewed by Sam Weinig.
3624
3625         * WebCoreSupport/WebEditorClient.mm:
3626
3627 2017-09-12  Ryosuke Niwa  <rniwa@webkit.org>
3628
3629         Dragging & dropping a file creates an attachment element even when it's disabled
3630         https://bugs.webkit.org/show_bug.cgi?id=176769
3631
3632         Reviewed by Tim Horton.
3633
3634         * WebView/WebView.mm:
3635         (-[WebView _preferencesChanged:]):
3636
3637 2017-09-11  Wenson Hsieh  <wenson_hsieh@apple.com>
3638
3639         [iOS DnD] Support DataTransfer.setDragImage when starting a drag on iOS
3640         https://bugs.webkit.org/show_bug.cgi?id=176721
3641         <rdar://problem/34373660>
3642
3643         Reviewed by Tim Horton.
3644
3645         Rename elementBounds => dragPreviewFrameInRootViewCoordinates. (Note: Unfortunately, _draggedElementBounds in
3646         WebViewPrivate.h can't be renamed yet, due to binary and SDK compatibility with UIKit).
3647
3648         * WebView/WebView.mm:
3649         (-[WebView _startDrag:]):
3650         (-[WebView _draggedElementBounds]):
3651         (-[WebView _endedDataInteraction:global:]):
3652         * WebView/WebViewData.h:
3653
3654 2017-09-11  Andy Estes  <aestes@apple.com>
3655
3656         [Mac] Upstream QTKit-related WebKitSystemInterface functions
3657         https://bugs.webkit.org/show_bug.cgi?id=176472
3658
3659         Reviewed by Eric Carlson.
3660
3661         * WebCoreSupport/WebSystemInterface.mm:
3662         (InitWebCoreSystemInterface):
3663
3664 2017-09-09  Mark Lam  <mark.lam@apple.com>
3665
3666         Avoid duplicate computations of ExecState::vm().
3667         https://bugs.webkit.org/show_bug.cgi?id=176647
3668
3669         Reviewed by Saam Barati.
3670
3671         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3672         (WebKit::NetscapePluginInstanceProxy::invokeDefault):
3673         (WebKit::NetscapePluginInstanceProxy::construct):
3674         (WebKit::NetscapePluginInstanceProxy::setProperty):
3675         (WebKit::NetscapePluginInstanceProxy::removeProperty):
3676         (WebKit::NetscapePluginInstanceProxy::enumerate):
3677         * Plugins/Hosted/ProxyInstance.mm:
3678         (WebKit::ProxyRuntimeMethod::create):
3679
3680 2017-09-08  Commit Queue  <commit-queue@webkit.org>
3681
3682         Unreviewed, rolling out r221773.
3683         https://bugs.webkit.org/show_bug.cgi?id=176614
3684
3685         This caused build failures. (Requested by mlewis13 on
3686         #webkit).
3687
3688         Reverted changeset:
3689
3690         "[Mac] Upstream QTKit-related WebKitSystemInterface functions"
3691         https://bugs.webkit.org/show_bug.cgi?id=176472
3692         http://trac.webkit.org/changeset/221773
3693
3694 2017-09-07  Andy Estes  <aestes@apple.com>
3695
3696         [Mac] Upstream QTKit-related WebKitSystemInterface functions
3697         https://bugs.webkit.org/show_bug.cgi?id=176472
3698
3699         Reviewed by Eric Carlson.
3700
3701         * WebCoreSupport/WebSystemInterface.mm:
3702         (InitWebCoreSystemInterface):
3703
3704 2017-09-07  Myles C. Maxfield  <mmaxfield@apple.com>
3705
3706         [PAL] Unify PlatformUserPreferredLanguages.h with Language.h
3707         https://bugs.webkit.org/show_bug.cgi?id=176561
3708
3709         Reviewed by Brent Fulgham.
3710
3711         * Misc/WebNSUserDefaultsExtras.mm:
3712
3713 2017-09-07  Alex Christensen  <achristensen@webkit.org>
3714
3715         Modernize Geolocation code
3716         https://bugs.webkit.org/show_bug.cgi?id=176496
3717
3718         Reviewed by Andy Estes.
3719
3720         * WebCoreSupport/WebGeolocationClient.h:
3721         * WebCoreSupport/WebGeolocationClient.mm:
3722         (WebGeolocationClient::requestPermission):
3723         (-[WebGeolocationPolicyListener initWithGeolocation:]):
3724         (-[WebGeolocationPolicyListener initWithGeolocation:forWebView:]):
3725         (-[WebGeolocationProviderInitializationListener initWithGeolocation:]):
3726         * WebView/WebView.mm:
3727         (-[WebView _commonInitializationWithFrameName:groupName:]):
3728         (-[WebView _geolocationDidFailWithMessage:]):
3729
3730 2017-09-05  Tim Horton  <timothy_horton@apple.com>
3731
3732         Remove some unused bits of code and resources
3733         https://bugs.webkit.org/show_bug.cgi?id=176275
3734
3735         Reviewed by Dan Bernstein.
3736
3737         * Misc/WebNSFileManagerExtras.mm:
3738         Include FileSystem instead of FileSystemIOS.
3739
3740 2017-09-03  Darin Adler  <darin@apple.com>
3741
3742         [Cocoa] Tidy a few things in legacy WebHTMLView
3743         https://bugs.webkit.org/show_bug.cgi?id=176280
3744
3745         Reviewed by Dan Bernstein.
3746
3747         * WebCoreSupport/WebChromeClient.mm:
3748         (WebChromeClient::attachRootGraphicsLayer): Made this function Mac-only, because the
3749         methods it calls on WebHTMLView were doing nothing on iOS.
3750
3751         * WebView/WebFrame.mm:
3752         (-[WebFrame _paintBehaviorForDestinationContext:]): Changed iOS code so that it no longer
3753         depends on -[WebHTMLView _web_isDrawingIntoLayer], which always returned YES on iOS.
3754
3755         * WebView/WebHTMLView.mm: Define WebEvent on both iOS and Mac so more event handling
3756         code can be shared without #if below. Use #if PLATFORM(MAC) instead of #if !PLATFORM(IOS)
3757         in a lot more places. Move many of the SPI declarations up to the top in alphabetical
3758         order. Removed all sorts of unused things. Made more code and fields Mac-only where
3759         what was compiled was doing nothing on iOS and it makes the resulting code simpler.
3760         Use RetainPtr instead of writing retain/release wherever possible.
3761         (+[WebMenuTarget sharedMenuTarget]): Moved global inside this method and used C++
3762         initialization for it. Removed various unused methods and declarations of methods.
3763         (promisedDataClient): Use NeverDestroyed instead of just doing a "new" on the heap.
3764         (-[WebHTMLView _imageExistsAtPaths:]): Deleted.
3765         (-[WebHTMLView _documentFragmentWithPaths:]): Use RetainPtr and modern for loop.
3766         (+[WebHTMLView _excludedElementsForAttributedStringConversion]): Use C++ initialization,
3767         and remove CFRetain no longer needed since we don't support garbage collection any more.
3768         (uniqueURLWithRelativePart): Simplified using [NSUUID UUID].
3769         (-[WebHTMLView _plainTextFromPasteboard:]): Simplified with RetainPtr.
3770         (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]): Ditto.
3771         (-[WebHTMLView _pasteAsPlainTextWithPasteboard:]): Ditto.
3772         (-[WebHTMLView _removeWindowObservers]): Removed code dealing with empty
3773         methods windowWillOrderOnScreen: and windowWillOrderOffScreen:.
3774         (-[WebHTMLView _shouldDeleteRange:]): Deleted. Was unused.
3775         (-[WebHTMLView _writeSelectionWithPasteboardTypes:toPasteboard:cachedAttributedString:]):
3776         Simplified with stringByReplacingOccurrencesOfString and modern string literal syntax.
3777         (-[WebHTMLView _setMouseDownEvent:]): Ditto.
3778         (-[WebHTMLView _web_setPrintingModeRecursive:adjustViewSize:]): Added. Helper method so
3779         the next three methhods can be super-simple. Used RetainPtr and a modern for loop to make
3780         this method simpler than the functions it replaced. Also got rid of the enumeratingSubviews
3781         debug flag; we haven't used it for years and it's not clearly helpful.
3782         (-[WebHTMLView _web_setPrintingModeRecursive]): Turned into a one-liner with the above.
3783         (-[WebHTMLView _web_clearPrintingModeRecursive]): Ditto.
3784         (-[WebHTMLView _web_setPrintingModeRecursiveAndAdjustViewSize]): Ditto.
3785         (-[WebHTMLView _web_makePluginSubviewsPerformSelector:withObject:]): Moved from the
3786         WebInternal category to the WebHTMLViewFileInternal category so it can be called by
3787         two additional methods in the WebPrivate category and still be called by the two
3788         methods in the WebInternal category that were already using it.
3789         (-[WebHTMLView didAddSubview:]): Deleted.
3790         (-[WebHTMLView _insideAnotherHTMLView]): Deleted.
3791         (-[WebHTMLView _clearLastHitViewIfSelf]): Deleted. Inlined the implementation in the one
3792         place this was called, the close method.
3793         (-[WebHTMLView _setToolTip:]): Simplified with RetainPtr.
3794         (-[WebHTMLView pasteboard:provideDataForType:]): Ditto.
3795         (-[WebHTMLView _autoscroll]): Simplified by making this Mac-only.
3796         (-[WebHTMLView _hasHTMLDocument]): Deleted. The one caller was removed a long time ago.
3797         (-[WebHTMLView _web_documentFragmentFromPasteboard:pasteboardType:imageMIMEType:]):
3798         Added helper method to make the one below simpler.
3799         (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
3800         Compared pasteboard type strings using isEqualToString: rather than using == since
3801         we want to actually compare the string contents. Also updated to use modern for loop,
3802         renamed a local variable from "s" to "localSubresources", and factored out the handling
3803         of three image types to use the helper method above.
3804         (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]): Rewrite using the
3805         _web_makePluginSubviewsPerformSelector:withObject: method.
3806         (-[WebHTMLView _resumeNullEventsForAllNetscapePlugins]): Ditto.
3807         (-[NSView _web_addDescendentWebHTMLViewsToArray:]): Fixed spelling to use the adjective
3808         "descendent" rather than the noun "descendant". Also removed Mac-only optimization to
3809         not call the -[NSView subviews] method to make this identical on both platforms and used
3810         a modern for loop.
3811         (-[NSMutableDictionary _web_setObjectIfNotNil:forKey:]): Deleted.
3812         (-[WebHTMLView acceptsFirstResponder]): Reduced amount of platform-specific code by
3813         defining WebEventMouseDown as a synonym for NSEventTypeLeftMouseDown on Mac.
3814         (-[WebHTMLView addWindowObservers]): Removed code dealing with empty
3815         methods windowWillOrderOnScreen: and windowWillOrderOffScreen:.
3816         (-[WebHTMLView willRemoveSubview:]): Removed the enumeratingSubviews check.
3817         (-[WebHTMLView drawSingleRect:]): Rearranged this method to make it clearer that most
3818         of it is Mac-only.
3819         (-[WebHTMLView windowWillOrderOnScreen:]): Deleted. All the current version of this
3820         method did was call itself on the main thread, and do nothing if called on main thread.
3821         (-[WebHTMLView windowWillOrderOffScreen:]): Deleted. Ditto.
3822         (-[WebHTMLView _isSelectionEvent:]): Merged macOS and iOS versions.
3823         (-[WebHTMLView resignFirstResponder]): Removed iOS-specific code in the macOS-specific
3824         half of this method.
3825         (-[WebHTMLView setDataSource:]): Simplified using RetainPtr.
3826         (-[WebHTMLView _setPrinting:minimumPageLogicalWidth:logicalHeight:originalPageWidth:originalPageHeight:maximumShrinkRatio:adjustViewSize:paginateScreenContent:]):
3827         Simplified using a modern for loop and RetainPtr.
3828         (-[WebHTMLView knowsPageRange:]): Simplified using RetainPtr.
3829         (-[WebHTMLView keyDown:]): Ditto.
3830         (-[WebHTMLView _selectionStartFontAttributesAsRTF]): Ditto.
3831         (-[WebHTMLView performKeyEquivalent:]): Ditto.
3832         (-[WebHTMLView _styleForAttributeChange:]): Ditto.
3833         (-[WebHTMLView complete:]): Ditto.
3834         (-[WebHTMLView _windowChangedKeyState]): Removed iOS-specific code since this method is
3835         now macOS-only.
3836         (-[WebHTMLView _selectionChanged]): Removed call to _updateSelectionForInputManager on
3837         iOS since that is now macOS-only.
3838         (-[WebHTMLView promisedDragTIFFDataSource]): Deleted.
3839         (-[WebHTMLView _startAutoscrollTimer:]): Moved this into an internal category instead of
3840         a private one because it is not used or needed outside WebKit. Also made it macOS-only
3841         and reorganized to use early return.
3842         (-[WebHTMLView _stopAutoscrollTimer]): Moved into internal category. It remains a no-op
3843         on iOS, but kept there so we don't have to do #if at every call site.
3844         (-[WebHTMLView _pluginController]): Moved into internal category.
3845         (-[WebHTMLView validAttributesForMarkedText]): Simplified by removing CFRetain that was
3846         there only for GC, using C++ initialization, removing obsolete comment.
3847         (-[WebHTMLView _updateSelectionForInputManager]): Made this macOS-only and removed
3848         peculiar iOS-only comment.
3849         (+[NSURL _web_uniqueWebDataURL]): Simplified using [NSUUID UUID].
3850
3851         * WebView/WebHTMLViewInternal.h: Removed unused promisedDragTIFFDataSource method.
3852         Made attachRootLayer:, detachRootLayer, _web_isDrawingIntoLayer,
3853         _web_isDrawingIntoAcceleratedLayer all macOS-only. Moved _startAutoscrollTimer:,
3854         _stopAutoscrollTimer, and _pluginController here from SPI header since they aren't
3855         needed or used as SPI. And made _startAutoscrollTimer macOS-only.
3856
3857         * WebView/WebHTMLViewPrivate.h: Removed unneeded and unused SPI: _insideAnotherHTMLView,
3858         _clearLastHitViewIfSelf, _pluginController, _startAutoscrollTimer:, and _stopAutoscrollTimer.
3859         Made _transparentBackground and _setTransparentBackground: macOS-only. These probably
3860         are not needed on macOS either, but I wasn't able to make absolutely sure I could remove
3861         them at this time.
3862
3863 2017-09-03  Sam Weinig  <sam@webkit.org>
3864
3865         Remove CanvasProxy
3866         https://bugs.webkit.org/show_bug.cgi?id=176288
3867
3868         Reviewed by Yusuke Suzuki.
3869
3870         CanvasProxy does not appear to be in any current HTML spec
3871         and was disabled and unimplemented in our tree. Time to 
3872         get rid of it.
3873
3874         * Configurations/FeatureDefines.xcconfig:
3875
3876 2017-09-02  Andy Estes  <aestes@apple.com>
3877
3878         [CA] Upstream QuartzCore-related WebKitSystemInterface functions
3879         https://bugs.webkit.org/show_bug.cgi?id=176270
3880
3881         Reviewed by Tim Horton.
3882
3883         * Plugins/Hosted/NetscapePluginHostManager.mm:
3884         (WebKit::NetscapePluginHostManager::spawnPluginHost):
3885         * Plugins/Hosted/WebHostedNetscapePluginView.h:
3886         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
3887         (WebKit::SoftwareCARenderer::SoftwareCARenderer):
3888         (WebKit::SoftwareCARenderer::~SoftwareCARenderer):
3889         (WebKit::SoftwareCARenderer::context const):
3890         (WebKit::SoftwareCARenderer::renderContext const):
3891         (WebKit::SoftwareCARenderer::render):
3892         (-[WebHostedNetscapePluginView createPlugin]):
3893         (-[WebHostedNetscapePluginView createPluginLayer]):
3894         (-[WebHostedNetscapePluginView destroyPlugin]):
3895         (-[WebHostedNetscapePluginView drawRect:]):
3896         * WebCoreSupport/WebSystemInterface.mm:
3897         (InitWebCoreSystemInterface):
3898
3899 2017-09-01  Andy Estes  <aestes@apple.com>
3900
3901         [CG] Upstream CoreGraphics-related WebKitSystemInterface functions
3902         https://bugs.webkit.org/show_bug.cgi?id=176200
3903
3904         Reviewed by Tim Horton.
3905
3906         * Carbon/HIWebView.mm:
3907         (-[NSWindowGraphicsContext _web_setGraphicsPort:]):
3908         (overrideCGContext):
3909         (restoreCGContext):
3910         (Draw):
3911         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
3912         (+[WebHostedNetscapePluginView initialize]):
3913         * Plugins/WebBaseNetscapePluginView.h:
3914         * Plugins/WebBaseNetscapePluginView.mm:
3915         (WebKit::sendUserChangeNotifications):
3916         * Plugins/WebNetscapePluginView.mm:
3917         (+[WebNetscapePluginView initialize]):
3918         (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
3919         * WebCoreSupport/WebSystemInterface.mm:
3920         (InitWebCoreSystemInterface):
3921         * WebView/WebFrame.mm:
3922         (-[WebFrame _paintBehaviorForDestinationContext:]):
3923         * WebView/WebFullScreenController.mm:
3924         (setClipRectForWindow):
3925         (-[WebFullScreenController finishedEnterFullScreenAnimation:]):
3926         (-[WebFullScreenController finishedExitFullScreenAnimation:]):
3927         (-[WebFullScreenController _startEnterFullScreenAnimationWithDuration:]):
3928         (-[WebFullScreenController _startExitFullScreenAnimationWithDuration:]):
3929
3930 2017-08-31  Andy Estes  <aestes@apple.com>
3931
3932         [Mac] Upstream AppKit-related WebKitSystemInterface functions
3933         https://bugs.webkit.org/show_bug.cgi?id=176175
3934
3935         Reviewed by Brady Eidson.
3936
3937         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3938         (WebKit::NetscapePluginInstanceProxy::keyEvent):
3939         * Plugins/Hosted/WebTextInputWindowController.m:
3940         (-[WebTextInputPanel init]):
3941         * WebCoreSupport/WebSystemInterface.mm:
3942         (InitWebCoreSystemInterface):
3943         * WebView/WebDynamicScrollBarsView.mm:
3944         (-[WebDynamicScrollBarsView scrollWheel:]):
3945         * WebView/WebHTMLView.mm:
3946         (-[WebHTMLView _removeWindowObservers]):
3947         (-[WebHTMLView addWindowObservers]):
3948         * WebView/WebView.mm:
3949         (-[WebView addWindowObserversForWindow:]):
3950         (-[WebView removeWindowObservers]):
3951         (-[WebView viewWillMoveToWindow:]):
3952
3953 2017-08-31  Alex Christensen  <achristensen@webkit.org>
3954
3955         Add ObjC SPI corresponding to WKPageLoaderClient's webGLLoadPolicy and resolveWebGLLoadPolicy
3956         https://bugs.webkit.org/show_bug.cgi?id=175779
3957         <rdar://problem/22367975>
3958
3959         Reviewed by Tim Horton.
3960
3961         * WebCoreSupport/WebFrameLoaderClient.h:
3962         * WebCoreSupport/WebFrameLoaderClient.mm:
3963         (WebFrameLoaderClient::webGLPolicyForURL const):
3964         (WebFrameLoaderClient::resolveWebGLPolicyForURL const):
3965
3966 2017-08-30  Andy Estes  <aestes@apple.com>
3967
3968         [Mac] Upstream Accessibility-related WebKitSystemInterface functions
3969         https://bugs.webkit.org/show_bug.cgi?id=176093
3970
3971         Reviewed by Eric Carlson.
3972
3973         * WebCoreSupport/WebSystemInterface.mm:
3974         (InitWebCoreSystemInterface):
3975
3976 2017-08-30  Andy Estes  <aestes@apple.com>
3977
3978         [Mac] Upstream Carbon-related WebKitSystemInterface functions
3979         https://bugs.webkit.org/show_bug.cgi?id=176087
3980
3981         Reviewed by Alex Christensen.
3982
3983         * Carbon/CarbonUtils.m:
3984         (getNSAutoreleasePoolCount):
3985         (WebInitForCarbon):
3986         (PoolCleaner):
3987         * Carbon/CarbonWindowAdapter.mm:
3988         (+[CarbonWindowAdapter frameViewClassForStyleMask:]):
3989         (-[CarbonWindowAdapter initWithCarbonWindowRef:takingOwnership:disableOrdering:carbon:]):
3990         (-[CarbonWindowAdapter _oldPlaceWindow:]):
3991         (-[CarbonWindowAdapter _windowMovedToRect:]):
3992         * Carbon/HIViewAdapter.m:
3993         * Carbon/HIWebView.mm:
3994         (Draw):
3995         (CreateNSEventAdoptingCGEvent):
3996         (CopyEventCGEvent):
3997         (CreateNSEventWithCarbonClickEvent):
3998         (Click):
3999         (CreateNSEventWithCarbonEvent):
4000         (MouseUp):
4001         (CreateNSEventWithCarbonMouseMoveEvent):
4002         (MouseMoved):
4003         (MouseDragged):
4004         (MouseWheelMoved):
4005         (WindowHandler):
4006         (HIWebViewEventHandler):
4007         * Misc/QuickDrawCompatibility.h: Removed.
4008         * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
4009         (getCarbonEvent):
4010         (WebNetscapePluginEventHandlerCarbon::keyDown):
4011         (WebNetscapePluginEventHandlerCarbon::keyUp):
4012         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
4013         (WebNetscapePluginEventHandlerCocoa::keyDown):
4014         * Plugins/WebNetscapePluginView.mm:
4015         (-[WebNetscapePluginView tellQuickTimeToChill]):
4016
4017 2017-08-29  Andy Estes  <aestes@apple.com>
4018
4019         [Mac] Upstream WKSetMetadataURL() from WebKitSystemInterface
4020         https://bugs.webkit.org/show_bug.cgi?id=176046
4021
4022         Reviewed by Alex Christensen.
4023
4024         Removed the pthread logic from -_webkit_setMetadataURL:referrer:atPath: and replaced with
4025         WebCore::setMetadataURL(), which uses dispatch_async() for the same purpose as the pthread.
4026
4027         * Misc/WebNSFileManagerExtras.mm:
4028         (-[NSFileManager _webkit_setMetadataURL:referrer:atPath:]):
4029         (setMetaData): Deleted.
4030         * WebCoreSupport/WebSystemInterface.mm:
4031         (InitWebCoreSystemInterface):
4032
4033 2017-08-28  Andy Estes  <aestes@apple.com>
4034
4035         [Cocoa] Upstream WKGetWebDefaultCFStringEncoding()
4036         https://bugs.webkit.org/show_bug.cgi?id=176039
4037
4038         Reviewed by Alex Christensen.
4039
4040         * WebCoreSupport/WebSystemInterface.mm:
4041         (InitWebCoreSystemInterface):
4042         * WebView/WebPreferences.mm:
4043         (+[WebPreferences _systemCFStringEncoding]):
4044
4045 2017-08-28  Andy Estes  <aestes@apple.com>
4046
4047         [Cocoa] Upstream CFNetwork-related WebKitSystemInterface functions
4048         https://bugs.webkit.org/show_bug.cgi?id=176032
4049
4050         Reviewed by Alex Christensen.
4051
4052         * WebCoreSupport/WebSystemInterface.mm:
4053         (InitWebCoreSystemInterface):
4054         * WebView/WebView.mm:
4055         (-[WebView _cachedResponseForURL:]):
4056
4057 2017-08-28  Brent Fulgham  <bfulgham@apple.com>
4058
4059         Disable access to secure cookies if an HTTPS site loads mixed content (Part 2: Header Requests)
4060         https://bugs.webkit.org/show_bug.cgi?id=175992
4061         <rdar://problem/34086613>
4062
4063         Reviewed by Daniel Bates.
4064
4065         * WebCoreSupport/WebPlatformStrategies.h:
4066         * WebCoreSupport/WebPlatformStrategies.mm:
4067         (WebPlatformStrategies::cookieRequestHeaderFieldValue): Modify to accept a flag indicating if secure
4068         cookies should be included, and return a pair containing the resulting cookie string and a boolean
4069         indicating if secure cookies were accessed.
4070
4071 2017-08-27  Wenson Hsieh  <wenson_hsieh@apple.com>
4072
4073         Picking an emoji via the emoji dialog (Ctrl+Cmd+Space) fires inconsistent beforeinput events.
4074         https://bugs.webkit.org/show_bug.cgi?id=170955
4075         <rdar://problem/31697653>
4076
4077         Reviewed by Ryosuke Niwa.
4078
4079         Tweak -insertText: to pass TextEventInputAutocompletion to Editor::insertText when inserting text, if existing
4080         text is being replaced.
4081
4082         * WebView/WebHTMLView.mm:
4083         (-[WebHTMLView insertText:]):
4084
4085 2017-08-24  Chris Dumez  <cdumez@apple.com>
4086
4087         [Directory Upload] Add basic support for input.webkitdirectory
4088         https://bugs.webkit.org/show_bug.cgi?id=175950
4089         <rdar://problem/33951915>
4090