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