Web Inspector: Instrument active pixel memory used by canvases
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2017-06-28  Devin Rousso  <drousso@apple.com>
2
3         Web Inspector: Instrument active pixel memory used by canvases
4         https://bugs.webkit.org/show_bug.cgi?id=173087
5         <rdar://problem/32719261>
6
7         Reviewed by Joseph Pecoraro.
8
9         Test: inspector/canvas/memory.html
10
11         * html/HTMLCanvasElement.cpp:
12         (WebCore::HTMLCanvasElement::setImageBuffer):
13         * inspector/InspectorCanvasAgent.h:
14         * inspector/InspectorCanvasAgent.cpp:
15         (WebCore::InspectorCanvasAgent::didChangeCanvasMemory):
16         (WebCore::InspectorCanvasAgent::buildObjectForCanvas):
17         * inspector/InspectorInstrumentation.h:
18         * inspector/InspectorInstrumentation.cpp:
19         (WebCore::InspectorInstrumentation::didChangeCanvasMemory):
20         (WebCore::InspectorInstrumentation::didChangeCanvasMemoryImpl):
21
22 2017-06-28  Alex Christensen  <achristensen@webkit.org>
23
24         Prevent displaying URLs with small capital letters
25         https://bugs.webkit.org/show_bug.cgi?id=173949
26         <rdar://problem/32952058>
27
28         Reviewed by Brent Fulgham.
29
30         Covered by new API tests.
31
32         * platform/mac/WebCoreNSURLExtras.mm:
33         (WebCore::isLookalikeCharacter):
34
35 2017-06-28  Youenn Fablet  <youenn@apple.com>
36
37         Support PeerConnectionStates::BundlePolicy::MaxBundle when setting rtc configuration
38         https://bugs.webkit.org/show_bug.cgi?id=169389
39
40         Reviewed by Alex Christensen.
41
42         Covered by manual testing (appr.tc and https://youennf.github.io/webrtc-tests/src/content/peerconnection/trickle-ice/).
43         Previously, we were creating a libwebrtc peer connection and then setting its configuration.
44         libwebrtc does not like the configuration to be changed and may refuse to set the configuration.
45         Instead of doing that, we are now creating the libwebrtc peer connection with the provided configuration.
46
47         * Modules/mediastream/MediaEndpointPeerConnection.cpp:
48         (WebCore::MediaEndpointPeerConnection::setConfiguration):
49         * Modules/mediastream/MediaEndpointPeerConnection.h:
50         * Modules/mediastream/PeerConnectionBackend.h:
51         * Modules/mediastream/RTCPeerConnection.cpp:
52         (WebCore::RTCPeerConnection::initializeWith):
53         (WebCore::iceServersFromConfiguration):
54         (WebCore::RTCPeerConnection::initializeConfiguration):
55         (WebCore::RTCPeerConnection::setConfiguration):
56         * Modules/mediastream/RTCPeerConnection.h:
57         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
58         (WebCore::LibWebRTCMediaEndpoint::LibWebRTCMediaEndpoint):
59         (WebCore::LibWebRTCMediaEndpoint::setConfiguration):
60         (WebCore::LibWebRTCMediaEndpoint::stop):
61         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
62         * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
63         (WebCore::configurationFromMediaEndpointConfiguration):
64         (WebCore::LibWebRTCPeerConnectionBackend::setConfiguration):
65         * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
66         * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
67         (WebCore::createActualPeerConnection):
68         (WebCore::LibWebRTCProvider::createPeerConnection):
69         * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
70
71 2017-06-28  Brent Fulgham  <bfulgham@apple.com>
72
73         Teach ResourceLoadStatistics to recognize changes in the file system
74         https://bugs.webkit.org/show_bug.cgi?id=173800
75         <rdar://problem/32937842>
76
77         Reviewed by Chris Dumez.
78
79         We want to support the case where multiple UI processes choose to share the same
80         statistics file. To support this, update the ResourceLoadStatistics logic to be aware
81         that the statistics data file might change underneath it, and to take appropriate
82         action when it does.
83
84         * WebCore.xcodeproj/project.pbxproj: Update for new sources.
85         * WebCore/CMakeLists.txt: Update for new FileMonitor source file.
86         * loader/ResourceLoadStatisticsStore.cpp:
87         (WebCore::ResourceLoadStatisticsStore::clearInMemoryAndPersistent): Use the new deletion
88         handler for the data file instead of writing out an empty file.
89         (WebCore::ResourceLoadStatisticsStore::setDeletePersistentStoreCallback): Added.
90         * loader/ResourceLoadStatisticsStore.h:
91         * platform/FileMonitor.cpp: Added.
92         (WebCore::FileMonitor::create):
93         (WebCore::FileMonitor::FileMonitor): Register handlers and begin monitoring file.
94         (WebCore::FileMonitor::~FileMonitor): Stop any active file monitoring.
95         (WebCore::FileMonitor::startMonitoringPath): Stub implementation.
96         (WebCore::FileMonitor::stopMonitoring): Ditto.
97         * platform/FileMonitor.h: Added.
98         * platform/FileSystem.h: Export files needed by WebKit2. Add support for O_EVTONLY
99         Darwin file handles.
100         * platform/Logging.h: Add 'ResourceLoadStatistics' category.
101         * platform/cocoa/FileMonitorCocoa.mm: Added.
102         (WebCore::FileMonitor::startMonitoringPath): Create a new VNODE type dispatch_source
103         to receive notifications when the specified file changes.
104         (WebCore::FileMonitor::stopMonitoring): Cancel the dispatch_source when we are done
105         monitoring the file.
106         * platform/posix/FileSystemPOSIX.cpp: Update 'openFile' to understand the O_EVTONLY
107         mode of file handles (Darwin-only). 
108
109 2017-06-28  Brady Eidson  <beidson@apple.com>
110
111         DocumentLoader should always notify the client if there are pending icon loads when the load is stopped.
112         https://bugs.webkit.org/show_bug.cgi?id=173874
113
114         Reviewed by Alex Christensen.
115
116         Covered by API tests.
117
118         Patch started by Carlos Garcia Campos, finished by me.
119         
120         * loader/DocumentLoader.cpp:
121         (WebCore::DocumentLoader::stopLoading): Make all of the callbacks for cancelled IconLoaders.
122         (WebCore::DocumentLoader::didGetLoadDecisionForIcon): Make the callback even if there's no IconLoader.
123         (WebCore::DocumentLoader::finishedLoadingIcon):
124         (WebCore::DocumentLoader::notifyFinishedLoadingIcon):
125         * loader/DocumentLoader.h:
126
127 2017-06-28  Antoine Quint  <graouts@apple.com>
128
129         Volume controls should be hidden when AirPlay is active
130         https://bugs.webkit.org/show_bug.cgi?id=173933
131         <rdar://problem/33011931>
132
133         Reviewed by Dean Jackson.
134
135         Ensure we don't show any volume controls during AirPlay. We set the mute button's enabled state to "false"
136         when AirPlay is active and key off this enabled stated to control the display of all volume-related controls
137         throughout the UI.
138
139         Tests: media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-volume-controls-hidden-when-mute-button-disabled.html
140                media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-top-right-controls-bar-hidden-when-mute-button-disabled.html
141
142         * Modules/modern-media-controls/controls/inline-media-controls.js:
143         (InlineMediaControls.prototype._addTopRightBarWithMuteButtonToChildren):
144         (InlineMediaControls):
145         * Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js:
146         (MacOSFullscreenMediaControls.prototype.layout):
147         * Modules/modern-media-controls/media/airplay-support.js:
148         (AirplaySupport.prototype.syncControl):
149         (AirplaySupport):
150
151 2017-06-28  Konstantin Tokarev  <annulen@yandex.ru>
152
153         Remove excessive includes from WebCore/css sources
154         https://bugs.webkit.org/show_bug.cgi?id=173919
155
156         Reviewed by Simon Fraser.
157
158         No new tests needed.
159
160         * css/CSSCanvasValue.cpp:
161         * css/CSSComputedStyleDeclaration.cpp:
162         * css/CSSContentDistributionValue.cpp:
163         * css/CSSCrossfadeValue.cpp:
164         * css/CSSCursorImageValue.cpp:
165         * css/CSSCustomPropertyValue.cpp:
166         * css/CSSDefaultStyleSheets.cpp:
167         * css/CSSFilterImageValue.cpp:
168         * css/CSSFontFace.cpp:
169         * css/CSSFontFaceSet.cpp:
170         * css/CSSFontFaceSource.cpp:
171         * css/CSSFontFaceSrcValue.cpp:
172         * css/CSSFontFeatureValue.cpp:
173         * css/CSSFontSelector.cpp:
174         * css/CSSFontValue.cpp:
175         * css/CSSImageGeneratorValue.cpp:
176         * css/CSSImageSetValue.cpp:
177         * css/CSSImageValue.cpp:
178         * css/CSSImportRule.cpp:
179         * css/CSSKeyframesRule.cpp:
180         * css/CSSMediaRule.cpp:
181         * css/CSSNamedImageValue.cpp:
182         * css/CSSPrimitiveValue.cpp:
183         * css/CSSProperty.cpp:
184         * css/CSSPropertySourceData.cpp:
185         * css/CSSReflectValue.cpp:
186         * css/CSSRuleList.cpp:
187         * css/CSSSegmentedFontFace.cpp:
188         * css/CSSSelector.cpp:
189         * css/CSSStyleRule.cpp:
190         * css/CSSStyleSheet.cpp:
191         * css/CSSSupportsRule.cpp:
192         * css/CSSToStyleMap.cpp:
193         * css/CSSValueList.cpp:
194         * css/CSSValuePool.cpp:
195         * css/CSSVariableData.cpp:
196         * css/ElementRuleCollector.cpp:
197         * css/InspectorCSSOMWrappers.cpp:
198         * css/MediaList.cpp:
199         * css/MediaQueryEvaluator.cpp:
200         * css/MediaQueryExpression.cpp:
201         * css/PropertySetCSSStyleDeclaration.cpp:
202         * css/RGBColor.cpp:
203         * css/SelectorChecker.cpp:
204         * css/StyleProperties.cpp:
205         * css/StyleResolver.cpp:
206         * css/StyleRule.cpp:
207         * css/StyleSheetContents.cpp:
208         * css/TransformFunctions.cpp:
209         * css/ViewportStyleResolver.cpp:
210         * css/WebKitCSSRegionRule.cpp:
211         * css/parser/CSSParser.cpp:
212         * css/parser/CSSParserFastPaths.cpp:
213         * css/parser/CSSParserIdioms.cpp:
214         * css/parser/CSSParserSelector.cpp:
215         * css/parser/CSSParserToken.cpp:
216         * css/parser/CSSPropertyParser.cpp:
217         * css/parser/CSSSelectorParser.cpp:
218         * css/parser/MediaQueryParser.cpp:
219
220 2017-06-28  Alex Christensen  <achristensen@webkit.org>
221
222         Fix CMake build.
223
224         * PlatformMac.cmake:
225
226 2017-06-28  Antoine Quint  <graouts@apple.com>
227
228         Remove unnecessary `const double` method arguments
229         https://bugs.webkit.org/show_bug.cgi?id=173925
230
231         Reviewed by Dean Jackson.
232
233         Addressing post-landing feedback from webkit.org/b/173858.
234
235         * Modules/mediacontrols/MediaControlsHost.cpp:
236         (WebCore::MediaControlsHost::formattedStringForDuration):
237         * Modules/mediacontrols/MediaControlsHost.h:
238         * rendering/RenderTheme.h:
239         (WebCore::RenderTheme::mediaControlsFormattedStringForDuration):
240         * rendering/RenderThemeCocoa.h:
241
242 2017-06-28  Zalan Bujtas  <zalan@apple.com>
243
244         Unreviewed, rolling out r218373.
245
246         Output is not right
247
248         Reverted changeset:
249
250         "Use WTFLogAlways for debug logging so that it shows up in
251         device system logs"
252         https://bugs.webkit.org/show_bug.cgi?id=173450
253         http://trac.webkit.org/changeset/218373
254
255 2017-06-28  Carlos Garcia Campos  <cgarcia@igalia.com>
256
257         [GTK] Some web pages disappear immediately after rendering
258         https://bugs.webkit.org/show_bug.cgi?id=173768
259
260         Reviewed by Xabier Rodriguez-Calvar.
261
262         This is happening with websites having a "hidden" class in HTML tag when a media element is added. In the GTK+
263         port the media controls CSS contains the following code:
264
265         .hidden {
266             display: none !important;
267         }
268
269         That causes the whole HTML document to become display: none. That's why we just render a white page, and also
270         the reason why it only happens with the GTK+ port and only with some specific websites. We should limit the
271         scope of the hidden class to the media control elements.
272
273         * css/mediaControlsGtk.css:
274         (audio::-webkit-media-controls-panel.hidden,):
275         (audio::-webkit-media-controls-panel div.mute-box.hidden,):
276         (audio::-webkit-media-controls-current-time-display.hidden,):
277         (audio::-webkit-media-controls-timeline.hidden,):
278         (audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button):
279         (audio::-webkit-media-controls-toggle-closed-captions-button.hidden,):
280         (video::-webkit-media-controls-closed-captions-container.hidden):
281         (audio::-webkit-media-controls-fullscreen-button.hidden,):
282         (.hidden): Deleted.
283
284 2017-06-28  Antoine Quint  <graouts@apple.com>
285
286         Media controls volume glyph does not have the correct material
287         https://bugs.webkit.org/show_bug.cgi?id=173918
288         <rdar://problem/33012697>
289
290         Reviewed by Eric Carlson.
291
292         Test: media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-mute-button-in-bottom-or-top-right-controls-bar.html
293
294         All buttons were hosted in a ControlsBar save for the MuteButton, so we now host it in a controls bar as well
295         to ensure compositing is similar to all other buttons.
296
297         * Modules/modern-media-controls/controls/inline-media-controls.css:
298         (.media-controls.inline > .controls-bar.top-right):
299         (.media-controls.inline > button.mute): Deleted.
300         * Modules/modern-media-controls/controls/inline-media-controls.js:
301         (InlineMediaControls):
302         (InlineMediaControls.prototype.layout):
303         (InlineMediaControls.prototype._addTopRightBarWithMuteButtonToChildren):
304         * Modules/modern-media-controls/controls/macos-inline-media-controls.js:
305         (MacOSInlineMediaControls.prototype.handleEvent):
306
307 2017-06-28  Carlos Garcia Campos  <cgarcia@igalia.com>
308
309         REGRESSION(r218799): [GTK][WPE] Critical warning at exit
310         https://bugs.webkit.org/show_bug.cgi?id=173907
311
312         Reviewed by Konstantin Tokarev.
313
314         GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
315
316         This is now always happening when closing the MeiniBrowser and it's causing a lot of unit tests to fail. In
317         r218799, GRefPtrGtk.h include was removed from PasteboardHelper.h that contains a GRefPtr<GtkTargetList>. The
318         targets are destroyed at exit, but now trying to use g_object_unref instead of gtk_target_list_unref(). I've
319         found two more cases like this in r218799, that removes GUniquePtrSoup.h from ResourceHandleInternal.h and
320         ResourceRequest.h that have GUniquePtr<SoupBuffer> and GUniquePtr<SoupURI>.
321
322         Fixes several GTK+ and WPE unit tests.
323
324         * platform/gtk/PasteboardHelper.h: Bring back GRefPtrGtk.h.
325         * platform/network/ResourceHandleInternal.h: Bring back GUniquePtrSoup.h.
326         * platform/network/soup/ResourceRequest.h: Ditto.
327
328 2017-06-27  Chris Dumez  <cdumez@apple.com>
329
330         [ResourceLoadStatistics] Update minimumTimeBetweeenDataRecordsRemoval to 1 hour instead of 1 minute
331         https://bugs.webkit.org/show_bug.cgi?id=173895
332         <rdar://problem/32984366>
333
334         Reviewed by Brent Fulgham.
335
336         Update minimumTimeBetweeenDataRecordsRemoval to 1 hour instead of 1 minute to save battery.
337         Also port code to modern time types.
338
339         * loader/ResourceLoadObserver.cpp:
340         (WebCore::reduceTimeResolution):
341         (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
342         (WebCore::ResourceLoadObserver::setTimeToLiveUserInteraction):
343         (WebCore::ResourceLoadObserver::setTimeToLiveCookiePartitionFree):
344         (WebCore::ResourceLoadObserver::setMinimumTimeBetweeenDataRecordsRemoval):
345         (WebCore::ResourceLoadObserver::setReducedTimestampResolution):
346         (WebCore::ResourceLoadObserver::setGrandfatheringTime):
347         * loader/ResourceLoadObserver.h:
348         * loader/ResourceLoadStatistics.h:
349         (WebCore::ResourceLoadStatistics::mostRecentUserInteractionTime):
350         * loader/ResourceLoadStatisticsStore.cpp:
351         (WebCore::ResourceLoadStatisticsStore::createEncoderFromData):
352         (WebCore::ResourceLoadStatisticsStore::readDataFromDecoder):
353         (WebCore::shouldPartitionCookies):
354         (WebCore::ResourceLoadStatisticsStore::setTimeToLiveUserInteraction):
355         (WebCore::ResourceLoadStatisticsStore::setTimeToLiveCookiePartitionFree):
356         (WebCore::ResourceLoadStatisticsStore::setMinimumTimeBetweeenDataRecordsRemoval):
357         (WebCore::ResourceLoadStatisticsStore::setGrandfatheringTime):
358         (WebCore::ResourceLoadStatisticsStore::hasHadRecentUserInteraction):
359         (WebCore::ResourceLoadStatisticsStore::topPrivatelyControlledDomainsToRemoveWebsiteDataFor):
360         (WebCore::ResourceLoadStatisticsStore::handleFreshStartWithEmptyOrNoStore):
361         (WebCore::ResourceLoadStatisticsStore::shouldRemoveDataRecords):
362         (WebCore::ResourceLoadStatisticsStore::dataRecordsBeingRemoved):
363         * loader/ResourceLoadStatisticsStore.h:
364
365 2017-06-27  Chris Dumez  <cdumez@apple.com>
366
367         Port HysteresisActivity to Seconds type
368         https://bugs.webkit.org/show_bug.cgi?id=173902
369
370         Reviewed by Simon Fraser.
371
372         * platform/HysteresisActivity.h:
373         (WebCore::HysteresisActivity::HysteresisActivity):
374         (WebCore::HysteresisActivity::stop):
375         * platform/ios/WebSQLiteDatabaseTrackerClient.mm:
376
377 2017-06-27  Jeremy Jones  <jeremyj@apple.com>
378
379         MediaPlayerPrivate m_private may not yet be created when setPrivateBrowsingMode is called.
380         https://bugs.webkit.org/show_bug.cgi?id=173893
381         rdar://problem/32986872
382         
383         Reviewed by Ryosuke Niwa.
384
385         No new tests because no reproducable case.
386
387         setPrivateBrowsingMode can be called on MediaPlayer before the MediaPlayerPrivate is created.
388         The value should only be pushed down the m_private if it has been created.
389
390         * platform/graphics/MediaPlayer.cpp:
391         (WebCore::MediaPlayer::setPrivateBrowsingMode):
392
393 2017-06-27  Wenson Hsieh  <wenson_hsieh@apple.com>
394
395         [iOS DnD] Support dragging out of contenteditable areas without a prior selection
396         https://bugs.webkit.org/show_bug.cgi?id=173854
397         <rdar://problem/32236827>
398
399         Reviewed by Ryosuke Niwa and Tim Horton.
400
401         Allows elements to be dragged from contenteditable areas for both WebKit1 and WebKit2 iOS. There are two main
402         changes in WebCore: move the touch point adjustment code into EventHandler::tryToBeginDataInteractionAtPoint, so
403         that the clientPosition specified will be adjusted to an appropriate clickable node if needed. This is necessary
404         because UIWebDocumentView and WKContentView no longer send adjusted points to WebCore when requesting drag
405         start. See <https://bugs.webkit.org/show_bug.cgi?id=173855> for a followup regarding the globalPosition and
406         clientPositions passed in to the MouseEvents when performing a drag or synthetic click.
407
408         Secondly, image elements in Mail's contenteditable area are not draggable unless the heuristic in
409         DragController::draggableElement is tweaked to not reject image dragging across the board if the
410         loadsImagesAutomatically setting is turned off. Instead, even if images are not automatically loaded, allow the
411         image drag to commence if the image renderer already has a cached image.
412
413         Test: DataInteractionTests.DragImageFromContentEditable
414
415         * page/DragController.cpp:
416         (WebCore::imageElementIsDraggable):
417         (WebCore::DragController::draggableElement):
418         * page/ios/EventHandlerIOS.mm:
419         (WebCore::EventHandler::tryToBeginDataInteractionAtPoint):
420
421 2017-06-27  Antoine Quint  <graouts@apple.com>
422
423         [Modern Media Controls] Accessibility labels should be formatted using NSDateComponentsFormatter
424         https://bugs.webkit.org/show_bug.cgi?id=173858
425         <rdar://problem/32643171>
426
427         Reviewed by Dean Jackson.
428
429         We shouldn't be manually trying to create a formatted string for media controls and instead rely
430         on NSDateComponentsFormatter to perform this task for us. So we remove the ad-hoc code in the JS
431         media controls code and instead add a new MediaControlsHost method to format durations which calls
432         into RenderTheme to provide a formatted duration string relevant to the current platform and locale.
433
434         * English.lproj/modern-media-controls-localized-strings.js:
435         * Modules/mediacontrols/MediaControlsHost.cpp:
436         (WebCore::MediaControlsHost::formattedStringForDuration):
437         * Modules/mediacontrols/MediaControlsHost.h:
438         * Modules/mediacontrols/MediaControlsHost.idl:
439         * Modules/modern-media-controls/controls/slider.js:
440         (Slider.prototype.set inputAccessibleLabel):
441         * Modules/modern-media-controls/controls/time-label.js:
442         (TimeLabel.prototype.commitProperty):
443         * Modules/modern-media-controls/main.js:
444         (createControls):
445         (formattedStringForDuration):
446         (formatTimeToString): Deleted.
447         * rendering/RenderTheme.h:
448         (WebCore::RenderTheme::mediaControlsFormattedStringForDuration):
449         * rendering/RenderThemeCocoa.h:
450         * rendering/RenderThemeCocoa.mm:
451         (WebCore::RenderThemeCocoa::mediaControlsFormattedStringForDuration):
452
453 2017-06-27  Eric Carlson  <eric.carlson@apple.com>
454
455         r218647 causes getUserMedia to fail on some machines
456         https://bugs.webkit.org/show_bug.cgi?id=173894
457
458         Reviewed by Youenn Fablet.
459
460         * platform/mediastream/mac/AVVideoCaptureSource.mm:
461         (WebCore::AVVideoCaptureSource::isFrameRateSupported): Change frame rate epsilon from 0.00001
462         to 0.001.
463
464 2017-06-27  Antoine Quint  <graouts@apple.com>
465
466         Placard icons act like buttons (can get keyboard focus and shows up in VoiceOver)
467         https://bugs.webkit.org/show_bug.cgi?id=173891
468         <rdar://problem/33011855>
469
470         Reviewed by Dean Jackson.
471
472         Ensure that we disable buttons inside placards as they're only decorative and should
473         not be interactive.
474
475         * Modules/modern-media-controls/controls/placard.js:
476         (Placard.):
477
478 2017-06-27  Jeremy Jones  <jeremyj@apple.com>
479
480         Disable m_temporarilyAllowingInlinePlaybackAfterFullscreen on pause
481         https://bugs.webkit.org/show_bug.cgi?id=173843
482         rdar://problem/32982431
483
484         Reviewed by Eric Carlson.
485
486         Test: media/media-fullscreen-pause-inline.html
487
488         Some pages may not have a fullscreen button, so disabled m_temporarilyAllowingInlinePlaybackAfterFullscreen on pause.
489
490         * html/HTMLMediaElement.cpp:
491         (WebCore::HTMLMediaElement::pause):
492
493 2017-06-27  Chris Dumez  <cdumez@apple.com>
494
495         [iOS] Avoid taking / releasing process assertions too quickly due to database activity
496         https://bugs.webkit.org/show_bug.cgi?id=173879
497         <rdar://problem/32412701>
498
499         Reviewed by Antti Koivisto.
500
501         Add HysteresisActivity to WebSQLiteDatabaseTrackerClient to avoid taking / releasing
502         process assertion too quickly due to database activity.
503
504         * platform/ios/WebSQLiteDatabaseTrackerClient.h:
505         * platform/ios/WebSQLiteDatabaseTrackerClient.mm:
506         (WebCore::WebSQLiteDatabaseTrackerClient::WebSQLiteDatabaseTrackerClient):
507         (WebCore::WebSQLiteDatabaseTrackerClient::willBeginFirstTransaction):
508         (WebCore::WebSQLiteDatabaseTrackerClient::didFinishLastTransaction):
509         (WebCore::WebSQLiteDatabaseTrackerClient::hysteresisUpdated):
510
511 2017-06-27  Youenn Fablet  <youenn@apple.com>
512
513         Using public logging for WebRTC release logging
514         https://bugs.webkit.org/show_bug.cgi?id=173881
515
516         Reviewed by Eric Carlson.
517
518         No change of behavior.
519
520         * Modules/mediastream/PeerConnectionBackend.cpp:
521         (WebCore::PeerConnectionBackend::createOfferSucceeded):
522         (WebCore::PeerConnectionBackend::createOfferFailed):
523         (WebCore::PeerConnectionBackend::createAnswerSucceeded):
524         (WebCore::PeerConnectionBackend::createAnswerFailed):
525         (WebCore::PeerConnectionBackend::setLocalDescriptionFailed):
526         (WebCore::PeerConnectionBackend::setRemoteDescriptionFailed):
527         (WebCore::PeerConnectionBackend::addIceCandidateFailed):
528         (WebCore::PeerConnectionBackend::newICECandidate):
529         * Modules/mediastream/RTCPeerConnection.cpp:
530         (WebCore::RTCPeerConnection::queuedSetLocalDescription):
531         (WebCore::RTCPeerConnection::queuedSetRemoteDescription):
532         (WebCore::RTCPeerConnection::queuedAddIceCandidate):
533         (WebCore::RTCPeerConnection::updateIceGatheringState):
534         (WebCore::RTCPeerConnection::updateIceConnectionState):
535         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
536         (WebCore::LibWebRTCMediaEndpoint::OnStatsDelivered):
537
538 2017-06-27  Don Olmstead  <don.olmstead@sony.com>
539
540         [PAL] Add symbol export macros for PAL
541         https://bugs.webkit.org/show_bug.cgi?id=171519
542
543         Reviewed by Konstantin Tokarev.
544
545         No new tests. No change in behavior.
546
547         * CMakeLists.txt:
548         * config.h:
549         * platform/PlatformExportMacros.h:
550
551 2017-06-27  John Wilander  <wilander@apple.com>
552
553         Resource Load Statistics: Add telemetry
554         https://bugs.webkit.org/show_bug.cgi?id=173499
555         <rdar://problem/32826094>
556
557         Reviewed by Brent Fulgham.
558
559         Test: http/tests/loading/resourceLoadStatistics/telemetry-generation.html
560
561         * loader/ResourceLoadObserver.cpp:
562         (WebCore::ResourceLoadObserver::fireTelemetryHandler):
563             Test infrastructure.
564         * loader/ResourceLoadObserver.h:
565         * loader/ResourceLoadStatisticsStore.cpp:
566         (WebCore::ResourceLoadStatisticsStore::setFireTelemetryCallback):
567         (WebCore::ResourceLoadStatisticsStore::fireTelemetryHandler):
568             Test infrastructure.
569         (WebCore::ResourceLoadStatisticsStore::sortedPrevalentResourceTelemetry):
570             Convenience function for telemetry.
571         * loader/ResourceLoadStatisticsStore.h:
572             Added struct WebCore::PrevalentResourceTelemetry.
573         * page/DiagnosticLoggingKeys.cpp:
574         (WebCore::DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey):
575             Added.
576         * page/DiagnosticLoggingKeys.h:
577
578 2017-06-27  Ting-Wei Lan  <lantw44@gmail.com>
579
580         Add missing includes to fix compilation error on FreeBSD
581         https://bugs.webkit.org/show_bug.cgi?id=172919
582
583         Reviewed by Mark Lam.
584
585         No new tests needed.
586
587         * crypto/gcrypt/CryptoKeyECGCrypt.cpp:
588         * platform/audio/ReverbAccumulationBuffer.cpp:
589
590 2017-06-27  Zalan Bujtas  <zalan@apple.com>
591
592         Add RenderEmbeddedObject::getReplacementTextGeometry helper.
593         https://bugs.webkit.org/show_bug.cgi?id=173847
594
595         Reviewed by Simon Fraser.
596
597         ...and remove getReplacementTextGeometry's redundant return value. 
598
599         No change in functionality.
600
601         * rendering/RenderEmbeddedObject.cpp:
602         (WebCore::RenderEmbeddedObject::paintReplaced):
603         (WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
604         (WebCore::RenderEmbeddedObject::unavailablePluginIndicatorBounds):
605         (WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
606         * rendering/RenderEmbeddedObject.h:
607
608 2017-06-27  Wenson Hsieh  <wenson_hsieh@apple.com>
609
610         Refactor drag start codepaths to plumb a DragItem to client layers
611         https://bugs.webkit.org/show_bug.cgi?id=173832
612         Work towards <rdar://problem/32236827>
613
614         Reviewed by Ryosuke Niwa and Tim Horton.
615
616         Refactor drag start logic in WebCore to set up a DragItem and propagate it to WebDragClient. No change in behavior.
617
618         * loader/EmptyClients.cpp:
619         * page/DragClient.h:
620         * page/DragController.cpp:
621         (WebCore::DragController::startDrag):
622         (WebCore::DragController::doImageDrag):
623         (WebCore::DragController::doSystemDrag):
624
625         Refactor to pass along a DragItem. Also, remove unused drag image anchor computation.
626
627         * page/DragController.h:
628         * platform/DragImage.h:
629         * platform/DragItem.h:
630
631         Add additional information needed to begin a drag on iOS.
632
633         (WebCore::DragItem::encode):
634         (WebCore::DragItem::decode):
635
636         Add IPC serialization/deserialization support for DragItem.
637
638         * platform/PasteboardWriterData.cpp:
639         (WebCore::PasteboardWriterData::isEmpty):
640         * platform/PasteboardWriterData.h:
641
642 2017-06-27  Frederic Wang  <fwang@igalia.com>
643
644         Some tests to verify forbidden frame navigation time out
645         https://bugs.webkit.org/show_bug.cgi?id=173657
646
647         Reviewed by Chris Dumez.
648
649         Currently some tests try and perform a forbidden frame navigation and verify the
650         corresponding console error. However, WebKit does not raise any exception for such error so
651         the tests have to wait until the timeout limit to complete, which makes execution slow.
652         This patch modifies the setters of window.location for which such error may happen in order
653         to raise an exception so the tests behave as expected.
654
655         No new tests, already covered by existing tests.
656
657         * page/Location.cpp: Adjust Location::setLocation to return a security exception and pass it
658         to the callers.
659         (WebCore::Location::setHref): Adjust function to possibly return an exception.
660         (WebCore::Location::setProtocol): Ditto.
661         (WebCore::Location::setHost): Ditto.
662         (WebCore::Location::setHostname): Ditto.
663         (WebCore::Location::setPort): Ditto.
664         (WebCore::Location::setPathname): Ditto.
665         (WebCore::Location::setSearch): Ditto.
666         (WebCore::Location::setHash): Ditto.
667         (WebCore::Location::assign): Ditto.
668         (WebCore::Location::setLocation): FrameLoader::findFrameForNavigation is really only used
669         to verify whether navigating m_frame is permitted so it is more simple and clearer to do it
670         directly. When navigation is not permitted, this function now raises a security exception.
671         * page/Location.h: Modify some setters to return an ExceptionOr<void>.
672         * page/Location.idl: Allow some setters to raise an exception.
673
674 2017-06-26  Fujii Hironori  <Hironori.Fujii@sony.com>
675
676         [GTK] Layout Test webrtc/video.html issues "stack smashing detected"
677         https://bugs.webkit.org/show_bug.cgi?id=173862
678
679         Reviewed by Carlos Garcia Campos.
680
681         Tests: webrtc/video.html
682
683         Passing a bool variable to g_object_get causes out-of-bound write.
684         gboolean should be used, which is 4 bytes while bool is one byte.
685
686         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
687         (WebCore::MediaPlayerPrivateGStreamerBase::muted): Use gboolean instead of bool.
688         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:
689         (WebCore::MediaPlayerPrivateGStreamerOwr::trackEnded): Ditto.
690
691 2017-06-26  Chris Dumez  <cdumez@apple.com>
692
693         WebsiteDataStore::fetchDataForTopPrivatelyControlledDomains() is inefficient
694         https://bugs.webkit.org/show_bug.cgi?id=173850
695
696         Reviewed by Ryosuke Niwa.
697
698         * loader/ResourceLoadStatisticsStore.cpp:
699         (WebCore::ResourceLoadStatisticsStore::updateStatisticsForRemovedDataRecords):
700         * loader/ResourceLoadStatisticsStore.h:
701
702 2017-06-26  Antti Koivisto  <antti@apple.com>
703
704         REGRESSION (AsyncImageDecoding): A tab with the WWDC keynote paused is killed for using excessive power (Image thrashing)
705         https://bugs.webkit.org/show_bug.cgi?id=173804
706         <rdar://problem/32623745>
707
708         Reviewed by Simon Fraser.
709
710         When under memory pressure MemoryCache::singleton().pruneLiveResources(true) is called inFrameView::didPaintContents()
711         after top level paint. We end up decoding and pruning bitmaps repeatedly for each tile, which is not great.
712
713         Situation gets worse with async decoding. Painting now doesn’t actually decode the image, it just starts the decoding.
714         When it completes we trigger another paint to get the bits to the tiles. The paint for the first tile then calls
715         pruneLiveResources and loses the bitmap and the second tile triggers another round of async decoding. We have code
716         that prevents pruning of visible images but non-visible images in tiling area can hit this bug easily.
717
718         Test: fast/images/low-memory-decode.html
719
720         * page/FrameView.cpp:
721         (WebCore::FrameView::willPaintContents):
722         (WebCore::FrameView::didPaintContents):
723
724             Eliminate synchronous pruning during painting. This is an obsolete mechanism from early iOS times.
725
726         * platform/graphics/BitmapImage.cpp:
727         (WebCore::BitmapImage::imageFrameAvailableAtIndex):
728         (WebCore::BitmapImage::decodeCountForTesting):
729
730             Testing support.
731
732         * platform/graphics/BitmapImage.h:
733         * testing/Internals.cpp:
734         (WebCore::Internals::imageDecodeCount):
735         * testing/Internals.h:
736         * testing/Internals.idl:
737
738 2017-06-26  Chris Dumez  <cdumez@apple.com>
739
740         ImageFrameCache::startAsyncDecodingQueue() unsafely passes Strings across threads
741         https://bugs.webkit.org/show_bug.cgi?id=173842
742
743         Reviewed by Simon Fraser.
744
745         The URL string was passed across thread without isolated copy.
746
747         * platform/graphics/ImageFrameCache.cpp:
748         (WebCore::ImageFrameCache::startAsyncDecodingQueue):
749
750 2017-06-26  Jonathan Bedard  <jbedard@apple.com>
751
752         Unreviewed, rolling out r218783.
753
754         Causing accessibility/mac/setting-attributes-is-
755         asynchronous.html to crash consistently on mac-wk2 Debug
756
757         Reverted changeset:
758
759         "AX: Cannot call setValue() on contenteditable or ARIA text
760         controls"
761         https://bugs.webkit.org/show_bug.cgi?id=173520
762         http://trac.webkit.org/changeset/218783
763
764 2017-06-26  Yusuke Suzuki  <utatane.tea@gmail.com>
765
766         [WTF] Drop Thread::create(obsolete things) API since we can use lambda
767         https://bugs.webkit.org/show_bug.cgi?id=173825
768
769         Reviewed by Saam Barati.
770
771         No behavior change.
772
773         * Modules/indexeddb/server/IDBServer.cpp:
774         (WebCore::IDBServer::IDBServer::IDBServer):
775         (WebCore::IDBServer::IDBServer::databaseThreadEntry): Deleted.
776         * Modules/indexeddb/server/IDBServer.h:
777         * Modules/webaudio/AsyncAudioDecoder.cpp:
778         (WebCore::AsyncAudioDecoder::AsyncAudioDecoder):
779         (WebCore::AsyncAudioDecoder::threadEntry): Deleted.
780         * Modules/webaudio/AsyncAudioDecoder.h:
781         * Modules/webaudio/OfflineAudioDestinationNode.cpp:
782         (WebCore::OfflineAudioDestinationNode::startRendering):
783         (WebCore::OfflineAudioDestinationNode::offlineRenderEntry): Deleted.
784         * Modules/webaudio/OfflineAudioDestinationNode.h:
785         * Modules/webdatabase/DatabaseThread.cpp:
786         (WebCore::DatabaseThread::start):
787         (WebCore::DatabaseThread::databaseThreadStart): Deleted.
788         * Modules/webdatabase/DatabaseThread.h:
789         * bindings/js/GCController.cpp:
790         (WebCore::collect):
791         (WebCore::GCController::gcTimerFired):
792         (WebCore::GCController::garbageCollectOnAlternateThreadForDebugging):
793         * loader/icon/IconDatabase.cpp:
794         (WebCore::IconDatabase::open):
795         (WebCore::IconDatabase::iconDatabaseSyncThreadStart): Deleted.
796         * loader/icon/IconDatabase.h:
797         * page/ResourceUsageThread.cpp:
798         (WebCore::ResourceUsageThread::createThreadIfNeeded):
799         (WebCore::ResourceUsageThread::threadCallback): Deleted.
800         * page/ResourceUsageThread.h:
801         * page/scrolling/ScrollingThread.cpp:
802         (WebCore::ScrollingThread::createThreadIfNeeded):
803         (WebCore::ScrollingThread::threadCallback): Deleted.
804         (WebCore::ScrollingThread::threadBody): Deleted.
805         * page/scrolling/ScrollingThread.h:
806         * platform/audio/HRTFDatabaseLoader.cpp:
807         (WebCore::HRTFDatabaseLoader::loadAsynchronously):
808         (WebCore::databaseLoaderEntry): Deleted.
809         * platform/audio/HRTFDatabaseLoader.h:
810         * platform/audio/ReverbConvolver.cpp:
811         (WebCore::ReverbConvolver::ReverbConvolver):
812         (WebCore::backgroundThreadEntry): Deleted.
813         * platform/audio/ReverbConvolver.h:
814         (WebCore::ReverbConvolver::useBackgroundThreads):
815         * platform/network/cf/LoaderRunLoopCF.cpp:
816         (WebCore::loaderRunLoop):
817         (WebCore::runLoaderThread): Deleted.
818         * platform/network/curl/CurlManager.cpp:
819         (WebCore::CurlManager::startThreadIfNeeded):
820         (WebCore::CurlManager::workerThread):
821         * platform/network/curl/CurlManager.h:
822         * workers/WorkerThread.cpp:
823         (WebCore::WorkerThread::start):
824         (WebCore::WorkerThread::workerThreadStart): Deleted.
825         * workers/WorkerThread.h:
826
827 2017-06-26  Joanmarie Diggs  <jdiggs@igalia.com>
828
829         [ATK] Add support for aria-details and aria-errormessage
830         https://bugs.webkit.org/show_bug.cgi?id=172588
831
832         Reviewed by Chris Fleizach.
833
834         Add methods to retrieve elements referenced by or referencing the new
835         aria-details and aria-errormessage attributes. Include aria-details and
836         aria-errormessage in AccessibilityObject::supportsARIAAttributes() to ensure
837         elements with these attributes will be included in the accessibility tree.
838
839         New test cases added to accessibility/gtk/relation-types.html.
840
841         * accessibility/AccessibilityObject.cpp:
842         (WebCore::AccessibilityObject::supportsARIAAttributes):
843         (WebCore::AccessibilityObject::ariaDetailsElements):
844         (WebCore::AccessibilityObject::ariaDetailsReferencingElements):
845         (WebCore::AccessibilityObject::ariaErrorMessageElements):
846         (WebCore::AccessibilityObject::ariaErrorMessageReferencingElements):
847         * accessibility/AccessibilityObject.h:
848         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
849         (setAtkRelationSetFromCoreObject):
850         * html/HTMLAttributeNames.in:
851
852 2017-06-26  Konstantin Tokarev  <annulen@yandex.ru>
853
854         Remove excessive headers from WebCore/{Modules,animation,crypto,domjit}
855         https://bugs.webkit.org/show_bug.cgi?id=173824
856
857         Reviewed by Darin Adler.
858
859         No new tests needed.
860
861         * Modules/credentials/CredentialCreationOptions.h:
862         * Modules/credentials/PasswordCredential.h:
863         * Modules/fetch/FetchBody.h:
864         * Modules/fetch/FetchBodyOwner.h:
865         * Modules/gamepad/GamepadManager.h:
866         * Modules/geolocation/Coordinates.h:
867         * Modules/geolocation/Geoposition.h:
868         * Modules/indexeddb/IDBActiveDOMObject.h:
869         * Modules/indexeddb/IDBCursor.h:
870         * Modules/indexeddb/IDBDatabase.h:
871         * Modules/indexeddb/IDBDatabaseIdentifier.h:
872         * Modules/indexeddb/IDBObjectStore.cpp:
873         * Modules/indexeddb/IDBObjectStore.h:
874         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
875         * Modules/indexeddb/server/UniqueIDBDatabase.h:
876         * Modules/indexeddb/shared/InProcessIDBServer.h:
877         * Modules/indexeddb/shared/IndexKey.h:
878         * Modules/mediacontrols/MediaControlsHost.h:
879         * Modules/mediasession/WebMediaSessionManager.h:
880         * Modules/mediasource/SourceBufferList.h:
881         * Modules/mediasource/VideoPlaybackQuality.h:
882         * Modules/notifications/Notification.h:
883         * Modules/quota/WorkerNavigatorStorageQuota.h:
884         * Modules/webaudio/AudioBasicProcessorNode.h:
885         * Modules/webaudio/AudioContext.h:
886         * Modules/webaudio/AudioDestinationNode.h:
887         * Modules/webaudio/AudioParamTimeline.h:
888         * Modules/webaudio/ConvolverNode.cpp:
889         * Modules/webaudio/MediaStreamAudioSource.h:
890         * Modules/webaudio/MediaStreamAudioSourceNode.h:
891         * Modules/webaudio/PannerNode.h:
892         * Modules/webaudio/PeriodicWave.h:
893         * Modules/webaudio/ScriptProcessorNode.h:
894         * Modules/webdatabase/DatabaseManager.h:
895         * Modules/webdatabase/DatabaseTask.h:
896         * Modules/webdatabase/SQLTransaction.h:
897         * Modules/webdatabase/SQLTransactionBackend.h:
898         * Modules/webdatabase/SQLTransactionStateMachine.h:
899         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
900         * Modules/websockets/WebSocketDeflater.h:
901         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
902         * animation/AnimationEffect.h:
903         * crypto/CryptoKeyPair.h:
904         * crypto/parameters/CryptoAlgorithmEcdhKeyDeriveParams.h:
905         * dom/ScriptExecutionContext.h:
906         * domjit/DOMJITHelpers.h:
907         * domjit/DOMJITIDLConvert.h:
908         * domjit/DOMJITIDLType.h:
909
910 2017-06-26  Konstantin Tokarev  <annulen@yandex.ru>
911
912         [GTK] Unreviewed, added missing includes to fix debug build
913
914         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
915
916 2017-06-25  Konstantin Tokarev  <annulen@yandex.ru>
917
918         Remove excessive headers from WebCore/platform
919         https://bugs.webkit.org/show_bug.cgi?id=173822
920
921         Reviewed by Tim Horton.
922
923         No new tests needed.
924
925         * html/ColorInputType.h:
926         * html/MediaElementSession.h:
927         * page/SecurityOriginData.cpp:
928         * platform/CalculationValue.cpp:
929         * platform/CalculationValue.h:
930         * platform/ColorChooserClient.h:
931         * platform/ContentType.h:
932         * platform/LogMacros.h:
933         * platform/PODRedBlackTree.h:
934         * platform/PasteboardStrategy.h:
935         * platform/PlatformPasteboard.h:
936         * platform/PopupMenuStyle.h:
937         * platform/ScrollAnimator.h:
938         * platform/Theme.h:
939         * platform/ThreadGlobalData.h:
940         * platform/animation/AnimationList.h:
941         * platform/audio/AudioArray.h:
942         * platform/audio/AudioChannel.h:
943         * platform/audio/DynamicsCompressor.h:
944         * platform/audio/DynamicsCompressorKernel.h:
945         * platform/audio/FFTFrame.h:
946         * platform/audio/HRTFDatabaseLoader.cpp:
947         * platform/audio/HRTFDatabaseLoader.h:
948         * platform/audio/HRTFElevation.h:
949         * platform/audio/MultiChannelResampler.h:
950         * platform/audio/PlatformMediaSession.h:
951         * platform/audio/ReverbConvolver.h:
952         * platform/audio/ReverbConvolverStage.cpp:
953         * platform/graphics/ANGLEWebKitBridge.h:
954         * platform/graphics/BitmapImage.h:
955         * platform/graphics/CrossfadeGeneratedImage.h:
956         * platform/graphics/FloatPolygon.h:
957         * platform/graphics/FloatSizeHash.h:
958         * platform/graphics/Font.h:
959         * platform/graphics/FontMetrics.h:
960         * platform/graphics/FontPlatformData.h:
961         * platform/graphics/FontRanges.h:
962         * platform/graphics/FontTaggedSettings.h:
963         * platform/graphics/GraphicsContext3D.h:
964         * platform/graphics/GraphicsContext3DPrivate.h:
965         * platform/graphics/GraphicsLayerClient.h:
966         * platform/graphics/Image.cpp:
967         * platform/graphics/ImageFrame.h:
968         * platform/graphics/ImageFrameCache.h:
969         * platform/graphics/ImageSource.h:
970         * platform/graphics/IntRectHash.h:
971         * platform/graphics/IntSizeHash.h:
972         * platform/graphics/MediaPlaybackTargetClient.h:
973         * platform/graphics/Pattern.h:
974         * platform/graphics/PlatformTimeRanges.h:
975         * platform/graphics/TextRun.h:
976         * platform/graphics/TiledBacking.h:
977         * platform/graphics/cairo/FontCustomPlatformData.h:
978         * platform/graphics/filters/FEConvolveMatrix.h:
979         * platform/graphics/filters/FELighting.h:
980         * platform/graphics/filters/SourceAlpha.h:
981         * platform/graphics/gstreamer/GStreamerUtilities.h:
982         * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h:
983         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
984         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
985         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
986         * platform/graphics/harfbuzz/HarfBuzzShaper.h:
987         * platform/graphics/opengl/Extensions3DOpenGL.h:
988         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
989         * platform/graphics/texmap/TextureMapperBackingStore.h:
990         * platform/graphics/texmap/TextureMapperGL.cpp:
991         * platform/graphics/texmap/TextureMapperGL.h:
992         * platform/graphics/texmap/TextureMapperPlatformLayerProxy.h:
993         * platform/graphics/texmap/TextureMapperTile.h:
994         * platform/graphics/texmap/coordinated/Tile.h:
995         * platform/graphics/texmap/coordinated/TiledBackingStore.h:
996         * platform/graphics/transforms/TransformState.h:
997         * platform/gtk/PasteboardHelper.h:
998         * platform/gtk/ScrollbarThemeGtk.h:
999         * platform/image-decoders/ImageDecoder.h:
1000         * platform/network/BlobData.h:
1001         * platform/network/BlobDataFileReference.h:
1002         * platform/network/ResourceHandle.h:
1003         * platform/network/ResourceHandleInternal.h:
1004         * platform/network/SocketStreamHandleClient.h:
1005         * platform/network/soup/ResourceRequest.h:
1006         * platform/network/soup/SocketStreamHandleImpl.h:
1007         * platform/network/soup/SoupNetworkSession.h:
1008         * platform/sql/SQLiteFileSystem.h:
1009         * platform/text/LocaleICU.h:
1010
1011 2017-06-25  Youenn Fablet  <youenn@apple.com>
1012
1013         Remove use of mock webrtc backend factory at injected bundle reset time
1014         https://bugs.webkit.org/show_bug.cgi?id=173817
1015
1016         Reviewed by Darin Adler.
1017
1018         * testing/Internals.cpp:
1019         (WebCore::Internals::resetToConsistentState): Resetting the peer connection backend.
1020         * testing/MockLibWebRTCPeerConnection.cpp: Doing some clean-up
1021         (WebCore::useRealRTCPeerConnectionFactory):
1022         (WebCore::MockLibWebRTCPeerConnectionFactory::MockLibWebRTCPeerConnectionFactory):
1023         (WebCore::MockLibWebRTCPeerConnectionFactory::CreatePeerConnection):
1024         (WebCore::MockLibWebRTCPeerConnectionFactory::CreateVideoTrack):
1025         (WebCore::MockLibWebRTCPeerConnectionFactory::CreateAudioTrack):
1026         * testing/MockLibWebRTCPeerConnection.h:
1027
1028 2017-06-25  Konstantin Tokarev  <annulen@yandex.ru>
1029
1030         Remove excessive headers from JavaScriptCore
1031         https://bugs.webkit.org/show_bug.cgi?id=173812
1032
1033         Reviewed by Darin Adler.
1034
1035         No new tests needed.
1036
1037         * Modules/indexeddb/IDBObjectStore.cpp:
1038         * bindings/js/JSDOMPromiseDeferred.h:
1039         * bindings/js/JSLazyEventListener.cpp:
1040         * bindings/js/JSMainThreadExecState.h:
1041         * bindings/js/ReadableStreamDefaultController.cpp:
1042         * bindings/js/ScriptGlobalObject.cpp:
1043         * bindings/js/SerializedScriptValue.cpp:
1044         * bridge/NP_jsobject.cpp:
1045         * dom/ScriptExecutionContext.cpp:
1046         * html/HTMLPlugInImageElement.cpp:
1047
1048 2017-06-25  Konstantin Tokarev  <annulen@yandex.ru>
1049
1050         Remove excessive headers from WebCore/{rendering,style,svg}
1051         https://bugs.webkit.org/show_bug.cgi?id=173773
1052
1053         Reviewed by Darin Adler.
1054
1055         No new tests needed.
1056
1057         * css/StyleBuilderConverter.h:
1058         * editing/TextIterator.cpp:
1059         * rendering/CounterNode.h:
1060         * rendering/FlexibleBoxAlgorithm.h:
1061         * rendering/HitTestLocation.h:
1062         * rendering/HitTestResult.h:
1063         * rendering/HitTestingTransformState.h:
1064         * rendering/OrderIterator.h:
1065         * rendering/RenderButton.h:
1066         * rendering/RenderCombineText.h:
1067         * rendering/RenderFlowThread.h:
1068         * rendering/RenderFullScreen.h:
1069         * rendering/RenderGeometryMap.h:
1070         * rendering/RenderListItem.h:
1071         * rendering/RenderMediaControlElements.cpp:
1072         * rendering/RenderMediaControlElements.h:
1073         * rendering/RenderMediaControls.h:
1074         * rendering/RenderMeter.h:
1075         * rendering/RenderMultiColumnSet.cpp:
1076         * rendering/RenderObject.h:
1077         * rendering/RenderRegion.h:
1078         * rendering/RenderRegionSet.cpp:
1079         * rendering/RenderRegionSet.h:
1080         * rendering/RenderTheme.h:
1081         * rendering/RenderVTTCue.cpp:
1082         * rendering/RenderVTTCue.h:
1083         * rendering/SimpleLineLayoutFunctions.h:
1084         * rendering/SimpleLineLayoutResolver.h:
1085         * rendering/line/BreakingContext.h:
1086         * rendering/line/LineBreaker.h:
1087         * rendering/mathml/MathMLStyle.h:
1088         * rendering/mathml/RenderMathMLOperator.h:
1089         * rendering/mathml/RenderMathMLRoot.h:
1090         * rendering/shapes/RectangleShape.h:
1091         * rendering/style/BasicShapes.h:
1092         * rendering/style/BorderData.h:
1093         * rendering/style/CounterDirectives.h:
1094         * rendering/style/GridArea.h:
1095         * rendering/style/KeyframeList.h:
1096         * rendering/style/RenderStyle.h:
1097         * rendering/style/SVGRenderStyle.h:
1098         * rendering/style/ShapeValue.h:
1099         * rendering/style/StyleCachedImage.h:
1100         * rendering/style/StyleMultiColData.h:
1101         * rendering/style/StyleRareNonInheritedData.h:
1102         * rendering/style/WillChangeData.h:
1103         * rendering/svg/RenderSVGBlock.h:
1104         * rendering/svg/RenderSVGRect.h:
1105         * rendering/svg/RenderSVGResource.h:
1106         * rendering/svg/RenderSVGResourceContainer.h:
1107         * rendering/svg/RenderSVGResourceMarker.h:
1108         * rendering/svg/RenderSVGResourceMasker.h:
1109         * rendering/svg/RenderSVGResourcePattern.h:
1110         * rendering/svg/SVGInlineFlowBox.cpp:
1111         * rendering/svg/SVGInlineTextBox.h:
1112         * rendering/svg/SVGRootInlineBox.h:
1113         * rendering/svg/SVGTextChunk.cpp:
1114         * rendering/svg/SVGTextChunk.h:
1115         * rendering/svg/SVGTextChunkBuilder.cpp:
1116         * rendering/svg/SVGTextLayoutEngine.cpp:
1117         * rendering/svg/SVGTextLayoutEngineSpacing.h:
1118         * style/RenderTreePosition.cpp:
1119         * style/RenderTreePosition.h:
1120         * style/RenderTreeUpdater.h:
1121         * style/StyleFontSizeFunctions.h:
1122         * style/StyleInvalidator.h:
1123         * style/StyleResolveForDocument.h:
1124         * style/StyleScope.h:
1125         * style/StyleTreeResolver.cpp:
1126         * style/StyleTreeResolver.h:
1127         * style/StyleUpdate.h:
1128         * svg/SVGAnimationElement.h:
1129         * svg/SVGFEBlendElement.cpp:
1130         * svg/SVGFEBlendElement.h:
1131         * svg/SVGFEComponentTransferElement.h:
1132         * svg/SVGFEFloodElement.cpp:
1133         * svg/SVGFEFloodElement.h:
1134         * svg/SVGFEImageElement.h:
1135         * svg/SVGFEMergeElement.cpp:
1136         * svg/SVGFEMergeElement.h:
1137         * svg/SVGFEOffsetElement.cpp:
1138         * svg/SVGFEOffsetElement.h:
1139         * svg/SVGFETileElement.cpp:
1140         * svg/SVGFETileElement.h:
1141         * svg/SVGParserUtilities.h:
1142         * svg/SVGPathByteStream.h:
1143         * svg/SVGPathElement.cpp:
1144         * svg/SVGPolyElement.cpp:
1145         * svg/SVGSVGElement.cpp:
1146         * svg/SVGTRefElement.cpp:
1147         * svg/SVGTextPathElement.cpp:
1148         * svg/SVGUseElement.cpp:
1149         * svg/animation/SMILTimeContainer.h:
1150         * svg/graphics/SVGImageCache.h:
1151         * svg/graphics/filters/SVGFilter.h:
1152
1153 2017-06-25  Antoine Quint  <graouts@apple.com>
1154
1155         Remove rAf suspension logging
1156         https://bugs.webkit.org/show_bug.cgi?id=173821
1157
1158         Reviewed by Tim Horton.
1159
1160         Now that webkit.org/b/173628 is fixed, we can remove the logging code we added.
1161
1162         * dom/Document.cpp:
1163         (WebCore::Document::requestAnimationFrame):
1164         * dom/ScriptedAnimationController.cpp:
1165         (WebCore::ScriptedAnimationController::suspend):
1166         (WebCore::ScriptedAnimationController::resume):
1167         * page/Page.cpp:
1168         (WebCore::Page::suspendScriptedAnimations):
1169         (WebCore::Page::resumeScriptedAnimations):
1170         (WebCore::Page::setIsVisibleInternal):
1171         * platform/RuntimeApplicationChecks.h:
1172         * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
1173         (WebCore::MacApplication::isDumpRenderTree): Deleted.
1174
1175 2017-06-24  Sam Weinig  <sam@webkit.org>
1176
1177         [WebIDL] Add complete support for stringifier
1178         https://bugs.webkit.org/show_bug.cgi?id=173724
1179
1180         Reviewed by Darin Adler.
1181
1182         * bindings/scripts/CodeGeneratorJS.pm:
1183         (AddStringifierOperationIfNeeded):
1184         Update AddStringifierOperationIfNeeded to support stringifier on operations and be more
1185         strict about the allowed types. Also copies over all extended attributes to the synthetic
1186         operation.
1187
1188         * bindings/scripts/IDLParser.pm:
1189         (parseInterfaceMember):
1190         (parseOperationOrReadWriteAttributeOrMaplike):
1191         (parseReadOnlyMember):
1192         (parseStringifier):
1193         (parseStaticMember):
1194         (parseAttributeOrOperationForStringifierOrStatic):
1195         (parseReadWriteAttribute):
1196         (parseAttributeRest):
1197         (parseOperation):
1198         (parseSpecialOperation):
1199         (parseMapLikeProperties):
1200         (parseOperationRest):
1201         (parseAttributeOrOperationOrIterator): Deleted.
1202         (parseQualifier): Deleted.
1203         (parseAttributeOrOperationRest): Deleted.
1204         (parseAttribute): Deleted.
1205         (parseOperationOrIterator): Deleted.
1206         - Update parser to more closely resemble the WebIDL grammar, splitting out parseStringifier and
1207           parseStaticMember into their own subroutines. 
1208         - Move those and parseSerializer, parseStringifier, parseStaticMember, parseIterableRest and a split out
1209           parseReadOnlyMembers up into parseInterfaceMember to make it clearer that they are top level members
1210           and match the grammar.
1211         - Rename parseAttributeOrOperationOrIterator to parseOperationOrReadWriteAttributeOrMaplike to match the
1212           grammar language and make it clear what it does.
1213         - Add parseAttributeOrOperationForStringifierOrStatic which contains most of the logic for parsing stringifiers
1214           and static members, which have almost identical grammars.
1215         - Remove creator special which no longer exists in the spec.
1216
1217         * css/DOMMatrixReadOnly.idl:
1218         * css/WebKitCSSMatrix.idl:
1219         * dom/Range.idl:
1220         * html/URLSearchParams.idl:
1221         Fix FIXMEs by switching to use stringifier.
1222
1223         * bindings/scripts/test/JS/JSTestStringifier.cpp: Added.
1224         * bindings/scripts/test/JS/JSTestStringifier.h: Added.
1225         * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp: Added.
1226         * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.h: Added.
1227         * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp: Added.
1228         * bindings/scripts/test/JS/JSTestStringifierNamedOperation.h: Added.
1229         * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp: Added.
1230         * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.h: Added.
1231         * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp: Added.
1232         * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.h: Added.
1233         * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp: Added.
1234         * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.h: Added.
1235         * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp: Added.
1236         * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.h: Added.
1237         * bindings/scripts/test/TestStringifier.idl: Added.
1238         * bindings/scripts/test/TestStringifierAnonymousOperation.idl: Added.
1239         * bindings/scripts/test/TestStringifierNamedOperation.idl: Added.
1240         * bindings/scripts/test/TestStringifierOperationImplementedAs.idl: Added.
1241         * bindings/scripts/test/TestStringifierOperationNamedToString.idl: Added.
1242         * bindings/scripts/test/TestStringifierReadOnlyAttribute.idl: Added.
1243         * bindings/scripts/test/TestStringifierReadWriteAttribute.idl: Added.
1244         Add new tests.
1245
1246 2017-06-24  Chris Fleizach  <cfleizach@apple.com>
1247
1248         AX: Cannot call setValue() on contenteditable or ARIA text controls
1249         https://bugs.webkit.org/show_bug.cgi?id=173520
1250
1251         Reviewed by Ryosuke Niwa.
1252
1253         Add support for changing the value of a contenteditable and any other aria text control in setValue().
1254  
1255         Test: accessibility/mac/set-value-editable-types.html
1256
1257         * accessibility/AccessibilityRenderObject.cpp:
1258         (WebCore::AccessibilityRenderObject::setValue):
1259
1260 2017-06-23  Simon Fraser  <simon.fraser@apple.com>
1261
1262         Attempt to fix an internal build after r218755.
1263
1264         * bindings/js/JSMainThreadExecStateInstrumentation.h:
1265
1266 2017-06-23  Chris Dumez  <cdumez@apple.com>
1267
1268         Add release assertion to make sure callbackIdentifier is not 0 in DocumentLoader::finishedLoadingIcon()
1269         https://bugs.webkit.org/show_bug.cgi?id=173792
1270
1271         Reviewed by Ryosuke Niwa.
1272
1273         Add release assertion to make sure callbackIdentifier is not 0 in DocumentLoader::finishedLoadingIcon()
1274         as this could cause HashTable corruption on WebPageProxy side.
1275
1276         * loader/DocumentLoader.cpp:
1277         (WebCore::DocumentLoader::finishedLoadingIcon):
1278
1279 2017-06-23  Youenn Fablet  <youenn@apple.com>
1280
1281         webrtc::WebRtcSession is not handling correctly its state when setLocalDescription fails and is called again
1282         https://bugs.webkit.org/show_bug.cgi?id=173783
1283
1284         Reviewed by Alex Christensen.
1285
1286         Test: webrtc/libwebrtc/setLocalDescriptionCrash.html
1287
1288         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
1289         (WebCore::LibWebRTCMediaEndpoint::doSetLocalDescription): Fail early if there is no pending remote description and description is for an answer.
1290
1291 2017-06-23  Eric Carlson  <eric.carlson@apple.com>
1292
1293         [MediaStream macOS] enumerateDevices should only return valid audio capture devices
1294         https://bugs.webkit.org/show_bug.cgi?id=173790
1295         <rdar://problem/32260334>
1296
1297         Reviewed by Youenn Fablet.
1298
1299         * platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:
1300         (WebCore::isValidCaptureDevice): A valid device has a name and is not an aggregate device
1301         created by VPIO.
1302         (WebCore::CoreAudioCaptureDeviceManager::refreshAudioCaptureDevices):
1303
1304 2017-06-23  Jer Noble  <jer.noble@apple.com>
1305
1306         [WK2] Support -[WebAVPlayerController setMuted:]
1307         https://bugs.webkit.org/show_bug.cgi?id=173777
1308
1309         Reviewed by Eric Carlson.
1310
1311         Have -[WebAVPlayerController setMuted:] pass the request to its delegate (the model)
1312         rather than just storing the value.
1313
1314         * platform/cocoa/WebPlaybackSessionModel.h:
1315         * platform/cocoa/WebPlaybackSessionModelMediaElement.h:
1316         * platform/cocoa/WebPlaybackSessionModelMediaElement.mm:
1317         (WebCore::WebPlaybackSessionModelMediaElement::toggleMuted):
1318         (WebCore::WebPlaybackSessionModelMediaElement::setMuted):
1319         * platform/ios/WebAVPlayerController.h:
1320         * platform/ios/WebAVPlayerController.mm:
1321         (-[WebAVPlayerController isMuted]):
1322         (-[WebAVPlayerController setMuted:]):
1323         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
1324         (WebVideoFullscreenControllerContext::setMuted):
1325
1326 2017-06-23  Frederic Wang  <fwang@igalia.com>
1327
1328         Make RenderLayer::handleTouchEvent use usesAcceleratedScrolling()
1329         https://bugs.webkit.org/show_bug.cgi?id=173763
1330
1331         Reviewed by Simon Fraser.
1332
1333         No new tests, behavior is unchanged.
1334
1335         * rendering/RenderLayer.cpp:
1336         (WebCore::RenderLayer::handleTouchEvent): Call usesAcceleratedScrolling() instead of
1337         hasTouchScrollableOverflow() for clarity.
1338
1339 2017-06-23  Konstantin Tokarev  <annulen@yandex.ru>
1340
1341         Remove excessive headers from WebCore/{bindings,css,dom}
1342         https://bugs.webkit.org/show_bug.cgi?id=173766
1343
1344         Reviewed by Simon Fraser.
1345
1346         No new tests needed.
1347
1348         * ForwardingHeaders/runtime/ThrowScope.h: Added.
1349         * Modules/plugins/QuickTimePluginReplacement.mm:
1350         * bindings/js/CachedScriptSourceProvider.h:
1351         * bindings/js/JSCommandLineAPIHostCustom.cpp:
1352         * bindings/js/JSCustomXPathNSResolver.cpp:
1353         * bindings/js/JSDOMConstructorNotConstructable.h:
1354         * bindings/js/JSDOMConvertBase.h:
1355         * bindings/js/JSDOMConvertBufferSource.h:
1356         * bindings/js/JSDOMConvertInterface.h:
1357         * bindings/js/JSDOMConvertStrings.h:
1358         * bindings/js/JSDOMConvertUnion.h:
1359         * bindings/js/JSDOMConvertVariadic.h:
1360         * bindings/js/JSDOMConvertWebGL.h:
1361         * bindings/js/JSDOMExceptionHandling.h:
1362         * bindings/js/JSDOMIterator.h:
1363         * bindings/js/JSDOMMapLike.h:
1364         * bindings/js/JSDOMWindowBase.cpp:
1365         * bindings/js/JSDOMWindowCustom.cpp:
1366         * bindings/js/JSDOMWindowCustom.h:
1367         * bindings/js/JSDOMWindowProperties.h:
1368         * bindings/js/JSDOMWrapperCache.h:
1369         * bindings/js/JSLazyEventListener.cpp:
1370         * bindings/js/JSMainThreadExecStateInstrumentation.h:
1371         * bindings/js/JSMediaListCustom.h:
1372         * bindings/js/JSNodeCustom.h:
1373         * bindings/js/JSNodeListCustom.h:
1374         * bindings/js/JSVideoTrackListCustom.cpp:
1375         * bindings/js/ScheduledAction.h:
1376         * bindings/js/ScriptSourceCode.h:
1377         * bindings/js/SerializedScriptValue.h:
1378         * bindings/js/WebCoreJSClientData.h:
1379         * css/CSSFontFeatureValue.h:
1380         * css/CSSPrimitiveValue.h:
1381         * css/CSSStyleSheet.h:
1382         * css/CSSValue.h:
1383         * css/StyleBuilderCustom.h:
1384         * dom/ContainerNodeAlgorithms.h:
1385         * dom/DataTransfer.h:
1386         * dom/Node.h:
1387         * dom/NodeRareData.h:
1388         * dom/Position.h:
1389         * dom/RenderedDocumentMarker.h:
1390
1391 2017-06-23  Basuke Suzuki  <Basuke.Suzuki@sony.com>
1392
1393         Fix broken WinCairo build
1394
1395         [Curl] Extract CurlDownloadManager as shared background task handler
1396         https://bugs.webkit.org/show_bug.cgi?id=173557
1397
1398         Reviewed by Joseph Pecoraro.
1399
1400         * platform/network/curl/CurlManager.h:
1401
1402 2017-06-23  Chris Dumez  <cdumez@apple.com>
1403
1404         [iOS] Potential crash under WebCore::notifyLowPowerModeChanged(WebCore::LowPowerModeNotifier*, bool)
1405         https://bugs.webkit.org/show_bug.cgi?id=173755
1406         <rdar://problem/32940942>
1407
1408         Reviewed by Mark Lam.
1409
1410         The crash was happening because the WebLowPowerModeObserver would dispatch
1411         a lambda to the main thread but the LowPowerModeNotifier object could be
1412         dead by the time we get to the main thread.
1413
1414         To address the issue, keep a strong ref to the WebLowPowerModeObserver in
1415         the lambda we dispatch to the main thread to make sure it stays alive until
1416         we execute the lambda. In the LowPowerModeNotifier destructor, we now reset
1417         the WebLowPowerModeObserver's notifier pointer to nil and I added a null
1418         check for this notifier in the lambda.
1419
1420         * platform/LowPowerModeNotifier.cpp:
1421         (WebCore::LowPowerModeNotifier::~LowPowerModeNotifier):
1422         * platform/LowPowerModeNotifier.h:
1423         * platform/ios/LowPowerModeNotifierIOS.mm:
1424         (-[WebLowPowerModeObserver initWithNotifier:]):
1425         (-[WebLowPowerModeObserver _didReceiveLowPowerModeChange]):
1426         (WebCore::LowPowerModeNotifier::LowPowerModeNotifier):
1427         (WebCore::LowPowerModeNotifier::~LowPowerModeNotifier):
1428         (WebCore::notifyLowPowerModeChanged):
1429
1430 2017-06-23  Alex Christensen  <achristensen@webkit.org>
1431
1432         Add SPI to WKURLSchemeTask for redirection
1433         https://bugs.webkit.org/show_bug.cgi?id=173730
1434
1435         Reviewed by Brady Eidson.
1436
1437         * platform/network/CacheValidation.cpp:
1438         (WebCore::computeFreshnessLifetimeForHTTPFamily):
1439         Asserting that redirects are always http/https URLs is no longer valid.
1440         If there's a custom scheme redirect, give it no freshness lifetime in the cache.
1441
1442 2017-06-23  Konstantin Tokarev  <annulen@yandex.ru>
1443
1444         Remove excessive headers from WebCore/{editing,fileapi,history,html,loader,page}
1445         https://bugs.webkit.org/show_bug.cgi?id=173769
1446
1447         Reviewed by Simon Fraser.
1448
1449         No new tests needed.
1450
1451         * css/CSSFontFaceSource.cpp:
1452         * editing/DictationCommand.cpp:
1453         * editing/Editor.h:
1454         * editing/VisiblePosition.h:
1455         * editing/VisibleUnits.h:
1456         * fileapi/BlobBuilder.h:
1457         * history/PageCache.h:
1458         * html/DOMURL.h:
1459         * html/HTMLCollection.h:
1460         * html/HTMLMediaElement.cpp:
1461         * html/HTMLMediaElement.h:
1462         * html/HTMLPlugInImageElement.cpp:
1463         * html/StepRange.h:
1464         * html/canvas/CanvasRenderingContext.h:
1465         * html/canvas/CanvasRenderingContext2D.h:
1466         * html/parser/HTMLDocumentParser.cpp:
1467         * html/parser/HTMLElementStack.h:
1468         * html/parser/HTMLInputStream.h:
1469         * html/shadow/MediaControlElements.cpp:
1470         * html/shadow/MediaControls.cpp:
1471         * html/shadow/MediaControls.h:
1472         * html/track/TrackListBase.h:
1473         * html/track/VTTCue.h:
1474         * html/track/WebVTTParser.cpp:
1475         * html/track/WebVTTParser.h:
1476         * loader/CrossOriginPreflightChecker.cpp:
1477         * loader/DocumentThreadableLoader.cpp:
1478         * loader/FrameLoaderClient.h:
1479         * loader/LinkPreloadResourceClients.h:
1480         * loader/LoadTiming.h:
1481         * loader/ThreadableLoaderClientWrapper.h:
1482         * loader/WorkerThreadableLoader.h:
1483         * loader/cache/CachedResourceLoader.h:
1484         * loader/cache/CachedResourceRequest.h:
1485         * loader/cache/CachedSVGDocument.h:
1486         * loader/cache/CachedTextTrack.h:
1487         * loader/icon/IconLoader.cpp:
1488         * page/AlternativeTextClient.h:
1489         * page/CaptionUserPreferences.cpp:
1490         * page/CaptionUserPreferences.h:
1491         * page/ContextMenuClient.h:
1492         * page/MainFrame.h:
1493         * page/Page.h:
1494         * page/PageGroup.h:
1495         * page/PerformanceEntry.h:
1496         * page/PerformanceResourceTiming.h:
1497         * page/ResourceUsageOverlay.cpp:
1498         * page/ResourceUsageOverlay.h:
1499         * page/UserContentController.h:
1500         * page/UserContentProvider.h:
1501         * page/animation/AnimationBase.h:
1502         * page/animation/CSSPropertyAnimation.h:
1503         * page/animation/CompositeAnimation.h:
1504         * page/scrolling/ScrollingCoordinator.h:
1505         * xml/XSLTProcessorLibxslt.cpp:
1506         * xml/parser/XMLDocumentParserLibxml2.cpp:
1507
1508 2017-06-23  Chris Dumez  <cdumez@apple.com>
1509
1510         [mac-wk1] requestAnimationFrame callbacks may not get serviced
1511         https://bugs.webkit.org/show_bug.cgi?id=173628
1512
1513         Reviewed by Simon Fraser.
1514
1515         Page::setIsVisibleInternal() was firing the 'visibilitychange' event
1516         synchronously while in the middle of updating its visibility/activity
1517         state. This allowed the JavaScript to re-enter the method by calling
1518         testRunner.setPageVisibility() / resetPageVisiblity() and we would
1519         end up in an inconsistent state.
1520
1521         No new tests, extended existing test.
1522
1523         * dom/Document.cpp:
1524         (WebCore::Document::visibilityStateChanged):
1525         Do no fire the visibilitychange event synchronously as we are in the
1526         middle of updating the page's activity state. Instead fire the
1527         event asynchronously.
1528
1529         * page/Page.cpp:
1530         (WebCore::Page::setIsVisibleInternal):
1531         Move the calling of Document::visibilityStateChanged() until after we're
1532         done updating the page's visibility state.
1533
1534         * testing/Internals.cpp:
1535         (WebCore::Internals::scriptedAnimationsAreSuspended):
1536         * testing/Internals.h:
1537         * testing/Internals.idl:
1538         Add test infrastructure to check if scripted animations are suspended.
1539
1540 2017-06-23  Eric Carlson  <eric.carlson@apple.com>
1541
1542         [iOS] Respond to AudioSession interruption and resume
1543         https://bugs.webkit.org/show_bug.cgi?id=173718
1544         <rdar://problem/32925263>
1545
1546         Reviewed by Youenn Fablet.
1547
1548         Tested manually.
1549
1550         * WebCore.xcodeproj/project.pbxproj: Add CoreAudioCaptureSourceIOS.mm/.h
1551
1552         * platform/mediastream/RealtimeMediaSource.h: Make createWeakPtr protected so derived classes
1553         can use it.
1554
1555         * platform/mediastream/ios/CoreAudioCaptureSourceIOS.h: Added.
1556         * platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm: Added.
1557         (-[WebCoreAudioCaptureSourceIOSListener initWithCallback:]):
1558         (-[WebCoreAudioCaptureSourceIOSListener invalidate]):
1559         (-[WebCoreAudioCaptureSourceIOSListener handleInterruption:]):
1560         (-[WebCoreAudioCaptureSourceIOSListener sessionMediaServicesWereReset:]):
1561         (WebCore::CoreAudioCaptureSourceIOS::CoreAudioCaptureSourceIOS):
1562         (WebCore::CoreAudioCaptureSourceIOS::~CoreAudioCaptureSourceIOS):
1563
1564         * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
1565         (WebCore::CoreAudioSharedUnit::suspended): 
1566         (WebCore::CoreAudioSharedUnit::setupAudioUnit): Clear m_suspended.
1567         (WebCore::CoreAudioSharedUnit::suspend): Don't clear sources or uninitialize the audio unit,
1568         suspend is temporary. Set m_suspended.
1569         (WebCore::CoreAudioSharedUnit::resume): New, restart the audio unit.
1570         (WebCore::CoreAudioCaptureSource::create): Create the correct object.
1571         (WebCore::CoreAudioCaptureSource::scheduleReconfiguration): Dispatch to main thread if necessary.
1572         (WebCore::CoreAudioCaptureSource::beginInterruption): New, suspend from main thread.
1573         (WebCore::CoreAudioCaptureSource::endInterruption): New, resume/reconfigure from main thread.
1574         (WebCore::CoreAudioCaptureSource::interrupted):
1575         * platform/mediastream/mac/CoreAudioCaptureSource.h:
1576
1577 2017-06-23  Zan Dobersek  <zdobersek@igalia.com>
1578
1579         [GCrypt] Drop the AES-CFB support
1580         https://bugs.webkit.org/show_bug.cgi?id=173547
1581
1582         Reviewed by Jiewen Tan.
1583
1584         No new tests -- relevant test baselines are updated.
1585
1586         Stop registering the AES-CFB algorithm as something that's supported by
1587         the libgcrypt implementation. This algorithm was previously included in
1588         the Web Crypto API specification, but has since been dropped from it.
1589
1590         Conveniently, libgcrypt only recently gained support for the CFB8 AES
1591         cipher mode that's required by the specification, meaning we could only
1592         support this algorithm with future releases of the libgcrypt library.
1593
1594         * crypto/gcrypt/CryptoAlgorithmRegistryGCrypt.cpp:
1595         (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
1596
1597 2017-06-23  Carlos Garcia Campos  <cgarcia@igalia.com>
1598
1599         [WPE] Enable PUBLIC_SUFFIX_LIST
1600         https://bugs.webkit.org/show_bug.cgi?id=173758
1601
1602         Reviewed by Žan Doberšek.
1603
1604         * PlatformWPE.cmake: Add PublicSuffixSoup.cpp to the build.
1605
1606 2017-06-22  Antti Koivisto  <antti@apple.com>
1607
1608         REGRESSION(r217695): Offscreen/overflowed items not being rendered while translating in-frame
1609         https://bugs.webkit.org/show_bug.cgi?id=173732
1610
1611         Reviewed by Simon Fraser.
1612
1613         If an accelerated animation starts completely outside the view we fail to create backing for it
1614         when it moves into view.
1615
1616         Fix by computing the full extent rect of the animation when it starts and doing the viewport overlap
1617         testing with that.
1618
1619         Test: compositing/backing/transform-transition-from-outside-view.html
1620
1621         * platform/graphics/GraphicsLayer.h:
1622         (WebCore::GraphicsLayer::animationExtent):
1623         (WebCore::GraphicsLayer::setAnimationExtent):
1624         * platform/graphics/ca/GraphicsLayerCA.cpp:
1625         (WebCore::GraphicsLayerCA::computeVisibleAndCoverageRect):
1626
1627             Return the current animation transformation matrix so we can use it elsewhere without recomputing.
1628
1629         (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
1630
1631             If we have animation extent use it instead of bounds for visibility testing.
1632
1633         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
1634
1635             Track if theres is a visible ancestor layer with a transition animation.
1636
1637         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
1638         (WebCore::GraphicsLayerCA::updateCoverage):
1639
1640             For simplicity create backing for all sublayers of a visible transform animated layer.
1641
1642         * platform/graphics/ca/GraphicsLayerCA.h:
1643         (WebCore::GraphicsLayerCA::VisibleAndCoverageRects::VisibleAndCoverageRects): Deleted.
1644         * rendering/RenderLayerBacking.cpp:
1645         (WebCore::RenderLayerBacking::updateGeometry):
1646
1647             Pass the animation extent (including descendants) to GraphicsLayer.
1648
1649 2017-06-22  Chris Dumez  <cdumez@apple.com>
1650
1651         ResourceLoadStatisticsStore should be ThreadSafeRefCounted
1652         https://bugs.webkit.org/show_bug.cgi?id=173753
1653         <rdar://problem/32939326>
1654
1655         Reviewed by Andreas Kling.
1656
1657         ResourceLoadStatisticsStore should be ThreadSafeRefCounted as it is ref'd/deref'd
1658         from different threads.
1659
1660         * loader/ResourceLoadStatisticsStore.h:
1661
1662 2017-06-22  Myles C. Maxfield  <mmaxfield@apple.com>
1663
1664         @font-face rules with invalid primary fonts never download their secondary fonts
1665         https://bugs.webkit.org/show_bug.cgi?id=173138
1666         <rdar://problem/32554450>
1667
1668         Reviewed by Simon Fraser.
1669
1670         We have logic in CSSFontAccessor::font() which disallows downloading a CSSFontFace if that CSSFontFace
1671         is already in the Succeeded state. However, it was possible for a succeeded CSSFontFace to still fail
1672         to create a font. In this situation, we wouldn't be able to use the downloaded font, and we wouldn't
1673         try to download the next item in the src: list because the CSSFontFace is succeeded.
1674
1675         This patch strengthens the meaning of the Succeeded state. Previously, it just meant that the bytes
1676         in the file were downloaded successfully. This patch extends this to also mean that the bytes in the
1677         file can be successfully interpreted as a font. This way, the CSSFontFace in the example above won't be
1678         set to the Succeeded state, so we will continue follow the src: list and download the secondary fonts.
1679
1680         This has an added benefit that the CSS Font Loading API's promises will be called more appropriately.
1681         The transition to the Succeeded state will trigger a resolve of the promise. Now, these promises will
1682         only be resolved if the fonts are actually parsed and understood by our text system.
1683
1684         Test: fast/text/font-fallback-invalid-load.html
1685
1686         * css/CSSFontFaceSource.cpp:
1687         (WebCore::CSSFontFaceSource::fontLoaded): Move to the failed state if we can't understand the font
1688         data. This is the crux of this patch.
1689         (WebCore::CSSFontFaceSource::font): This function should only be called if we are in the Succeeded
1690         state, which means now we know we should always be able to understand the bytes of the file. Therefore,
1691         we can change some if statements into ASSERT()s.
1692         * loader/cache/CachedSVGFont.cpp:
1693         (WebCore::CachedSVGFont::createFont): Ditto.
1694         (WebCore::CachedSVGFont::ensureCustomFontData): Similarly to CSSFontFaceSource::fontLoaded(), this
1695         adds another check to our criteria for transitioning into the Succeeded state, which will guarantee that
1696         later we will always be able to create the font object.
1697
1698 2017-06-22  Andreas Kling  <akling@apple.com>
1699
1700         Rename MemoryPressureHandler::setTabCount to setPageCount
1701         https://bugs.webkit.org/show_bug.cgi?id=173750
1702
1703         Reviewed by Daniel Bates.
1704
1705         * page/Page.cpp:
1706         (WebCore::Page::~Page):
1707
1708 2017-06-22  Antoine Quint  <graouts@apple.com>
1709
1710         Modern media controls localised strings are out of sync with used strings in code
1711         https://bugs.webkit.org/show_bug.cgi?id=173752
1712
1713         Reviewed by Dean Jackson.
1714
1715         Remove strings we no longer use and add strings we use but failed to add previously.
1716
1717         * English.lproj/modern-media-controls-localized-strings.js:
1718
1719 2017-06-22  Antoine Quint  <graouts@apple.com>
1720
1721         Log when scripted animations get suspended and resumed
1722         https://bugs.webkit.org/show_bug.cgi?id=173751
1723
1724         Reviewed by Dean Jackson.
1725
1726         More work toward understanding why rAF callbacks are not serviced on bots (webkit.org/b/173628).
1727
1728         * dom/Document.cpp:
1729         (WebCore::Document::requestAnimationFrame):
1730         * dom/ScriptedAnimationController.cpp:
1731         (WebCore::ScriptedAnimationController::suspend):
1732         (WebCore::ScriptedAnimationController::resume):
1733         (WebCore::ScriptedAnimationController::logSuspendCount): Deleted.
1734         * dom/ScriptedAnimationController.h:
1735         * page/Page.cpp:
1736         (WebCore::Page::suspendScriptedAnimations):
1737         (WebCore::Page::resumeScriptedAnimations):
1738         (WebCore::Page::setIsVisibleInternal):
1739
1740 2017-06-22  Zalan Bujtas  <zalan@apple.com>
1741
1742         REGRESSION(r214712): Infinite recursion in RenderTable::layout in paginated mode
1743         https://bugs.webkit.org/show_bug.cgi?id=173731
1744         <rdar://problem/32237775>
1745
1746         Reviewed by Antti Koivisto.
1747
1748         We should just skip bottom captions to check if section is moved, since they don't affect
1749         the section position (bottom <caption> is preceded by <tfoot>).
1750
1751         Test: fast/table/caption-bottom-with-pagination.html
1752
1753         * rendering/RenderTable.cpp:
1754         (WebCore::RenderTable::layout):
1755
1756 2017-06-22  Dean Jackson  <dino@apple.com>
1757
1758         REGRESSION (r215809): 50% regression 14E305 -> 15A293a in MotionMark Suits test
1759         https://bugs.webkit.org/show_bug.cgi?id=173728
1760         <rdar://problem/32526744>
1761
1762         Reviewed by Tim Horton.
1763
1764         It turns out that CGGradientCreateWithColors is much slower than
1765         CGGradientCreateWithColorComponents, even without colorspace variations.
1766         Update the gradient creation code to only use this slower path
1767         when it has extended colors.
1768
1769         * platform/graphics/Color.h: Add a FIXME about renaming some methods.
1770         * platform/graphics/cg/GradientCG.cpp: Use CGGradientCreateWithColorComponents
1771         if we have stops that are not extended colors.
1772         (WebCore::Gradient::platformGradient):
1773
1774 2017-06-22  Youenn Fablet  <youenn@apple.com>
1775
1776         Fix memory leak in LibWebRTCMediaEndpoint
1777         https://bugs.webkit.org/show_bug.cgi?id=173717
1778
1779         Reviewed by Eric Carlson.
1780
1781         No chnage of behavior.
1782         Making sure SessionDescription pointer get properly released.
1783
1784         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
1785         (WebCore::LibWebRTCMediaEndpoint::createSessionDescriptionSucceeded):
1786         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
1787         * testing/MockLibWebRTCPeerConnection.cpp: Allocating description.
1788
1789 2017-06-22  Daniel Bates  <dabates@apple.com>
1790
1791         Make FrameLoadRequest a move-only type
1792         https://bugs.webkit.org/show_bug.cgi?id=173682
1793
1794         Reviewed by Alex Christensen and Darin Adler.
1795
1796         A FrameLoadRequest groups together the information to perform a load into a single object
1797         that is more manageable to pass around than its constituent parts. Code that receives a
1798         FrameLoadRequest is expected to extract out the information it needs to complete its task.
1799         And it does not make sense to re-use the same FrameLoadRequest object for more than one
1800         load. Therefore, it is sufficient to make FrameLoadRequest a move-only type.
1801
1802         * inspector/InspectorFrontendClientLocal.cpp:
1803         (WebCore::InspectorFrontendClientLocal::openInNewTab):
1804         * inspector/InspectorPageAgent.cpp:
1805         (WebCore::InspectorPageAgent::navigate):
1806         * loader/FrameLoadRequest.h:
1807         * loader/FrameLoader.cpp:
1808         (WebCore::FrameLoader::changeLocation):
1809         (WebCore::FrameLoader::urlSelected):
1810         (WebCore::FrameLoader::loadURLIntoChildFrame):
1811         (WebCore::FrameLoader::loadFrameRequest):
1812         (WebCore::FrameLoader::loadURL):
1813         (WebCore::FrameLoader::load):
1814         (WebCore::FrameLoader::loadPostRequest):
1815         (WebCore::createWindow):
1816         * loader/FrameLoader.h:
1817         * loader/NavigationScheduler.cpp:
1818         (WebCore::NavigationScheduler::scheduleLocationChange):
1819         * page/ContextMenuController.cpp:
1820         (WebCore::openNewWindow):
1821         (WebCore::ContextMenuController::contextMenuItemSelected):
1822         * page/DOMWindow.cpp:
1823         (WebCore::DOMWindow::createWindow):
1824         * replay/UserInputBridge.cpp:
1825         (WebCore::UserInputBridge::loadRequest):
1826         * replay/UserInputBridge.h:
1827
1828 2017-06-22  Jer Noble  <jer.noble@apple.com>
1829
1830         REGRESSION (r217223): [iOS] Video keeps playing after application is backgrounded
1831         https://bugs.webkit.org/show_bug.cgi?id=173727
1832
1833         Reviewed by Eric Carlson.
1834
1835         Only override media element visibility if it is in picture-in-picture mode (not fullscreen generally).
1836
1837         * html/HTMLMediaElement.cpp:
1838         (WebCore::HTMLMediaElement::visibilityStateChanged):
1839
1840 2017-06-22  Joseph Pecoraro  <pecoraro@apple.com>
1841
1842         Follow-up to r218662. Only log backtraces for DumpRenderTree.
1843
1844         Rubber-stamped by Antoine Quint.
1845
1846         * dom/ScriptedAnimationController.cpp:
1847         (WebCore::ScriptedAnimationController::logSuspendCount):
1848
1849 2017-06-22  Charlie Turner  <cturner@igalia.com>
1850
1851         [GTK] Spreaker live shows won't play
1852         https://bugs.webkit.org/show_bug.cgi?id=173306
1853
1854         Reviewed by Xabier Rodriguez-Calvar.
1855
1856         This was due to removing the code that negotiated caps for Icecast
1857         streams based on the response headers in r191947. The problem is that
1858         the typefind element can sometimes squint hard enough and see an MP3
1859         stream and attempt to play it, resulting in garbled audio playback. More
1860         commonly typefind fails to recognize the Icecast stream and bails,
1861         resulting in no playback at all.
1862
1863         r191947 also removed the emission of metadata into the pipeline. This
1864         patch also leaves that out since we have no use for it within WebKit.
1865
1866         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1867         (StreamingClient::handleResponseReceived):
1868
1869 2017-06-22  Matt Lewis  <jlewis3@apple.com>
1870
1871         Unreviewed, rolling out r218633.
1872
1873         The test is failing frequently on Sierra Debug and Windows
1874
1875         Reverted changeset:
1876
1877         "AX: Cannot call setValue() on contenteditable or ARIA text
1878         controls"
1879         https://bugs.webkit.org/show_bug.cgi?id=173520
1880         http://trac.webkit.org/changeset/218633
1881
1882 2017-06-22  Romain Bellessort  <romain.bellessort@crf.canon.fr>
1883
1884         [Readable Streams API] Implement ReadableStreamBYOBReader read()
1885         https://bugs.webkit.org/show_bug.cgi?id=172714
1886
1887         Reviewed by Youenn Fablet.
1888
1889         Implemented read() method of ReadableStreamBYOBReader [1]. Also added code related 
1890         to BYOB features that were previously described as FIXMEs and that now become reachable.
1891
1892         In addition, WPT tests that involve read() have allowed to identify 2 bugs not directly 
1893         related to read() (172716 and 172717). They will be fixed distinctly. Once done, all WPT
1894         tests should pass.
1895
1896         [1] https://streams.spec.whatwg.org/#byob-reader-read
1897
1898         WPT tests (web-platform-tests/streams/readable-byte-streams/general.js) already cover
1899         most cases for read() usage. Corresponding expectations have been updated. In addition,
1900         1 test has been added to WebKit tests (in streams/readable-stream-byob-reader.js) to 
1901         check that read() can only be applied to a ReadableStreamBYOBReader.
1902
1903         * Modules/streams/ReadableByteStreamInternals.js:
1904         (readableByteStreamControllerClearPendingPullIntos): Implemented.
1905         (readableByteStreamControllerEnqueue): Updated with support for BYOBReader.
1906         (readableByteStreamControllerPullInto): Added.
1907         (readableStreamAddReadIntoRequest): Added.
1908         * Modules/streams/ReadableStreamBYOBReader.js:
1909         (read): Added.
1910
1911 2017-06-22  Youenn Fablet  <youenn@apple.com>
1912
1913         [WebRTC] Prevent capturing at unconventional resolutions when using the SW encoder on Mac
1914         https://bugs.webkit.org/show_bug.cgi?id=172602
1915         <rdar://problem/32407693>
1916
1917         Reviewed by Eric Carlson.
1918
1919         Test: platform/mac/webrtc/captureCanvas-webrtc-software-encoder.html
1920
1921         Add internal API to switch on/off hardware H264 encoder.
1922         Add checks for standard size. If using a software encoder and frame size is not standard,
1923         the session is destroyed and no frame is sent at all.
1924
1925         Added tests based on captureStream.
1926         Fixed the case of capturing a canvas which size is changing.
1927
1928         * Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:
1929         (WebCore::CanvasCaptureMediaStreamTrack::Source::canvasResized):
1930         * platform/mediastream/libwebrtc/H264VideoToolBoxEncoder.h:
1931         * platform/mediastream/libwebrtc/H264VideoToolBoxEncoder.mm:
1932         (WebCore::H264VideoToolboxEncoder::setHardwareEncoderForWebRTCAllowed):
1933         (WebCore::H264VideoToolboxEncoder::hardwareEncoderForWebRTCAllowed):
1934         (WebCore::isUsingSoftwareEncoder):
1935         (WebCore::H264VideoToolboxEncoder::CreateCompressionSession):
1936         (isStandardFrameSize): Added.
1937         (isUsingSoftwareEncoder): Added.
1938         * testing/Internals.cpp:
1939         (WebCore::Internals::setH264HardwareEncoderAllowed):
1940         * testing/Internals.h:
1941         * testing/Internals.idl:
1942
1943 2017-06-21  Youenn Fablet  <youenn@apple.com>
1944
1945         [Fetch API] TypeError when called with body === {}
1946         https://bugs.webkit.org/show_bug.cgi?id=173295
1947         <rdar://problem/32746733>
1948
1949         Reviewed by Sam Weinig.
1950
1951         Test: fetch/body-init.html
1952
1953         Handling body of Request and Response using binding generator to correctly handle unions.
1954         The biggest change is that any value that is not a specific type in the union will match a String.
1955         This is matching WebIDL spec and Firefox behavior.
1956
1957         Handling of ReadableStream bodies remains in JS builtin for Response.
1958         This allows easier handling cloning and consumption of body.
1959         Adding setBodyAsReadableStream since this is no longer handled by extractBody.
1960
1961         * Modules/fetch/FetchBody.cpp:
1962         (WebCore::FetchBody::extract): Using Variant instead of JSC::JSValue.
1963         (WebCore::FetchBody::readableStreamBody): Introduced to handle the
1964         case of readable stream bodies.
1965         * Modules/fetch/FetchBody.h:
1966         * Modules/fetch/FetchBodyOwner.cpp:
1967         (WebCore::FetchBodyOwner::extractBody):
1968         * Modules/fetch/FetchBodyOwner.h:
1969         (WebCore::FetchBodyOwner::setBody):
1970         * Modules/fetch/FetchRequest.cpp:
1971         (WebCore::FetchRequest::setBody): Splitting setBody for ease of readability.
1972         (WebCore::FetchRequest::setBodyFromInputRequest):
1973         * Modules/fetch/FetchRequest.h:
1974         * Modules/fetch/FetchRequest.idl:
1975         * Modules/fetch/FetchRequest.js:
1976         (initializeFetchRequest):
1977         * Modules/fetch/FetchResponse.cpp:
1978         (WebCore::FetchResponse::initializeWith):
1979         (WebCore::FetchResponse::setBodyAsReadableStream):
1980         * Modules/fetch/FetchResponse.h:
1981         * Modules/fetch/FetchResponse.idl:
1982         * Modules/fetch/FetchResponse.js:
1983         (initializeFetchResponse):
1984         * WebCore.xcodeproj/project.pbxproj:
1985         * bindings/js/WebCoreBuiltinNames.h:
1986
1987 2017-06-21  Simon Fraser  <simon.fraser@apple.com>
1988
1989         Add z-index to compositing logging output
1990         https://bugs.webkit.org/show_bug.cgi?id=173684
1991
1992         Reviewed by Zalan Bujtas.
1993
1994         Show z-index, which is often useful to find negative z-index items.
1995
1996         Log "+foreground" rather than "foreground" to indicate that this layer has an
1997         additional foreground/background layer, and fix spacing.
1998
1999         * rendering/RenderLayerCompositor.cpp:
2000         (WebCore::RenderLayerCompositor::logLayerInfo):
2001
2002 2017-06-21  Chris Dumez  <cdumez@apple.com>
2003
2004         Unreviewed, fix Window Debug build after r218660.
2005
2006         * rendering/SimpleLineLayout.cpp:
2007         (WebCore::SimpleLineLayout::canUseForWithReason):
2008
2009 2017-06-21  Andreas Kling  <akling@apple.com>
2010
2011         Increase memory kill limits for WebContent processes that manage multiple tabs.
2012         https://bugs.webkit.org/show_bug.cgi?id=173674
2013
2014         Reviewed by Geoffrey Garen.
2015
2016         Plumb the non-utility Page count down to WTF::MemoryPressureHandler.
2017
2018         * page/Page.cpp:
2019         (WebCore::Page::Page):
2020         (WebCore::Page::~Page):
2021
2022 2017-06-21  Jiewen Tan  <jiewen_tan@apple.com>
2023
2024         [WebCrypto] Restore ordering of CryptoAlgorithmIdentifier in SerializedScriptValue
2025         https://bugs.webkit.org/show_bug.cgi?id=173678
2026         <rdar://problem/32879314>
2027
2028         Reviewed by Sam Weinig.
2029
2030         r218030 reorders the ordering of CryptoAlgorithmIdentifier in SerializedScriptValue,
2031         which introduces backward compatibility issues with CryptoKey objects stored in the
2032         IndexedDB. Hence, we should restore it back.
2033
2034         No tests.
2035
2036         * bindings/js/SerializedScriptValue.cpp:
2037
2038 2017-06-21  Daniel Bates  <dabates@apple.com>
2039
2040         Change FrameLoadRequest from a struct to a class
2041
2042         FrameLoadRequest is underutilizing the purpose of a struct - default visibility of
2043         members is public, as FrameLoadRequest explicitly groups its members under public:
2044         or private: sections. Maybe in the future we can make FrameLoadRequest a struct
2045         with only public members. For now, we should consider FrameLoadRequest a class.
2046
2047         * loader/FormSubmission.h:
2048         * loader/FrameLoadRequest.h:
2049         * loader/FrameLoader.h:
2050         * page/Chrome.h:
2051         * page/ChromeClient.h:
2052         * replay/UserInputBridge.h:
2053
2054 2017-06-21  Daewoong Jang  <daewoong.jang@navercorp.com>
2055
2056         Compiler error while building with !HAVE(ACCESSIBILITY)
2057         https://bugs.webkit.org/show_bug.cgi?id=173670
2058
2059         Reviewed by Chris Fleizach.
2060
2061         * accessibility/AXObjectCache.h:
2062         (WebCore::AXObjectCache::getOrCreate):
2063         (WebCore::AXObjectCache::childrenChanged):
2064
2065 2017-06-21  Antoine Quint  <graouts@apple.com>
2066
2067         Build fix.
2068
2069         Reviewed by Tim "Mr. T" Horton.
2070
2071         * dom/ScriptedAnimationController.cpp:
2072         (WebCore::ScriptedAnimationController::logSuspendCount):
2073         * page/Page.cpp:
2074         (WebCore::Page::suspendScriptedAnimations):
2075         (WebCore::Page::resumeScriptedAnimations):
2076
2077 2017-06-21  Antoine Quint  <graouts@apple.com>
2078
2079         Ensure DRT always logs rAF suspension debugging code
2080         https://bugs.webkit.org/show_bug.cgi?id=173681
2081
2082         Reviewed by Tim "Mr. T" Horton.
2083
2084         Instead of using a setting to check whether we should log information related to rAF
2085         callbacks being suspended with WK1, we now check whether we're using in DRT to avoid
2086         any potential issue with settings being in the incorrect state when a test is run.
2087
2088         * dom/ScriptedAnimationController.cpp:
2089         (WebCore::ScriptedAnimationController::logSuspendCount):
2090         * page/Page.cpp:
2091         (WebCore::Page::suspendScriptedAnimations):
2092         (WebCore::Page::resumeScriptedAnimations):
2093         * page/Settings.in:
2094         * platform/RuntimeApplicationChecks.h:
2095         * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
2096         (WebCore::MacApplication::isDumpRenderTree):
2097
2098 2017-06-21  Chris Dumez  <cdumez@apple.com>
2099
2100         Allow constructing a WTF:Function from a function pointer
2101         https://bugs.webkit.org/show_bug.cgi?id=173660
2102
2103         Reviewed by Alex Christensen.
2104
2105         Construct WTF:Function directly from a function pointer when possible
2106         instead of constructing a lambda to do so.
2107
2108         * Modules/encryptedmedia/InitDataRegistry.cpp:
2109         (WebCore::InitDataRegistry::InitDataRegistry):
2110         * page/Page.cpp:
2111         * page/mac/PageMac.mm:
2112         (WebCore::Page::platformInitialize):
2113         * platform/cf/MainThreadSharedTimerCF.cpp:
2114         (WebCore::setupPowerObserver):
2115         * platform/mac/WebCoreNSURLExtras.mm:
2116         * rendering/SimpleLineLayout.cpp:
2117         (WebCore::SimpleLineLayout::canUseForWithReason):
2118         * workers/Worker.cpp:
2119         (WebCore::Worker::Worker):
2120
2121 2017-06-21  Antoine Quint  <graouts@apple.com>
2122
2123         CSS text properties affect <video> shadow root
2124         https://bugs.webkit.org/show_bug.cgi?id=173664
2125         <rdar://problem/32904328>
2126
2127         Reviewed by Dean Jackson.
2128
2129         Ensure that we reset all inheritable styles back to their initial value for media shadow roots.
2130
2131         Test: media/modern-media-controls/time-label/time-label-inherited-text-indent.html
2132
2133         * Modules/modern-media-controls/controls/media-controls.css:
2134         (.media-controls-container):
2135
2136 2017-06-20  Simon Fraser  <simon.fraser@apple.com>
2137
2138         Remove WILL_REVEAL_EDGE_EVENTS code
2139         https://bugs.webkit.org/show_bug.cgi?id=173632
2140
2141         Reviewed by Sam Weinig, Beth Dakin.
2142
2143         Remove will-reveal-edge events, which never took off.
2144
2145         * dom/Document.cpp:
2146         (WebCore::Document::clearScriptedAnimationController):
2147         (WebCore::Document::sendWillRevealEdgeEventsIfNeeded): Deleted.
2148         * dom/Document.h:
2149         * dom/GlobalEventHandlers.idl:
2150         * html/HTMLBodyElement.idl:
2151         * html/HTMLFrameSetElement.idl:
2152         * page/FrameView.cpp:
2153         (WebCore::FrameView::scrollPositionChanged):
2154         * rendering/RenderLayer.cpp:
2155         (WebCore::RenderLayer::scrollTo):
2156
2157 2017-06-21  Daniel Bates  <dabates@apple.com>
2158
2159         Cleanup FrameLoadRequest
2160         https://bugs.webkit.org/show_bug.cgi?id=173564
2161         <rdar://problem/32903570>
2162
2163         Reviewed by Brent Fulgham.
2164
2165         FrameLoadRequest has too many constructors. Use default values to reduce the number of
2166         constructors. Have FrameLoadRequest hold a Ref<SecurityOrigin> instead of a RefPtr<SecurityOrigin>
2167         as FrameLoadRequest must always hold a valid SecurityOrigin, the security origin of the
2168         document that initiated the request.
2169
2170         * inspector/InspectorFrontendClientLocal.cpp:
2171         (WebCore::InspectorFrontendClientLocal::openInNewTab): Explicitly pass the null-string for
2172         the target frame name as we do not have one. Use C++11 brace initialization syntax and ASCIILiteral().
2173         Rename local variable from request to frameLoadRequest to better describe its purpose. Fix up
2174         FIXME comment added in r105600 to better describe the issue we should fix as the code as
2175         changed since the FIXME was added.
2176         * inspector/InspectorPageAgent.cpp:
2177         (WebCore::InspectorPageAgent::navigate): No need to pass ShouldReplaceDocumentIfJavaScriptURL::ReplaceDocumentIfJavaScriptURL
2178         now that the FrameLoadRequests constructor uses this policy by default. Use C++11 brace
2179         initialization syntax and ASCIILiteral(). Rename local variable from frameRequest to frameLoadRequest
2180         to better describe its purpose.
2181         * loader/FrameLoadRequest.cpp:
2182         (WebCore::FrameLoadRequest::FrameLoadRequest): Use C++11 brace initialization syntax.
2183         * loader/FrameLoadRequest.h: Remove many constructor overloads. Changed m_requester from
2184         RefPtr<SecurityOrigin> to Ref<SecurityOrigin> as we can never be instantiated with a null
2185         SecurityOrigin. Moved m_shouldCheckNewWindowPolicy to be under ShouldOpenExternalURLsPolicy
2186         to reduce the size of the class by 8 bytes.
2187         * loader/FrameLoadRequest.h:
2188         (WebCore::FrameLoadRequest::FrameLoadRequest): Added copy constructor as we must use Ref::copyRef()
2189         to copy the Ref<SecurityOrigin>.
2190         (WebCore::FrameLoadRequest::requester): Return a const SecurityOrigin& instead of a const SecurityOrigin*.
2191         * loader/FrameLoader.cpp:
2192         (WebCore::FrameLoader::urlSelected): Update now that the order of the ShouldReplaceDocumentIfJavaScriptURL
2193         and ShouldOpenExternalURLsPolicy arguments in the FrameLoadRequest constructor has changed.
2194         (WebCore::FrameLoader::loadURLIntoChildFrame): Ditto. Also use C++11 brace initialization syntax
2195         and ASCIILiteral().
2196         (WebCore::FrameLoader::loadFrameRequest): Update code now that FrameLoadRequest::requester() returns a
2197         SecurityOrigin& instead of a SecurityOrigin*. Use C++11 brace initialization syntax.
2198         * loader/NavigationScheduler.cpp:
2199         (WebCore::NavigationScheduler::scheduleLocationChange): Use C++11 brace initialization syntax.
2200         Rename local variable from frameRequest to frameLoadRequest to better describe its purpose.
2201         * page/ContextMenuController.cpp:
2202         (WebCore::openNewWindow):
2203         (WebCore::ContextMenuController::contextMenuItemSelected): ove FrameLoadRequest instantiation
2204         into a local variable and use C++11 brace initialization syntax to make it easier to identify
2205         the arguments passed to FrameLoader::loadFrameRequest().
2206         * page/DOMWindow.cpp:
2207         (WebCore::DOMWindow::createWindow): Update now that the order of the ShouldReplaceDocumentIfJavaScriptURL
2208         and ShouldOpenExternalURLsPolicy arguments in the FrameLoadRequest constructor has changed.
2209         Use C++11 brace initialization syntax and ASCIILiteral(). Rename some local variables to better
2210         describe their purpose.
2211
2212 2017-06-20  Simon Fraser  <simon.fraser@apple.com>
2213
2214         svgPath.getTotalLength() freezes webkit
2215         https://bugs.webkit.org/show_bug.cgi?id=173566
2216         <rdar://problem/32866731>
2217
2218         Reviewed by Dean Jackson.
2219
2220         Ensure that curveLength() progresses by making split() return a bool indicating
2221         whether either of the resulting curves are the same as the original. This can happen
2222         when midPoint() on two close points returns a point that is the same as one of the
2223         arguments because of floating-point precision limitations.
2224
2225         Test: svg/custom/path-getTotalLength-hang.html
2226
2227         * platform/graphics/PathTraversalState.cpp:
2228         (WebCore::QuadraticBezier::operator ==):
2229         (WebCore::QuadraticBezier::split):
2230         (WebCore::CubicBezier::operator ==):
2231         (WebCore::CubicBezier::split):
2232         (WebCore::curveLength):
2233
2234 2017-06-21  Youenn Fablet  <youenn@apple.com>
2235
2236         Fix AVVideoCaptureSource frameRate setter and getter
2237         https://bugs.webkit.org/show_bug.cgi?id=173637
2238
2239         Reviewed by Eric Carlson.
2240
2241         Covered by manual testing.
2242
2243         Using activeVideoMaxFrameDuration to get the frame rate.
2244         Setting the frame rate according the given vale if in the allowed range.
2245
2246         * platform/mediastream/mac/AVVideoCaptureSource.h:
2247         * platform/mediastream/mac/AVVideoCaptureSource.mm:
2248         (WebCore::AVVideoCaptureSource::updateSettings):
2249         (WebCore::AVVideoCaptureSource::applyFrameRate):
2250         (WebCore::AVVideoCaptureSource::applySizeAndFrameRate):
2251         (WebCore::AVVideoCaptureSource::shutdownCaptureSession):
2252         (WebCore::AVVideoCaptureSource::processNewFrame):
2253         (WebCore::AVVideoCaptureSource::updateFramerate): Deleted.
2254
2255 2017-06-21  Youenn Fablet  <youenn@apple.com>
2256
2257         Refresh libwebrtc code up to a87675d4a160e2c49c3e754cd9ca291d6c8f36ae
2258         https://bugs.webkit.org/show_bug.cgi?id=173602
2259
2260         Reviewed by Eric Carlson.
2261
2262         No feature change.
2263
2264         Updated according small libwebrtc API changes.
2265
2266         * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
2267         (WebCore::configurationFromMediaEndpointConfiguration):
2268         * platform/mediastream/mac/RealtimeIncomingVideoSource.cpp:
2269         (WebCore::RealtimeIncomingVideoSource::pixelBufferFromVideoFrame):
2270         * platform/mediastream/mac/RealtimeOutgoingVideoSource.cpp:
2271         (WebCore::RealtimeOutgoingVideoSource::sendBlackFramesIfNeeded):
2272         (WebCore::RealtimeOutgoingVideoSource::videoSampleAvailable):
2273
2274 2017-06-21  Sam Weinig  <sam@webkit.org>
2275
2276         Add support for structured serialization of CSS Geometry types
2277         https://bugs.webkit.org/show_bug.cgi?id=173631
2278
2279         Reviewed by Simon Fraser.
2280
2281         Tests: imported/w3c/web-platform-tests/css/geometry-1/structured-serialization.html
2282
2283         Adds support for serializing the new geometry types as specified by:
2284         https://drafts.fxtf.org/geometry-1/#structured-serialization
2285
2286         * WebCore.xcodeproj/project.pbxproj:
2287         Move a few custom bindings into the "GC / Wrapping Only" since they have no more custom operations or attributes.
2288
2289         * bindings/js/SerializedScriptValue.cpp:
2290         (WebCore::CloneSerializer::dumpDOMPoint):
2291         (WebCore::CloneSerializer::dumpDOMRect):
2292         (WebCore::CloneSerializer::dumpDOMMatrix):
2293         (WebCore::CloneSerializer::dumpDOMQuad):
2294         (WebCore::CloneSerializer::dumpIfTerminal):
2295         (WebCore::CloneDeserializer::getJSValue):
2296         (WebCore::CloneDeserializer::readDOMPoint):
2297         (WebCore::CloneDeserializer::readDOMMatrix):
2298         (WebCore::CloneDeserializer::readDOMRect):
2299         (WebCore::CloneDeserializer::readDOMPointInit):
2300         (WebCore::CloneDeserializer::readDOMQuad):
2301         (WebCore::CloneDeserializer::readTerminal):
2302         Add serialization/deserialization of the geometry types.
2303
2304         * css/DOMMatrix.cpp:
2305         (WebCore::DOMMatrix::DOMMatrix):
2306         * css/DOMMatrix.h:
2307         (WebCore::DOMMatrix::create):
2308         * css/DOMMatrixReadOnly.cpp:
2309         (WebCore::DOMMatrixReadOnly::DOMMatrixReadOnly):
2310         * css/DOMMatrixReadOnly.h:
2311         (WebCore::DOMMatrixReadOnly::create):
2312         Add create functions and constructors that take a TransformationMatrix by r-value reference
2313         so they can be moved into the DOM type.
2314
2315 2017-06-21  Andreas Kling  <akling@apple.com>
2316
2317         [iOS] Ensure that GraphicsServices is initialized before calling GSFontPurgeFontCache().
2318         https://bugs.webkit.org/show_bug.cgi?id=173616
2319         <rdar://problem/30780050>
2320
2321         Reviewed by Chris Dumez.
2322
2323         Fix for crash in GSFontPurgeFontCache() seen in apps embedding WebKit.
2324         Ensure GSFontInitialize() has been called first, since the former depends on state
2325         set up by this function.
2326
2327         * page/cocoa/MemoryReleaseCocoa.mm:
2328         (WebCore::platformReleaseMemory):
2329         * platform/spi/ios/GraphicsServicesSPI.h:
2330
2331 2017-06-21  Antoine Quint  <graouts@apple.com>
2332
2333         Add logging to identify when the Page suspends scripted animations
2334         https://bugs.webkit.org/show_bug.cgi?id=173626
2335
2336         Reviewed by Tim Horton.
2337
2338         We have a longstanding issue that some media/modern-media-controls tests time out due to
2339         requestAnimationFrame callbacks not being serviced, which is tracked by webkit.org/b/173628.
2340         We added some logging to identify when ScriptedAnimationController would get suspended in
2341         webkit.org/b/173326. This logging points to the fact that the reason rAF callbacks aren't
2342         serviced is because Document::requestAnimationFrame() suspends rAF when the page reports
2343         that scripted animations ought to be suspended, which is true when m_scriptedAnimationsSuspended
2344         is true. This patch adds logging that tracks when this flag is set, provided a new setting
2345         shouldLogScriptedAnimationControllerSuspensionChange is true.
2346
2347         * dom/ScriptedAnimationController.cpp:
2348         (WebCore::ScriptedAnimationController::logSuspendCount):
2349         * page/Page.cpp:
2350         (WebCore::Page::suspendScriptedAnimations):
2351         (WebCore::Page::resumeScriptedAnimations):
2352         * page/Settings.in:
2353
2354 2017-06-21  Basuke Suzuki  <Basuke.Suzuki@sony.com>
2355
2356         [Curl] Extract CurlDownloadManager as shared background task handler
2357         https://bugs.webkit.org/show_bug.cgi?id=173557
2358
2359         Curl resource handling should be shared by other part of Curl
2360         network stack. CurlDownloadManager is extracted as stand alone
2361         CurlManager singleton class to be ready for others
2362         (i.e. ResourceHandle).
2363
2364         Reviewed by Alex Christensen.
2365
2366         * PlatformWinCairo.cmake:
2367         * platform/network/curl/CookieJarCurl.cpp:
2368         (WebCore::setCookiesFromDOM):
2369         (WebCore::cookiesForSession):
2370         * platform/network/curl/CurlDownload.cpp:
2371         (WebCore::CurlDownload::init):
2372         (WebCore::CurlDownload::start):
2373         (WebCore::CurlDownload::cancel):
2374         (WebCore::CurlDownload::didReceiveHeader):
2375         (WebCore::CurlDownload::handleCurlMsg):
2376         (WebCore::CurlDownloadManager::CurlDownloadManager): Deleted.
2377         (WebCore::CurlDownloadManager::~CurlDownloadManager): Deleted.
2378         (WebCore::CurlDownloadManager::add): Deleted.
2379         (WebCore::CurlDownloadManager::remove): Deleted.
2380         (WebCore::CurlDownloadManager::getActiveDownloadCount): Deleted.
2381         (WebCore::CurlDownloadManager::getPendingDownloadCount): Deleted.
2382         (WebCore::CurlDownloadManager::startThreadIfNeeded): Deleted.
2383         (WebCore::CurlDownloadManager::stopThread): Deleted.
2384         (WebCore::CurlDownloadManager::stopThreadIfIdle): Deleted.
2385         (WebCore::CurlDownloadManager::updateHandleList): Deleted.
2386         (WebCore::CurlDownloadManager::addToCurl): Deleted.
2387         (WebCore::CurlDownloadManager::removeFromCurl): Deleted.
2388         (WebCore::CurlDownloadManager::downloadThread): Deleted.
2389         * platform/network/curl/CurlDownload.h:
2390         (WebCore::CurlDownloadManager::getMultiHandle): Deleted.
2391         (WebCore::CurlDownloadManager::runThread): Deleted.
2392         (WebCore::CurlDownloadManager::setRunThread): Deleted.
2393         * platform/network/curl/CurlManager.cpp: Added.
2394         (WebCore::CurlManager::CurlManager):
2395         (WebCore::CurlManager::~CurlManager):
2396         (WebCore::CurlManager::add):
2397         (WebCore::CurlManager::remove):
2398         (WebCore::CurlManager::getActiveCount):
2399         (WebCore::CurlManager::getPendingCount):
2400         (WebCore::CurlManager::startThreadIfNeeded):
2401         (WebCore::CurlManager::stopThread):
2402         (WebCore::CurlManager::stopThreadIfIdle):
2403         (WebCore::CurlManager::updateHandleList):
2404         (WebCore::CurlManager::addToCurl):
2405         (WebCore::CurlManager::removeFromCurl):
2406         (WebCore::CurlManager::workerThread):
2407         (WebCore::CurlUtils::getEffectiveURL):
2408         (WebCore::CurlSharedResources::mutexFor):
2409         (WebCore::CurlSharedResources::lock):
2410         (WebCore::CurlSharedResources::unlock):
2411         * platform/network/curl/CurlManager.h: Added.
2412         (WebCore::CurlManager::singleton):
2413         (WebCore::CurlManager::getCurlShareHandle):
2414         (WebCore::CurlManager::getMultiHandle):
2415         (WebCore::CurlManager::runThread):
2416         (WebCore::CurlManager::setRunThread):
2417         * platform/network/curl/ResourceHandleManager.cpp:
2418         (WebCore::ResourceHandleManager::ResourceHandleManager):
2419         (WebCore::ResourceHandleManager::~ResourceHandleManager):
2420         (WebCore::handleLocalReceiveResponse):
2421         (WebCore::getProtectionSpace):
2422         (WebCore::headerCallback):
2423         (WebCore::ResourceHandleManager::downloadTimerCallback):
2424         (WebCore::getCurlEffectiveURL): Deleted.
2425         (WebCore::sharedResourceMutex): Deleted.
2426         (WebCore::curl_lock_callback): Deleted.
2427         (WebCore::curl_unlock_callback): Deleted.
2428         (WebCore::ResourceHandleManager::getCurlShareHandle): Deleted.
2429         * platform/network/curl/ResourceHandleManager.h:
2430
2431 2017-06-21  Jeremy Jones  <jeremyj@apple.com>
2432
2433         Include audio/vnd.wave as a valid mime-type for wav files.
2434         https://bugs.webkit.org/show_bug.cgi?id=173635
2435         rdar://problem/32656568
2436
2437         Reviewed by Eric Carlson.
2438
2439         audio/vnd.wave is a valid mime-type for wav files per https://tools.ietf.org/html/rfc2361
2440
2441         Updated test and test results:
2442         LayoutTests/media/media-can-play-wav-audio.html
2443
2444         * platform/MIMETypeRegistry.cpp:
2445         (WebCore::initializeSupportedImageMIMETypes):
2446         (WebCore::mimeTypeAssociationMap):
2447         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2448         (WebCore::MediaPlayerPrivateAVFoundation::staticMIMETypeList):
2449         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2450         (WebCore::mimeTypeSet):
2451
2452 2017-06-21  Chris Fleizach  <cfleizach@apple.com>
2453
2454         AX: Cannot call setValue() on contenteditable or ARIA text controls
2455         https://bugs.webkit.org/show_bug.cgi?id=173520
2456
2457         Reviewed by Ryosuke Niwa.
2458
2459         Add support for changing the value of a contenteditable and any other aria text control in setValue().
2460  
2461         Test: accessibility/set-value-editable-types.html
2462
2463         * accessibility/AccessibilityRenderObject.cpp:
2464         (WebCore::AccessibilityRenderObject::setValue):
2465
2466 2017-06-20  Zan Dobersek  <zdobersek@igalia.com>
2467
2468         [GCrypt] Implement CryptoKeyEC SPKI imports
2469         https://bugs.webkit.org/show_bug.cgi?id=172927
2470
2471         Reviewed by Jiewen Tan, Michael Catanzaro and Carlos Garcia Campos.
2472
2473         No new tests -- affected tests are now passing and are unskipped.
2474
2475         Implement libgcrypt-based support for SPKI imports of EC keys.
2476
2477         Using libtasn1 through the utility functions and wrappers, the given key data
2478         is decoded against the SubjectPublicKeyInfo ASN.1 definition. The algorithm
2479         member is then properly validated, making sure that the key algorithm idenfitier
2480         is supported and that the algorithm parameters specify the correct EC curve.
2481
2482         The public key bit string is then retrieved and validated, ensuring it represents
2483         an uncompressed EC point that is of valid size for the specified EC curve. The
2484         point is then tested through an EC context to make sure it's positioned on the
2485         specified EC curve.
2486
2487         Finally, the curve name and uncompressed point data are embedded into a
2488         `public-key` s-expression that will be used through the libgcrypt API. This is
2489         then used, along with other information, to create a valid CryptoKeyEC object.
2490
2491         * PlatformGTK.cmake: Use LIBTASN1_INCLUDE_DIRECTORIES and LIBTASN1_LIBRARIES.
2492         * PlatformWPE.cmake: Ditto.
2493         * crypto/gcrypt/CryptoKeyECGCrypt.cpp:
2494         (WebCore::supportedAlgorithmIdentifier):
2495         (WebCore::curveForIdentifier):
2496         (WebCore::CryptoKeyEC::platformImportSpki):
2497
2498 2017-06-20  Devin Rousso  <drousso@apple.com>
2499
2500         WebGPU contexts should have a back reference to the canvas element
2501         https://bugs.webkit.org/show_bug.cgi?id=173633
2502
2503         Reviewed by Jon Lee.
2504
2505         No tests added, as this is already implemented within other canvas types.
2506
2507         * html/canvas/WebGPURenderingContext.idl:
2508
2509 2017-06-20  Youenn Fablet  <youenn@apple.com>
2510
2511         WebAudioSourceProvider should be thread safe ref counted
2512         https://bugs.webkit.org/show_bug.cgi?id=173623
2513
2514         Reviewed by Eric Carlson.
2515
2516         No observable change of behavior.
2517
2518         * platform/mediastream/WebAudioSourceProvider.h:
2519
2520 2017-06-20  Yoav Weiss  <yoav@yoav.ws>
2521
2522         [preload] Turn on preload's feature flag by default.
2523         https://bugs.webkit.org/show_bug.cgi?id=173139
2524
2525         Reviewed by Youenn Fablet.
2526
2527         Turn on the runtime enabled feature flag for link preload by default.
2528
2529         No new tests as this just turns on a feature that was already on-by-default for tests.
2530
2531         * page/RuntimeEnabledFeatures.h:
2532
2533 2017-06-20  Myles C. Maxfield  <mmaxfield@apple.com>
2534
2535         Disable font variations on macOS Sierra and iOS 10
2536         https://bugs.webkit.org/show_bug.cgi?id=173618
2537         <rdar://problem/32879164>
2538
2539         Reviewed by Jon Lee.
2540
2541         On macOS Sierra and iOS 10, there are some platform problems involved with font variations. They
2542         were previously enabled on those OSes just as a preview development tool. These platform bugs have
2543         been fixed in macOS High Sierra and iOS 11, so we should align our feature flags with the eventual
2544         configurations.
2545
2546         * Configurations/FeatureDefines.xcconfig:
2547         * platform/graphics/cocoa/FontCacheCoreText.cpp:
2548         (WebCore::defaultVariationValues):
2549         (WebCore::preparePlatformFont):
2550
2551 2017-06-20  Devin Rousso  <drousso@apple.com>
2552
2553         Web Inspector: Send context attributes for tracked canvases
2554         https://bugs.webkit.org/show_bug.cgi?id=173327
2555
2556         Reviewed by Joseph Pecoraro.
2557
2558         Test: inspector/canvas/context-attributes.html
2559
2560         * inspector/InspectorCanvasAgent.cpp:
2561         (WebCore::InspectorCanvasAgent::buildObjectForCanvas):
2562
2563 2017-06-20  Myles C. Maxfield  <mmaxfield@apple.com>
2564
2565         [Cocoa] The system Japanese font cannot be italicized
2566         https://bugs.webkit.org/show_bug.cgi?id=173300
2567         <rdar://problem/31805407>
2568
2569         Reviewed by Ryosuke Niwa.
2570
2571         Items in the system font cascade list may lie about whether or not they support italics.
2572         In order to get the truth, we need to use the physical font underlying the font in question,
2573         because this one won't lie. Then, we can interrogate this physical font about its traits
2574         in order to synthesize italics correctly.
2575
2576         Test: fast/text/system-font-japanese-synthetic-italic.html
2577
2578         * platform/graphics/cocoa/FontCacheCoreText.cpp:
2579         (WebCore::lookupFallbackFont):
2580         * platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp:
2581         (WebCore::FontFamilySpecificationCoreText::fontRanges):
2582
2583 2017-06-20  Chris Dumez  <cdumez@apple.com>
2584
2585         Use WTF::Function instead of std::function in more places in WebCore/
2586         https://bugs.webkit.org/show_bug.cgi?id=173583
2587
2588         Reviewed by Darin Adler.
2589
2590         Use WTF::Function instead of std::function in more places in WebCore/ to
2591         reduce copying.
2592
2593         * page/Page.cpp:
2594         * platform/HysteresisActivity.h:
2595         (WebCore::HysteresisActivity::HysteresisActivity):
2596         * platform/Logging.cpp:
2597         (WebCore::registerNotifyCallback):
2598         * platform/Logging.h:
2599         * platform/MainThreadSharedTimer.cpp:
2600         (WebCore::MainThreadSharedTimer::setFiredFunction):
2601         * platform/MainThreadSharedTimer.h:
2602         * platform/PlatformPasteboard.h:
2603         * platform/ScopeGuard.h:
2604         (WebCore::ScopeGuard::ScopeGuard):
2605         (WebCore::ScopeGuard::enable):
2606         * platform/ScrollAnimationSmooth.cpp:
2607         (WebCore::ScrollAnimationSmooth::ScrollAnimationSmooth):
2608         * platform/ScrollAnimationSmooth.h:
2609         * platform/SharedTimer.h:
2610         * platform/audio/PlatformMediaSessionManager.cpp:
2611         (WebCore::PlatformMediaSessionManager::currentSessionsMatching):
2612         * platform/audio/PlatformMediaSessionManager.h:
2613         * platform/cf/MainThreadSharedTimerCF.cpp:
2614         (WebCore::setupPowerObserver):
2615         * platform/cf/RunLoopObserver.h:
2616         (WebCore::RunLoopObserver::RunLoopObserver):
2617         * platform/graphics/GraphicsContext.h:
2618         * platform/graphics/GraphicsLayer.cpp:
2619         (WebCore::GraphicsLayer::traverse):
2620         * platform/graphics/GraphicsLayer.h:
2621         * platform/graphics/MediaPlayer.cpp:
2622         (WebCore::addMediaEngine):
2623         * platform/graphics/MediaPlayer.h:
2624         * platform/graphics/Path.h:
2625         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2626         (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted):
2627         (WebCore::MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification):
2628         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
2629         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2630         (WebCore::MediaPlayerPrivateAVFoundation::Notification::Notification):
2631         (WebCore::MediaPlayerPrivateAVFoundation::Notification::function):
2632         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2633         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
2634         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
2635         (WebCore::runWithoutAnimations):
2636         * platform/graphics/cocoa/IOSurface.h:
2637         * platform/graphics/cocoa/IOSurface.mm:
2638         (WebCore::IOSurface::convertToFormat):
2639         * platform/graphics/gstreamer/MainThreadNotifier.h:
2640         * platform/graphics/gstreamer/MediaPlayerRequestInstallMissingPluginsCallback.h:
2641         (WebCore::MediaPlayerRequestInstallMissingPluginsCallback::create):
2642         (WebCore::MediaPlayerRequestInstallMissingPluginsCallback::MediaPlayerRequestInstallMissingPluginsCallback):
2643         * platform/graphics/win/GraphicsContextDirect2D.cpp:
2644         (WebCore::GraphicsContext::drawWithoutShadow):
2645         (WebCore::GraphicsContext::drawWithShadow):
2646         * platform/gtk/PasteboardHelper.cpp:
2647         (WebCore::ClipboardSetData::ClipboardSetData):
2648         (WebCore::PasteboardHelper::writeClipboardContents):
2649         * platform/gtk/PasteboardHelper.h:
2650         * platform/gtk/PlatformPasteboardGtk.cpp:
2651         (WebCore::PlatformPasteboard::writeToClipboard):
2652         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
2653         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2654         (WebVideoFullscreenInterfaceAVKit::preparedToReturnToInline):
2655         (WebVideoFullscreenInterfaceAVKit::fullscreenMayReturnToInline):
2656         * platform/mac/PowerObserverMac.cpp:
2657         (WebCore::PowerObserver::PowerObserver):
2658         * platform/mac/PowerObserverMac.h:
2659         * platform/mac/WebCoreNSURLExtras.mm:
2660         (WebCore::isSecondLevelDomainNameAllowedByTLDRules):
2661         * platform/mediastream/CaptureDeviceManager.cpp:
2662         (CaptureDeviceManager::addCaptureDeviceChangedObserver):
2663         * platform/mediastream/CaptureDeviceManager.h:
2664         * platform/mediastream/RealtimeMediaSource.cpp:
2665         (WebCore::RealtimeMediaSource::scheduleDeferredTask):
2666         * platform/mediastream/RealtimeMediaSource.h:
2667         * platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm:
2668         (-[WebAVAudioSessionAvailableInputsListener initWithCallback:]):
2669         * platform/mediastream/mac/CoreAudioCaptureSource.h:
2670         * platform/mock/ScrollAnimatorMock.cpp:
2671         (WebCore::ScrollAnimatorMock::ScrollAnimatorMock):
2672         * platform/mock/ScrollAnimatorMock.h:
2673         * platform/network/CookieStorage.h:
2674         * platform/network/NetworkStateNotifier.cpp:
2675         (WebCore::NetworkStateNotifier::addNetworkStateChangeListener):
2676         * platform/network/NetworkStateNotifier.h:
2677         * platform/network/NetworkStorageSession.cpp:
2678         (WebCore::NetworkStorageSession::forEach):
2679         * platform/network/NetworkStorageSession.h:
2680         * platform/network/cf/CookieStorageCFNet.cpp:
2681         (WebCore::cookieChangeCallbackMap):
2682         (WebCore::startObservingCookieChanges):
2683         * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
2684         (WebCore::callOnMainThreadAndWait):
2685         * platform/network/mac/CookieStorageMac.mm:
2686         (-[WebCookieStorageObjCAdapter startListeningForCookieChangeNotificationsWithCallback:]):
2687         (WebCore::startObservingCookieChanges):
2688         * platform/network/soup/CookieStorageSoup.cpp:
2689         (WebCore::startObservingCookieChanges):
2690         * platform/network/soup/SoupNetworkSession.cpp:
2691         (WebCore::SoupNetworkSession::checkTLSErrors):
2692         * platform/network/soup/SoupNetworkSession.h:
2693         * platform/sql/SQLiteDatabase.cpp:
2694         (WebCore::destroyCollationFunction):
2695         (WebCore::callCollationFunction):
2696         (WebCore::SQLiteDatabase::setCollationFunction):
2697         * platform/sql/SQLiteDatabase.h:
2698         * rendering/RenderLayerBacking.cpp:
2699         (WebCore::traverseVisibleNonCompositedDescendantLayers):
2700         * rendering/RenderListBox.cpp:
2701         (WebCore::RenderListBox::paintItem):
2702         * rendering/RenderListBox.h:
2703         * rendering/line/BreakingContext.h:
2704         (WebCore::BreakingContext::InlineIteratorHistory::push):
2705         (WebCore::BreakingContext::InlineIteratorHistory::update):
2706         * workers/Worker.cpp:
2707         (WebCore::Worker::Worker):
2708         * workers/WorkerRunLoop.cpp:
2709
2710 2017-06-20  Ryan Haddad  <ryanhaddad@apple.com>
2711
2712         Unreviewed, rolling out r218524.
2713
2714         This change broke internal builds.
2715
2716         Reverted changeset:
2717
2718         "[Cocoa] The system Japanese font cannot be italicized"
2719         https://bugs.webkit.org/show_bug.cgi?id=173300
2720         http://trac.webkit.org/changeset/218524
2721
2722 2017-06-20  Daniel Bates  <dabates@apple.com>
2723
2724         Have FrameLoadRequest takes a Frame& instead of a Frame*
2725         https://bugs.webkit.org/show_bug.cgi?id=173614
2726         <rdar://problem/32884890>
2727
2728         Reviewed by Brent Fulgham.
2729
2730         * loader/ContentFilter.cpp:
2731         (WebCore::ContentFilter::handleProvisionalLoadFailure):
2732         * loader/FrameLoadRequest.cpp:
2733         (WebCore::FrameLoadRequest::FrameLoadRequest):
2734         * loader/FrameLoadRequest.h:
2735         * page/DragController.cpp:
2736         (WebCore::DragController::performDragOperation):
2737
2738 2017-06-20  Daniel Bates  <dabates@apple.com>
2739
2740         Skip Content Security Policy check for a media request using standard schemes initiated from
2741         an element in user agent shadow tree
2742         https://bugs.webkit.org/show_bug.cgi?id=155505
2743         <rdar://problem/25169452>
2744
2745         Reviewed by Brent Fulgham.
2746
2747         This change makes the following tests pass on iOS 11:
2748             http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-video.html
2749             http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-audio.html
2750
2751         * loader/MediaResourceLoader.cpp:
2752         (WebCore::MediaResourceLoader::requestResource):
2753         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
2754         (WebCore::WebCoreAVFResourceLoader::startLoading):
2755
2756 2017-06-20  Andreas Kling  <akling@apple.com>
2757
2758         Remove no-op calls to purge SQLite caches on memory pressure.
2759         <https://webkit.org/b/173604>
2760
2761         Reviewed by Chris Dumez.
2762
2763         The implementation of _sqlite3_purgeEligiblePagerCacheMemory() is empty
2764         since a few releases ago, so there's no point in calling it.
2765
2766         * page/MemoryRelease.cpp:
2767         (WebCore::registerMemoryReleaseNotifyCallbacks):
2768         (WebCore::registerSQLiteMemoryPressureHandler): Deleted.
2769         * page/MemoryRelease.h:
2770         * page/cocoa/MemoryReleaseCocoa.mm:
2771         (WebCore::platformReleaseMemory):
2772         (WebCore::registerSQLiteMemoryPressureHandler): Deleted.
2773         * platform/sql/SQLiteDatabase.cpp:
2774         (WebCore::initializeSQLiteIfNecessary):
2775
2776 2017-06-20  Devin Rousso  <drousso@apple.com>
2777
2778         Web Inspector: add console messages for WebGL shader compile and program link errors/warnings
2779         https://bugs.webkit.org/show_bug.cgi?id=143236
2780         <rdar://problem/20352149>
2781
2782         Reviewed by Dean Jackson.
2783
2784         Test: fast/canvas/webgl/shader-compile-logging.html
2785
2786         * html/canvas/WebGLRenderingContextBase.h:
2787         * html/canvas/WebGLRenderingContextBase.cpp:
2788         (WebCore::WebGLRenderingContextBase::checkFramebufferStatus):
2789         (WebCore::WebGLRenderingContextBase::compileShader):
2790         (WebCore::WebGLRenderingContextBase::recycleContext):
2791         (WebCore::WebGLRenderingContextBase::checkTextureCompleteness):
2792         (WebCore::WebGLRenderingContextBase::printToConsole):
2793         (WebCore::WebGLRenderingContextBase::maybeRestoreContext):
2794         (WebCore::WebGLRenderingContextBase::synthesizeGLError):
2795         (WebCore::WebGLRenderingContextBase::printGLErrorToConsole): Deleted.
2796         (WebCore::WebGLRenderingContextBase::printWarningToConsole): Deleted.
2797         (WebCore::WebGLRenderingContextBase::printGLWarningToConsole): Deleted.
2798         Unify console logging helper functions to all follow the same path. Additionally, errors
2799         now generate stack traces. Shader compilation errors are now logged as well.
2800
2801         * dom/Document.h:
2802         * dom/Document.cpp:
2803         (WebCore::Document::addConsoleMessage):
2804         * dom/ScriptExecutionContext.h:
2805         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::AddConsoleMessageTask):
2806         * page/PageConsoleClient.h:
2807         * page/PageConsoleClient.cpp:
2808         (WebCore::PageConsoleClient::addMessage):
2809         * workers/WorkerGlobalScope.h:
2810         Add new path for logging to the console that accepts a ConsoleMessage.
2811
2812 2017-06-20  Saam Barati  <sbarati@apple.com>
2813
2814         Unreviewed. Try to fix the build after r218594.
2815
2816         * dom/Document.h:
2817
2818 2017-06-20  Matt Lewis  <jlewis3@apple.com>
2819
2820         Unreviewed, rolling out r218530.
2821
2822         This revision caused multiple media stream test crashes on
2823         Debug builds.
2824
2825         Reverted changeset:
2826
2827         "Merge MediaDevicesRequest and MediaDevicesEnumerationRequest
2828         to tighten up code and object lifetime"
2829         https://bugs.webkit.org/show_bug.cgi?id=173527
2830         http://trac.webkit.org/changeset/218530
2831
2832 2017-06-19  Antoine Quint  <graouts@apple.com>
2833
2834         Media document experience with long-loading files is poor
2835         https://bugs.webkit.org/show_bug.cgi?id=173575
2836         <rdar://problem/32178119>
2837
2838         Reviewed by Dean Jackson.
2839
2840         In order to avoid showing media controls at a different size than that of the video when we've
2841         received enough information to determine whether it's audio or video and what the video frame size
2842         is, we do not show any UI until we have enough information to show the controls in their correct
2843         initial state. This works well with local files and fast-loading files, but does not work well with
2844         invalid files, which never load and fail to ever show any UI, and files that load slowly where there
2845         is no visible feedback that content will be visible.
2846
2847         Instead, we now default to showing audio controls in their loading state, which provides a seamless
2848         transition if we will be loading an audio file since the controls are initially in the correct state,
2849         and at least provide feedback that data is loading even if we eventually transition to a video layout.
2850
2851         Additionally, we remove the invalid placard background in case the media is invalid, showing only the
2852         crossed-out play icon in the center of the page in that state.
2853
2854         Tests: media/modern-media-controls/media-documents/media-document-invalid.html
2855                media/modern-media-controls/media-documents/media-document-video-with-initial-audio-layout.html
2856
2857         * Modules/modern-media-controls/controls/media-document.css:
2858         (:host(.media-document)): Remove "visibility: hidden" since we want the media controls to be visible
2859         at all times.
2860         (:host(.media-document.audio)): Add a little padding on the x-axis to ensure audio controls never snap
2861         directly to the edges of the window.
2862         (:host(.media-document.audio.iphone)): Remove the iPhone-specific styling since we moved it to the
2863         general case.
2864         (:host(.media-document.video.invalid) .placard): Remove the background from the invalid placard when
2865         showing invalid media.
2866         (:host(.media-document.ready)): Deleted.
2867         * Modules/modern-media-controls/media/audio-support.js:
2868         (AudioSupport.prototype.syncControl): Make sure we invalidate the media document layout when a media
2869         document's media type changes.
2870         * Modules/modern-media-controls/media/media-controller.js:
2871         (MediaController): Instantiate the controls prior to creating the MediaDocumentController since the
2872         MediaDocumentController will need to access the controls.
2873         * Modules/modern-media-controls/media/media-document-controller.js:
2874         (MediaDocumentController): Set the default layout for media controls for a media document to be audio
2875         and in the waiting state.
2876         (MediaDocumentController.prototype.layout): Toggle the "invalid", "audio" and "video" CSS classes for
2877         the next possible commit to the DOM, provided we have established the media document's media type.
2878         (MediaDocumentController.prototype.handleEvent): Deal with the "play" and "error" events to trigger
2879         a layout.
2880         (MediaDocumentController.prototype._mediaDocumentHasMetadata): Deleted.
2881         (MediaDocumentController.prototype._mediaDocumentHasSize): Deleted.
2882
2883 2017-06-20  Daniel Bates  <dabates@apple.com>
2884
2885         NavigationAction has too many constructors
2886         https://bugs.webkit.org/show_bug.cgi?id=173484
2887
2888         Reviewed by Brady Eidson.
2889
2890         A NavigationAction object is an immutable object that represents the details of a
2891         navigation, including the type of a navigation (e.g. link click), what triggered
2892         the navigation, and the external URL policy to use for the navigation. Over time
2893         the number of NavigationAction constructor overloads (not including copy/move
2894         constructors) has grown to 12 to support different combinations of details.
2895         We can use default values to reduce the number of constructors to 2 (not including
2896         copy/move constructors).
2897
2898         No behavior changed. So, no new tests.
2899
2900         * loader/FrameLoader.cpp:
2901         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): Pass NavigationType::Other when
2902         instantiating NavigationAction.
2903         (WebCore::FrameLoader::loadDifferentDocumentItem): Fix order of arguments now that
2904         the constructor overload that takes a NavigationType takes the Event* as the fourth argument,
2905         not the third. Also, use C++11 brace initialization syntax when instantiating a NavigationAction.
2906         (WebCore::createWindow):
2907         * loader/NavigationAction.cpp: Remove unnecessary #include of header ScriptController.h.
2908         Include header Event.h.
2909         (WebCore::NavigationAction::NavigationAction):
2910         * loader/NavigationAction.h: Forward declare class Event and remove #include of header Event.h.
2911         Make copy constructor, copy assignment operator, move constructor, and move assignment operator
2912         out-of-line to avoid the need to include header Event.h. Export the copy constructor so that it
2913         can be used from WebKit on the Apple Windows port. Move ShouldOpenExternalURLsPolicy to be after
2914         NavigationType to reduce the size of the class by 8 bytes.
2915         (WebCore::NavigationAction::NavigationAction):
2916         * loader/PolicyChecker.cpp: Include header Event.h.
2917         * page/Performance.cpp: Ditto.
2918         * replay/ReplayController.cpp: Ditto.
2919
2920 2017-06-20  Konstantin Tokarev  <annulen@yandex.ru>
2921
2922         Rename OrientationNotifer.h to OrientationNotifier.h
2923         https://bugs.webkit.org/show_bug.cgi?id=173600
2924
2925         Reviewed by Youenn Fablet.
2926
2927         No new tests needed.
2928
2929         * WebCore.xcodeproj/project.pbxproj:
2930         * dom/Document.h:
2931         * platform/OrientationNotifier.h: Renamed from Source/WebCore/platform/OrientationNotifer.h.
2932         * platform/mediastream/mac/AVVideoCaptureSource.h:
2933         * platform/mediastream/mac/MockRealtimeVideoSourceMac.h:
2934         * testing/Internals.h:
2935
2936 2017-06-20  Konstantin Tokarev  <annulen@yandex.ru>
2937
2938         Remove excessive include directives from WTF
2939         https://bugs.webkit.org/show_bug.cgi?id=173553
2940
2941         Reviewed by Saam Barati.
2942
2943         No new tests needed.
2944
2945         * platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.h:
2946         Added missing include directive.
2947
2948 2017-06-20  Konstantin Tokarev  <annulen@yandex.ru>
2949
2950         Remove excessive include directives from WebCore/dom
2951         https://bugs.webkit.org/show_bug.cgi?id=173591
2952
2953         Reviewed by Darin Adler.
2954
2955         No new tests needed.
2956
2957         * bindings/js/JSCustomElementRegistryCustom.cpp:
2958         * dom/Attr.h:
2959         * dom/ChildListMutationScope.h:
2960         * dom/ContainerNodeAlgorithms.cpp:
2961         * dom/ContainerNodeAlgorithms.h:
2962         * dom/CustomElementRegistry.h:
2963         * dom/DOMRect.h:
2964         * dom/DocumentMarkerController.h:
2965         * dom/ElementIteratorAssertions.h:
2966         * dom/ElementRareData.h:
2967         * dom/EventContext.h:
2968         * dom/EventDispatcher.h:
2969         * dom/ExtensionStyleSheets.h:
2970         * dom/GenericEventQueue.h:
2971         * dom/LiveNodeList.h:
2972         * dom/LoadableClassicScript.h:
2973         * dom/LoadableScript.h:
2974         * dom/MutationCallback.h:
2975         * dom/NativeNodeFilter.h:
2976         * dom/NodeRareData.h:
2977         * dom/PromiseRejectionEvent.h:
2978         * dom/PseudoElement.h:
2979         * dom/Range.h:
2980         * dom/RegisteredEventListener.h:
2981         * dom/RejectedPromiseTracker.cpp:
2982         * dom/ScopedEventQueue.h:
2983         * dom/ScriptElement.h:
2984         * dom/ScriptExecutionContext.h:
2985         * dom/ScriptedAnimationController.cpp:
2986         * dom/ScriptedAnimationController.h:
2987         * dom/SelectorQuery.h:
2988         * dom/StaticNodeList.h:
2989         * dom/StaticRange.h:
2990         * dom/default/PlatformMessagePortChannel.h:
2991         * testing/Internals.cpp:
2992         * workers/WorkerGlobalScope.h:
2993
2994 2017-06-20  Konstantin Tokarev  <annulen@yandex.ru>
2995
2996         Remove excessive include directives from WebCore/css
2997         https://bugs.webkit.org/show_bug.cgi?id=173554
2998
2999         Reviewed by Alex Christensen.
3000
3001         No new tests needed.
3002
3003         * css/CSSComputedStyleDeclaration.h:
3004         * css/CSSContentDistributionValue.h:
3005         * css/CSSCursorImageValue.h:
3006         * css/CSSFilterImageValue.h:
3007         * css/CSSFontFace.h:
3008         * css/CSSFontFeatureValue.h:
3009         * css/CSSFontStyleRangeValue.h:
3010         * css/CSSFontVariationValue.h:
3011         * css/CSSImageGeneratorValue.h:
3012         * css/CSSImageSetValue.h:
3013         * css/CSSInheritedValue.h:
3014         * css/CSSInitialValue.h:
3015         * css/CSSKeyframeRule.cpp:
3016         * css/CSSKeyframeRule.h:
3017         * css/CSSLineBoxContainValue.h:
3018         * css/CSSPrimitiveValue.h:
3019         * css/CSSPrimitiveValueMappings.h:
3020         * css/CSSPropertySourceData.h:
3021         * css/CSSReflectValue.h:
3022         * css/CSSRevertValue.h:
3023         * css/CSSSelector.h:
3024         * css/CSSStyleSheet.h:
3025         * css/CSSToLengthConversionData.h:
3026         * css/CSSUnsetValue.h:
3027         * css/CSSValue.h:
3028         * css/CSSValuePool.h:
3029         * css/CSSVariableData.h:
3030         * css/DeprecatedCSSOMCounter.h:
3031         * css/DeprecatedCSSOMRGBColor.h:
3032         * css/DeprecatedCSSOMRect.h:
3033         * css/DeprecatedCSSOMValue.h:
3034         * css/RuleSet.h:
3035         * css/SelectorChecker.h:
3036         * css/StyleBuilderConverter.h:
3037         * css/StyleBuilderCustom.h:
3038         * css/StyleProperties.h:
3039         * css/StyleResolver.cpp:
3040         * css/StyleResolver.h:
3041         * css/StyleSheet.h:
3042         * css/StyleSheetContents.h:
3043         * css/ViewportStyleResolver.h:
3044         * css/parser/CSSDeferredParser.h:
3045         * css/parser/CSSParserIdioms.h:
3046         * css/parser/CSSParserImpl.cpp:
3047         * css/parser/CSSParserImpl.h:
3048         * css/parser/CSSParserObserver.h:
3049         * css/parser/CSSParserSelector.h:
3050         * css/parser/CSSPropertyParserHelpers.h:
3051         * css/parser/MediaQueryParser.cpp:
3052         * css/parser/MediaQueryParser.h:
3053         * css/parser/SizesAttributeParser.cpp:
3054         * css/parser/SizesAttributeParser.h:
3055         * html/BaseCheckableInputType.cpp:
3056         * html/MediaController.cpp:
3057         * html/track/TextTrack.cpp:
3058         * html/track/TextTrackCue.cpp:
3059         * html/track/VideoTrack.cpp:
3060         * loader/TextTrackLoader.cpp:
3061
3062 2017-06-20  Miguel Gomez  <magomez@igalia.com>
3063
3064         [GTK] Layout Test fast/canvas/webgl/tex-image-and-sub-image-2d-with-video.html makes the subsequent test case flaky crash.
3065         https://bugs.webkit.org/show_bug.cgi?id=173459
3066
3067         Reviewed by Carlos Garcia Campos.
3068
3069         When destructing the VideoTextureCopierGStreamer, ensure that there's a previous gl context before trying
3070         to make it current again. There are situations where no previous context may exist, which can trigger a crash.
3071         Also, add DefaultImageOrientation to the switch that handles the video frame possible orientations, as it's the
3072         value used when no rotation needs to be performed, and it's currently triggering an assertion.
3073
3074         Covered by existent tests.
3075
3076         * platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp:
3077         (WebCore::VideoTextureCopierGStreamer::~VideoTextureCopierGStreamer):
3078         (WebCore::VideoTextureCopierGStreamer::updateTextureSpaceMatrix):
3079
3080 2017-06-19  Devin Rousso  <drousso@apple.com>
3081
3082         Web Inspector: create canvas content view and details sidebar panel
3083         https://bugs.webkit.org/show_bug.cgi?id=138941
3084         <rdar://problem/19051672>
3085
3086         Reviewed by Joseph Pecoraro.
3087
3088         Tests: inspector/canvas/requestContent.html
3089                inspector/canvas/requestNode.html
3090
3091         * inspector/InspectorCanvasAgent.h:
3092         * inspector/InspectorCanvasAgent.cpp:
3093         (WebCore::InspectorCanvasAgent::requestNode):
3094         Gets the node id of the backing canvas element.
3095
3096         (WebCore::InspectorCanvasAgent::requestContent):
3097         Gets the current image content of the canvas.
3098
3099         (WebCore::InspectorCanvasAgent::frameNavigated):
3100         (WebCore::InspectorCanvasAgent::didCreateCanvasRenderingContext):
3101         Minor fixes from r218376 <https://webkit.org/b/172623>.
3102
3103         (WebCore::InspectorCanvasAgent::buildObjectForCanvas):
3104         Optionally send the `nodeId` of the backing canvas element if it is available.
3105
3106         * inspector/InspectorInstrumentation.cpp:
3107         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
3108
3109 2017-06-19  Frederic Wang  <fwang@igalia.com>
3110
3111         [iOS] Always include frames in the scrolling tree when async frame scrolling is enabled
3112         https://bugs.webkit.org/show_bug.cgi?id=173405
3113
3114         Reviewed by Simon Fraser.
3115
3116         Currently "async frame scrolling" is ignored on iOS. This commit changes that behavior to
3117         align on macOS and is a preliminary step to implement iframe scrolling on iOS (bug 149264).
3118
3119         Test: compositing/iframes/compositing-for-scrollable-iframe.html
3120               fast/scrolling/scrolling-tree-includes-frame.html
3121
3122         * rendering/RenderLayerCompositor.cpp:
3123         (WebCore::RenderLayerCompositor::requiresCompositingForScrollableFrame): Do not require
3124         compositing when "async frame scrolling" is enabled on iOS.
3125
3126 2017-06-19  Frederic Wang  <fwang@igalia.com>
3127
3128         [Mac] Add an experimental feature setting for async frame scrolling
3129         https://bugs.webkit.org/show_bug.cgi?id=173359
3130
3131         Reviewed by Simon Fraser.
3132
3133         The necessary work to use compositing for frames and include them in the scrolling tree on
3134         macOS was performed in r217726 and r217730. ScrollingTreeIncludesFrames was used to
3135         determine when this behavior should be enabled. However, this does not work well on iOS where
3136         ScrollingTreeIncludesFrames defaults to true and really means "include the frames in the
3137         scrolling tree when necessary". Hence we instead introduce a new "async frame scrolling"
3138         switch to enable the behavior on macOS, which will also be used in a follow-up commit on iOS.
3139         This new setting is also made an "experimental feature", so that it will be more convenient
3140         for developer to try it.
3141
3142         Test: compositing/iframes/compositing-for-scrollable-iframe.html
3143               fast/scrolling/scrolling-tree-includes-frame.html
3144
3145         * page/Settings.in: Declare new setting for async frame scrolling.
3146         * page/scrolling/ScrollingCoordinator.cpp:
3147         (WebCore::ScrollingCoordinator::coordinatesScrollingForFrameView): Also include frames in
3148         scrolling tree when async frame scrolling is enabled.
3149         * rendering/RenderLayerCompositor.cpp:
3150         (WebCore::RenderLayerCompositor::requiresCompositingForScrollableFrame): Rely on async frame
3151         scrolling to decide when compositing is needed.
3152
3153 2017-06-19  Zalan Bujtas  <zalan@apple.com>
3154
3155         AX: Remove redundant AXObjectCache::textChanged(RenderObject*).
3156         https://bugs.webkit.org/show_bug.cgi?id=173579
3157         <rdar://problem/32865367>
3158
3159         Reviewed by Antti Koivisto.
3160
3161         All calls go through textChanged(Node*) method.
3162
3163         * accessibility/AXObjectCache.cpp:
3164         * accessibility/AXObjectCache.h:
3165         (WebCore::AXObjectCache::getOrCreate):
3166
3167 2017-06-19  Darin Adler  <darin@apple.com>
3168
3169         Merge MediaDevicesRequest and MediaDevicesEnumerationRequest to tighten up code and object lifetime
3170         https://bugs.webkit.org/show_bug.cgi?id=173527
3171
3172         Reviewed by Sam Weinig.
3173
3174         * CMakeLists.txt: Removed MediaDevicesRequest.cpp.
3175
3176         * Modules/mediastream/MediaDeviceInfo.cpp:
3177         (WebCore::MediaDeviceInfo::MediaDeviceInfo): Removed unneeded ScriptExecutionContext.
3178         (WebCore::MediaDeviceInfo::create): Ditto.
3179         * Modules/mediastream/MediaDeviceInfo.h: Removed unnecessary derivation from
3180         ContextDestructionObserver and ScriptExecutionContext arguments. Also removed
3181         unused MediaDeviceInfoVector typedef.
3182         * Modules/mediastream/MediaDeviceInfo.idl: Added ImplementationLacksVTable.
3183
3184         * Modules/mediastream/MediaDevices.cpp:
3185         (WebCore::MediaDevices::enumerateDevices): Call MediaDevicesEnumerationRequest
3186         directly here instead of going through MediaDevicesRequest.
3187
3188         * Modules/mediastream/MediaDevicesEnumerationRequest.cpp: Moved code from
3189         MediaDevicesRequest in here. Put the typical counts at the top of the file.
3190         (WebCore::MediaDevicesEnumerationRequest::MediaDevicesEnumerationRequest):
3191         Marked inline and changed to take a DOM promise directly rather than having
3192         a separate class do the mapping to DOM promises.
3193         (WebCore::MediaDevicesEnumerationRequest::start): Replaced the create function
3194         with this. The caller doesn't actually keep a reference to the object.
3195         Added a FIXME about the behavior, not new, where we neither resolve nor reject
3196         the promise if there is no page object present. Updated to use the new version
3197         of UserMediaController::from.
3198         (WebCore::MediaDevicesEnumerationRequest::~MediaDevicesEnumerationRequest):
3199         Added a FIXME about the issue that we don't resolve or reject the promise if
3200         the client drops the last reference to the request without calling setDeviceInfo.
3201         (WebCore::MediaDevicesEnumerationRequest::document): Added. Private helper.
3202         Returns nullptr if the request is no longer active.
3203         (WebCore::MediaDevicesEnumerationRequest::frame): Added. For use by a caller
3204         that was getting to the frame. Uses the document function so it will return
3205         nullptr if the request is no longer active.
3206         (WebCore::MediaDevicesEnumerationRequest::userMediaDocumentOrigin): Changed
3207         to do the work using the document function.
3208         (WebCore::MediaDevicesEnumerationRequest::topLevelDocumentOrigin): Ditto.
3209         (WebCore::MediaDevicesEnumerationRequest::contextDestroyed): Simplified. We
3210         now can simply set a boolean when the context is destroyed, so there are no
3211         side effects and the code is simpler.
3212         (WebCore::removeAtypicalDevices): Renamed and tightened up the code a bit.
3213         (WebCore::MediaDevicesEnumerationRequest::setDeviceInfo): Moved the code
3214         here from MediaDevicesEnumerationRequest to pass the devices along.
3215
3216         * Modules/mediastream/MediaDevicesEnumerationRequest.h: Made the
3217         ContextDestructionObserver use private inheritance. Cut down the includes
3218         and removed various unneeded functions.
3219
3220         * Modules/mediastream/MediaDevicesRequest.cpp: Removed.
3221         * Modules/mediastream/MediaDevicesRequest.h: Removed.
3222
3223         * Modules/mediastream/UserMediaController.cpp:
3224         (WebCore::UserMediaController::UserMediaController): Use reference rather
3225         than pointer for the client.
3226         (WebCore::UserMediaController::~UserMediaController): Ditto.
3227         (WebCore::provideUserMediaTo): Ditto.
3228
3229         * Modules/mediastream/UserMediaController.h:
3230         Changed constructor to take a refeference, removed client function, and
3231         changed data member to be a reference rather than a pointer.
3232         (WebCore::UserMediaController::from): Take and return a reference rather
3233         than taking a pointer that is checked for null.
3234         (WebCore::UserMediaController::requestUserMediaAccess): Use reference.
3235         (WebCore::UserMediaController::cancelUserMediaAccessRequest): Ditto.
3236         (WebCore::UserMediaController::enumerateMediaDevices): Ditto.
3237         (WebCore::UserMediaController::cancelMediaDevicesEnumerationRequest): Ditto.
3238
3239         * Modules/mediastream/UserMediaRequest.cpp:
3240         (WebCore::UserMediaRequest::start): Updated to use the new version
3241         of UserMediaController::from.
3242
3243         * WebCore.xcodeproj/project.pbxproj: Updated for file removals.
3244
3245         * testing/Internals.cpp: Removed unneeded include of UserMediaController.h.
3246
3247 2017-06-19  Sam Weinig  <sam@webkit.org>
3248
3249         [WebIDL] Move Touch related bindings in Document to their own IDL file
3250         https://bugs.webkit.org/show_bug.cgi?id=173521
3251
3252         Reviewed by Alex Christensen.
3253
3254         Rather than #including in the middle of an IDL file, this moves the touch related
3255         bindings in Document.idl to a new partial interface for Document in DocumentTouch.idl.
3256         While here, remove the custom binding for createTouchList.
3257
3258         * CMakeLists.txt:
3259         * DerivedSources.make:
3260         * WebCore.xcodeproj/project.pbxproj:
3261         Add new files.
3262
3263         * bindings/js/JSDocumentCustom.cpp:
3264         (WebCore::JSDocument::createTouchList): Deleted.
3265         Remove createTouchList. It can be generated now.
3266
3267         * dom/Document.cpp:
3268         (WebCore::Document::createTouch): Deleted.
3269         * dom/Document.h:
3270         Move touch related bindings code to DocumentTouch.h/cpp.
3271         Remove DocumentIOSForward as it is no longer needed.
3272
3273         * dom/Document.idl:
3274         Move touch related bindings to DocumentTouch.idl
3275         
3276         * dom/DocumentTouch.h: Added.
3277         * dom/DocumentTouch.cpp: Added.
3278         (WebCore::DocumentTouch::createTouch):
3279         Moved from Document.
3280
3281         (WebCore::DocumentTouch::createTouchList):
3282         Added to aid generated binding.
3283
3284         * dom/DocumentTouch.idl: Added.
3285         Moved operations from Document.h
3286
3287         * dom/TouchList.h:
3288         (WebCore::TouchList::create):
3289         (WebCore::TouchList::TouchList):
3290         Added create that works with the bindings.
3291
3292         * dom/ios/TouchEvents.cpp:
3293         Add DocumentTouchIOS.h and sort.
3294
3295 2017-06-19  Myles C. Maxfield  <mmaxfield@apple.com>
3296
3297         [Cocoa] The system Japanese font cannot be italicized
3298         https://bugs.webkit.org/show_bug.cgi?id=173300
3299         <rdar://problem/31805407>
3300
3301         Reviewed by Ryosuke Niwa.
3302
3303         Items in the system font cascade list may lie about whether or not they support italics.
3304         In order to get the truth, we need to use the physical font underlying the font in question,
3305         because this one won't lie. Then, we can interrogate this physical font about its traits
3306         in order to synthesize italics correctly.
3307
3308         Test: fast/text/system-font-japanese-synthetic-italic.html
3309
3310         * platform/graphics/cocoa/FontCacheCoreText.cpp:
3311         (WebCore::lookupFallbackFont):
3312         * platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp:
3313         (WebCore::FontFamilySpecificationCoreText::fontRanges):
3314
3315 2017-06-19  Daewoong Jang  <daewoong.jang@navercorp.com>
3316
3317         [cURL] Move file scope static variables into function scopes
3318         https://bugs.webkit.org/show_bug.cgi?id=173567
3319
3320         Reviewed by Alex Christensen.
3321
3322         * platform/network/curl/SSLHandle.cpp:
3323         (WebCore::allowedHosts):
3324         (WebCore::allowedClientHosts):
3325         (WebCore::allowsAnyHTTPSCertificateHosts):
3326         (WebCore::addAllowedClientCertificate):
3327         (WebCore::setSSLClientCertificate):
3328         (WebCore::sslIgnoreHTTPSCertificate):
3329         (WebCore::certVerifyCallback):
3330
3331 2017-06-19  Darin Adler  <darin@apple.com>
3332
3333         [Cocoa] implement URLSession:task:needNewBodyStream: delegate method
3334         https://bugs.webkit.org/show_bug.cgi?id=173551
3335         rdar://problem/32250512
3336
3337         Reviewed by Alex Christensen.
3338
3339         Covered by http/tests/misc/form-blob-challenge.html
3340
3341         * WebCore.xcodeproj/project.pbxproj: Removed NSURLRequestSPI.h.
3342
3343         * platform/network/cf/FormDataStreamCFNet.cpp:
3344         (WebCore::createHTTPBodyCFReadStream): Factored this out from setHTTPBody.
3345         (WebCore::setHTTPBody): Factored out the function above.
3346         * platform/network/cf/FormDataStreamCFNet.h: Added createHTTPBodyCFReadStream.
3347
3348         * platform/network/cocoa/ResourceRequestCocoa.mm: Use CFNetworkSPI.h.
3349         * platform/network/ios/ResourceRequestIOS.mm: Ditto.
3350
3351         * platform/network/mac/FormDataStreamMac.h: Added createHTTPBodyNSInputStream.
3352         * platform/network/mac/FormDataStreamMac.mm:
3353         (WebCore::createHTTPBodyNSInputStream): Added/
3354
3355         * platform/network/mac/ResourceHandleMac.mm: Use CFNetworkSPI.h.
3356         * platform/network/mac/ResourceRequestMac.mm: Ditto.
3357         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm: Ditto.
3358         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm: Ditto.
3359
3360         * platform/network/mac/WebCoreURLResponse.h: Moved SPI declarations from
3361         here into CFNetworkSPI.h.
3362
3363         * platform/spi/cf/CFNetworkSPI.h: Use #pragma once, consolidated SPI that was
3364         defined in scattered locations.
3365
3366         * platform/spi/cocoa/NSURLRequestSPI.h: Removed. Superceded by CFNetworkSPI.h.
3367
3368 2017-06-19  Brady Eidson  <beidson@apple.com>
3369
3370         Various IndexedDB crashes as an after effect of previous test.
3371         <rdar://problem/31418761> and https://bugs.webkit.org/show_bug.cgi?id=170436
3372
3373         Reviewed by Chris Dumez.
3374
3375         No new test (No consistent test possible, in practice covered by all existing IDB tests)
3376
3377         This is timing related, where a UniqueIDBDatabase can be destroyed on the main thread while
3378         it still has one task left to try to execute on the IDBServer thread.
3379         
3380         The background thread tasks don't Ref<> the UniqueIDBDatabase, so even though task execution
3381         took a Ref<> protector, there was still a small window for a race.
3382         
3383         Should be closed up by making the background thread tasks themselves protect this.
3384         
3385         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3386         (WebCore::IDBServer::UniqueIDBDatabase::postDatabaseTask):
3387         (WebCore::IDBServer::UniqueIDBDatabase::postDatabaseTaskReply):
3388         (WebCore::IDBServer::UniqueIDBDatabase::executeNextDatabaseTask):
3389         (WebCore::IDBServer::UniqueIDBDatabase::executeNextDatabaseTaskReply):
3390         * Modules/indexeddb/server/UniqueIDBDatabase.h:
3391
3392 2017-06-19  Sam Weinig  <sam@webkit.org>
3393
3394         [WebIDL] Add support for serializers that have members that are themselves serializers (or inherit being a serializer from a parent)
3395         https://bugs.webkit.org/show_bug.cgi?id=173395
3396
3397         Reviewed by Simon Fraser.
3398
3399         Test: fast/css/DOMQuad-serialization.html
3400
3401         * bindings/scripts/CodeGenerator.pm:
3402         (InheritsSerializable):
3403         Helper to determine if an interface inherits from any interfaces
3404         that are serializable. This is necessary because an attribute is
3405         serializable even if its interface is not marked as serializable. 
3406
3407         (IsSerializableAttribute):
3408         Check ancestor interfaces as well to determine serializability.
3409
3410         * bindings/scripts/CodeGeneratorJS.pm:
3411         (GenerateSerializerDefinition):
3412         Specialize attributes that are serializable interfaces to call its interfaces
3413         serialize function, thus allowing nested objects to be serialized.
3414
3415         * dom/DOMQuad.idl:
3416         Add serializer.
3417
3418         * bindings/scripts/test/JS/JSTestSerialization.cpp:
3419         * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp: Added.
3420         * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.h: Added.
3421         * bindings/scripts/test/TestSerialization.idl:
3422         * bindings/scripts/test/TestSerializationIndirectInheritance.idl: Added.
3423         Add and update tests.
3424
3425 2017-06-19  Commit Queue  <commit-queue@webkit.org>
3426
3427         Unreviewed, rolling out r218505.
3428         https://bugs.webkit.org/show_bug.cgi?id=173563
3429
3430         "It would break internal builds" (Requested by youenn on
3431         #webkit).
3432
3433         Reverted changeset:
3434
3435         "[WebRTC] Prevent capturing at unconventional resolutions when
3436         using the SW encoder on Mac"
3437         https://bugs.webkit.org/show_bug.cgi?id=172602
3438         http://trac.webkit.org/changeset/218505
3439
3440 2017-06-19  Zalan Bujtas  <zalan@apple.com>
3441
3442         Opening certain mails brings up a mail that grows indefinitely.
3443         https://bugs.webkit.org/show_bug.cgi?id=173562
3444         <rdar://problem/32766579>
3445
3446         Reviewed by Tim Horton.
3447
3448         This reverts the logic where m_autoSizeContentSize always reflects the final layout's.
3449         When the ICB's height is 100%, it causes infinite recursion.
3450         See also webkit.org/b/173561.
3451
3452         * page/FrameView.cpp:
3453         (WebCore::FrameView::autoSizeIfEnabled):
3454
3455 2017-06-19  Wenson Hsieh  <wenson_hsieh@apple.com>
3456
3457         [iOS DnD] Support .zip archives for file uploads via drag and drop
3458         https://bugs.webkit.org/show_bug.cgi?id=173511
3459         <rdar://problem/32521025>
3460
3461         Reviewed by Tim Horton.
3462