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