REGRESSION(r214194): Safari leaves a popup window open opened during before unload
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2017-06-30  Ryosuke Niwa  <rniwa@webkit.org>
2
3         REGRESSION(r214194): Safari leaves a popup window open opened during before unload
4         https://bugs.webkit.org/show_bug.cgi?id=174016
5
6         Reviewed by Chris Dumez.
7
8         The bug was caused by WebKit allowing the opening of a new window via window.open but disallowing
9         the initial navigation within the newly opened window while a beforeunload event is being dispatched.
10
11         Because some websites which opens a window during a beforeunload event relies on the opened page
12         to communicate back in order to close it. This resulted in a newly opened popup window with about:blank
13         being left out on those websites.
14
15         Fixed the bug by allowing the navigation of a new window as well as an existing another window.
16         More concretely, we disallow navigations within the same frame tree as the one in which a beforeunload
17         event is being dispatched, and allow navigations elsewhere (i.e. different window / page).
18         During the destruction of a frame-less document, disallow all the navigations.
19
20         Tests: fast/events/before-unload-navigate-different-window.html
21                fast/events/before-unload-open-window.html
22                fast/events/before-unload-sibling-frame.html
23
24         * WebCore.xcodeproj/project.pbxproj:
25         * dom/Document.cpp:
26         (WebCore::Document::prepareForDestruction):
27         * loader/FrameLoader.cpp:
28         (WebCore::FrameLoader::isNavigationAllowed):
29         (WebCore::FrameLoader::shouldClose):
30         * loader/NavigationDisabler.h: Added. Extracted from NavigationScheduler.h
31         (WebCore::NavigationDisabler::NavigationDisabler): Increment the newly added counter on MainFrame unless
32         the frame is null (during the destruction of a frameless document) in which case we increment the global
33         disable count.
34         (WebCore::NavigationDisabler::~NavigationDisabler): Ditto for decrementation.
35         (WebCore::NavigationDisabler::isNavigationAllowed): Only allow the navigation when there is no frameless
36         document in destruction, and none of the frame in the same frame tree as the one given is currently in
37         the process of dispatching a beforeunload event.
38         * loader/NavigationScheduler.cpp:
39         (WebCore::NavigationScheduler::shouldScheduleNavigation):
40         * loader/NavigationScheduler.h:
41         (WebCore::NavigationDisabler): Moved to NavigationDisabler.h.
42         * page/MainFrame.h:
43         (WebCore::MainFrame): Added s_globalNavigationDisableCount.
44
45 2017-06-30  Sam Weinig  <sam@webkit.org>
46
47         [WebIDL] Add support for conditionally read-write attributes
48         https://bugs.webkit.org/show_bug.cgi?id=173993
49
50         Reviewed by Alex Christensen.
51
52         The MEDIA_SOURCE feature/conditional requires changing a few readonly
53         attributes into read-write attributes. In the past we handled this with
54         custom bindings. This patch adds a new extended attribute, ConditionallyReadWrite
55         which achieves the same result.
56
57         * WebCore.xcodeproj/project.pbxproj:
58         Move a few custom binding to the "GC / Wrapping Only" group.
59
60         * bindings/js/JSAudioTrackCustom.cpp:
61         (WebCore::JSAudioTrack::setKind): Deleted.
62         (WebCore::JSAudioTrack::setLanguage): Deleted.
63         * bindings/js/JSTextTrackCustom.cpp:
64         (WebCore::JSTextTrack::setLanguage): Deleted.
65         * bindings/js/JSVideoTrackCustom.cpp:
66         (WebCore::JSVideoTrack::setKind): Deleted.
67         (WebCore::JSVideoTrack::setLanguage): Deleted.
68         Remove no longer needed custom bindings.
69
70         * bindings/scripts/CodeGeneratorJS.pm:
71         (GeneratePropertiesHashTable):
72         (GenerateImplementation):
73         (GenerateAttributeSetterDefinition):
74         (GenerateCallbackImplementationContent):
75         (GenerateHashTableValueArray):
76         (GenerateHashTable):
77         Pipe ConditionallyReadWrite through the generator.
78
79         * bindings/scripts/IDLAttributes.json:
80         Add ConditionallyReadWrite.
81
82         * bindings/scripts/test/JS/JSTestObj.cpp:
83         * bindings/scripts/test/TestObj.idl:
84         Add tests for ConditionallyReadWrite.
85
86         * html/track/AudioTrack.idl:
87         * html/track/TextTrack.idl:
88         * html/track/VideoTrack.idl:
89         Replace [Custom] with [ConditionallyReadWrite].
90
91 2017-06-30  Chris Dumez  <cdumez@apple.com>
92
93         ResourceLoadObserver does not need a ResourceLoadStatisticsStore
94         https://bugs.webkit.org/show_bug.cgi?id=174013
95
96         Reviewed by Brent Fulgham.
97
98         ResourceLoadObserver does not need a ResourceLoadStatisticsStore. ResourceLoadStatisticsStore is too complicated for its needs.
99         ResourceLoadStatisticsStore can then be moved to WebKit2/UIProcess in a follow-up.
100
101         * Modules/websockets/WebSocket.cpp:
102         (WebCore::WebSocket::connect):
103         * dom/UserGestureIndicator.cpp:
104         (WebCore::UserGestureIndicator::UserGestureIndicator):
105         * loader/DocumentLoader.cpp:
106         (WebCore::DocumentLoader::willSendRequest):
107         * loader/FrameLoader.cpp:
108         (WebCore::FrameLoader::loadResourceSynchronously):
109         * loader/ResourceLoadObserver.cpp:
110         (WebCore::ResourceLoadObserver::shared):
111         (WebCore::ResourceLoadObserver::setNotificationCallback):
112         (WebCore::ResourceLoadObserver::shouldLog):
113         (WebCore::ResourceLoadObserver::logFrameNavigation):
114         (WebCore::ResourceLoadObserver::logSubresourceLoading):
115         (WebCore::ResourceLoadObserver::logWebSocketLoading):
116         (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
117         (WebCore::ResourceLoadObserver::ensureResourceStatisticsForPrimaryDomain):
118         (WebCore::ResourceLoadObserver::takeResourceStatisticsForPrimaryDomain):
119         (WebCore::ResourceLoadObserver::isPrevalentResource):
120         (WebCore::ResourceLoadObserver::statisticsForOrigin):
121         (WebCore::ResourceLoadObserver::takeStatistics):
122         * loader/ResourceLoadObserver.h:
123         * loader/ResourceLoadStatisticsStore.cpp:
124         * loader/ResourceLoadStatisticsStore.h:
125         * loader/SubresourceLoader.cpp:
126         (WebCore::SubresourceLoader::willSendRequestInternal):
127         * testing/Internals.cpp:
128         (WebCore::Internals::resourceLoadStatisticsForOrigin):
129
130 2017-06-30  Fujii Hironori  <Hironori.Fujii@sony.com>
131
132         ASSERTION FAILED: !canAnimate() && !m_currentFrame
133         https://bugs.webkit.org/show_bug.cgi?id=173089
134
135         Reviewed by Said Abou-Hallawa.
136
137         WebCore::BitmapImage::draw() has an assertion which ensures
138         m_currentFrame is zero in case of async decoding. But, this
139         assertion failed if an GIF animation image which have finished its
140         animation was repainted. In that time, m_currentFrame was the last
141         frame index of the image.
142
143         Test: fast/images/animated-gif-paint-after-animation.html
144
145         * platform/graphics/BitmapImage.cpp:
146         (WebCore::BitmapImage::draw): Assert m_currentFrame is zero or the animation finished.
147         Call requestFrameAsyncDecodingAtIndex with m_currentFrame instead of zero.
148
149 2017-06-30  Ross Kirsling  <ross.kirsling@sony.com>
150
151         [PAL] Move Sound into PAL
152         https://bugs.webkit.org/show_bug.cgi?id=173999
153
154         Reviewed by Alex Christensen.
155
156         * Configurations/WebCore.xcconfig:
157         * PlatformGTK.cmake:
158         * PlatformMac.cmake:
159         * PlatformWPE.cmake:
160         * PlatformWin.cmake:
161         * WebCore.xcodeproj/project.pbxproj:
162         * editing/Editor.cpp:
163         (WebCore::Editor::cut):
164         (WebCore::Editor::copy):
165         (WebCore::Editor::performDelete):
166         * editing/EditorCommand.cpp:
167         (WebCore::executeSelectToMark):
168         (WebCore::executeSwapWithMark):
169         * editing/mac/EditorMac.mm:
170         (WebCore::Editor::takeFindStringFromSelection):
171         * inspector/InspectorFrontendHost.cpp:
172         (WebCore::InspectorFrontendHost::beep):
173         * platform/Sound.h: Removed.
174
175 2017-06-30  Wenson Hsieh  <wenson_hsieh@apple.com>
176
177         [iOS DnD] Drag caret rect is incorrectly computed when dropping in editable content in iframes
178         https://bugs.webkit.org/show_bug.cgi?id=174017
179         <rdar://problem/32959782>
180
181         Reviewed by Simon Fraser.
182
183         We're currenly computing the drag caret rect (for the purposes of presentation at the client layers)
184         incorrectly, in per-frame document coordinates instead of root view coordinates in the mainframe. This means
185         drag caret geometry from embedded iframes in the document will show up in the content view with a rect in the
186         coordinate space of the iframe.
187
188         To fix this, we need to convert the drag caret rect to root view coordinates. This patch teaches
189         DragCaretController to do this, and tweaks WebKit/WebKit2 to use caretRectInRootViewCoordinates.
190
191         Test: DataInteractionTests.ExternalSourcePlainTextToIFrame
192
193         * editing/FrameSelection.cpp:
194         (WebCore::DragCaretController::caretRectInRootViewCoordinates):
195         * editing/FrameSelection.h:
196
197 2017-06-30  Sam Weinig  <sam@webkit.org>
198
199         [WebIDL] Replace use of __is_polymorphic with standard std::is_polymorphic<>::value
200         https://bugs.webkit.org/show_bug.cgi?id=174012
201
202         Reviewed by Alex Christensen.
203
204         * bindings/scripts/CodeGeneratorJS.pm:
205         (GenerateImplementation):
206         Replace __is_polymorphic with standard std::is_polymorphic<>::value. Remove clang
207         specific guard now that we are using something other compilers support.
208
209         * bindings/scripts/test/JS/JSInterfaceName.cpp:
210         * bindings/scripts/test/JS/JSMapLike.cpp:
211         * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
212         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
213         * bindings/scripts/test/JS/JSTestCEReactions.cpp:
214         * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
215         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
216         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
217         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
218         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
219         * bindings/scripts/test/JS/JSTestException.cpp:
220         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
221         * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
222         * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
223         * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
224         * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
225         * bindings/scripts/test/JS/JSTestInterface.cpp:
226         * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
227         * bindings/scripts/test/JS/JSTestIterable.cpp:
228         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
229         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
230         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
231         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
232         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
233         * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
234         * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
235         * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
236         * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
237         * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
238         * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
239         * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
240         * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
241         * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
242         * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
243         * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
244         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
245         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
246         * bindings/scripts/test/JS/JSTestNode.cpp:
247         * bindings/scripts/test/JS/JSTestObj.cpp:
248         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
249         * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
250         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
251         * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
252         * bindings/scripts/test/JS/JSTestSerialization.cpp:
253         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
254         * bindings/scripts/test/JS/JSTestStringifier.cpp:
255         * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
256         * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
257         * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
258         * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
259         * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
260         * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
261         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
262         Update test results.
263
264 2017-06-30  Youenn Fablet  <youenn@apple.com>
265
266        Support PeerConnectionStates::BundlePolicy::MaxBundle when setting rtc configuration
267        https://bugs.webkit.org/show_bug.cgi?id=169389
268
269        Reviewed by Alex Christensen.
270
271        Covered by manual testing (appr.tc and https://youennf.github.io/webrtc-tests/src/content/peerconnection/trickle-ice/).
272        Updated test is showing some more failing but this is due to the fact that we are no longer totally lying on the configuration of the
273         underlying libwebrtc backend.
274
275         Previously, we were creating a libwebrtc peer connection and then setting its configuration.
276         libwebrtc does not like the configuration to be changed and may refuse to set the configuration.
277         Instead of doing that, we are now creating the libwebrtc peer connection with the provided configuration.
278
279         ICE candidate pool size is disabled as it is creating issues with running tests on bots.
280
281         * Modules/mediastream/MediaEndpointPeerConnection.cpp:
282         (WebCore::MediaEndpointPeerConnection::setConfiguration):
283         * Modules/mediastream/MediaEndpointPeerConnection.h:
284         * Modules/mediastream/PeerConnectionBackend.h:
285         * Modules/mediastream/RTCPeerConnection.cpp:
286         (WebCore::RTCPeerConnection::initializeWith):
287         (WebCore::iceServersFromConfiguration):
288         (WebCore::RTCPeerConnection::initializeConfiguration):
289         (WebCore::RTCPeerConnection::setConfiguration):
290         * Modules/mediastream/RTCPeerConnection.h:
291         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
292         (WebCore::LibWebRTCMediaEndpoint::LibWebRTCMediaEndpoint):
293         (WebCore::LibWebRTCMediaEndpoint::setConfiguration):
294         (WebCore::LibWebRTCMediaEndpoint::stop):
295         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
296         * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
297         (WebCore::configurationFromMediaEndpointConfiguration):
298         (WebCore::LibWebRTCPeerConnectionBackend::setConfiguration):
299         * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
300         * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
301         (WebCore::createActualPeerConnection):
302         (WebCore::LibWebRTCProvider::createPeerConnection):
303         * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
304
305
306 2017-06-30  Antoine Quint  <graouts@apple.com>
307
308         Top controls bars should invert with right-to-left user interface layout direction locale
309         https://bugs.webkit.org/show_bug.cgi?id=173989
310         <rdar://problem/32863552>
311
312         Reviewed by Dean Jackson.
313
314         When the user interface layout direction is set by the locale to be right-to-left, we now:
315
316             - invert the two top controls bars
317             - invert the layout order for the fullscreen / PiP controls bar
318             - orient the volume button the opposite direction when presented in a top controls bar
319
320         Test: media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-rtl.html
321
322         * Modules/modern-media-controls/controls/icon-service.js: Add new RTL variants for the mute and unmute icons.
323         * Modules/modern-media-controls/controls/inline-media-controls.css: Invert the position of the two top controls
324         bars when we switch user interface layout direction.
325         (.media-controls.inline.uses-ltr-user-interface-layout-direction > .controls-bar.top-left,):
326         (.media-controls.inline.uses-ltr-user-interface-layout-direction > .controls-bar.top-right,):
327         (.media-controls.inline > .controls-bar.top-left): Deleted.
328         (.media-controls.inline > .controls-bar.top-right): Deleted.
329         * Modules/modern-media-controls/controls/inline-media-controls.js:
330         (InlineMediaControls.prototype.layout): Default to using the LTR variant for the mute button icon since
331         it should only use the RTL variant in case the locale requires it *and* we display the mute button in a
332         top controls bar rather than the bottom controls bar (ie. when width becomes constrained).
333         (InlineMediaControls.prototype._topLeftContainerButtons): Invert the order of the fullscreen and PiP
334         buttons based on the user interface layout direction.
335         (InlineMediaControls.prototype._addTopRightBarWithMuteButtonToChildren):
336         (InlineMediaControls):
337         * Modules/modern-media-controls/controls/media-controls.js:
338         (MediaControls.prototype.set usesLTRUserInterfaceLayoutDirection): Schedule a layout when the user interface
339         layout direction changes.
340         * Modules/modern-media-controls/controls/mute-button.js: Add a new "usesRTLIconVariant" property, false by
341         default, to indicate we want to use the RTL variant of the button's icon.
342         (MuteButton):
343         (MuteButton.prototype.get muted):
344         (MuteButton.prototype.set muted):
345         (MuteButton.prototype.set usesRTLIconVariant):
346         (MuteButton.prototype.layout):
347         * Modules/modern-media-controls/images/iOS/Mute-RTL.svg: Added.
348         * Modules/modern-media-controls/images/iOS/VolumeHi-RTL.svg: Added.
349         * Modules/modern-media-controls/images/macOS/Mute-RTL.svg: Added.
350         * Modules/modern-media-controls/images/macOS/VolumeHi-RTL.svg: Added.
351         * Modules/modern-media-controls/media/media-controller.js: Use an ivar to track when it's worth notifying the
352         media controls that the user interface layout direction has changed. This means we won't need to schedule a
353         layout in case it's set to the current value.
354         (MediaController):
355         (MediaController.prototype.set usesLTRUserInterfaceLayoutDirection):
356
357 2017-06-29  Zalan Bujtas  <zalan@apple.com>
358
359         BreakingContext::handleReplaced() should use replacedBox instead of m_current.renderer().
360         https://bugs.webkit.org/show_bug.cgi?id=174011
361
362         Reviewed by Simon Fraser.
363
364         No change in functionality.
365
366         * rendering/line/BreakingContext.h:
367         (WebCore::BreakingContext::handleReplaced):
368         * rendering/line/LineWidth.cpp:
369         (WebCore::LineWidth::applyOverhang):
370         * rendering/line/LineWidth.h:
371
372 2017-06-29  Wenson Hsieh  <wenson_hsieh@apple.com>
373
374         [iOS DnD] Web content process crashes when the selection is moved far offscreen in dragstart
375         https://bugs.webkit.org/show_bug.cgi?id=174010
376         <rdar://problem/32597802>
377
378         Reviewed by Tim Horton.
379
380         The TextIndicator snapshot generated in createDragImageForSelection is not guaranteed to succeed; this patch
381         adds a null check following TextIndicator::createWithSelectionInFrame and bails early if the snapshot was not
382         successful.
383
384         Test: DataInteractionTests.DoNotCrashWhenSelectionMovesOffscreenAfterDragStart
385
386         * platform/ios/DragImageIOS.mm:
387         (WebCore::createDragImageForSelection):
388
389 2017-06-29  Chris Fleizach  <cfleizach@apple.com>
390
391         AX: Cannot call setValue() on contenteditable or ARIA text controls
392         https://bugs.webkit.org/show_bug.cgi?id=173520
393
394         Reviewed by Ryosuke Niwa.
395
396         Add support for changing the value of a contenteditable and any other aria text control in setValue().
397  
398         Test: accessibility/mac/set-value-editable-types.html
399
400         * accessibility/AccessibilityRenderObject.cpp:
401         (WebCore::AccessibilityRenderObject::setValue):
402
403 2017-06-28  Simon Fraser  <simon.fraser@apple.com>
404
405         getBoundingClientRect returns wrong value for combination of page zoom and scroll
406         https://bugs.webkit.org/show_bug.cgi?id=173841
407         rdar://problem/32983841
408
409         Reviewed by Dean Jackson.
410
411         The layout viewport returned by FrameView::layoutViewportRect() is affected by page (Command-+) zooming,
412         since it's computed using scroll positions, so when we use its origin to convert into client coordinates
413         (which are zoom-agnostic), we need to account for page zoom, so fix FrameView::documentToClientOffset()
414         to do this.
415
416         Callers of documentToClientOffset() were checked, revealing that event client coordinates were also
417         wrong with page zoom and are fixed in the same way. It was found that SimulatedClick was using an
418         entirely wrong rect to compute its location: Element::clientRect() is NOT in client coordinates,
419         so change this code to use getBoundingClientRect() instead.
420
421         Minor refactoring in MouseRelatedEvent to make getting to the FrameView cleaner.
422
423         Some geometry types enhanced to have non-mutating scale functions.
424
425         Tests: fast/events/simulated-click-zoomed.html
426                fast/visual-viewport/client-rects-relative-to-layout-viewport-zoomed.html
427
428         * dom/MouseRelatedEvent.cpp:
429         (WebCore::MouseRelatedEvent::init):
430         (WebCore::MouseRelatedEvent::initCoordinates):
431         (WebCore::MouseRelatedEvent::frameView):
432         (WebCore::MouseRelatedEvent::documentToAbsoluteScaleFactor):
433         (WebCore::MouseRelatedEvent::computePageLocation):
434         (WebCore::MouseRelatedEvent::computeRelativePosition):
435         (WebCore::pageZoomFactor): Deleted.
436         (WebCore::frameScaleFactor): Deleted.
437         * dom/MouseRelatedEvent.h:
438         (WebCore::MouseRelatedEvent::absoluteLocation):
439         (WebCore::MouseRelatedEvent::setAbsoluteLocation): Deleted.
440         * dom/SimulatedClick.cpp:
441         * page/FrameView.cpp:
442         (WebCore::FrameView::layoutViewportRect): baseLayoutViewportSize() is the same as the old code.
443         (WebCore::FrameView::documentToAbsoluteScaleFactor):
444         (WebCore::FrameView::absoluteToDocumentScaleFactor):
445         (WebCore::FrameView::absoluteToDocumentPoint):
446         (WebCore::FrameView::documentToClientOffset):
447         * page/FrameView.h:
448         * platform/graphics/FloatPoint.h:
449         (WebCore::FloatPoint::scale):
450         (WebCore::FloatPoint::scaled):
451         * platform/graphics/FloatSize.h:
452         (WebCore::FloatSize::scaled):
453         * platform/graphics/LayoutPoint.h:
454         (WebCore::LayoutPoint::scaled):
455
456 2017-06-29  Megan Gardner  <megan_gardner@apple.com>
457
458         Unreviewed, fixing Window's build after r218976
459
460         * rendering/ScrollAlignment.cpp:
461         (WebCore::operator<<):
462
463 2017-06-29  Megan Gardner  <megan_gardner@apple.com>
464
465         Add TextStream operators for Range, VisiblePosition, VisibleSelection, and ScrollAlignment
466         https://bugs.webkit.org/show_bug.cgi?id=173997
467
468         Reviewed by Simon Fraser.
469
470         Adding logging that can be used with TextStream-based LOG_WITH_STREAM.
471
472         * dom/Range.cpp:
473         (WebCore::operator<<):
474         * dom/Range.h:
475         * editing/VisiblePosition.h:
476         * editing/VisibleSelection.cpp:
477         (WebCore::operator<<):
478         * editing/VisibleSelection.h:
479         * rendering/ScrollAlignment.cpp:
480         (WebCore::operator<<):
481         * rendering/ScrollAlignment.h:
482
483 2017-06-29  Matt Lewis  <jlewis3@apple.com>
484
485         Unreviewed, rolling out r218903.
486
487         This patch and its fix cause immediate flakiness on all WK2
488         testers
489
490         Reverted changeset:
491
492         "Support PeerConnectionStates::BundlePolicy::MaxBundle when
493         setting rtc configuration"
494         https://bugs.webkit.org/show_bug.cgi?id=169389
495         http://trac.webkit.org/changeset/218903
496
497 2017-06-29  Matt Lewis  <jlewis3@apple.com>
498
499         Unreviewed, rolling out r218963.
500
501         This patch and its fix cause immediate flakiness on all WK2
502         testers
503
504         Reverted changeset:
505
506         "Support PeerConnectionStates::BundlePolicy::MaxBundle when
507         setting rtc configuration"
508         https://bugs.webkit.org/show_bug.cgi?id=169389
509         http://trac.webkit.org/changeset/218963
510
511 2017-06-29  Chris Dumez  <cdumez@apple.com>
512
513         Split ResourceLoadObserver into 2 classes: one for WebCore and one for the UIProcess
514         https://bugs.webkit.org/show_bug.cgi?id=173990
515
516         Reviewed by Brent Fulgham.
517
518         Split ResourceLoadObserver into 2 classes: one for WebCore and one for the UIProcess.
519         They really have different API and there is therefore close to no code duplication.
520
521         * loader/ResourceLoadObserver.cpp:
522         (WebCore::primaryDomain):
523         (WebCore::ResourceLoadObserver::setStatisticsQueue):
524         (WebCore::ResourceLoadObserver::shouldLog):
525         * loader/ResourceLoadObserver.h:
526         * loader/ResourceLoadStatisticsStore.cpp:
527         (WebCore::ResourceLoadStatisticsStore::primaryDomain):
528         * loader/ResourceLoadStatisticsStore.h:
529         * platform/URL.h:
530
531 2017-06-29  Sam Weinig  <sam@webkit.org>
532
533         [WebIDL] Remove custom binding for UserMessageHandlersNamespace
534         https://bugs.webkit.org/show_bug.cgi?id=173956
535
536         Reviewed by Darin Adler.
537
538         * CMakeLists.txt:
539         * WebCore.xcodeproj/project.pbxproj:
540         * bindings/js/JSUserMessageHandlersNamespaceCustom.cpp: Removed.
541         Remove JSUserMessageHandlersNamespaceCustom.cpp
542
543         * bindings/scripts/CodeGeneratorJS.pm:
544         (GenerateNamedGetterLambda):
545         Add support for calling named getters with additional arguments from [CallWith].
546
547         (GenerateAttributeGetterBodyDefinition):
548         (GenerateAttributeSetterBodyDefinition):
549         (GenerateCallWithUsingReferences):
550         (GenerateCallWithUsingPointers):
551         (GenerateConstructorCallWithUsingPointers):
552         (GenerateCallWith):
553         (GenerateParametersCheck):
554         Update arguments to GenerateCallWith(Using...) to no longer pass an operation,
555         which was only needed for the no longer used ScriptArguments, pass a thisObject
556         reference, and optionally pass an indentation.
557
558         * bindings/scripts/IDLAttributes.json:
559         Remove no longer used ScriptArguments and CallStack, add World.
560
561         * bindings/scripts/test/JS/JSTestObj.cpp:
562         (WebCore::jsTestObjWithScriptArgumentsAndCallStackAttributeGetter): Deleted.
563         (WebCore::jsTestObjWithScriptArgumentsAndCallStackAttribute): Deleted.
564         (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttributeSetter): Deleted.
565         (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute): Deleted.
566         (WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStackBody): Deleted.
567         (WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack): Deleted.
568         * bindings/scripts/test/TestObj.idl:
569         Remove tests of ScriptArguments and CallStack.
570
571         * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp: Added.
572         * bindings/scripts/test/JS/JSTestNamedGetterCallWith.h: Added.
573         * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp: Added.
574         * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.h: Added.
575         * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp: Added.
576         * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.h: Added.
577         * bindings/scripts/test/TestNamedGetterCallWith.idl: Added.
578         * bindings/scripts/test/TestNamedGetterNoIdentifier.idl: Added.
579         * bindings/scripts/test/TestNamedGetterWithIdentifier.idl: Added.
580         Add basic named getter tests and a specific test of named getters using CallWith.
581
582         * page/UserMessageHandlersNamespace.cpp:
583         (WebCore::UserMessageHandlersNamespace::supportedPropertyNames):
584         (WebCore::UserMessageHandlersNamespace::namedItem):
585         (WebCore::UserMessageHandlersNamespace::handler): Deleted.
586         * page/UserMessageHandlersNamespace.h:
587         Rename handler to namedItem, matching convention and the expectations of the
588         bindings generator and swap the order of the arguments for the same reason.
589
590         * page/UserMessageHandlersNamespace.idl:
591         Remove CustomGetOwnPropertySlotAndDescriptor, and add the anonymous named getter.
592
593 2017-06-29  Chris Dumez  <cdumez@apple.com>
594
595         Avoid copying ResourceLoadStatistics objects
596         https://bugs.webkit.org/show_bug.cgi?id=173972
597
598         Reviewed by Brent Fulgham.
599
600         Avoid copying ResourceLoadStatistics objects given that they are big. Make the type move-only
601         to avoid such mistakes in the future.
602
603         * loader/ResourceLoadObserver.cpp:
604         (WebCore::ResourceLoadObserver::logFrameNavigation):
605         * loader/ResourceLoadStatistics.h:
606         (WebCore::ResourceLoadStatistics::ResourceLoadStatistics):
607
608 2017-06-29  John Wilander  <wilander@apple.com>
609
610         Fix for intermittent Layout Test fail http/tests/loading/resourceLoadStatistics/telemetry-generation.html
611         https://bugs.webkit.org/show_bug.cgi?id=173940
612         <rdar://problem/33018125>
613
614         Reviewed by Brent Fulgham.
615
616         No new tests. This change enables the exiting test to pass.
617
618         * loader/ResourceLoadStatisticsStore.cpp:
619         (WebCore::ResourceLoadStatisticsStore::sortedPrevalentResourceTelemetry):
620             Added an assert.
621
622 2017-06-29  Youenn Fablet  <youenn@apple.com>
623
624         Support PeerConnectionStates::BundlePolicy::MaxBundle when setting rtc configuration
625         https://bugs.webkit.org/show_bug.cgi?id=169389
626
627         Unreviewed.
628
629         * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
630         (WebCore::configurationFromMediaEndpointConfiguration): Reactivating CPU overuse detection as it might be the cause of the bots regressions.
631
632 2017-06-29  Basuke Suzuki  <Basuke.Suzuki@sony.com>
633
634         [Curl] ResourceHandleManager violate the class responsibility of ResourceHandle
635         https://bugs.webkit.org/show_bug.cgi?id=173630
636
637         Reviewed by Alex Christensen.
638
639         * platform/network/ResourceHandle.h:
640         * platform/network/curl/ResourceHandleCurl.cpp:
641         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
642         (WebCore::calculateWebTimingInformations):
643         (WebCore::handleLocalReceiveResponse):
644         (WebCore::writeCallback):
645         (WebCore::isHttpInfo):
646         (WebCore::isHttpRedirect):
647         (WebCore::isHttpAuthentication):
648         (WebCore::isHttpNotModified):
649         (WebCore::isAppendableHeader):
650         (WebCore::removeLeadingAndTrailingQuotes):
651         (WebCore::getProtectionSpace):
652         (WebCore::headerCallback):
653         (WebCore::readCallback):
654         (WebCore::getFormElementsCount):
655         (WebCore::setupFormData):
656         (WebCore::ResourceHandle::setupPUT):
657         (WebCore::ResourceHandle::setupPOST):
658         (WebCore::ResourceHandle::handleDataURL):
659         (WebCore::ResourceHandle::dispatchSynchronousJob):
660         (WebCore::ResourceHandle::applyAuthentication):
661         (WebCore::ResourceHandle::initialize):
662         (WebCore::ResourceHandle::handleCurlMsg):
663         * platform/network/curl/ResourceHandleManager.cpp:
664         (WebCore::ResourceHandleManager::downloadTimerCallback):
665         (WebCore::ResourceHandleManager::startJob):
666         (WebCore::calculateWebTimingInformations): Deleted.
667         (WebCore::isHttpInfo): Deleted.
668         (WebCore::isHttpRedirect): Deleted.
669         (WebCore::isHttpAuthentication): Deleted.
670         (WebCore::isHttpNotModified): Deleted.
671         (WebCore::handleLocalReceiveResponse): Deleted.
672         (WebCore::writeCallback): Deleted.
673         (WebCore::isAppendableHeader): Deleted.
674         (WebCore::removeLeadingAndTrailingQuotes): Deleted.
675         (WebCore::getProtectionSpace): Deleted.
676         (WebCore::headerCallback): Deleted.
677         (WebCore::readCallback): Deleted.
678         (WebCore::getFormElementsCount): Deleted.
679         (WebCore::setupFormData): Deleted.
680         (WebCore::ResourceHandleManager::setupPUT): Deleted.
681         (WebCore::ResourceHandleManager::setupPOST): Deleted.
682         (WebCore::handleDataURL): Deleted.
683         (WebCore::ResourceHandleManager::dispatchSynchronousJob): Deleted.
684         (WebCore::ResourceHandleManager::applyAuthenticationToRequest): Deleted.
685         (WebCore::ResourceHandleManager::initializeHandle): Deleted.
686         * platform/network/curl/ResourceHandleManager.h:
687
688 2017-06-29  Said Abou-Hallawa  <sabouhallawa@apple.com>
689
690         Async image decoding should be disabled for iBooks on tvOS
691         https://bugs.webkit.org/show_bug.cgi?id=173945
692
693         Reviewed by Simon Fraser.
694
695         The iBooks on tvOS is an AppStore application. We need to disable async
696         image decoding for iBooks on tvOS permanently through WebKit.
697
698         * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
699         (WebCore::IOSApplication::isIBooks):
700         * platform/graphics/BitmapImage.cpp:
701         (WebCore::BitmapImage::updateFromSettings):
702
703 2017-06-29  Sam Weinig  <sam@webkit.org>
704
705         [WebIDL] Add a new extended attribute to model the forced return value optimization used on Node and Crypto
706         https://bugs.webkit.org/show_bug.cgi?id=173961
707
708         Reviewed by Darin Adler.
709
710         Node and Crypto were both using custom bindings to implement an optimization
711         for operations that always returned one one of the arguments passed in. The
712         optimization directly returns the JSValue argument, avoiding wrapping and 
713         unwrapping, and all the cache lookups that might entail. This allows that 
714         optimization to work without custom bindings by adding a new extended attribute
715         [ReturnValue] that can annotate an argument. When used, the implementation
716         function is expected to return either void or ExceptionOr<void>.
717
718         * CMakeLists.txt:
719         * WebCore.xcodeproj/project.pbxproj:
720         * bindings/js/JSBindingsAllInOne.cpp:
721         * bindings/js/JSCryptoCustom.cpp: Removed.
722         Remove JSCryptoCustom.cpp.
723
724         * bindings/js/JSNodeCustom.cpp:
725         (WebCore::JSNode::insertBefore): Deleted.
726         (WebCore::JSNode::replaceChild): Deleted.
727         (WebCore::JSNode::removeChild): Deleted.
728         (WebCore::JSNode::appendChild): Deleted.
729         Remove custom functions.
730
731         * bindings/scripts/CodeGeneratorJS.pm:
732         (OperationHasForcedReturnValue):
733         Add helper to determine if an operation has [ReturnValue] on any argument.
734
735         (NeedsExplicitPropagateExceptionCall):
736         We must treat operations with a [ReturnValue] argument like we do operations
737         returning void, and explicitly check for exceptions.
738
739         (GenerateParametersCheck):
740         Pull out the argument in a variable called 'returnValue' if it is annotated
741         with [ReturnValue].
742
743         (GenerateImplementationFunctionCall):
744         Special case operations with a [ReturnValue] argument to return the previously
745         set aside 'returnValue' variable.
746
747         * bindings/scripts/IDLAttributes.json:
748         Add [ReturnValue].
749
750         * bindings/scripts/test/JS/JSTestObj.cpp:
751         (WebCore::jsTestObjPrototypeFunctionTestReturnValueOptimizationBody):
752         (WebCore::jsTestObjPrototypeFunctionTestReturnValueOptimization):
753         (WebCore::jsTestObjPrototypeFunctionTestReturnValueOptimizationWithExceptionBody):
754         (WebCore::jsTestObjPrototypeFunctionTestReturnValueOptimizationWithException):
755         * bindings/scripts/test/TestObj.idl:
756         Add tests for [ReturnValue].
757
758         * dom/Node.idl:
759         * page/Crypto.idl:
760         Add [ReturnValue] annotations and remove [Custom] annotations.
761
762 2017-06-29  Chris Dumez  <cdumez@apple.com>
763
764         Unreviewed, rolling out r218944.
765
766         Optimization is incorrect
767
768         Reverted changeset:
769
770         "Avoid copying ResourceLoadStatistics objects"
771         https://bugs.webkit.org/show_bug.cgi?id=173972
772         http://trac.webkit.org/changeset/218944
773
774 2017-06-29  Carlos Garcia Campos  <cgarcia@igalia.com>
775
776         REGRESSION(r218896): ASSERT in WebPageProxy::dataCallback
777         https://bugs.webkit.org/show_bug.cgi?id=173968
778
779         Reviewed by Michael Catanzaro.
780
781         The problem is that WebPageProxy::getLoadDecisionForIcon() sends 0 as callback ID when the decision is to not
782         load the icon. Since r218896 we always notify the client even when the decision is to not load the icon, in
783         which case the UI doesn't really expect a callback. When WebPageProxy::dataCallback is called with a 0 callback ID,
784         CallbackMap::take() crashes in RELEASE_ASSERT(callbackID).
785
786         Fixes several GTK+ unit tests that are crashing.
787
788         * loader/DocumentLoader.cpp:
789         (WebCore::DocumentLoader::didGetLoadDecisionForIcon): Return earlier if decision is false or frame is nullptr.
790         (WebCore::DocumentLoader::finishedLoadingIcon): Move RELEASE_ASSERT to notifyFinishedLoadingIcon().
791         (WebCore::DocumentLoader::notifyFinishedLoadingIcon): Assert if callbackIdentifier is 0 or m_frame is nullptr,
792         since it's no longer expected to happen.
793
794 2017-06-29  Chris Dumez  <cdumez@apple.com>
795
796         statistics.mostRecentUserInteraction should be of type WallTime
797         https://bugs.webkit.org/show_bug.cgi?id=173974
798
799         Reviewed by Brent Fulgham.
800
801         statistics.mostRecentUserInteraction should be of type WallTime for clarity.
802
803         * loader/ResourceLoadObserver.cpp:
804         (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
805         (WebCore::ResourceLoadObserver::logUserInteraction):
806         (WebCore::ResourceLoadObserver::clearUserInteraction):
807         * loader/ResourceLoadStatistics.cpp:
808         (WebCore::ResourceLoadStatistics::encode):
809         (WebCore::ResourceLoadStatistics::decode):
810         (WebCore::ResourceLoadStatistics::toString):
811         (WebCore::ResourceLoadStatistics::merge):
812         * loader/ResourceLoadStatistics.h:
813         (WebCore::ResourceLoadStatistics::mostRecentUserInteractionTime): Deleted.
814         * loader/ResourceLoadStatisticsStore.cpp:
815         (WebCore::shouldPartitionCookies):
816         (WebCore::ResourceLoadStatisticsStore::hasHadRecentUserInteraction):
817         (WebCore::ResourceLoadStatisticsStore::sortedPrevalentResourceTelemetry):
818
819 2017-06-29  JF Bastien  <jfbastien@apple.com>
820
821         WebAssembly: disable some APIs under CSP
822         https://bugs.webkit.org/show_bug.cgi?id=173892
823         <rdar://problem/32914613>
824
825         Reviewed by Daniel Bates.
826
827         This does the basic separation of eval-blocked and
828         WebAssembly-blocked, but currently only blocks neither or both. I
829         think we'll eventually consider allowing one to be blocked but not
830         the other, so this separation makes sense and means that when we
831         want to do the change it'll be tiny. At a minimum we want a
832         different error message, which this patch provides (a lot of the
833         code ties blocking to the error message).
834
835         Tests: http/tests/security/contentSecurityPolicy/WebAssembly-allowed.html
836                http/tests/security/contentSecurityPolicy/WebAssembly-blocked-in-about-blank-iframe.html
837                http/tests/security/contentSecurityPolicy/WebAssembly-blocked-in-external-script.html
838                http/tests/security/contentSecurityPolicy/WebAssembly-blocked-in-subframe.html
839                http/tests/security/contentSecurityPolicy/WebAssembly-blocked.html
840
841         * bindings/js/ScriptController.cpp:
842         (WebCore::ScriptController::enableWebAssembly):
843         (WebCore::ScriptController::disableWebAssembly):
844         * bindings/js/ScriptController.h:
845         * bindings/js/WorkerScriptController.cpp:
846         (WebCore::WorkerScriptController::disableWebAssembly):
847         * bindings/js/WorkerScriptController.h:
848         * dom/Document.cpp:
849         (WebCore::Document::disableWebAssembly):
850         * dom/Document.h:
851         * dom/ScriptExecutionContext.h:
852         * page/csp/ContentSecurityPolicy.cpp:
853         (WebCore::ContentSecurityPolicy::didCreateWindowProxy):
854         (WebCore::ContentSecurityPolicy::applyPolicyToScriptExecutionContext):
855         * page/csp/ContentSecurityPolicy.h:
856         * page/csp/ContentSecurityPolicyDirectiveList.cpp:
857         (WebCore::ContentSecurityPolicyDirectiveList::create):
858         * page/csp/ContentSecurityPolicyDirectiveList.h:
859         (WebCore::ContentSecurityPolicyDirectiveList::webAssemblyDisabledErrorMessage):
860         (WebCore::ContentSecurityPolicyDirectiveList::setWebAssemblyDisabledErrorMessage):
861         * workers/WorkerGlobalScope.cpp:
862         (WebCore::WorkerGlobalScope::disableWebAssembly):
863         * workers/WorkerGlobalScope.h:
864
865 2017-06-29  Zalan Bujtas  <zalan@apple.com>
866
867         Make InlineBox::m_topLeft and m_logicalWidth protected.
868         https://bugs.webkit.org/show_bug.cgi?id=173973
869
870         Reviewed by Simon Fraser.
871
872         I don't think this reasoning from 10 years ago is valid anymore -> 
873           "FIXME: Would like to make this protected, but methods are accessing these members over in the part."
874         (comment was conveniently removed in a later commit).
875
876         No change in functionality.
877
878         * rendering/InlineBox.h:
879         (WebCore::InlineBox::InlineBox):
880
881 2017-06-29  Wenson Hsieh  <wenson_hsieh@apple.com>
882
883         [iOS DnD] Adopt +objectWithItemProviderData: for serializing NSItemProviderReading-conformant objects
884         https://bugs.webkit.org/show_bug.cgi?id=173971
885         <rdar://problem/33006605>
886
887         Reviewed by Tim Horton.
888
889         Moves off of a very-recently-deprecated API, in favor of its replacement. Guarded by a runtime check and staging
890         declarations. No change in behavior.
891
892         * platform/ios/WebItemProviderPasteboard.mm:
893         (-[WebItemProviderPasteboard valuesForPasteboardType:inItemSet:]):
894
895 2017-06-29  Basuke Suzuki  <Basuke.Suzuki@sony.com>
896
897         [Curl] Separate global curl settings from ResourceHandleManager as CurlContext class
898         https://bugs.webkit.org/show_bug.cgi?id=173629
899
900         Reviewed by Alex Christensen.
901
902         * PlatformWinCairo.cmake:
903         * platform/network/curl/CookieJarCurl.cpp:
904         (WebCore::setCookiesFromDOM):
905         (WebCore::cookiesForSession):
906         * platform/network/curl/CurlContext.cpp: Added.
907         (WebCore::certificatePath):
908         (WebCore::cookieJarPath):
909         (WebCore::CurlContext::CurlContext):
910         (WebCore::CurlContext::~CurlContext):
911         (WebCore::CurlContext::initCookieSession):
912         (WebCore::CurlContext::ProxyInfo::url):
913         (WebCore::CurlContext::setProxyInfo):
914         (WebCore::CurlContext::getEffectiveURL):
915         (WebCore::CurlContext::createMultiHandle):
916         (WebCore::CurlContext::mutexFor):
917         (WebCore::CurlContext::lock):
918         (WebCore::CurlContext::unlock):
919         * platform/network/curl/CurlContext.h: Added.
920         (WebCore::CurlContext::singleton):
921         (WebCore::CurlContext::curlShareHandle):
922         (WebCore::CurlContext::getCookieJarFileName):
923         (WebCore::CurlContext::setCookieJarFileName):
924         (WebCore::CurlContext::getCertificatePath):
925         (WebCore::CurlContext::shouldIgnoreSSLErrors):
926         (WebCore::CurlContext::proxyInfo):
927         (WebCore::CurlContext::setProxyInfo):
928         (WebCore::CurlContext::getLogFile):
929         (WebCore::CurlContext::isVerbose):
930         * platform/network/curl/CurlDownload.cpp:
931         (WebCore::CurlDownload::init):
932         (WebCore::CurlDownload::start):
933         (WebCore::CurlDownload::cancel):
934         (WebCore::CurlDownload::didReceiveHeader):
935         * platform/network/curl/CurlDownload.h:
936         * platform/network/curl/CurlJobManager.cpp: Renamed from Source/WebCore/platform/network/curl/CurlManager.cpp.
937         (WebCore::CurlJobManager::CurlJobManager):
938         (WebCore::CurlJobManager::~CurlJobManager):
939         (WebCore::CurlJobManager::add):
940         (WebCore::CurlJobManager::remove):
941         (WebCore::CurlJobManager::getActiveCount):
942         (WebCore::CurlJobManager::getPendingCount):
943         (WebCore::CurlJobManager::startThreadIfNeeded):
944         (WebCore::CurlJobManager::stopThread):
945         (WebCore::CurlJobManager::stopThreadIfIdle):
946         (WebCore::CurlJobManager::updateHandleList):
947         (WebCore::CurlJobManager::addToCurl):
948         (WebCore::CurlJobManager::removeFromCurl):
949         (WebCore::CurlJobManager::workerThread):
950         * platform/network/curl/CurlJobManager.h: Renamed from Source/WebCore/platform/network/curl/CurlManager.h.
951         (WebCore::CurlJobManager::singleton):
952         * platform/network/curl/ResourceHandleManager.cpp:
953         (WebCore::ResourceHandleManager::ResourceHandleManager):
954         (WebCore::ResourceHandleManager::~ResourceHandleManager):
955         (WebCore::handleLocalReceiveResponse):
956         (WebCore::getProtectionSpace):
957         (WebCore::headerCallback):
958         (WebCore::ResourceHandleManager::downloadTimerCallback):
959         (WebCore::ResourceHandleManager::initializeHandle):
960         (WebCore::certificatePath): Deleted.
961         (WebCore::cookieJarPath): Deleted.
962         (WebCore::ResourceHandleManager::setCookieJarFileName): Deleted.
963         (WebCore::ResourceHandleManager::getCookieJarFileName): Deleted.
964         (WebCore::ResourceHandleManager::setProxyInfo): Deleted.
965         (WebCore::ResourceHandleManager::initCookieSession): Deleted.
966         * platform/network/curl/ResourceHandleManager.h:
967         (): Deleted.
968
969 2017-06-29  Chris Dumez  <cdumez@apple.com>
970
971         Avoid copying ResourceLoadStatistics objects
972         https://bugs.webkit.org/show_bug.cgi?id=173972
973
974         Reviewed by Geoffrey Garen.
975
976         Avoid copying ResourceLoadStatistics objects given that they are big. Make the type move-only
977         to avoid such mistakes in the future.
978
979         * loader/ResourceLoadObserver.cpp:
980         (WebCore::ResourceLoadObserver::logFrameNavigation):
981         * loader/ResourceLoadStatistics.h:
982         (WebCore::ResourceLoadStatistics::ResourceLoadStatistics):
983
984 2017-06-29  Antoine Quint  <graouts@apple.com>
985
986         Full stop shows to the right of the picture-in-picture localised string in Hebrew
987         https://bugs.webkit.org/show_bug.cgi?id=173966
988         <rdar://problem/32847376>
989
990         Reviewed by Dean Jackson.
991
992         We manually set the CSS "direction" property to "rtl" when we're not using an LTR language for a placard.
993
994         Test: media/modern-media-controls/placard/placard-ltr.html
995
996         * Modules/modern-media-controls/controls/placard.css:
997         (.media-controls:not(.uses-ltr-user-interface-layout-direction) .placard):
998
999 2017-06-29  Brent Fulgham  <bfulgham@apple.com>
1000
1001         Unreviewed Apple CMake build after r218901
1002
1003         I did not add 'cocoa/FileMonitorCocoa.mm' to the PlatformMac.cmake file as part of r218901.):
1004
1005         * PlatformMac.cmake:
1006
1007 2017-06-29  Frederic Wang  <fwang@igalia.com>
1008
1009         Small improvement of calls to RenderLayerBacking members
1010         https://bugs.webkit.org/show_bug.cgi?id=173969
1011
1012         Reviewed by Simon Fraser.
1013
1014         No new tests, behavior unchanged.
1015
1016         * page/FrameView.cpp:
1017         (WebCore::FrameView::tiledBacking): Access the member with RenderLayerBacking::tiledBacking.
1018         (WebCore::FrameView::updateTilesForExtendedBackgroundMode): Ditto.
1019         * rendering/RenderLayer.cpp:
1020         (WebCore::RenderLayer::usesCompositedScrolling): Use RenderLayerBacking::hasScrollingLayer as
1021         it better matches the intention of the check here.
1022
1023 2017-06-29  Romain Bellessort  <romain.bellessort@crf.canon.fr>
1024
1025         [Readable Streams API] Fix ReadableStream "strategy" argument handling
1026         https://bugs.webkit.org/show_bug.cgi?id=172716
1027
1028         Reviewed by Xabier Rodriguez-Calvar.
1029
1030         Aligned default strategy parameter with spec, as defined in [1].
1031         
1032         [1] https://streams.spec.whatwg.org/#rs-constructor
1033
1034         Added new tests and updated some existing ones based on the newly
1035         expected behavior. Also updated expectations for WPT streams tests.
1036
1037         * Modules/streams/ReadableStream.js:
1038         (initializeReadableStream): Fixed initialization of strategy.
1039
1040 2017-06-29  Antti Koivisto  <antti@apple.com>
1041
1042         REGRESSION(r215347): NAS4Free Pop-down menus fail to appear
1043         https://bugs.webkit.org/show_bug.cgi?id=173967
1044         <rdar://problem/32690114>
1045
1046         Reviewed by Andreas Kling.
1047
1048         Menus on this configuration page operate by mutating visibility. We fail to trigger required
1049         compositing updates when visibility changes on non-composited layer. Visibility of a non-composited
1050         descendant may affect geometry of the composited ancestor layer.
1051
1052         Test: compositing/backing/non-composited-visibility-change.html
1053
1054         * rendering/RenderLayerCompositor.cpp:
1055         (WebCore::RenderLayerCompositor::layerStyleChanged):
1056         (WebCore::RenderLayerCompositor::needsCompositingUpdateForStyleChangeOnNonCompositedLayer): Added.
1057
1058             Trigger compositing update for non-composited layers on visibility change.
1059             Factor tests into function.
1060
1061         * rendering/RenderLayerCompositor.h:
1062
1063 2017-06-28  Frederic Wang  <fwang@igalia.com>
1064
1065         Align Document::canNavigate on the HTM5 specification
1066         https://bugs.webkit.org/show_bug.cgi?id=173162
1067
1068         Reviewed by Chris Dumez.
1069
1070         Currently when a frame A with a sandboxed navigation flag tries and navigates another frame B
1071         then Document::canNavigate verifies the cases where we try to navigate A's top frame (in
1072         that case the allow-top-navigation flag is needed) or not (in that case, B must be a
1073         descendant of A). This patch refines that a bit to check the case where B is a popup (in that
1074         case navigation is permitted if A is the opener of B). This change aligns on the HTML5
1075         specification and allows to pass more W3C Web Platform tests.
1076         See https://html.spec.whatwg.org/multipage/browsers.html#allowed-to-navigate
1077
1078         Tests: imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-3.html
1079                imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html
1080
1081         * dom/Document.cpp:
1082         (WebCore::Document::canNavigate): This refines the case where the document's frame has the
1083         sandbox navigation flag set in order to handle popup navigation. New comments referring to
1084         the HTML5 specification are also added.
1085
1086 2017-06-28  Myles C. Maxfield  <mmaxfield@apple.com>
1087
1088         Only apply font features for the particular type of font they are being applied to
1089         https://bugs.webkit.org/show_bug.cgi?id=172661
1090         <rdar://problem/31534119>
1091         <rdar://problem/32799624>
1092
1093         Reviewed by Simon Fraser.
1094
1095         There are two types of font formats which support features: AAT and OTF. Each of them has
1096         a different idea about what the identity of a feature is. We were specifying both types
1097         of feature identities to Core Text; however, this is causing Core Text to get confused.
1098         Instead, we should only apply AAT features to AAT fonts and OTF features to OTF fonts.
1099
1100         Test: Un-marking these tests as failure on High Sierra:
1101               css3/font-variant-petite-caps-synthesis-coverage.html
1102               css3/font-variant-small-caps-synthesis-coverage.html
1103
1104         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1105         (WebCore::FontType::FontType):
1106         (WebCore::preparePlatformFont):
1107         (WebCore::variationCapabilitiesForFontDescriptor):
1108         (WebCore::isGXVariableFont): Deleted.
1109
1110 2017-06-28  Chris Dumez  <cdumez@apple.com>
1111
1112         [ResourceLoadStatistics] Simplify PrevalentResourceTelemetry struct
1113         https://bugs.webkit.org/show_bug.cgi?id=173953
1114
1115         Reviewed by Sam Weinig.
1116
1117         * loader/ResourceLoadStatisticsStore.cpp:
1118         (WebCore::ResourceLoadStatisticsStore::sortedPrevalentResourceTelemetry):
1119         * loader/ResourceLoadStatisticsStore.h:
1120         (WebCore::PrevalentResourceTelemetry::PrevalentResourceTelemetry): Deleted.
1121
1122 2017-06-28  Ryosuke Niwa  <rniwa@webkit.org>
1123
1124         Crash in WebCore::ScrollingTreeFixedNode::updateLayersAfterAncestorChange
1125         https://bugs.webkit.org/show_bug.cgi?id=173958
1126
1127         Reviewed by Simon Fraser.
1128
1129         The crashed is most likely caused by updateLayersAfterAncestorChange calling [CALayer setPosition]
1130         with a CGPoint which contains the x coordinate or the y coordinate of NaN.
1131
1132         Simon and I inpected the code but we couldn't figure out how we get there. Detect this case and bail out.
1133         Also log the relevant values and debug assert when this condition is hit to help identifying the root cause.
1134
1135         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
1136         (WebCore::ScrollingTreeFixedNode::updateLayersAfterAncestorChange):
1137
1138 2017-06-28  Chris Dumez  <cdumez@apple.com>
1139
1140         ResourceLoadObserver clean up
1141         https://bugs.webkit.org/show_bug.cgi?id=173955
1142
1143         Reviewed by Sam Weinig and Brent Fulgham.
1144
1145         ResourceLoadObserver clean up: Modernize code a bit and get rid of unused variables.
1146
1147         * loader/ResourceLoadObserver.cpp:
1148         (WebCore::ResourceLoadObserver::clearInMemoryStore):
1149         (WebCore::ResourceLoadObserver::clearInMemoryAndPersistentStore):
1150         (WebCore::ResourceLoadObserver::shouldLog):
1151         (WebCore::ResourceLoadObserver::logFrameNavigation):
1152         (WebCore::ResourceLoadObserver::logSubresourceLoading):
1153         (WebCore::ResourceLoadObserver::logWebSocketLoading):
1154         (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
1155         (WebCore::ResourceLoadObserver::logUserInteraction):
1156         (WebCore::ResourceLoadObserver::setSubframeUnderTopFrameOrigin):
1157         (WebCore::ResourceLoadObserver::setSubresourceUnderTopFrameOrigin):
1158         (WebCore::ResourceLoadObserver::setSubresourceUniqueRedirectTo):
1159         (WebCore::ResourceLoadObserver::fireDataModificationHandler):
1160         (WebCore::ResourceLoadObserver::fireShouldPartitionCookiesHandler):
1161         (WebCore::ResourceLoadObserver::primaryDomain):
1162         (WebCore::ResourceLoadObserver::statisticsForOrigin):
1163
1164 2017-06-28  Zalan Bujtas  <zalan@apple.com>
1165
1166         Move RenderEmbeddedObject::isReplacementObscured to HTMLPlugInElement
1167         https://bugs.webkit.org/show_bug.cgi?id=173802
1168         <rdar://problem/32884389>
1169
1170         Reviewed by Simon Fraser.
1171
1172         Hittesting could potentially destroy "this" renderer so calling it inside RenderEmbeddedObject
1173         could leave the caller with a stale pointer.
1174         This patch protects the plugin element from getting destroyed and checks if the renderer got
1175         deleted during the hittest to avoid nullptr dereference.
1176
1177         Speculative fix.
1178
1179         * html/HTMLPlugInElement.cpp:
1180         (WebCore::HTMLPlugInElement::isReplacementObscured):
1181         * html/HTMLPlugInElement.h:
1182         * rendering/RenderEmbeddedObject.cpp:
1183         (WebCore::RenderEmbeddedObject::isReplacementObscured): Deleted.
1184         * rendering/RenderEmbeddedObject.h:
1185         * testing/Internals.cpp:
1186         (WebCore::Internals::isPluginUnavailabilityIndicatorObscured):
1187
1188 2017-06-28  Chris Dumez  <cdumez@apple.com>
1189
1190         Avoid copying statistics in ResourceLoadStatisticsStore::readDataFromDecoder()
1191         https://bugs.webkit.org/show_bug.cgi?id=173951
1192
1193         Reviewed by Ryosuke Niwa.
1194
1195         * loader/ResourceLoadStatisticsStore.cpp:
1196         (WebCore::ResourceLoadStatisticsStore::readDataFromDecoder):
1197
1198 2017-06-28  Ryosuke Niwa  <rniwa@webkit.org>
1199
1200         Safari's Speedometer score massively regresses when accessibility is enabled
1201         https://bugs.webkit.org/show_bug.cgi?id=173912
1202
1203         Reviewed by Chris Fleizach.
1204
1205         The bug was caused by HTMLTextFormControlElement::setInnerTextValue triggering a synchronous layout
1206         via constructing VisiblePosition when the accessibility tree is present.
1207
1208         Added AXObjectCache::postTextReplacementNotificationForTextControl which avoids the construction of
1209         VisiblePosition and other means of triggering a synchronous layout. This patch also fixes a subtle bug
1210         that HTMLTextFormControlElement was creating TextMarkerData with axID set to that of the text control
1211         element instead of the root editable element inside its shadow tree even though the typing command uses
1212         axID of the root editable element. While I couldn't find any user-visible behavioral change from this
1213         code change, new code is more self-consistent.
1214
1215         Also added LayoutDisallowedScope which asserts that no synchronous layout happens in setInnerTextValue
1216         so that we don't introduce a new performance regression like this in the future.
1217
1218         No new tests. Existing tests in accessibility directory covers this.
1219
1220         * CMakeLists.txt: Added LayoutDisallowedScope.cpp.
1221         * WebCore.xcodeproj/project.pbxproj: Ditto.
1222
1223         * accessibility/AXObjectCache.cpp:
1224         (WebCore::AXObjectCache::postTextReplacementNotificationForTextControl): Added.
1225         (WebCore::AXObjectCache::textMarkerDataForVisiblePosition): Modernized. Returns optional<TextMarkerData>
1226         instead of taking TextMarkerData as an out-argument, and returning with axID of 0.
1227         (WebCore::AXObjectCache::textMarkerDataForFirstPositionInTextControl): Added. This specialized version
1228         constructs TextMarkerData for the first position inside the editable region in a text control without
1229         triggering a synchronous layout.
1230
1231         * accessibility/AXObjectCache.h:
1232         (WebCore::TextMarkerData): Initialize each member automatically.
1233         (WebCore::AXObjectCache::postTextReplacementNotificationForTextControl):
1234
1235         * accessibility/ios/AXObjectCacheIOS.mm:
1236         (WebCore::AXObjectCache::postTextReplacementPlatformNotificationForTextControl): Added.
1237
1238         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1239         (+[WebAccessibilityTextMarker textMarkerWithVisiblePosition:cache:]):
1240
1241         * accessibility/mac/AXObjectCacheMac.mm:
1242         (WebCore::addTextMarkerFor): Extracted from textReplacementChangeDictionary. Added a new variant which
1243         takes a text form control instead.
1244         (WebCore::textReplacementChangeDictionary): Templatized this function to either take VisiblePosition
1245         and call textMarkerForVisiblePosition or take HTMLTextFormControlElement and call
1246         textMarkerForFirstPositionInTextControl.
1247         (WebCore::postUserInfoForChanges): Extracted from postTextReplacementPlatformNotification.
1248         (WebCore::AXObjectCache::postTextReplacementPlatformNotification): 
1249         (WebCore::AXObjectCache::postTextReplacementPlatformNotificationForTextControl): Added.
1250
1251         * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
1252         * accessibility/mac/WebAccessibilityObjectWrapperMac.h:
1253
1254         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1255         (textMarkerForVisiblePosition):
1256         (-[WebAccessibilityObjectWrapper textMarkerForFirstPositionInTextControl:]): Added.
1257
1258         * dom/Document.cpp:
1259         (WebCore::Document::updateLayout): Assert that LayoutDisallowedScope is not in the stack frame.
1260
1261         * html/HTMLTextFormControlElement.cpp:
1262         (WebCore::HTMLTextFormControlElement::setInnerTextValue): Call postTextReplacementNotificationForTextControl
1263         to avoid triggering a synchronous layout. Also create LayoutDisallowedScope to avoid a similar performance
1264         regression from being introduced in the future in this function. Finally, made innerText a RefPtr for extra
1265         safety since we're using it after updating the DOM tree.
1266
1267         * rendering/LayoutDisallowedScope.cpp: Added.
1268         * rendering/LayoutDisallowedScope.h: Added.
1269         (WebCore::LayoutDisallowedScope::LayoutDisallowedScope):
1270         (WebCore::LayoutDisallowedScope::~LayoutDisallowedScope):
1271         (WebCore::LayoutDisallowedScope::isLayoutAllowed):
1272
1273 2017-06-27  Myles C. Maxfield  <mmaxfield@apple.com>
1274
1275         [iOS] Cannot italicize or bold text rendered with text styles
1276         https://bugs.webkit.org/show_bug.cgi?id=173634
1277
1278         Reviewed by Darin Adler.
1279
1280         r218616 enabled the new cascade list codepath for "system-ui," but didn't do it for the named
1281         text styles (like "font: -apple-system-tall-body;"). This new codepath is better because it
1282         correctly specifies weights and italics (using kCTFontWeightTrait and kCTFontSlantTrait) instead
1283         of using symbolic traits, and because it correctly handles fonts in the Core Text fallback chain.
1284         This patch migrates the named text styles to this new codepath.
1285
1286         Test: fast/text/ipad/bold-tall-body-text-style.html
1287
1288         * platform/graphics/cocoa/FontDescriptionCocoa.cpp:
1289         (WebCore::SystemFontDatabase::CoreTextCascadeListParameters::CoreTextCascadeListParameters):
1290         (WebCore::SystemFontDatabase::CoreTextCascadeListParameters::isHashTableDeletedValue):
1291         (WebCore::SystemFontDatabase::CoreTextCascadeListParameters::operator==):
1292         (WebCore::SystemFontDatabase::CoreTextCascadeListParameters::hash):
1293         (WebCore::SystemFontDatabase::CoreTextCascadeListParameters::CoreTextCascadeListParametersHash::hash):
1294         (WebCore::SystemFontDatabase::CoreTextCascadeListParameters::CoreTextCascadeListParametersHash::equal):
1295         (WebCore::SystemFontDatabase::systemFontCascadeList):
1296         (WebCore::convertArray):
1297         (WebCore::convertArray):
1298         (WebCore::makeNeverDestroyed):
1299         (WebCore::isUIFontTextStyle):
1300         (WebCore::systemFontParameters):
1301         (WebCore::FontCascadeDescription::effectiveFamilyCount):
1302         (WebCore::FontCascadeDescription::effectiveFamilyAt):
1303         (WebCore::SystemFontDatabase::CoreTextCascadeListParametersHash::hash): Deleted.
1304         (WebCore::SystemFontDatabase::CoreTextCascadeListParametersHash::equal): Deleted.
1305         * platform/graphics/ios/FontCacheIOS.mm:
1306         (WebCore::platformFontWithFamilySpecialCase):
1307
1308 2017-06-28  Devin Rousso  <drousso@apple.com>
1309
1310         Web Inspector: Instrument active pixel memory used by canvases
1311         https://bugs.webkit.org/show_bug.cgi?id=173087
1312         <rdar://problem/32719261>
1313
1314         Reviewed by Joseph Pecoraro.
1315
1316         Test: inspector/canvas/memory.html
1317
1318         * html/HTMLCanvasElement.cpp:
1319         (WebCore::HTMLCanvasElement::setImageBuffer):
1320         * inspector/InspectorCanvasAgent.h:
1321         * inspector/InspectorCanvasAgent.cpp:
1322         (WebCore::InspectorCanvasAgent::didChangeCanvasMemory):
1323         (WebCore::InspectorCanvasAgent::buildObjectForCanvas):
1324         * inspector/InspectorInstrumentation.h:
1325         * inspector/InspectorInstrumentation.cpp:
1326         (WebCore::InspectorInstrumentation::didChangeCanvasMemory):
1327         (WebCore::InspectorInstrumentation::didChangeCanvasMemoryImpl):
1328
1329 2017-06-28  Alex Christensen  <achristensen@webkit.org>
1330
1331         Prevent displaying URLs with small capital letters
1332         https://bugs.webkit.org/show_bug.cgi?id=173949
1333         <rdar://problem/32952058>
1334
1335         Reviewed by Brent Fulgham.
1336
1337         Covered by new API tests.
1338
1339         * platform/mac/WebCoreNSURLExtras.mm:
1340         (WebCore::isLookalikeCharacter):
1341
1342 2017-06-28  Youenn Fablet  <youenn@apple.com>
1343
1344         Support PeerConnectionStates::BundlePolicy::MaxBundle when setting rtc configuration
1345         https://bugs.webkit.org/show_bug.cgi?id=169389
1346
1347         Reviewed by Alex Christensen.
1348
1349         Covered by manual testing (appr.tc and https://youennf.github.io/webrtc-tests/src/content/peerconnection/trickle-ice/).
1350         Previously, we were creating a libwebrtc peer connection and then setting its configuration.
1351         libwebrtc does not like the configuration to be changed and may refuse to set the configuration.
1352         Instead of doing that, we are now creating the libwebrtc peer connection with the provided configuration.
1353
1354         * Modules/mediastream/MediaEndpointPeerConnection.cpp:
1355         (WebCore::MediaEndpointPeerConnection::setConfiguration):
1356         * Modules/mediastream/MediaEndpointPeerConnection.h:
1357         * Modules/mediastream/PeerConnectionBackend.h:
1358         * Modules/mediastream/RTCPeerConnection.cpp:
1359         (WebCore::RTCPeerConnection::initializeWith):
1360         (WebCore::iceServersFromConfiguration):
1361         (WebCore::RTCPeerConnection::initializeConfiguration):
1362         (WebCore::RTCPeerConnection::setConfiguration):
1363         * Modules/mediastream/RTCPeerConnection.h:
1364         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
1365         (WebCore::LibWebRTCMediaEndpoint::LibWebRTCMediaEndpoint):
1366         (WebCore::LibWebRTCMediaEndpoint::setConfiguration):
1367         (WebCore::LibWebRTCMediaEndpoint::stop):
1368         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
1369         * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
1370         (WebCore::configurationFromMediaEndpointConfiguration):
1371         (WebCore::LibWebRTCPeerConnectionBackend::setConfiguration):
1372         * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
1373         * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
1374         (WebCore::createActualPeerConnection):
1375         (WebCore::LibWebRTCProvider::createPeerConnection):
1376         * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
1377
1378 2017-06-28  Brent Fulgham  <bfulgham@apple.com>
1379
1380         Teach ResourceLoadStatistics to recognize changes in the file system
1381         https://bugs.webkit.org/show_bug.cgi?id=173800
1382         <rdar://problem/32937842>
1383
1384         Reviewed by Chris Dumez.
1385
1386         We want to support the case where multiple UI processes choose to share the same
1387         statistics file. To support this, update the ResourceLoadStatistics logic to be aware
1388         that the statistics data file might change underneath it, and to take appropriate
1389         action when it does.
1390
1391         * WebCore.xcodeproj/project.pbxproj: Update for new sources.
1392         * WebCore/CMakeLists.txt: Update for new FileMonitor source file.
1393         * loader/ResourceLoadStatisticsStore.cpp:
1394         (WebCore::ResourceLoadStatisticsStore::clearInMemoryAndPersistent): Use the new deletion
1395         handler for the data file instead of writing out an empty file.
1396         (WebCore::ResourceLoadStatisticsStore::setDeletePersistentStoreCallback): Added.
1397         * loader/ResourceLoadStatisticsStore.h:
1398         * platform/FileMonitor.cpp: Added.
1399         (WebCore::FileMonitor::create):
1400         (WebCore::FileMonitor::FileMonitor): Register handlers and begin monitoring file.
1401         (WebCore::FileMonitor::~FileMonitor): Stop any active file monitoring.
1402         (WebCore::FileMonitor::startMonitoringPath): Stub implementation.
1403         (WebCore::FileMonitor::stopMonitoring): Ditto.
1404         * platform/FileMonitor.h: Added.
1405         * platform/FileSystem.h: Export files needed by WebKit2. Add support for O_EVTONLY
1406         Darwin file handles.
1407         * platform/Logging.h: Add 'ResourceLoadStatistics' category.
1408         * platform/cocoa/FileMonitorCocoa.mm: Added.
1409         (WebCore::FileMonitor::startMonitoringPath): Create a new VNODE type dispatch_source
1410         to receive notifications when the specified file changes.
1411         (WebCore::FileMonitor::stopMonitoring): Cancel the dispatch_source when we are done
1412         monitoring the file.
1413         * platform/posix/FileSystemPOSIX.cpp: Update 'openFile' to understand the O_EVTONLY
1414         mode of file handles (Darwin-only). 
1415
1416 2017-06-28  Brady Eidson  <beidson@apple.com>
1417
1418         DocumentLoader should always notify the client if there are pending icon loads when the load is stopped.
1419         https://bugs.webkit.org/show_bug.cgi?id=173874
1420
1421         Reviewed by Alex Christensen.
1422
1423         Covered by API tests.
1424
1425         Patch started by Carlos Garcia Campos, finished by me.
1426         
1427         * loader/DocumentLoader.cpp:
1428         (WebCore::DocumentLoader::stopLoading): Make all of the callbacks for cancelled IconLoaders.
1429         (WebCore::DocumentLoader::didGetLoadDecisionForIcon): Make the callback even if there's no IconLoader.
1430         (WebCore::DocumentLoader::finishedLoadingIcon):
1431         (WebCore::DocumentLoader::notifyFinishedLoadingIcon):
1432         * loader/DocumentLoader.h:
1433
1434 2017-06-28  Antoine Quint  <graouts@apple.com>
1435
1436         Volume controls should be hidden when AirPlay is active
1437         https://bugs.webkit.org/show_bug.cgi?id=173933
1438         <rdar://problem/33011931>
1439
1440         Reviewed by Dean Jackson.
1441
1442         Ensure we don't show any volume controls during AirPlay. We set the mute button's enabled state to "false"
1443         when AirPlay is active and key off this enabled stated to control the display of all volume-related controls
1444         throughout the UI.
1445
1446         Tests: media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-volume-controls-hidden-when-mute-button-disabled.html
1447                media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-top-right-controls-bar-hidden-when-mute-button-disabled.html
1448
1449         * Modules/modern-media-controls/controls/inline-media-controls.js:
1450         (InlineMediaControls.prototype._addTopRightBarWithMuteButtonToChildren):
1451         (InlineMediaControls):
1452         * Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js:
1453         (MacOSFullscreenMediaControls.prototype.layout):
1454         * Modules/modern-media-controls/media/airplay-support.js:
1455         (AirplaySupport.prototype.syncControl):
1456         (AirplaySupport):
1457
1458 2017-06-28  Konstantin Tokarev  <annulen@yandex.ru>
1459
1460         Remove excessive includes from WebCore/css sources
1461         https://bugs.webkit.org/show_bug.cgi?id=173919
1462
1463         Reviewed by Simon Fraser.
1464
1465         No new tests needed.
1466
1467         * css/CSSCanvasValue.cpp:
1468         * css/CSSComputedStyleDeclaration.cpp:
1469         * css/CSSContentDistributionValue.cpp:
1470         * css/CSSCrossfadeValue.cpp:
1471         * css/CSSCursorImageValue.cpp:
1472         * css/CSSCustomPropertyValue.cpp:
1473         * css/CSSDefaultStyleSheets.cpp:
1474         * css/CSSFilterImageValue.cpp:
1475         * css/CSSFontFace.cpp:
1476         * css/CSSFontFaceSet.cpp:
1477         * css/CSSFontFaceSource.cpp:
1478         * css/CSSFontFaceSrcValue.cpp:
1479         * css/CSSFontFeatureValue.cpp:
1480         * css/CSSFontSelector.cpp:
1481         * css/CSSFontValue.cpp:
1482         * css/CSSImageGeneratorValue.cpp:
1483         * css/CSSImageSetValue.cpp:
1484         * css/CSSImageValue.cpp:
1485         * css/CSSImportRule.cpp:
1486         * css/CSSKeyframesRule.cpp:
1487         * css/CSSMediaRule.cpp:
1488         * css/CSSNamedImageValue.cpp:
1489         * css/CSSPrimitiveValue.cpp:
1490         * css/CSSProperty.cpp:
1491         * css/CSSPropertySourceData.cpp:
1492         * css/CSSReflectValue.cpp:
1493         * css/CSSRuleList.cpp:
1494         * css/CSSSegmentedFontFace.cpp:
1495         * css/CSSSelector.cpp:
1496         * css/CSSStyleRule.cpp:
1497         * css/CSSStyleSheet.cpp:
1498         * css/CSSSupportsRule.cpp:
1499         * css/CSSToStyleMap.cpp:
1500         * css/CSSValueList.cpp:
1501         * css/CSSValuePool.cpp:
1502         * css/CSSVariableData.cpp:
1503         * css/ElementRuleCollector.cpp:
1504         * css/InspectorCSSOMWrappers.cpp:
1505         * css/MediaList.cpp:
1506         * css/MediaQueryEvaluator.cpp:
1507         * css/MediaQueryExpression.cpp:
1508         * css/PropertySetCSSStyleDeclaration.cpp:
1509         * css/RGBColor.cpp:
1510         * css/SelectorChecker.cpp:
1511         * css/StyleProperties.cpp:
1512         * css/StyleResolver.cpp:
1513         * css/StyleRule.cpp:
1514         * css/StyleSheetContents.cpp:
1515         * css/TransformFunctions.cpp:
1516         * css/ViewportStyleResolver.cpp:
1517         * css/WebKitCSSRegionRule.cpp:
1518         * css/parser/CSSParser.cpp:
1519         * css/parser/CSSParserFastPaths.cpp:
1520         * css/parser/CSSParserIdioms.cpp:
1521         * css/parser/CSSParserSelector.cpp:
1522         * css/parser/CSSParserToken.cpp:
1523         * css/parser/CSSPropertyParser.cpp:
1524         * css/parser/CSSSelectorParser.cpp:
1525         * css/parser/MediaQueryParser.cpp:
1526
1527 2017-06-28  Alex Christensen  <achristensen@webkit.org>
1528
1529         Fix CMake build.
1530
1531         * PlatformMac.cmake:
1532
1533 2017-06-28  Antoine Quint  <graouts@apple.com>
1534
1535         Remove unnecessary `const double` method arguments
1536         https://bugs.webkit.org/show_bug.cgi?id=173925
1537
1538         Reviewed by Dean Jackson.
1539
1540         Addressing post-landing feedback from webkit.org/b/173858.
1541
1542         * Modules/mediacontrols/MediaControlsHost.cpp:
1543         (WebCore::MediaControlsHost::formattedStringForDuration):
1544         * Modules/mediacontrols/MediaControlsHost.h:
1545         * rendering/RenderTheme.h:
1546         (WebCore::RenderTheme::mediaControlsFormattedStringForDuration):
1547         * rendering/RenderThemeCocoa.h:
1548
1549 2017-06-28  Zalan Bujtas  <zalan@apple.com>
1550
1551         Unreviewed, rolling out r218373.
1552
1553         Output is not right
1554
1555         Reverted changeset:
1556
1557         "Use WTFLogAlways for debug logging so that it shows up in
1558         device system logs"
1559         https://bugs.webkit.org/show_bug.cgi?id=173450
1560         http://trac.webkit.org/changeset/218373
1561
1562 2017-06-28  Carlos Garcia Campos  <cgarcia@igalia.com>
1563
1564         [GTK] Some web pages disappear immediately after rendering
1565         https://bugs.webkit.org/show_bug.cgi?id=173768
1566
1567         Reviewed by Xabier Rodriguez-Calvar.
1568
1569         This is happening with websites having a "hidden" class in HTML tag when a media element is added. In the GTK+
1570         port the media controls CSS contains the following code:
1571
1572         .hidden {
1573             display: none !important;
1574         }
1575
1576         That causes the whole HTML document to become display: none. That's why we just render a white page, and also
1577         the reason why it only happens with the GTK+ port and only with some specific websites. We should limit the
1578         scope of the hidden class to the media control elements.
1579
1580         * css/mediaControlsGtk.css:
1581         (audio::-webkit-media-controls-panel.hidden,):
1582         (audio::-webkit-media-controls-panel div.mute-box.hidden,):
1583         (audio::-webkit-media-controls-current-time-display.hidden,):
1584         (audio::-webkit-media-controls-timeline.hidden,):
1585         (audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button):
1586         (audio::-webkit-media-controls-toggle-closed-captions-button.hidden,):
1587         (video::-webkit-media-controls-closed-captions-container.hidden):
1588         (audio::-webkit-media-controls-fullscreen-button.hidden,):
1589         (.hidden): Deleted.
1590
1591 2017-06-28  Antoine Quint  <graouts@apple.com>
1592
1593         Media controls volume glyph does not have the correct material
1594         https://bugs.webkit.org/show_bug.cgi?id=173918
1595         <rdar://problem/33012697>
1596
1597         Reviewed by Eric Carlson.
1598
1599         Test: media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-mute-button-in-bottom-or-top-right-controls-bar.html
1600
1601         All buttons were hosted in a ControlsBar save for the MuteButton, so we now host it in a controls bar as well
1602         to ensure compositing is similar to all other buttons.
1603
1604         * Modules/modern-media-controls/controls/inline-media-controls.css:
1605         (.media-controls.inline > .controls-bar.top-right):
1606         (.media-controls.inline > button.mute): Deleted.
1607         * Modules/modern-media-controls/controls/inline-media-controls.js:
1608         (InlineMediaControls):
1609         (InlineMediaControls.prototype.layout):
1610         (InlineMediaControls.prototype._addTopRightBarWithMuteButtonToChildren):
1611         * Modules/modern-media-controls/controls/macos-inline-media-controls.js:
1612         (MacOSInlineMediaControls.prototype.handleEvent):
1613
1614 2017-06-28  Carlos Garcia Campos  <cgarcia@igalia.com>
1615
1616         REGRESSION(r218799): [GTK][WPE] Critical warning at exit
1617         https://bugs.webkit.org/show_bug.cgi?id=173907
1618
1619         Reviewed by Konstantin Tokarev.
1620
1621         GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
1622
1623         This is now always happening when closing the MeiniBrowser and it's causing a lot of unit tests to fail. In
1624         r218799, GRefPtrGtk.h include was removed from PasteboardHelper.h that contains a GRefPtr<GtkTargetList>. The
1625         targets are destroyed at exit, but now trying to use g_object_unref instead of gtk_target_list_unref(). I've
1626         found two more cases like this in r218799, that removes GUniquePtrSoup.h from ResourceHandleInternal.h and
1627         ResourceRequest.h that have GUniquePtr<SoupBuffer> and GUniquePtr<SoupURI>.
1628
1629         Fixes several GTK+ and WPE unit tests.
1630
1631         * platform/gtk/PasteboardHelper.h: Bring back GRefPtrGtk.h.
1632         * platform/network/ResourceHandleInternal.h: Bring back GUniquePtrSoup.h.
1633         * platform/network/soup/ResourceRequest.h: Ditto.
1634
1635 2017-06-27  Chris Dumez  <cdumez@apple.com>
1636
1637         [ResourceLoadStatistics] Update minimumTimeBetweeenDataRecordsRemoval to 1 hour instead of 1 minute
1638         https://bugs.webkit.org/show_bug.cgi?id=173895
1639         <rdar://problem/32984366>
1640
1641         Reviewed by Brent Fulgham.
1642
1643         Update minimumTimeBetweeenDataRecordsRemoval to 1 hour instead of 1 minute to save battery.
1644         Also port code to modern time types.
1645
1646         * loader/ResourceLoadObserver.cpp:
1647         (WebCore::reduceTimeResolution):
1648         (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
1649         (WebCore::ResourceLoadObserver::setTimeToLiveUserInteraction):
1650         (WebCore::ResourceLoadObserver::setTimeToLiveCookiePartitionFree):
1651         (WebCore::ResourceLoadObserver::setMinimumTimeBetweeenDataRecordsRemoval):
1652         (WebCore::ResourceLoadObserver::setReducedTimestampResolution):
1653         (WebCore::ResourceLoadObserver::setGrandfatheringTime):
1654         * loader/ResourceLoadObserver.h:
1655         * loader/ResourceLoadStatistics.h:
1656         (WebCore::ResourceLoadStatistics::mostRecentUserInteractionTime):
1657         * loader/ResourceLoadStatisticsStore.cpp:
1658         (WebCore::ResourceLoadStatisticsStore::createEncoderFromData):
1659         (WebCore::ResourceLoadStatisticsStore::readDataFromDecoder):
1660         (WebCore::shouldPartitionCookies):
1661         (WebCore::ResourceLoadStatisticsStore::setTimeToLiveUserInteraction):
1662         (WebCore::ResourceLoadStatisticsStore::setTimeToLiveCookiePartitionFree):
1663         (WebCore::ResourceLoadStatisticsStore::setMinimumTimeBetweeenDataRecordsRemoval):
1664         (WebCore::ResourceLoadStatisticsStore::setGrandfatheringTime):
1665         (WebCore::ResourceLoadStatisticsStore::hasHadRecentUserInteraction):
1666         (WebCore::ResourceLoadStatisticsStore::topPrivatelyControlledDomainsToRemoveWebsiteDataFor):
1667         (WebCore::ResourceLoadStatisticsStore::handleFreshStartWithEmptyOrNoStore):
1668         (WebCore::ResourceLoadStatisticsStore::shouldRemoveDataRecords):
1669         (WebCore::ResourceLoadStatisticsStore::dataRecordsBeingRemoved):
1670         * loader/ResourceLoadStatisticsStore.h:
1671
1672 2017-06-27  Chris Dumez  <cdumez@apple.com>
1673
1674         Port HysteresisActivity to Seconds type
1675         https://bugs.webkit.org/show_bug.cgi?id=173902
1676
1677         Reviewed by Simon Fraser.
1678
1679         * platform/HysteresisActivity.h:
1680         (WebCore::HysteresisActivity::HysteresisActivity):
1681         (WebCore::HysteresisActivity::stop):
1682         * platform/ios/WebSQLiteDatabaseTrackerClient.mm:
1683
1684 2017-06-27  Jeremy Jones  <jeremyj@apple.com>
1685
1686         MediaPlayerPrivate m_private may not yet be created when setPrivateBrowsingMode is called.
1687         https://bugs.webkit.org/show_bug.cgi?id=173893
1688         rdar://problem/32986872
1689         
1690         Reviewed by Ryosuke Niwa.
1691
1692         No new tests because no reproducable case.
1693
1694         setPrivateBrowsingMode can be called on MediaPlayer before the MediaPlayerPrivate is created.
1695         The value should only be pushed down the m_private if it has been created.
1696
1697         * platform/graphics/MediaPlayer.cpp:
1698         (WebCore::MediaPlayer::setPrivateBrowsingMode):
1699
1700 2017-06-27  Wenson Hsieh  <wenson_hsieh@apple.com>
1701
1702         [iOS DnD] Support dragging out of contenteditable areas without a prior selection
1703         https://bugs.webkit.org/show_bug.cgi?id=173854
1704         <rdar://problem/32236827>
1705
1706         Reviewed by Ryosuke Niwa and Tim Horton.
1707
1708         Allows elements to be dragged from contenteditable areas for both WebKit1 and WebKit2 iOS. There are two main
1709         changes in WebCore: move the touch point adjustment code into EventHandler::tryToBeginDataInteractionAtPoint, so
1710         that the clientPosition specified will be adjusted to an appropriate clickable node if needed. This is necessary
1711         because UIWebDocumentView and WKContentView no longer send adjusted points to WebCore when requesting drag
1712         start. See <https://bugs.webkit.org/show_bug.cgi?id=173855> for a followup regarding the globalPosition and
1713         clientPositions passed in to the MouseEvents when performing a drag or synthetic click.
1714
1715         Secondly, image elements in Mail's contenteditable area are not draggable unless the heuristic in
1716         DragController::draggableElement is tweaked to not reject image dragging across the board if the
1717         loadsImagesAutomatically setting is turned off. Instead, even if images are not automatically loaded, allow the
1718         image drag to commence if the image renderer already has a cached image.
1719
1720         Test: DataInteractionTests.DragImageFromContentEditable
1721
1722         * page/DragController.cpp:
1723         (WebCore::imageElementIsDraggable):
1724         (WebCore::DragController::draggableElement):
1725         * page/ios/EventHandlerIOS.mm:
1726         (WebCore::EventHandler::tryToBeginDataInteractionAtPoint):
1727
1728 2017-06-27  Antoine Quint  <graouts@apple.com>
1729
1730         [Modern Media Controls] Accessibility labels should be formatted using NSDateComponentsFormatter
1731         https://bugs.webkit.org/show_bug.cgi?id=173858
1732         <rdar://problem/32643171>
1733
1734         Reviewed by Dean Jackson.
1735
1736         We shouldn't be manually trying to create a formatted string for media controls and instead rely
1737         on NSDateComponentsFormatter to perform this task for us. So we remove the ad-hoc code in the JS
1738         media controls code and instead add a new MediaControlsHost method to format durations which calls
1739         into RenderTheme to provide a formatted duration string relevant to the current platform and locale.
1740
1741         * English.lproj/modern-media-controls-localized-strings.js:
1742         * Modules/mediacontrols/MediaControlsHost.cpp:
1743         (WebCore::MediaControlsHost::formattedStringForDuration):
1744         * Modules/mediacontrols/MediaControlsHost.h:
1745         * Modules/mediacontrols/MediaControlsHost.idl:
1746         * Modules/modern-media-controls/controls/slider.js:
1747         (Slider.prototype.set inputAccessibleLabel):
1748         * Modules/modern-media-controls/controls/time-label.js:
1749         (TimeLabel.prototype.commitProperty):
1750         * Modules/modern-media-controls/main.js:
1751         (createControls):
1752         (formattedStringForDuration):
1753         (formatTimeToString): Deleted.
1754         * rendering/RenderTheme.h:
1755         (WebCore::RenderTheme::mediaControlsFormattedStringForDuration):
1756         * rendering/RenderThemeCocoa.h:
1757         * rendering/RenderThemeCocoa.mm:
1758         (WebCore::RenderThemeCocoa::mediaControlsFormattedStringForDuration):
1759
1760 2017-06-27  Eric Carlson  <eric.carlson@apple.com>
1761
1762         r218647 causes getUserMedia to fail on some machines
1763         https://bugs.webkit.org/show_bug.cgi?id=173894
1764
1765         Reviewed by Youenn Fablet.
1766
1767         * platform/mediastream/mac/AVVideoCaptureSource.mm:
1768         (WebCore::AVVideoCaptureSource::isFrameRateSupported): Change frame rate epsilon from 0.00001
1769         to 0.001.
1770
1771 2017-06-27  Antoine Quint  <graouts@apple.com>
1772
1773         Placard icons act like buttons (can get keyboard focus and shows up in VoiceOver)
1774         https://bugs.webkit.org/show_bug.cgi?id=173891
1775         <rdar://problem/33011855>
1776
1777         Reviewed by Dean Jackson.
1778
1779         Ensure that we disable buttons inside placards as they're only decorative and should
1780         not be interactive.
1781
1782         * Modules/modern-media-controls/controls/placard.js:
1783         (Placard.):
1784
1785 2017-06-27  Jeremy Jones  <jeremyj@apple.com>
1786
1787         Disable m_temporarilyAllowingInlinePlaybackAfterFullscreen on pause
1788         https://bugs.webkit.org/show_bug.cgi?id=173843
1789         rdar://problem/32982431
1790
1791         Reviewed by Eric Carlson.
1792
1793         Test: media/media-fullscreen-pause-inline.html
1794
1795         Some pages may not have a fullscreen button, so disabled m_temporarilyAllowingInlinePlaybackAfterFullscreen on pause.
1796
1797         * html/HTMLMediaElement.cpp:
1798         (WebCore::HTMLMediaElement::pause):
1799
1800 2017-06-27  Chris Dumez  <cdumez@apple.com>
1801
1802         [iOS] Avoid taking / releasing process assertions too quickly due to database activity
1803         https://bugs.webkit.org/show_bug.cgi?id=173879
1804         <rdar://problem/32412701>
1805
1806         Reviewed by Antti Koivisto.
1807
1808         Add HysteresisActivity to WebSQLiteDatabaseTrackerClient to avoid taking / releasing
1809         process assertion too quickly due to database activity.
1810
1811         * platform/ios/WebSQLiteDatabaseTrackerClient.h:
1812         * platform/ios/WebSQLiteDatabaseTrackerClient.mm:
1813         (WebCore::WebSQLiteDatabaseTrackerClient::WebSQLiteDatabaseTrackerClient):
1814         (WebCore::WebSQLiteDatabaseTrackerClient::willBeginFirstTransaction):
1815         (WebCore::WebSQLiteDatabaseTrackerClient::didFinishLastTransaction):
1816         (WebCore::WebSQLiteDatabaseTrackerClient::hysteresisUpdated):
1817
1818 2017-06-27  Youenn Fablet  <youenn@apple.com>
1819
1820         Using public logging for WebRTC release logging
1821         https://bugs.webkit.org/show_bug.cgi?id=173881
1822
1823         Reviewed by Eric Carlson.
1824
1825         No change of behavior.
1826
1827         * Modules/mediastream/PeerConnectionBackend.cpp:
1828         (WebCore::PeerConnectionBackend::createOfferSucceeded):
1829         (WebCore::PeerConnectionBackend::createOfferFailed):
1830         (WebCore::PeerConnectionBackend::createAnswerSucceeded):
1831         (WebCore::PeerConnectionBackend::createAnswerFailed):
1832         (WebCore::PeerConnectionBackend::setLocalDescriptionFailed):
1833         (WebCore::PeerConnectionBackend::setRemoteDescriptionFailed):
1834         (WebCore::PeerConnectionBackend::addIceCandidateFailed):
1835         (WebCore::PeerConnectionBackend::newICECandidate):
1836         * Modules/mediastream/RTCPeerConnection.cpp:
1837         (WebCore::RTCPeerConnection::queuedSetLocalDescription):
1838         (WebCore::RTCPeerConnection::queuedSetRemoteDescription):
1839         (WebCore::RTCPeerConnection::queuedAddIceCandidate):
1840         (WebCore::RTCPeerConnection::updateIceGatheringState):
1841         (WebCore::RTCPeerConnection::updateIceConnectionState):
1842         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
1843         (WebCore::LibWebRTCMediaEndpoint::OnStatsDelivered):
1844
1845 2017-06-27  Don Olmstead  <don.olmstead@sony.com>
1846
1847         [PAL] Add symbol export macros for PAL
1848         https://bugs.webkit.org/show_bug.cgi?id=171519
1849
1850         Reviewed by Konstantin Tokarev.
1851
1852         No new tests. No change in behavior.
1853
1854         * CMakeLists.txt:
1855         * config.h:
1856         * platform/PlatformExportMacros.h:
1857
1858 2017-06-27  John Wilander  <wilander@apple.com>
1859
1860         Resource Load Statistics: Add telemetry
1861         https://bugs.webkit.org/show_bug.cgi?id=173499
1862         <rdar://problem/32826094>
1863
1864         Reviewed by Brent Fulgham.
1865
1866         Test: http/tests/loading/resourceLoadStatistics/telemetry-generation.html
1867
1868         * loader/ResourceLoadObserver.cpp:
1869         (WebCore::ResourceLoadObserver::fireTelemetryHandler):
1870             Test infrastructure.
1871         * loader/ResourceLoadObserver.h:
1872         * loader/ResourceLoadStatisticsStore.cpp:
1873         (WebCore::ResourceLoadStatisticsStore::setFireTelemetryCallback):
1874         (WebCore::ResourceLoadStatisticsStore::fireTelemetryHandler):
1875             Test infrastructure.
1876         (WebCore::ResourceLoadStatisticsStore::sortedPrevalentResourceTelemetry):
1877             Convenience function for telemetry.
1878         * loader/ResourceLoadStatisticsStore.h:
1879             Added struct WebCore::PrevalentResourceTelemetry.
1880         * page/DiagnosticLoggingKeys.cpp:
1881         (WebCore::DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey):
1882             Added.
1883         * page/DiagnosticLoggingKeys.h:
1884
1885 2017-06-27  Ting-Wei Lan  <lantw44@gmail.com>
1886
1887         Add missing includes to fix compilation error on FreeBSD
1888         https://bugs.webkit.org/show_bug.cgi?id=172919
1889
1890         Reviewed by Mark Lam.
1891
1892         No new tests needed.
1893
1894         * crypto/gcrypt/CryptoKeyECGCrypt.cpp:
1895         * platform/audio/ReverbAccumulationBuffer.cpp:
1896
1897 2017-06-27  Zalan Bujtas  <zalan@apple.com>
1898
1899         Add RenderEmbeddedObject::getReplacementTextGeometry helper.
1900         https://bugs.webkit.org/show_bug.cgi?id=173847
1901
1902         Reviewed by Simon Fraser.
1903
1904         ...and remove getReplacementTextGeometry's redundant return value. 
1905
1906         No change in functionality.
1907
1908         * rendering/RenderEmbeddedObject.cpp:
1909         (WebCore::RenderEmbeddedObject::paintReplaced):
1910         (WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
1911         (WebCore::RenderEmbeddedObject::unavailablePluginIndicatorBounds):
1912         (WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
1913         * rendering/RenderEmbeddedObject.h:
1914
1915 2017-06-27  Wenson Hsieh  <wenson_hsieh@apple.com>
1916
1917         Refactor drag start codepaths to plumb a DragItem to client layers
1918         https://bugs.webkit.org/show_bug.cgi?id=173832
1919         Work towards <rdar://problem/32236827>
1920
1921         Reviewed by Ryosuke Niwa and Tim Horton.
1922
1923         Refactor drag start logic in WebCore to set up a DragItem and propagate it to WebDragClient. No change in behavior.
1924
1925         * loader/EmptyClients.cpp:
1926         * page/DragClient.h:
1927         * page/DragController.cpp:
1928         (WebCore::DragController::startDrag):
1929         (WebCore::DragController::doImageDrag):
1930         (WebCore::DragController::doSystemDrag):
1931
1932         Refactor to pass along a DragItem. Also, remove unused drag image anchor computation.
1933
1934         * page/DragController.h:
1935         * platform/DragImage.h:
1936         * platform/DragItem.h:
1937
1938         Add additional information needed to begin a drag on iOS.
1939
1940         (WebCore::DragItem::encode):
1941         (WebCore::DragItem::decode):
1942
1943         Add IPC serialization/deserialization support for DragItem.
1944
1945         * platform/PasteboardWriterData.cpp:
1946         (WebCore::PasteboardWriterData::isEmpty):
1947         * platform/PasteboardWriterData.h:
1948
1949 2017-06-27  Frederic Wang  <fwang@igalia.com>
1950
1951         Some tests to verify forbidden frame navigation time out
1952         https://bugs.webkit.org/show_bug.cgi?id=173657
1953
1954         Reviewed by Chris Dumez.
1955
1956         Currently some tests try and perform a forbidden frame navigation and verify the
1957         corresponding console error. However, WebKit does not raise any exception for such error so
1958         the tests have to wait until the timeout limit to complete, which makes execution slow.
1959         This patch modifies the setters of window.location for which such error may happen in order
1960         to raise an exception so the tests behave as expected.
1961
1962         No new tests, already covered by existing tests.
1963
1964         * page/Location.cpp: Adjust Location::setLocation to return a security exception and pass it
1965         to the callers.
1966         (WebCore::Location::setHref): Adjust function to possibly return an exception.
1967         (WebCore::Location::setProtocol): Ditto.
1968         (WebCore::Location::setHost): Ditto.
1969         (WebCore::Location::setHostname): Ditto.
1970         (WebCore::Location::setPort): Ditto.
1971         (WebCore::Location::setPathname): Ditto.
1972         (WebCore::Location::setSearch): Ditto.
1973         (WebCore::Location::setHash): Ditto.
1974         (WebCore::Location::assign): Ditto.
1975         (WebCore::Location::setLocation): FrameLoader::findFrameForNavigation is really only used
1976         to verify whether navigating m_frame is permitted so it is more simple and clearer to do it
1977         directly. When navigation is not permitted, this function now raises a security exception.
1978         * page/Location.h: Modify some setters to return an ExceptionOr<void>.
1979         * page/Location.idl: Allow some setters to raise an exception.
1980
1981 2017-06-26  Fujii Hironori  <Hironori.Fujii@sony.com>
1982
1983         [GTK] Layout Test webrtc/video.html issues "stack smashing detected"
1984         https://bugs.webkit.org/show_bug.cgi?id=173862
1985
1986         Reviewed by Carlos Garcia Campos.
1987
1988         Tests: webrtc/video.html
1989
1990         Passing a bool variable to g_object_get causes out-of-bound write.
1991         gboolean should be used, which is 4 bytes while bool is one byte.
1992
1993         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1994         (WebCore::MediaPlayerPrivateGStreamerBase::muted): Use gboolean instead of bool.
1995         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:
1996         (WebCore::MediaPlayerPrivateGStreamerOwr::trackEnded): Ditto.
1997
1998 2017-06-26  Chris Dumez  <cdumez@apple.com>
1999
2000         WebsiteDataStore::fetchDataForTopPrivatelyControlledDomains() is inefficient
2001         https://bugs.webkit.org/show_bug.cgi?id=173850
2002
2003         Reviewed by Ryosuke Niwa.
2004
2005         * loader/ResourceLoadStatisticsStore.cpp:
2006         (WebCore::ResourceLoadStatisticsStore::updateStatisticsForRemovedDataRecords):
2007         * loader/ResourceLoadStatisticsStore.h:
2008
2009 2017-06-26  Antti Koivisto  <antti@apple.com>
2010
2011         REGRESSION (AsyncImageDecoding): A tab with the WWDC keynote paused is killed for using excessive power (Image thrashing)
2012         https://bugs.webkit.org/show_bug.cgi?id=173804
2013         <rdar://problem/32623745>
2014
2015         Reviewed by Simon Fraser.
2016
2017         When under memory pressure MemoryCache::singleton().pruneLiveResources(true) is called inFrameView::didPaintContents()
2018         after top level paint. We end up decoding and pruning bitmaps repeatedly for each tile, which is not great.
2019
2020         Situation gets worse with async decoding. Painting now doesn’t actually decode the image, it just starts the decoding.
2021         When it completes we trigger another paint to get the bits to the tiles. The paint for the first tile then calls
2022         pruneLiveResources and loses the bitmap and the second tile triggers another round of async decoding. We have code
2023         that prevents pruning of visible images but non-visible images in tiling area can hit this bug easily.
2024
2025         Test: fast/images/low-memory-decode.html
2026
2027         * page/FrameView.cpp:
2028         (WebCore::FrameView::willPaintContents):
2029         (WebCore::FrameView::didPaintContents):
2030
2031             Eliminate synchronous pruning during painting. This is an obsolete mechanism from early iOS times.
2032
2033         * platform/graphics/BitmapImage.cpp:
2034         (WebCore::BitmapImage::imageFrameAvailableAtIndex):
2035         (WebCore::BitmapImage::decodeCountForTesting):
2036
2037             Testing support.
2038
2039         * platform/graphics/BitmapImage.h:
2040         * testing/Internals.cpp:
2041         (WebCore::Internals::imageDecodeCount):
2042         * testing/Internals.h:
2043         * testing/Internals.idl:
2044
2045 2017-06-26  Chris Dumez  <cdumez@apple.com>
2046
2047         ImageFrameCache::startAsyncDecodingQueue() unsafely passes Strings across threads
2048         https://bugs.webkit.org/show_bug.cgi?id=173842
2049
2050         Reviewed by Simon Fraser.
2051
2052         The URL string was passed across thread without isolated copy.
2053
2054         * platform/graphics/ImageFrameCache.cpp:
2055         (WebCore::ImageFrameCache::startAsyncDecodingQueue):
2056
2057 2017-06-26  Jonathan Bedard  <jbedard@apple.com>
2058
2059         Unreviewed, rolling out r218783.
2060
2061         Causing accessibility/mac/setting-attributes-is-
2062         asynchronous.html to crash consistently on mac-wk2 Debug
2063
2064         Reverted changeset:
2065
2066         "AX: Cannot call setValue() on contenteditable or ARIA text
2067         controls"
2068         https://bugs.webkit.org/show_bug.cgi?id=173520
2069         http://trac.webkit.org/changeset/218783
2070
2071 2017-06-26  Yusuke Suzuki  <utatane.tea@gmail.com>
2072
2073         [WTF] Drop Thread::create(obsolete things) API since we can use lambda
2074         https://bugs.webkit.org/show_bug.cgi?id=173825
2075
2076         Reviewed by Saam Barati.
2077
2078         No behavior change.
2079
2080         * Modules/indexeddb/server/IDBServer.cpp:
2081         (WebCore::IDBServer::IDBServer::IDBServer):
2082         (WebCore::IDBServer::IDBServer::databaseThreadEntry): Deleted.
2083         * Modules/indexeddb/server/IDBServer.h:
2084         * Modules/webaudio/AsyncAudioDecoder.cpp:
2085         (WebCore::AsyncAudioDecoder::AsyncAudioDecoder):
2086         (WebCore::AsyncAudioDecoder::threadEntry): Deleted.
2087         * Modules/webaudio/AsyncAudioDecoder.h:
2088         * Modules/webaudio/OfflineAudioDestinationNode.cpp:
2089         (WebCore::OfflineAudioDestinationNode::startRendering):
2090         (WebCore::OfflineAudioDestinationNode::offlineRenderEntry): Deleted.
2091         * Modules/webaudio/OfflineAudioDestinationNode.h:
2092         * Modules/webdatabase/DatabaseThread.cpp:
2093         (WebCore::DatabaseThread::start):
2094         (WebCore::DatabaseThread::databaseThreadStart): Deleted.
2095         * Modules/webdatabase/DatabaseThread.h:
2096         * bindings/js/GCController.cpp:
2097         (WebCore::collect):
2098         (WebCore::GCController::gcTimerFired):
2099         (WebCore::GCController::garbageCollectOnAlternateThreadForDebugging):
2100         * loader/icon/IconDatabase.cpp:
2101         (WebCore::IconDatabase::open):
2102         (WebCore::IconDatabase::iconDatabaseSyncThreadStart): Deleted.
2103         * loader/icon/IconDatabase.h:
2104         * page/ResourceUsageThread.cpp:
2105         (WebCore::ResourceUsageThread::createThreadIfNeeded):
2106         (WebCore::ResourceUsageThread::threadCallback): Deleted.
2107         * page/ResourceUsageThread.h:
2108         * page/scrolling/ScrollingThread.cpp:
2109         (WebCore::ScrollingThread::createThreadIfNeeded):
2110         (WebCore::ScrollingThread::threadCallback): Deleted.
2111         (WebCore::ScrollingThread::threadBody): Deleted.
2112         * page/scrolling/ScrollingThread.h:
2113         * platform/audio/HRTFDatabaseLoader.cpp:
2114         (WebCore::HRTFDatabaseLoader::loadAsynchronously):
2115         (WebCore::databaseLoaderEntry): Deleted.
2116         * platform/audio/HRTFDatabaseLoader.h:
2117         * platform/audio/ReverbConvolver.cpp:
2118         (WebCore::ReverbConvolver::ReverbConvolver):
2119         (WebCore::backgroundThreadEntry): Deleted.
2120         * platform/audio/ReverbConvolver.h:
2121         (WebCore::ReverbConvolver::useBackgroundThreads):
2122         * platform/network/cf/LoaderRunLoopCF.cpp:
2123         (WebCore::loaderRunLoop):
2124         (WebCore::runLoaderThread): Deleted.
2125         * platform/network/curl/CurlManager.cpp:
2126         (WebCore::CurlManager::startThreadIfNeeded):
2127         (WebCore::CurlManager::workerThread):
2128         * platform/network/curl/CurlManager.h:
2129         * workers/WorkerThread.cpp:
2130         (WebCore::WorkerThread::start):
2131         (WebCore::WorkerThread::workerThreadStart): Deleted.
2132         * workers/WorkerThread.h:
2133
2134 2017-06-26  Joanmarie Diggs  <jdiggs@igalia.com>
2135
2136         [ATK] Add support for aria-details and aria-errormessage
2137         https://bugs.webkit.org/show_bug.cgi?id=172588
2138
2139         Reviewed by Chris Fleizach.
2140
2141         Add methods to retrieve elements referenced by or referencing the new
2142         aria-details and aria-errormessage attributes. Include aria-details and
2143         aria-errormessage in AccessibilityObject::supportsARIAAttributes() to ensure
2144         elements with these attributes will be included in the accessibility tree.
2145
2146         New test cases added to accessibility/gtk/relation-types.html.
2147
2148         * accessibility/AccessibilityObject.cpp:
2149         (WebCore::AccessibilityObject::supportsARIAAttributes):
2150         (WebCore::AccessibilityObject::ariaDetailsElements):
2151         (WebCore::AccessibilityObject::ariaDetailsReferencingElements):
2152         (WebCore::AccessibilityObject::ariaErrorMessageElements):
2153         (WebCore::AccessibilityObject::ariaErrorMessageReferencingElements):
2154         * accessibility/AccessibilityObject.h:
2155         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2156         (setAtkRelationSetFromCoreObject):
2157         * html/HTMLAttributeNames.in:
2158
2159 2017-06-26  Konstantin Tokarev  <annulen@yandex.ru>
2160
2161         Remove excessive headers from WebCore/{Modules,animation,crypto,domjit}
2162         https://bugs.webkit.org/show_bug.cgi?id=173824
2163
2164         Reviewed by Darin Adler.
2165
2166         No new tests needed.
2167
2168         * Modules/credentials/CredentialCreationOptions.h:
2169         * Modules/credentials/PasswordCredential.h:
2170         * Modules/fetch/FetchBody.h:
2171         * Modules/fetch/FetchBodyOwner.h:
2172         * Modules/gamepad/GamepadManager.h:
2173         * Modules/geolocation/Coordinates.h:
2174         * Modules/geolocation/Geoposition.h:
2175         * Modules/indexeddb/IDBActiveDOMObject.h:
2176         * Modules/indexeddb/IDBCursor.h:
2177         * Modules/indexeddb/IDBDatabase.h:
2178         * Modules/indexeddb/IDBDatabaseIdentifier.h:
2179         * Modules/indexeddb/IDBObjectStore.cpp:
2180         * Modules/indexeddb/IDBObjectStore.h:
2181         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2182         * Modules/indexeddb/server/UniqueIDBDatabase.h:
2183         * Modules/indexeddb/shared/InProcessIDBServer.h:
2184         * Modules/indexeddb/shared/IndexKey.h:
2185         * Modules/mediacontrols/MediaControlsHost.h:
2186         * Modules/mediasession/WebMediaSessionManager.h:
2187         * Modules/mediasource/SourceBufferList.h:
2188         * Modules/mediasource/VideoPlaybackQuality.h:
2189         * Modules/notifications/Notification.h:
2190         * Modules/quota/WorkerNavigatorStorageQuota.h:
2191         * Modules/webaudio/AudioBasicProcessorNode.h:
2192         * Modules/webaudio/AudioContext.h:
2193         * Modules/webaudio/AudioDestinationNode.h:
2194         * Modules/webaudio/AudioParamTimeline.h:
2195         * Modules/webaudio/ConvolverNode.cpp:
2196         * Modules/webaudio/MediaStreamAudioSource.h:
2197         * Modules/webaudio/MediaStreamAudioSourceNode.h:
2198         * Modules/webaudio/PannerNode.h:
2199         * Modules/webaudio/PeriodicWave.h:
2200         * Modules/webaudio/ScriptProcessorNode.h:
2201         * Modules/webdatabase/DatabaseManager.h:
2202         * Modules/webdatabase/DatabaseTask.h:
2203         * Modules/webdatabase/SQLTransaction.h:
2204         * Modules/webdatabase/SQLTransactionBackend.h:
2205         * Modules/webdatabase/SQLTransactionStateMachine.h:
2206         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
2207         * Modules/websockets/WebSocketDeflater.h:
2208         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
2209         * animation/AnimationEffect.h:
2210         * crypto/CryptoKeyPair.h:
2211         * crypto/parameters/CryptoAlgorithmEcdhKeyDeriveParams.h:
2212         * dom/ScriptExecutionContext.h:
2213         * domjit/DOMJITHelpers.h:
2214         * domjit/DOMJITIDLConvert.h:
2215         * domjit/DOMJITIDLType.h:
2216
2217 2017-06-26  Konstantin Tokarev  <annulen@yandex.ru>
2218
2219         [GTK] Unreviewed, added missing includes to fix debug build
2220
2221         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2222
2223 2017-06-25  Konstantin Tokarev  <annulen@yandex.ru>
2224
2225         Remove excessive headers from WebCore/platform
2226         https://bugs.webkit.org/show_bug.cgi?id=173822
2227
2228         Reviewed by Tim Horton.
2229
2230         No new tests needed.
2231
2232         * html/ColorInputType.h:
2233         * html/MediaElementSession.h:
2234         * page/SecurityOriginData.cpp:
2235         * platform/CalculationValue.cpp:
2236         * platform/CalculationValue.h:
2237         * platform/ColorChooserClient.h:
2238         * platform/ContentType.h:
2239         * platform/LogMacros.h:
2240         * platform/PODRedBlackTree.h:
2241         * platform/PasteboardStrategy.h:
2242         * platform/PlatformPasteboard.h:
2243         * platform/PopupMenuStyle.h:
2244         * platform/ScrollAnimator.h:
2245         * platform/Theme.h:
2246         * platform/ThreadGlobalData.h:
2247         * platform/animation/AnimationList.h:
2248         * platform/audio/AudioArray.h:
2249         * platform/audio/AudioChannel.h:
2250         * platform/audio/DynamicsCompressor.h:
2251         * platform/audio/DynamicsCompressorKernel.h:
2252         * platform/audio/FFTFrame.h:
2253         * platform/audio/HRTFDatabaseLoader.cpp:
2254         * platform/audio/HRTFDatabaseLoader.h:
2255         * platform/audio/HRTFElevation.h:
2256         * platform/audio/MultiChannelResampler.h:
2257         * platform/audio/PlatformMediaSession.h:
2258         * platform/audio/ReverbConvolver.h:
2259         * platform/audio/ReverbConvolverStage.cpp:
2260         * platform/graphics/ANGLEWebKitBridge.h:
2261         * platform/graphics/BitmapImage.h:
2262         * platform/graphics/CrossfadeGeneratedImage.h:
2263         * platform/graphics/FloatPolygon.h:
2264         * platform/graphics/FloatSizeHash.h:
2265         * platform/graphics/Font.h:
2266         * platform/graphics/FontMetrics.h:
2267         * platform/graphics/FontPlatformData.h:
2268         * platform/graphics/FontRanges.h:
2269         * platform/graphics/FontTaggedSettings.h:
2270         * platform/graphics/GraphicsContext3D.h:
2271         * platform/graphics/GraphicsContext3DPrivate.h:
2272         * platform/graphics/GraphicsLayerClient.h:
2273         * platform/graphics/Image.cpp:
2274         * platform/graphics/ImageFrame.h:
2275         * platform/graphics/ImageFrameCache.h:
2276         * platform/graphics/ImageSource.h:
2277         * platform/graphics/IntRectHash.h:
2278         * platform/graphics/IntSizeHash.h:
2279         * platform/graphics/MediaPlaybackTargetClient.h:
2280         * platform/graphics/Pattern.h:
2281         * platform/graphics/PlatformTimeRanges.h:
2282         * platform/graphics/TextRun.h:
2283         * platform/graphics/TiledBacking.h:
2284         * platform/graphics/cairo/FontCustomPlatformData.h:
2285         * platform/graphics/filters/FEConvolveMatrix.h:
2286         * platform/graphics/filters/FELighting.h:
2287         * platform/graphics/filters/SourceAlpha.h:
2288         * platform/graphics/gstreamer/GStreamerUtilities.h:
2289         * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h:
2290         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2291         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2292         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
2293         * platform/graphics/harfbuzz/HarfBuzzShaper.h:
2294         * platform/graphics/opengl/Extensions3DOpenGL.h:
2295         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
2296         * platform/graphics/texmap/TextureMapperBackingStore.h:
2297         * platform/graphics/texmap/TextureMapperGL.cpp:
2298         * platform/graphics/texmap/TextureMapperGL.h:
2299         * platform/graphics/texmap/TextureMapperPlatformLayerProxy.h:
2300         * platform/graphics/texmap/TextureMapperTile.h:
2301         * platform/graphics/texmap/coordinated/Tile.h:
2302         * platform/graphics/texmap/coordinated/TiledBackingStore.h:
2303         * platform/graphics/transforms/TransformState.h:
2304         * platform/gtk/PasteboardHelper.h:
2305         * platform/gtk/ScrollbarThemeGtk.h:
2306         * platform/image-decoders/ImageDecoder.h:
2307         * platform/network/BlobData.h:
2308         * platform/network/BlobDataFileReference.h:
2309         * platform/network/ResourceHandle.h:
2310         * platform/network/ResourceHandleInternal.h:
2311         * platform/network/SocketStreamHandleClient.h:
2312         * platform/network/soup/ResourceRequest.h:
2313         * platform/network/soup/SocketStreamHandleImpl.h:
2314         * platform/network/soup/SoupNetworkSession.h:
2315         * platform/sql/SQLiteFileSystem.h:
2316         * platform/text/LocaleICU.h:
2317
2318 2017-06-25  Youenn Fablet  <youenn@apple.com>
2319
2320         Remove use of mock webrtc backend factory at injected bundle reset time
2321         https://bugs.webkit.org/show_bug.cgi?id=173817
2322
2323         Reviewed by Darin Adler.
2324
2325         * testing/Internals.cpp:
2326         (WebCore::Internals::resetToConsistentState): Resetting the peer connection backend.
2327         * testing/MockLibWebRTCPeerConnection.cpp: Doing some clean-up
2328         (WebCore::useRealRTCPeerConnectionFactory):
2329         (WebCore::MockLibWebRTCPeerConnectionFactory::MockLibWebRTCPeerConnectionFactory):
2330         (WebCore::MockLibWebRTCPeerConnectionFactory::CreatePeerConnection):
2331         (WebCore::MockLibWebRTCPeerConnectionFactory::CreateVideoTrack):
2332         (WebCore::MockLibWebRTCPeerConnectionFactory::CreateAudioTrack):
2333         * testing/MockLibWebRTCPeerConnection.h:
2334
2335 2017-06-25  Konstantin Tokarev  <annulen@yandex.ru>
2336
2337         Remove excessive headers from JavaScriptCore
2338         https://bugs.webkit.org/show_bug.cgi?id=173812
2339
2340         Reviewed by Darin Adler.
2341
2342         No new tests needed.
2343
2344         * Modules/indexeddb/IDBObjectStore.cpp:
2345         * bindings/js/JSDOMPromiseDeferred.h:
2346         * bindings/js/JSLazyEventListener.cpp:
2347         * bindings/js/JSMainThreadExecState.h:
2348         * bindings/js/ReadableStreamDefaultController.cpp:
2349         * bindings/js/ScriptGlobalObject.cpp:
2350         * bindings/js/SerializedScriptValue.cpp:
2351         * bridge/NP_jsobject.cpp:
2352         * dom/ScriptExecutionContext.cpp:
2353         * html/HTMLPlugInImageElement.cpp:
2354
2355 2017-06-25  Konstantin Tokarev  <annulen@yandex.ru>
2356
2357         Remove excessive headers from WebCore/{rendering,style,svg}
2358         https://bugs.webkit.org/show_bug.cgi?id=173773
2359
2360         Reviewed by Darin Adler.
2361
2362         No new tests needed.
2363
2364         * css/StyleBuilderConverter.h:
2365         * editing/TextIterator.cpp:
2366         * rendering/CounterNode.h:
2367         * rendering/FlexibleBoxAlgorithm.h:
2368         * rendering/HitTestLocation.h:
2369         * rendering/HitTestResult.h:
2370         * rendering/HitTestingTransformState.h:
2371         * rendering/OrderIterator.h:
2372         * rendering/RenderButton.h:
2373         * rendering/RenderCombineText.h:
2374         * rendering/RenderFlowThread.h:
2375         * rendering/RenderFullScreen.h:
2376         * rendering/RenderGeometryMap.h:
2377         * rendering/RenderListItem.h:
2378         * rendering/RenderMediaControlElements.cpp:
2379         * rendering/RenderMediaControlElements.h:
2380         * rendering/RenderMediaControls.h:
2381         * rendering/RenderMeter.h:
2382         * rendering/RenderMultiColumnSet.cpp:
2383         * rendering/RenderObject.h:
2384         * rendering/RenderRegion.h:
2385         * rendering/RenderRegionSet.cpp:
2386         * rendering/RenderRegionSet.h:
2387         * rendering/RenderTheme.h:
2388         * rendering/RenderVTTCue.cpp:
2389         * rendering/RenderVTTCue.h:
2390         * rendering/SimpleLineLayoutFunctions.h:
2391         * rendering/SimpleLineLayoutResolver.h:
2392         * rendering/line/BreakingContext.h:
2393         * rendering/line/LineBreaker.h:
2394         * rendering/mathml/MathMLStyle.h:
2395         * rendering/mathml/RenderMathMLOperator.h:
2396         * rendering/mathml/RenderMathMLRoot.h:
2397         * rendering/shapes/RectangleShape.h:
2398         * rendering/style/BasicShapes.h:
2399         * rendering/style/BorderData.h:
2400         * rendering/style/CounterDirectives.h:
2401         * rendering/style/GridArea.h:
2402         * rendering/style/KeyframeList.h:
2403         * rendering/style/RenderStyle.h:
2404         * rendering/style/SVGRenderStyle.h:
2405         * rendering/style/ShapeValue.h:
2406         * rendering/style/StyleCachedImage.h:
2407         * rendering/style/StyleMultiColData.h:
2408         * rendering/style/StyleRareNonInheritedData.h:
2409         * rendering/style/WillChangeData.h:
2410         * rendering/svg/RenderSVGBlock.h:
2411         * rendering/svg/RenderSVGRect.h:
2412         * rendering/svg/RenderSVGResource.h:
2413         * rendering/svg/RenderSVGResourceContainer.h:
2414         * rendering/svg/RenderSVGResourceMarker.h:
2415         * rendering/svg/RenderSVGResourceMasker.h:
2416         * rendering/svg/RenderSVGResourcePattern.h:
2417         * rendering/svg/SVGInlineFlowBox.cpp:
2418         * rendering/svg/SVGInlineTextBox.h:
2419         * rendering/svg/SVGRootInlineBox.h:
2420         * rendering/svg/SVGTextChunk.cpp:
2421         * rendering/svg/SVGTextChunk.h:
2422         * rendering/svg/SVGTextChunkBuilder.cpp:
2423         * rendering/svg/SVGTextLayoutEngine.cpp:
2424         * rendering/svg/SVGTextLayoutEngineSpacing.h:
2425         * style/RenderTreePosition.cpp:
2426         * style/RenderTreePosition.h:
2427         * style/RenderTreeUpdater.h:
2428         * style/StyleFontSizeFunctions.h:
2429         * style/StyleInvalidator.h:
2430         * style/StyleResolveForDocument.h:
2431         * style/StyleScope.h:
2432         * style/StyleTreeResolver.cpp:
2433         * style/StyleTreeResolver.h:
2434         * style/StyleUpdate.h:
2435         * svg/SVGAnimationElement.h:
2436         * svg/SVGFEBlendElement.cpp:
2437         * svg/SVGFEBlendElement.h:
2438         * svg/SVGFEComponentTransferElement.h:
2439         * svg/SVGFEFloodElement.cpp:
2440         * svg/SVGFEFloodElement.h:
2441         * svg/SVGFEImageElement.h:
2442         * svg/SVGFEMergeElement.cpp:
2443         * svg/SVGFEMergeElement.h:
2444         * svg/SVGFEOffsetElement.cpp:
2445         * svg/SVGFEOffsetElement.h:
2446         * svg/SVGFETileElement.cpp:
2447         * svg/SVGFETileElement.h:
2448         * svg/SVGParserUtilities.h:
2449         * svg/SVGPathByteStream.h:
2450         * svg/SVGPathElement.cpp:
2451         * svg/SVGPolyElement.cpp:
2452         * svg/SVGSVGElement.cpp:
2453         * svg/SVGTRefElement.cpp:
2454         * svg/SVGTextPathElement.cpp:
2455         * svg/SVGUseElement.cpp:
2456         * svg/animation/SMILTimeContainer.h:
2457         * svg/graphics/SVGImageCache.h:
2458         * svg/graphics/filters/SVGFilter.h:
2459
2460 2017-06-25  Antoine Quint  <graouts@apple.com>
2461
2462         Remove rAf suspension logging
2463         https://bugs.webkit.org/show_bug.cgi?id=173821
2464
2465         Reviewed by Tim Horton.
2466
2467         Now that webkit.org/b/173628 is fixed, we can remove the logging code we added.
2468
2469         * dom/Document.cpp:
2470         (WebCore::Document::requestAnimationFrame):
2471         * dom/ScriptedAnimationController.cpp:
2472         (WebCore::ScriptedAnimationController::suspend):
2473         (WebCore::ScriptedAnimationController::resume):
2474         * page/Page.cpp:
2475         (WebCore::Page::suspendScriptedAnimations):
2476         (WebCore::Page::resumeScriptedAnimations):
2477         (WebCore::Page::setIsVisibleInternal):
2478         * platform/RuntimeApplicationChecks.h:
2479         * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
2480         (WebCore::MacApplication::isDumpRenderTree): Deleted.
2481
2482 2017-06-24  Sam Weinig  <sam@webkit.org>
2483
2484         [WebIDL] Add complete support for stringifier
2485         https://bugs.webkit.org/show_bug.cgi?id=173724
2486
2487         Reviewed by Darin Adler.
2488
2489         * bindings/scripts/CodeGeneratorJS.pm:
2490         (AddStringifierOperationIfNeeded):
2491         Update AddStringifierOperationIfNeeded to support stringifier on operations and be more
2492         strict about the allowed types. Also copies over all extended attributes to the synthetic
2493         operation.
2494
2495         * bindings/scripts/IDLParser.pm:
2496         (parseInterfaceMember):
2497         (parseOperationOrReadWriteAttributeOrMaplike):
2498         (parseReadOnlyMember):
2499         (parseStringifier):
2500         (parseStaticMember):
2501         (parseAttributeOrOperationForStringifierOrStatic):
2502         (parseReadWriteAttribute):
2503         (parseAttributeRest):
2504         (parseOperation):
2505         (parseSpecialOperation):
2506         (parseMapLikeProperties):
2507         (parseOperationRest):
2508         (parseAttributeOrOperationOrIterator): Deleted.
2509         (parseQualifier): Deleted.
2510         (parseAttributeOrOperationRest): Deleted.
2511         (parseAttribute): Deleted.
2512         (parseOperationOrIterator): Deleted.
2513         - Update parser to more closely resemble the WebIDL grammar, splitting out parseStringifier and
2514           parseStaticMember into their own subroutines. 
2515         - Move those and parseSerializer, parseStringifier, parseStaticMember, parseIterableRest and a split out
2516           parseReadOnlyMembers up into parseInterfaceMember to make it clearer that they are top level members
2517           and match the grammar.
2518         - Rename parseAttributeOrOperationOrIterator to parseOperationOrReadWriteAttributeOrMaplike to match the
2519           grammar language and make it clear what it does.
2520         - Add parseAttributeOrOperationForStringifierOrStatic which contains most of the logic for parsing stringifiers
2521           and static members, which have almost identical grammars.
2522         - Remove creator special which no longer exists in the spec.
2523
2524         * css/DOMMatrixReadOnly.idl:
2525         * css/WebKitCSSMatrix.idl:
2526         * dom/Range.idl:
2527         * html/URLSearchParams.idl:
2528         Fix FIXMEs by switching to use stringifier.
2529
2530         * bindings/scripts/test/JS/JSTestStringifier.cpp: Added.
2531         * bindings/scripts/test/JS/JSTestStringifier.h: Added.
2532         * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp: Added.
2533         * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.h: Added.
2534         * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp: Added.
2535         * bindings/scripts/test/JS/JSTestStringifierNamedOperation.h: Added.
2536         * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp: Added.
2537         * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.h: Added.
2538         * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp: Added.
2539         * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.h: Added.
2540         * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp: Added.
2541         * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.h: Added.
2542         * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp: Added.
2543         * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.h: Added.
2544         * bindings/scripts/test/TestStringifier.idl: Added.
2545         * bindings/scripts/test/TestStringifierAnonymousOperation.idl: Added.
2546         * bindings/scripts/test/TestStringifierNamedOperation.idl: Added.
2547         * bindings/scripts/test/TestStringifierOperationImplementedAs.idl: Added.
2548         * bindings/scripts/test/TestStringifierOperationNamedToString.idl: Added.
2549         * bindings/scripts/test/TestStringifierReadOnlyAttribute.idl: Added.
2550         * bindings/scripts/test/TestStringifierReadWriteAttribute.idl: Added.
2551         Add new tests.
2552
2553 2017-06-24  Chris Fleizach  <cfleizach@apple.com>
2554
2555         AX: Cannot call setValue() on contenteditable or ARIA text controls
2556         https://bugs.webkit.org/show_bug.cgi?id=173520
2557
2558         Reviewed by Ryosuke Niwa.
2559
2560         Add support for changing the value of a contenteditable and any other aria text control in setValue().
2561  
2562         Test: accessibility/mac/set-value-editable-types.html
2563
2564         * accessibility/AccessibilityRenderObject.cpp:
2565         (WebCore::AccessibilityRenderObject::setValue):
2566
2567 2017-06-23  Simon Fraser  <simon.fraser@apple.com>
2568
2569         Attempt to fix an internal build after r218755.
2570
2571         * bindings/js/JSMainThreadExecStateInstrumentation.h:
2572
2573 2017-06-23  Chris Dumez  <cdumez@apple.com>
2574
2575         Add release assertion to make sure callbackIdentifier is not 0 in DocumentLoader::finishedLoadingIcon()
2576         https://bugs.webkit.org/show_bug.cgi?id=173792
2577
2578         Reviewed by Ryosuke Niwa.
2579
2580         Add release assertion to make sure callbackIdentifier is not 0 in DocumentLoader::finishedLoadingIcon()
2581         as this could cause HashTable corruption on WebPageProxy side.
2582
2583         * loader/DocumentLoader.cpp:
2584         (WebCore::DocumentLoader::finishedLoadingIcon):
2585
2586 2017-06-23  Youenn Fablet  <youenn@apple.com>
2587
2588         webrtc::WebRtcSession is not handling correctly its state when setLocalDescription fails and is called again
2589         https://bugs.webkit.org/show_bug.cgi?id=173783
2590
2591         Reviewed by Alex Christensen.
2592
2593         Test: webrtc/libwebrtc/setLocalDescriptionCrash.html
2594
2595         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
2596         (WebCore::LibWebRTCMediaEndpoint::doSetLocalDescription): Fail early if there is no pending remote description and description is for an answer.
2597
2598 2017-06-23  Eric Carlson  <eric.carlson@apple.com>
2599
2600         [MediaStream macOS] enumerateDevices should only return valid audio capture devices
2601         https://bugs.webkit.org/show_bug.cgi?id=173790
2602         <rdar://problem/32260334>
2603
2604         Reviewed by Youenn Fablet.
2605
2606         * platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:
2607         (WebCore::isValidCaptureDevice): A valid device has a name and is not an aggregate device
2608         created by VPIO.
2609         (WebCore::CoreAudioCaptureDeviceManager::refreshAudioCaptureDevices):
2610
2611 2017-06-23  Jer Noble  <jer.noble@apple.com>
2612
2613         [WK2] Support -[WebAVPlayerController setMuted:]
2614         https://bugs.webkit.org/show_bug.cgi?id=173777
2615
2616         Reviewed by Eric Carlson.
2617
2618         Have -[WebAVPlayerController setMuted:] pass the request to its delegate (the model)
2619         rather than just storing the value.
2620
2621         * platform/cocoa/WebPlaybackSessionModel.h:
2622         * platform/cocoa/WebPlaybackSessionModelMediaElement.h:
2623         * platform/cocoa/WebPlaybackSessionModelMediaElement.mm:
2624         (WebCore::WebPlaybackSessionModelMediaElement::toggleMuted):
2625         (WebCore::WebPlaybackSessionModelMediaElement::setMuted):
2626         * platform/ios/WebAVPlayerController.h:
2627         * platform/ios/WebAVPlayerController.mm:
2628         (-[WebAVPlayerController isMuted]):
2629         (-[WebAVPlayerController setMuted:]):
2630         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2631         (WebVideoFullscreenControllerContext::setMuted):
2632
2633 2017-06-23  Frederic Wang  <fwang@igalia.com>
2634
2635         Make RenderLayer::handleTouchEvent use usesAcceleratedScrolling()
2636         https://bugs.webkit.org/show_bug.cgi?id=173763
2637
2638         Reviewed by Simon Fraser.
2639
2640         No new tests, behavior is unchanged.
2641
2642         * rendering/RenderLayer.cpp:
2643         (WebCore::RenderLayer::handleTouchEvent): Call usesAcceleratedScrolling() instead of
2644         hasTouchScrollableOverflow() for clarity.
2645
2646 2017-06-23  Konstantin Tokarev  <annulen@yandex.ru>
2647
2648         Remove excessive headers from WebCore/{bindings,css,dom}
2649         https://bugs.webkit.org/show_bug.cgi?id=173766
2650
2651         Reviewed by Simon Fraser.
2652
2653         No new tests needed.
2654
2655         * ForwardingHeaders/runtime/ThrowScope.h: Added.
2656         * Modules/plugins/QuickTimePluginReplacement.mm:
2657         * bindings/js/CachedScriptSourceProvider.h:
2658         * bindings/js/JSCommandLineAPIHostCustom.cpp:
2659         * bindings/js/JSCustomXPathNSResolver.cpp:
2660         * bindings/js/JSDOMConstructorNotConstructable.h:
2661         * bindings/js/JSDOMConvertBase.h:
2662         * bindings/js/JSDOMConvertBufferSource.h:
2663         * bindings/js/JSDOMConvertInterface.h:
2664         * bindings/js/JSDOMConvertStrings.h:
2665         * bindings/js/JSDOMConvertUnion.h:
2666         * bindings/js/JSDOMConvertVariadic.h:
2667         * bindings/js/JSDOMConvertWebGL.h:
2668         * bindings/js/JSDOMExceptionHandling.h:
2669         * bindings/js/JSDOMIterator.h:
2670         * bindings/js/JSDOMMapLike.h:
2671         * bindings/js/JSDOMWindowBase.cpp:
2672         * bindings/js/JSDOMWindowCustom.cpp:
2673         * bindings/js/JSDOMWindowCustom.h:
2674         * bindings/js/JSDOMWindowProperties.h:
2675         * bindings/js/JSDOMWrapperCache.h:
2676         * bindings/js/JSLazyEventListener.cpp:
2677         * bindings/js/JSMainThreadExecStateInstrumentation.h:
2678         * bindings/js/JSMediaListCustom.h:
2679         * bindings/js/JSNodeCustom.h:
2680         * bindings/js/JSNodeListCustom.h:
2681         * bindings/js/JSVideoTrackListCustom.cpp:
2682         * bindings/js/ScheduledAction.h:
2683         * bindings/js/ScriptSourceCode.h:
2684         * bindings/js/SerializedScriptValue.h:
2685         * bindings/js/WebCoreJSClientData.h:
2686         * css/CSSFontFeatureValue.h:
2687         * css/CSSPrimitiveValue.h:
2688         * css/CSSStyleSheet.h:
2689         * css/CSSValue.h:
2690         * css/StyleBuilderCustom.h:
2691         * dom/ContainerNodeAlgorithms.h:
2692         * dom/DataTransfer.h:
2693         * dom/Node.h:
2694         * dom/NodeRareData.h:
2695         * dom/Position.h:
2696         * dom/RenderedDocumentMarker.h:
2697
2698 2017-06-23  Basuke Suzuki  <Basuke.Suzuki@sony.com>
2699
2700         Fix broken WinCairo build
2701
2702         [Curl] Extract CurlDownloadManager as shared background task handler
2703         https://bugs.webkit.org/show_bug.cgi?id=173557
2704
2705         Reviewed by Joseph Pecoraro.
2706
2707         * platform/network/curl/CurlManager.h:
2708
2709 2017-06-23  Chris Dumez  <cdumez@apple.com>
2710
2711         [iOS] Potential crash under WebCore::notifyLowPowerModeChanged(WebCore::LowPowerModeNotifier*, bool)
2712         https://bugs.webkit.org/show_bug.cgi?id=173755
2713         <rdar://problem/32940942>
2714
2715         Reviewed by Mark Lam.
2716
2717         The crash was happening because the WebLowPowerModeObserver would dispatch
2718         a lambda to the main thread but the LowPowerModeNotifier object could be
2719         dead by the time we get to the main thread.
2720
2721         To address the issue, keep a strong ref to the WebLowPowerModeObserver in
2722         the lambda we dispatch to the main thread to make sure it stays alive until
2723         we execute the lambda. In the LowPowerModeNotifier destructor, we now reset
2724         the WebLowPowerModeObserver's notifier pointer to nil and I added a null
2725         check for this notifier in the lambda.
2726
2727         * platform/LowPowerModeNotifier.cpp:
2728         (WebCore::LowPowerModeNotifier::~LowPowerModeNotifier):
2729         * platform/LowPowerModeNotifier.h:
2730         * platform/ios/LowPowerModeNotifierIOS.mm:
2731         (-[WebLowPowerModeObserver initWithNotifier:]):
2732         (-[WebLowPowerModeObserver _didReceiveLowPowerModeChange]):
2733         (WebCore::LowPowerModeNotifier::LowPowerModeNotifier):
2734         (WebCore::LowPowerModeNotifier::~LowPowerModeNotifier):
2735         (WebCore::notifyLowPowerModeChanged):
2736
2737 2017-06-23  Alex Christensen  <achristensen@webkit.org>
2738
2739         Add SPI to WKURLSchemeTask for redirection
2740         https://bugs.webkit.org/show_bug.cgi?id=173730
2741
2742         Reviewed by Brady Eidson.
2743
2744         * platform/network/CacheValidation.cpp:
2745         (WebCore::computeFreshnessLifetimeForHTTPFamily):
2746         Asserting that redirects are always http/https URLs is no longer valid.
2747         If there's a custom scheme redirect, give it no freshness lifetime in the cache.
2748
2749 2017-06-23  Konstantin Tokarev  <annulen@yandex.ru>
2750
2751         Remove excessive headers from WebCore/{editing,fileapi,history,html,loader,page}
2752         https://bugs.webkit.org/show_bug.cgi?id=173769
2753
2754         Reviewed by Simon Fraser.
2755
2756         No new tests needed.
2757
2758         * css/CSSFontFaceSource.cpp:
2759         * editing/DictationCommand.cpp:
2760         * editing/Editor.h:
2761         * editing/VisiblePosition.h:
2762         * editing/VisibleUnits.h:
2763         * fileapi/BlobBuilder.h:
2764         * history/PageCache.h:
2765         * html/DOMURL.h:
2766         * html/HTMLCollection.h:
2767         * html/HTMLMediaElement.cpp:
2768         * html/HTMLMediaElement.h:
2769         * html/HTMLPlugInImageElement.cpp:
2770         * html/StepRange.h:
2771         * html/canvas/CanvasRenderingContext.h:
2772         * html/canvas/CanvasRenderingContext2D.h:
2773         * html/parser/HTMLDocumentParser.cpp:
2774         * html/parser/HTMLElementStack.h:
2775         * html/parser/HTMLInputStream.h:
2776         * html/shadow/MediaControlElements.cpp:
2777         * html/shadow/MediaControls.cpp:
2778         * html/shadow/MediaControls.h:
2779         * html/track/TrackListBase.h:
2780         * html/track/VTTCue.h:
2781         * html/track/WebVTTParser.cpp:
2782         * html/track/WebVTTParser.h:
2783         * loader/CrossOriginPreflightChecker.cpp:
2784         * loader/DocumentThreadableLoader.cpp:
2785         * loader/FrameLoaderClient.h:
2786         * loader/LinkPreloadResourceClients.h:
2787         * loader/LoadTiming.h:
2788         * loader/ThreadableLoaderClientWrapper.h:
2789         * loader/WorkerThreadableLoader.h:
2790         * loader/cache/CachedResourceLoader.h:
2791         * loader/cache/CachedResourceRequest.h:
2792         * loader/cache/CachedSVGDocument.h:
2793         * loader/cache/CachedTextTrack.h:
2794         * loader/icon/IconLoader.cpp:
2795         * page/AlternativeTextClient.h:
2796         * page/CaptionUserPreferences.cpp:
2797         * page/CaptionUserPreferences.h:
2798         * page/ContextMenuClient.h:
2799         * page/MainFrame.h:
2800         * page/Page.h:
2801         * page/PageGroup.h:
2802         * page/PerformanceEntry.h:
2803         * page/PerformanceResourceTiming.h:
2804         * page/ResourceUsageOverlay.cpp:
2805         * page/ResourceUsageOverlay.h:
2806         * page/UserContentController.h:
2807         * page/UserContentProvider.h:
2808         * page/animation/AnimationBase.h:
2809         * page/animation/CSSPropertyAnimation.h:
2810         * page/animation/CompositeAnimation.h:
2811         * page/scrolling/ScrollingCoordinator.h:
2812         * xml/XSLTProcessorLibxslt.cpp:
2813         * xml/parser/XMLDocumentParserLibxml2.cpp:
2814
2815 2017-06-23  Chris Dumez  <cdumez@apple.com>
2816
2817         [mac-wk1] requestAnimationFrame callbacks may not get serviced
2818         https://bugs.webkit.org/show_bug.cgi?id=173628
2819
2820         Reviewed by Simon Fraser.
2821
2822         Page::setIsVisibleInternal() was firing the 'visibilitychange' event
2823         synchronously while in the middle of updating its visibility/activity
2824         state. This allowed the JavaScript to re-enter the method by calling
2825         testRunner.setPageVisibility() / resetPageVisiblity() and we would
2826         end up in an inconsistent state.
2827
2828         No new tests, extended existing test.
2829
2830         * dom/Document.cpp:
2831         (WebCore::Document::visibilityStateChanged):
2832         Do no fire the visibilitychange event synchronously as we are in the
2833         middle of updating the page's activity state. Instead fire the
2834         event asynchronously.
2835
2836         * page/Page.cpp:
2837         (WebCore::Page::setIsVisibleInternal):
2838         Move the calling of Document::visibilityStateChanged() until after we're
2839         done updating the page's visibility state.
2840
2841         * testing/Internals.cpp:
2842         (WebCore::Internals::scriptedAnimationsAreSuspended):
2843         * testing/Internals.h:
2844         * testing/Internals.idl:
2845         Add test infrastructure to check if scripted animations are suspended.
2846
2847 2017-06-23  Eric Carlson  <eric.carlson@apple.com>
2848
2849         [iOS] Respond to AudioSession interruption and resume
2850         https://bugs.webkit.org/show_bug.cgi?id=173718
2851         <rdar://problem/32925263>
2852
2853         Reviewed by Youenn Fablet.
2854
2855         Tested manually.
2856
2857         * WebCore.xcodeproj/project.pbxproj: Add CoreAudioCaptureSourceIOS.mm/.h
2858
2859         * platform/mediastream/RealtimeMediaSource.h: Make createWeakPtr protected so derived classes
2860         can use it.
2861
2862         * platform/mediastream/ios/CoreAudioCaptureSourceIOS.h: Added.
2863         * platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm: Added.
2864         (-[WebCoreAudioCaptureSourceIOSListener initWithCallback:]):
2865         (-[WebCoreAudioCaptureSourceIOSListener invalidate]):
2866         (-[WebCoreAudioCaptureSourceIOSListener handleInterruption:]):
2867         (-[WebCoreAudioCaptureSourceIOSListener sessionMediaServicesWereReset:]):
2868         (WebCore::CoreAudioCaptureSourceIOS::CoreAudioCaptureSourceIOS):
2869         (WebCore::CoreAudioCaptureSourceIOS::~CoreAudioCaptureSourceIOS):
2870
2871         * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
2872         (WebCore::CoreAudioSharedUnit::suspended): 
2873         (WebCore::CoreAudioSharedUnit::setupAudioUnit): Clear m_suspended.
2874         (WebCore::CoreAudioSharedUnit::suspend): Don't clear sources or uninitialize the audio unit,
2875         suspend is temporary. Set m_suspended.
2876         (WebCore::CoreAudioSharedUnit::resume): New, restart the audio unit.
2877         (WebCore::CoreAudioCaptureSource::create): Create the correct object.
2878         (WebCore::CoreAudioCaptureSource::scheduleReconfiguration): Dispatch to main thread if necessary.
2879         (WebCore::CoreAudioCaptureSource::beginInterruption): New, suspend from main thread.
2880         (WebCore::CoreAudioCaptureSource::endInterruption): New, resume/reconfigure from main thread.
2881         (WebCore::CoreAudioCaptureSource::interrupted):
2882         * platform/mediastream/mac/CoreAudioCaptureSource.h:
2883
2884 2017-06-23  Zan Dobersek  <zdobersek@igalia.com>
2885
2886         [GCrypt] Drop the AES-CFB support
2887         https://bugs.webkit.org/show_bug.cgi?id=173547
2888
2889         Reviewed by Jiewen Tan.
2890
2891         No new tests -- relevant test baselines are updated.
2892
2893         Stop registering the AES-CFB algorithm as something that's supported by
2894         the libgcrypt implementation. This algorithm was previously included in
2895         the Web Crypto API specification, but has since been dropped from it.
2896
2897         Conveniently, libgcrypt only recently gained support for the CFB8 AES
2898         cipher mode that's required by the specification, meaning we could only
2899         support this algorithm with future releases of the libgcrypt library.
2900
2901         * crypto/gcrypt/CryptoAlgorithmRegistryGCrypt.cpp:
2902         (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
2903
2904 2017-06-23  Carlos Garcia Campos  <cgarcia@igalia.com>
2905
2906         [WPE] Enable PUBLIC_SUFFIX_LIST
2907         https://bugs.webkit.org/show_bug.cgi?id=173758
2908
2909         Reviewed by Žan Doberšek.
2910
2911         * PlatformWPE.cmake: Add PublicSuffixSoup.cpp to the build.
2912
2913 2017-06-22  Antti Koivisto  <antti@apple.com>
2914
2915         REGRESSION(r217695): Offscreen/overflowed items not being rendered while translating in-frame
2916         https://bugs.webkit.org/show_bug.cgi?id=173732
2917
2918         Reviewed by Simon Fraser.
2919
2920         If an accelerated animation starts completely outside the view we fail to create backing for it
2921         when it moves into view.
2922
2923         Fix by computing the full extent rect of the animation when it starts and doing the viewport overlap
2924         testing with that.
2925
2926         Test: compositing/backing/transform-transition-from-outside-view.html
2927
2928         * platform/graphics/GraphicsLayer.h:
2929         (WebCore::GraphicsLayer::animationExtent):
2930         (WebCore::GraphicsLayer::setAnimationExtent):
2931         * platform/graphics/ca/GraphicsLayerCA.cpp:
2932         (WebCore::GraphicsLayerCA::computeVisibleAndCoverageRect):
2933
2934             Return the current animation transformation matrix so we can use it elsewhere without recomputing.
2935
2936         (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
2937
2938             If we have animation extent use it instead of bounds for visibility testing.
2939
2940         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
2941
2942             Track if theres is a visible ancestor layer with a transition animation.
2943
2944         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
2945         (WebCore::GraphicsLayerCA::updateCoverage):
2946
2947             For simplicity create backing for all sublayers of a visible transform animated layer.
2948
2949         * platform/graphics/ca/GraphicsLayerCA.h:
2950         (WebCore::GraphicsLayerCA::VisibleAndCoverageRects::VisibleAndCoverageRects): Deleted.
2951         * rendering/RenderLayerBacking.cpp:
2952         (WebCore::RenderLayerBacking::updateGeometry):
2953
2954             Pass the animation extent (including descendants) to GraphicsLayer.
2955
2956 2017-06-22  Chris Dumez  <cdumez@apple.com>
2957
2958         ResourceLoadStatisticsStore should be ThreadSafeRefCounted
2959         https://bugs.webkit.org/show_bug.cgi?id=173753
2960         <rdar://problem/32939326>
2961
2962         Reviewed by Andreas Kling.
2963
2964         ResourceLoadStatisticsStore should be ThreadSafeRefCounted as it is ref'd/deref'd
2965         from different threads.
2966
2967         * loader/ResourceLoadStatisticsStore.h:
2968
2969 2017-06-22  Myles C. Maxfield  <mmaxfield@apple.com>
2970
2971         @font-face rules with invalid primary fonts never download their secondary fonts
2972         https://bugs.webkit.org/show_bug.cgi?id=173138
2973         <rdar://problem/32554450>
2974
2975         Reviewed by Simon Fraser.
2976
2977         We have logic in CSSFontAccessor::font() which disallows downloading a CSSFontFace if that CSSFontFace
2978         is already in the Succeeded state. However, it was possible for a succeeded CSSFontFace to still fail
2979         to create a font. In this situation, we wouldn't be able to use the downloaded font, and we wouldn't
2980         try to download the next item in the src: list because the CSSFontFace is succeeded.
2981
2982         This patch strengthens the meaning of the Succeeded state. Previously, it just meant that the bytes
2983         in the file were downloaded successfully. This patch extends this to also mean that the bytes in the
2984         file can be successfully interpreted as a font. This way, the CSSFontFace in the example above won't be
2985         set to the Succeeded state, so we will continue follow the src: list and download the secondary fonts.
2986
2987         This has an added benefit that the CSS Font Loading API's promises will be called more appropriately.
2988         The transition to the Succeeded state will trigger a resolve of the promise. Now, these promises will
2989         only be resolved if the fonts are actually parsed and understood by our text system.
2990
2991         Test: fast/text/font-fallback-invalid-load.html
2992
2993         * css/CSSFontFaceSource.cpp:
2994         (WebCore::CSSFontFaceSource::fontLoaded): Move to the failed state if we can't understand the font
2995         data. This is the crux of this patch.
2996         (WebCore::CSSFontFaceSource::font): This function should only be called if we are in the Succeeded
2997         state, which means now we know we should always be able to understand the bytes of the file. Therefore,
2998         we can change some if statements into ASSERT()s.
2999         * loader/cache/CachedSVGFont.cpp:
3000         (WebCore::CachedSVGFont::createFont): Ditto.
3001         (WebCore::CachedSVGFont::ensureCustomFontData): Similarly to CSSFontFaceSource::fontLoaded(), this
3002         adds another check to our criteria for transitioning into the Succeeded state, which will guarantee that
3003         later we will always be able to create the font object.
3004
3005 2017-06-22  Andreas Kling  <akling@apple.com>
3006
3007         Rename MemoryPressureHandler::setTabCount to setPageCount
3008         https://bugs.webkit.org/show_bug.cgi?id=173750
3009
3010         Reviewed by Daniel Bates.
3011
3012         * page/Page.cpp:
3013         (WebCore::Page::~Page):
3014
3015 2017-06-22  Antoine Quint  <graouts@apple.com>
3016
3017         Modern media controls localised strings are out of sync with used strings in code
3018         https://bugs.webkit.org/show_bug.cgi?id=173752
3019
3020         Reviewed by Dean Jackson.
3021
3022         Remove strings we no longer use and add strings we use but failed to add previously.
3023
3024         * English.lproj/modern-media-controls-localized-strings.js:
3025
3026 2017-06-22  Antoine Quint  <graouts@apple.com>
3027
3028         Log when scripted animations get suspended and resumed
3029         https://bugs.webkit.org/show_bug.cgi?id=173751
3030
3031         Reviewed by Dean Jackson.
3032
3033         More work toward understanding why rAF callbacks are not serviced on bots (webkit.org/b/173628).
3034
3035         * dom/Document.cpp:
3036         (WebCore::Document::requestAnimationFrame):
3037         * dom/ScriptedAnimationController.cpp:
3038         (WebCore::ScriptedAnimationController::suspend):
3039         (WebCore::ScriptedAnimationController::resume):
3040         (WebCore::ScriptedAnimationController::logSuspendCount): Deleted.
3041         * dom/ScriptedAnimationController.h:
3042         * page/Page.cpp:
3043         (WebCore::Page::suspendScriptedAnimations):
3044         (WebCore::Page::resumeScriptedAnimations):
3045         (WebCore::Page::setIsVisibleInternal):
3046
3047 2017-06-22  Zalan Bujtas  <zalan@apple.com>
3048
3049         REGRESSION(r214712): Infinite recursion in RenderTable::layout in paginated mode
3050         https://bugs.webkit.org/show_bug.cgi?id=173731
3051         <rdar://problem/32237775>
3052
3053         Reviewed by Antti Koivisto.
3054
3055         We should just skip bottom captions to check if section is moved, since they don't affect
3056         the section position (bottom <caption> is preceded by <tfoot>).
3057
3058         Test: fast/table/caption-bottom-with-pagination.html
3059
3060         * rendering/RenderTable.cpp:
3061         (WebCore::RenderTable::layout):
3062
3063 2017-06-22  Dean Jackson  <dino@apple.com>
3064
3065         REGRESSION (r215809): 50% regression 14E305 -> 15A293a in MotionMark Suits test
3066         https://bugs.webkit.org/show_bug.cgi?id=173728
3067         <rdar://problem/32526744>
3068
3069         Reviewed by Tim Horton.
3070
3071         It turns out that CGGradientCreateWithColors is much slower than
3072         CGGradientCreateWithColorComponents, even without colorspace variations.
3073         Update the gradient creation code to only use this slower path
3074         when it has extended colors.
3075
3076         * platform/graphics/Color.h: Add a FIXME about renaming some methods.
3077         * platform/graphics/cg/GradientCG.cpp: Use CGGradientCreateWithColorComponents
3078         if we have stops that are not extended colors.
3079         (WebCore::Gradient::platformGradient):
3080
3081 2017-06-22  Youenn Fablet  <youenn@apple.com>
3082
3083         Fix memory leak in LibWebRTCMediaEndpoint
3084         https://bugs.webkit.org/show_bug.cgi?id=173717
3085
3086         Reviewed by Eric Carlson.
3087
3088         No chnage of behavior.
3089         Making sure SessionDescription pointer get properly released.
3090
3091         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
3092         (WebCore::LibWebRTCMediaEndpoint::createSessionDescriptionSucceeded):
3093         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
3094         * testing/MockLibWebRTCPeerConnection.cpp: Allocating description.
3095
3096 2017-06-22  Daniel Bates  <dabates@apple.com>
3097
3098         Make FrameLoadRequest a move-only type
3099         https://bugs.webkit.org/show_bug.cgi?id=173682
3100
3101         Reviewed by Alex Christensen and Darin Adler.
3102
3103         A FrameLoadRequest groups together the information to perform a load into a single object
3104         that is more manageable to pass around than its constituent parts. Code that receives a
3105         FrameLoadRequest is expected to extract out the information it needs to complete its task.
3106         And it does not make sense to re-use the same FrameLoadRequest object for more than one
3107         load. Therefore, it is sufficient to make FrameLoadRequest a move-only type.
3108
3109         * inspector/InspectorFrontendClientLocal.cpp:
3110         (WebCore::InspectorFrontendClientLocal::openInNewTab):
3111         * inspector/InspectorPageAgent.cpp:
3112         (WebCore::InspectorPageAgent::navigate):
3113         * loader/FrameLoadRequest.h:
3114         * loader/FrameLoader.cpp:
3115         (WebCore::FrameLoader::changeLocation):
3116         (WebCore::FrameLoader::urlSelected):
3117         (WebCore::FrameLoader::loadURLIntoChildFrame):
3118         (WebCore::FrameLoader::loadFrameRequest):
3119         (WebCore::FrameLoader::loadURL):
3120         (WebCore::FrameLoader::load):
3121         (WebCore::FrameLoader::loadPostRequest):
3122         (WebCore::createWindow):
3123         * loader/FrameLoader.h:
3124         * loader/NavigationScheduler.cpp:
3125         (WebCore::NavigationScheduler::scheduleLocationChange):
3126         * page/ContextMenuController.cpp:
3127         (WebCore::openNewWindow):
3128         (WebCore::ContextMenuController::contextMenuItemSelected):
3129         * page/DOMWindow.cpp:
3130         (WebCore::DOMWindow::createWindow):
3131         * replay/UserInputBridge.cpp:
3132         (WebCore::UserInputBridge::loadRequest):
3133         * replay/UserInputBridge.h:
3134
3135 2017-06-22  Jer Noble  <jer.noble@apple.com>
3136
3137         REGRESSION (r217223): [iOS] Video keeps playing after application is backgrounded
3138         https://bugs.webkit.org/show_bug.cgi?id=173727
3139
3140         Reviewed by Eric Carlson.
3141
3142         Only override media element visibility if it is in picture-in-picture mode (not fullscreen generally).
3143
3144         * html/HTMLMediaElement.cpp:
3145         (WebCore::HTMLMediaElement::visibilityStateChanged):
3146
3147 2017-06-22  Joseph Pecoraro  <pecoraro@apple.com>
3148
3149         Follow-up to r218662. Only log backtraces for DumpRenderTree.
3150
3151         Rubber-stamped by Antoine Quint.
3152
3153         * dom/ScriptedAnimationController.cpp:
3154         (WebCore::ScriptedAnimationController::logSuspendCount):
3155
3156 2017-06-22  Charlie Turner  <cturner@igalia.com>
3157
3158         [GTK] Spreaker live shows won't play
3159         https://bugs.webkit.org/show_bug.cgi?id=173306
3160
3161         Reviewed by Xabier Rodriguez-Calvar.
3162
3163         This was due to removing the code that negotiated caps for Icecast
3164         streams based on the response headers in r191947. The problem is that
3165         the typefind element can sometimes squint hard enough and see an MP3
3166         stream and attempt to play it, resulting in garbled audio playback. More
3167         commonly typefind fails to recognize the Icecast stream and bails,
3168         resulting in no playback at all.
3169
3170         r191947 also removed the emission of metadata into the pipeline. This
3171         patch also leaves that out since we have no use for it within WebKit.
3172
3173         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
3174         (StreamingClient::handleResponseReceived):
3175
3176 2017-06-22  Matt Lewis  <jlewis3@apple.com>
3177
3178         Unreviewed, rolling out r218633.
3179
3180         The test is failing frequently on Sierra Debug and Windows
3181
3182         Reverted changeset:
3183
3184         "AX: Cannot call setValue() on contenteditable or ARIA text
3185         controls"
3186         https://bugs.webkit.org/show_bug.cgi?id=173520
3187         http://trac.webkit.org/changeset/218633
3188
3189 2017-06-22  Romain Bellessort  <romain.bellessort@crf.canon.fr>
3190
3191         [Readable Streams API] Implement ReadableStreamBYOBReader read()
3192         https://bugs.webkit.org/show_bug.cgi?id=172714
3193
3194         Reviewed by Youenn Fablet.
3195
3196         Implemented read() method of ReadableStreamBYOBReader [1]. Also added code related 
3197         to BYOB features that were previously described as FIXMEs and that now become reachable.
3198
3199         In addition, WPT tests that involve read() have allowed to identify 2 bugs not directly 
3200         related to read() (172716 and 172717). They will be fixed distinctly. Once done, all WPT
3201         tests should pass.
3202
3203         [1] https://streams.spec.whatwg.org/#byob-reader-read
3204
3205         WPT tests (web-platform-tests/streams/readable-byte-streams/general.js) already cover
3206         most cases for read() usage. Corresponding expectations have been updated. In addition,
3207         1 test has been added to WebKit tests (in streams/readable-stream-byob-reader.js) to 
3208         check that read() can only be applied to a ReadableStreamBYOBReader.
3209
3210         * Modules/streams/ReadableByteStreamInternals.js:
3211         (readableByteStreamControllerClearPendingPullIntos): Implemented.
3212         (readableByteStreamControllerEnqueue): Updated with support for BYOBReader.
3213         (readableByteStreamControllerPullInto): Added.
3214         (readableStreamAddReadIntoRequest): Added.
3215         * Modules/streams/ReadableStreamBYOBReader.js:
3216         (read): Added.
3217
3218 2017-06-22  Youenn Fablet  <youenn@apple.com>
3219
3220         [WebRTC] Prevent capturing at unconventional resolutions when using the SW encoder on Mac
3221         https://bugs.webkit.org/show_bug.cgi?id=172602
3222         <rdar://problem/32407693>
3223
3224         Reviewed by Eric Carlson.
3225
3226         Test: platform/mac/webrtc/captureCanvas-webrtc-software-encoder.html
3227
3228         Add internal API to switch on/off hardware H264 encoder.
3229         Add checks for standard size. If using a software encoder and frame size is not standard,
3230         the session is destroyed and no frame is sent at all.
3231
3232         Added tests based on captureStream.
3233         Fixed the case of capturing a canvas which size is changing.
3234
3235         * Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:
3236         (WebCore::CanvasCaptureMediaStreamTrack::Source::canvasResized):
3237         * platform/mediastream/libwebrtc/H264VideoToolBoxEncoder.h:
3238         * platform/mediastream/libwebrtc/H264VideoToolBoxEncoder.mm:
3239         (WebCore::H264VideoToolboxEncoder::setHardwareEncoderForWebRTCAllowed):
3240         (WebCore::H264VideoToolboxEncoder::hardwareEncoderForWebRTCAllowed):
3241         (WebCore::isUsingSoftwareEncoder):
3242         (WebCore::H264VideoToolboxEncoder::CreateCompressionSession):
3243         (isStandardFrameSize): Added.
3244         (isUsingSoftwareEncoder): Added.
3245         * testing/Internals.cpp:
3246         (WebCore::Internals::setH264HardwareEncoderAllowed):
3247         * testing/Internals.h:
3248         * testing/Internals.idl:
3249
3250 2017-06-21  Youenn Fablet  <youenn@apple.com>
3251
3252         [Fetch API] TypeError when called with body === {}
3253         https://bugs.webkit.org/show_bug.cgi?id=173295
3254         <rdar://problem/32746733>
3255
3256         Reviewed by Sam Weinig.
3257
3258         Test: fetch/body-init.html
3259
3260         Handling body of Request and Response using binding generator to correctly handle unions.
3261         The biggest change is that any value that is not a specific type in the union will match a String.
3262         This is matching WebIDL spec and Firefox behavior.
3263
3264         Handling of ReadableStream bodies remains in JS builtin for Response.
3265         This allows easier handling cloning and consumption of body.
3266         Adding setBodyAsReadableStream since this is no longer handled by extractBody.
3267
3268         * Modules/fetch/FetchBody.cpp:
3269         (WebCore::FetchBody::extract): Using Variant instead of JSC::JSValue.
3270         (WebCore::FetchBody::readableStreamBody): Introduced to handle the
3271         case of readable stream bodies.
3272         * Modules/fetch/FetchBody.h:
3273         * Modules/fetch/FetchBodyOwner.cpp:
3274         (WebCore::FetchBodyOwner::extractBody):
3275         * Modules/fetch/FetchBodyOwner.h:
3276         (WebCore::FetchBodyOwner::setBody):
3277         * Modules/fetch/FetchRequest.cpp:
3278         (WebCore::FetchRequest::setBody): Splitting setBody for ease of readability.
3279         (WebCore::FetchRequest::setBodyFromInputRequest):
3280         * Modules/fetch/FetchRequest.h:
3281         * Modules/fetch/FetchRequest.idl:
3282         * Modules/fetch/FetchRequest.js:
3283         (initializeFetchRequest):
3284         * Modules/fetch/FetchResponse.cpp:
3285         (WebCore::FetchResponse::initializeWith):
3286         (WebCore::FetchResponse::setBodyAsReadableStream):
3287         * Modules/fetch/FetchResponse.h:
3288         * Modules/fetch/FetchResponse.idl:
3289         * Modules/fetch/FetchResponse.js:
3290         (initializeFetchResponse):
3291         * WebCore.xcodeproj/project.pbxproj:
3292         * bindings/js/WebCoreBuiltinNames.h:
3293
3294 2017-06-21  Simon Fraser  <simon.fraser@apple.com>
3295
3296         Add z-index to compositing logging output
3297         https://bugs.webkit.org/show_bug.cgi?id=173684
3298
3299         Reviewed by Zalan Bujtas.
3300
3301         Show z-index, which is often useful to find negative z-index items.
3302
3303         Log "+foreground" rather than "foreground" to indicate that this layer has an
3304         additional foreground/background layer, and fix spacing.
3305
3306         * rendering/RenderLayerCompositor.cpp:
3307         (WebCore::RenderLayerCompositor::logLayerInfo):
3308
3309 2017-06-21  Chris Dumez  <cdumez@apple.com>
3310
3311         Unreviewed, fix Window Debug build after r218660.
3312
3313         * rendering/SimpleLineLayout.cpp:
3314         (WebCore::SimpleLineLayout::canUseForWithReason):
3315
3316 2017-06-21  Andreas Kling  <akling@apple.com>
3317
3318         Increase memory kill limits for WebContent processes that manage multiple tabs.
3319         https://bugs.webkit.org/show_bug.cgi?id=173674
3320
3321         Reviewed by Geoffrey Garen.
3322
3323         Plumb the non-utility Page count down to WTF::MemoryPressureHandler.
3324
3325         * page/Page.cpp:
3326         (WebCore::Page::Page):
3327         (WebCore::Page::~Page):
3328
3329 2017-06-21  Jiewen Tan  <jiewen_tan@apple.com>
3330
3331         [WebCrypto] Restore ordering of CryptoAlgorithmIdentifier in SerializedScriptValue
3332         https://bugs.webkit.org/show_bug.cgi?id=173678
3333         <rdar://problem/32879314>
3334
3335         Reviewed by Sam Weinig.
3336
3337         r218030 reorders the ordering of CryptoAlgorithmIdentifier in SerializedScriptValue,
3338         which introduces backward compatibility issues with CryptoKey objects stored in the
3339         IndexedDB. Hence, we should restore it back.
3340
3341         No tests.
3342
3343         * bindings/js/SerializedScriptValue.cpp:
3344
3345 2017-06-21  Daniel Bates  <dabates@apple.com>
3346
3347         Change FrameLoadRequest from a struct to a class
3348
3349         FrameLoadRequest is underutilizing the purpose of a struct - default visibility of
3350         members is public, as FrameLoadRequest explicitly groups its members under public:
3351         or private: sections. Maybe in the future we can make FrameLoadRequest a struct
3352         with only public members. For now, we should consider FrameLoadRequest a class.
3353
3354         * loader/FormSubmission.h:
3355         * loader/FrameLoadRequest.h:
3356         * loader/FrameLoader.h:
3357         * page/Chrome.h:
3358         * page/ChromeClient.h:
3359         * replay/UserInputBridge.h:
3360
3361 2017-06-21  Daewoong Jang  <daewoong.jang@navercorp.com>
3362
3363         Compiler error while building with !HAVE(ACCESSIBILITY)
3364         https://bugs.webkit.org/show_bug.cgi?id=173670
3365
3366         Reviewed by Chris Fleizach.
3367
3368         * accessibility/AXObjectCache.h:
3369         (WebCore::AXObjectCache::getOrCreate):
3370         (WebCore::AXObjectCache::childrenChanged):
3371
3372 2017-06-21  Antoine Quint  <graouts@apple.com>
3373
3374         Build fix.
3375
3376         Reviewed by Tim "Mr. T" Horton.
3377
3378         * dom/ScriptedAnimationController.cpp:
3379         (WebCore::ScriptedAnimationController::logSuspendCount):
3380         * page/Page.cpp:
3381         (WebCore::Page::suspendScriptedAnimations):
3382         (WebCore::Page::resumeScriptedAnimations):
3383
3384 2017-06-21  Antoine Quint  <graouts@apple.com>
3385
3386         Ensure DRT always logs rAF suspension debugging code
3387         https://bugs.webkit.org/show_bug.cgi?id=173681
3388
3389         Reviewed by Tim "Mr. T" Horton.
3390
3391         Instead of using a setting to check whether we should log information related to rAF
3392         callbacks being suspended with WK1, we now check whether we're using in DRT to avoid
3393         any potential issue with settings being in the incorrect state when a test is run.
3394
3395         * dom/ScriptedAnimationController.cpp:
3396         (WebCore::ScriptedAnimationController::logSuspendCount):
3397         * page/Page.cpp:
3398         (WebCore::Page::suspendScriptedAnimations):
3399         (WebCore::Page::resumeScriptedAnimations):
3400         * page/Settings.in:
3401         * platform/RuntimeApplicationChecks.h:
3402         * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
3403         (WebCore::MacApplication::isDumpRenderTree):
3404
3405 2017-06-21  Chris Dumez  <cdumez@apple.com>
3406
3407         Allow constructing a WTF:Function from a function pointer
3408         https://bugs.webkit.org/show_bug.cgi?id=173660
3409
3410         Reviewed by Alex Christensen.
3411
3412         Construct WTF:Function directly from a function pointer when possible
3413         instead of constructing a lambda to do so.
3414
3415         * Modules/encryptedmedia/InitDataRegistry.cpp:
3416         (WebCore::InitDataRegistry::InitDataRegistry):
3417         * page/Page.cpp:
3418         * page/mac/PageMac.mm:
3419         (WebCore::Page::platformInitialize):
3420         * platform/cf/MainThreadSharedTimerCF.cpp:
3421         (WebCore::setupPowerObserver):
3422         * platform/mac/WebCoreNSURLExtras.mm:
3423         * rendering/SimpleLineLayout.cpp:
3424         (WebCore::SimpleLineLayout::canUseForWithReason):
3425         * workers/Worker.cpp:
3426         (WebCore::Worker::Worker):
3427
3428 2017-06-21  Antoine Quint  <graouts@apple.com>
3429
3430         CSS text properties affect <video> shadow root
3431         https://bugs.webkit.org/show_bug.cgi?id=173664
3432         <rdar://problem/32904328>
3433
3434         Reviewed by Dean Jackson.
3435
3436         Ensure that we reset all inheritable styles back to their initial value for media shadow roots.
3437
3438         Test: media/modern-media-controls/time-label/time-label-inherited-text-indent.html
3439
3440         * Modules/modern-media-controls/controls/media-controls.css:
3441         (.media-controls-container):
3442
3443 2017-06-20  Simon Fraser  <simon.fraser@apple.com>
3444
3445         Remove WILL_REVEAL_EDGE_EVENTS code
3446         https://bugs.webkit.org/show_bug.cgi?id=173632
3447
3448         Reviewed by Sam Weinig, Beth Dakin.
3449
3450         Remove will-reveal-edge events, which never took off.
3451
3452         * dom/Document.cpp:
3453         (WebCore::Document::clearScriptedAnimationController):
3454         (WebCore::Document::sendWillRevealEdgeEventsIfNeeded): Deleted.
3455         * dom/Document.h:
3456         * dom/GlobalEventHandlers.idl: