da9635b11bfd1b3071961c753fec7aaf66644841
[WebKit-https.git] / Source / WebKit / mac / ChangeLog
1 2017-02-15  Brady Eidson  <beidson@apple.com>
2
3         Stop backing up localStorage databases to iCloud by default.
4         <rdar://problem/29045531> and https://bugs.webkit.org/show_bug.cgi?id=168388
5
6         Reviewed by Geoffrey Garen.
7
8         * Misc/WebKitVersionChecks.h:
9         * Misc/WebKitVersionChecks.mm: Renamed from Source/WebKit/mac/Misc/WebKitVersionChecks.m.
10         (WebKitLinkedOnOrAfter):
11         (setWebKitLinkTimeVersion):
12         (WebKitLinkTimeVersion):
13         (linkedOnOrAfter):
14
15         * Storage/WebStorageManager.mm:
16         (WebKitInitializeStorageIfNecessary):
17
18 2017-02-16  Daniel Bates  <dabates@apple.com>
19
20         Remove Chromium-specific code to call FrameLoaderClient::redirectDataToPlugin(nullptr)
21         https://bugs.webkit.org/show_bug.cgi?id=168417
22         <rdar://problem/30541748>
23
24         Reviewed by Brent Fulgham.
25
26         Update override of FrameLoaderClient::redirectDataToPlugin() to take a Widget& instead of a
27         Widget* as it is always called with a valid Widget.
28
29         * WebCoreSupport/WebFrameLoaderClient.h:
30         * WebCoreSupport/WebFrameLoaderClient.mm:
31         (WebFrameLoaderClient::redirectDataToPlugin):
32         * WebKit.order: Remove symbol for WebFrameLoaderClient::redirectDataToPlugin() that took a Widget*
33         as it no longer exists. I am unclear if this file is still meaningful as it was last modified in
34         r180570 (2 years ago) though Xcode still references this ordering file (why?).
35
36 2017-02-16  Yusuke Suzuki  <utatane.tea@gmail.com>
37
38         [JSC] Drop PassRefPtr in inspector/
39         https://bugs.webkit.org/show_bug.cgi?id=168420
40
41         Reviewed by Alex Christensen.
42
43         * WebView/WebScriptDebugger.mm:
44         (WebScriptDebugger::handlePause):
45
46 2017-02-16  Simon Fraser  <simon.fraser@apple.com>
47
48         Clean up use of some CALayer-related SPI
49         https://bugs.webkit.org/show_bug.cgi?id=168401
50
51         Reviewed by Tim Horton.
52
53         Include CALayer.h not CATiledLayer.h.
54
55         * WebInspector/WebNodeHighlight.h:
56
57 2017-02-15  Wenson Hsieh  <wenson_hsieh@apple.com>
58
59         Fix the build after r212379
60
61         Rubber-stamped by Anders Carlsson.
62
63         * WebCoreSupport/WebDragClient.mm:
64         (WebDragClient::startDrag):
65
66 2017-02-15  Anders Carlsson  <andersca@apple.com>
67
68         Modernize DragClient::startDrag somewhat
69         https://bugs.webkit.org/show_bug.cgi?id=168379
70
71         Reviewed by Tim Horton.
72
73         Update for WebCore changes.
74
75         * WebCoreSupport/WebDragClient.h:
76         * WebCoreSupport/WebDragClient.mm:
77         (WebDragClient::startDrag):
78
79 2017-02-14  Dean Jackson  <dino@apple.com>
80
81         Rename preferLowPowerWebGLRendering setting to forceWebGLUsesLowPower
82         https://bugs.webkit.org/show_bug.cgi?id=168339
83
84         Reviewed by Simon Fraser.
85
86         Use a better name.
87
88         * WebView/WebPreferenceKeysPrivate.h:
89         * WebView/WebPreferences.mm:
90         (+[WebPreferences initialize]):
91         (-[WebPreferences forceLowPowerGPUForWebGL]):
92         (-[WebPreferences setForceLowPowerGPUForWebGL:]):
93         (-[WebPreferences preferLowPowerWebGLRendering]): Deleted.
94         (-[WebPreferences setPreferLowPowerWebGLRendering:]): Deleted.
95         * WebView/WebPreferencesPrivate.h:
96         * WebView/WebView.mm:
97         (-[WebView _preferencesChanged:]):
98
99 2017-02-14  Chris Dumez  <cdumez@apple.com>
100
101         HTML Form Validation bubble should take minimum font size setting into consideration
102         https://bugs.webkit.org/show_bug.cgi?id=168271
103         <rdar://problem/29869869>
104
105         Reviewed by Simon Fraser.
106
107         * WebView/WebView.mm:
108         (-[WebView _contentsOfUserInterfaceItem:]):
109         Return font size used in the validation bubble.
110
111         (-[WebView showFormValidationMessage:withAnchorRect:]):
112         Pass minimum font size setting when constructing the validation bubble.
113
114 2017-02-14  Anders Carlsson  <andersca@apple.com>
115
116         Remove an unused delegate method
117         https://bugs.webkit.org/show_bug.cgi?id=168328
118
119         Reviewed by Wenson Hsieh.
120
121         * DefaultDelegates/WebDefaultUIDelegate.m:
122         (-[WebDefaultUIDelegate webView:shouldBeginDragForElement:dragImage:mouseDownEvent:mouseDraggedEvent:]): Deleted.
123
124 2017-02-14  Alexey Proskuryakov  <ap@apple.com>
125
126         WebCore shouldn't export SystemMemory.h
127         https://bugs.webkit.org/show_bug.cgi?id=168285
128
129         Reviewed by Alex Christensen.
130
131         * MigrateHeaders.make: And WebKit shouldn't re-export it.
132
133 2017-02-13  Alexey Proskuryakov  <ap@apple.com>
134
135         WebKit shouldn't re-export ScrollTypes.h and WebCoreFrameView.h
136         https://bugs.webkit.org/show_bug.cgi?id=168282
137
138         Reviewed by Dan Bernstein.
139
140         * MigrateHeaders.make:
141
142 2017-02-12  Dan Bernstein  <mitz@apple.com>
143
144         Tried to fix USE(APPLE_INTERNAL_SDK) builds after r212211.
145
146         * WebView/WebHTMLView.mm:
147         (createShareMenuItem): Use non-deprecated method.
148
149 2017-02-12  Dan Bernstein  <mitz@apple.com>
150
151         [Cocoa] Some -respondsToSelector: checks are unnecessary
152         https://bugs.webkit.org/show_bug.cgi?id=168183
153
154         Reviewed by Tim Horton.
155
156         * WebView/WebFullScreenController.mm:
157         (-[WebFullScreenController applicationDidResignActive:]): Removed check whether NSWindow
158           responds to -isOnActiveSpace.
159         (-[WebFullScreenController exitFullScreen]): Ditto.
160         (-[WebFullScreenController _updateMenuAndDockForFullScreen]): Removed check whether
161           NSApplication responds to -setPresentationOptions.
162
163         * WebView/WebHTMLView.mm:
164         (createShareMenuItem): Removed unnecessary -respondsToSelector: check.
165         (-[WebHTMLView otherMouseDown:]): Ditto.
166
167         * WebView/WebImmediateActionController.mm:
168         (-[WebImmediateActionController _clearImmediateActionState]): Ditto.
169         (-[WebImmediateActionController _animationControllerForDataDetectedText]): Ditto.
170
171         * WebView/WebView.mm:
172         (-[WebView _didStartProvisionalLoadForFrame:]): Removed redundant nil check.
173         (+[WebView _setCacheModel:]): Removed unnecessary -respondsToSelector: check.
174
175 2017-02-10  Daniel Bates  <dabates@apple.com>
176
177         Detach frame from document when entering page cache
178         https://bugs.webkit.org/show_bug.cgi?id=166774
179         <rdar://problem/29904368>
180
181         Reviewed by Chris Dumez.
182
183         * WebView/WebPreferenceKeysPrivate.h:
184         * WebView/WebPreferences.mm:
185         (+[WebPreferences initialize]):
186         (-[WebPreferences allowsPageCacheWithWindowOpener]): Deleted.
187         (-[WebPreferences setAllowsPageCacheWithWindowOpener:]): Deleted.
188         * WebView/WebPreferencesPrivate.h:
189         * WebView/WebView.mm:
190         (-[WebView _preferencesChanged:]):
191
192 2017-02-10  Joseph Pecoraro  <pecoraro@apple.com>
193
194         [Resource Timing] Enable Resource Timing by default in Tests
195         https://bugs.webkit.org/show_bug.cgi?id=168145
196
197         Reviewed by Ryosuke Niwa.
198
199         * WebView/WebPreferenceKeysPrivate.h:
200         * WebView/WebPreferences.mm:
201         (+[WebPreferences initialize]):
202         (-[WebPreferences resourceTimingEnabled]):
203         (-[WebPreferences setResourceTimingEnabled:]):
204         * WebView/WebPreferencesPrivate.h:
205         * WebView/WebView.mm:
206         (-[WebView _preferencesChanged:]):
207
208 2017-02-10  Aakash Jain  <aakash_jain@apple.com>
209
210         cleanup WebLocalizableStrings.
211         https://bugs.webkit.org/show_bug.cgi?id=168078
212
213         Reviewed by Alexey Proskuryakov.
214
215         * Misc/WebLocalizableStrings.h: Make visibility hidden for WebLocalizableStringsBundle 
216         as it's for each framework's own consumption, and never needs to be exported.
217
218 2017-02-10  Aakash Jain  <aakash_jain@apple.com>
219
220         WebResourceLoadDelegatePrivate.h cannot be imported standalone
221         https://bugs.webkit.org/show_bug.cgi?id=168096
222
223         Reviewed by Alexey Proskuryakov.
224
225         * WebView/WebResourceLoadDelegatePrivate.h: Change WebNSInteger to NSInteger. 
226
227 2017-02-09  Antti Koivisto  <antti@apple.com>
228
229         Remove most cases of #if ENABLE(CACHE_PARTITIONING)
230         https://bugs.webkit.org/show_bug.cgi?id=167990
231
232         Reviewed by Sam Weinig.
233
234         * Misc/WebCache.mm:
235         (+[WebCache addImageToCache:forURL:forFrame:]):
236         (+[WebCache removeImageFromCacheForURL:forFrame:]):
237         * WebCoreSupport/WebSystemInterface.mm:
238         (InitWebCoreSystemInterface):
239
240 2017-02-07  Alexey Proskuryakov  <ap@apple.com>
241
242         Don't migrate WebKit DOM headers in MigrateHeaders.make
243         https://bugs.webkit.org/show_bug.cgi?id=167608
244
245         Reviewed by Darin Adler.
246
247         Stop migrating DOM headers that are now in WebKit.
248
249         * DOM/DOMDOMImplementation.h: Removed.
250         * DOM/DOMDOMImplementation.mm: Removed.
251         * DOM/DOMDOMImplementationInternal.h: Removed.
252         * DOM/DOMDOMTokenList.h: Removed.
253         * DOM/DOMDOMTokenList.mm: Removed.
254         * DOM/DOMDOMTokenListInternal.h: Removed.
255         * DOM/DOMImplementation.h: Copied from Source/WebKit/mac/DOM/DOMDOMImplementation.h.
256         * DOM/DOMImplementation.mm: Copied from Source/WebKit/mac/DOM/DOMDOMImplementation.mm.
257         * DOM/DOMImplementationInternal.h: Copied from Source/WebKit/mac/DOM/DOMDOMImplementationInternal.h.
258         * DOM/DOMTokenList.h: Copied from Source/WebKit/mac/DOM/DOMDOMTokenList.h.
259         * DOM/DOMTokenList.mm: Copied from Source/WebKit/mac/DOM/DOMDOMTokenList.mm.
260         * DOM/DOMTokenListInternal.h: Copied from Source/WebKit/mac/DOM/DOMDOMTokenListInternal.h.
261         As the files are not in WebCore any more, there is no need to differentiate from
262         WebCore internal headers with the same name. This makes it possible to make these
263         headers private using Xcode mechanisms, as opposed to copying with a shell script.
264
265         * DOM/DOMElement.mm: Removed "using namespace WebCore". Other DOM implementation
266         files don't have it.
267
268         * DOM/DOMCore.h:
269         * DOM/DOMDocument.mm:
270         * DOM/DOMHTMLAnchorElement.mm:
271         * DOM/DOMHTMLAreaElement.mm:
272         * DOM/DOMHTMLLinkElement.mm:
273         * DOM/DOMUtility.mm:
274         No more "DOMDOM".
275
276         * WebKit.exp:
277         No more "DOMDOM". DOMDOMTokenList was not directly exposed via an SPI header, so
278         renaming it is likely to be safe.
279
280         * MigrateHeaders.make: Don't migrate WebKit headers.
281
282         * Configurations/WebKitLegacy.xcconfig: Don't include two iOS specific SPI headers
283         on macOS.
284
285 2017-02-08  Aakash Jain  <aakash_jain@apple.com>
286
287         Don't re-export PluginData.h from WebKit
288         https://bugs.webkit.org/show_bug.cgi?id=168020
289
290         Reviewed by Alexey Proskuryakov.
291
292         * MigrateHeaders.make: Removed PluginData.h
293
294 2017-02-08  Aakash Jain  <aakash_jain@apple.com>
295
296         Don't re-export WKUtilities.h from WebKit
297         https://bugs.webkit.org/show_bug.cgi?id=167977
298
299         Reviewed by Alexey Proskuryakov.
300
301         * MigrateHeaders.make: Removed WKUtilities.h
302
303 2017-02-06  Alex Christensen  <achristensen@webkit.org>
304
305         credentials should be partitioned by main document domain
306         https://bugs.webkit.org/show_bug.cgi?id=166998
307         rdar://problem/22901123
308
309         Reviewed by Brady Eidson.
310
311         * Misc/WebDownload.mm:
312         * Plugins/WebBaseNetscapePluginView.mm:
313         (WebKit::getAuthenticationInfo):
314         Don't use partitioned credentials for WebKit1 plugins or downloads.
315         Downloads should be authenticated before becoming a download anyways.
316
317 2017-02-06  Said Abou-Hallawa  <sabouhallawa@apple.com>
318
319         Rename AnimationController to CSSAnimationController
320         https://bugs.webkit.org/show_bug.cgi?id=167829
321
322         Reviewed by Simon Fraser.
323
324         * WebView/WebFrame.mm:
325         * WebView/WebView.mm:
326
327 2017-02-03  Chris Dumez  <cdumez@apple.com>
328
329         Dismiss HTML form validation popover when pressing Escape key
330         https://bugs.webkit.org/show_bug.cgi?id=167716
331         <rdar://problem/29872943>
332
333         Reviewed by Simon Fraser.
334
335         Override ValidationMessageClient::hideAnyValidationMessage().
336
337         * WebCoreSupport/WebValidationMessageClient.h:
338         * WebCoreSupport/WebValidationMessageClient.mm:
339         (WebValidationMessageClient::hideAnyValidationMessage):
340
341 2017-02-02  Wenson Hsieh  <wenson_hsieh@apple.com>
342
343         Drag images should be anchored to the mouse location
344         https://bugs.webkit.org/show_bug.cgi?id=167690
345         <rdar://problem/30295261>
346
347         Reviewed by Enrica Casucci.
348
349         Adds some plumbing for the anchor point in the WK1 client layer.
350
351         * WebCoreSupport/WebDragClient.h:
352         * WebCoreSupport/WebDragClient.mm:
353         (WebDragClient::startDrag):
354
355 2017-02-02  Chris Dumez  <cdumez@apple.com>
356
357         Rename Node::inDocument() to isConnected()
358         https://bugs.webkit.org/show_bug.cgi?id=167743
359
360         Reviewed by Sam Weinig.
361
362         Rename Node::inDocument() to isConnected() to match the DOM specification more closely:
363         - https://dom.spec.whatwg.org/#connected
364
365         * DOM/DOMNode.mm:
366         (-[DOMNode isConnected]):
367         * WebView/WebFrame.mm:
368         (-[WebFrame selectNSRange:onElement:]):
369
370 2017-02-02  Chris Dumez  <cdumez@apple.com>
371
372         [Crash] com.apple.WebKit.WebContent at WebKit: WebKit::WebPage::fromCorePage()
373         https://bugs.webkit.org/show_bug.cgi?id=167738
374         <rdar://problem/30229990>
375
376         Reviewed by Andreas Kling.
377
378         The BackForwardClient no longer needs to worry about removing HistoryItems
379         from the PageCache now that WebCore takes care of it.
380
381         * History/BackForwardList.mm:
382         (BackForwardList::close):
383
384 2017-02-02  Yongjun Zhang  <yongjun_zhang@apple.com>
385
386         In iOS, we should take background assertion when accessing localstorage databases.
387         https://bugs.webkit.org/show_bug.cgi?id=165478
388
389         Move database transaction background task handling code from WebDatabaseManager to
390         WebCore's WebSQLiteDatabaseTrackerClient.
391
392         Reviewed by Brady Eidson.
393
394         * Storage/WebDatabaseManager.mm:
395         * Storage/WebDatabaseManagerInternal.h: Remove a category for background task handling.
396         * WebCoreSupport/WebApplicationCache.mm:
397         (+[WebApplicationCache initializeWithBundleIdentifier:]): Use WebCore::WebSQLiteDatabaseTrackerClient.
398         * WebView/WebView.mm:
399         (-[WebView _commonInitializationWithFrameName:groupName:]): Ditto.
400
401 2017-02-01  Wenson Hsieh  <wenson_hsieh@apple.com>
402
403         [WK1] Allow the drag client to be initialized on platforms that do not support drag and drop
404         https://bugs.webkit.org/show_bug.cgi?id=167695
405         <rdar://problem/30305390>
406
407         Reviewed by Sam Weinig.
408
409         Due to the common codepath for destroying the drag client, we need to ensure that the drag client actually
410         exists, even on platforms that do not support drag and drop, in order to avoid crashing when the DragController
411         is destroyed.
412
413         * WebView/WebView.mm:
414         (-[WebView _commonInitializationWithFrameName:groupName:]):
415
416 2017-01-31  Joseph Pecoraro  <pecoraro@apple.com>
417
418         ld: warning: instance method '_setAutofilled:' in category conflicts with same method from another category
419         https://bugs.webkit.org/show_bug.cgi?id=167684
420
421         Reviewed by Dan Bernstein.
422
423         * DOM/DOMHTML.mm:
424         (-[DOMHTMLInputElement _isAutofilled]): Deleted.
425         (-[DOMHTMLInputElement _setAutofilled:]): Deleted.
426         Consolidate in the WebDOMOperationsPrivate category.
427
428         * DOM/DOMPrivate.h:
429         Include WebDOMOperationsPrivate header to get other DOM Private categories.
430
431         * DOM/WebDOMOperations.mm:
432         (-[DOMHTMLInputElement _isAutofilled]):
433         * DOM/WebDOMOperationsPrivate.h:
434         Include getter alongside the setter.
435
436 2017-01-31  Jessie Berlin  <jberlin@webkit.org>
437
438         Build fix.
439
440         * Misc/WebNSPasteboardExtras.mm:
441         (+[NSPasteboard _web_setFindPasteboardString:withOwner:]):
442         (-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):
443         * WebView/WebHTMLView.mm:
444         (-[WebHTMLView _fontAttributesFromFontPasteboard]):
445         (-[WebHTMLView copyFont:]):
446
447 2017-01-30  Andy Estes  <aestes@apple.com>
448
449         [QuickLook] FrameLoaderClient should return the new QuickLookHandleClient it creates
450         https://bugs.webkit.org/show_bug.cgi?id=167625
451
452         Reviewed by Andreas Kling.
453
454         * WebCoreSupport/WebFrameLoaderClient.h: Declared createQuickLookHandleClient().
455         * WebCoreSupport/WebFrameLoaderClient.mm:
456         (WebFrameLoaderClient::createQuickLookHandleClient): Renamed from didCreateQuickLookHandle().
457         (WebFrameLoaderClient::didCreateQuickLookHandle): Renamed to createQuickLookHandleClient().
458
459 2017-01-30  Chris Dumez  <cdumez@apple.com>
460
461         Drop legacy Attributes.isId attribute
462         https://bugs.webkit.org/show_bug.cgi?id=167603
463
464         Reviewed by Ryosuke Niwa.
465
466         Keep Attr.isId in ObjC bindings.
467
468         * DOM/DOMAttr.mm:
469         (-[DOMAttr isId]):
470
471 2017-01-30  Andreas Kling  <akling@apple.com>
472
473         [macOS] WebHTMLView has an internal retain cycle with its flagsChangedEventMonitor.
474         <https://webkit.org/b/167580>
475
476         Reviewed by Antti Koivisto.
477
478         Avoid the implicit strong capture of self by keeping it in a __block variable.
479         Also add code to dealloc to unregister the event monitor, since it will otherwise leak.
480         This fixes huge WebHTMLView leaks seen on the leaks bot.
481
482         * WebView/WebHTMLView.mm:
483         (-[WebHTMLViewPrivate dealloc]):
484         (-[WebHTMLView viewDidMoveToWindow]):
485
486 2017-01-29  Andy Estes  <aestes@apple.com>
487
488         [QuickLook] Add a WebPreference to enable saving QuickLook documents in WebKitLegacy
489         https://bugs.webkit.org/show_bug.cgi?id=167563
490         <rdar://problem/30253207>
491
492         Reviewed by Andreas Kling.
493
494         Instead of only saving QuickLook documents to a temporary file when the client is
495         MobileSafari, base this decision on a WebPreference that clients can choose to enable.
496
497         This also changes the SPI for accessing the temporary file path and UTI. Instead of
498         -[WebView quickLookContentForURL:], which requires the client to pass the response URL of
499         the frame that saved the QuickLook document, the content dictionary is now stored as a
500         property of WebDataSource.
501
502         This also removes the manual lifetime management of the QLPreviewConverter from
503         QuickLookDocumentWriter. The QLPreviewConverter is kept alive by DocumentLoader these days,
504         which ensures it lives long enough to respond to subresource requests.
505
506         New API test: QuickLook.LegacyQuickLookContent
507
508         * WebCoreSupport/WebFrameLoaderClient.mm:
509         (WebFrameLoaderClient::didCreateQuickLookHandle): Moved the logic of deciding whether to
510         write a temporary file to here from the QuickLookDocumentWriter constructor.
511         * WebView/WebDataSource.mm: Declared _quickLookContent.
512         (-[WebDataSource _quickLookContent]):
513         (-[WebDataSource _setQuickLookContent:]):
514         * WebView/WebDataSourceInternal.h: Overrode _quickLookContent as a read/write property.
515         * WebView/WebDataSourcePrivate.h: Declared _quickLookContent as a readonly property.
516         * WebView/WebPreferenceKeysPrivate.h: Defined WebKitQuickLookDocumentSavingPreferenceKey.
517         * WebView/WebPreferences.mm:
518         (-[WebPreferences quickLookDocumentSavingEnabled]):
519         (-[WebPreferences setQuickLookDocumentSavingEnabled:]):
520         * WebView/WebPreferencesPrivate.h: Declared property quickLookDocumentSavingEnabled.
521         * WebView/WebView.mm:
522         (-[WebView quickLookContentForURL:]): Changed to always return nil.
523         * WebView/WebViewPrivate.h: Added a comment stating that clients should use
524         -[WebDataSource _quickLookContent] instead.
525
526 2017-01-28  Yoav Weiss  <yoav@yoav.ws>
527
528         Add Link Preload as an off-by-default experimental feature menu item.
529         https://bugs.webkit.org/show_bug.cgi?id=167201
530
531         Reviewed by Ryosuke Niwa.
532
533         * WebView/WebPreferenceKeysPrivate.h:
534         * WebView/WebPreferences.mm:
535         (-[WebPreferences linkPreloadEnabled]):
536         (-[WebPreferences setLinkPreloadEnabled:]):
537         * WebView/WebPreferencesPrivate.h:
538         * WebView/WebView.mm:
539         (-[WebView _preferencesChanged:]):
540
541 2017-01-28  Joseph Pecoraro  <pecoraro@apple.com>
542
543         Add User Timing Experimental Feature
544         https://bugs.webkit.org/show_bug.cgi?id=167542
545         <rdar://problem/22746307>
546
547         Reviewed by Ryosuke Niwa.
548
549         * WebView/WebPreferenceKeysPrivate.h:
550         * WebView/WebPreferences.mm:
551         (+[WebPreferences initialize]):
552         (-[WebPreferences userTimingEnabled]):
553         (-[WebPreferences setUserTimingEnabled:]):
554         * WebView/WebPreferencesPrivate.h:
555         * WebView/WebView.mm:
556         (-[WebView _preferencesChanged:]):
557         Add setting for User Timing runtime enabled feature.
558
559 2017-01-27  Wenson Hsieh  <wenson_hsieh@apple.com>
560
561         [WK1] Do not prevent the drag client from initializing on Mac
562         https://bugs.webkit.org/show_bug.cgi?id=167541
563
564         Reviewed by Dan Bernstein.
565
566         Fixes fallout from r211192. To ensure compability with WebKit clients, we need to ensure that WebDragClient is
567         initialized everywhere when creating a WebView. Stub out method implementations as no-ops for non-Mac platforms.
568         This caused certain clients, such as Mail, to crash when a webView closes due to  null dereference.
569
570         * WebCoreSupport/WebDragClient.mm:
571         (WebDragClient::WebDragClient):
572         (WebDragClient::actionMaskForDrag):
573         (WebDragClient::willPerformDragDestinationAction):
574         (WebDragClient::dragSourceActionMaskForPoint):
575         (WebDragClient::willPerformDragSourceAction):
576         (WebDragClient::startDrag):
577         (WebDragClient::declareAndWriteDragImage):
578         (WebDragClient::declareAndWriteAttachment):
579         * WebView/WebView.mm:
580         (-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):
581
582 2017-01-26  Chris Dumez  <cdumez@apple.com>
583
584         Crash when navigating back to a page in PacheCache when one of its frames has been removed
585         https://bugs.webkit.org/show_bug.cgi?id=167421
586         <rdar://problem/30188490>
587
588         Reviewed by Darin Adler.
589
590         Add a new setting allowing layout tests to enable PageCache in a window
591         that has an opener, for convenience.
592
593         * WebView/WebPreferenceKeysPrivate.h:
594         * WebView/WebPreferences.mm:
595         (+[WebPreferences initialize]):
596         (-[WebPreferences allowsPageCacheWithWindowOpener]):
597         (-[WebPreferences setAllowsPageCacheWithWindowOpener:]):
598         * WebView/WebPreferencesPrivate.h:
599         * WebView/WebView.mm:
600         (-[WebView _preferencesChanged:]):
601
602 2017-01-26  Keith Miller  <keith_miller@apple.com>
603
604         classInfo should take a VM so it is not materialized from the object on each call
605         https://bugs.webkit.org/show_bug.cgi?id=167424
606
607         Rubber Stamped by Michael Saboff.
608
609         Previously, classInfo() would get the VM from the target's
610         MarkedBlock.  Most callers already have a VM on hand, so it is
611         wasteful to compute the VM from the marked block every time. This
612         patch refactors some of the most common callers of classInfo(),
613         jsDynamicCast and inherits to take a VM as well.
614
615         * DOM/DOM.mm:
616         (+[DOMNode _nodeFromJSWrapper:]):
617         * DOM/DOMUtility.mm:
618         (createDOMWrapper):
619         * DOM/WebDOMOperations.mm:
620         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
621         (WebKit::getObjectID):
622         (WebKit::NetscapePluginInstanceProxy::retainLocalObject):
623         (WebKit::NetscapePluginInstanceProxy::releaseLocalObject):
624         * Plugins/Hosted/ProxyInstance.mm:
625         (WebKit::ProxyRuntimeMethod::finishCreation):
626         (WebKit::ProxyInstance::invokeMethod):
627         * Plugins/Hosted/ProxyRuntimeObject.mm:
628         (WebKit::ProxyRuntimeObject::finishCreation):
629         * WebView/WebFrame.mm:
630         (-[WebFrame _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]):
631         * WebView/WebView.mm:
632         (+[WebView _reportException:inContext:]):
633         (aeDescFromJSValue):
634         (-[WebView _notificationIDForTesting:]):
635
636 2017-01-26  Wenson Hsieh  <wenson_hsieh@apple.com>
637
638         REGRESSION (r207483): Touch Bar: Lists and BIU Buttons Missing from Touch Bar in HTML Notes
639         https://bugs.webkit.org/show_bug.cgi?id=167472
640         <rdar://problem/30149809>
641
642         Reviewed by Beth Dakin.
643
644         Revision 207483 caused the touch bar to stop showing up in HTML Notes due to -updateTextTouchBar not
645         initializing the text touch bar and causing -makeTouchBar to return nil while processing a mouse click. The
646         purpose of bailing out of the update was to prevent the text touch bar from thrashing during a selection drag.
647         If the text touch bar doesn't exist yet, we don't have to worry about its appearance flickering from a different
648         previous state, so we should just allow the touch bar to update instead.
649
650         * WebView/WebView.mm:
651         (-[WebView updateTextTouchBar]):
652
653 2017-01-26  Per Arne Vollan  <pvollan@apple.com>
654
655         Crash when setting custom scale factor.
656         https://bugs.webkit.org/show_bug.cgi?id=167369
657
658         Reviewed by Sam Weinig.
659
660         Add null pointer check.
661
662         * WebView/WebView.mm:
663         (-[WebView _setCustomBackingScaleFactor:]):
664
665 2017-01-25  Wenson Hsieh  <wenson_hsieh@apple.com>
666
667         Refactor drag and drop implementation on Mac
668         https://bugs.webkit.org/show_bug.cgi?id=167427
669
670         Reviewed by Enrica Casucci.
671
672         Refactor some WebKit1 code on the Mac pertaining to drag and drop. See WebCore ChangeLog for more details.
673
674         * Misc/WebNSPasteboardExtras.h:
675         * WebCoreSupport/WebDragClient.mm:
676         * WebView/WebFrame.mm:
677         * WebView/WebFrameInternal.h:
678         * WebView/WebHTMLView.mm:
679         * WebView/WebView.mm:
680         (-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):
681
682 2017-01-24  Youenn Fablet  <youennf@gmail.com>
683
684         [WebRTC] Introduce libwebrtc abstraction for WK1/WK2 implementations
685         https://bugs.webkit.org/show_bug.cgi?id=167294
686
687         Reviewed by Alex Christensen.
688
689         * WebView/WebView.mm:
690         (-[WebView _commonInitializationWithFrameName:groupName:]):
691
692 2017-01-25  Wenson Hsieh  <wenson_hsieh@apple.com>
693
694         Add support for named pasteboards, pasteboard strategies and platform pasteboards
695         https://bugs.webkit.org/show_bug.cgi?id=167404
696
697         Reviewed by Enrica Casucci.
698
699         Adds pasteboard name as an argument to pasteboard-related WebPlatformStrategy methods.
700
701         * WebCoreSupport/WebPlatformStrategies.h:
702         * WebCoreSupport/WebPlatformStrategies.mm:
703         (WebPlatformStrategies::writeToPasteboard):
704         (WebPlatformStrategies::getPasteboardItemsCount):
705         (WebPlatformStrategies::readBufferFromPasteboard):
706         (WebPlatformStrategies::readURLFromPasteboard):
707         (WebPlatformStrategies::readStringFromPasteboard):
708
709 2017-01-25  Aakash Jain  <aakash_jain@apple.com>
710
711         LoadWebLocalizedStrings method should be moved in correct file
712         https://bugs.webkit.org/show_bug.cgi?id=167393
713
714         Reviewed by Alexey Proskuryakov.
715
716         * Misc/WebLocalizableStrings.h: Deleted LoadWebLocalizedStrings method.
717         * Misc/WebLocalizableStrings.mm:
718         (LoadWebLocalizedStringsTimerCallback): Deleted, moved to WebUIKitSupport.mm
719         (LoadWebLocalizedStrings): Deleted, moved to WebUIKitSupport.mm
720
721 2017-01-24  Zalan Bujtas  <zalan@apple.com>
722
723         Add simple line layout toggle to MiniBrowser
724         https://bugs.webkit.org/show_bug.cgi?id=167405
725
726         Reviewed by Andreas Kling.
727
728         * WebView/WebPreferenceKeysPrivate.h:
729         * WebView/WebPreferences.mm:
730         (+[WebPreferences initialize]):
731         (-[WebPreferences simpleLineLayoutEnabled]):
732         (-[WebPreferences setSimpleLineLayoutEnabled:]):
733         * WebView/WebPreferencesPrivate.h:
734         * WebView/WebView.mm:
735         (-[WebView _preferencesChanged:]):
736
737 2017-01-24  Joseph Pecoraro  <pecoraro@apple.com>
738
739         Fold USER_TIMING into WEB_TIMING and make it a RuntimeEnabledFeature
740         https://bugs.webkit.org/show_bug.cgi?id=167394
741
742         Reviewed by Ryosuke Niwa.
743
744         * Configurations/FeatureDefines.xcconfig:
745
746 2017-01-23  Chris Dumez  <cdumez@apple.com>
747
748         REGRESSION (r211033): ASSERTION FAILED: m_ptr in com.apple.WebCore: WTF::RefPtr<WebCore::Element>::operator* const + 70
749         https://bugs.webkit.org/show_bug.cgi?id=167308
750         <rdar://problem/30144964>
751
752         Unreviewed, do a partial revert of r211033 to fix assertion.
753
754         * WebCoreSupport/WebChromeClient.h:
755         * WebCoreSupport/WebChromeClient.mm:
756         (WebChromeClient::exitFullScreenForElement):
757
758 2017-01-23  Joseph Pecoraro  <pecoraro@apple.com>
759
760         Remove allowWindowOpenWithoutUserGesture setting
761         https://bugs.webkit.org/show_bug.cgi?id=167301
762
763         Reviewed by Darin Adler.
764
765         * WebView/WebView.mm:
766         (-[WebView _preferencesChanged:]):
767         Use the equivalent existing setting.
768
769 2017-01-20  Darin Adler  <darin@apple.com>
770
771         Remove PassRefPtr from "page" directory of WebCore, also deploy references
772         https://bugs.webkit.org/show_bug.cgi?id=167224
773
774         Reviewed by Chris Dumez.
775
776         * WebCoreSupport/WebApplicationCacheQuotaManager.mm:
777         (-[WebApplicationCacheQuotaManager quota]): Pass reference.
778
779         * WebCoreSupport/WebChromeClient.h: Updated for changes to ChromeClient.
780         * WebCoreSupport/WebChromeClient.mm:
781         (WebChromeClient::focusedElementChanged): Ditto.
782         (WebChromeClient::createWindow): Ditto.
783         (WebChromeClient::runBeforeUnloadConfirmPanel): Ditto.
784         (WebChromeClient::runJavaScriptAlert): Ditto.
785         (WebChromeClient::runJavaScriptConfirm): Ditto.
786         (WebChromeClient::runJavaScriptPrompt): Ditto.
787         (WebChromeClient::contentsSizeChanged): Ditto.
788         (WebChromeClient::unavailablePluginButtonClicked): Ditto.
789         (WebChromeClient::print): Ditto.
790         (WebChromeClient::exceededDatabaseQuota): Ditto.
791         (WebChromeClient::reachedApplicationCacheOriginQuota): Ditto.
792         (WebChromeClient::createColorChooser): Ditto.
793         (WebChromeClient::elementDidFocus): Ditto.
794         (WebChromeClient::elementDidBlur): Ditto.
795         (WebChromeClient::createPopupMenu): Ditto.
796         (WebChromeClient::createSearchPopupMenu): Ditto.
797         (WebChromeClient::attachRootGraphicsLayer): Ditto.
798         (WebChromeClient::attachViewOverlayGraphicsLayer): Ditto.
799         (WebChromeClient::supportsFullScreenForElement): Ditto.
800         (WebChromeClient::enterFullScreenForElement): Ditto.
801         (WebChromeClient::exitFullScreenForElement): Ditto.
802
803         * WebView/WebFrame.mm:
804         (+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]):
805         Updated for change to the appendChild function.
806
807 2017-01-21  Simon Fraser  <simon.fraser@apple.com>
808
809         Remove -[WebFrame sendOrientationChangeEvent:] which is unused
810         https://bugs.webkit.org/show_bug.cgi?id=167276
811
812         Reviewed by Alex Christensen.
813         
814         It was usurped by -deviceOrientationChanged in 2014.
815
816         * WebView/WebFrame.mm:
817         (-[WebFrame sendOrientationChangeEvent:]): Deleted.
818         * WebView/WebFramePrivate.h:
819
820 2017-01-21  Simon Fraser  <simon.fraser@apple.com>
821
822         Remove -[WebView _contentsSizeRespectingOverflow] which is no longer needed
823         https://bugs.webkit.org/show_bug.cgi?id=167271
824
825         Reviewed by Alex Christensen.
826         
827         -_contentsSizeRespectingOverflow was added to try to make viewport sizing on iOS respect
828         overflow:hidden on the body (webkit.org/b/146924) but that was reverted (webkit.org/b/152803),
829
830         * WebView/WebView.mm:
831         (-[WebView _contentsSizeRespectingOverflow]): Deleted.
832         * WebView/WebViewPrivate.h:
833
834 2017-01-20  Joseph Pecoraro  <pecoraro@apple.com>
835
836         Remove never changing IndexedDB RuntimeEnabledFeature
837         https://bugs.webkit.org/show_bug.cgi?id=167278
838
839         Reviewed by Darin Adler.
840
841         * WebView/WebView.mm:
842         (-[WebView _preferencesChanged:]):
843
844 2017-01-20  Joseph Pecoraro  <pecoraro@apple.com>
845
846         Cleanup RuntimeEnabledFeatures
847         https://bugs.webkit.org/show_bug.cgi?id=167228
848
849         Reviewed by Simon Fraser.
850
851         * WebView/WebView.mm:
852         (-[WebView _preferencesChanged:]):
853
854 2017-01-20  Joseph Pecoraro  <pecoraro@apple.com>
855
856         Remove outdated ENABLE(CSP_NEXT) build flag
857         https://bugs.webkit.org/show_bug.cgi?id=167252
858
859         Reviewed by Brent Fulgham.
860
861         * Configurations/FeatureDefines.xcconfig:
862
863 2017-01-20  Antoine Quint  <graouts@apple.com>
864
865         [Modern Media Controls] Turn modern media controls on by default
866         https://bugs.webkit.org/show_bug.cgi?id=165668
867
868         Reviewed by Dean Jackson.
869
870         Enabled modern media controls by default in WK1.
871
872         * WebView/WebPreferences.mm:
873         (+[WebPreferences initialize]):
874
875 2017-01-19  Chris Dumez  <cdumez@apple.com>
876
877         iterable<> should be enabled on WK1
878         https://bugs.webkit.org/show_bug.cgi?id=167221
879         <rdar://problem/30108531>
880
881         Reviewed by Youenn Fablet.
882
883         * WebView/WebPreferenceKeysPrivate.h:
884         * WebView/WebPreferences.mm:
885         (-[WebPreferences setCustomElementsEnabled:]):
886         (-[WebPreferences DOMIteratorEnabled]): Deleted.
887         (-[WebPreferences setDOMIteratorEnabled:]): Deleted.
888         * WebView/WebPreferencesPrivate.h:
889         * WebView/WebView.mm:
890         (-[WebView _preferencesChanged:]):
891
892 2017-01-19  Chris Dumez  <cdumez@apple.com>
893
894         Make sure HTML validation bubble gets dismissed when its associated element's frame gets detached
895         https://bugs.webkit.org/show_bug.cgi?id=167215
896         <rdar://problem/29885052>
897
898         Reviewed by Andreas Kling.
899
900         Make sure HTML validation bubble gets dismissed when its associated
901         element's frame gets detached and that we do not crash.
902
903         * WebCoreSupport/WebValidationMessageClient.h:
904         * WebCoreSupport/WebValidationMessageClient.mm:
905         (WebValidationMessageClient::documentDetached):
906
907 2017-01-19  Myles C. Maxfield  <mmaxfield@apple.com>
908
909         [Cocoa] Variation fonts are erroneously disabled on iOS
910         https://bugs.webkit.org/show_bug.cgi?id=167172
911
912         Reviewed by Simon Fraser.
913
914         OpenSource builders don't seem to understand sdk=embedded*.
915
916         * Configurations/FeatureDefines.xcconfig:
917
918 2017-01-19  Andreas Kling  <akling@apple.com>
919
920         ScriptExecutionContext::topOrigin() should return a reference.
921         <https://webkit.org/b/167190>
922
923         Reviewed by Sam Weinig.
924
925         * Misc/WebCache.mm:
926         (+[WebCache addImageToCache:forURL:forFrame:]):
927         (+[WebCache removeImageFromCacheForURL:forFrame:]):
928
929 2017-01-18  Ryan Haddad  <ryanhaddad@apple.com>
930
931         Unreviewed fix for the macOS build.
932
933         * Carbon/CarbonWindowAdapter.mm:
934         (-[CarbonWindowAdapter initWithCarbonWindowRef:takingOwnership:disableOrdering:carbon:]):
935
936 2017-01-18  Ryan Haddad  <ryanhaddad@apple.com>
937
938         Unreviewed, rolling out r210848.
939
940         This change introduced media-related LayoutTest failures and
941         crashes on macOS.
942
943         Reverted changeset:
944
945         "[Modern Media Controls] Turn modern media controls on by
946         default"
947         https://bugs.webkit.org/show_bug.cgi?id=165668
948         http://trac.webkit.org/changeset/210848
949
950 2017-01-18  Andreas Kling  <akling@apple.com>
951
952         Document::securityOrigin() should return a reference.
953         <https://webkit.org/b/167124>
954
955         Reviewed by Sam Weinig.
956
957         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
958         (WebKit::NetscapePluginInstanceProxy::loadRequest):
959         * Plugins/WebNetscapePluginStream.mm:
960         (WebNetscapePluginStream::WebNetscapePluginStream):
961         * Plugins/WebNetscapePluginView.mm:
962         (-[WebNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
963         * Plugins/WebPluginContainerCheck.mm:
964         (-[WebPluginContainerCheck _isForbiddenFileLoad]):
965         * WebCoreSupport/WebChromeClient.mm:
966         (WebChromeClient::exceededDatabaseQuota):
967         * WebCoreSupport/WebFrameLoaderClient.h:
968         * WebCoreSupport/WebFrameLoaderClient.mm:
969         (WebFrameLoaderClient::didRunInsecureContent):
970         * WebCoreSupport/WebGeolocationClient.mm:
971         (WebGeolocationClient::requestPermission):
972         (-[WebGeolocationProviderInitializationListener initializationAllowedWebView:]):
973         * WebView/WebFrame.mm:
974         (-[WebFrame _allowsFollowingLink:]):
975
976 2017-01-18  Antoine Quint  <graouts@apple.com>
977
978         [Modern Media Controls] Turn modern media controls on by default
979         https://bugs.webkit.org/show_bug.cgi?id=165668
980
981         Reviewed by Dean Jackson.
982
983         Enabled modern media controls by default in WK1. 
984
985         * WebView/WebPreferences.mm:
986         (+[WebPreferences initialize]):
987
988 2017-01-15  Darin Adler  <darin@apple.com>
989
990         Remove PassRefPtr from "loader" directory of WebCore
991         https://bugs.webkit.org/show_bug.cgi?id=167055
992
993         Reviewed by Alex Christensen.
994
995         * WebCoreSupport/WebChromeClient.h: Updated for changes to ChromeClient.
996         Also made class final and most functions private and final.
997         * WebCoreSupport/WebChromeClient.mm:
998         (WebChromeClient::runOpenPanel): Updated to take references.
999
1000         * WebCoreSupport/WebEditorClient.h: Updated for changes to EditorClient.
1001         * WebCoreSupport/WebEditorClient.mm:
1002         (-[WebUndoStep initWithUndoStep:]): Take reference instead of PassRefPtr.
1003         (+[WebUndoStep stepWithUndoStep:]): Ditto.
1004         (-[WebUndoStep step]): Return reference instead of pointer.
1005         (-[WebEditorUndoTarget undoEditing:]): Updated for the above.
1006         (-[WebEditorUndoTarget redoEditing:]): Ditto.
1007         (WebEditorClient::registerUndoOrRedoStep): Take reference instead of
1008         PassRefPtr.
1009         (WebEditorClient::registerUndoStep): Ditto.
1010         (WebEditorClient::registerRedoStep): Ditto.
1011
1012         * WebCoreSupport/WebFrameLoaderClient.h: Updated for changes to
1013         FrameLoaderClient, marked functions final instead of override.
1014         * WebCoreSupport/WebFrameLoaderClient.mm:
1015         (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): Take
1016         pointer instead of PassRefPtr.
1017         (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Ditto.
1018         (makeFormFieldValuesDictionary): Take a reference.
1019         (WebFrameLoaderClient::dispatchWillSendSubmitEvent): Take Ref&& instead
1020         of PassRefPtr.
1021         (WebFrameLoaderClient::dispatchWillSubmitForm): Take a reference instead
1022         of PassRefPtr.
1023         (WebFrameLoaderClient::actionDictionary): Take a pointer instead of PassRePtr.
1024         (WebFrameLoaderClient::createFrame): Take a reference instead of a pointer.
1025         (WebFrameLoaderClient::createPlugin): Ditto.
1026         (WebFrameLoaderClient::createJavaAppletWidget): Ditto.
1027         (WebFrameLoaderClient::createNetworkingContext): Ditto.
1028         (WebFrameLoaderClient::didCreateQuickLookHandle): Pass a reference.
1029
1030         * WebCoreSupport/WebFrameNetworkingContext.h: Use Ref instead of PassRefPtr.
1031         * WebCoreSupport/WebFrameNetworkingContext.mm: Tweak style a bit.
1032
1033         * WebCoreSupport/WebOpenPanelResultListener.h: Take a reference instead of
1034         PassRefPtr. Use RefPtr for class field.
1035         * WebCoreSupport/WebOpenPanelResultListener.mm:
1036         (-[WebOpenPanelResultListener dealloc]): Deleted. Compiler will now do it
1037         correctly without us declaring anything explicitly.
1038         (-[WebOpenPanelResultListener cancel]): Get rid of hand-written deref code,
1039         and let RefPtr do the work.
1040         (-[WebOpenPanelResultListener chooseFilename:]): Ditto.
1041         (-[WebOpenPanelResultListener chooseFilenames:]): Ditto.
1042         (-[WebOpenPanelResultListener chooseFilenames:displayString:iconImage:]):
1043         Rewrote to use a modern Objective-C for loop, reserveInitialCapacity,
1044         and uncheckedAppend.
1045
1046         * WebView/WebArchive.mm:
1047         (-[WebArchive initWithMainResource:subresources:subframeArchives:]):
1048         Updated for changes to LegacyWebArchive.
1049         (-[WebArchive mainResource]): Ditto.
1050         (-[WebArchive subresources]): Ditto.
1051         (-[WebArchive subframeArchives]): Ditto.
1052
1053         * WebView/WebDataSource.mm:
1054         (-[WebDataSource _addSubframeArchives:]): Use a modern Objective-C for loop
1055         instead of NSEnumerator.
1056         (-[WebDataSource _fileWrapperForURL:]): Use auto.
1057         (-[WebDataSource _documentFragmentWithArchive:]): Pass a reference.
1058         (-[WebDataSource mainResource]): Ditto.
1059         (-[WebDataSource subresources]): Ditto.
1060         (-[WebDataSource subresourceForURL:]): Ditto.
1061         (-[WebDataSource addSubresource:]): Ditto.
1062
1063         * WebView/WebResource.mm:
1064         (-[WebResourcePrivate initWithCoreResource:]): Take Ref&& instead of PassRefPtr.
1065         (-[WebResourcePrivate dealloc]): Remove explicit deref since RefPtr will now take
1066         care of it
1067         (-[WebResource initWithCoder:]): Pass a reference.
1068         (-[WebResource encodeWithCoder:]): Updated since coreResource is now RefPtr.
1069         (-[WebResource _initWithCoreResource:]): Take Ref&& instead of PassRefPtr.
1070         (-[WebResource _coreResource]): Return reference rather than pointer.
1071         (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]):
1072         Added code to handle the null case and pass a reference rather than a pointer.
1073         * WebView/WebResourceInternal.h: Updated for the above.
1074
1075 2017-01-17  Michael Catanzaro  <mcatanzaro@igalia.com>
1076
1077         Unreviewed, rolling out r210834
1078         https://bugs.webkit.org/show_bug.cgi?id=165668
1079
1080         It introduced dozens of test timeouts.
1081
1082         Reverted changeset:
1083         "[Modern Media Controls] Turn modern media controls on by default"
1084         https://bugs.webkit.org/show_bug.cgi?id=165668
1085         http://trac.webkit.org/changeset/210834
1086
1087 2017-01-17  Antoine Quint  <graouts@apple.com>
1088
1089         [Modern Media Controls] Turn modern media controls on by default
1090         https://bugs.webkit.org/show_bug.cgi?id=165668
1091
1092         Reviewed by Dean Jackson.
1093
1094         Enabled modern media controls by default in WK1. 
1095
1096         * WebView/WebPreferences.mm:
1097         (+[WebPreferences initialize]):
1098
1099 2017-01-17  Joseph Pecoraro  <pecoraro@apple.com>
1100
1101         ENABLE(USER_TIMING) Not Defined for Apple Windows or OS X Ports
1102         https://bugs.webkit.org/show_bug.cgi?id=116551
1103         <rdar://problem/13949830>
1104
1105         Reviewed by Alex Christensen.
1106
1107         * Configurations/FeatureDefines.xcconfig:
1108
1109 2017-01-17  Joseph Pecoraro  <pecoraro@apple.com>
1110
1111         Crash when closing tab with debugger paused
1112         https://bugs.webkit.org/show_bug.cgi?id=161746
1113         <rdar://problem/15607819>
1114
1115         Reviewed by Brian Burg and Brent Fulgham.
1116
1117         * WebView/WebView.mm:
1118         (WebKit::DeferredPageDestructor::createDeferredPageDestructor):
1119         (WebKit::DeferredPageDestructor::DeferredPageDestructor):
1120         (WebKit::DeferredPageDestructor::tryDestruction):
1121         (-[WebView _close]):
1122         Defer destruction of the Page if we are in a nested runloop.
1123
1124 2017-01-16  Joseph Pecoraro  <pecoraro@apple.com>
1125
1126         Remove the REQUEST_ANIMATION_FRAME flag
1127         https://bugs.webkit.org/show_bug.cgi?id=156980
1128         <rdar://problem/25906849>
1129
1130         Reviewed by Simon Fraser.
1131
1132         * Configurations/FeatureDefines.xcconfig:
1133
1134 2017-01-16  Andy Estes  <aestes@apple.com>
1135
1136         [QuickLook] Do some cleanup in QuickLookHandle
1137         https://bugs.webkit.org/show_bug.cgi?id=166864
1138
1139         Reviewed by Darin Adler.
1140
1141         * WebCoreSupport/WebFrameLoaderClient.mm:
1142         (WebFrameLoaderClient::didCreateQuickLookHandle): Changed to pass a
1143         Ref<QuickLookHandleClient>&& to QuickLookHandle::setClient().
1144
1145 2017-01-15  Tim Horton  <timothy_horton@apple.com>
1146
1147         De-duplicate more (nearly) identical code in Editor(Mac|IOS).mm
1148         https://bugs.webkit.org/show_bug.cgi?id=167063
1149
1150         Reviewed by Dan Bernstein.
1151
1152         * WebView/WebHTMLView.mm:
1153         (-[WebHTMLView _selectionStartFontAttributesAsRTF]):
1154         (-[WebHTMLView _updateFontPanel]):
1155         * WebView/WebView.mm:
1156         (-[WebView typingAttributes]):
1157         Adjust to fontAttributesForSelectionStart returning a RetainPtr.
1158
1159 2017-01-13  Joseph Pecoraro  <pecoraro@apple.com>
1160
1161         Remove ENABLE(DETAILS_ELEMENT) guards
1162         https://bugs.webkit.org/show_bug.cgi?id=167042
1163
1164         Reviewed by Alex Christensen.
1165
1166         * Configurations/FeatureDefines.xcconfig:
1167
1168 2017-01-11  Darin Adler  <darin@apple.com>
1169
1170         Remove PassRefPtr from more of "platform"
1171         https://bugs.webkit.org/show_bug.cgi?id=166809
1172
1173         Reviewed by Sam Weinig.
1174
1175         * WebCoreSupport/WebFrameLoaderClient.mm:
1176         (NetscapePluginWidget::handleEvent): Pass a reference.
1177         * WebView/WebView.mm:
1178         (-[WebView _addScrollerDashboardRegionsForFrameView:dashboardRegions:]):
1179         Updated since the children set now contains Ref instead of RefPtr.
1180
1181 2017-01-13  Sam Weinig  <sam@webkit.org>
1182
1183         [WebIDL] Remove custom bindings for DeviceMotionEvent and DeviceOrientationEvent
1184         https://bugs.webkit.org/show_bug.cgi?id=167006
1185
1186         Reviewed by Geoffrey Garen.
1187
1188         * WebView/WebDeviceOrientation.mm:
1189         (convert):
1190         (-[WebDeviceOrientation initWithCanProvideAlpha:alpha:canProvideBeta:beta:canProvideGamma:gamma:]):
1191         Update for new use of std::optional.
1192
1193 2017-01-12  Joseph Pecoraro  <pecoraro@apple.com>
1194
1195         Remove unnecessary includes of Page.h
1196         https://bugs.webkit.org/show_bug.cgi?id=166996
1197
1198         Reviewed by Yusuke Suzuki.
1199
1200         * DOM/DOMHTML.mm:
1201         * History/WebBackForwardList.mm:
1202         * Plugins/WebPluginController.mm:
1203         * WebCoreSupport/WebNotificationClient.mm:
1204         * WebCoreSupport/WebPlatformStrategies.mm:
1205         * WebCoreSupport/WebUserMediaClient.mm:
1206         * WebView/WebFullScreenController.mm:
1207
1208 2017-01-12  Chris Dumez  <cdumez@apple.com>
1209
1210         Add KEYBOARD_KEY_ATTRIBUTE / KEYBOARD_CODE_ATTRIBUTE to FeatureDefines.xcconfig
1211         https://bugs.webkit.org/show_bug.cgi?id=166995
1212
1213         Reviewed by Jer Noble.
1214
1215         Add KEYBOARD_KEY_ATTRIBUTE / KEYBOARD_CODE_ATTRIBUTE to FeatureDefines.xcconfig
1216         as some people are having trouble building without it.
1217
1218         * Configurations/FeatureDefines.xcconfig:
1219
1220 2017-01-12  Chris Dumez  <cdumez@apple.com>
1221
1222         HTML form validation popover sometimes does not go away
1223         https://bugs.webkit.org/show_bug.cgi?id=166990
1224         <rdar://problem/29985957>
1225
1226         Reviewed by Tim Horton.
1227
1228         Update code using ValidationBubble now that it is RefCounted.
1229
1230         * WebView/WebView.mm:
1231         (-[WebView showFormValidationMessage:withAnchorRect:]):
1232
1233 2017-01-10  Ryosuke Niwa  <rniwa@webkit.org>
1234
1235         Remove pointerLockElement from DOMDocumentPrivate.h
1236         https://bugs.webkit.org/show_bug.cgi?id=166882
1237
1238         Reviewed by Simon Fraser.
1239
1240         Removed pointerLockElement declaration that was supposed to be removed in r209637.
1241
1242         * DOM/DOMDocumentPrivate.h:
1243
1244 2017-01-06  Darin Adler  <darin@apple.com>
1245
1246         Remove PassRefPtr use from "inspector", "platform/sql", and "platform/text"
1247         https://bugs.webkit.org/show_bug.cgi?id=166797
1248
1249         Reviewed by Alex Christensen.
1250
1251         * WebCoreSupport/WebEditorClient.h: Updated to take a reference.
1252         * WebCoreSupport/WebEditorClient.mm:
1253         (WebEditorClient::requestCheckingOfString): Take a reference
1254         instead of a PassRefPtr.
1255
1256 2017-01-05  Chris Dumez  <cdumez@apple.com>
1257
1258         Turn preferLowPowerWebGLRendering setting on by default
1259         https://bugs.webkit.org/show_bug.cgi?id=166737
1260         <rdar://problem/29870033>
1261
1262         Reviewed by Dean Jackson.
1263
1264         Temporarily turn preferLowPowerWebGLRendering setting on by default until
1265         we deal better with WebGL content in background tabs.
1266
1267         * WebView/WebPreferences.mm:
1268         (+[WebPreferences initialize]):
1269
1270 2017-01-05  Enrica Casucci  <enrica@apple.com>
1271
1272         Support File Promise during drag for macOS.
1273         https://bugs.webkit.org/show_bug.cgi?id=165204
1274         rdar://problem/19595567
1275
1276         Reviewed by Tim Horton.
1277
1278         Adds support for dropping a File Promise in a WebView.
1279         The implementation uses new File Promise API available in Sierra.
1280
1281         * Misc/WebNSPasteboardExtras.mm:
1282         (+[NSPasteboard _web_dragTypesForURL]):
1283         * WebView/WebView.mm:
1284         (-[WebView performDragOperation:]):
1285
1286 2017-01-05  Andreas Kling  <akling@apple.com>
1287
1288         Remove ChromeClient::needTouchEvents().
1289         <https://webkit.org/b/166723>
1290
1291         Rubber-stamped by Antti Koivisto.
1292
1293         * WebCoreSupport/WebChromeClient.h:
1294
1295 2017-01-04  Darin Adler  <darin@apple.com>
1296
1297         Remove PassRefPtr use from the "html" directory, other improvements
1298         https://bugs.webkit.org/show_bug.cgi?id=166635
1299
1300         Reviewed by Alex Christensen.
1301
1302         * WebCoreSupport/WebChromeClient.h:
1303         * WebCoreSupport/WebChromeClient.mm:
1304         (WebChromeClient::loadIconForFiles): Take a reference instead of a pointer.
1305
1306 2017-01-04  Ryan Haddad  <ryanhaddad@apple.com>
1307
1308         Unreviewed, rolling out r210287.
1309
1310         This change caused editing test failures on macOS.
1311
1312         Reverted changeset:
1313
1314         "Support File Promise during drag for macOS."
1315         https://bugs.webkit.org/show_bug.cgi?id=165204
1316         http://trac.webkit.org/changeset/210287
1317
1318 2017-01-04  Enrica Casucci  <enrica@apple.com>
1319
1320         Support File Promise during drag for macOS.
1321         https://bugs.webkit.org/show_bug.cgi?id=165204
1322         rdar://problem/19595567
1323
1324         Reviewed by Tim Horton.
1325
1326         Adds support for dropping a File Promise in a WebView.
1327         The implementation uses new File Promise API available in Sierra.
1328
1329         * Misc/WebNSPasteboardExtras.mm:
1330         (+[NSPasteboard _web_dragTypesForURL]):
1331         * WebView/WebView.mm:
1332         (-[WebView performDragOperation:]):
1333
1334 2017-01-04  Tim Horton  <timothy_horton@apple.com>
1335
1336         Provide a setting for clients to always prefer low-power WebGL
1337         https://bugs.webkit.org/show_bug.cgi?id=166675
1338         <rdar://problem/29834093>
1339
1340         Reviewed by Dan Bernstein.
1341
1342         * WebView/WebPreferenceKeysPrivate.h:
1343         * WebView/WebPreferences.mm:
1344         (+[WebPreferences initialize]):
1345         (-[WebPreferences preferLowPowerWebGLRendering]):
1346         (-[WebPreferences setPreferLowPowerWebGLRendering:]):
1347         * WebView/WebPreferencesPrivate.h:
1348         * WebView/WebView.mm:
1349         (-[WebView _preferencesChanged:]):
1350         Expose a new private preferLowPowerWebGLRendering WebKit1 preference.
1351
1352 2017-01-03  Tim Horton  <timothy_horton@apple.com>
1353
1354         NSSpellChecker's recordResponse isn't called for unseen automatic corrections
1355         https://bugs.webkit.org/show_bug.cgi?id=166450
1356         <rdar://problem/29447824>
1357
1358         Reviewed by Darin Adler.
1359
1360         * WebCoreSupport/CorrectionPanel.h:
1361         * WebCoreSupport/CorrectionPanel.mm:
1362         (CorrectionPanel::recordAutocorrectionResponse):
1363         (CorrectionPanel::handleAcceptedReplacement):
1364         * WebCoreSupport/WebAlternativeTextClient.mm:
1365         (toCorrectionResponse):
1366         (WebAlternativeTextClient::recordAutocorrectionResponse):
1367         Funnel all calls to recordResponse:toCorrection:forWord:language:inSpellDocumentWithTag:
1368         through recordAutocorrectionResponse, for debugging's sake.
1369         Drop the NSView parameter because we don't need it, just the tag.
1370         Convert the new AutocorrectionResponseType value to its corresponding
1371         NSCorrectionResponse value.
1372
1373 2017-01-01  Jeff Miller  <jeffm@apple.com>
1374
1375         Update user-visible copyright strings to include 2017
1376         https://bugs.webkit.org/show_bug.cgi?id=166278
1377
1378         Reviewed by Dan Bernstein.
1379
1380         * Info.plist:
1381
1382 2016-12-30  Darin Adler  <darin@apple.com>
1383
1384         Remove PassRefPtr use from the "dom" directory, related cleanup
1385         https://bugs.webkit.org/show_bug.cgi?id=166569
1386
1387         Reviewed by Alex Christensen.
1388
1389         * WebCoreSupport/WebFrameLoaderClient.mm:
1390         (WebFrameLoaderClient::dispatchDidReceiveTitle): Updated to use struct.
1391         (WebFrameLoaderClient::updateGlobalHistory): Ditto.
1392         (WebFrameLoaderClient::setTitle): Ditto.
1393         (WebFrameLoaderClient::transitionToCommittedForNewPage): Ditto.
1394         * WebView/WebFrame.mm:
1395         (-[WebFrame _dispatchDidReceiveTitle:]): Use aggregate-style syntax for StringWithDirection.
1396         Not needed now, but useful later if we ever can get rid of the explicit constructors.
1397         (-[WebFrame loadArchive:]): Pass a reference to loadArchive.
1398         * WebView/WebHTMLRepresentation.mm:
1399         (-[WebHTMLRepresentation title]): Updated to use struct.
1400
1401 2016-12-25  Yusuke Suzuki  <utatane.tea@gmail.com>
1402
1403         Propagate the source origin as much as possible
1404         https://bugs.webkit.org/show_bug.cgi?id=166348
1405
1406         Reviewed by Darin Adler.
1407
1408         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1409         (WebKit::NetscapePluginInstanceProxy::evaluate):
1410
1411 2016-12-23  Andy Estes  <aestes@apple.com>
1412
1413         [iOS] DumpRenderTree triggers an assertion failure when calling +[WebPreferences _switchNetworkLoaderToNewTestingSession]
1414         https://bugs.webkit.org/show_bug.cgi?id=166471
1415
1416         Reviewed by Andreas Kling.
1417
1418         When DumpRenderTree starts up, it calls
1419         +[WebPreferences _switchNetworkLoaderToNewTestingSession] from the main thread. In Debug
1420         builds, this triggers the ASSERT(isMainThread()) in
1421         NetworkStorageSession::defaultNetworkStorageSession() because the Web thread has already
1422         started, we are on the main thread, and we are not holding the Web thread lock. This is
1423         causing all layout tests to crash in the iOS WK1 Debug configuration.
1424
1425         * WebView/WebPreferences.mm: (+[WebPreferences _switchNetworkLoaderToNewTestingSession]):
1426         Take the Web thread lock before calling NetworkStorageSession::switchToNewTestingSession().
1427
1428 2016-12-22  Andy Estes  <aestes@apple.com>
1429
1430         Make WebCore::EditorInsertAction an enum class
1431         https://bugs.webkit.org/show_bug.cgi?id=166424
1432
1433         Reviewed by Brent Fulgham.
1434
1435         * WebCoreSupport/WebEditorClient.mm:
1436         (kit):
1437
1438 2016-12-21  Beth Dakin  <bdakin@apple.com>
1439
1440         Holding down on candidates in the TouchBar should show panel on screen
1441         https://bugs.webkit.org/show_bug.cgi?id=166367
1442         -and corresponding-
1443         <rdar://problem/28479236>
1444
1445         Reviewed by Tim Horton.
1446
1447         Stray whitespace.
1448         * WebCoreSupport/WebEditorClient.mm:
1449         (WebEditorClient::handleRequestedCandidates):
1450
1451         Call the version of setCandidates: that takes a rect. We need to keep the helper 
1452         function in WK1 (unlike WK2) since we also use it for testing.
1453         * WebView/WebView.mm:
1454         (-[WebView showCandidates:forString:inRect:forSelectedRange:view:completionHandler:]):
1455
1456 2016-12-20  Dean Jackson  <dino@apple.com>
1457
1458         Remove INDIE_UI
1459         https://bugs.webkit.org/show_bug.cgi?id=165881
1460         <rdar://problem/29672532>
1461
1462         Reviewed by Simon Fraser.
1463
1464         The Indie UI work has been discontinued.
1465
1466         * Configurations/FeatureDefines.xcconfig:
1467
1468 2016-12-19  Yusuke Suzuki  <utatane.tea@gmail.com>
1469
1470         [ES6] Enable ES6 Modules
1471         https://bugs.webkit.org/show_bug.cgi?id=165849
1472
1473         Reviewed by Geoffrey Garen.
1474
1475         * WebView/WebPreferenceKeysPrivate.h:
1476         * WebView/WebPreferences.mm:
1477         (+[WebPreferences initialize]):
1478         (-[WebPreferences es6ModulesEnabled]): Deleted.
1479         (-[WebPreferences setES6ModulesEnabled:]): Deleted.
1480         * WebView/WebPreferencesPrivate.h:
1481         * WebView/WebView.mm:
1482         (-[WebView _preferencesChanged:]):
1483
1484 2016-12-16  Dave Hyatt  <hyatt@apple.com>
1485
1486         [CSS Values] Make separate wrapper classes for the deprecated CSS Values OM
1487         https://bugs.webkit.org/show_bug.cgi?id=165968
1488
1489         Reviewed by Andreas Kling.
1490
1491         * DOM/DOMCSS.mm:
1492         (kitClass):
1493         * DOM/DOMCSSPrimitiveValue.mm:
1494         (-[DOMCSSPrimitiveValue getCounterValue]):
1495         (-[DOMCSSPrimitiveValue getRectValue]):
1496         (kit):
1497         * DOM/DOMCSSPrimitiveValueInternal.h:
1498         * DOM/DOMCSSStyleDeclaration.mm:
1499         * DOM/DOMCSSValue.mm:
1500         (kit):
1501         * DOM/DOMCSSValueInternal.h:
1502         * DOM/DOMCSSValueList.mm:
1503         * DOM/DOMCounter.mm:
1504         (kit):
1505         * DOM/DOMCounterInternal.h:
1506         * DOM/DOMRGBColor.mm:
1507         (kit):
1508         * DOM/DOMRGBColorInternal.h:
1509         * DOM/DOMRect.mm:
1510         (kit):
1511         * DOM/DOMRectInternal.h:
1512         * DOM/DOMUtility.mm:
1513         (createDOMWrapper):
1514
1515 2016-12-16  Chris Dumez  <cdumez@apple.com>
1516
1517         HTML form validation bubble should be dismissed on navigation
1518         https://bugs.webkit.org/show_bug.cgi?id=165960
1519         <rdar://problem/29668086>
1520
1521         Reviewed by Simon Fraser.
1522
1523         Dismiss HTML form validation bubble on top-level navigation on Mac WK1.
1524
1525         * WebView/WebView.mm:
1526         (-[WebView _didStartProvisionalLoadForFrame:]):
1527
1528 2016-12-15  Darin Adler  <darin@apple.com>
1529
1530         Use asString instead of toWTFString, toString, or getString when we already checked isString
1531         https://bugs.webkit.org/show_bug.cgi?id=165895
1532
1533         Reviewed by Yusuke Suzuki.
1534
1535         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1536         (WebKit::NetscapePluginInstanceProxy::addValueToArray): Use asString/value instead of
1537         toWTFString.
1538         * WebView/WebView.mm:
1539         (aeDescFromJSValue): Use asString/value instead of getString.
1540
1541 2016-12-15  Chris Dumez  <cdumez@apple.com>
1542
1543         Make sure HTML validation bubble's state is updated after layout
1544         https://bugs.webkit.org/show_bug.cgi?id=165922
1545         <rdar://problem/29694730>
1546
1547         Reviewed by Simon Fraser.
1548
1549         Make sure HTML validation bubble's state is updated after layout.
1550         In particular, if the validation bubble's associated element has
1551         moved or is no longer visible, we now hide the bubble.
1552
1553         * WebCoreSupport/WebValidationMessageClient.h:
1554         * WebCoreSupport/WebValidationMessageClient.mm:
1555         (WebValidationMessageClient::showValidationMessage):
1556         (WebValidationMessageClient::hideValidationMessage):
1557         (WebValidationMessageClient::updateValidationBubbleStateIfNeeded):
1558
1559 2016-12-15  Chris Dumez  <cdumez@apple.com>
1560
1561         Move charCode / keyCode / which attributes from UIEvent to KeyboardEvent
1562         https://bugs.webkit.org/show_bug.cgi?id=165904
1563
1564         Reviewed by Sam Weinig.
1565
1566         Update ObjC bindings so they keep building.
1567
1568         * DOM/DOMUIEvent.mm:
1569         (-[DOMUIEvent keyCode]):
1570         (-[DOMUIEvent charCode]):
1571
1572 2016-12-15  Andreas Kling  <akling@apple.com>
1573
1574         Always clear RenderLayer backing stores when going into page cache.
1575         <https://webkit.org/b/165901>
1576
1577         Reviewed by Simon Fraser.
1578
1579         * WebView/WebView.mm:
1580         (+[WebView _setCacheModel:]):
1581
1582 2016-12-12  Alex Christensen  <achristensen@webkit.org>
1583
1584         Remove unused workaround for Silverlight
1585         https://bugs.webkit.org/show_bug.cgi?id=165773
1586
1587         Reviewed by Dean Jackson.
1588
1589         * Plugins/WebNetscapePluginView.mm:
1590         (-[WebNetscapePluginView _workaroundSilverlightFullscreenBug:]): Deleted.
1591         This code was introduced in January 2010.  Microsoft fixed their bug shortly thereafter.
1592         Allowing 6 years for users to update Silverlight is more than enough.
1593         Safari doesn't even use WebKit1 for this any more.
1594         I need this to be removed because this is the only non-WebGL code that needs to link against
1595         the OpenGL framework, and I'm changing how that is done to link only through ANGLE instead.
1596
1597 2016-12-12  Chris Dumez  <cdumez@apple.com>
1598
1599         Document.visibilityState should use an IDL string enumeration
1600         https://bugs.webkit.org/show_bug.cgi?id=165774
1601
1602         Reviewed by Daniel Bates.
1603
1604         * DOM/DOMDocument.mm:
1605         (-[DOMDocument visibilityState]):
1606         * WebView/WebView.mm:
1607         (kit):
1608
1609 2016-12-12  Jer Noble  <jer.noble@apple.com>
1610
1611         Remove implementation of legacy Mozilla-based Fullscreen API.
1612         https://bugs.webkit.org/show_bug.cgi?id=165689
1613         <rdar://problem/29603053>
1614
1615         Reviewed by Eric Carlson.
1616
1617         * DOM/DOMElement.mm:
1618         (-[DOMElement webkitRequestFullScreen:]):
1619
1620 2016-12-10  Filip Pizlo  <fpizlo@apple.com>
1621
1622         The DOM should have an advancing wavefront opaque root barrier
1623         https://bugs.webkit.org/show_bug.cgi?id=165712
1624
1625         Reviewed by Yusuke Suzuki.
1626         
1627         Propagate the JSDOMWindowBase::commonVM() -> commonVM() change.
1628
1629         * Misc/WebCoreStatistics.mm:
1630         (+[WebCoreStatistics javaScriptObjectsCount]):
1631         (+[WebCoreStatistics javaScriptGlobalObjectsCount]):
1632         (+[WebCoreStatistics javaScriptProtectedObjectsCount]):
1633         (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]):
1634         (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]):
1635         (+[WebCoreStatistics javaScriptObjectTypeCounts]):
1636         (+[WebCoreStatistics shouldPrintExceptions]):
1637         (+[WebCoreStatistics setShouldPrintExceptions:]):
1638         (+[WebCoreStatistics memoryStatistics]):
1639         (+[WebCoreStatistics javaScriptReferencedObjectsCount]):
1640         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1641         (identifierFromIdentifierRep):
1642         * Plugins/Hosted/ProxyInstance.mm:
1643         (WebKit::ProxyInstance::getPropertyNames):
1644         * Plugins/WebNetscapePluginStream.mm:
1645         (WebNetscapePluginStream::wantsAllStreams):
1646         * Plugins/WebNetscapePluginView.mm:
1647         (-[WebNetscapePluginView sendEvent:isDrawRect:]):
1648         (-[WebNetscapePluginView privateBrowsingModeDidChange]):
1649         (-[WebNetscapePluginView setWindowIfNecessary]):
1650         (-[WebNetscapePluginView createPluginScriptableObject]):
1651         (-[WebNetscapePluginView getFormValue:]):
1652         (-[WebNetscapePluginView evaluateJavaScriptPluginRequest:]):
1653         (-[WebNetscapePluginView webFrame:didFinishLoadWithReason:]):
1654         (-[WebNetscapePluginView loadPluginRequest:]):
1655         (-[WebNetscapePluginView _printedPluginBitmap]):
1656         * Plugins/WebPluginController.mm:
1657         (-[WebPluginController plugInViewWithArguments:fromPluginPackage:]):
1658         (-[WebPluginController stopOnePlugin:]):
1659         (-[WebPluginController stopOnePluginForPageCache:]):
1660         (-[WebPluginController destroyOnePlugin:]):
1661         (-[WebPluginController startAllPlugins]):
1662         (-[WebPluginController addPlugin:]):
1663
1664 2016-12-09  Dave Hyatt  <hyatt@apple.com>
1665
1666         [CSS Parser] Remove the old CSS Parser
1667         https://bugs.webkit.org/show_bug.cgi?id=165645
1668
1669         Reviewed by Daniel Bates.
1670
1671         * DOM/DOMCSS.mm:
1672         (kitClass):
1673         * DOM/DOMCSSRule.h:
1674
1675 2016-12-09  Eric Carlson  <eric.carlson@apple.com>
1676
1677         Annotate MediaStream and WebRTC idl with EnabledAtRuntime flag
1678         https://bugs.webkit.org/show_bug.cgi?id=165251
1679
1680         Reviewed by Dean Jackson.
1681
1682         Based on a patch by Dr Alex Gouaillard <agouaillard@gmail.com>
1683
1684         * WebView/WebPreferenceKeysPrivate.h: Add MediaStream and PeerConnection preferences.
1685         * WebView/WebPreferences.mm:
1686         (+[WebPreferences initialize]):
1687         (-[WebPreferences mediaStreamEnabled]):
1688         (-[WebPreferences setMediaStreamEnabled:]):
1689         (-[WebPreferences peerConnectionEnabled]):
1690         (-[WebPreferences setPeerConnectionEnabled:]):
1691         * WebView/WebPreferencesPrivate.h:
1692         * WebView/WebView.mm:
1693         (-[WebView _preferencesChanged:]):
1694
1695 2016-12-09  Ryosuke Niwa  <rniwa@webkit.org>
1696
1697         Don’t expose pointer lock in WebKit1 Objective-C API
1698         https://bugs.webkit.org/show_bug.cgi?id=165692
1699
1700         Reviewed by Simon Fraser.
1701
1702         * DOM/DOMDocument.mm:
1703         (-[DOMDocument pointerLockElement]): Deleted.
1704         (-[DOMDocument exitPointerLock]): Deleted.
1705         * DOM/DOMElement.mm:
1706         (-[DOMElement requestPointerLock]): Deleted.
1707         * DOM/DOMMouseEvent.mm:
1708         (-[DOMMouseEvent movementX]): Deleted.
1709         (-[DOMMouseEvent movementY]): Deleted.
1710
1711 2016-12-09  Ryosuke Niwa  <rniwa@webkit.org>
1712
1713         document.webkitFullscreenElement leaks elements inside a shadow tree
1714         https://bugs.webkit.org/show_bug.cgi?id=158471
1715
1716         Reviewed by Chris Dumez.
1717
1718         Use the API for bindings to avoid exposing nodes inside a shadow tree.
1719
1720         * DOM/DOMDocument.mm:
1721         (-[DOMDocument webkitCurrentFullScreenElement]):
1722         (-[DOMDocument webkitFullscreenElement]):
1723
1724 2016-12-09  Beth Dakin  <bdakin@apple.com>
1725
1726         Password fields should not show the emoji button in TouchBar
1727         https://bugs.webkit.org/show_bug.cgi?id=165673
1728         -and corresponding-
1729         rdar://problem/29235739
1730
1731         Reviewed by Wenson Hsieh.
1732
1733         This patch adds a new ivar for the password touch bar and password 
1734         candidateListTouchBarItem. Since this TouchBar will actually have a different set 
1735         of identifiers than the plain text TouchBar, it should just have its own variable.
1736
1737         The candidate list should be the only item for passwords.
1738         * WebView/WebView.mm:
1739         (-[WebView _passwordTextTouchBarDefaultItemIdentifiers]):
1740
1741         Account for _passwordTextTouchBar.
1742         (-[WebView didChangeAutomaticTextCompletion:]):
1743         (-[WebView setUpTextTouchBar:]):
1744         (-[WebView textTouchBar]):
1745
1746         The empty candidates array is not needed. We can just set @[ ] as the candidates 
1747         for the _passwordTextCandidateListTouchBarItem. Safe guards already exist in the 
1748         other parts of the code to prevent us from requesting or setting other candidates 
1749         when in a password field. 
1750         (-[WebView updateTextTouchBar]):
1751
1752         Account for _passwordTextTouchBar.
1753         (-[WebView candidateList]):
1754         * WebView/WebViewData.h:
1755
1756 2016-12-08  Filip Pizlo  <fpizlo@apple.com>
1757
1758         Enable SharedArrayBuffer, remove the flag
1759         https://bugs.webkit.org/show_bug.cgi?id=165614
1760
1761         Rubber stamped by Geoffrey Garen.
1762
1763         * WebView/WebPreferencesPrivate.h:
1764
1765 2016-12-07  Dean Jackson  <dino@apple.com>
1766
1767         Remove runtime toggle for pointer-lock
1768         https://bugs.webkit.org/show_bug.cgi?id=165577
1769         <rdar://problems/29566996>
1770
1771         Reviewed by Jon Lee.
1772
1773         Remove any runtime calls to check if pointer-lock is enabled. It's
1774         either compiled in or out.
1775
1776         * WebView/WebPreferenceKeysPrivate.h:
1777         * WebView/WebPreferences.mm:
1778         (-[WebPreferences pointerLockEnabled]): Deleted.
1779         (-[WebPreferences setPointerLockEnabled:]): Deleted.
1780         * WebView/WebPreferencesPrivate.h:
1781         * WebView/WebView.mm:
1782         (-[WebView _preferencesChanged:]):
1783
1784 2016-12-06  Alexey Proskuryakov  <ap@apple.com>
1785
1786         Correct SDKROOT values in xcconfig files
1787         https://bugs.webkit.org/show_bug.cgi?id=165487
1788         rdar://problem/29539209
1789
1790         Reviewed by Dan Bernstein.
1791
1792         Fix suggested by Dan Bernstein.
1793
1794         * Configurations/DebugRelease.xcconfig:
1795
1796 2016-12-05  Simon Fraser  <simon.fraser@apple.com>
1797
1798         Improve the behavior of scroll-into-view when the target is inside position:fixed
1799         https://bugs.webkit.org/show_bug.cgi?id=165354
1800
1801         Reviewed by Zalan Bujtas.
1802
1803         Plumb through 'insideFixed'. We don't get compute it, so behavior from
1804         these call sites won't change.
1805
1806         * WebView/WebFrame.mm:
1807         (-[WebFrame _scrollDOMRangeToVisible:]):
1808         (-[WebFrame _scrollDOMRangeToVisible:withInset:]):
1809
1810 2016-12-06  Simon Fraser  <simon.fraser@apple.com>
1811
1812         Enable visual viewports by default on Mac, and iOS Wk2
1813         https://bugs.webkit.org/show_bug.cgi?id=165452
1814
1815         Reviewed by Zalan Bujtas.
1816
1817         Turn visual viewports on by default for WK1 on Mac.
1818
1819         * WebView/WebPreferences.mm:
1820         (+[WebPreferences initialize]):
1821
1822 2016-12-05  Dean Jackson  <dino@apple.com>
1823
1824         pointer lock needs to be feature detectable
1825         https://bugs.webkit.org/show_bug.cgi?id=165426
1826         <rdar://problem/29486715>
1827
1828         Reviewed by Antoine Quint.
1829
1830         Set the RuntimeEnabledFeature as preferences
1831         change.
1832
1833         * WebView/WebView.mm:
1834         (-[WebView _preferencesChanged:]):
1835
1836 2016-12-05  Ryan Haddad  <ryanhaddad@apple.com>
1837
1838         Unreviewed, rolling out r209299.
1839
1840         This change appears to have caused LayoutTest failures on
1841         Sierra WK1.
1842
1843         Reverted changeset:
1844
1845         "Improve the behavior of scroll-into-view when the target is
1846         inside position:fixed"
1847         https://bugs.webkit.org/show_bug.cgi?id=165354
1848         http://trac.webkit.org/changeset/209299
1849
1850 2016-12-02  Simon Fraser  <simon.fraser@apple.com>
1851
1852         Improve the behavior of scroll-into-view when the target is inside position:fixed
1853         https://bugs.webkit.org/show_bug.cgi?id=165354
1854
1855         Reviewed by Zalan Bujtas.
1856
1857         Plumb through 'insideFixed'. We don't get compute it, so behavior from
1858         these call sites won't change.
1859
1860         * WebView/WebFrame.mm:
1861         (-[WebFrame _scrollDOMRangeToVisible:]):
1862         (-[WebFrame _scrollDOMRangeToVisible:withInset:]):
1863
1864 2016-12-02  Andy Estes  <aestes@apple.com>
1865
1866         [Cocoa] Adopt the PRODUCT_BUNDLE_IDENTIFIER build setting
1867         https://bugs.webkit.org/show_bug.cgi?id=164492
1868
1869         Reviewed by Dan Bernstein.
1870
1871         * Configurations/WebKitLegacy.xcconfig: Set PRODUCT_BUNDLE_IDENTIFIER to
1872         com.apple.$(PRODUCT_NAME:rfc1034identifier).
1873         * Info.plist: Changed CFBundleIdentifier's value from com.apple.${PRODUCT_NAME} to
1874         ${PRODUCT_BUNDLE_IDENTIFIER}.
1875
1876 2016-12-02  Chris Dumez  <cdumez@apple.com>
1877
1878         Regression(r209252): HTML interactive validation should not be enabled on iOS WK1 yet
1879         https://bugs.webkit.org/show_bug.cgi?id=165328
1880
1881         Reviewed by Simon Fraser.
1882
1883         Only enable HTML interactive form validation on Mac WK1, not iOS WK1.
1884
1885         * WebView/WebViewData.mm:
1886         (-[WebViewPrivate init]):
1887
1888 2016-12-02  Chris Dumez  <cdumez@apple.com>
1889
1890         [Mac][WK1] Implement new HTML interactive form validation user interface
1891         https://bugs.webkit.org/show_bug.cgi?id=164483
1892
1893         Reviewed by Simon Fraser.
1894
1895         Implement new HTML interactive form validation user interface on Mac
1896         WK1 and enable it by default.
1897
1898         * WebCoreSupport/WebValidationMessageClient.h: Added.
1899         * WebCoreSupport/WebValidationMessageClient.mm: Added.
1900         (WebValidationMessageClient::WebValidationMessageClient):
1901         (WebValidationMessageClient::~WebValidationMessageClient):
1902         (WebValidationMessageClient::showValidationMessage):
1903         (WebValidationMessageClient::hideValidationMessage):
1904         (WebValidationMessageClient::isValidationMessageVisible):
1905         * WebView/WebHTMLView.mm:
1906         (-[WebHTMLView _frameOrBoundsChanged]):
1907         * WebView/WebView.mm:
1908         (-[WebView _commonInitializationWithFrameName:groupName:]):
1909         (-[WebView _willStartScrollingOrZooming]):
1910         (-[WebView _contentsOfUserInterfaceItem:]):
1911         (-[WebView _scaleWebView:atOrigin:]):
1912         (-[WebView _didScrollDocumentInFrameView:]):
1913         (-[WebView _setZoomMultiplier:isTextOnly:]):
1914         (-[WebView showFormValidationMessage:withAnchorRect:]):
1915         (-[WebView hideFormValidationMessage]):
1916         * WebView/WebViewData.h:
1917         * WebView/WebViewData.mm:
1918         (-[WebViewPrivate init]):
1919         * WebView/WebViewInternal.h:
1920         * WebView/WebViewPrivate.h:
1921
1922 2016-12-01  Jiewen Tan  <jiewen_tan@apple.com>
1923
1924         Add a runtime flag for SubtleCrypto
1925         https://bugs.webkit.org/show_bug.cgi?id=164982
1926
1927         Reviewed by Brent Fulgham.
1928
1929         * WebView/WebPreferenceKeysPrivate.h:
1930         * WebView/WebPreferences.mm:
1931         (+[WebPreferences initialize]):
1932         (-[WebPreferences subtleCryptoEnabled]):
1933         (-[WebPreferences setSubtleCryptoEnabled:]):
1934         * WebView/WebPreferencesPrivate.h:
1935         * WebView/WebView.mm:
1936         (-[WebView _preferencesChanged:]):
1937
1938 2016-11-30  Said Abou-Hallawa  <sabouhallawa@apple.com>
1939
1940         Add separate settings and preferences to enable/disable async decoding for large images and animated images
1941         https://bugs.webkit.org/show_bug.cgi?id=165177
1942
1943         Reviewed by Simon Fraser.
1944         
1945         Hook up the async image decoding settings for WebKit1.
1946
1947         * WebView/WebPreferenceKeysPrivate.h:
1948         * WebView/WebPreferences.mm:
1949         (+[WebPreferences initialize]):
1950         (-[WebPreferences largeImageAsyncDecodingEnabled]):
1951         (-[WebPreferences setLargeImageAsyncDecodingEnabled:]):
1952         (-[WebPreferences animatedImageAsyncDecodingEnabled]):
1953         (-[WebPreferences setAnimatedImageAsyncDecodingEnabled:]):
1954         (-[WebPreferences asyncImageDecodingEnabled]): Deleted.
1955         (-[WebPreferences setAsyncImageDecodingEnabled:]): Deleted.
1956         * WebView/WebPreferencesPrivate.h:
1957         * WebView/WebView.mm:
1958         (-[WebView _preferencesChanged:]):
1959
1960 2016-11-29  Andy Estes  <aestes@apple.com>
1961
1962         [Cocoa] Enable two clang warnings recommended by Xcode
1963         https://bugs.webkit.org/show_bug.cgi?id=164498
1964
1965         Reviewed by Mark Lam.
1966
1967         * Configurations/Base.xcconfig: Enabled CLANG_WARN_INFINITE_RECURSION and CLANG_WARN_SUSPICIOUS_MOVE.
1968
1969 2016-11-26  Yusuke Suzuki  <utatane.tea@gmail.com>
1970
1971         [WTF] Import std::optional reference implementation as WTF::Optional
1972         https://bugs.webkit.org/show_bug.cgi?id=164199
1973
1974         Reviewed by Saam Barati and Sam Weinig.
1975
1976         Use WTF::Optional::value_or.
1977
1978         * DOM/DOMHTMLOptionsCollection.mm:
1979         (-[DOMHTMLOptionsCollection add:index:]):
1980         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1981         (WebKit::NetscapePluginInstanceProxy::evaluate):
1982         * Plugins/WebNetscapePluginView.mm:
1983         (-[WebNetscapePluginView sendEvent:isDrawRect:]):
1984         * WebCoreSupport/WebFrameLoaderClient.h:
1985         * WebCoreSupport/WebFrameLoaderClient.mm:
1986         (WebFrameLoaderClient::dispatchDidCommitLoad):
1987         * WebCoreSupport/WebPaymentCoordinatorClient.h:
1988         * WebCoreSupport/WebPaymentCoordinatorClient.mm:
1989         (WebPaymentCoordinatorClient::completeShippingMethodSelection):
1990         (WebPaymentCoordinatorClient::completeShippingContactSelection):
1991         (WebPaymentCoordinatorClient::completePaymentMethodSelection):
1992         * WebCoreSupport/WebSecurityOrigin.mm:
1993         (-[WebSecurityOrigin port]):
1994         * WebView/WebHTMLView.mm:
1995         (toAction):
1996         (toTag):
1997
1998 2016-11-26  Sam Weinig  <sam@webkit.org>
1999
2000         Convert IntersectionObserver over to using RuntimeEnabledFeatures so it can be properly excluded from script
2001         https://bugs.webkit.org/show_bug.cgi?id=164965
2002
2003         Reviewed by Simon Fraser.
2004
2005         * WebView/WebPreferenceKeysPrivate.h:
2006         * WebView/WebPreferences.mm:
2007         (-[WebPreferences intersectionObserverEnabled]):
2008         (-[WebPreferences setIntersectionObserverEnabled:]):
2009         * WebView/WebPreferencesPrivate.h:
2010         * WebView/WebView.mm:
2011         (-[WebView _preferencesChanged:]):
2012         Add a preference, defaulting to off, for enabling IntersectionObserver.
2013
2014 2016-11-22  Dan Bernstein  <mitz@apple.com>
2015
2016         [Mac] In Legacy WebKit, pressing an arrow key in editable content doesn’t hide the mouse cursor
2017         https://bugs.webkit.org/show_bug.cgi?id=165036
2018         <rdar://problem/5708580>
2019
2020         Reviewed by Alexey Proskuryakov.
2021
2022         * WebView/WebHTMLView.mm:
2023         (-[WebHTMLView performKeyEquivalent:]): Hide the cursor if WebCore handled the event,
2024           similarly to what we do in -keyDown: and to what WKWebView does with all key events.
2025
2026 2016-11-21  Alex Christensen  <achristensen@webkit.org>
2027
2028         Fix Sierra CMake build after r208452
2029         https://bugs.webkit.org/show_bug.cgi?id=164437
2030
2031         * WebView/WebView.mm:
2032         (-[WebView updateMediaTouchBar]):
2033         I haven't enabled VIDEO_PRESENTATION_MODE in the CMake build yet.
2034         It's needed for playbackSessionInterface to exist.
2035
2036 2016-11-18  Enrica Casucci  <enrica@apple.com>
2037
2038         Refactor drag and drop for WebKit2 to encode DragData message exchange.
2039         https://bugs.webkit.org/show_bug.cgi?id=164945
2040
2041         Reviewed by Tim Horton.
2042
2043         * WebCoreSupport/WebDragClient.h:
2044         * WebCoreSupport/WebDragClient.mm:
2045         (WebDragClient::actionMaskForDrag):
2046         (WebDragClient::willPerformDragDestinationAction):
2047
2048 2016-11-18  Jeremy Jones  <jeremyj@apple.com>
2049
2050         Add runtime flag to enable pointer lock. Enable pointer lock feature for mac.
2051         https://bugs.webkit.org/show_bug.cgi?id=163801
2052
2053         Reviewed by Simon Fraser.
2054
2055         Plumb through PointerLockEnabled setting.
2056
2057         * Configurations/FeatureDefines.xcconfig:
2058         * WebCoreSupport/WebChromeClient.mm:
2059         (WebChromeClient::requestPointerUnlock):
2060         * WebView/WebPreferenceKeysPrivate.h:
2061         * WebView/WebPreferences.mm:
2062         (-[WebPreferences pointerLockEnabled]):
2063         (-[WebPreferences setPointerLockEnabled:]):
2064         * WebView/WebPreferencesPrivate.h:
2065         * WebView/WebView.mm:
2066         (-[WebView _preferencesChanged:]):
2067
2068 2016-11-17  Dan Bernstein  <mitz@apple.com>
2069
2070         Try to fix some non-macOS builds.
2071
2072         * WebView/WebView.mm:
2073
2074 2016-11-16  Dave Hyatt  <hyatt@apple.com>
2075
2076         [CSS Parser] Add @supports, @keyframe and media query parsing options
2077         https://bugs.webkit.org/show_bug.cgi?id=164821
2078
2079         Reviewed by Sam Weinig and Zalan Bujtas.
2080
2081         Fix up the create call now that fallback descriptor syntax is gone.
2082
2083         * DOM/DOM.mm:
2084         (-[DOMHTMLLinkElement _mediaQueryMatches]):
2085
2086 2016-11-17  Saam Barati  <sbarati@apple.com>
2087
2088         Remove async/await compile time flag and enable tests
2089         https://bugs.webkit.org/show_bug.cgi?id=164828
2090         <rdar://problem/28639334>
2091
2092         Reviewed by Yusuke Suzuki.
2093
2094         * Configurations/FeatureDefines.xcconfig:
2095
2096 2016-11-17  Yusuke Suzuki  <utatane.tea@gmail.com>
2097
2098         [JSC] WTF::TemporaryChange with WTF::SetForScope
2099         https://bugs.webkit.org/show_bug.cgi?id=164761
2100
2101         Reviewed by Saam Barati.
2102
2103         * WebView/WebView.mm:
2104         (-[WebView updateTextTouchBar]):
2105
2106 2016-11-16  Yusuke Suzuki  <utatane.tea@gmail.com>
2107
2108         [ES6][WebCore] Change ES6_MODULES compile time flag to runtime flag
2109         https://bugs.webkit.org/show_bug.cgi?id=164827
2110
2111         Reviewed by Ryosuke Niwa.
2112
2113         * Configurations/FeatureDefines.xcconfig:
2114         * WebView/WebPreferenceKeysPrivate.h:
2115         * WebView/WebPreferences.mm:
2116         (+[WebPreferences initialize]):
2117         (-[WebPreferences es6ModulesEnabled]):
2118         (-[WebPreferences setES6ModulesEnabled:]):
2119         * WebView/WebPreferencesPrivate.h:
2120         * WebView/WebView.mm:
2121         (-[WebView _preferencesChanged:]):
2122
2123 2016-11-14  Alex Christensen  <achristensen@webkit.org>
2124
2125         Move SecurityOrigin::createFromDatabaseIdentifier to SecurityOriginData
2126         https://bugs.webkit.org/show_bug.cgi?id=164720
2127
2128         Reviewed by Brady Eidson.
2129
2130         * Storage/WebDatabaseManager.mm:
2131         (-[WebDatabaseManager origins]):
2132         (-[WebDatabaseManager databasesWithOrigin:]):
2133         (-[WebDatabaseManager deleteOrigin:]):
2134         (-[WebDatabaseManager deleteDatabase:withOrigin:]):
2135         * Storage/WebDatabaseManagerClient.h:
2136         * Storage/WebDatabaseManagerClient.mm:
2137         (DidModifyOriginData::dispatchToMainThread):
2138         (DidModifyOriginData::DidModifyOriginData):
2139         (WebDatabaseManagerClient::dispatchDidModifyOrigin):
2140         (WebDatabaseManagerClient::dispatchDidModifyDatabase):
2141         * Storage/WebDatabaseQuotaManager.mm:
2142         (-[WebDatabaseQuotaManager usage]):
2143         (-[WebDatabaseQuotaManager quota]):
2144         (-[WebDatabaseQuotaManager setQuota:]):
2145         * Storage/WebStorageManager.mm:
2146         (-[WebStorageManager origins]):
2147         (-[WebStorageManager deleteOrigin:]):
2148         * Storage/WebStorageTrackerClient.h:
2149         * Storage/WebStorageTrackerClient.mm:
2150         (WebStorageTrackerClient::dispatchDidModifyOrigin):
2151         * WebCoreSupport/WebSecurityOrigin.mm:
2152         (-[WebSecurityOrigin usage]):
2153         (-[WebSecurityOrigin quota]):
2154         (-[WebSecurityOrigin setQuota:]):
2155
2156 2016-11-13  Darin Adler  <darin@apple.com>
2157
2158         Fix exception handling in SQL database code, streamline and update code
2159         https://bugs.webkit.org/show_bug.cgi?id=164685
2160
2161         Reviewed by Sam Weinig.
2162
2163         * Storage/WebDatabaseManager.mm:
2164         (-[WebDatabaseManager origins]): Updated to use DatabaseTracker and pass
2165         a reference.
2166         (-[WebDatabaseManager databasesWithOrigin:]): Ditto.
2167         (-[WebDatabaseManager detailsForDatabase:withOrigin:]): Pass reference,
2168         but continue to use DatabaseManager.
2169         (-[WebDatabaseManager deleteOrigin:]): Use DatabaseTracker and pass a
2170         reference.
2171         (-[WebDatabaseManager deleteDatabase:withOrigin:]): Ditto.
2172
2173         * Storage/WebDatabaseManagerClient.h: Updated to take references.
2174         * Storage/WebDatabaseManagerClient.mm:
2175         (WebDatabaseManagerClient::WebDatabaseManagerClient): Initialize data
2176         members in the class definition.
2177         (DidModifyOriginData::dispatchToMainThread): Take references.
2178         (DidModifyOriginData::DidModifyOriginData): Ditto.
2179         (WebDatabaseManagerClient::dispatchDidModifyOrigin): Ditto.
2180         (WebDatabaseManagerClient::dispatchDidModifyDatabase): Ditto.
2181         (WebDatabaseManagerClient::dispatchDidAddNewOrigin): Ditto. Also use
2182         DatabaseTracker::singleton instead of tracker.
2183
2184         * Storage/WebDatabaseQuotaManager.mm:
2185         (-[WebDatabaseQuotaManager initWithOrigin:]): Reject nil pointer argument.
2186         (-[WebDatabaseQuotaManager usage]): Use reference instead of pointer.
2187         (-[WebDatabaseQuotaManager quota]): Ditto.
2188         (-[WebDatabaseQuotaManager setQuota:]): Ditto.
2189         * WebCoreSupport/WebSecurityOrigin.mm:
2190         (-[WebSecurityOrigin initWithURL:]): Tweaked code a bit.
2191         (-[WebSecurityOrigin usage]): Use DatabaseTracker and pass a reference.
2192         (-[WebSecurityOrigin quota]): Ditto.
2193         (-[WebSecurityOrigin setQuota:]): Ditto.
2194         * WebView/WebFrame.mm:
2195         (-[WebFrame _cacheabilityDictionary]): Pass a reference.
2196
2197 2016-11-12  Darin Adler  <darin@apple.com>
2198
2199         Remove a few assorted uses of ExceptionCode
2200         https://bugs.webkit.org/show_bug.cgi?id=164683
2201
2202         Reviewed by Chris Dumez.
2203
2204         * DOM/DOMDOMImplementation.mm:
2205         (-[DOMImplementation createDocumentType:publicId:systemId:]):
2206         Use raiseOnDOMError instead of much longer hand written equivalent.
2207         (-[DOMImplementation createDocument:qualifiedName:doctype:]): Ditto.
2208
2209         * DOM/DOMDocument.mm:
2210         (-[DOMDocument createEntityReference:]): Use raiseNotSupportedErrorException
2211         so we are not using a specific exception code.
2212
2213         * DOM/DOMHTMLOptionsCollection.mm:
2214         (-[DOMHTMLOptionsCollection add:index:]): Use raiseOnDOMError instead of
2215         much longer hand written equivalent.
2216         * DOM/DOMHTMLSelectElement.mm:
2217         (-[DOMHTMLSelectElement add:before:]): Ditto. Also removed unneeded return
2218         statement after calling a "no return" function.
2219
2220         * DOM/ExceptionHandlers.h: Removed overloads of raiseDOMException and
2221         raiseOnDOMError functions that take ExceptionCode; keep the ones that take
2222         Exception and ExceptionOr. Renamed the other overload of raiseDOMException
2223         to raiseDOMErrorException; it is only used as the non-inline implementation
2224         part of the inline raiseOnDOMError function.
2225         * DOM/ExceptionHandlers.mm:
2226         (raiseDOMErrorException): Renamed. Made the ExceptionCode overload be local
2227         to this source file instead of in the header.
2228         (raiseTypeErrorException): Updated for name change.
2229         (raiseNotSupportedErrorException): Added.
2230
2231 2016-11-11  Ryosuke Niwa  <rniwa@webkit.org>
2232
2233         Hovering over a slotted Text node clears hover state
2234         https://bugs.webkit.org/show_bug.cgi?id=164002
2235         <rdar://problem/29040471>
2236
2237         Reviewed by Simon Fraser.
2238
2239         * WebView/WebImmediateActionController.mm:
2240         (-[WebImmediateActionController performHitTestAtPoint:]):
2241
2242 2016-11-11  Wenson Hsieh  <wenson_hsieh@apple.com>
2243
2244         [WK2] autocorrect and autocapitalize attributes do not work in contenteditable elements
2245         https://bugs.webkit.org/show_bug.cgi?id=164538
2246         <rdar://problem/8418711>
2247
2248         Reviewed by Ryosuke Niwa.
2249
2250         Account for renaming HTMLElement::autocorrect to HTMLElement::shouldAutocorrect, as well as moving
2251         WebAutocapitalizeType to WebKit from WebCore. Additionally, moves the -autocorrect and -autocapitalize SPIs out
2252         of HTML(Input|Form|TextArea)ElementPrivate.h and into HTMLElementPrivate.h. This also means removing redundant
2253         code for interfacing with the unwrapped HTMLElement's autocorrect and autocapitalize attributes.
2254
2255         * DOM/DOMHTML.mm:
2256         (webAutocapitalizeType):
2257         (-[DOMHTMLInputElement _autocapitalizeType]):
2258         (-[DOMHTMLTextAreaElement _autocapitalizeType]):
2259         * DOM/DOMHTMLElement.mm:
2260         (-[DOMHTMLElement autocorrect]):
2261         (-[DOMHTMLElement setAutocorrect:]):
2262         (-[DOMHTMLElement autocapitalize]):
2263         (-[DOMHTMLElement setAutocapitalize:]):
2264         * DOM/DOMHTMLElementPrivate.h: Copied from Source/WebCore/html/Autocapitalize.h.
2265         * DOM/DOMHTMLFormElement.mm:
2266         (-[DOMHTMLFormElement autocorrect]): Deleted.
2267         (-[DOMHTMLFormElement setAutocorrect:]): Deleted.
2268         (-[DOMHTMLFormElement autocapitalize]): Deleted.
2269         (-[DOMHTMLFormElement setAutocapitalize:]): Deleted.
2270         * DOM/DOMHTMLInputElement.mm:
2271         (-[DOMHTMLInputElement autocorrect]): Deleted.
2272         (-[DOMHTMLInputElement setAutocorrect:]): Deleted.
2273         (-[DOMHTMLInputElement autocapitalize]): Deleted.
2274         (-[DOMHTMLInputElement setAutocapitalize:]): Deleted.
2275         * DOM/DOMHTMLInputElementPrivate.h:
2276         * DOM/DOMHTMLTextAreaElement.mm:
2277         (-[DOMHTMLTextAreaElement autocorrect]): Deleted.
2278         (-[DOMHTMLTextAreaElement setAutocorrect:]): Deleted.
2279         (-[DOMHTMLTextAreaElement autocapitalize]): Deleted.
2280         (-[DOMHTMLTextAreaElement setAutocapitalize:]): Deleted.
2281         * DOM/DOMHTMLTextAreaElementPrivate.h:
2282
2283         We need to import DOMHTMLElementPrivate.h here to avoid breaking UIKit. We should follow this up with a UIKit
2284         change to import DOMHTMLElementPrivate.h directly.
2285
2286         * DOM/DOMPrivate.h:
2287         * DOM/WebAutocapitalizeTypes.h: Copied from Tools/WebKitTestRunner/ios/UIKitSPI.h.
2288         * MigrateHeaders.make:
2289
2290 2016-11-11  Beth Dakin  <bdakin@apple.com>
2291
2292         Move to modern TouchBar methods
2293         https://bugs.webkit.org/show_bug.cgi?id=164655
2294         -and corresponding-
2295         rdar://problem/29226911
2296
2297         Reviewed by Wenson Hsieh.
2298
2299         customizationDefaultItemIdentifiers -> defaultItemIdentifiers
2300         itemIdentifiers -> defaultItemIdentifiers
2301         defaultItems -> templateItems
2302
2303         * WebView/WebView.mm:
2304         (-[WebView _plainTextTouchBarDefaultItemIdentifiers]):
2305         (-[WebView _richTextTouchBarDefaultItemIdentifiers]):
2306         (-[WebView setUpTextTouchBar:]):
2307         (-[WebView updateTextTouchBar]):
2308         (-[WebView _plainTextTouchBarCustomizationDefaultItemIdentifiers]): Deleted.
2309         (-[WebView _richTextTouchBarCustomizationDefaultItemIdentifiers]): Deleted.
2310
2311 2016-11-11  Darin Adler  <darin@apple.com>
2312
2313         Move Node from ExceptionCode to ExceptionOr
2314         https://bugs.webkit.org/show_bug.cgi?id=164515
2315
2316         Reviewed by Sam Weinig.
2317
2318         * DOM/DOMHTMLSelectElement.mm:
2319         (-[DOMHTMLSelectElement remove:]): Call remove instead of removeByIndex
2320         now that it was renamed.
2321         * DOM/DOMNode.mm:
2322         (-[DOMNode setNodeValue:]): Updated exception handling.
2323         (-[DOMNode setPrefix:]): Ditto.
2324         (-[DOMNode setTextContent:]): Ditto.
2325         (-[DOMNode insertBefore:refChild:]): Ditto.
2326         (-[DOMNode replaceChild:oldChild:]): Ditto.
2327         (-[DOMNode removeChild:]): Ditto.
2328         (-[DOMNode appendChild:]): Ditto.
2329         (-[DOMNode cloneNode:]): Ditto.
2330
2331 2016-11-11  Beth Dakin  <bdakin@apple.com>
2332
2333         Get touch bar code building for open source builds
2334         https://bugs.webkit.org/show_bug.cgi?id=164610
2335
2336         Reviewed by Wenson Hsieh.
2337
2338         * WebKitPrefix.h:
2339
2340 2016-11-10  Alex Christensen  <achristensen@webkit.org>
2341
2342         Fix assertion after r208534.
2343         https://bugs.webkit.org/show_bug.cgi?id=160497
2344
2345         * WebView/WebView.mm:
2346         (-[WebView _commonInitializationWithFrameName:groupName:]):
2347         (WebInstallMemoryPressureHandler):
2348         WebInstallMemoryPressureHandler can be called before [WebView initWithFrame:frameName:groupName:]
2349         When this happens, we should use the same std::once_flag to make sure we install the MemoryPressureHandler::singleton
2350         only once, otherwise we get an assertion !m_installed in MemoryPressureHandler::setLowMemoryHandler.
2351
2352 2016-11-10  Alex Christensen  <achristensen@webkit.org>
2353
2354         Move SecurityOrigin::databaseIdentifier() to SecurityOriginData
2355         https://bugs.webkit.org/show_bug.cgi?id=164573
2356
2357         Reviewed by Brady Eidson.
2358
2359         * WebCoreSupport/WebSecurityOrigin.mm:
2360         (-[WebSecurityOrigin databaseIdentifier]):
2361
2362 2016-10-14  Carlos Garcia Campos  <cgarcia@igalia.com>
2363
2364         MemoryPressureHandler shouldn't know how to release WebCore memory
2365         https://bugs.webkit.org/show_bug.cgi?id=160497
2366
2367         Reviewed by Michael Catanzaro.
2368
2369         Set the low memory handler before installing the memory pressure handler.
2370
2371         * WebView/WebView.mm:
2372         (-[WebView _commonInitializationWithFrameName:groupName:]):
2373
2374 2016-11-09  Ryosuke Niwa  <rniwa@webkit.org>
2375
2376         WebHTMLView's _attributeStringFromDOMRange should use HTMLConverter instead of NSAttributedString's _initWithDOMRange
2377         https://bugs.webkit.org/show_bug.cgi?id=164501
2378         <rdar://problem/29152282>
2379
2380         Reviewed by Sam Weinig.
2381
2382         Align what [WebHTMLView attributedString] returns to what would be used on copy & paste by using HTMLConverter
2383         instead of _initWithDOMRange in [WebHTMLView _attributeStringFromDOMRange].
2384
2385         * WebView/WebHTMLView.mm:
2386         (-[WebHTMLView _attributedStringFromDOMRange:]): Renamed from _attributeStringFromDOMRange.
2387         (-[WebHTMLView attributedString]):
2388         (-[WebHTMLView selectedAttributedString]):
2389         (-[WebHTMLView selectedString]): Moved to reduce the number of occurrences of the if-defs.
2390
2391 2016-11-04  Brent Fulgham  <bfulgham@apple.com>
2392
2393         Local HTML should be blocked from localStorage access unless "Disable Local File Restrictions" is checked
2394         https://bugs.webkit.org/show_bug.cgi?id=155185
2395         <rdar://problem/11101440>
2396
2397         Reviewed by Brady Eidson.
2398
2399         Provide SPI to access the new quirk for localStorage. The quirk defaults to 'on'. When active, this
2400         quirk says that localStorage access should be granted, without needing to grant universal file access.
2401
2402         If the quirk is turned off, then localStorage is blocked unless the WebKit client explicitly
2403         grants universal file access.
2404
2405         * WebView/WebPreferenceKeysPrivate.h:
2406         * WebView/WebPreferences.mm:
2407         (-[WebPreferences needsLocalStorageQuirk]): Added.
2408         (-[WebPreferences setNeedsLocalStorageQuirk:]): Added.
2409         * WebView/WebPreferencesPrivate.h:
2410         * WebView/WebView.mm:
2411         (-[WebView _preferencesChanged:]): Honor the new localStorage quirk.
2412
2413 2016-11-09  Alex Christensen  <achristensen@webkit.org>
2414
2415         Clean up Storage code
2416         https://bugs.webkit.org/show_bug.cgi?id=164562
2417
2418         Reviewed by Brady Eidson.
2419
2420         * Storage/WebStorageManager.mm:
2421         (-[WebStorageManager origins]):
2422         (-[WebStorageManager deleteAllOrigins]):
2423         (-[WebStorageManager deleteOrigin:]):
2424         (-[WebStorageManager diskUsageForOrigin:]):
2425         (-[WebStorageManager syncLocalStorage]):
2426         (-[WebStorageManager syncFileSystemAndTrackerDatabase]):
2427         (+[WebStorageManager setStorageDatabaseIdleInterval:]):
2428         (+[WebStorageManager closeIdleLocalStorageDatabases]):
2429         (WebKitInitializeStorageIfNecessary):
2430         * WebView/WebView.mm:
2431         (+[WebView _applicationWillTerminate]):
2432
2433 2016-11-09  Beth Dakin  <bdakin@apple.com>
2434
2435         Another attempted build fix.
2436
2437         * WebView/WebView.mm:
2438
2439 2016-11-09  Beth Dakin  <bdakin@apple.com>
2440
2441         Attempted build fix.
2442
2443         * WebView/WebView.mm:
2444
2445 2016-11-09  Darin Adler  <darin@apple.com>
2446
2447         Move Range from ExceptionCode to ExceptionOr
2448         https://bugs.webkit.org/show_bug.cgi?id=164457
2449
2450         Reviewed by Alex Christensen.
2451
2452         * DOM/DOMRange.mm:
2453         (-[DOMRange setStart:offset:]): Updated exception handling.
2454         (-[DOMRange setEnd:offset:]): Ditto.
2455         (-[DOMRange setStartBefore:]): Ditto.
2456         (-[DOMRange setStartAfter:]): Ditto.
2457         (-[DOMRange setEndBefore:]): Ditto.
2458         (-[DOMRange setEndAfter:]): Ditto.
2459         (-[DOMRange selectNode:]): Ditto.
2460         (-[DOMRange selectNodeContents:]): Ditto.
2461         (-[DOMRange compareBoundaryPoints:sourceRange:]): Ditto.
2462         (-[DOMRange deleteContents]): Ditto.
2463         (-[DOMRange extractContents]): Ditto.
2464         (-[DOMRange cloneContents]): Ditto.
2465         (-[DOMRange insertNode:]): Ditto.
2466         (-[DOMRange surroundContents:]): Ditto.
2467         (-[DOMRange createContextualFragment:]): Ditto.
2468         (-[DOMRange compareNode:]): Ditto.
2469         (-[DOMRange intersectsNode:]): Ditto.
2470         (-[DOMRange comparePoint:offset:]): Ditto.
2471         (-[DOMRange isPointInRange:offset:]): Ditto.
2472         (-[DOMRange expand:]): Ditto.
2473         * WebView/WebFrame.mm:
2474         (-[WebFrame _documentFragmentWithMarkupString:baseURLString:]): Ditto.
2475         (-[WebFrame _smartDeleteRangeForProposedRange:]): Deleted.
2476         This function was incorrectly implemented (set both start and end of
2477         the range to the computed start), not declared in any header file,
2478         not used anywhere inside WebKit, and I also could not find a use of it
2479         in outside-WebKit Apple code.
2480         * mac/DOM/DOMUIKitExtensions.mm:
2481         (-[DOMRange move:inDirection:]): Ditto.
2482         (-[DOMRange extend:inDirection:]): Ditto.
2483
2484 2016-11-09  Darin Adler  <darin@apple.com>
2485
2486         Move EventTarget from ExceptionCode to ExceptionOr
2487         https://bugs.webkit.org/show_bug.cgi?id=164465
2488
2489         Reviewed by Youenn Fablet.
2490
2491         * DOM/DOMNode.mm:
2492         (-[DOMNode dispatchEvent:]): Updated exception handling.
2493
2494 2016-11-09  Chris Dumez  <cdumez@apple.com>
2495
2496         [Mac] Stop using deprecated AppKit enumeration values
2497         https://bugs.webkit.org/show_bug.cgi?id=164494
2498
2499         Reviewed by Darin Adler.
2500
2501         Stop using deprecated AppKit enumeration values.
2502
2503         * Carbon/CarbonWindowAdapter.mm:
2504         (-[CarbonWindowAdapter initWithCarbonWindowRef:takingOwnership:disableOrdering:carbon:]):
2505         (-[CarbonWindowAdapter sendSuperEvent:]):
2506         * Plugins/Hosted/NetscapePluginHostProxy.mm:
2507         (WebKit::NetscapePluginHostProxy::beginModal):
2508         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2509         (WebKit::NetscapePluginInstanceProxy::syntheticKeyDownWithCommandModifier):
2510         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
2511         (-[WebHostedNetscapePluginView drawRect:]):
2512         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
2513         (WebNetscapePluginEventHandlerCocoa::syntheticKeyDownWithCommandModifier):
2514         * WebCoreSupport/PopupMenuMac.mm:
2515         (PopupMenuMac::populate):
2516         (PopupMenuMac::show):
2517         * WebCoreSupport/WebContextMenuClient.mm:
2518         (WebContextMenuClient::showContextMenu):
2519         * WebCoreSupport/WebFrameLoaderClient.mm:
2520         (WebFrameLoaderClient::actionDictionary):
2521         * WebCoreSupport/WebInspectorClient.mm:
2522         (WebInspectorFrontendClient::canAttach):
2523         (-[WebInspectorWindowController window]):
2524         * WebInspector/WebNodeHighlight.mm:
2525         (-[WebNodeHighlight initWithTargetView:inspectorController:]):
2526         * WebView/WebFrameView.mm:
2527         (-[WebFrameView keyDown:keyDown:]):
2528         * WebView/WebFullScreenController.mm:
2529         (-[WebFullScreenController init]):
2530         (createBackgroundFullscreenWindow):
2531         * WebView/WebHTMLView.mm:
2532         (-[WebHTMLView _postFakeMouseMovedEventForFlagsChangedEvent:]):
2533         (-[WebHTMLView _setMouseDownEvent:_setMouseDownEvent:]):
2534         (-[WebHTMLView _updateMouseoverWithFakeEvent]):
2535         (isQuickLookEvent):
2536         (-[WebHTMLView hitTest:]):
2537         (-[WebHTMLView _sendToolTipMouseExited]):
2538         (-[WebHTMLView _sendToolTipMouseEntered]):
2539         (mouseEventIsPartOfClickOrDrag):
2540         (-[WebHTMLView _updateMouseoverWithEvent:]):
2541         (-[WebHTMLView _autoscroll]):
2542         (-[WebHTMLView acceptsFirstResponder]):
2543         (-[WebHTMLView viewDidMoveToWindow]):
2544         (-[WebHTMLView mouseDown:mouseDown:]):
2545         (currentKeyboardEvent):
2546         (-[WebHTMLView _handleStyleKeyEquivalent:]):
2547         (-[WebHTMLView _interpretKeyEvent:savingCommands:]):
2548         * WebView/WebPDFView.mm:
2549         (-[WebPDFView hitTest:]):
2550         (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
2551         (-[WebPDFView _fakeKeyEventWithFunctionKey:]):
2552         * WebView/WebTextCompletionController.mm:
2553         (-[WebTextCompletionController _buildUI]):
2554         (-[WebTextCompletionController _placePopupWindow:]):
2555         * WebView/WebView.mm:
2556         (-[WebView applicationFlags:]):
2557
2558 2016-11-09  Beth Dakin  <bdakin@apple.com>
2559
2560         Support TouchBar in WebKit
2561         https://bugs.webkit.org/show_bug.cgi?id=164437
2562         -and corresponding-
2563         rdar://problem/28876524
2564
2565         Reviewed by Darin Adler.
2566
2567         * WebCoreSupport/WebEditorClient.mm:
2568         (WebEditorClient::respondToChangedSelection):
2569         (WebEditorClient::updateEditorStateAfterLayoutIfEditabilityChanged):
2570         * WebView/WebHTMLView.mm:
2571         (-[WebHTMLView candidateListTouchBarItem]):
2572         * WebView/WebView.mm:
2573         (-[_WebTextListTouchBarViewController initWithWebView:]):
2574         (-[_WebTextListTouchBarViewController _selectList:]):
2575         (-[_WebTextListTouchBarViewController setCurrentListType:]):
2576         (-[WebTextTouchBarItemController initWithWebView:]):
2577         (-[WebTextTouchBarItemController itemForIdentifier:]):
2578         (-[WebTextTouchBarItemController webTextListTouchBarViewController]):
2579         (-[WebTextTouchBarItemController setTextIsBold:]):
2580         (-[WebTextTouchBarItemController setTextIsItalic:]):
2581         (-[WebTextTouchBarItemController setTextIsUnderlined:]):
2582         (-[WebTextTouchBarItemController _webChangeTextStyle:]):
2583         (-[WebTextTouchBarItemController setCurrentTextAlignment:]):
2584         (-[WebTextTouchBarItemController _webChangeTextAlignment:]):
2585         (-[WebTextTouchBarItemController textColor]):
2586         (-[WebTextTouchBarItemController setTextColor:]):
2587         (-[WebTextTouchBarItemController _webChangeColor:]):
2588         (-[WebTextTouchBarItemController textListViewController]):
2589         (-[WebView _commonInitializationWithFrameName:groupName:]):
2590         (-[WebView showCandidates:forString:inRect:forSelectedRange:view:completionHandler:]):
2591         (-[WebView shouldRequestCandidates]):
2592         (-[WebView forceRequestCandidatesForTesting]):
2593         (-[WebView makeTouchBar]):
2594         (-[WebView touchBar:makeItemForIdentifier:]):
2595         (textCheckingResultFromNSTextCheckingResult):
2596         (-[WebView candidateListTouchBarItem:endSelectingCandidateAtIndex:]):
2597         (-[WebView candidateListTouchBarItem:changedCandidateListVisibility:]):
2598         (-[WebView _setUpPlaybackControlsManagerForMediaElement:]):
2599         (-[WebView _clearPlaybackControlsManager]):
2600         (-[WebView _dismissTextTouchBarPopoverItemWithIdentifier:]):
2601         (-[WebView _textTouchBarCustomizationAllowedIdentifiers]):
2602         (-[WebView _plainTextTouchBarCustomizationDefaultItemIdentifiers]):
2603         (-[WebView _richTextTouchBarCustomizationDefaultItemIdentifiers]):
2604         (-[WebView touchBarDidExitCustomization:]):
2605         (-[WebView touchBarWillEnterCustomization:]):
2606         (-[WebView didChangeAutomaticTextCompletion:]):
2607         (-[WebView setUpTextTouchBar:]):
2608         (-[WebView _isRichlyEditable]):
2609         (-[WebView textTouchBar]):
2610         (-[WebView updateTextTouchBar]):
2611         (-[WebView updateMediaTouchBar]):
2612         (-[WebView updateTouchBar]):
2613         (-[WebView prepareForMouseDown]):
2614         (-[WebView prepareForMouseUp]):
2615         (-[WebView webViewAdditionsWillDestroyView]):
2616         (-[WebView candidateList]):
2617         (-[WebView updateWebViewAdditions]): Deleted.
2618         * WebView/WebViewData.h:
2619         * WebView/WebViewInternal.h:
2620         * WebView/WebViewPrivate.h:
2621
2622 2016-11-04  Wenson Hsieh  <wenson_hsieh@apple.com>
2623
2624         Safari does not emit composition end if blurred for dead key / Japanese IME
2625         https://bugs.webkit.org/show_bug.cgi?id=164369
2626         <rdar://problem/29050439>
2627
2628         Reviewed by Ryosuke Niwa.
2629
2630         When canceling a composition, make sure that we clear the system IME state.
2631
2632         * WebCoreSupport/WebEditorClient.h:
2633         * WebCoreSupport/WebEditorClient.mm:
2634         (WebEditorClient::canceledComposition):
2635
2636 2016-11-04  Said Abou-Hallawa  <sabouhallawa@apple.com>
2637
2638         Add a setting and preferences to enable/disable async image decoding
2639         https://bugs.webkit.org/show_bug.cgi?id=164417
2640
2641         Reviewed by Simon Fraser.
2642
2643         Hook up the asyncImageDecodingEnabled setting for WebKit1.
2644
2645         * WebView/WebPreferenceKeysPrivate.h:
2646         * WebView/WebPreferences.mm:
2647         (+[WebPreferences initialize]):
2648         (-[WebPreferences asyncImageDecodingEnabled]):
2649         (-[WebPreferences setAsyncImageDecodingEnabled:]):
2650         * WebView/WebPreferencesPrivate.h:
2651         * WebView/WebView.mm:
2652         (-[WebView _preferencesChanged:]):
2653
2654 2016-11-01  Alex Christensen  <achristensen@webkit.org>
2655
2656         Remove PassRefPtr from DumpRenderTree
2657         https://bugs.webkit.org/show_bug.cgi?id=164307
2658
2659         Reviewed by Sam Weinig.
2660
2661         * WebView/WebGeolocationPosition.mm:
2662         (-[WebGeolocationPosition initWithGeolocationPosition:]):
2663
2664 2016-11-02  Romain Bellessort  <romain.bellessort@crf.canon.fr>
2665
2666         [Readable Streams API] Enable creation of ReadableByteStreamController
2667         https://bugs.webkit.org/show_bug.cgi?id=164014
2668
2669         Reviewed by Youenn Fablet.
2670
2671         Added flag for the byte stream part of Readable Streams API.
2672
2673         * Configurations/FeatureDefines.xcconfig:
2674
2675 2016-11-01  Ryosuke Niwa  <rniwa@webkit.org>
2676
2677         Remove CUSTOM_ELEMENTS build flag
2678         https://bugs.webkit.org/show_bug.cgi?id=164267
2679
2680         Reviewed by Antti Koivisto.
2681
2682         Removed the build flag.
2683
2684         * Configurations/FeatureDefines.xcconfig:
2685         * WebView/WebPreferences.mm:
2686         (+[WebPreferences initialize]):
2687         * WebView/WebView.mm:
2688         (-[WebView _preferencesChanged:]):
2689
2690 2016-11-01  Eric Carlson  <eric.carlson@apple.com>
2691
2692         [MediaStream] restrict media capture secure connections
2693         https://bugs.webkit.org/show_bug.cgi?id=164234
2694         <rdar://problem/28944906>
2695
2696         Reviewed by Alex Christensen.
2697
2698         * WebView/WebPreferenceKeysPrivate.h:
2699         * WebView/WebPreferences.mm:
2700         (+[WebPreferences initialize]): Initialize WebKitMediaCaptureRequiresSecureConnectionPreferenceKey.
2701         (-[WebPreferences mediaCaptureRequiresSecureConnection]): New.
2702         (-[WebPreferences setMediaCaptureRequiresSecureConnection:]): New.
2703         * WebView/WebPreferencesPrivate.h:
2704
2705         * WebView/WebView.mm:
2706         (-[WebView _preferencesChanged:]): Sync mediaCaptureRequiresSecureConnection.
2707
2708 2016-10-29  Filip Pizlo  <fpizlo@apple.com>
2709
2710         JSC should support SharedArrayBuffer
2711         https://bugs.webkit.org/show_bug.cgi?id=163986
2712
2713         Reviewed by Keith Miller.
2714         
2715         Support the RuntimeFlag.
2716
2717         * WebView/WebPreferencesPrivate.h:
2718
2719 2016-10-31  Wenson Hsieh  <wenson_hsieh@apple.com>
2720
2721         [WK1] Candidate visibility should not update as a result of selection during a dictionary lookup
2722         https://bugs.webkit.org/show_bug.cgi?id=164236
2723         <rdar://problem/28747712>
2724
2725         Reviewed by Beth Dakin.
2726
2727         See WebCore ChangeLog for more detail. Sets the Editor's isGettingDictionaryPopupInfo state to true during a
2728         dictionary lookup.
2729
2730         * WebCoreSupport/WebEditorClient.mm:
2731         (WebEditorClient::respondToChangedSelection):
2732         * WebView/WebImmediateActionController.mm:
2733         (+[WebImmediateActionController _dictionaryPopupInfoForRange:inFrame:withLookupOptions:indicatorOptions:transition:]):
2734
2735 2016-10-31  Darin Adler  <darin@apple.com>
2736
2737         Move ChildNode and ParentNode from ExceptionCode to Exception, add support for ExceptionOr<T&>
2738         https://bugs.webkit.org/show_bug.cgi?id=164214
2739
2740         Reviewed by Alex Christensen.
2741
2742         * DOM/DOMCSSPrimitiveValue.mm:
2743         (-[DOMCSSPrimitiveValue getCounterValue]): Updated since return value
2744         is a reference now.
2745         (-[DOMCSSPrimitiveValue getRectValue]): Ditto.
2746
2747         * DOM/DOMDocument.mm:
2748         (-[DOMDocument querySelector:]): Updated exception handling.
2749         (-[DOMDocument querySelectorAll:]): Ditto.
2750         * DOM/DOMDocumentFragment.mm:
2751         (-[DOMDocumentFragment querySelector:]): Ditto.
2752         (-[DOMDocumentFragment querySelectorAll:]): Ditto.
2753         * DOM/DOMElement.mm:
2754         (-[DOMElement querySelector:]): Ditto.
2755         (-[DOMElement querySelectorAll:]): Ditto.
2756
2757 2016-10-31  Darin Adler  <darin@apple.com>
2758
2759         Convert Document from ExceptionCode to Exception
2760         https://bugs.webkit.org/show_bug.cgi?id=164212
2761
2762         Reviewed by Alex Christensen.
2763
2764         * DOM/DOMDocument.mm:
2765         (-[DOMDocument setXmlVersion:]): Updated exception handling.
2766         (-[DOMDocument cookie]): Ditto.
2767         (-[DOMDocument setCookie:]): Ditto.
2768         (-[DOMDocument setBody:]): Ditto.
2769         (-[DOMDocument createElement:]): Ditto.
2770         (-[DOMDocument createCDATASection:]): Ditto.
2771         (-[DOMDocument createProcessingInstruction:data:]): Ditto.
2772         (-[DOMDocument createAttribute:]): Ditto.
2773         (-[DOMDocument createEntityReference:]): Ditto.
2774         (-[DOMDocument importNode:deep:]): Ditto.
2775         (-[DOMDocument createElementNS:qualifiedName:]): Ditto.
2776         (-[DOMDocument createAttributeNS:qualifiedName:]): Ditto.
2777         (-[DOMDocument getElementsByTagNameNS:localName:]): Ditto.
2778         (-[DOMDocument adoptNode:]): Ditto.
2779         (-[DOMDocument createEvent:]): Ditto.
2780
2781 2016-10-30  Darin Adler  <darin@apple.com>
2782
2783         Move Element, NamedNodeMap, and DOMStringMap from ExceptionCode to Exception
2784         https://bugs.webkit.org/show_bug.cgi?id=164206
2785
2786         Reviewed by Chris Dumez.
2787
2788         * DOM/DOMElement.mm:
2789         (-[DOMElement setInnerHTML:]): Updated exception handling.
2790         (-[DOMElement setOuterHTML:]): Ditto.
2791         (-[DOMElement setAttribute:value:]): Ditto.
2792         (-[DOMElement setAttributeNode:]): Ditto.
2793         (-[DOMElement removeAttributeNode:]): Ditto.
2794         (-[DOMElement setAttributeNS:qualifiedName:value:]): Ditto.
2795         (-[DOMElement setAttributeNodeNS:]): Ditto.
2796         (-[DOMElement matches:]): Ditto.
2797         (-[DOMElement closest:]): Ditto.
2798         (-[DOMElement webkitMatchesSelector:]): Ditto.
2799         * DOM/DOMHTMLElement.mm:
2800         (-[DOMHTMLElement insertAdjacentElement:element:]): Ditto.
2801         (-[DOMHTMLElement insertAdjacentHTML:html:]): Ditto.
2802         (-[DOMHTMLElement insertAdjacentText:text:]): Ditto.
2803         * DOM/DOMNamedNodeMap.mm:
2804         (-[DOMNamedNodeMap setNamedItem:]): Ditto.
2805         (-[DOMNamedNodeMap removeNamedItem:]): Ditto.
2806         (-[DOMNamedNodeMap setNamedItemNS:]): Ditto.
2807         (-[DOMNamedNodeMap removeNamedItemNS:localName:]): Ditto.
2808
2809 2016-10-29  Darin Adler  <darin@apple.com>
2810
2811         Convert more of DOM from ExceptionCode to Exception
2812         https://bugs.webkit.org/show_bug.cgi?id=164173
2813
2814         Reviewed by Ryosuke Niwa.
2815
2816         * DOM/DOMCharacterData.mm:
2817         (-[DOMCharacterData substringData:length:]): Updated since this
2818         now uses ExceptionOr.
2819         (-[DOMCharacterData insertData:data:]): Ditto.
2820         (-[DOMCharacterData deleteData:length:]): Ditto.
2821         (-[DOMCharacterData replaceData:length:data:]): Ditto.
2822         * DOM/DOMText.mm:
2823         (-[DOMText splitText:]): Ditto.
2824         (-[DOMText replaceWholeText:]): Removed unneeded exception code
2825         handling from function that does not throw an exception.
2826
2827 2016-10-28  Darin Adler  <darin@apple.com>
2828
2829         Move all classes in the HTML directory from ExceptionCode to Exception
2830         https://bugs.webkit.org/show_bug.cgi?id=163876
2831
2832         Reviewed by Sam Weinig.
2833
2834         * DOM/DOMCharacterData.mm:
2835         (-[DOMCharacterData remove]): Updated exception handling.
2836         * DOM/DOMDOMTokenList.mm:
2837         (-[DOMDOMTokenList toggle:force:]): Ditto.
2838         * DOM/DOMDocumentType.mm:
2839         (-[DOMDocumentType remove]): Ditto.
2840         * DOM/DOMElement.mm:
2841         (-[DOMElement remove]): Ditto.
2842         * DOM/DOMHTML.mm:
2843         (-[DOMHTMLInputElement setValueAsNumberWithChangeEvent:]): Ditto.
2844         * DOM/DOMHTMLCanvasElement.mm:
2845         (-[DOMHTMLCanvasElement toDataURL:]): Ditto.
2846         * DOM/DOMHTMLElement.mm:
2847         (-[DOMHTMLElement setInnerText:]): Ditto.
2848         (-[DOMHTMLElement setOuterText:]): Ditto.
2849         (-[DOMHTMLElement setContentEditable:]): Ditto.
2850         * DOM/DOMHTMLInputElement.mm:
2851         (-[DOMHTMLInputElement setMaxLength:]): Ditto.
2852         (-[DOMHTMLInputElement setValueAsDate:]): Ditto.
2853         (-[DOMHTMLInputElement setValueAsNumber:]): Ditto.
2854         (-[DOMHTMLInputElement stepUp:]): Ditto.
2855         (-[DOMHTMLInputElement stepDown:]): Ditto.
2856         (-[DOMHTMLInputElement setRangeText:]): Ditto.
2857         (-[DOMHTMLInputElement setRangeText:start:end:selectionMode:]): Ditto.
2858         * DOM/DOMHTMLMarqueeElement.mm:
2859         (-[DOMHTMLMarqueeElement setLoop:]): Ditto.
2860         * DOM/DOMHTMLMediaElement.mm:
2861         (-[DOMHTMLMediaElement setCurrentTime:]): Ditto.
2862         (-[DOMHTMLMediaElement setVolume:]): Ditto.
2863         * DOM/DOMHTMLOptionsCollection.mm:
2864         (-[DOMHTMLOptionsCollection setLength:]): Ditto.
2865         * DOM/DOMHTMLTableElement.mm:
2866         (-[DOMHTMLTableElement setCaption:]): Ditto.
2867         (-[DOMHTMLTableElement setTHead:]): Ditto.
2868         (-[DOMHTMLTableElement setTFoot:]): Ditto.
2869         (-[DOMHTMLTableElement insertRow:]): Ditto.
2870         (-[DOMHTMLTableElement deleteRow:]): Ditto.
2871         * DOM/DOMHTMLTableRowElement.mm:
2872         (-[DOMHTMLTableRowElement insertCell:]): Ditto.
2873         (-[DOMHTMLTableRowElement deleteCell:]): Ditto.
2874         * DOM/DOMHTMLTableSectionElement.mm:
2875         (-[DOMHTMLTableSectionElement insertRow:]): Ditto.
2876         (-[DOMHTMLTableSectionElement deleteRow:]): Ditto.
2877         * DOM/DOMHTMLTextAreaElement.mm:
2878         (-[DOMHTMLTextAreaElement setMaxLength:]): Ditto.
2879         (-[DOMHTMLTextAreaElement setRangeText:]): Ditto.
2880         (-[DOMHTMLTextAreaElement setRangeText:start:end:selectionMode:]): Ditto.
2881         * DOM/DOMHTMLVideoElement.mm:
2882         (-[DOMHTMLVideoElement webkitEnterFullscreen]): Ditto.
2883         (-[DOMHTMLVideoElement webkitEnterFullScreen]): Changed to call the other named
2884         version (lowercase S) instead of repeating the logic from that method.
2885         (-[DOMHTMLVideoElement webkitExitFullScreen]): Ditto.
2886         * DOM/DOMTimeRanges.mm:
2887         (-[DOMTimeRanges start:]): Updated exception handling.
2888         (-[DOMTimeRanges end:]): Ditto.
2889
2890 2016-10-27  Chris Dumez  <cdumez@apple.com>
2891
2892         Regression(r203601): Caused crashes in iBooks
2893         https://bugs.webkit.org/show_bug.cgi?id=164093
2894         <rdar://problem/28745634>
2895
2896         Reviewed by Darin Adler.
2897
2898         Restore pre-r203601 behavior when calling [DOMNode compareDocumentPosition:nil],
2899         which was to return Node::DOCUMENT_POSITION_DISCONNECTED.
2900
2901         * DOM/DOMNode.mm:
2902         (-[DOMNode compareDocumentPosition:]):
2903
2904 2016-10-27  Wenson Hsieh  <wenson_hsieh@apple.com>
2905
2906         Support "insertFromDrop" and "deleteByDrag" for the InputEvent spec
2907         https://bugs.webkit.org/show_bug.cgi?id=163948
2908         <rdar://problem/28921433>
2909
2910         Reviewed by Darin Adler.
2911
2912         Add support for new drag and drop-related EditAction enum values.
2913
2914         * WebCoreSupport/WebEditorClient.mm:
2915         (undoNameForEditAction):
2916
2917 2016-10-27  Dan Bernstein  <mitz@apple.com>
2918
2919         Reapplied the configuration changes from r207934 without breaking iOS builds.
2920
2921         * Configurations/Base.xcconfig:
2922         * Configurations/WebKitLegacy.xcconfig:
2923
2924 2016-10-27  Dan Bernstein  <mitz@apple.com>
2925
2926         Reverted the configuration changes from r207934 because they broke iOS builds not using the Apple-internal SDK.
2927
2928         * Configurations/Base.xcconfig:
2929         * Configurations/WebKitLegacy.xcconfig:
2930
2931 2016-10-26  Dan Bernstein  <mitz@apple.com>
2932
2933         [Xcode] WebKit fails to build when CLANG_WARN_DOCUMENTATION_COMMENTS is enabled
2934         https://bugs.webkit.org/show_bug.cgi?id=164048
2935
2936         Reviewed by Tim Horton.
2937
2938         * Configurations/Base.xcconfig: Enabled CLANG_WARN_DOCUMENTATION_COMMENTS.
2939         * Configurations/WebKitLegacy.xcconfig: Made the compiler treat the icu headers as system
2940           headers.
2941
2942         * History/WebBackForwardList.h: Fixed parameter name in @param entry.
2943         * Misc/WebDownload.h: Removed empty entries.
2944         * Misc/WebIconDatabase.h: Remove incorrect @param entries.
2945         * Misc/WebQuotaManager.h: Added missing parameter names in @param entries.
2946         * WebView/WebFrameLoadDelegate.h: Corrected parameter names in @param entries.
2947         * WebView/WebFrameViewPrivate.h: Changed incorrect @result to @abstract.
2948         * WebView/WebPolicyDelegate.h: Fixed parameter name and removed incorrect @param entries.
2949         * WebView/WebPreferences.h: Changed @method to @property in a couple of places.
2950         * WebView/WebResourceLoadDelegate.h: Fixed parameter names.
2951         * WebView/WebUIDelegate.h: Filled in two empty @param entries. Added missing parameter name,
2952           Fixed a typo and removed empty @discussion entry. Fixed some parameter names.
2953         * WebView/WebUIDelegatePrivate.h: Fixed parameter names.
2954         * WebView/WebView.h: Changed @method to @property in a couple of places.
2955         * WebView/WebViewPrivate.h: Fixed parameter names, changed incorrect @result to @abstract.
2956
2957 2016-10-26  Brian Burg  <bburg@apple.com>
2958
2959         Web Inspector: remove unused bool return value from FrontendChannel::sendMessageToFrontend
2960         https://bugs.webkit.org/show_bug.cgi?id=164046
2961
2962         Reviewed by Joseph Pecoraro.
2963
2964         * WebCoreSupport/WebInspectorClient.h:
2965
2966 2016-10-21  Alex Christensen  <achristensen@webkit.org>
2967
2968         URL::port should return Optional<uint16_t>
2969         https://bugs.webkit.org/show_bug.cgi?id=163806
2970
2971         Reviewed by Darin Adler.
2972
2973         * WebCoreSupport/WebSecurityOrigin.mm:
2974         (-[WebSecurityOrigin port]):
2975
2976 2016-10-24  Dave Hyatt  <hyatt@apple.com>
2977
2978         Remove CSSCharsetRule from the CSS OM
2979         https://bugs.webkit.org/show_bug.cgi?id=163891
2980
2981         Reviewed by Darin Adler.
2982
2983         * DOM/DOMCSSCharsetRule.mm:
2984         (-[DOMCSSCharsetRule encoding]):
2985
2986 2016-10-24  Youenn Fablet  <youenn@apple.com>
2987
2988         Activate WEB_RTC compilation flags for Mac bots
2989         https://bugs.webkit.org/show_bug.cgi?id=163886
2990
2991         Reviewed by Eric Carlson.
2992
2993         * Configurations/FeatureDefines.xcconfig:
2994
2995 2016-10-23  Chris Dumez  <cdumez@apple.com>
2996
2997         addEventListener() / removeEventListener() should use a union for last parameter
2998         https://bugs.webkit.org/show_bug.cgi?id=163863
2999
3000         Reviewed by Darin Adler.
3001
3002         Cast BOOL to bool to help to compiler construct the new variant-type parameter.
3003
3004         * DOM/DOMNode.mm:
3005         (-[DOMNode addEventListener:listener:useCapture:]):
3006         (-[DOMNode addEventListener:::]):
3007         (-[DOMNode removeEventListener:listener:useCapture:]):
3008         (-[DOMNode removeEventListener:::]):
3009
3010 2016-10-21  Wenson Hsieh  <wenson_hsieh@apple.com>
3011
3012         Support (insertFrom|deleteBy)Composition and (insert|delete)CompositionText inputTypes for InputEvents
3013         https://bugs.webkit.org/show_bug.cgi?id=163460
3014         <rdar://problem/28784142>
3015
3016         Reviewed by Darin Adler.
3017
3018         Handle new EditAction types for inserting/deleting pending/final compositions.
3019
3020         * WebCoreSupport/WebEditorClient.mm:
3021         (undoNameForEditAction):
3022
3023 2016-10-21  Jeremy Jones  <jeremyj@apple.com>
3024
3025         Implement basic pointer lock behavior for WebKit and WebKit2.
3026         https://bugs.webkit.org/show_bug.cgi?id=162745
3027
3028         Reviewed by Simon Fraser.
3029
3030         Add basic pointer lock functionality. User permission is not yet implemented.
3031
3032         * WebCoreSupport/WebChromeClient.h:
3033         * WebCoreSupport/WebChromeClient.mm:
3034         (WebChromeClient::requestPointerLock):
3035         (WebChromeClient::requestPointerUnlock):
3036
3037 2016-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
3038
3039         [macOS] [iOS] Disable variation fonts on macOS El Capitan and iOS 9
3040         https://bugs.webkit.org/show_bug.cgi?id=163374
3041
3042         Reviewed by Darin Adler.
3043
3044         * Configurations/FeatureDefines.xcconfig:
3045
3046 2016-10-19  Alex Christensen  <achristensen@webkit.org>
3047
3048         Revert r207151
3049         https://bugs.webkit.org/show_bug.cgi?id=163675
3050
3051         Reviewed by Brent Fulgham.
3052
3053         * Misc/WebDownload.mm:
3054         (-[WebDownload _initWithLoadingCFURLConnection:request:response:delegate:proxy:]):
3055         * Misc/WebDownloadInternal.h:
3056         * WebCoreSupport/WebFrameLoaderClient.mm:
3057         (WebFrameLoaderClient::convertMainResourceLoadToDownload):
3058         * WebView/WebPreferences.mm:
3059         (+[WebPreferences _setCurrentNetworkLoaderSessionCookieAcceptPolicy:]):
3060         * WebView/WebView.mm:
3061         (-[WebView scheduleInRunLoop:forMode:]):
3062         (-[WebView unscheduleFromRunLoop:forMode:]):
3063
3064 2016-10-19  Ryan Haddad  <ryanhaddad@apple.com>
3065
3066         Unreviewed, rolling out r207557.
3067
3068         This change caused animations/font-variations tests to time
3069         out on pre-Sierra Macs.
3070
3071         Reverted changeset:
3072
3073         "[macOS] [iOS] Disable variation fonts on macOS El Capitan and
3074         iOS 9"
3075         https://bugs.webkit.org/show_bug.cgi?id=163374
3076         http://trac.webkit.org/changeset/207557
3077
3078 2016-10-19  Chris Dumez  <cdumez@apple.com>
3079
3080         Move HTML Interactive Form Validation behind an experimental flag
3081         https://bugs.webkit.org/show_bug.cgi?id=163673
3082
3083         Reviewed by Daniel Bates.
3084
3085         Re-disable HTML Interactive Form Validation by default on Mac WK1.
3086
3087         * WebView/WebViewData.mm:
3088         (-[WebViewPrivate init]):
3089
3090 2016-10-19  Myles C. Maxfield  <mmaxfield@apple.com>
3091
3092         [macOS] [iOS] Disable variation fonts on macOS El Capitan and iOS 9
3093         https://bugs.webkit.org/show_bug.cgi?id=163374
3094
3095         Reviewed by Darin Adler.
3096
3097         * Configurations/FeatureDefines.xcconfig:
3098
3099 2016-10-19  Simon Fraser  <simon.fraser@apple.com>
3100
3101         WebView needs to initialize the visualViewportEnabled Setting from WebKit preferences
3102         https://bugs.webkit.org/show_bug.cgi?id=163680
3103
3104         Reviewed by Dean Jackson.
3105
3106         Add code to set the Setting from WebKit prefs. This code is a mess and needs to be autogenerated.
3107
3108         * WebView/WebView.mm:
3109         (-[WebView _preferencesChanged:]):
3110
3111 2016-10-19  Darin Adler  <darin@apple.com>
3112
3113         Move XPath from ExceptionCode to Exception
3114         https://bugs.webkit.org/show_bug.cgi?id=163656
3115
3116         Reviewed by Chris Dumez.
3117
3118         * DOM/DOMDocument.mm:
3119         (wrap): Added. Helper function for wrapping a resolver.
3120         (-[DOMDocument createExpression:resolver:]): Use raiseOnDOMError.
3121         (-[DOMDocument evaluate:contextNode:resolver:type:inResult:]): Ditto.
3122         * DOM/DOMXPathExpression.mm:
3123         (-[DOMXPathExpression evaluate:type:inResult:]): Ditto.
3124         * DOM/DOMXPathResult.mm:
3125         (-[DOMXPathResult numberValue]): Ditto.
3126         (-[DOMXPathResult stringValue]): Ditto.
3127         (-[DOMXPathResult booleanValue]): Ditto.
3128         (-[DOMXPathResult singleNodeValue]): Ditto.
3129         (-[DOMXPathResult snapshotLength]): Ditto.
3130         (-[DOMXPathResult iterateNext]): Ditto.
3131         (-[DOMXPathResult snapshotItem:]): Ditto.
3132
3133 2016-10-18  Sam Weinig  <sam@webkit.org>
3134
3135         Replace std::experimental::variant with WTF::Variant (or similar)
3136         https://bugs.webkit.org/show_bug.cgi?id=163626
3137
3138         Reviewed by Chris Dumez.
3139
3140         Rename std::experimental::variant, Variant. Move helpers get/holds_alternative/etc.
3141         into the WTF namespace.
3142
3143         * DOM/DOMHTMLSelectElement.mm:
3144         (-[DOMHTMLSelectElement add:before:]):
3145
3146 2016-10-18  Simon Fraser  <simon.fraser@apple.com>
3147
3148         Add a MiniBrowser menu item to apply page scale in WK1 and WK2
3149         https://bugs.webkit.org/show_bug.cgi?id=163627
3150
3151         Reviewed by Dean Jackson.
3152
3153         Add an explanatory comment about viewScaleFactor not really being viewScaleFactor.
3154
3155         * WebView/WebViewPrivate.h:
3156
3157 2016-10-18  Dean Jackson  <dino@apple.com>
3158
3159         Remove CSS_SHAPES feature definition. This should always be on.
3160         https://bugs.webkit.org/show_bug.cgi?id=163628
3161         <rdar://problem/28834613>
3162
3163         Reviewed by Tim Horton.
3164
3165         * Configurations/FeatureDefines.xcconfig:
3166
3167 2016-10-18  Chris Dumez  <cdumez@apple.com>
3168
3169         Leverage new union type support for HTMLSelectElement.add() / HTMLOptionsCollection.add()
3170         https://bugs.webkit.org/show_bug.cgi?id=163608
3171
3172         Reviewed by Ryosuke Niwa.
3173
3174         Update add() call sites now that it takes std::variant types in.
3175
3176         * DOM/DOMHTMLOptionsCollection.mm:
3177         (-[DOMHTMLOptionsCollection add:index:]):
3178         * DOM/DOMHTMLSelectElement.mm:
3179         (-[DOMHTMLSelectElement add:before:]):
3180
3181 2016-10-18  Anders Carlsson  <andersca@apple.com>
3182
3183         Get rid of more WebHistoryItem cruft
3184         https://bugs.webkit.org/show_bug.cgi?id=163623
3185
3186         Reviewed by Tim Horton.
3187
3188         * History/WebHistoryItem.mm:
3189         (-[WebHistoryItem initFromDictionaryRepresentation:]):
3190         * History/WebHistoryItemPrivate.h:
3191
3192 2016-10-18  Wenson Hsieh  <wenson_hsieh@apple.com>
3193
3194         Showing and hiding candidates list is very distracting after selecting word
3195         https://bugs.webkit.org/show_bug.cgi?id=163609
3196         <rdar://problem/28747712>
3197
3198         Reviewed by Tim Horton.
3199
3200         Introduce WebView hooks for mousedown and mouseup. See radar for more details.
3201
3202         * WebView/WebHTMLView.mm:
3203         (-[WebHTMLView mouseDown:mouseDown:]):
3204         (-[WebHTMLView mouseUp:mouseUp:]):
3205         * WebView/WebView.mm:
3206         (-[WebView prepareForMouseDown]):
3207         (-[WebView prepareForMouseUp]):
3208         * WebView/WebViewInternal.h:
3209
3210 2016-10-17  Anders Carlsson  <andersca@apple.com>
3211
3212         Move some history specific HistoryItem code to WebHistoryItem
3213         https://bugs.webkit.org/show_bug.cgi?id=163567
3214
3215         Reviewed by Tim Horton.
3216
3217         * History/HistoryPropertyList.mm:
3218         (HistoryPropertyListWriter::writeHistoryItem):
3219         * History/WebHistory.mm:
3220         (-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
3221         * History/WebHistoryItem.mm:
3222         (-[WebHistoryItem initFromDictionaryRepresentation:]):
3223         * History/WebHistoryItemInternal.h:
3224         * WebCoreSupport/WebFrameLoaderClient.mm:
3225         (addRedirectURL):
3226         (WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
3227
3228 2016-10-18  Eric Carlson  <eric.carlson@apple.com>
3229
3230         [MediaStream] Resolve constraints and enumerate devices in the UI process
3231         https://bugs.webkit.org/show_bug.cgi?id=162147
3232         <rdar://problem/28803569>
3233
3234         Reviewed by Darin Adler.
3235
3236         * WebCoreSupport/WebUserMediaClient.h:
3237         * WebCoreSupport/WebUserMediaClient.mm:
3238         (AddPermissionCheckToMap):
3239         (RemovePermissionCheckFromMap):
3240         (WebUserMediaClient::pageDestroyed):
3241         (WebUserMediaClient::requestUserMediaAccess):
3242         (WebUserMediaClient::enumerateMediaDevices):
3243         (WebUserMediaClient::cancelMediaDevicesEnumerationRequest):
3244         (-[WebUserMediaPolicyListener allow]):
3245         (-[WebUserMediaPolicyListener deny]):
3246         (-[WebUserMediaPolicyCheckerListener initWithMediaDevicesEnumerationRequest:]):
3247         (-[WebUserMediaPolicyCheckerListener cancelMediaDevicesEnumerationRequest]):
3248         (-[WebUserMediaPolicyCheckerListener allow]):
3249         (-[WebUserMediaPolicyCheckerListener deny]):
3250         (WebUserMediaClient::checkUserMediaPermission): Deleted.
3251         (WebUserMediaClient::cancelUserMediaPermissionCheck): Deleted.
3252         (-[WebUserMediaPolicyCheckerListener initWithUserMediaPermissionCheck:]): Deleted.
3253         (-[WebUserMediaPolicyCheckerListener cancelUserMediaPermissionCheck]): Deleted.
3254
3255 2016-10-17  Antti Koivisto  <antti@apple.com>
3256
3257         Rename setNeedsStyleRecalc to invalidateStyle
3258         https://bugs.webkit.org/show_bug.cgi?id=163542
3259
3260         Reviewed by Darin Adler.
3261
3262         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
3263         (-[WebHostedNetscapePluginView createPluginLayer]):
3264         * Plugins/WebNetscapePluginView.mm:
3265         (-[WebNetscapePluginView createPlugin]):
3266
3267 2016-10-17  Jeremy Jones  <jeremyj@apple.com>
3268
3269         Enable keyboard in fullscreen.
3270         https://bugs.webkit.org/show_bug.cgi?id=163146
3271
3272         Reviewed by Jer Noble.
3273
3274         Allow keyboard in fullscreen.
3275
3276         * WebView/WebView.mm:
3277         (-[WebView _supportsFullScreenForElement:withKeyboard:]):
3278
3279 2016-10-17  Chris Dumez  <cdumez@apple.com>
3280
3281         Move form.reportValidity() behind InteractiveFormValidation setting
3282         https://bugs.webkit.org/show_bug.cgi?id=163550
3283
3284         Reviewed by Darin Adler.
3285
3286         Enable InteractiveFormValidation setting by default and link it to
3287         RuntimeEnabledFeatures so we can use it in the IDL.
3288
3289         * WebView/WebView.mm:
3290         (-[WebView _preferencesChanged:]):
3291         * WebView/WebViewData.mm:
3292         (-[WebViewPrivate init]):
3293
3294 2016-10-17  Anders Carlsson  <andersca@apple.com>
3295
3296         Fix iOS build.
3297
3298         * History/WebBackForwardList.mm:
3299         (-[WebBackForwardList dictionaryRepresentation]):
3300
3301 2016-10-17  Anders Carlsson  <andersca@apple.com>
3302
3303         CTTE some of the BackForwardList member functions
3304         https://bugs.webkit.org/show_bug.cgi?id=163555
3305
3306         Reviewed by Dan Bernstein.
3307
3308         * History/BackForwardList.h:
3309         (BackForwardList::entries):
3310         * History/BackForwardList.mm:
3311         (BackForwardList::removeItem):
3312         (BackForwardList::containsItem):
3313         (BackForwardList::entries): Deleted.
3314         * History/WebBackForwardList.mm:
3315         (-[WebBackForwardList removeItem:]):
3316         (-[WebBackForwardList containsItem:]):
3317         (-[WebBackForwardList description]):
3318
3319 2016-10-17  Anders Carlsson  <andersca@apple.com>
3320
3321         Remove WEBCORE_EXPORT from BackForwardList, it lives in WebKit now
3322         https://bugs.webkit.org/show_bug.cgi?id=163551
3323
3324         Reviewed by Tim Horton.
3325
3326         * History/BackForwardList.h:
3327
3328 2016-10-16  Darin Adler  <darin@apple.com>
3329
3330         Move CSS classes from ExceptionCode to Exception
3331         https://bugs.webkit.org/show_bug.cgi?id=163494
3332
3333         Reviewed by Sam Weinig.
3334
3335         * DOM/DOMCSSMediaRule.mm:
3336         (-[DOMCSSMediaRule insertRule:index:]): Use raiseOnDOMError
3337         the new way to handle ExceptionOr instead of ExceptionCode.
3338         (-[DOMCSSMediaRule deleteRule:]): Ditto.
3339         * DOM/DOMCSSPrimitiveValue.mm:
3340         (-[DOMCSSPrimitiveValue setFloatValue:floatValue:]): Ditto.
3341         (-[DOMCSSPrimitiveValue getFloatValue:]): Ditto.
3342         (-[DOMCSSPrimitiveValue setStringValue:stringValue:]): Ditto.
3343         (-[DOMCSSPrimitiveValue getStringValue]): Ditto.
3344         (-[DOMCSSPrimitiveValue getCounterValue]): Ditto.
3345         (-[DOMCSSPrimitiveValue getRectValue]): Ditto.
3346         (-[DOMCSSPrimitiveValue getRGBColorValue]): Ditto.
3347         * DOM/DOMCSSRule.mm:
3348         (-[DOMCSSRule setCssText:]): Ditto.
3349         * DOM/DOMCSSStyleDeclaration.mm:
3350         (-[DOMCSSStyleDeclaration setCssText:]): Ditto.
3351         (-[DOMCSSStyleDeclaration removeProperty:]): Ditto.
3352         (-[DOMCSSStyleDeclaration setProperty:value:priority:]): Ditto.
3353         * DOM/DOMCSSStyleSheet.mm:
3354         (-[DOMCSSStyleSheet insertRule:index:]): Ditto.
3355         (-[DOMCSSStyleSheet deleteRule:]): Ditto.
3356         (-[DOMCSSStyleSheet addRule:style:index:]): Ditto.
3357         (-[DOMCSSStyleSheet removeRule:]): Ditto.
3358         * DOM/DOMCSSValue.mm:
3359         (-[DOMCSSValue setCssText:]): Ditto.
3360         * DOM/DOMMediaList.mm:
3361         (-[DOMMediaList setMediaText:]): Ditto.
3362         (-[DOMMediaList deleteMedium:]): Ditto.
3363         (-[DOMMediaList appendMedium:]): Ditto.
3364
3365         * DOM/ExceptionHandlers.h: Added an overload of raiseDOMException
3366         that works with a WebCore::Exception&& and overloads of
3367         raiseOnDOMError that work with WebCore::ExceptionOr&&.
3368         * DOM/ExceptionHandlers.mm:
3369         (raiseDOMException): Implemented the new version.
3370
3371 2016-10-15  Dan Bernstein  <mitz@apple.com>
3372
3373         REGRESSION (r191699): Contextual menu in Mail compose view doesn’t include any of the standard submenus
3374         https://bugs.webkit.org/show_bug.cgi?id=163492
3375         <rdar://problem/28654799>
3376
3377         Reviewed by Darin Adler.
3378
3379         Test: TestWebKitAPI/Tests/mac/ContextMenuDefaultItemsHaveTags.mm
3380
3381         * WebView/WebHTMLView.mm:
3382         (createMenuItem): Set the tag for items that have submenus as well.
3383
3384 2016-10-14  Anders Carlsson  <andersca@apple.com>
3385
3386         Clean up BackForwardClient
3387         https://bugs.webkit.org/show_bug.cgi?id=163454
3388
3389         Reviewed by Sam Weinig.
3390
3391         * History/BackForwardList.h:
3392         Remove override keywords.
3393
3394         * History/BackForwardList.mm:
3395         (BackForwardList::clearAllPageCaches): Deleted.
3396         Remove this, it's no longer used.
3397
3398         * WebView/WebView.mm:
3399         (-[WebView _clearBackForwardCache]): Deleted.
3400         * WebView/WebViewPrivate.h:
3401         Remove SPI that's no longer used by anyone.
3402
3403 2016-10-13  Anders Carlsson  <andersca@apple.com>
3404
3405         Move BackForwardList from WebCore to WebKitLegacy
3406         https://bugs.webkit.org/show_bug.cgi?id=163418
3407
3408         Reviewed by Tim Horton.
3409
3410         * History/BackForwardList.h: Renamed from Source/WebCore/history/BackForwardList.h.
3411         (BackForwardList::create):
3412         (BackForwardList::webView):
3413         * History/BackForwardList.mm: Renamed from Source/WebCore/history/BackForwardList.cpp.
3414         (BackForwardList::BackForwardList):
3415         (BackForwardList::close):
3416         (BackForwardList::containsItem):
3417         * History/WebBackForwardList.mm:
3418         (kit):
3419         (-[WebBackForwardList initWithBackForwardList:]):
3420         (-[WebBackForwardList setPageCacheSize:]):
3421         (-[WebBackForwardList pageCacheSize]):
3422         * History/WebBackForwardListInternal.h:
3423         * WebCoreSupport/WebFrameLoaderClient.mm:
3424         * WebView/WebFrameView.mm:
3425         * WebView/WebView.mm:
3426         (-[WebView _commonInitializationWithFrameName:groupName:]):
3427         (-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):
3428
3429 2016-10-13  Anders Carlsson  <andersca@apple.com>
3430
3431         Get rid of the HistoryItemVector typedef
3432         https://bugs.webkit.org/show_bug.cgi?id=163398
3433
3434         Reviewed by Beth Dakin.
3435
3436         Expand the HistoryitemVector typedef instead to make it more clear what types we are dealing with.
3437
3438         * History/WebBackForwardList.mm:
3439         (-[WebBackForwardList dictionaryRepresentation]):
3440         (vectorToNSArray):
3441         (-[WebBackForwardList backListWithLimit:]):
3442         (-[WebBackForwardList forwardListWithLimit:]):
3443         (-[WebBackForwardList description]):
3444         * History/WebHistoryItem.mm:
3445         (-[WebHistoryItem description]):
3446
3447 2016-10-12  Chris Dumez  <cdumez@apple.com>
3448
3449         [Web IDL] Drop support for legacy [ConstructorConditional=*]
3450         https://bugs.webkit.org/show_bug.cgi?id=163368
3451
3452         Reviewed by Ryosuke Niwa.
3453
3454         Drop ENABLE_DOM4_EVENTS_CONSTRUCTOR compiler flag.
3455
3456         * Configurations/FeatureDefines.xcconfig:
3457
3458 2016-10-12  Beth Dakin  <bdakin@apple.com>
3459
3460         Adobe Contribute CS 6.5 Trial crashes on launch
3461         https://bugs.webkit.org/show_bug.cgi?id=163365
3462         -and corresponding-
3463         <rdar://problem/28732731>
3464
3465         Reviewed by Tim Horton.
3466
3467         * Carbon/CarbonWindowFrame.m:
3468         (-[CarbonWindowFrame contentFill]):
3469
3470 2016-10-11  Daniel Bates  <dabates@apple.com>
3471
3472         Attempt to fix the Apple Internal Mac build following r207159
3473         (https://bugs.webkit.org/show_bug.cgi?id=163244)
3474
3475         * WebView/WebView.mm:
3476         (shouldRequireUserGestureToLoadVideo):
3477
3478 2016-10-11  Daniel Bates  <dabates@apple.com>
3479
3480         REGRESSION (r198251): -[UIWebView mediaPlaybackRequiresUserAction] defaults to NO
3481         https://bugs.webkit.org/show_bug.cgi?id=163259
3482         <rdar://problem/28680515>
3483
3484         Reviewed by Jer Noble.
3485
3486         In WebKit1 on iOS we want to require user action to load and play videos by default and
3487         allow an embedding app to change this behavior via -[UIWebView setMediaPlaybackRequiresUserAction:].
3488         Following r198251, -[UIWebView mediaPlaybackRequiresUserAction] defaults to NO and videos
3489         can load and play without being initiated by a user action.
3490
3491         * WebView/WebPreferences.mm:
3492         (+[WebPreferences initialize]): Initialize the default value of the deprecated preference
3493         WebKitRequiresUserGestureForMediaPlaybackPreferenceKey to YES on iOS. The value of this
3494         preference takes precedence over the values of its replacement preferences
3495         WebKitRequiresUserGestureForVideoPlaybackPreferenceKey and WebKitRequiresUserGestureForAudioPlaybackPreferenceKey.
3496
3497 2016-10-11  Daniel Bates  <dabates@apple.com>
3498
3499         [iOS] REGRESSION (r197953): User gesture required to load video in iOS 9-built apps
3500         https://bugs.webkit.org/show_bug.cgi?id=163244
3501         <rdar://problem/27250015>
3502
3503         Reviewed by Jer Noble.
3504
3505         Enable or disable the Setting::requiresUserGestureToLoadVideo() in legacy WebKit depending
3506         on the version of iOS SDK that the app was linked against. We require a user gesture to
3507         begin loading a video as of iOS 10.
3508
3509         * WebView/WebView.mm:
3510         (shouldRequireUserGestureToLoadVideo):
3511         (-[WebView _preferencesChanged:]): Modified to pass the WebKit requiresUserGestureToLoadVideo
3512         preference to WebCore.
3513
3514 2016-10-11  Alex Christensen  <achristensen@webkit.org>
3515
3516         Remove dead networking code
3517         https://bugs.webkit.org/show_bug.cgi?id=163263
3518
3519         Reviewed by Daniel Bates.
3520
3521         * Misc/WebDownload.mm:
3522         (-[WebDownload _initWithLoadingCFURLConnection:request:response:delegate:proxy:]): Deleted.
3523         * Misc/WebDownloadInternal.h:
3524         * WebCoreSupport/WebFrameLoaderClient.mm:
3525         (WebFrameLoaderClient::convertMainResourceLoadToDownload):
3526         * WebView/WebPreferences.mm:
3527         (+[WebPreferences _setCurrentNetworkLoaderSessionCookieAcceptPolicy:]):
3528         * WebView/WebView.mm:
3529         (-[WebView scheduleInRunLoop:forMode:]):
3530         (-[WebView unscheduleFromRunLoop:forMode:]):
3531
3532 2016-10-10  Zan Dobersek  <zdobersek@igalia.com>
3533
3534         Add ENABLE_ENCRYPTED_MEDIA configuration option
3535         https://bugs.webkit.org/show_bug.cgi?id=163219
3536
3537         Reviewed by Darin Adler.
3538
3539         * Configurations/FeatureDefines.xcconfig:
3540         Add the ENABLE_ENCRYPTED_MEDIA configuration option. It will be used
3541         to enable or disable the new EME implementation at build-time.
3542
3543 2016-10-10  Darin Adler  <darin@apple.com>
3544
3545         Move NotificationCenter from legacy to new DOM exceptions
3546         https://bugs.webkit.org/show_bug.cgi?id=163217
3547
3548         Reviewed by Chris Dumez.
3549
3550         * WebView/WebView.mm:
3551         (-[WebView _notificationIDForTesting:]): Pass reference to page rather than pointer.
3552
3553 2016-10-09  Wenson Hsieh  <wenson_hsieh@apple.com>
3554
3555         Support InputEvent.inputType for the new InputEvent spec
3556         https://bugs.webkit.org/show_bug.cgi?id=163025
3557         <rdar://problem/28658092>
3558
3559         Reviewed by Darin Adler.
3560
3561         Accounts for some changes to the EditAction enum in nameForEditAction. See WebCore ChangeLog
3562         entry for more details.
3563
3564         * WebCoreSupport/WebEditorClient.mm:
3565         (undoNameForEditAction):
3566
3567 2016-10-06  Darin Adler  <darin@apple.com>
3568
3569         Next step on moving to modern way to return DOM exceptions
3570         https://bugs.webkit.org/show_bug.cgi?id=163016
3571
3572         Reviewed by Ryosuke Niwa.
3573
3574         * DOM/DOMDOMImplementation.mm:
3575         (-[DOMImplementation createDocumentType:publicId:systemId:]): Updated for
3576         name change from takeReturnValue to releaseReturnValue.
3577         (-[DOMImplementation createDocument:qualifiedName:doctype:]): Ditto.
3578
3579 2016-10-07  Simon Fraser  <simon.fraser@apple.com>
3580
3581         [WK1 Mac] Fix repaints of fixed-background elements in layer-backed WebViews
3582         https://bugs.webkit.org/show_bug.cgi?id=163154
3583         rdar://problem/28674216
3584
3585         Reviewed by Tim Horton.
3586         
3587         r55159 added code to counteract AppKit's adjustment of dirty regions during scrolling,
3588         by offsetting the dirty rect in -setNeedsDisplayInRect: if the call happens during
3589         the NSViewBoundsDidChangeNotification handling.
3590         
3591         However, AppKit only does dirty region adjustment in the code path that blits ("copy
3592         on scroll"), so r55159 produces incorrect behavior in, for example, layer-backed views.
3593         
3594         Fix by overriding -[NSClipView _canCopyOnScrollForDeltaX:deltaY:] to know if a single
3595         scroll is going to blit, and only do adjustments in -setNeedsDisplayInRect: if it is.
3596
3597         * WebView/WebClipView.h:
3598         * WebView/WebClipView.mm:
3599         (-[WebClipView _immediateScrollToPoint:]):
3600         (-[WebClipView _canCopyOnScrollForDeltaX:deltaY:]):
3601         (-[WebClipView currentScrollIsBlit]):
3602         * WebView/WebHTMLView.mm:
3603         (-[WebHTMLView setNeedsDisplayInRect:]):
3604         (-[WebHTMLView drawRect:]):
3605
3606 2016-10-06  Youenn Fablet  <youenn@apple.com>
3607
3608         CachedResource client handling methods should take reference
3609         https://bugs.webkit.org/show_bug.cgi?id=163014
3610
3611         Reviewed by Alex Christensen.
3612
3613         * WebView/WebHTMLView.mm:
3614         (promisedDataClient):
3615
3616 2016-10-05  Myles C. Maxfield  <mmaxfield@apple.com>
3617
3618         Put variation fonts work behind a compile-time flag
3619         https://bugs.webkit.org/show_bug.cgi?id=162949
3620
3621         Reviewed by Simon Fraser.
3622
3623         * Configurations/FeatureDefines.xcconfig:
3624
3625 2016-10-05  Zan Dobersek  <zdobersek@igalia.com>
3626
3627         Rename ENABLE_ENCRYPTED_MEDIA_V2 to ENABLE_LEGACY_ENCRYPTED_MEDIA
3628         https://bugs.webkit.org/show_bug.cgi?id=162903
3629
3630         Reviewed by Alex Christensen.
3631
3632         Rename build guards for the remaining implementation of the legacy EME API
3633         to ENABLE_LEGACY_ENCRYPTED_MEDIA. This will allow for the future implementation
3634         of the near-finished API to be guarded with the simple ENABLE_ENCRYPTED_MEDIA guards.
3635
3636         * Configurations/FeatureDefines.xcconfig:
3637         * WebView/WebPreferences.mm:
3638         (+[WebPreferences initialize]):
3639         * WebView/WebView.mm:
3640         (-[WebView _preferencesChanged:]):
3641
3642 2016-10-04  Said Abou-Hallawa  <sabouhallawa@apple.com>
3643
3644         The dragged image should be the current frame only of the animated image
3645         https://bugs.webkit.org/show_bug.cgi?id=162109
3646
3647         Reviewed by Tim Horton.
3648
3649         * DOM/DOM.mm:
3650         (-[DOMElement image]): Call the Image function with its new name.
3651         (-[DOMElement _imageTIFFRepresentation]): Ditto.
3652         * Misc/WebElementDictionary.mm:
3653         (-[WebElementDictionary _image]): Call the Image function with its new name.
3654         * Misc/WebIconDatabase.mm:
3655         (-[WebIconDatabase defaultIconWithSize:]): Call snapshotNSImage() to create the icon image.
3656         (webGetNSImage): Call the Image function with its new name.
3657         * WebCoreSupport/WebContextMenuClient.mm:
3658         (WebContextMenuClient::imageForCurrentSharingServicePickerItem): Call snapshotNSImage() instead of nsImage()..
3659         (WebContextMenuClient::contextMenuForEvent): Ditto.
3660         * WebView/WebHTMLView.mm:
3661         (-[WebHTMLView pasteboard:provideDataForType:]): Call the Image function with its new name.
3662
3663 2016-10-02  Ryan Haddad  <ryanhaddad@apple.com>
3664
3665         Unreviewed, rolling out r206683.
3666
3667         This change caused API test WebKit2.FindMatches to fail on
3668         Mac.
3669
3670         Reverted changeset:
3671
3672         "The dragged image should be the current frame only of the
3673         animated image"
3674         https://bugs.webkit.org/show_bug.cgi?id=162109
3675         http://trac.webkit.org/changeset/206683
3676
3677 2016-09-30  Said Abou-Hallawa  <sabouhallawa@apple.com>
3678
3679         The dragged image should be the current frame only of the animated image
3680         https://bugs.webkit.org/show_bug.cgi?id=162109
3681
3682         Reviewed by Tim Horton.
3683
3684         * DOM/DOM.mm:
3685         (-[DOMElement image]): Call the Image function with its new name.
3686         (-[DOMElement _imageTIFFRepresentation]): Ditto.
3687         * Misc/WebElementDictionary.mm:
3688         (-[WebElementDictionary _image]): Call the Image function with its new name.
3689         * Misc/WebIconDatabase.mm:
3690         (-[WebIconDatabase defaultIconWithSize:]): Call currentFrameNSImage() to create the icon image.
3691         (webGetNSImage): Call the Image function with its new name.
3692         * WebCoreSupport/WebContextMenuClient.mm:
3693         (WebContextMenuClient::imageForCurrentSharingServicePickerItem): Call currentFrameNSImage() instead of nsImage()..
3694         (WebContextMenuClient::contextMenuForEvent): Ditto.
3695         * WebView/WebHTMLView.mm:
3696         (-[WebHTMLView pasteboard:provideDataForType:]): Call the Image function with its new name.
3697
3698 2016-09-27  Jer Noble  <jer.noble@apple.com>
3699
3700         Remove deprecated ENCRYPTED_MEDIA implementation.
3701         https://bugs.webkit.org/show_bug.cgi?id=161010
3702
3703         Remove ENABLE_ENCRYPTED_MEDIA.
3704
3705         Reviewed by Eric Carlson.
3706
3707         * Configurations/FeatureDefines.xcconfig:
3708
3709 2016-09-26  Daniel Bates  <dabates@apple.com>
3710
3711         Rename IOS_TEXT_AUTOSIZING to TEXT_AUTOSIZING
3712         https://bugs.webkit.org/show_bug.cgi?id=162365
3713
3714         Reviewed by Simon Fraser.
3715
3716         * Configurations/FeatureDefines.xcconfig:
3717         * WebView/WebFrame.mm:
3718         * WebView/WebPreferences.mm:
3719         (+[WebPreferences initialize]):
3720         * WebView/WebView.mm:
3721         (-[WebView _preferencesChanged:]):
3722
3723 2016-09-25  Antti Koivisto  <antti@apple.com>
3724
3725         AuthorStyleSheets shouldn't trigger synchronous style resolutions
3726         https://bugs.webkit.org/show_bug.cgi?id=162532
3727
3728         Reviewed by Darin Adler.
3729
3730         * WebView/WebHTMLView.mm:
3731         (-[WebHTMLView reapplyStyles]):
3732         (-[WebHTMLView _setPrinting:minimumPageLogicalWidth:logicalHeight:originalPageWidth:originalPageHeight:maximumShrinkRatio:adjustViewSize:paginateScreenContent:]):
3733
3734 2016-09-24  Antti Koivisto  <antti@apple.com>
3735
3736         Move stylesheet change logic from Document to AuthorStyleSheets
3737         https://bugs.webkit.org/show_bug.cgi?id=162488
3738
3739         Reviewed by Andreas Kling.
3740
3741         * WebView/WebHTMLView.mm:
3742         (-[WebHTMLView reapplyStyles]):
3743         (-[WebHTMLView _setPrinting:minimumPageLogicalWidth:logicalHeight:originalPageWidth:originalPageHeight:maximumShrinkRatio:adjustViewSize:paginateScreenContent:]):
3744
3745 2016-09-23  Caitlin Potter  <caitp@igalia.com>
3746
3747         [JSC] Implement parsing of Async Functions
3748         https://bugs.webkit.org/show_bug.cgi?id=161409
3749
3750         Reviewed by Yusuke Suzuki.
3751
3752         * Configurations/FeatureDefines.xcconfig:
3753
3754 2016-09-23  Commit Queue  <commit-queue@webkit.org>
3755
3756         Unreviewed, rolling out r206311.
3757         https://bugs.webkit.org/show_bug.cgi?id=162495
3758
3759         Broke internal iOS build (Requested by anttik on #webkit).
3760
3761         Reverted changeset:
3762
3763         "Move stylesheet change logic from Document to
3764         AuthorStyleSheets"
3765         https://bugs.webkit.org/show_bug.cgi?id=162488
3766         http://trac.webkit.org/changeset/206311
3767
3768 2016-09-23  Antoine Quint  <graouts@apple.com>
3769
3770         Add a new runtime flag for work on modern media controls (off by default)
3771         https://bugs.webkit.org/show_bug.cgi?id=162420
3772         <rdar://problem/27989489>
3773
3774         Reviewed by Eric Carlson.
3775
3776         * WebView/WebPreferenceKeysPrivate.h:
3777         * WebView/WebPreferences.mm:
3778         (-[WebPreferences modernMediaControlsEnabled]):
3779         (-[WebPreferences setModernMediaControlsEnabled:]):
3780         * WebView/WebPreferencesPrivate.h:
3781         * WebView/WebView.mm:
3782         (-[WebView _preferencesChanged:]):
3783
3784 2016-09-21  Anders Carlsson  <andersca@apple.com>
3785
3786         Support openPaymentSetup API on ApplePaySession object
3787         https://bugs.webkit.org/show_bug.cgi?id=162357
3788         rdar://problem/26776939
3789
3790         Reviewed by Tim Horton.
3791
3792         Add openPaymentSetup stub.
3793
3794         * WebCoreSupport/WebPaymentCoordinatorClient.h:
3795         * WebCoreSupport/WebPaymentCoordinatorClient.mm:
3796         (WebPaymentCoordinatorClient::openPaymentSetup):
3797
3798 2016-09-19  Daniel Bates  <dabates@apple.com>
3799
3800         Remove ENABLE(TEXT_AUTOSIZING) automatic text size adjustment code
3801         https://bugs.webkit.org/show_bug.cgi?id=162167
3802
3803         Reviewed by Simon Fraser.
3804
3805         * Configurations/FeatureDefines.xcconfig:
3806
3807 2016-09-19  Joseph Pecoraro  <pecoraro@apple.com>
3808
3809         Web Inspector: Bring the inspected page's window forward when activating element search
3810         https://bugs.webkit.org/show_bug.cgi?id=162114
3811         <rdar://problem/28349357>
3812
3813         Reviewed by Brian Burg.
3814
3815         * WebCoreSupport/WebInspectorClient.mm:
3816         (WebInspectorClient::didSetSearchingForNode):
3817         When element search is activated bring the window
3818         containing the inspected page to the foreground.
3819
3820 2016-09-15  Brady Eidson  <beidson@apple.com>
3821
3822         WKWebView.hasOnlySecureContent always returns "YES" after going back to a CachedPage (even if it has http resources).
3823         <rdar://problem/27681261> and https://bugs.webkit.org/show_bug.cgi?id=162043
3824
3825         Reviewed by Brent Fulgham. 
3826
3827         * WebCoreSupport/WebFrameLoaderClient.h:
3828         * WebCoreSupport/WebFrameLoaderClient.mm:
3829         (WebFrameLoaderClient::dispatchDidCommitLoad):
3830
3831 2016-09-15  Anders Carlsson  <andersca@apple.com>
3832
3833         This was supposed to be committed with the previous patch!
3834
3835         * Plugins/WebBasePluginPackage.mm:
3836         (pathByResolvingSymlinksAndAliases): Deleted.
3837
3838 2016-09-15  Anders Carlsson  <andersca@apple.com>
3839
3840         Replace use of Carbon file system APIs in plug-in loading
3841         https://bugs.webkit.org/show_bug.cgi?id=162040
3842         rdar://problem/6017896
3843
3844         Reviewed by Sam Weinig.
3845
3846         * Plugins/WebBasePluginPackage.mm:
3847         (-[WebBasePluginPackage initWithPath:]):
3848         Use -[NSString stringByResolvingSymlinksInPath] directly here. We already check for duplicate bundle IDs, so there's no need to try
3849         to resolve aliases as well (and the modern WebKit plug-in implementation doesn't do this).
3850
3851 2016-09-15  Beth Dakin  <bdakin@apple.com>
3852
3853         Need hasMarkedText on Mac
3854         https://bugs.webkit.org/show_bug.cgi?id=162026
3855         -and corresponding-
3856         rdar://problem/28272353
3857
3858         Reviewed by Anders Carlsson.
3859
3860         * WebView/WebHTMLViewInternal.h:
3861
3862 2016-09-12  Dean Jackson  <dino@apple.com>
3863
3864         Replace RGBA32 with Color in member variables
3865         https://bugs.webkit.org/show_bug.cgi?id=161856
3866         <rdar://problem/28254324>
3867
3868         Reviewed by Simon Fraser.
3869
3870         In preparation for the Color class to become more than
3871         just a 4-byte RGBA value, I went through a few places
3872         that were using the RGBA32 type directly, and replaced
3873         them with Color. This will make some objects a little
3874         bigger e.g. BorderValue and its friends.
3875
3876         I mostly looked at the places that were using RGBA32 as
3877         a member variable. There is still a lot of RGBA32 use
3878         around the project, in particular the CSS parser.
3879
3880         There should be no behaviour change.
3881
3882         * Misc/WebKitNSStringExtras.mm:
3883         (-[NSString _web_drawAtPoint:font:textColor:allowingFontSmoothing:]): Explicitly
3884         call a Color constructor, rather than passing an RGBA32.
3885
3886 2016-09-13  Chris Dumez  <cdumez@apple.com>
3887
3888         Drop support for <isindex>
3889         https://bugs.webkit.org/show_bug.cgi?id=7139
3890
3891         Reviewed by Ryosuke Niwa.
3892
3893         Drop references to isindex.
3894
3895         * WebCoreSupport/WebEditorClient.mm:
3896         (attributesForAttributedStringConversion):
3897         * WebView/WebHTMLView.mm:
3898         (+[WebHTMLView _excludedElementsForAttributedStringConversion]):
3899
3900 2016-09-12  Chris Dumez  <cdumez@apple.com>
3901
3902         Switch remaining users of Document::inPageCache() to pageCacheState()
3903         https://bugs.webkit.org/show_bug.cgi?id=161865
3904
3905         Reviewed by Darin Adler.
3906
3907         Switch remaining users of Document::inPageCache() to pageCacheState() as
3908         the former one is confusing (given that it returns true while the
3909         pagehide event is being fired).
3910
3911         * WebView/WebHTMLView.mm:
3912         (-[WebHTMLView layoutToMinimumPageWidth:height:originalPageWidth:originalPageHeight:maximumShrinkRatio:adjustingViewSize:]):
3913         (-[WebHTMLView setNeedsLayout:]):
3914         (-[WebHTMLView setNeedsToApplyStyles:]):
3915
3916 2016-09-09  Tim Horton  <timothy_horton@apple.com>
3917
3918         Text replacement candidates don't always overwrite the entire original string
3919         https://bugs.webkit.org/show_bug.cgi?id=161779
3920         <rdar://problem/28033492>
3921
3922         Reviewed by Simon Fraser.
3923
3924         * WebCoreSupport/WebEditorClient.mm:
3925         (WebEditorClient::requestCandidatesForSelection):
3926         Make use of the shared implementation of contextRangeForCandidateRequest.
3927
3928 2016-09-08  Said Abou-Hallawa  <sabouhallawa@apple.com>
3929
3930         Move the BitmapImage platform dependent code to a new file named NativeImage[CG|Cairo].cpp
3931         https://bugs.webkit.org/show_bug.cgi?id=158684
3932
3933         Reviewed by Simon Fraser.
3934
3935         * DOM/DOM.mm:
3936         (-[DOMNode getPreviewSnapshotImage:andRects:]):
3937         * Misc/WebCache.mm:
3938         (+[WebCache imageForURL:]):
3939         Replace BitmapImage::getCGImageRef() with BitmapImage::nativeImage().
3940
3941 2016-09-07  Joseph Pecoraro  <pecoraro@apple.com>
3942
3943         [Mac] Address some clang static analyzer warnings in WebKit
3944         https://bugs.webkit.org/show_bug.cgi?id=161597
3945
3946         Reviewed by Darin Adler.
3947
3948         * Misc/WebIconDatabase.h:
3949         Remove unused instance variable. It has not been used since r16005 (2006)!
3950
3951         * Misc/WebSharingServicePickerController.mm:
3952         (-[WebSharingServicePickerController sharingServicePicker:sharingServicesForItems:mask:proposedSharingServices:]):
3953         Address array leak.
3954
3955         * WebCoreSupport/WebSelectionServiceController.mm:
3956         (WebSelectionServiceController::hasRelevantSelectionServices):
3957         Address attachment and cell leak.
3958
3959         * WebView/WebFullScreenController.h:
3960         * WebView/WebImmediateActionController.h:
3961         Remove unused instance variables.
3962
3963 2016-09-07  Simon Fraser  <simon.fraser@apple.com>
3964
3965         Enable the <meter> element on iOS
3966         https://bugs.webkit.org/show_bug.cgi?id=161714
3967         rdar://problem/8978410
3968
3969         Reviewed by Tim Horton.
3970
3971         Define ENABLE_METER_ELEMENT unconditionally now.
3972
3973         * Configurations/FeatureDefines.xcconfig:
3974
3975 2016-09-07  Mark Lam  <mark.lam@apple.com>
3976
3977         Add CatchScope and force all exception checks to be via ThrowScope or CatchScope.
3978         https://bugs.webkit.org/show_bug.cgi?id=161498
3979
3980         Reviewed by Geoffrey Garen.
3981
3982         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3983         (WebKit::NetscapePluginInstanceProxy::evaluate):
3984         (WebKit::NetscapePluginInstanceProxy::invoke):
3985         (WebKit::NetscapePluginInstanceProxy::invokeDefault):
3986         (WebKit::NetscapePluginInstanceProxy::construct):
3987         (WebKit::NetscapePluginInstanceProxy::getProperty):
3988         (WebKit::NetscapePluginInstanceProxy::setProperty):
3989         (WebKit::NetscapePluginInstanceProxy::removeProperty):
3990         (WebKit::NetscapePluginInstanceProxy::hasProperty):
3991         (WebKit::NetscapePluginInstanceProxy::hasMethod):
3992         (WebKit::NetscapePluginInstanceProxy::enumerate):
3993         * WebView/WebView.mm:
3994         (aeDescFromJSValue):
3995
3996 2016-09-07  Youenn Fablet  <youenn@apple.com>
3997
3998         [Streams API] Separate compile flag for ReadableStream and WritableStream
3999         https://bugs.webkit.org/show_bug.cgi?id=161044
4000
4001         Reviewed by Alex Christensen.
4002
4003         Moving from STREAMS_API to READABLE_STREAM_API and WRITABLE_STREAM_API compilation flags.
4004
4005         * Configurations/FeatureDefines.xcconfig:
4006
4007 2016-09-06  Chris Dumez  <cdumez@apple.com>
4008
4009         Add support for input.minLength / textArea.minLength
4010         https://bugs.webkit.org/show_bug.cgi?id=161644
4011
4012         Reviewed by Darin Adler.
4013
4014         Update ObjC bindings to reflect method renaming.
4015
4016         * DOM/DOMHTMLInputElement.mm:
4017         (-[DOMHTMLInputElement maxLength]):
4018         (-[DOMHTMLInputElement setMaxLength:]):
4019         * DOM/DOMHTMLTextAreaElement.mm:
4020         (-[DOMHTMLTextAreaElement maxLength]):
4021         (-[DOMHTMLTextAreaElement setMaxLength:]):
4022
4023 2016-09-06  Dan Bernstein  <mitz@apple.com>
4024
4025         <rdar://problem/8064563> Ugly NSLog in DOMInternal.mm
4026
4027         Rubber-stamped by Anders Carlsson.
4028
4029         * DOM/DOMInternal.mm:
4030         (-[WebScriptObject _initializeScriptDOMNodeImp]): Removed useless call to NSLog.
4031
4032 2016-09-06  Ryan Haddad  <ryanhaddad@apple.com>
4033
4034         Unreviewed, rolling out r205407.
4035
4036         Not the correct way to implement this functionality
4037
4038         Reverted changeset:
4039
4040         "Consult with the FrameLoaderClient about whether or not
4041         content extensions should be enabled when loading this URL."
4042         https://bugs.webkit.org/show_bug.cgi?id=161441
4043         http://trac.webkit.org/changeset/205407
4044
4045 2016-09-05  Darin Adler  <darin@apple.com>
4046
4047         More bindings improvements, particularly things not needed for JavaScript bindings
4048         https://bugs.webkit.org/show_bug.cgi?id=161572
4049
4050         Reviewed by Sam Weinig.
4051
4052         * DOM/DOMDOMImplementation.mm:
4053         (-[DOMImplementation hasFeature:version:]): Call SVGTests::hasFeatureForLegacyBindings
4054         instead of DOMImplementation::hasFeature. Also removed JSMainThreadNullState
4055         since this does not do anything that can invoke JavaScript.
4056
4057         * DOM/DOMDocument.mm:
4058         (-[DOMDocument defaultCharset]): Call defaultCharsetForLegacyBindings. Also removed
4059         JSMainThreadNullState.
4060
4061         * DOM/DOMDocumentType.mm:
4062         (-[DOMDocumentType entities]): Changed to simply return nil; same behavior as before,
4063         but with no dependency on WebCore. Also removed JSMainThreadNullState.
4064         (-[DOMDocumentType notations]): Ditto.
4065         (-[DOMDocumentType internalSubset]): Ditto, except empty string rather than nil.
4066
4067         * DOM/DOMNode.mm:
4068         (-[DOMNode isSupported:version:]): Call SVGTests::hasFeatureForLegacyBindings
4069         instead of Node::isSupportedForBindings. Also removed JSMainThreadNullState.
4070
4071 2016-09-04  Joseph Pecoraro  <pecoraro@apple.com>
4072
4073         Remove unnecessary RetainPtr.
4074
4075         Review comments on earlier change.
4076
4077         * WebView/WebImmediateActionController.mm:
4078         (-[WebImmediateActionController _defaultAnimationController]):
4079
4080 2016-09-03  Darin Adler  <darin@apple.com>
4081
4082         Streamline DOMImplementation, and move it to our new DOM exception system
4083         https://bugs.webkit.org/show_bug.cgi?id=161295
4084
4085         Reviewed by Ryosuke Niwa.
4086
4087         * DOM/DOMDOMImplementation.mm:
4088         (unwrap): Added. Use this instead of the IMPL macro.
4089         (-[DOMImplementation dealloc]): Updated to use unwrap.
4090         (-[DOMImplementation hasFeature:version:]): Ditto.
4091         (-[DOMImplementation createDocumentType:publicId:systemId:]): Updated to work with
4092         ExceptionOr.
4093         (-[DOMImplementation createDocument:qualifiedName:doctype:]): Ditto.
4094         (-[DOMImplementation createCSSStyleSheet:media:]): Removed exception logic since
4095         this function can no longer raise an exception.
4096         (-[DOMImplementation createHTMLDocument:]): Updated to use unwrap.
4097         (-[DOMImplementation hasFeature::]): Changed to call the non-deprecated version
4098         rather than duplicating its implementation. Also moved into the category as defined
4099         in the header.
4100         (-[DOMImplementation createDocumentType:::]): Ditto.
4101         (-[DOMImplementation createDocument:::]): Ditto.
4102         (-[DOMImplementation createCSSStyleSheet::]): Ditto.
4103
4104         * DOM/DOMDocument.mm: Removed unneeded include of DOMImplementation.h.
4105         (-[DOMDocument setXmlStandalone:]): Updated since setXMLStandalone no longer can
4106         raise an exception.
4107
4108         * WebView/WebFrame.mm:
4109         (-[WebFrame _canProvideDocumentSource]): Updated to use isTextMIMEType in its new
4110         location in MIMETypeRegistry instead of in DOMImplementation.
4111
4112 2016-09-03  Brian Weinstein  <bweinstein@apple.com>
4113
4114         Implement a stub version of FrameLoaderClient::shouldUseContentExtensionsForURL.
4115         https://bugs.webkit.org/show_bug.cgi?id=16144
4116
4117         Reviewed by Darin Adler.
4118
4119         * WebCoreSupport/WebFrameLoaderClient.h:
4120
4121 2016-09-02  Beth Dakin  <bdakin@apple.com>
4122
4123         Need to updateEditorState if an element change edit-ability without changing 
4124         selection
4125         https://bugs.webkit.org/show_bug.cgi?id=161546
4126         -and corresponding-
4127         rdar://problem/27806012
4128
4129         Reviewed by Ryosuke Niwa.
4130
4131         Every time WebEditorClient::respondToChangedSelection is called, we now save 
4132         whether the last state was contentEditable. That way in 
4133         updateEditorStateAfterLayoutIfNeeded() we can assess whether or not edit-ability 
4134         has changed. 
4135
4136         * WebCoreSupport/WebEditorClient.h:
4137         * WebCoreSupport/WebEditorClient.mm:
4138         (WebEditorClient::respondToChangedSelection):
4139         (WebEditorClient:: updateEditorStateAfterLayoutIfEditabilityChanged):
4140
4141 2016-09-02  Joseph Pecoraro  <pecoraro@apple.com>
4142
4143         [Mac] RetainPtr misuse, AnimationController leaks
4144         https://bugs.webkit.org/show_bug.cgi?id=161552
4145
4146         Reviewed by Tim Horton.
4147
4148         * WebView/WebImmediateActionController.mm:
4149         (-[WebImmediateActionController _defaultAnimationController]):
4150
4151 2016-07-08  Jer Noble  <jer.noble@apple.com>
4152
4153         Refactor WebPlaybackSessionModelMediaElement to be client based.
4154         https://bugs.webkit.org/show_bug.cgi?id=159580
4155
4156         Reviewed by Eric Carlson.
4157
4158         No longer necessary to tell the models and interfaces about each other.
4159
4160         * WebView/WebView.mm:
4161         (-[WebView _setUpPlaybackControlsManagerForMediaElement:]):
4162         (-[WebView _clearPlaybackControlsManager]):
4163
4164 2016-09-01  Dan Bernstein  <mitz@apple.com>
4165
4166         Build fix.
4167
4168         * Configurations/FeatureDefines.xcconfig:
4169
4170 2016-09-01  Myles C. Maxfield  <mmaxfield@apple.com>
4171
4172         Clean up TextRun-related code
4173         https://bugs.webkit.org/show_bug.cgi?id=161473
4174
4175         Reviewed by Simon Fraser.
4176
4177         Remove unused #includes.