0b2a95fcc4a2b4dcf5c277d5ccce145d4e4fdc1d
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2018-09-13  Fujii Hironori  <Hironori.Fujii@sony.com>
2
3         Remove the workaround for friend class LazyNeverDestroyed<X> statements for MSVC
4         https://bugs.webkit.org/show_bug.cgi?id=189576
5
6         Reviewed by Alex Christensen.
7
8         Old MSVC can't compile "friend class LazyNeverDestroyed<X>"
9         statements, but "friend LazyNeverDestroyed<X>".
10
11         No new tests (No behavior change).
12
13         * css/CSSInheritedValue.h: Removed the code for COMPILER(MSVC).
14         Removed 'class' keyword in "friend class LazyNeverDestroyed<X>"
15         statement.
16         * css/CSSInitialValue.h: Ditto.
17         * css/CSSPrimitiveValue.h: Ditto.
18         * css/CSSRevertValue.h: Ditto.
19         * css/CSSUnsetValue.h: Ditto.
20
21 2018-09-13  Ms2ger  <Ms2ger@igalia.com>
22
23         [GLib] Fix format string in KeyedEncoderGlib::beginObject().
24         https://bugs.webkit.org/show_bug.cgi?id=189585
25
26         Reviewed by Michael Catanzaro.
27
28         This appears to fix the following assertion locally:
29
30         GLib-CRITICAL **: g_variant_builder_add_value: assertion '!GVSB(builder)->expected_type || g_variant_is_of_type (value, GVSB(builder)->expected_type)' failed
31
32         Covered by existing tests.
33
34         * platform/glib/KeyedEncoderGlib.cpp:
35         (WebCore::KeyedEncoderGlib::beginObject):
36
37 2018-09-13  Ryan Haddad  <ryanhaddad@apple.com>
38
39         Unreviewed, rolling out r235953.
40
41         Caused layout test crashes under GuardMalloc.
42
43         Reverted changeset:
44
45         "Make GraphicsLayers ref-counted, so their tree can persist
46         when disconnected from RenderLayerBackings"
47         https://bugs.webkit.org/show_bug.cgi?id=189521
48         https://trac.webkit.org/changeset/235953
49
50 2018-09-13  Fujii Hironori  <Hironori.Fujii@sony.com>
51
52         Remove a MSVC workaround in XPath::Step::NodeTest
53         https://bugs.webkit.org/show_bug.cgi?id=189578
54
55         Reviewed by Alex Christensen.
56
57         XPath::Step::NodeTest has a special code for MSVC bug workaround.
58         It has been introduced in 5 years ago in Bug 121082 Comment 19.
59
60         I think it is safe just to remove the workaround.
61
62         No new tests (No behavior change).
63
64         * xml/XPathStep.h: Removed the MSVC workaround.
65
66 2018-09-13  Fujii Hironori  <Hironori.Fujii@sony.com>
67
68         Remove a MSVC workaround in InspectorStyle::styleWithProperties
69         https://bugs.webkit.org/show_bug.cgi?id=189577
70
71         Reviewed by Alex Christensen.
72
73         No new tests (No behavior change).
74
75         * inspector/InspectorStyleSheet.cpp:
76         (WebCore::InspectorStyle::styleWithProperties const): Use 'auto' for the type of 'status'.
77
78 2018-09-13  Alex Christensen  <achristensen@webkit.org>
79
80         Use a Variant instead of a union in CSSSelector
81         https://bugs.webkit.org/show_bug.cgi?id=188559
82
83         Reviewed by Antti Koivisto.
84
85         No change in behavior. This just makes some of the existing problems more obvious and easy to fix.
86
87         I moved m_caseInsensitiveAttributeValueMatching to RareData because it's only used with RareData.
88         I only have m_isForPage when assertions are enabled because it's only used for an assertion.
89         The rest is pretty straightforward translating union syntax to Variant syntax.
90         I use RefPtr for now where I could use Ref because it's never null to make copying easier, but that's temporary.
91
92         * css/CSSSelector.cpp:
93         (WebCore::CSSSelector::CSSSelector):
94         (WebCore::CSSSelector::createRareData):
95         (WebCore::CSSSelector::setAttribute):
96         (WebCore::CSSSelector::setArgument):
97         (WebCore::CSSSelector::setLangArgumentList):
98         (WebCore::CSSSelector::setSelectorList):
99         (WebCore::CSSSelector::setNth):
100         (WebCore::CSSSelector::matchNth const):
101         (WebCore::CSSSelector::nthA const):
102         (WebCore::CSSSelector::nthB const):
103         (WebCore::CSSSelector::RareData::RareData):
104         * css/CSSSelector.h:
105         (WebCore::CSSSelector::argument const):
106         (WebCore::CSSSelector::langArgumentList const):
107         (WebCore::CSSSelector::selectorList const):
108         (WebCore::CSSSelector::attribute const):
109         (WebCore::CSSSelector::attributeCanonicalLocalName const):
110         (WebCore::CSSSelector::setValue):
111         (WebCore::CSSSelector::CSSSelector):
112         (WebCore::CSSSelector::~CSSSelector):
113         (WebCore::CSSSelector::tagQName const):
114         (WebCore::CSSSelector::tagLowercaseLocalName const):
115         (WebCore::CSSSelector::value const):
116         (WebCore::CSSSelector::serializingValue const):
117         (WebCore::CSSSelector::attributeValueMatchingIsCaseInsensitive const):
118         (WebCore::CSSSelector::RareData::create): Deleted.
119         * css/parser/CSSParserImpl.cpp:
120         (WebCore::CSSParserImpl::parsePageSelector):
121         * css/parser/CSSParserSelector.h:
122
123 2018-09-13  Fujii Hironori  <Hironori.Fujii@sony.com>
124
125         [Win][Clang] error: type 'float' cannot be narrowed to 'LONG' (aka 'long') in initializer list in WheelEventWin.cpp
126         https://bugs.webkit.org/show_bug.cgi?id=189575
127
128         Reviewed by Alex Christensen.
129
130         No new tests (No behavior change).
131
132         * platform/win/WheelEventWin.cpp:
133         (WebCore::PlatformWheelEvent::PlatformWheelEvent): Use flooredIntPoint to convert FloatPoint to POINT.
134
135 2018-09-13  Youenn Fablet  <youenn@apple.com>
136
137         Introduce RTCRtpSendParameters
138         https://bugs.webkit.org/show_bug.cgi?id=189563
139
140         Reviewed by Eric Carlson.
141
142         Introduce RTCRtpSendParameters to match the WebRTC specification.
143         Split RTCRtpPrameters fields accordingly and update call sites.
144
145         Covered by updated test.
146
147         * CMakeLists.txt:
148         * DerivedSources.make:
149         * Modules/mediastream/PeerConnectionBackend.h:
150         * Modules/mediastream/RTCRtpCodingParameters.h: Added
151         * Modules/mediastream/RTCRtpCodingParameters.idl: Added
152         * Modules/mediastream/RTCRtpDecodingParameters.h: Added
153         * Modules/mediastream/RTCRtpDecodingParameters.idl: Added
154         * Modules/mediastream/RTCRtpEncodingParameters.h:
155         * Modules/mediastream/RTCRtpEncodingParameters.idl:
156         * Modules/mediastream/RTCRtpParameters.h:
157         * Modules/mediastream/RTCRtpParameters.idl:
158         * Modules/mediastream/RTCRtpReceiver.cpp:
159         * Modules/mediastream/RTCRtpSendParameters.h: Added.
160         (WebCore::RTCRtpSendParameters::RTCRtpSendParameters):
161         * Modules/mediastream/RTCRtpSendParameters.idl: Added.
162         * Modules/mediastream/RTCRtpSender.cpp:
163         (WebCore::RTCRtpSender::getParameters):
164         (WebCore::RTCRtpSender::setParameters):
165         * Modules/mediastream/RTCRtpSender.h:
166         * Modules/mediastream/RTCRtpSender.idl:
167         * Modules/mediastream/RTCRtpSenderBackend.h:
168         * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp:
169         (WebCore::LibWebRTCRtpSenderBackend::getParameters const):
170         (WebCore::LibWebRTCRtpSenderBackend::setParameters):
171         * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h:
172         * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
173         (WebCore::toRTCRtpParameters):
174         (WebCore::toRTCRtpSendParameters):
175         (WebCore::fromRTCRtpSendParameters):
176         * Modules/mediastream/libwebrtc/LibWebRTCUtils.h:
177         * Sources.txt:
178         * WebCore.xcodeproj/project.pbxproj:
179
180 2018-09-13  Xabier Rodriguez Calvar  <calvaris@igalia.com>
181
182         [GStreamer][EME] decrypt-key-needed message renamed to drm-cdm-instance-needed
183         https://bugs.webkit.org/show_bug.cgi?id=189547
184
185         Reviewed by Philippe Normand.
186
187         decrypt-key-needed message renamed to drm-cdm-instance-needed.
188
189         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
190         (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Apart from
191         renaming the message, removed the class prefix for
192         dispatchCDMInstance.
193         * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
194         (webkitMediaCommonEncryptionDecryptTransformInPlace):
195
196 2018-09-11  Ryosuke Niwa  <rniwa@webkit.org>
197
198         imported/w3c/web-platform-tests/shadow-dom/form-control-form-attribute.html hits assertion
199         https://bugs.webkit.org/show_bug.cgi?id=189493
200
201         Reviewed by Alex Christensen.
202
203         The debug assertion was caused by RefPtr in FormAssociatedElement::formOwnerRemovedFromTree introduced
204         by r224390 and r223644 ref'ing ShadowRoot while calling removeDetachedChildren inside ~ShadowRoot.
205         When a form (or any other) element has more than one ref inside removeDetachedChildren,
206         addChildNodesToDeletionQueue calls notifyChildNodeRemoved in the tree oreder.
207
208         However, when a form associated element of this form element appears later in the tree order,
209         FormAssociatedElement::formOwnerRemovedFromTree can traverse up ancestors including the ShadowRoot.
210
211         Fixed the bug by using raw pointers instead. Luckily, there is no DOM mutations or other non-trivial
212         operations happening in this function so this should be safe.
213
214         Test: imported/w3c/web-platform-tests/shadow-dom/form-control-form-attribute.html
215
216         * html/FormAssociatedElement.cpp:
217         (WebCore::FormAssociatedElement::formOwnerRemovedFromTree): Fixed the bug.
218
219 2018-09-12  Dan Bernstein  <mitz@apple.com>
220
221         [Cocoa] Complete support for Paste as Quotation
222         https://bugs.webkit.org/show_bug.cgi?id=189504
223
224         Reviewed by Wenson Hsieh.
225
226         Tests: editing/pasteboard/4930986-1-paste-as-quotation.html
227                editing/pasteboard/4930986-2-paste-as-quotation.html
228                editing/pasteboard/4930986-3-paste-as-quotation.html
229
230         * editing/Editor.cpp:
231           Added ClipboardEventKind::PasteAsQuotation.
232         (WebCore::eventNameForClipboardEvent): Map PasteAsQuotation to the "paste" DOM event name.
233         (WebCore::createDataTransferForClipboardEvent): Place the unquoted content in the event.
234           This means that currently event handlers can’t emulate pasting as quotation, because they
235           neither have the quoted content nor knowledge that quoting has been requested. We could
236           change this in the future if needed.
237         (WebCore::Editor::paste): Updated for change in pasteWithPasteboard’s argument type.
238         (WebCore::Editor::pasteAsQuotation): Added. Similar to paste, but passes
239           PasteOption::AsQuotation to pasteWithPasteboard.
240         (WebCore::Editor::quoteFragmentForPasting): Added. Quoting for pasting consists of enclosing
241           the fragment in a blockquote element with the "type" attribute set to "cite" and the
242           "class" attribute set to a well-known value, which is used to trigger special behavior in
243           ReplaceSelectionCommand. The behavior includes removing the "class" attribute in the end,
244           so eventually, we could stop using this form of in-band signaling.
245         * editing/Editor.h: Declared PasteOption enum class to encompass the existing allowPlainText
246           and MailBlockquoteHandling arguments to pasteWithPasteboard as well as the new AsQuotation
247           behavior.
248
249         * editing/EditorCommand.cpp:
250         (WebCore::executePasteAsQuotation): Added. Similar to executing Paste.
251         (WebCore::createCommandMap): Added an entry for PasteAsQuotation, based on the Paste entry.
252
253         * editing/cocoa/EditorCocoa.mm:
254         (WebCore::Editor::webContentFromPasteboard): Moved from EditorIOS.mm and EditorMac.mm to
255           here.
256
257         * editing/gtk/EditorGtk.cpp:
258         (WebCore::Editor::pasteWithPasteboard): Updated for new OptionSet argument, added a call to
259           quote the fragment if needed.
260
261         * editing/ios/EditorIOS.mm:
262         (WebCore::Editor::pasteWithPasteboard): Ditto.
263         (WebCore::Editor::webContentFromPasteboard): Moved to EditorCocoa.mm.
264
265         * editing/mac/EditorMac.mm:
266         (WebCore::Editor::pasteWithPasteboard): Updated for new OptionSet argument, added a call to
267           quote the fragment if needed.
268         (WebCore::Editor::readSelectionFromPasteboard): Updated for new OptionSet argument to
269           pasteWithPasteboard.
270         (WebCore::Editor::webContentFromPasteboard): Moved to EditorCocoa.mm.
271
272         * editing/win/EditorWin.cpp:
273         (WebCore::Editor::pasteWithPasteboard): Updated for new OptionSet argument, added a call to
274           quote the fragment if needed.
275
276         * editing/wpe/EditorWPE.cpp:
277         (WebCore::Editor::pasteWithPasteboard): Ditto.
278
279 2018-09-11  Simon Fraser  <simon.fraser@apple.com>
280
281         Make GraphicsLayers ref-counted, so their tree can persist when disconnected from RenderLayerBackings
282         https://bugs.webkit.org/show_bug.cgi?id=189521
283
284         Reviewed by Tim Horton.
285         
286         Make GraphicsLayer be RefCounted<GraphicsLayer>. GraphicsLayers own their children, via a Vector<Ref<GraphicsLayer>>.
287         
288         RenderLayerBacking and other holders of GraphicsLayers use RefPtr<GraphicsLayer>.
289         
290         All the other changes are just to adapt to the new ownership patterns.
291         
292         I verified that no GraphicsLayers were leaked or abandoned after this change.
293
294         No behavior change.
295
296         * page/PageOverlayController.cpp:
297         (WebCore::PageOverlayController::layerWithDocumentOverlays):
298         (WebCore::PageOverlayController::layerWithViewOverlays):
299         (WebCore::PageOverlayController::installPageOverlay):
300         (WebCore::PageOverlayController::uninstallPageOverlay):
301         (WebCore::PageOverlayController::setPageOverlayNeedsDisplay):
302         (WebCore::PageOverlayController::didChangeViewSize):
303         (WebCore::PageOverlayController::didChangeDocumentSize):
304         (WebCore::PageOverlayController::didChangeSettings):
305         (WebCore::PageOverlayController::paintContents):
306         (WebCore::PageOverlayController::didChangeOverlayFrame):
307         (WebCore::PageOverlayController::didChangeOverlayBackgroundColor):
308         * page/PageOverlayController.h:
309         * page/mac/ServicesOverlayController.h:
310         (WebCore::ServicesOverlayController::Highlight::layer const):
311         * page/mac/ServicesOverlayController.mm:
312         (WebCore::ServicesOverlayController::Highlight::Highlight):
313         (WebCore::ServicesOverlayController::Highlight::invalidate):
314         (WebCore::ServicesOverlayController::Highlight::fadeIn):
315         (WebCore::ServicesOverlayController::Highlight::fadeOut):
316         (WebCore::ServicesOverlayController::Highlight::didFinishFadeOutAnimation):
317         (WebCore::ServicesOverlayController::determineActiveHighlight):
318         * platform/graphics/GraphicsLayer.cpp:
319         (WebCore::GraphicsLayer::GraphicsLayer):
320         (WebCore::GraphicsLayer::willBeDestroyed):
321         (WebCore::GraphicsLayer::setChildren):
322         (WebCore::GraphicsLayer::addChild):
323         (WebCore::GraphicsLayer::addChildAtIndex):
324         (WebCore::GraphicsLayer::addChildBelow):
325         (WebCore::GraphicsLayer::addChildAbove):
326         (WebCore::GraphicsLayer::replaceChild):
327         (WebCore::GraphicsLayer::removeAllChildren):
328         (WebCore::GraphicsLayer::removeFromParent):
329         (WebCore::GraphicsLayer::setMaskLayer):
330         (WebCore::GraphicsLayer::noteDeviceOrPageScaleFactorChangedIncludingDescendants):
331         (WebCore::GraphicsLayer::distributeOpacity):
332         (WebCore::GraphicsLayer::traverse):
333         (WebCore::dumpChildren):
334         * platform/graphics/GraphicsLayer.h:
335         (WebCore::GraphicsLayer::children const):
336         (WebCore::GraphicsLayer::children):
337         (WebCore::GraphicsLayer::maskLayer const):
338         (WebCore::GraphicsLayer::replicaLayer const):
339         (WebCore::GraphicsLayer::beingDestroyed const):
340         (WebCore::GraphicsLayer:: const): Deleted.
341         * platform/graphics/GraphicsLayerFactory.h:
342         * platform/graphics/ca/GraphicsLayerCA.cpp:
343         (WebCore::GraphicsLayer::create):
344         (WebCore::GraphicsLayerCA::setChildren):
345         (WebCore::GraphicsLayerCA::addChild):
346         (WebCore::GraphicsLayerCA::addChildAtIndex):
347         (WebCore::GraphicsLayerCA::addChildBelow):
348         (WebCore::GraphicsLayerCA::addChildAbove):
349         (WebCore::GraphicsLayerCA::replaceChild):
350         (WebCore::GraphicsLayerCA::setMaskLayer):
351         (WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush const):
352         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
353         (WebCore::GraphicsLayerCA::updateSublayerList):
354         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
355         * platform/graphics/ca/GraphicsLayerCA.h:
356         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
357         (WebCore::GraphicsLayer::create):
358         (WebCore::GraphicsLayerTextureMapper::setChildren):
359         (WebCore::GraphicsLayerTextureMapper::addChild):
360         (WebCore::GraphicsLayerTextureMapper::addChildAtIndex):
361         (WebCore::GraphicsLayerTextureMapper::addChildAbove):
362         (WebCore::GraphicsLayerTextureMapper::addChildBelow):
363         (WebCore::GraphicsLayerTextureMapper::replaceChild):
364         (WebCore::GraphicsLayerTextureMapper::setMaskLayer):
365         (WebCore::GraphicsLayerTextureMapper::updateBackingStoreIncludingSubLayers):
366         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
367         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
368         (WebCore::GraphicsLayer::create):
369         (WebCore::CoordinatedGraphicsLayer::setShouldUpdateVisibleRect):
370         (WebCore::CoordinatedGraphicsLayer::addChild):
371         (WebCore::CoordinatedGraphicsLayer::addChildAtIndex):
372         (WebCore::CoordinatedGraphicsLayer::addChildAbove):
373         (WebCore::CoordinatedGraphicsLayer::addChildBelow):
374         (WebCore::CoordinatedGraphicsLayer::replaceChild):
375         (WebCore::CoordinatedGraphicsLayer::setMaskLayer):
376         (WebCore::CoordinatedGraphicsLayer::syncPendingStateChangesIncludingSubLayers):
377         (WebCore::CoordinatedGraphicsLayer::updateContentBuffersIncludingSubLayers):
378         (WebCore::CoordinatedGraphicsLayer::setCoordinatorIncludingSubLayersIfNeeded):
379         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
380         * platform/graphics/win/GraphicsLayerDirect2D.cpp:
381         (WebCore::GraphicsLayer::create):
382         (WebCore::GraphicsLayerDirect2D::GraphicsLayerDirect2D): Deleted.
383         (WebCore::GraphicsLayerDirect2D::initialize): Deleted.
384         (WebCore::GraphicsLayerDirect2D::~GraphicsLayerDirect2D): Deleted.
385         (WebCore::GraphicsLayerDirect2D::setNeedsDisplay): Deleted.
386         (WebCore::GraphicsLayerDirect2D::setNeedsDisplayInRect): Deleted.
387         * rendering/RenderLayerBacking.cpp:
388         (WebCore::RenderLayerBacking::createGraphicsLayer):
389         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
390         (WebCore::RenderLayerBacking::updateConfiguration):
391         (WebCore::RenderLayerBacking::updateInternalHierarchy):
392         (WebCore::RenderLayerBacking::updateMaskingLayer):
393         (WebCore::RenderLayerBacking::updateChildClippingStrategy):
394         (WebCore::RenderLayerBacking::updateScrollingLayers):
395         * rendering/RenderLayerBacking.h:
396         * rendering/RenderLayerCompositor.cpp:
397         (WebCore::RenderLayerCompositor::updateCompositingLayers):
398         (WebCore::RenderLayerCompositor::appendDocumentOverlayLayers):
399         (WebCore::RenderLayerCompositor::setCompositingParent):
400         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
401         (WebCore::RenderLayerCompositor::parentFrameContentLayers):
402         (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
403         (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
404         (WebCore::RenderLayerCompositor::updateLayerForHeader):
405         (WebCore::RenderLayerCompositor::updateLayerForFooter):
406         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
407         (WebCore::RenderLayerCompositor::ensureRootLayer):
408         (WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):
409         * rendering/RenderLayerCompositor.h:
410
411 2018-09-12  Alex Christensen  <achristensen@webkit.org>
412
413         Expose fewer of URL's internal members
414         https://bugs.webkit.org/show_bug.cgi?id=189528
415
416         Reviewed by Chris Dumez.
417
418         * loader/appcache/ApplicationCacheStorage.cpp:
419         (WebCore::urlHostHash):
420         * platform/URL.cpp:
421         (WebCore::URL::hostStart const):
422         (WebCore::protocolHostAndPortAreEqual):
423         (WebCore::hostsAreEqual):
424         * platform/URL.h:
425         (WebCore::URL::hostStart const): Deleted.
426         (WebCore::URL::hostEnd const): Deleted.
427
428 2018-09-12  Basuke Suzuki  <Basuke.Suzuki@sony.com>
429
430         [Curl] Implement correct total received bytes.
431         https://bugs.webkit.org/show_bug.cgi?id=189555
432
433         Reviewed by Alex Christensen.
434
435         Curl port only reported total network received bytes before decoding.
436
437         No new test. InspectorTest is only available for WebKitTestRunner.
438
439         * platform/network/curl/CurlRequest.cpp:
440         (WebCore::CurlRequest::didReceiveData):
441         (WebCore::CurlRequest::updateNetworkLoadMetrics):
442         * platform/network/curl/CurlRequest.h:
443
444 2018-09-12  Youenn Fablet  <youenn@apple.com>
445
446         Split RTCRtpParameters idl and header file
447         https://bugs.webkit.org/show_bug.cgi?id=189524
448
449         Reviewed by Eric Carlson.
450
451         This will be easier to manage and will allow to more easily introduce sender/receiver parameters.
452         No change of behavior.
453
454         * CMakeLists.txt:
455         * DerivedSources.make:
456         * Modules/mediastream/RTCDegradationPreference.h: Copied from Source/WebCore/Modules/mediastream/RTCRtpParameters.h.
457         * Modules/mediastream/RTCDegradationPreference.idl: Added.
458         * Modules/mediastream/RTCDtxStatus.h: Copied from Source/WebCore/Modules/mediastream/RTCRtpParameters.h.
459         * Modules/mediastream/RTCDtxStatus.idl: Added.
460         * Modules/mediastream/RTCPriorityType.h: Copied from Source/WebCore/Modules/mediastream/RTCRtpParameters.h.
461         * Modules/mediastream/RTCPriorityType.idl: Added.
462         * Modules/mediastream/RTCRtpCodecParameters.h: Copied from Source/WebCore/Modules/mediastream/RTCRtpParameters.h.
463         * Modules/mediastream/RTCRtpCodecParameters.idl: Added.
464         * Modules/mediastream/RTCRtpEncodingParameters.h: Copied from Source/WebCore/Modules/mediastream/RTCRtpParameters.h.
465         * Modules/mediastream/RTCRtpEncodingParameters.idl: Added.
466         * Modules/mediastream/RTCRtpFecParameters.h: Copied from Source/WebCore/Modules/mediastream/RTCRtpParameters.h.
467         * Modules/mediastream/RTCRtpFecParameters.idl: Added.
468         * Modules/mediastream/RTCRtpHeaderExtensionParameters.h: Copied from Source/WebCore/Modules/mediastream/RTCRtpParameters.h.
469         * Modules/mediastream/RTCRtpHeaderExtensionParameters.idl: Added.
470         * Modules/mediastream/RTCRtpParameters.h:
471         * Modules/mediastream/RTCRtpParameters.idl:
472         * Modules/mediastream/RTCRtpRtxParameters.h: Copied from Source/WebCore/Modules/mediastream/RTCRtpParameters.h.
473         * Modules/mediastream/RTCRtpRtxParameters.idl: Added.
474         * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
475         (WebCore::toRTCEncodingParameters):
476         (WebCore::fromRTCEncodingParameters):
477         (WebCore::toRTCHeaderExtensionParameters):
478         (WebCore::fromRTCHeaderExtensionParameters):
479         (WebCore::toRTCCodecParameters):
480         (WebCore::toRTCRtpParameters):
481         (WebCore::fromRTCRtpParameters):
482         * Sources.txt:
483         * WebCore.xcodeproj/project.pbxproj:
484
485 2018-09-12  Ali Juma  <ajuma@chromium.org>
486
487         [IntersectionObserver] Implement rootMargin expansion
488         https://bugs.webkit.org/show_bug.cgi?id=189525
489
490         Reviewed by Simon Fraser.
491
492         Expand the root intersection rectangle by the observer's rootMargin when computing
493         intersections.
494
495         Test: imported/w3c/web-platform-tests/intersection-observer/root-margin.html
496
497         * dom/Document.cpp:
498         (WebCore::expandRootBoundsWithRootMargin):
499         (WebCore::computeIntersectionRects):
500         * page/IntersectionObserver.h:
501         (WebCore::IntersectionObserver::rootMarginBox const):
502         * platform/graphics/FloatRect.h:
503         (WebCore::FloatRect::expand):
504
505 2018-09-12  Fujii Hironori  <Hironori.Fujii@sony.com>
506
507         [Win][Clang] error: non-constant-expression cannot be narrowed from type 'int' to 'SHORT'
508         https://bugs.webkit.org/show_bug.cgi?id=189542
509
510         Reviewed by Alex Christensen.
511
512         No new tests (No behavior change).
513
514         * platform/graphics/win/IntPointWin.cpp:
515         (WebCore::IntPoint::operator POINTS const): Narrowed m_x and m_y by using static_cast.
516
517 2018-09-12  Guillaume Emont  <guijemont@igalia.com>
518
519         Add IGNORE_WARNING_.* macros
520         https://bugs.webkit.org/show_bug.cgi?id=188996
521
522         Reviewed by Michael Catanzaro.
523
524         * Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:
525         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
526         * accessibility/mac/AXObjectCacheMac.mm:
527         (WebCore::AXObjectCache::postPlatformNotification):
528         * accessibility/mac/AccessibilityObjectMac.mm:
529         (WebCore::AccessibilityObject::overrideAttachmentParent):
530         (WebCore::AccessibilityObject::accessibilityIgnoreAttachment const):
531         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
532         (-[WebAccessibilityObjectWrapper renderWidgetChildren]):
533         (-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
534         (-[WebAccessibilityObjectWrapper role]):
535         (-[WebAccessibilityObjectWrapper roleDescription]):
536         * bridge/objc/WebScriptObject.mm:
537         * bridge/objc/objc_class.mm:
538         (JSC::Bindings::ObjcClass::fieldNamed const):
539         * crypto/CommonCryptoUtilities.cpp:
540         (WebCore::getCommonCryptoDigestAlgorithm):
541         * crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:
542         (WebCore::encryptAES_GCM):
543         (WebCore::decyptAES_GCM):
544         * crypto/mac/SerializedCryptoKeyWrapMac.mm:
545         (WebCore::wrapSerializedCryptoKey):
546         (WebCore::unwrapSerializedCryptoKey):
547         * css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
548         * css/makeSelectorPseudoElementsMap.py:
549         * editing/TextIterator.cpp:
550         * editing/mac/EditorMac.mm:
551         (WebCore::Editor::pasteWithPasteboard):
552         (WebCore::Editor::takeFindStringFromSelection):
553         (WebCore::Editor::replaceNodeFromPasteboard):
554         * page/mac/EventHandlerMac.mm:
555         (WebCore::EventHandler::sendFakeEventsAfterWidgetTracking):
556         * page/mac/ServicesOverlayController.mm:
557         (WebCore::ServicesOverlayController::Highlight::paintContents):
558         * platform/LocalizedStrings.cpp:
559         (WebCore::formatLocalizedString):
560         * platform/ScreenProperties.h:
561         (WebCore::ScreenData::decode):
562         * platform/gamepad/mac/HIDGamepadProvider.cpp:
563         (WebCore::HIDGamepadProvider::stopMonitoringInput):
564         * platform/graphics/PlatformDisplay.cpp:
565         (WebCore::PlatformDisplay::sharedDisplay):
566         * platform/graphics/SurrogatePairAwareTextIterator.cpp:
567         * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
568         (WebCore::MediaSelectionGroupAVFObjC::updateOptions):
569         * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
570         (WebCore::CDMSessionAVStreamSession::update):
571         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
572         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
573         (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTextTrack):
574         (WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack const):
575         (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldDisableSleep):
576         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
577         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
578         (WebCore::IGNORE_CLANG_WARNING_END):
579         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
580         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
581         (-[WebAVSampleBufferErrorListener beginObservingRenderer:]):
582         (-[WebAVSampleBufferErrorListener stopObservingRenderer:]):
583         (-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):
584         (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
585         (WebCore::IGNORE_CLANG_WARNING_END):
586         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
587         (PlatformCALayer::drawLayerContents):
588         * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
589         (WebCore::FontCascade::fontForCombiningCharacterSequence const):
590         * platform/graphics/cg/ImageDecoderCG.cpp:
591         (WebCore::ImageDecoderCG::createFrameImageAtIndex):
592         * platform/graphics/cocoa/GraphicsContextCocoa.mm:
593         (WebCore::GraphicsContext::drawLineForDocumentMarker):
594         * platform/graphics/cocoa/WebGLLayer.h:
595         (IGNORE_CLANG_WARNING):
596         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
597         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
598         * platform/graphics/mac/IconMac.mm:
599         (WebCore::Icon::Icon):
600         * platform/graphics/mac/PDFDocumentImageMac.mm:
601         (WebCore::PDFDocumentImage::drawPDFPage):
602         * platform/graphics/mac/WebKitNSImageExtras.mm:
603         (-[NSImage _web_lockFocusWithDeviceScaleFactor:]):
604         * platform/ios/DragImageIOS.mm:
605         * platform/mac/DragImageMac.mm:
606         (WebCore::scaleDragImage):
607         (WebCore::createDragImageForLink):
608         * platform/mac/LegacyNSPasteboardTypes.h:
609         * platform/mac/LocalCurrentGraphicsContext.mm:
610         (WebCore::LocalCurrentGraphicsContext::LocalCurrentGraphicsContext):
611         * platform/mac/PasteboardMac.mm:
612         (WebCore::Pasteboard::createForCopyAndPaste):
613         (WebCore::Pasteboard::createForDragAndDrop):
614         (WebCore::setDragImageImpl):
615         * platform/mac/PlatformEventFactoryMac.mm:
616         (WebCore::globalPoint):
617         * platform/mac/SSLKeyGeneratorMac.mm:
618         * platform/mac/ScrollViewMac.mm:
619         (WebCore::ScrollView::platformContentsToScreen const):
620         (WebCore::ScrollView::platformScreenToContents const):
621         * platform/mac/ThemeMac.mm:
622         (WebCore::drawCellFocusRingWithFrameAtTime):
623         * platform/mac/WebPlaybackControlsManager.mm:
624         * platform/mac/WidgetMac.mm:
625         (WebCore::Widget::paint):
626         * platform/mediastream/RealtimeIncomingAudioSource.h:
627         * platform/mediastream/RealtimeIncomingVideoSource.h:
628         * platform/mediastream/RealtimeOutgoingAudioSource.h:
629         * platform/mediastream/RealtimeOutgoingVideoSource.h:
630         * platform/mediastream/libwebrtc/LibWebRTCAudioModule.h:
631         * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
632         * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
633         * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:
634         * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:
635         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
636         * platform/network/cf/ResourceHandleCFNet.cpp:
637         (WebCore::ResourceHandle::createCFURLConnection):
638         * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
639         (WebCore::SocketStreamHandleImpl::reportErrorToClient):
640         * platform/network/create-http-header-name-table:
641         * platform/text/TextEncoding.cpp:
642         * testing/MockLibWebRTCPeerConnection.h:
643         * xml/XPathGrammar.cpp:
644
645 2018-09-12  Pablo Saavedra  <psaavedra@igalia.com>
646
647         Linking against libWPEWebKit-0.1.so is not posible when WPE is build with ENABLE_VIDEO=OFF and ENABLE_WEB_AUDIO=OFF
648         https://bugs.webkit.org/show_bug.cgi?id=189540
649
650         Reviewed by Philippe Normand.
651
652         Related issues:
653
654         This issue is related with changes in https://bugs.webkit.org/show_bug.cgi?id=183080
655         This issue is introduced in https://bugs.webkit.org/show_bug.cgi?id=186547
656
657         No new tests, no changes in the functionality.
658
659         * platform/GStreamer.cmake:
660         * platform/SourcesGLib.txt:
661         * platform/mediastream/libwebrtc/LibWebRTCProviderGlib.cpp:
662         (WebCore::LibWebRTCProvider::webRTCAvailable):
663
664 2018-09-11  Zan Dobersek  <zdobersek@igalia.com>
665
666         Unreviewed WPE build fix.
667
668         * platform/network/soup/SocketStreamHandleImplSoup.cpp:
669         Add extra header inclusions to get this code building after the unified
670         sources system shifted it into a different translation unit.
671
672 2018-09-11  Basuke Suzuki  <Basuke.Suzuki@sony.com>
673
674         [Curl] WebInspector doesn't display request headers added during processing.
675         https://bugs.webkit.org/show_bug.cgi?id=189531
676
677         Reviewed by Alex Christensen.
678
679         While processing the request, Curl port network layer adds some headers to the request
680         such as cookies. Those headers should be displayed in the WebInspector.
681
682         Tested on MiniBrowser.
683
684         * platform/network/curl/CurlRequest.cpp:
685         (WebCore::CurlRequest::didReceiveHeader):
686         (WebCore::CurlRequest::didCompleteTransfer):
687         (WebCore::CurlRequest::updateNetworkLoadMetrics):
688         * platform/network/curl/CurlRequest.h:
689
690 2018-09-11  James Savage  <james.savage@apple.com>
691
692         Follow up to:
693         Expose -apple-system-container-border color to internal web views.
694         https://bugs.webkit.org/show_bug.cgi?id=189178.
695
696         Reviewed by Timothy Hatcher.
697
698         * rendering/RenderThemeMac.mm:
699         (WebCore::RenderThemeMac::systemColor const): Add a separate #if block for
700         Mojave. When I used CSSValueAppleSystemFindHighlightBackground as a template
701         for this change, I had to write out the condition in the first change, but
702         mistakenly thought I could reuse the block here. Turns out the versions were
703         different, and I could not.
704
705 2018-09-11  Youenn Fablet  <youenn@apple.com>
706
707         Remove MediaDevices NoInterfaceObject
708         https://bugs.webkit.org/show_bug.cgi?id=189512
709
710         Reviewed by Alex Christensen.
711
712         Covered by rebased WPT tests.
713
714         * Modules/mediastream/MediaDevices.idl:
715
716 2018-09-11  Jer Noble  <jer.noble@apple.com>
717
718         [MediaCapabilities] Implement MediaEngineConfigurationFactory registration
719         https://bugs.webkit.org/show_bug.cgi?id=189438
720
721         Reviewed by Eric Carlson.
722
723         Implement a mechanism to register platform-specific MediaEngineConfigurationFactory methods, and a mechanism to iterate
724         over those registered factories when createDecodingConfiguration() and createEncodingConfiguration() are called.
725
726         The Factory has been radically simplified; the concept of MediaEngineDecodingConfiguration
727         and MediaEngineEncodingConfiguration and its subclasess have been removed. Since the primary
728         objects representing video and audio configurations are IDLDictionaries, the native objects
729         are just structs full of POD types (and Strings). Since these have no dependencies on
730         higher-level HTML concepts, they can be moved into platform/ and accessed from there. This
731         patch also converts MediaCapabilitiesInfo to an Interface, so its implementation also can
732         become a struct and live in platform/. The MediaEngineDecodingConfigurationMock and
733         MediaEngineEncodingConfigurationMock have been consolidated in a single class which simply
734         parses MediaDecodingConfiguration and MediaEncodingConifguration objects (now that they live
735         in Platform) and return a MediaCapabilitiesInfo object (now that it does too).
736
737         * Modules/mediacapabilities/MediaCapabilities.cpp:
738         (WebCore::isValidVideoConfiguration):
739         (WebCore::MediaCapabilities::decodingInfo):
740         (WebCore::MediaCapabilities::encodingInfo):
741         * Modules/mediacapabilities/MediaCapabilitiesInfo.h: Removed.
742         * Modules/mediacapabilities/MediaCapabilitiesInfo.idl:
743         * Modules/mediacapabilities/VideoConfiguration.idl:
744         * Sources.txt:
745         * WebCore.xcodeproj/project.pbxproj:
746         * platform/MediaCapabilitiesInfo.h: Copied from Source/WebCore/Modules/mediacapabilities/MediaDecodingType.h.
747         * platform/mediacapabilities/AudioConfiguration.h: Renamed from Source/WebCore/Modules/mediacapabilities/AudioConfiguration.h.
748         * platform/mediacapabilities/MediaConfiguration.h: Renamed from Source/WebCore/Modules/mediacapabilities/MediaConfiguration.h.
749         * platform/mediacapabilities/MediaDecodingConfiguration.h: Renamed from Source/WebCore/Modules/mediacapabilities/MediaDecodingConfiguration.h.
750         * platform/mediacapabilities/MediaDecodingType.h: Renamed from Source/WebCore/Modules/mediacapabilities/MediaDecodingType.h.
751         * platform/mediacapabilities/MediaEncodingConfiguration.h: Renamed from Source/WebCore/Modules/mediacapabilities/MediaEncodingConfiguration.h.
752         * platform/mediacapabilities/MediaEncodingType.h: Renamed from Source/WebCore/Modules/mediacapabilities/MediaEncodingType.h.
753         * platform/mediacapabilities/MediaEngineConfiguration.cpp: Removed.
754         * platform/mediacapabilities/MediaEngineConfiguration.h: Removed.
755         * platform/mediacapabilities/MediaEngineConfigurationFactory.cpp:
756         (WebCore::factories):
757         (WebCore::MediaEngineConfigurationFactory::createDecodingConfiguration):
758         (WebCore::MediaEngineConfigurationFactory::createEncodingConfiguration):
759         * platform/mediacapabilities/MediaEngineConfigurationFactory.h:
760         * platform/mediacapabilities/MediaEngineEncodingConfiguration.h: Removed.
761         * platform/mediacapabilities/VideoConfiguration.h: Renamed from Source/WebCore/Modules/mediacapabilities/VideoConfiguration.h.
762         * platform/mediastream/mac/DisplayCaptureSourceCocoa.h:
763         * platform/mock/MediaEngineConfigurationFactoryMock.cpp: Added.
764         (WebCore::canDecodeMedia):
765         (WebCore::canSmoothlyDecodeMedia):
766         (WebCore::canPowerEfficientlyDecodeMedia):
767         (WebCore::canEncodeMedia):
768         (WebCore::canSmoothlyEncodeMedia):
769         (WebCore::canPowerEfficientlyEncodeMedia):
770         (WebCore::MediaEngineConfigurationFactoryMock::createDecodingConfiguration):
771         (WebCore::MediaEngineConfigurationFactoryMock::createEncodingConfiguration):
772         * platform/mock/MediaEngineConfigurationFactoryMock.h: Renamed from Source/WebCore/platform/mediacapabilities/MediaEngineDecodingConfiguration.h.
773         * platform/mock/MediaEngineDecodingConfigurationMock.cpp: Removed.
774         * platform/mock/MediaEngineDecodingConfigurationMock.h: Removed.
775         * platform/mock/MediaEngineEncodingConfigurationMock.cpp: Removed.
776         * platform/mock/MediaEngineEncodingConfigurationMock.h: Removed.
777
778 2018-09-08  Ryosuke Niwa  <rniwa@webkit.org>
779
780         :first-child, :last-child, :nth-child, and :nth-of-type don't work on shadow root's children
781         https://bugs.webkit.org/show_bug.cgi?id=166748
782         <rdar://problem/29649177>
783
784         Reviewed by Yusuke Suzuki.
785
786         Added the support for matching positional pseudo classes. For now, we invalidate whenever a child node
787         of a non-UA ShadowRoot is mutated instead of a fine-grained style invalidation as done for regular elements.
788
789         Tests: fast/shadow-dom/nth-node-on-shadow-child-invalidation.html
790                fast/shadow-dom/nth-node-on-shadow-child-no-jit.html
791                fast/shadow-dom/nth-node-on-shadow-child.html
792
793         * css/SelectorChecker.cpp:
794         (WebCore::SelectorChecker::checkOne const):
795         * cssjit/SelectorCompiler.cpp:
796         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToParentElementOrShadowRoot):
797         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstChild):
798         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLastChild):
799         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsOnlyChild):
800         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateNthChildParentCheckAndRelationUpdate):
801         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
802         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChildOf):
803         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateNthLastChildParentCheckAndRelationUpdate):
804         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthLastChild):
805         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthLastChildOf):
806         * dom/ShadowRoot.cpp:
807         (WebCore::ShadowRoot::childrenChanged): Invalidate the subtree whenever a child node is mutated.
808         * dom/ShadowRoot.h:
809         * domjit/DOMJITHelpers.h:
810         (WebCore::DOMJIT::branchTestIsShadowRootFlagOnNode): Added.
811         (WebCore::DOMJIT::branchTestIsElementOrShadowRootFlagOnNode): Added.
812
813 2018-09-11  Per Arne Vollan  <pvollan@apple.com>
814
815         Addressing post-review feedback on r235619.
816         https://bugs.webkit.org/show_bug.cgi?id=187925
817
818         Unreviewed.
819
820         * testing/Internals.cpp:
821         (WebCore::Internals::primaryScreenDisplayID):
822         * testing/Internals.h:
823
824 2018-09-11  Wenson Hsieh  <wenson_hsieh@apple.com>
825
826         [macOS] [WK2] Support changing foreground colors via color panel
827         https://bugs.webkit.org/show_bug.cgi?id=189382
828         <rdar://problem/44227311>
829
830         Reviewed by Ryosuke Niwa.
831
832         Small adjustments to support changing foreground text color using NSColorPanel in WebKit2. See comments below.
833         Tested by FontManagerTests.ChangeFontColorWithColorPanel.
834
835         * editing/EditingStyle.cpp:
836         (WebCore::StyleChange::extractTextStyles):
837
838         Support setting foreground text color with alpha by using a styled span element rather than a font element with
839         attributes. To do this, only populate `StyleChange::m_applyFontColor` if the color is opaque. This is because
840         the font element does not support `rgba()` syntax, so any font colors here with alpha that are serialized to
841         `rgba()` result in a garbage value for the computed color style.
842
843         * editing/FontAttributeChanges.cpp:
844         (WebCore::FontAttributeChanges::editAction const):
845
846         Add a helper to return the relevant EditAction describing this set of FontAttributeChanges.
847
848         * editing/FontAttributeChanges.h:
849         (WebCore::FontChanges::isEmpty const):
850
851 2018-09-11  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
852
853         Shrink size of ResourseResponseBase
854         https://bugs.webkit.org/show_bug.cgi?id=189501
855
856         Reviewed by Simon Fraser.
857
858         We reduce the size of ResourceResponseBase by the following two optimizations.
859
860         1. Use bitfields for bool flags and reorder them.
861
862         2. Use Markable<> in CacheControlDirectives, which is held by ResourceResponseBase.
863
864         This patch reduces the size of ResourceResponseBase from 416 to 392 bytes.
865
866         No behavior change.
867
868         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
869         (WebCore::WebCoreAVFResourceLoader::responseReceived):
870         (WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource):
871         * platform/network/CacheValidation.h:
872         (WebCore::CacheControlDirectives::CacheControlDirectives):
873         * platform/network/ResourceResponseBase.cpp:
874         (WebCore::ResourceResponseBase::ResourceResponseBase):
875         (WebCore::ResourceResponseBase::contentRange const):
876         * platform/network/ResourceResponseBase.h:
877         (WebCore::ResourceResponseBase::decode):
878
879 2018-09-11  Michael Catanzaro  <mcatanzaro@igalia.com>
880
881         Unreviewed, fix some -Wreturn-type warnings
882
883         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
884         (WebCore::sourceFromNewReceiver):
885         * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
886         (WebCore::toRTCRtpTransceiverDirection):
887         (WebCore::fromRTCRtpTransceiverDirection):
888
889 2018-09-11  Jiewen Tan  <jiewen_tan@apple.com>
890
891         Unreviewed, a speculative build fix for r235888.
892
893         * Modules/mediastream/MediaDevices.h:
894         Add class Document forward declaration.
895
896 2018-09-11  Woodrow Wang  <woodrow_wang@apple.com>
897
898         Add Web API Statistics Collection
899         https://bugs.webkit.org/show_bug.cgi?id=187773
900         <rdar://problem/44155162>
901
902         Reviewed by Brent Fulgham.
903
904         Added data collection for web API statistics, specifically regarding the canvas, font loads, 
905         screen functions, and navigator functions. The data collection code is placed under a runtime 
906         enabled feature flag. The statistics are stored in a ResourceLoadStatistics object and written 
907         to a plist on disk. Added a new file CanvasActivityRecord.h and CanvasActivityRecord.cpp which
908         includes a struct to keep track of HTML5 canvas element read and writes. 
909
910         Tests: http/tests/webAPIStatistics/canvas-read-and-write-data-collection.html
911                http/tests/webAPIStatistics/font-load-data-collection.html
912                http/tests/webAPIStatistics/navigator-functions-accessed-data-collection.html
913                http/tests/webAPIStatistics/screen-functions-accessed-data-collection.html
914
915         * Sources.txt:
916         * WebCore.xcodeproj/project.pbxproj:
917         * css/CSSFontFaceSource.cpp:
918         (WebCore::CSSFontFaceSource::load):
919         * css/CSSFontSelector.cpp:
920         (WebCore::CSSFontSelector::fontRangesForFamily):
921         (WebCore::CSSFontSelector::fallbackFontAt):
922
923         The following are the functions where we'd like to record a canvas read.
924
925         * html/HTMLCanvasElement.cpp:
926         (WebCore::HTMLCanvasElement::toDataURL):
927         (WebCore::HTMLCanvasElement::toBlob):
928         (WebCore::HTMLCanvasElement::getImageData):
929         (WebCore::HTMLCanvasElement::toMediaSample):
930         (WebCore::HTMLCanvasElement::captureStream):
931
932         The following are the functions where we'd like to record a canvas write.
933
934         * html/canvas/CanvasRenderingContext2D.cpp:
935         (WebCore::CanvasRenderingContext2D::measureText):
936         (WebCore::CanvasRenderingContext2D::drawTextInternal):
937
938         The following files and functions handle the CanvasActivityRecord struct and
939         its respective functions.
940
941         * loader/CanvasActivityRecord.cpp: Added.
942         (WebCore::CanvasActivityRecord::recordWrittenOrMeasuredText):
943         (WebCore::CanvasActivityRecord::mergeWith):
944         * loader/CanvasActivityRecord.h: Added.
945         (WebCore::CanvasActivityRecord::encode const):
946         (WebCore::CanvasActivityRecord::decode):
947
948         * loader/DocumentThreadableLoader.cpp:
949         * loader/FrameLoader.cpp:
950         * loader/ResourceLoadObserver.cpp:
951         (WebCore::ResourceLoadObserver::logFontLoad):
952         (WebCore::ResourceLoadObserver::logCanvasRead):
953         (WebCore::ResourceLoadObserver::logCanvasWriteOrMeasure):
954         (WebCore::ResourceLoadObserver::logNavigatorAPIAccessed):
955         (WebCore::ResourceLoadObserver::logScreenAPIAccessed):
956
957         Before, entries in the ResourceLoadStatistics involving HashSets used "origin" as the key. 
958         Now the encodeHashSet function has been generalized to take any key to encode the entries 
959         in the HashSet. Also added functionality to encode an OptionSet by converting it to its 
960         raw bitmask state. 
961
962         * loader/ResourceLoadObserver.h:
963         * loader/ResourceLoadStatistics.cpp:
964         (WebCore::encodeHashSet):
965         (WebCore::encodeOriginHashSet):
966         (WebCore::encodeOptionSet):
967         (WebCore::encodeFontHashSet):
968         (WebCore::encodeCanvasActivityRecord):
969         (WebCore::ResourceLoadStatistics::encode const):
970         (WebCore::decodeHashSet):
971         (WebCore::decodeOriginHashSet):
972         (WebCore::decodeOptionSet):
973         (WebCore::decodeFontHashSet):
974         (WebCore::decodeCanvasActivityRecord):
975         (WebCore::ResourceLoadStatistics::decode):
976         (WebCore::navigatorAPIEnumToString):
977         (WebCore::screenAPIEnumToString):
978         (WebCore::appendNavigatorAPIOptionSet):
979         (WebCore::appendScreenAPIOptionSet):
980         (WebCore::ResourceLoadStatistics::toString const):
981         (WebCore::ResourceLoadStatistics::merge):
982         * loader/ResourceLoadStatistics.h:
983         * loader/ResourceTiming.cpp:
984
985         The following are the navigator functions recorded for the web API statistics.
986
987         * page/Navigator.cpp:
988         (WebCore::Navigator::appVersion const):
989         (WebCore::Navigator::userAgent const):
990         (WebCore::Navigator::plugins):
991         (WebCore::Navigator::mimeTypes):
992         (WebCore::Navigator::cookieEnabled const):
993         (WebCore::Navigator::javaEnabled const):
994
995         The following are the screen functions recorded for the web API statistics.
996
997         * page/Screen.cpp:
998         (WebCore::Screen::height const):
999         (WebCore::Screen::width const):
1000         (WebCore::Screen::colorDepth const):
1001         (WebCore::Screen::pixelDepth const):
1002         (WebCore::Screen::availLeft const):
1003         (WebCore::Screen::availTop const):
1004         (WebCore::Screen::availHeight const):
1005         (WebCore::Screen::availWidth const):
1006
1007 2018-09-11  Pablo Saavedra  <psaavedra@igalia.com>
1008
1009         playbackControlsManagerUpdateTimerFired and
1010         m_playbackControlsManagerUpdateTimer must be
1011         guarded with ENABLE(VIDEO), otherwise the following
1012         error occurs with the VIDEO feature turned off:
1013
1014           error: 'MediaElementSession' has not been declared
1015
1016         Add missing #if ENABLE(VIDEO) Page.cpp and Page.h
1017         https://bugs.webkit.org/show_bug.cgi?id=189500
1018
1019         Reviewed by Anders Carlsson.
1020
1021         * page/Page.cpp:
1022         (WebCore::Page::Page):
1023         (WebCore::Page::schedulePlaybackControlsManagerUpdate):
1024         * page/Page.h:
1025
1026 2018-09-11  Frederic Wang  <fwang@igalia.com>
1027
1028         Refactor filter list checking code
1029         https://bugs.webkit.org/show_bug.cgi?id=185087
1030
1031         Reviewed by Antonio Gomes.
1032
1033         No new tests, behavior unchanged.
1034
1035         * page/animation/KeyframeAnimation.h: Add missing forward-declaration FilterOperations.
1036
1037 == Rolled over to ChangeLog-2018-09-11 ==