1 2018-09-14 Mike Gorse <mgorse@suse.com>
3 builtins directory causes name conflict on Python 3
4 https://bugs.webkit.org/show_bug.cgi?id=189552
6 Reviewed by Michael Catanzaro.
8 No new tests (No behavior change).
10 * CMakeLists.txt: builtins -> wkbuiltins.
11 * DerivedSources.make: builtins -> wkbuiltins.
13 2018-09-13 Ryosuke Niwa <rniwa@webkit.org>
15 Capturing event listeners are called during bubbling phase for shadow hosts
16 https://bugs.webkit.org/show_bug.cgi?id=174288
17 <rdar://problem/33530455>
19 Reviewed by Darin Adler.
21 Implemented the new behavior proposed in https://github.com/whatwg/dom/pull/686 [1] to fix the problem
22 that capturing event listeners on a shadow host is invoked during bubbling phase when an event is
23 dispatched within its shadow tree.
25 To see why this is a problem, suppose we fire a composed event at span#target in the following DOM tree:
27 + div#host -- ShadowRoot
30 Then capturing and bubbling event listeners on #target, #parent, #host, and #hostParent are invoked in
31 the following order in WebKit & Chrome right now:
33 1. #hostParent, capturing, eventPhase: CAPTURING_PHASE
34 2. #parent, capturing, eventPhase: CAPTURING_PHASE
35 3. #target, capturing, eventPhase: AT_TARGET
36 4. #target, non-capturing, eventPhase: AT_TARGET
37 5. #parent, non-capturing, eventPhase: BUBBLING_PHASE
38 6. #host, capturing, eventPhase: AT_TARGET
39 7. #host, non-capturing, eventPhase: AT_TARGET
40 8. #hostParent, non-capturing, eventPhase: BUBBLING_PHASE
42 This is counter-intuitive because capturing event listeners on #host isn't invoked until bubblign phase
43 started. A more natural ordering would be:
45 1. #hostParent, capturing, eventPhase: CAPTURING_PHASE
46 2. #host, capturing, eventPhase: AT_TARGET
47 3. #parent, capturing, eventPhase: CAPTURING_PHASE
48 4. #target, capturing, eventPhase: AT_TARGET
49 5. #target, non-capturing, eventPhase: AT_TARGET
50 6. #parent, non-capturing, eventPhase: BUBBLING_PHASE
51 7. #host, non-capturing, eventPhase: AT_TARGET
52 8. #hostParent, non-capturing, eventPhase: BUBBLING_PHASE
54 This also happens to be the order by which Gecko's current shadow DOM implementation invoke event listners.
55 This patch implements this new behavior using the spec-change proposed in [1]. Note that this patch also
56 impacts the invocation order of event listeners when there is no shadow tree. Namely, before this patch,
57 event listeners on the event's target is invoked in the registration order. After this patch, all capturing
58 event listeners are invoked before bubbling event listeners are invoked.
60 To implement this behavior, this patch introduces EventTarget::EventInvokePhase indicating whether we're
61 in the capturing phase or bubbling phase to EventTarget::fireEventListeners. We can't use Event's eventPhase
62 enum because that's set to Event::Phase::AT_TARGET when we're at a shadow host.
64 Test: fast/shadow-dom/capturing-and-bubbling-event-listeners-across-shadow-trees.html
66 * Modules/modern-media-controls/media/media-controller-support.js:
67 (MediaControllerSupport.prototype.enable): Use capturing event listeners so that we can update the states of
68 media controls before author scripts recieve the event.
69 (MediaControllerSupport.prototype.disable): Ditto.
70 * dom/EventContext.cpp:
71 (WebCore::EventContext::handleLocalEvents const):
72 (WebCore::MouseOrFocusEventContext::handleLocalEvents const):
73 (WebCore::TouchEventContext::handleLocalEvents const):
75 * dom/EventDispatcher.cpp:
76 (WebCore::dispatchEventInDOM): Invoke capturing event listners even when target and current target are same.
77 This happens when the current target is a shadow host and event's target is in its shadow tree. Also merged
78 the special code path for the event's target with the code in the bubbling phase.
80 (WebCore::WindowEventContext::handleLocalEvents const):
81 * dom/EventTarget.cpp:
82 (WebCore::EventTarget::dispatchEvent): Invoke capturing and bubbling event listeners in the order.
83 (WebCore::EventTarget::fireEventListeners):
84 (WebCore::EventTarget::innerInvokeEventListeners): Renamed from fireEventListeners to match the spec. Use
85 EventInvokePhase to filter out event listeners so that we can invoke capturing event listners before bubbling
86 event listeners even when eventPhase is Event::Phase::AT_TARGET.
89 (WebCore::Node::handleLocalEvents):
91 * html/HTMLFormElement.cpp:
92 (WebCore::HTMLFormElement::handleLocalEvents):
93 * html/HTMLFormElement.h:
95 (WebCore::DOMWindow::dispatchEvent):
97 2018-09-13 Megan Gardner <megan_gardner@apple.com>
99 Fix color stop blending in conic gradients for stops past 1
100 https://bugs.webkit.org/show_bug.cgi?id=189532
101 <rdar://problem/44158221>
103 Reviewed by Simon Fraser.
105 Calculation was wrong, fixed it, and wrote a test that failed
106 without the change, and passes with it.
108 Test: fast/gradients/conic-repeating-last-stop.html
110 * css/CSSGradientValue.cpp:
111 (WebCore::ConicGradientAdapter::normalizeStopsAndEndpointsOutsideRange):
113 2018-09-13 Chris Dumez <cdumez@apple.com>
115 Regression(PSON): setting window.opener to null allows process swapping in cases that are not web-compatible
116 https://bugs.webkit.org/show_bug.cgi?id=189590
117 <rdar://problem/44422725>
119 Reviewed by Geoffrey Garen.
121 Set a flag on the navigation action to indicate if the page was opened via window.open() without 'noopener'.
123 Test: http/tests/navigation/window-open-cross-origin-then-navigated-back-same-origin.html
125 * loader/FrameLoader.cpp:
126 (WebCore::FrameLoader::loadURL):
127 * loader/NavigationAction.h:
128 (WebCore::NavigationAction::openedViaWindowOpenWithOpener const):
129 (WebCore::NavigationAction::setOpenedViaWindowOpenWithOpener):
130 * page/DOMWindow.cpp:
131 (WebCore::DOMWindow::createWindow):
133 (WebCore::Page::openedViaWindowOpenWithOpener const):
134 (WebCore::Page::setOpenedViaWindowOpenWithOpener):
136 2018-09-13 Jer Noble <jer.noble@apple.com>
138 Enable USE_MEDIAREMOTE on iOS
139 https://bugs.webkit.org/show_bug.cgi?id=189096
141 Reviewed by Eric Carlson.
143 Migrate to using MediaRemote.framework on iOS from MediaPlayer.framework. This unifies the
144 Now Playing implementation on iOS and Mac.
147 * WebCore.xcodeproj/project.pbxproj:
148 * platform/audio/cocoa/MediaSessionManagerCocoa.cpp: Removed.
149 * platform/audio/cocoa/MediaSessionManagerCocoa.h:
150 * platform/audio/cocoa/MediaSessionManagerCocoa.mm: Renamed from Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm.
151 (PlatformMediaSessionManager::sharedManager):
152 (PlatformMediaSessionManager::sharedManagerIfExists):
153 (MediaSessionManagerCocoa::updateSessionState):
154 (MediaSessionManagerCocoa::beginInterruption):
155 (MediaSessionManagerCocoa::scheduleUpdateNowPlayingInfo):
156 (MediaSessionManagerCocoa::sessionWillBeginPlayback):
157 (MediaSessionManagerCocoa::sessionDidEndRemoteScrubbing):
158 (MediaSessionManagerCocoa::removeSession):
159 (MediaSessionManagerCocoa::sessionWillEndPlayback):
160 (MediaSessionManagerCocoa::clientCharacteristicsChanged):
161 (MediaSessionManagerCocoa::sessionCanProduceAudioChanged):
162 (MediaSessionManagerCocoa::nowPlayingEligibleSession):
163 (MediaSessionManagerCocoa::updateNowPlayingInfo):
164 * platform/audio/ios/MediaSessionManagerIOS.h:
166 * platform/audio/ios/MediaSessionManagerIOS.mm:
167 (WebCore::MediaSessionManageriOS::nowPlayingEligibleSession): Deleted.
168 (WebCore::MediaSessionManageriOS::updateNowPlayingInfo): Deleted.
169 (WebCore::MediaSessionManageriOS::sessionWillBeginPlayback): Deleted.
170 (WebCore::MediaSessionManageriOS::removeSession): Deleted.
171 (WebCore::MediaSessionManageriOS::sessionWillEndPlayback): Deleted.
172 (WebCore::MediaSessionManageriOS::clientCharacteristicsChanged): Deleted.
173 * platform/audio/mac/MediaSessionManagerMac.h: Removed.
175 2018-09-13 Fujii Hironori <Hironori.Fujii@sony.com>
177 Remove the workaround for friend class LazyNeverDestroyed<X> statements for MSVC
178 https://bugs.webkit.org/show_bug.cgi?id=189576
180 Reviewed by Alex Christensen.
182 Old MSVC can't compile "friend class LazyNeverDestroyed<X>"
183 statements, but "friend LazyNeverDestroyed<X>".
185 No new tests (No behavior change).
187 * css/CSSInheritedValue.h: Removed the code for COMPILER(MSVC).
188 Removed 'class' keyword in "friend class LazyNeverDestroyed<X>"
190 * css/CSSInitialValue.h: Ditto.
191 * css/CSSPrimitiveValue.h: Ditto.
192 * css/CSSRevertValue.h: Ditto.
193 * css/CSSUnsetValue.h: Ditto.
195 2018-09-13 Ms2ger <Ms2ger@igalia.com>
197 [GLib] Fix format string in KeyedEncoderGlib::beginObject().
198 https://bugs.webkit.org/show_bug.cgi?id=189585
200 Reviewed by Michael Catanzaro.
202 This appears to fix the following assertion locally:
204 GLib-CRITICAL **: g_variant_builder_add_value: assertion '!GVSB(builder)->expected_type || g_variant_is_of_type (value, GVSB(builder)->expected_type)' failed
206 Covered by existing tests.
208 * platform/glib/KeyedEncoderGlib.cpp:
209 (WebCore::KeyedEncoderGlib::beginObject):
211 2018-09-13 Ryan Haddad <ryanhaddad@apple.com>
213 Unreviewed, rolling out r235953.
215 Caused layout test crashes under GuardMalloc.
219 "Make GraphicsLayers ref-counted, so their tree can persist
220 when disconnected from RenderLayerBackings"
221 https://bugs.webkit.org/show_bug.cgi?id=189521
222 https://trac.webkit.org/changeset/235953
224 2018-09-13 Fujii Hironori <Hironori.Fujii@sony.com>
226 Remove a MSVC workaround in XPath::Step::NodeTest
227 https://bugs.webkit.org/show_bug.cgi?id=189578
229 Reviewed by Alex Christensen.
231 XPath::Step::NodeTest has a special code for MSVC bug workaround.
232 It has been introduced in 5 years ago in Bug 121082 Comment 19.
234 I think it is safe just to remove the workaround.
236 No new tests (No behavior change).
238 * xml/XPathStep.h: Removed the MSVC workaround.
240 2018-09-13 Fujii Hironori <Hironori.Fujii@sony.com>
242 Remove a MSVC workaround in InspectorStyle::styleWithProperties
243 https://bugs.webkit.org/show_bug.cgi?id=189577
245 Reviewed by Alex Christensen.
247 No new tests (No behavior change).
249 * inspector/InspectorStyleSheet.cpp:
250 (WebCore::InspectorStyle::styleWithProperties const): Use 'auto' for the type of 'status'.
252 2018-09-13 Alex Christensen <achristensen@webkit.org>
254 Use a Variant instead of a union in CSSSelector
255 https://bugs.webkit.org/show_bug.cgi?id=188559
257 Reviewed by Antti Koivisto.
259 No change in behavior. This just makes some of the existing problems more obvious and easy to fix.
261 I moved m_caseInsensitiveAttributeValueMatching to RareData because it's only used with RareData.
262 I only have m_isForPage when assertions are enabled because it's only used for an assertion.
263 The rest is pretty straightforward translating union syntax to Variant syntax.
264 I use RefPtr for now where I could use Ref because it's never null to make copying easier, but that's temporary.
266 * css/CSSSelector.cpp:
267 (WebCore::CSSSelector::CSSSelector):
268 (WebCore::CSSSelector::createRareData):
269 (WebCore::CSSSelector::setAttribute):
270 (WebCore::CSSSelector::setArgument):
271 (WebCore::CSSSelector::setLangArgumentList):
272 (WebCore::CSSSelector::setSelectorList):
273 (WebCore::CSSSelector::setNth):
274 (WebCore::CSSSelector::matchNth const):
275 (WebCore::CSSSelector::nthA const):
276 (WebCore::CSSSelector::nthB const):
277 (WebCore::CSSSelector::RareData::RareData):
279 (WebCore::CSSSelector::argument const):
280 (WebCore::CSSSelector::langArgumentList const):
281 (WebCore::CSSSelector::selectorList const):
282 (WebCore::CSSSelector::attribute const):
283 (WebCore::CSSSelector::attributeCanonicalLocalName const):
284 (WebCore::CSSSelector::setValue):
285 (WebCore::CSSSelector::CSSSelector):
286 (WebCore::CSSSelector::~CSSSelector):
287 (WebCore::CSSSelector::tagQName const):
288 (WebCore::CSSSelector::tagLowercaseLocalName const):
289 (WebCore::CSSSelector::value const):
290 (WebCore::CSSSelector::serializingValue const):
291 (WebCore::CSSSelector::attributeValueMatchingIsCaseInsensitive const):
292 (WebCore::CSSSelector::RareData::create): Deleted.
293 * css/parser/CSSParserImpl.cpp:
294 (WebCore::CSSParserImpl::parsePageSelector):
295 * css/parser/CSSParserSelector.h:
297 2018-09-13 Fujii Hironori <Hironori.Fujii@sony.com>
299 [Win][Clang] error: type 'float' cannot be narrowed to 'LONG' (aka 'long') in initializer list in WheelEventWin.cpp
300 https://bugs.webkit.org/show_bug.cgi?id=189575
302 Reviewed by Alex Christensen.
304 No new tests (No behavior change).
306 * platform/win/WheelEventWin.cpp:
307 (WebCore::PlatformWheelEvent::PlatformWheelEvent): Use flooredIntPoint to convert FloatPoint to POINT.
309 2018-09-13 Youenn Fablet <youenn@apple.com>
311 Introduce RTCRtpSendParameters
312 https://bugs.webkit.org/show_bug.cgi?id=189563
314 Reviewed by Eric Carlson.
316 Introduce RTCRtpSendParameters to match the WebRTC specification.
317 Split RTCRtpPrameters fields accordingly and update call sites.
319 Covered by updated test.
322 * DerivedSources.make:
323 * Modules/mediastream/PeerConnectionBackend.h:
324 * Modules/mediastream/RTCRtpCodingParameters.h: Added
325 * Modules/mediastream/RTCRtpCodingParameters.idl: Added
326 * Modules/mediastream/RTCRtpDecodingParameters.h: Added
327 * Modules/mediastream/RTCRtpDecodingParameters.idl: Added
328 * Modules/mediastream/RTCRtpEncodingParameters.h:
329 * Modules/mediastream/RTCRtpEncodingParameters.idl:
330 * Modules/mediastream/RTCRtpParameters.h:
331 * Modules/mediastream/RTCRtpParameters.idl:
332 * Modules/mediastream/RTCRtpReceiver.cpp:
333 * Modules/mediastream/RTCRtpSendParameters.h: Added.
334 (WebCore::RTCRtpSendParameters::RTCRtpSendParameters):
335 * Modules/mediastream/RTCRtpSendParameters.idl: Added.
336 * Modules/mediastream/RTCRtpSender.cpp:
337 (WebCore::RTCRtpSender::getParameters):
338 (WebCore::RTCRtpSender::setParameters):
339 * Modules/mediastream/RTCRtpSender.h:
340 * Modules/mediastream/RTCRtpSender.idl:
341 * Modules/mediastream/RTCRtpSenderBackend.h:
342 * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp:
343 (WebCore::LibWebRTCRtpSenderBackend::getParameters const):
344 (WebCore::LibWebRTCRtpSenderBackend::setParameters):
345 * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h:
346 * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
347 (WebCore::toRTCRtpParameters):
348 (WebCore::toRTCRtpSendParameters):
349 (WebCore::fromRTCRtpSendParameters):
350 * Modules/mediastream/libwebrtc/LibWebRTCUtils.h:
352 * WebCore.xcodeproj/project.pbxproj:
354 2018-09-13 Xabier Rodriguez Calvar <calvaris@igalia.com>
356 [GStreamer][EME] decrypt-key-needed message renamed to drm-cdm-instance-needed
357 https://bugs.webkit.org/show_bug.cgi?id=189547
359 Reviewed by Philippe Normand.
361 decrypt-key-needed message renamed to drm-cdm-instance-needed.
363 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
364 (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Apart from
365 renaming the message, removed the class prefix for
367 * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
368 (webkitMediaCommonEncryptionDecryptTransformInPlace):
370 2018-09-11 Ryosuke Niwa <rniwa@webkit.org>
372 imported/w3c/web-platform-tests/shadow-dom/form-control-form-attribute.html hits assertion
373 https://bugs.webkit.org/show_bug.cgi?id=189493
375 Reviewed by Alex Christensen.
377 The debug assertion was caused by RefPtr in FormAssociatedElement::formOwnerRemovedFromTree introduced
378 by r224390 and r223644 ref'ing ShadowRoot while calling removeDetachedChildren inside ~ShadowRoot.
379 When a form (or any other) element has more than one ref inside removeDetachedChildren,
380 addChildNodesToDeletionQueue calls notifyChildNodeRemoved in the tree oreder.
382 However, when a form associated element of this form element appears later in the tree order,
383 FormAssociatedElement::formOwnerRemovedFromTree can traverse up ancestors including the ShadowRoot.
385 Fixed the bug by using raw pointers instead. Luckily, there is no DOM mutations or other non-trivial
386 operations happening in this function so this should be safe.
388 Test: imported/w3c/web-platform-tests/shadow-dom/form-control-form-attribute.html
390 * html/FormAssociatedElement.cpp:
391 (WebCore::FormAssociatedElement::formOwnerRemovedFromTree): Fixed the bug.
393 2018-09-12 Dan Bernstein <mitz@apple.com>
395 [Cocoa] Complete support for Paste as Quotation
396 https://bugs.webkit.org/show_bug.cgi?id=189504
398 Reviewed by Wenson Hsieh.
400 Tests: editing/pasteboard/4930986-1-paste-as-quotation.html
401 editing/pasteboard/4930986-2-paste-as-quotation.html
402 editing/pasteboard/4930986-3-paste-as-quotation.html
404 * editing/Editor.cpp:
405 Added ClipboardEventKind::PasteAsQuotation.
406 (WebCore::eventNameForClipboardEvent): Map PasteAsQuotation to the "paste" DOM event name.
407 (WebCore::createDataTransferForClipboardEvent): Place the unquoted content in the event.
408 This means that currently event handlers can’t emulate pasting as quotation, because they
409 neither have the quoted content nor knowledge that quoting has been requested. We could
410 change this in the future if needed.
411 (WebCore::Editor::paste): Updated for change in pasteWithPasteboard’s argument type.
412 (WebCore::Editor::pasteAsQuotation): Added. Similar to paste, but passes
413 PasteOption::AsQuotation to pasteWithPasteboard.
414 (WebCore::Editor::quoteFragmentForPasting): Added. Quoting for pasting consists of enclosing
415 the fragment in a blockquote element with the "type" attribute set to "cite" and the
416 "class" attribute set to a well-known value, which is used to trigger special behavior in
417 ReplaceSelectionCommand. The behavior includes removing the "class" attribute in the end,
418 so eventually, we could stop using this form of in-band signaling.
419 * editing/Editor.h: Declared PasteOption enum class to encompass the existing allowPlainText
420 and MailBlockquoteHandling arguments to pasteWithPasteboard as well as the new AsQuotation
423 * editing/EditorCommand.cpp:
424 (WebCore::executePasteAsQuotation): Added. Similar to executing Paste.
425 (WebCore::createCommandMap): Added an entry for PasteAsQuotation, based on the Paste entry.
427 * editing/cocoa/EditorCocoa.mm:
428 (WebCore::Editor::webContentFromPasteboard): Moved from EditorIOS.mm and EditorMac.mm to
431 * editing/gtk/EditorGtk.cpp:
432 (WebCore::Editor::pasteWithPasteboard): Updated for new OptionSet argument, added a call to
433 quote the fragment if needed.
435 * editing/ios/EditorIOS.mm:
436 (WebCore::Editor::pasteWithPasteboard): Ditto.
437 (WebCore::Editor::webContentFromPasteboard): Moved to EditorCocoa.mm.
439 * editing/mac/EditorMac.mm:
440 (WebCore::Editor::pasteWithPasteboard): Updated for new OptionSet argument, added a call to
441 quote the fragment if needed.
442 (WebCore::Editor::readSelectionFromPasteboard): Updated for new OptionSet argument to
444 (WebCore::Editor::webContentFromPasteboard): Moved to EditorCocoa.mm.
446 * editing/win/EditorWin.cpp:
447 (WebCore::Editor::pasteWithPasteboard): Updated for new OptionSet argument, added a call to
448 quote the fragment if needed.
450 * editing/wpe/EditorWPE.cpp:
451 (WebCore::Editor::pasteWithPasteboard): Ditto.
453 2018-09-11 Simon Fraser <simon.fraser@apple.com>
455 Make GraphicsLayers ref-counted, so their tree can persist when disconnected from RenderLayerBackings
456 https://bugs.webkit.org/show_bug.cgi?id=189521
458 Reviewed by Tim Horton.
460 Make GraphicsLayer be RefCounted<GraphicsLayer>. GraphicsLayers own their children, via a Vector<Ref<GraphicsLayer>>.
462 RenderLayerBacking and other holders of GraphicsLayers use RefPtr<GraphicsLayer>.
464 All the other changes are just to adapt to the new ownership patterns.
466 I verified that no GraphicsLayers were leaked or abandoned after this change.
470 * page/PageOverlayController.cpp:
471 (WebCore::PageOverlayController::layerWithDocumentOverlays):
472 (WebCore::PageOverlayController::layerWithViewOverlays):
473 (WebCore::PageOverlayController::installPageOverlay):
474 (WebCore::PageOverlayController::uninstallPageOverlay):
475 (WebCore::PageOverlayController::setPageOverlayNeedsDisplay):
476 (WebCore::PageOverlayController::didChangeViewSize):
477 (WebCore::PageOverlayController::didChangeDocumentSize):
478 (WebCore::PageOverlayController::didChangeSettings):
479 (WebCore::PageOverlayController::paintContents):
480 (WebCore::PageOverlayController::didChangeOverlayFrame):
481 (WebCore::PageOverlayController::didChangeOverlayBackgroundColor):
482 * page/PageOverlayController.h:
483 * page/mac/ServicesOverlayController.h:
484 (WebCore::ServicesOverlayController::Highlight::layer const):
485 * page/mac/ServicesOverlayController.mm:
486 (WebCore::ServicesOverlayController::Highlight::Highlight):
487 (WebCore::ServicesOverlayController::Highlight::invalidate):
488 (WebCore::ServicesOverlayController::Highlight::fadeIn):
489 (WebCore::ServicesOverlayController::Highlight::fadeOut):
490 (WebCore::ServicesOverlayController::Highlight::didFinishFadeOutAnimation):
491 (WebCore::ServicesOverlayController::determineActiveHighlight):
492 * platform/graphics/GraphicsLayer.cpp:
493 (WebCore::GraphicsLayer::GraphicsLayer):
494 (WebCore::GraphicsLayer::willBeDestroyed):
495 (WebCore::GraphicsLayer::setChildren):
496 (WebCore::GraphicsLayer::addChild):
497 (WebCore::GraphicsLayer::addChildAtIndex):
498 (WebCore::GraphicsLayer::addChildBelow):
499 (WebCore::GraphicsLayer::addChildAbove):
500 (WebCore::GraphicsLayer::replaceChild):
501 (WebCore::GraphicsLayer::removeAllChildren):
502 (WebCore::GraphicsLayer::removeFromParent):
503 (WebCore::GraphicsLayer::setMaskLayer):
504 (WebCore::GraphicsLayer::noteDeviceOrPageScaleFactorChangedIncludingDescendants):
505 (WebCore::GraphicsLayer::distributeOpacity):
506 (WebCore::GraphicsLayer::traverse):
507 (WebCore::dumpChildren):
508 * platform/graphics/GraphicsLayer.h:
509 (WebCore::GraphicsLayer::children const):
510 (WebCore::GraphicsLayer::children):
511 (WebCore::GraphicsLayer::maskLayer const):
512 (WebCore::GraphicsLayer::replicaLayer const):
513 (WebCore::GraphicsLayer::beingDestroyed const):
514 (WebCore::GraphicsLayer:: const): Deleted.
515 * platform/graphics/GraphicsLayerFactory.h:
516 * platform/graphics/ca/GraphicsLayerCA.cpp:
517 (WebCore::GraphicsLayer::create):
518 (WebCore::GraphicsLayerCA::setChildren):
519 (WebCore::GraphicsLayerCA::addChild):
520 (WebCore::GraphicsLayerCA::addChildAtIndex):
521 (WebCore::GraphicsLayerCA::addChildBelow):
522 (WebCore::GraphicsLayerCA::addChildAbove):
523 (WebCore::GraphicsLayerCA::replaceChild):
524 (WebCore::GraphicsLayerCA::setMaskLayer):
525 (WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush const):
526 (WebCore::GraphicsLayerCA::recursiveCommitChanges):
527 (WebCore::GraphicsLayerCA::updateSublayerList):
528 (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
529 * platform/graphics/ca/GraphicsLayerCA.h:
530 * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
531 (WebCore::GraphicsLayer::create):
532 (WebCore::GraphicsLayerTextureMapper::setChildren):
533 (WebCore::GraphicsLayerTextureMapper::addChild):
534 (WebCore::GraphicsLayerTextureMapper::addChildAtIndex):
535 (WebCore::GraphicsLayerTextureMapper::addChildAbove):
536 (WebCore::GraphicsLayerTextureMapper::addChildBelow):
537 (WebCore::GraphicsLayerTextureMapper::replaceChild):
538 (WebCore::GraphicsLayerTextureMapper::setMaskLayer):
539 (WebCore::GraphicsLayerTextureMapper::updateBackingStoreIncludingSubLayers):
540 * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
541 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
542 (WebCore::GraphicsLayer::create):
543 (WebCore::CoordinatedGraphicsLayer::setShouldUpdateVisibleRect):
544 (WebCore::CoordinatedGraphicsLayer::addChild):
545 (WebCore::CoordinatedGraphicsLayer::addChildAtIndex):
546 (WebCore::CoordinatedGraphicsLayer::addChildAbove):
547 (WebCore::CoordinatedGraphicsLayer::addChildBelow):
548 (WebCore::CoordinatedGraphicsLayer::replaceChild):
549 (WebCore::CoordinatedGraphicsLayer::setMaskLayer):
550 (WebCore::CoordinatedGraphicsLayer::syncPendingStateChangesIncludingSubLayers):
551 (WebCore::CoordinatedGraphicsLayer::updateContentBuffersIncludingSubLayers):
552 (WebCore::CoordinatedGraphicsLayer::setCoordinatorIncludingSubLayersIfNeeded):
553 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
554 * platform/graphics/win/GraphicsLayerDirect2D.cpp:
555 (WebCore::GraphicsLayer::create):
556 (WebCore::GraphicsLayerDirect2D::GraphicsLayerDirect2D): Deleted.
557 (WebCore::GraphicsLayerDirect2D::initialize): Deleted.
558 (WebCore::GraphicsLayerDirect2D::~GraphicsLayerDirect2D): Deleted.
559 (WebCore::GraphicsLayerDirect2D::setNeedsDisplay): Deleted.
560 (WebCore::GraphicsLayerDirect2D::setNeedsDisplayInRect): Deleted.
561 * rendering/RenderLayerBacking.cpp:
562 (WebCore::RenderLayerBacking::createGraphicsLayer):
563 (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
564 (WebCore::RenderLayerBacking::updateConfiguration):
565 (WebCore::RenderLayerBacking::updateInternalHierarchy):
566 (WebCore::RenderLayerBacking::updateMaskingLayer):
567 (WebCore::RenderLayerBacking::updateChildClippingStrategy):
568 (WebCore::RenderLayerBacking::updateScrollingLayers):
569 * rendering/RenderLayerBacking.h:
570 * rendering/RenderLayerCompositor.cpp:
571 (WebCore::RenderLayerCompositor::updateCompositingLayers):
572 (WebCore::RenderLayerCompositor::appendDocumentOverlayLayers):
573 (WebCore::RenderLayerCompositor::setCompositingParent):
574 (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
575 (WebCore::RenderLayerCompositor::parentFrameContentLayers):
576 (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
577 (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
578 (WebCore::RenderLayerCompositor::updateLayerForHeader):
579 (WebCore::RenderLayerCompositor::updateLayerForFooter):
580 (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
581 (WebCore::RenderLayerCompositor::ensureRootLayer):
582 (WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):
583 * rendering/RenderLayerCompositor.h:
585 2018-09-12 Alex Christensen <achristensen@webkit.org>
587 Expose fewer of URL's internal members
588 https://bugs.webkit.org/show_bug.cgi?id=189528
590 Reviewed by Chris Dumez.
592 * loader/appcache/ApplicationCacheStorage.cpp:
593 (WebCore::urlHostHash):
595 (WebCore::URL::hostStart const):
596 (WebCore::protocolHostAndPortAreEqual):
597 (WebCore::hostsAreEqual):
599 (WebCore::URL::hostStart const): Deleted.
600 (WebCore::URL::hostEnd const): Deleted.
602 2018-09-12 Basuke Suzuki <Basuke.Suzuki@sony.com>
604 [Curl] Implement correct total received bytes.
605 https://bugs.webkit.org/show_bug.cgi?id=189555
607 Reviewed by Alex Christensen.
609 Curl port only reported total network received bytes before decoding.
611 No new test. InspectorTest is only available for WebKitTestRunner.
613 * platform/network/curl/CurlRequest.cpp:
614 (WebCore::CurlRequest::didReceiveData):
615 (WebCore::CurlRequest::updateNetworkLoadMetrics):
616 * platform/network/curl/CurlRequest.h:
618 2018-09-12 Youenn Fablet <youenn@apple.com>
620 Split RTCRtpParameters idl and header file
621 https://bugs.webkit.org/show_bug.cgi?id=189524
623 Reviewed by Eric Carlson.
625 This will be easier to manage and will allow to more easily introduce sender/receiver parameters.
626 No change of behavior.
629 * DerivedSources.make:
630 * Modules/mediastream/RTCDegradationPreference.h: Copied from Source/WebCore/Modules/mediastream/RTCRtpParameters.h.
631 * Modules/mediastream/RTCDegradationPreference.idl: Added.
632 * Modules/mediastream/RTCDtxStatus.h: Copied from Source/WebCore/Modules/mediastream/RTCRtpParameters.h.
633 * Modules/mediastream/RTCDtxStatus.idl: Added.
634 * Modules/mediastream/RTCPriorityType.h: Copied from Source/WebCore/Modules/mediastream/RTCRtpParameters.h.
635 * Modules/mediastream/RTCPriorityType.idl: Added.
636 * Modules/mediastream/RTCRtpCodecParameters.h: Copied from Source/WebCore/Modules/mediastream/RTCRtpParameters.h.
637 * Modules/mediastream/RTCRtpCodecParameters.idl: Added.
638 * Modules/mediastream/RTCRtpEncodingParameters.h: Copied from Source/WebCore/Modules/mediastream/RTCRtpParameters.h.
639 * Modules/mediastream/RTCRtpEncodingParameters.idl: Added.
640 * Modules/mediastream/RTCRtpFecParameters.h: Copied from Source/WebCore/Modules/mediastream/RTCRtpParameters.h.
641 * Modules/mediastream/RTCRtpFecParameters.idl: Added.
642 * Modules/mediastream/RTCRtpHeaderExtensionParameters.h: Copied from Source/WebCore/Modules/mediastream/RTCRtpParameters.h.
643 * Modules/mediastream/RTCRtpHeaderExtensionParameters.idl: Added.
644 * Modules/mediastream/RTCRtpParameters.h:
645 * Modules/mediastream/RTCRtpParameters.idl:
646 * Modules/mediastream/RTCRtpRtxParameters.h: Copied from Source/WebCore/Modules/mediastream/RTCRtpParameters.h.
647 * Modules/mediastream/RTCRtpRtxParameters.idl: Added.
648 * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
649 (WebCore::toRTCEncodingParameters):
650 (WebCore::fromRTCEncodingParameters):
651 (WebCore::toRTCHeaderExtensionParameters):
652 (WebCore::fromRTCHeaderExtensionParameters):
653 (WebCore::toRTCCodecParameters):
654 (WebCore::toRTCRtpParameters):
655 (WebCore::fromRTCRtpParameters):
657 * WebCore.xcodeproj/project.pbxproj:
659 2018-09-12 Ali Juma <ajuma@chromium.org>
661 [IntersectionObserver] Implement rootMargin expansion
662 https://bugs.webkit.org/show_bug.cgi?id=189525
664 Reviewed by Simon Fraser.
666 Expand the root intersection rectangle by the observer's rootMargin when computing
669 Test: imported/w3c/web-platform-tests/intersection-observer/root-margin.html
672 (WebCore::expandRootBoundsWithRootMargin):
673 (WebCore::computeIntersectionRects):
674 * page/IntersectionObserver.h:
675 (WebCore::IntersectionObserver::rootMarginBox const):
676 * platform/graphics/FloatRect.h:
677 (WebCore::FloatRect::expand):
679 2018-09-12 Fujii Hironori <Hironori.Fujii@sony.com>
681 [Win][Clang] error: non-constant-expression cannot be narrowed from type 'int' to 'SHORT'
682 https://bugs.webkit.org/show_bug.cgi?id=189542
684 Reviewed by Alex Christensen.
686 No new tests (No behavior change).
688 * platform/graphics/win/IntPointWin.cpp:
689 (WebCore::IntPoint::operator POINTS const): Narrowed m_x and m_y by using static_cast.
691 2018-09-12 Guillaume Emont <guijemont@igalia.com>
693 Add IGNORE_WARNING_.* macros
694 https://bugs.webkit.org/show_bug.cgi?id=188996
696 Reviewed by Michael Catanzaro.
698 * Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:
699 * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
700 * accessibility/mac/AXObjectCacheMac.mm:
701 (WebCore::AXObjectCache::postPlatformNotification):
702 * accessibility/mac/AccessibilityObjectMac.mm:
703 (WebCore::AccessibilityObject::overrideAttachmentParent):
704 (WebCore::AccessibilityObject::accessibilityIgnoreAttachment const):
705 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
706 (-[WebAccessibilityObjectWrapper renderWidgetChildren]):
707 (-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
708 (-[WebAccessibilityObjectWrapper role]):
709 (-[WebAccessibilityObjectWrapper roleDescription]):
710 * bridge/objc/WebScriptObject.mm:
711 * bridge/objc/objc_class.mm:
712 (JSC::Bindings::ObjcClass::fieldNamed const):
713 * crypto/CommonCryptoUtilities.cpp:
714 (WebCore::getCommonCryptoDigestAlgorithm):
715 * crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:
716 (WebCore::encryptAES_GCM):
717 (WebCore::decyptAES_GCM):
718 * crypto/mac/SerializedCryptoKeyWrapMac.mm:
719 (WebCore::wrapSerializedCryptoKey):
720 (WebCore::unwrapSerializedCryptoKey):
721 * css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
722 * css/makeSelectorPseudoElementsMap.py:
723 * editing/TextIterator.cpp:
724 * editing/mac/EditorMac.mm:
725 (WebCore::Editor::pasteWithPasteboard):
726 (WebCore::Editor::takeFindStringFromSelection):
727 (WebCore::Editor::replaceNodeFromPasteboard):
728 * page/mac/EventHandlerMac.mm:
729 (WebCore::EventHandler::sendFakeEventsAfterWidgetTracking):
730 * page/mac/ServicesOverlayController.mm:
731 (WebCore::ServicesOverlayController::Highlight::paintContents):
732 * platform/LocalizedStrings.cpp:
733 (WebCore::formatLocalizedString):
734 * platform/ScreenProperties.h:
735 (WebCore::ScreenData::decode):
736 * platform/gamepad/mac/HIDGamepadProvider.cpp:
737 (WebCore::HIDGamepadProvider::stopMonitoringInput):
738 * platform/graphics/PlatformDisplay.cpp:
739 (WebCore::PlatformDisplay::sharedDisplay):
740 * platform/graphics/SurrogatePairAwareTextIterator.cpp:
741 * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
742 (WebCore::MediaSelectionGroupAVFObjC::updateOptions):
743 * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
744 (WebCore::CDMSessionAVStreamSession::update):
745 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
746 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
747 (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTextTrack):
748 (WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack const):
749 (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldDisableSleep):
750 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
751 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
752 (WebCore::IGNORE_CLANG_WARNING_END):
753 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
754 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
755 (-[WebAVSampleBufferErrorListener beginObservingRenderer:]):
756 (-[WebAVSampleBufferErrorListener stopObservingRenderer:]):
757 (-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):
758 (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
759 (WebCore::IGNORE_CLANG_WARNING_END):
760 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
761 (PlatformCALayer::drawLayerContents):
762 * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
763 (WebCore::FontCascade::fontForCombiningCharacterSequence const):
764 * platform/graphics/cg/ImageDecoderCG.cpp:
765 (WebCore::ImageDecoderCG::createFrameImageAtIndex):
766 * platform/graphics/cocoa/GraphicsContextCocoa.mm:
767 (WebCore::GraphicsContext::drawLineForDocumentMarker):
768 * platform/graphics/cocoa/WebGLLayer.h:
769 (IGNORE_CLANG_WARNING):
770 * platform/graphics/mac/ComplexTextControllerCoreText.mm:
771 (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
772 * platform/graphics/mac/IconMac.mm:
773 (WebCore::Icon::Icon):
774 * platform/graphics/mac/PDFDocumentImageMac.mm:
775 (WebCore::PDFDocumentImage::drawPDFPage):
776 * platform/graphics/mac/WebKitNSImageExtras.mm:
777 (-[NSImage _web_lockFocusWithDeviceScaleFactor:]):
778 * platform/ios/DragImageIOS.mm:
779 * platform/mac/DragImageMac.mm:
780 (WebCore::scaleDragImage):
781 (WebCore::createDragImageForLink):
782 * platform/mac/LegacyNSPasteboardTypes.h:
783 * platform/mac/LocalCurrentGraphicsContext.mm:
784 (WebCore::LocalCurrentGraphicsContext::LocalCurrentGraphicsContext):
785 * platform/mac/PasteboardMac.mm:
786 (WebCore::Pasteboard::createForCopyAndPaste):
787 (WebCore::Pasteboard::createForDragAndDrop):
788 (WebCore::setDragImageImpl):
789 * platform/mac/PlatformEventFactoryMac.mm:
790 (WebCore::globalPoint):
791 * platform/mac/SSLKeyGeneratorMac.mm:
792 * platform/mac/ScrollViewMac.mm:
793 (WebCore::ScrollView::platformContentsToScreen const):
794 (WebCore::ScrollView::platformScreenToContents const):
795 * platform/mac/ThemeMac.mm:
796 (WebCore::drawCellFocusRingWithFrameAtTime):
797 * platform/mac/WebPlaybackControlsManager.mm:
798 * platform/mac/WidgetMac.mm:
799 (WebCore::Widget::paint):
800 * platform/mediastream/RealtimeIncomingAudioSource.h:
801 * platform/mediastream/RealtimeIncomingVideoSource.h:
802 * platform/mediastream/RealtimeOutgoingAudioSource.h:
803 * platform/mediastream/RealtimeOutgoingVideoSource.h:
804 * platform/mediastream/libwebrtc/LibWebRTCAudioModule.h:
805 * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
806 * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
807 * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:
808 * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:
809 * platform/network/cf/NetworkStorageSessionCFNet.cpp:
810 * platform/network/cf/ResourceHandleCFNet.cpp:
811 (WebCore::ResourceHandle::createCFURLConnection):
812 * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
813 (WebCore::SocketStreamHandleImpl::reportErrorToClient):
814 * platform/network/create-http-header-name-table:
815 * platform/text/TextEncoding.cpp:
816 * testing/MockLibWebRTCPeerConnection.h:
817 * xml/XPathGrammar.cpp:
819 2018-09-12 Pablo Saavedra <psaavedra@igalia.com>
821 Linking against libWPEWebKit-0.1.so is not posible when WPE is build with ENABLE_VIDEO=OFF and ENABLE_WEB_AUDIO=OFF
822 https://bugs.webkit.org/show_bug.cgi?id=189540
824 Reviewed by Philippe Normand.
828 This issue is related with changes in https://bugs.webkit.org/show_bug.cgi?id=183080
829 This issue is introduced in https://bugs.webkit.org/show_bug.cgi?id=186547
831 No new tests, no changes in the functionality.
833 * platform/GStreamer.cmake:
834 * platform/SourcesGLib.txt:
835 * platform/mediastream/libwebrtc/LibWebRTCProviderGlib.cpp:
836 (WebCore::LibWebRTCProvider::webRTCAvailable):
838 2018-09-11 Zan Dobersek <zdobersek@igalia.com>
840 Unreviewed WPE build fix.
842 * platform/network/soup/SocketStreamHandleImplSoup.cpp:
843 Add extra header inclusions to get this code building after the unified
844 sources system shifted it into a different translation unit.
846 2018-09-11 Basuke Suzuki <Basuke.Suzuki@sony.com>
848 [Curl] WebInspector doesn't display request headers added during processing.
849 https://bugs.webkit.org/show_bug.cgi?id=189531
851 Reviewed by Alex Christensen.
853 While processing the request, Curl port network layer adds some headers to the request
854 such as cookies. Those headers should be displayed in the WebInspector.
856 Tested on MiniBrowser.
858 * platform/network/curl/CurlRequest.cpp:
859 (WebCore::CurlRequest::didReceiveHeader):
860 (WebCore::CurlRequest::didCompleteTransfer):
861 (WebCore::CurlRequest::updateNetworkLoadMetrics):
862 * platform/network/curl/CurlRequest.h:
864 2018-09-11 James Savage <james.savage@apple.com>
867 Expose -apple-system-container-border color to internal web views.
868 https://bugs.webkit.org/show_bug.cgi?id=189178.
870 Reviewed by Timothy Hatcher.
872 * rendering/RenderThemeMac.mm:
873 (WebCore::RenderThemeMac::systemColor const): Add a separate #if block for
874 Mojave. When I used CSSValueAppleSystemFindHighlightBackground as a template
875 for this change, I had to write out the condition in the first change, but
876 mistakenly thought I could reuse the block here. Turns out the versions were
877 different, and I could not.
879 2018-09-11 Youenn Fablet <youenn@apple.com>
881 Remove MediaDevices NoInterfaceObject
882 https://bugs.webkit.org/show_bug.cgi?id=189512
884 Reviewed by Alex Christensen.
886 Covered by rebased WPT tests.
888 * Modules/mediastream/MediaDevices.idl:
890 2018-09-11 Jer Noble <jer.noble@apple.com>
892 [MediaCapabilities] Implement MediaEngineConfigurationFactory registration
893 https://bugs.webkit.org/show_bug.cgi?id=189438
895 Reviewed by Eric Carlson.
897 Implement a mechanism to register platform-specific MediaEngineConfigurationFactory methods, and a mechanism to iterate
898 over those registered factories when createDecodingConfiguration() and createEncodingConfiguration() are called.
900 The Factory has been radically simplified; the concept of MediaEngineDecodingConfiguration
901 and MediaEngineEncodingConfiguration and its subclasess have been removed. Since the primary
902 objects representing video and audio configurations are IDLDictionaries, the native objects
903 are just structs full of POD types (and Strings). Since these have no dependencies on
904 higher-level HTML concepts, they can be moved into platform/ and accessed from there. This
905 patch also converts MediaCapabilitiesInfo to an Interface, so its implementation also can
906 become a struct and live in platform/. The MediaEngineDecodingConfigurationMock and
907 MediaEngineEncodingConfigurationMock have been consolidated in a single class which simply
908 parses MediaDecodingConfiguration and MediaEncodingConifguration objects (now that they live
909 in Platform) and return a MediaCapabilitiesInfo object (now that it does too).
911 * Modules/mediacapabilities/MediaCapabilities.cpp:
912 (WebCore::isValidVideoConfiguration):
913 (WebCore::MediaCapabilities::decodingInfo):
914 (WebCore::MediaCapabilities::encodingInfo):
915 * Modules/mediacapabilities/MediaCapabilitiesInfo.h: Removed.
916 * Modules/mediacapabilities/MediaCapabilitiesInfo.idl:
917 * Modules/mediacapabilities/VideoConfiguration.idl:
919 * WebCore.xcodeproj/project.pbxproj:
920 * platform/MediaCapabilitiesInfo.h: Copied from Source/WebCore/Modules/mediacapabilities/MediaDecodingType.h.
921 * platform/mediacapabilities/AudioConfiguration.h: Renamed from Source/WebCore/Modules/mediacapabilities/AudioConfiguration.h.
922 * platform/mediacapabilities/MediaConfiguration.h: Renamed from Source/WebCore/Modules/mediacapabilities/MediaConfiguration.h.
923 * platform/mediacapabilities/MediaDecodingConfiguration.h: Renamed from Source/WebCore/Modules/mediacapabilities/MediaDecodingConfiguration.h.
924 * platform/mediacapabilities/MediaDecodingType.h: Renamed from Source/WebCore/Modules/mediacapabilities/MediaDecodingType.h.
925 * platform/mediacapabilities/MediaEncodingConfiguration.h: Renamed from Source/WebCore/Modules/mediacapabilities/MediaEncodingConfiguration.h.
926 * platform/mediacapabilities/MediaEncodingType.h: Renamed from Source/WebCore/Modules/mediacapabilities/MediaEncodingType.h.
927 * platform/mediacapabilities/MediaEngineConfiguration.cpp: Removed.
928 * platform/mediacapabilities/MediaEngineConfiguration.h: Removed.
929 * platform/mediacapabilities/MediaEngineConfigurationFactory.cpp:
930 (WebCore::factories):
931 (WebCore::MediaEngineConfigurationFactory::createDecodingConfiguration):
932 (WebCore::MediaEngineConfigurationFactory::createEncodingConfiguration):
933 * platform/mediacapabilities/MediaEngineConfigurationFactory.h:
934 * platform/mediacapabilities/MediaEngineEncodingConfiguration.h: Removed.
935 * platform/mediacapabilities/VideoConfiguration.h: Renamed from Source/WebCore/Modules/mediacapabilities/VideoConfiguration.h.
936 * platform/mediastream/mac/DisplayCaptureSourceCocoa.h:
937 * platform/mock/MediaEngineConfigurationFactoryMock.cpp: Added.
938 (WebCore::canDecodeMedia):
939 (WebCore::canSmoothlyDecodeMedia):
940 (WebCore::canPowerEfficientlyDecodeMedia):
941 (WebCore::canEncodeMedia):
942 (WebCore::canSmoothlyEncodeMedia):
943 (WebCore::canPowerEfficientlyEncodeMedia):
944 (WebCore::MediaEngineConfigurationFactoryMock::createDecodingConfiguration):
945 (WebCore::MediaEngineConfigurationFactoryMock::createEncodingConfiguration):
946 * platform/mock/MediaEngineConfigurationFactoryMock.h: Renamed from Source/WebCore/platform/mediacapabilities/MediaEngineDecodingConfiguration.h.
947 * platform/mock/MediaEngineDecodingConfigurationMock.cpp: Removed.
948 * platform/mock/MediaEngineDecodingConfigurationMock.h: Removed.
949 * platform/mock/MediaEngineEncodingConfigurationMock.cpp: Removed.
950 * platform/mock/MediaEngineEncodingConfigurationMock.h: Removed.
952 2018-09-08 Ryosuke Niwa <rniwa@webkit.org>
954 :first-child, :last-child, :nth-child, and :nth-of-type don't work on shadow root's children
955 https://bugs.webkit.org/show_bug.cgi?id=166748
956 <rdar://problem/29649177>
958 Reviewed by Yusuke Suzuki.
960 Added the support for matching positional pseudo classes. For now, we invalidate whenever a child node
961 of a non-UA ShadowRoot is mutated instead of a fine-grained style invalidation as done for regular elements.
963 Tests: fast/shadow-dom/nth-node-on-shadow-child-invalidation.html
964 fast/shadow-dom/nth-node-on-shadow-child-no-jit.html
965 fast/shadow-dom/nth-node-on-shadow-child.html
967 * css/SelectorChecker.cpp:
968 (WebCore::SelectorChecker::checkOne const):
969 * cssjit/SelectorCompiler.cpp:
970 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateWalkToParentElementOrShadowRoot):
971 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstChild):
972 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsLastChild):
973 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsOnlyChild):
974 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateNthChildParentCheckAndRelationUpdate):
975 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
976 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChildOf):
977 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateNthLastChildParentCheckAndRelationUpdate):
978 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthLastChild):
979 (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthLastChildOf):
980 * dom/ShadowRoot.cpp:
981 (WebCore::ShadowRoot::childrenChanged): Invalidate the subtree whenever a child node is mutated.
983 * domjit/DOMJITHelpers.h:
984 (WebCore::DOMJIT::branchTestIsShadowRootFlagOnNode): Added.
985 (WebCore::DOMJIT::branchTestIsElementOrShadowRootFlagOnNode): Added.
987 2018-09-11 Per Arne Vollan <pvollan@apple.com>
989 Addressing post-review feedback on r235619.
990 https://bugs.webkit.org/show_bug.cgi?id=187925
994 * testing/Internals.cpp:
995 (WebCore::Internals::primaryScreenDisplayID):
996 * testing/Internals.h:
998 2018-09-11 Wenson Hsieh <wenson_hsieh@apple.com>
1000 [macOS] [WK2] Support changing foreground colors via color panel
1001 https://bugs.webkit.org/show_bug.cgi?id=189382
1002 <rdar://problem/44227311>
1004 Reviewed by Ryosuke Niwa.
1006 Small adjustments to support changing foreground text color using NSColorPanel in WebKit2. See comments below.
1007 Tested by FontManagerTests.ChangeFontColorWithColorPanel.
1009 * editing/EditingStyle.cpp:
1010 (WebCore::StyleChange::extractTextStyles):
1012 Support setting foreground text color with alpha by using a styled span element rather than a font element with
1013 attributes. To do this, only populate `StyleChange::m_applyFontColor` if the color is opaque. This is because
1014 the font element does not support `rgba()` syntax, so any font colors here with alpha that are serialized to
1015 `rgba()` result in a garbage value for the computed color style.
1017 * editing/FontAttributeChanges.cpp:
1018 (WebCore::FontAttributeChanges::editAction const):
1020 Add a helper to return the relevant EditAction describing this set of FontAttributeChanges.
1022 * editing/FontAttributeChanges.h:
1023 (WebCore::FontChanges::isEmpty const):
1025 2018-09-11 Yusuke Suzuki <yusukesuzuki@slowstart.org>
1027 Shrink size of ResourseResponseBase
1028 https://bugs.webkit.org/show_bug.cgi?id=189501
1030 Reviewed by Simon Fraser.
1032 We reduce the size of ResourceResponseBase by the following two optimizations.
1034 1. Use bitfields for bool flags and reorder them.
1036 2. Use Markable<> in CacheControlDirectives, which is held by ResourceResponseBase.
1038 This patch reduces the size of ResourceResponseBase from 416 to 392 bytes.
1042 * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
1043 (WebCore::WebCoreAVFResourceLoader::responseReceived):
1044 (WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource):
1045 * platform/network/CacheValidation.h:
1046 (WebCore::CacheControlDirectives::CacheControlDirectives):
1047 * platform/network/ResourceResponseBase.cpp:
1048 (WebCore::ResourceResponseBase::ResourceResponseBase):
1049 (WebCore::ResourceResponseBase::contentRange const):
1050 * platform/network/ResourceResponseBase.h:
1051 (WebCore::ResourceResponseBase::decode):
1053 2018-09-11 Michael Catanzaro <mcatanzaro@igalia.com>
1055 Unreviewed, fix some -Wreturn-type warnings
1057 * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
1058 (WebCore::sourceFromNewReceiver):
1059 * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
1060 (WebCore::toRTCRtpTransceiverDirection):
1061 (WebCore::fromRTCRtpTransceiverDirection):
1063 2018-09-11 Jiewen Tan <jiewen_tan@apple.com>
1065 Unreviewed, a speculative build fix for r235888.
1067 * Modules/mediastream/MediaDevices.h:
1068 Add class Document forward declaration.
1070 2018-09-11 Woodrow Wang <woodrow_wang@apple.com>
1072 Add Web API Statistics Collection
1073 https://bugs.webkit.org/show_bug.cgi?id=187773
1074 <rdar://problem/44155162>
1076 Reviewed by Brent Fulgham.
1078 Added data collection for web API statistics, specifically regarding the canvas, font loads,
1079 screen functions, and navigator functions. The data collection code is placed under a runtime
1080 enabled feature flag. The statistics are stored in a ResourceLoadStatistics object and written
1081 to a plist on disk. Added a new file CanvasActivityRecord.h and CanvasActivityRecord.cpp which
1082 includes a struct to keep track of HTML5 canvas element read and writes.
1084 Tests: http/tests/webAPIStatistics/canvas-read-and-write-data-collection.html
1085 http/tests/webAPIStatistics/font-load-data-collection.html
1086 http/tests/webAPIStatistics/navigator-functions-accessed-data-collection.html
1087 http/tests/webAPIStatistics/screen-functions-accessed-data-collection.html
1090 * WebCore.xcodeproj/project.pbxproj:
1091 * css/CSSFontFaceSource.cpp:
1092 (WebCore::CSSFontFaceSource::load):
1093 * css/CSSFontSelector.cpp:
1094 (WebCore::CSSFontSelector::fontRangesForFamily):
1095 (WebCore::CSSFontSelector::fallbackFontAt):
1097 The following are the functions where we'd like to record a canvas read.
1099 * html/HTMLCanvasElement.cpp:
1100 (WebCore::HTMLCanvasElement::toDataURL):
1101 (WebCore::HTMLCanvasElement::toBlob):
1102 (WebCore::HTMLCanvasElement::getImageData):
1103 (WebCore::HTMLCanvasElement::toMediaSample):
1104 (WebCore::HTMLCanvasElement::captureStream):
1106 The following are the functions where we'd like to record a canvas write.
1108 * html/canvas/CanvasRenderingContext2D.cpp:
1109 (WebCore::CanvasRenderingContext2D::measureText):
1110 (WebCore::CanvasRenderingContext2D::drawTextInternal):
1112 The following files and functions handle the CanvasActivityRecord struct and
1113 its respective functions.
1115 * loader/CanvasActivityRecord.cpp: Added.
1116 (WebCore::CanvasActivityRecord::recordWrittenOrMeasuredText):
1117 (WebCore::CanvasActivityRecord::mergeWith):
1118 * loader/CanvasActivityRecord.h: Added.
1119 (WebCore::CanvasActivityRecord::encode const):
1120 (WebCore::CanvasActivityRecord::decode):
1122 * loader/DocumentThreadableLoader.cpp:
1123 * loader/FrameLoader.cpp:
1124 * loader/ResourceLoadObserver.cpp:
1125 (WebCore::ResourceLoadObserver::logFontLoad):
1126 (WebCore::ResourceLoadObserver::logCanvasRead):
1127 (WebCore::ResourceLoadObserver::logCanvasWriteOrMeasure):
1128 (WebCore::ResourceLoadObserver::logNavigatorAPIAccessed):
1129 (WebCore::ResourceLoadObserver::logScreenAPIAccessed):
1131 Before, entries in the ResourceLoadStatistics involving HashSets used "origin" as the key.
1132 Now the encodeHashSet function has been generalized to take any key to encode the entries
1133 in the HashSet. Also added functionality to encode an OptionSet by converting it to its
1136 * loader/ResourceLoadObserver.h:
1137 * loader/ResourceLoadStatistics.cpp:
1138 (WebCore::encodeHashSet):
1139 (WebCore::encodeOriginHashSet):
1140 (WebCore::encodeOptionSet):
1141 (WebCore::encodeFontHashSet):
1142 (WebCore::encodeCanvasActivityRecord):
1143 (WebCore::ResourceLoadStatistics::encode const):
1144 (WebCore::decodeHashSet):
1145 (WebCore::decodeOriginHashSet):
1146 (WebCore::decodeOptionSet):
1147 (WebCore::decodeFontHashSet):
1148 (WebCore::decodeCanvasActivityRecord):
1149 (WebCore::ResourceLoadStatistics::decode):
1150 (WebCore::navigatorAPIEnumToString):
1151 (WebCore::screenAPIEnumToString):
1152 (WebCore::appendNavigatorAPIOptionSet):
1153 (WebCore::appendScreenAPIOptionSet):
1154 (WebCore::ResourceLoadStatistics::toString const):
1155 (WebCore::ResourceLoadStatistics::merge):
1156 * loader/ResourceLoadStatistics.h:
1157 * loader/ResourceTiming.cpp:
1159 The following are the navigator functions recorded for the web API statistics.
1161 * page/Navigator.cpp:
1162 (WebCore::Navigator::appVersion const):
1163 (WebCore::Navigator::userAgent const):
1164 (WebCore::Navigator::plugins):
1165 (WebCore::Navigator::mimeTypes):
1166 (WebCore::Navigator::cookieEnabled const):
1167 (WebCore::Navigator::javaEnabled const):
1169 The following are the screen functions recorded for the web API statistics.
1172 (WebCore::Screen::height const):
1173 (WebCore::Screen::width const):
1174 (WebCore::Screen::colorDepth const):
1175 (WebCore::Screen::pixelDepth const):
1176 (WebCore::Screen::availLeft const):
1177 (WebCore::Screen::availTop const):
1178 (WebCore::Screen::availHeight const):
1179 (WebCore::Screen::availWidth const):
1181 2018-09-11 Pablo Saavedra <psaavedra@igalia.com>
1183 playbackControlsManagerUpdateTimerFired and
1184 m_playbackControlsManagerUpdateTimer must be
1185 guarded with ENABLE(VIDEO), otherwise the following
1186 error occurs with the VIDEO feature turned off:
1188 error: 'MediaElementSession' has not been declared
1190 Add missing #if ENABLE(VIDEO) Page.cpp and Page.h
1191 https://bugs.webkit.org/show_bug.cgi?id=189500
1193 Reviewed by Anders Carlsson.
1196 (WebCore::Page::Page):
1197 (WebCore::Page::schedulePlaybackControlsManagerUpdate):
1200 2018-09-11 Frederic Wang <fwang@igalia.com>
1202 Refactor filter list checking code
1203 https://bugs.webkit.org/show_bug.cgi?id=185087
1205 Reviewed by Antonio Gomes.
1207 No new tests, behavior unchanged.
1209 * page/animation/KeyframeAnimation.h: Add missing forward-declaration FilterOperations.
1211 == Rolled over to ChangeLog-2018-09-11 ==