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