1 2018-11-05 Dean Jackson <dino@apple.com>
3 Expose a constructor for PointerEvent from PlatformTouchEvent
4 https://bugs.webkit.org/show_bug.cgi?id=191238
5 <rdar://problem/45795682>
7 Reviewed by Antoine Quint.
9 Implement a constructor that takes a PlatformTouchEvent to
10 create a PointerEvent. At the moment the code to call this
11 constructor will live in WebKitAdditions, so no new tests
14 * SourcesCocoa.txt: Add PointerEventIOS.cpp.
15 * WebCore.xcodeproj/project.pbxproj: Ditto.
16 * dom/EventNames.h: Add macros for pointerdown, pointermove,
17 pointerup, pointercancel.
18 * dom/PointerEvent.cpp: Remove JSC namespace.
19 * dom/PointerEvent.h: Add create and constructor that takes
21 * dom/ios/PointerEventIOS.cpp: Added.
23 2018-11-05 Ryan Haddad <ryanhaddad@apple.com>
25 Unreviewed, rolling out r237785.
27 Introduced layout test and API test failures on macOS and iOS.
31 "[iOS] Issue initial paint soon after the visuallyNonEmpty
33 https://bugs.webkit.org/show_bug.cgi?id=191078
34 https://trac.webkit.org/changeset/237785
36 2018-11-05 Thibault Saunier <tsaunier@igalia.com>
38 [GStreamer][WebRTC] Error out when simulcast is activated
39 https://bugs.webkit.org/show_bug.cgi?id=190678
41 Reviewed by Philippe Normand.
43 Implementing it is not for now yet.
45 Tests for simulcast have been disabled as they now fail (instead of crashing).
47 * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:
48 (WebCore::GStreamerVideoEncoder::InitEncode):
50 2018-11-05 Youenn Fablet <youenn@apple.com>
52 RealtimeOutgoingAudioSource subclasses should observe its source when fully constructed
53 https://bugs.webkit.org/show_bug.cgi?id=191241
55 Reviewed by Eric Carlson.
57 Moving the logic to observe the audio source to the point where the
58 RealtimeOutgoingAudioSource subclass is fully initialized.
59 Covered by existing tests.
61 * platform/mediastream/RealtimeOutgoingAudioSource.cpp:
62 (WebCore::RealtimeOutgoingAudioSource::RealtimeOutgoingAudioSource):
63 (WebCore::RealtimeOutgoingAudioSource::observeSource):
64 * platform/mediastream/RealtimeOutgoingAudioSource.h:
65 * platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceLibWebRTC.cpp:
66 (WebCore::RealtimeOutgoingAudioSourceLibWebRTC::RealtimeOutgoingAudioSourceLibWebRTC):
67 * platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.cpp:
68 (WebCore::RealtimeOutgoingAudioSourceCocoa::RealtimeOutgoingAudioSourceCocoa):
70 2018-11-05 Thibault Saunier <tsaunier@igalia.com>
72 [GStreamer][WebRTC] Add webrtcencoder bin to cleanup and refactor the way we set encoders
73 https://bugs.webkit.org/show_bug.cgi?id=190674
75 Reviewed by Philippe Normand.
77 webrtcencoder is a simple GstBin with a set of well known GStreamer encoders which
78 it can use to implement encoding for different formats exposing a trimmed down unified API.
80 It also adds proper handling of H264 profiles.
82 The added files follow GStreamer coding style as we aim at upstreaming the element
85 This is a refactoring so current tests already cover it.
87 * platform/GStreamer.cmake:
88 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
89 (WebCore::MediaPlayerPrivateGStreamerBase::initializeGStreamerAndRegisterWebKitElements):
90 * platform/mediastream/libwebrtc/GStreamerVideoEncoder.cpp: Added.
91 (gst_webrtc_video_encoder_get_property):
92 (gst_webrtc_video_encoder_set_bitrate):
93 (gst_webrtc_video_encoder_set_format):
94 (gst_webrtc_video_encoder_set_property):
95 (register_known_encoder):
99 (set_bitrate_kbit_per_sec):
100 (set_bitrate_bit_per_sec):
101 (gst_webrtc_video_encoder_class_init):
102 (gst_webrtc_video_encoder_init):
103 * platform/mediastream/libwebrtc/GStreamerVideoEncoder.h: Added.
104 * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:
105 (WebCore::GStreamerVideoEncoder::GStreamerVideoEncoder):
106 (WebCore::GStreamerVideoEncoder::InitEncode):
107 (WebCore::GStreamerVideoEncoder::createEncoder):
108 (WebCore::GStreamerVideoEncoder::AddCodecIfSupported):
109 (WebCore::GStreamerVideoEncoder::ImplementationName const):
110 (WebCore::GStreamerVideoEncoder::SetRestrictionCaps):
112 2018-11-05 Thibault Saunier <tsaunier@igalia.com>
114 [GStreamer][WebRTC] properly mark H.264 stream type in the "decoder"
115 https://bugs.webkit.org/show_bug.cgi?id=190676
117 Reviewed by Philippe Normand.
119 Avoiding to have h264parse make assumption (which might be wrong at some
122 * platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.cpp:
123 (WebCore::GStreamerVideoDecoder::GetCapsForFrame):
125 2018-11-05 Thibault Saunier <tsaunier@igalia.com>
127 [GStreamer] Do not sync libwerbtc stream on the clock
128 https://bugs.webkit.org/show_bug.cgi?id=190677
130 The approach here is basically to let libwebrtc do all the
131 synchronisation for us, and the same way as it is done in apple ports,
132 we basically try to display what libwebrtc outputs as fast as possible.
134 Reviewed by Philippe Normand.
138 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
139 (WebCore::setSyncOnSink):
140 (WebCore::MediaPlayerPrivateGStreamer::syncOnClock):
141 (WebCore::MediaPlayerPrivateGStreamer::loadFull):
142 (WebCore::MediaPlayerPrivateGStreamer::load):
143 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
145 2018-11-05 Ali Juma <ajuma@chromium.org>
147 [IntersectionObserver] Fix isIntersecting computation when 0 is not a threshold
148 https://bugs.webkit.org/show_bug.cgi?id=191210
150 Reviewed by Simon Fraser.
152 isIntersecting should be false if the intersection ratio is smaller than the
153 smallest threshold value. Update the computation of isIntersecting to depend on
154 the current thresholdIndex.
156 Test: imported/w3c/web-platform-tests/intersection-observer/initial-observation-with-threshold-expected.html
159 (WebCore::Document::updateIntersectionObservations):
161 2018-11-05 Rob Buis <rbuis@igalia.com>
163 Remove some virtual methods in CachedRawResource
164 https://bugs.webkit.org/show_bug.cgi?id=191251
166 Reviewed by Frédéric Wang.
168 Since CachedRawResource is final no need to introduce new virtual
169 methods in CachedRawResource. This patch also removes an outdated
170 comment and forward declaration.
172 No new tests since no change in functionality.
174 * loader/cache/CachedRawResource.h:
176 2018-11-05 Philippe Normand <pnormand@igalia.com>
178 [GStreamer] Move elements registration to GStreamerCommon
179 https://bugs.webkit.org/show_bug.cgi?id=191189
181 Reviewed by Xabier Rodriguez-Calvar.
183 It was a bit odd to have this in the base player class and to have
184 sub-classes calling a static function of the super-class.
186 Covered by existing tests.
188 * platform/graphics/gstreamer/GStreamerCommon.cpp:
189 (WebCore::initializeGStreamerAndRegisterWebKitElements):
190 * platform/graphics/gstreamer/GStreamerCommon.h:
191 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
192 (WebCore::MediaPlayerPrivateGStreamer::isAvailable):
193 (WebCore::MediaPlayerPrivateGStreamer::loadFull):
194 (WebCore::MediaPlayerPrivateGStreamer::getSupportedTypes):
195 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
196 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
197 * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
198 (WebCore::MediaPlayerPrivateGStreamerMSE::registerMediaEngine):
199 (WebCore::MediaPlayerPrivateGStreamerMSE::load):
200 (WebCore::MediaPlayerPrivateGStreamerMSE::trackDetected):
201 (WebCore::MediaPlayerPrivateGStreamerMSE::supportsType):
203 2018-11-04 Rob Buis <rbuis@igalia.com>
205 Remove ENABLE_OPENCL fully
206 https://bugs.webkit.org/show_bug.cgi?id=191172
208 Reviewed by Yusuke Suzuki.
210 Forgot to simplify this, no need for applyAll anymore
211 since it just calls apply.
213 No new tests since no change in functionality.
215 * platform/graphics/filters/FilterEffect.h:
216 (WebCore::FilterEffect::applyAll): Deleted.
217 * rendering/svg/RenderSVGResourceFilter.cpp:
218 (WebCore::RenderSVGResourceFilter::postApplyResource):
220 2018-11-04 Zalan Bujtas <zalan@apple.com>
222 [iOS] Issue initial paint soon after the visuallyNonEmpty milestone is fired.
223 https://bugs.webkit.org/show_bug.cgi?id=191078
224 <rdar://problem/45736178>
226 Reviewed by Antti Koivisto.
228 1. Improve visuallyNonEmpty milestone confidence level.
229 Ignore whitespace and non visible text content.
230 Parsing the main document should not necessarily fire the milestone. Check if there's any pending scripts/css/font loading.
231 Check if the html/body is actually visible.
233 2. Issue initial paint soon after the milestone fires.
234 Use a 0ms timer to flush the initial paint.
235 Throttle additional flushes for 500ms (remove the non-initial 1.5 throttling)
237 3. Suspend optional style recalcs and layouts while painting is being throttled.
238 When parsing yields we initiate a 0ms style recalc/layout timer.
239 These optional layouts produce content that we have no intention to paint.
242 (WebCore::Document::scheduleStyleRecalc):
243 (WebCore::Document::shouldScheduleLayout):
244 * page/ChromeClient.h:
245 * page/FrameView.cpp:
246 (WebCore::FrameView::resetLayoutMilestones):
247 (WebCore::FrameView::qualifiesAsVisuallyNonEmpty const):
248 (WebCore::FrameView::updateSignificantRenderedTextMilestoneIfNeeded):
249 (WebCore::FrameView::updateIsVisuallyNonEmpty):
251 (WebCore::FrameView::incrementVisuallyNonEmptyCharacterCount): Ignore whitespace characters. Some pages start with plenty of whitespace only content.
252 * platform/graphics/FontCascade.h:
253 * rendering/RenderText.cpp: Check whether the text is actually visible at this point.
254 (WebCore::RenderText::RenderText):
256 2018-11-04 Zalan Bujtas <zalan@apple.com>
258 [LFC][BFC] Add support for percentage height in quirks mode.
259 https://bugs.webkit.org/show_bug.cgi?id=191232
261 Reviewed by Antti Koivisto.
263 In quirks mode, we go and travers the containing block chain to find a block level
264 box with fixed height value to resolve the percentage value.
266 Test: fast/block/basic/quirk-mode-percent-height.html
268 * layout/FormattingContextGeometry.cpp:
269 (WebCore::Layout::FormattingContext::Geometry::computedHeightValue):
270 * layout/Verification.cpp:
271 (WebCore::Layout::LayoutState::verifyAndOutputMismatchingLayoutTree const):
273 2018-11-04 Zalan Bujtas <zalan@apple.com>
275 [LFC][BCF] Add support for block level non-replaced inflow height percentage
276 https://bugs.webkit.org/show_bug.cgi?id=191229
278 Reviewed by Antti Koivisto.
280 Test: fast/block/basic/child-block-level-box-with-height-percent.html
282 * layout/FormattingContext.h:
283 * layout/FormattingContextGeometry.cpp:
284 (WebCore::Layout::FormattingContext::Geometry::computedHeightValue):
285 (WebCore::Layout::computedHeightValue): Deleted.
286 * layout/blockformatting/BlockFormattingContextGeometry.cpp:
287 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
289 2018-11-04 Youenn Fablet <youenn@apple.com>
291 RealtimeOutgoingAudioSource should use DestructionThread::Main
292 https://bugs.webkit.org/show_bug.cgi?id=191230
294 Reviewed by Eric Carlson.
296 Covered by imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-replaceTrack.https.html
297 that should no longer crash in debug.
299 * platform/mediastream/RealtimeOutgoingAudioSource.h:
301 2018-11-04 Youenn Fablet <youenn@apple.com>
303 IDB should allow storing RTCCertificate
304 https://bugs.webkit.org/show_bug.cgi?id=191077
306 Reviewed by Chris Dumez.
308 Add support for serialization/deserialization of RTCCertificate.
309 Store the origin in RTCCertificate and make sure that a certificate
310 with a different origin cannot be used to create a RTCPeerConnection.
312 Test: imported/w3c/web-platform-tests/webrtc/RTCCertificate-postMessage.html
314 * Modules/mediastream/PeerConnectionBackend.cpp:
315 (WebCore::PeerConnectionBackend::generateCertificate):
316 * Modules/mediastream/RTCCertificate.cpp:
317 (WebCore::RTCCertificate::create):
318 (WebCore::RTCCertificate::RTCCertificate):
319 * Modules/mediastream/RTCCertificate.h:
320 (WebCore::RTCCertificate::origin const):
321 * Modules/mediastream/RTCPeerConnection.cpp:
322 (WebCore::RTCPeerConnection::certificatesFromConfiguration):
323 * Modules/mediastream/RTCPeerConnection.h:
324 * Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.cpp:
325 (WebCore::LibWebRTCCertificateGenerator::RTCCertificateGeneratorCallback::RTCCertificateGeneratorCallback):
326 (WebCore::LibWebRTCCertificateGenerator::generateCertificate):
327 * Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.h:
328 * bindings/js/SerializedScriptValue.cpp:
329 (WebCore::CloneSerializer::dumpIfTerminal):
330 (WebCore::CloneDeserializer::CachedString::takeString):
331 (WebCore::CloneDeserializer::readRTCCertificate):
332 (WebCore::CloneDeserializer::readTerminal):
334 2018-11-04 Youenn Fablet <youenn@apple.com>
336 Add support for RTCMuxPolicy
337 https://bugs.webkit.org/show_bug.cgi?id=191188
339 Reviewed by Eric Carlson.
341 Add support for RTCMuxPolicy dictionary option for both constructor and setConfiguration.
342 Make sure setConfiguration throws if trying to change this policy.
343 Pipe this parameter up to libwebrtc.
344 Covered by rebased test.
346 * Modules/mediastream/RTCConfiguration.h:
347 * Modules/mediastream/RTCConfiguration.idl:
348 * Modules/mediastream/RTCPeerConnection.cpp:
349 (WebCore::iceServersFromConfiguration):
350 (WebCore::RTCPeerConnection::initializeConfiguration):
351 (WebCore::RTCPeerConnection::setConfiguration):
352 * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
353 (WebCore::rtcpMuxPolicyfromConfiguration):
354 (WebCore::configurationFromMediaEndpointConfiguration):
355 * WebCore.xcodeproj/project.pbxproj:
356 * platform/mediastream/MediaEndpointConfiguration.cpp:
357 (WebCore::MediaEndpointConfiguration::MediaEndpointConfiguration):
358 * platform/mediastream/MediaEndpointConfiguration.h:
359 * platform/mediastream/RTCPMuxPolicy.h: Added.
361 2018-11-03 Devin Rousso <drousso@apple.com>
363 Web Inspector: Canvas: capture changes to <canvas> that would affect the recorded context
364 https://bugs.webkit.org/show_bug.cgi?id=190854
366 Reviewed by Matt Baker.
368 Updated existing tests: inspector/canvas/recording-2d.html
369 inspector/canvas/recording-bitmaprenderer.html
370 inspector/canvas/recording-webgl.html
372 * html/HTMLCanvasElement.idl:
373 Apply `CallTracingCallback=recordCanvasAction` to the `width` and `height` attributes so
374 that they are recorded through the same path as `CanvasRenderingContext`.
377 * html/CanvasBase.cpp:
378 (WebCore::CanvasBase::callTracingActive const): Added.
380 * bindings/js/CallTracer.h:
381 * bindings/js/CallTracer.cpp:
382 (WebCore::CallTracer::recordCanvasAction):
385 2018-11-03 Andy Estes <aestes@apple.com>
387 [Payment Request] PaymentResponse.retry()'s errorFields should be optional
388 https://bugs.webkit.org/show_bug.cgi?id=191212
390 Reviewed by Youenn Fablet.
392 Per WebIDL, the errorFields argument to PaymentResponse.retry() should be optional. See
393 <https://github.com/w3c/payment-request/issues/804> for details.
395 Added test case to http/tests/paymentrequest/payment-response-retry-method.https.html.
397 * Modules/paymentrequest/PaymentResponse.idl:
399 2018-11-02 Zalan Bujtas <zalan@apple.com>
401 [LFC][BFC] Resolve percentage height values.
402 https://bugs.webkit.org/show_bug.cgi?id=191224
404 Reviewed by Antti Koivisto.
406 10.5 Content height: the 'height' property
407 The percentage is calculated with respect to the height of the generated box's containing block.
408 If the height of the containing block is not specified explicitly (i.e., it depends on content height),
409 and this element is not absolutely positioned, the used height is calculated as if 'auto' was specified.
411 https://www.w3.org/TR/CSS22/visudet.html#propdef-height
413 Test: fast/block/basic/height-percentage-simple.html
415 * layout/FormattingContextGeometry.cpp:
416 (WebCore::Layout::isHeightAuto):
417 (WebCore::Layout::computedHeightValue):
418 (WebCore::Layout::contentHeightForFormattingContextRoot):
419 (WebCore::Layout::FormattingContext::Geometry::computedMaxHeight):
420 (WebCore::Layout::FormattingContext::Geometry::computedMinHeight):
421 (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
422 (WebCore::Layout::FormattingContext::Geometry::complicatedCases):
423 (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin):
424 (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
426 2018-11-03 Eric Carlson <eric.carlson@apple.com>
428 [MediaStream] enumerateDevices should not expose devices that are not available to getUserMedia
429 https://bugs.webkit.org/show_bug.cgi?id=191177
430 <rdar://problem/45747873>
432 Reviewed by Jer Noble.
434 Test: http/tests/media/media-stream/enumerate-devices-iframe-allow-attribute.html
436 * Modules/mediastream/MediaDevicesRequest.cpp:
437 (WebCore::MediaDevicesRequest::start): Only expose devices that are available to gUM.
439 * Modules/mediastream/UserMediaController.cpp:
440 (WebCore::isSecure): Moved from UserMediaRequest.cpp.
441 (WebCore::isAllowedToUse): Ditto.
442 (WebCore::UserMediaController::canCallGetUserMedia): Modified from UserMediaRequest.cpp.
443 (WebCore::UserMediaController::logGetUserMediaDenial): Log reason for denial.
444 * Modules/mediastream/UserMediaController.h:
446 * Modules/mediastream/UserMediaRequest.cpp:
447 (WebCore::UserMediaRequest::start): Use UserMediaController::canCallGetUserMedia.
448 (WebCore::isSecure): Deleted.
449 (WebCore::isAllowedToUse): Deleted.
450 (WebCore::canCallGetUserMedia): Deleted.
452 2018-11-02 Justin Michaud <justin_michaud@apple.com>
454 Add new global object and preliminary Worklets support for CSS painting api
455 https://bugs.webkit.org/show_bug.cgi?id=190979
457 Reviewed by Chris Dumez.
459 Test: fast/css-custom-paint/worklet.html
461 Add a new ScriptExecutionContext and global object to run worklets in. This is mostly copy+paste
462 from Workers, but without any of the threading. Worklet.addModule does not yet support loading scripts
463 or doing cross origin checking. There are quite a few parts of the ScriptExecutionContext api that are
464 left as ASSERT_NOT_REACHED().
467 * DerivedSources.make:
469 * WebCore.xcodeproj/project.pbxproj:
470 * bindings/js/JSDOMGlobalObject.cpp:
471 (WebCore::JSDOMGlobalObject::scriptExecutionContext const):
472 * bindings/js/JSPaintWorkletGlobalScopeCustom.cpp: Renamed from Source/WebCore/bindings/js/JSCSSPaintWorkletGlobalScopeCustom.cpp.
473 (WebCore::JSPaintWorkletGlobalScope::visitAdditionalChildren):
474 (WebCore::JSPaintWorkletGlobalScope::registerPaint):
475 * bindings/js/JSWorkletGlobalScopeBase.cpp: Added.
476 (WebCore::JSWorkletGlobalScopeBase::JSWorkletGlobalScopeBase):
477 (WebCore::JSWorkletGlobalScopeBase::finishCreation):
478 (WebCore::JSWorkletGlobalScopeBase::clearDOMGuardedObjects):
479 (WebCore::JSWorkletGlobalScopeBase::visitChildren):
480 (WebCore::JSWorkletGlobalScopeBase::destroy):
481 (WebCore::JSWorkletGlobalScopeBase::scriptExecutionContext const):
482 (WebCore::JSWorkletGlobalScopeBase::supportsRichSourceInfo):
483 (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScript):
484 (WebCore::JSWorkletGlobalScopeBase::shouldInterruptScriptBeforeTimeout):
485 (WebCore::JSWorkletGlobalScopeBase::javaScriptRuntimeFlags):
487 (WebCore::toJSWorkletGlobalScope):
488 * bindings/js/JSWorkletGlobalScopeBase.h: Added.
489 (WebCore::JSWorkletGlobalScopeBase::wrapped const):
490 (WebCore::JSWorkletGlobalScopeBase::proxy const):
491 (WebCore::JSWorkletGlobalScopeBase::createStructure):
493 * bindings/js/ScriptState.cpp:
494 (WebCore::execStateFromWorkerGlobalScope):
495 (WebCore::execStateFromWorkletGlobalScope):
496 * bindings/js/ScriptState.h:
497 * bindings/js/WebCoreBuiltinNames.h:
498 * bindings/scripts/CodeGeneratorJS.pm:
500 (ShouldUseGlobalObjectPrototype):
502 (GenerateRuntimeEnableConditionalStringForExposed):
503 (GenerateImplementation):
504 * bindings/scripts/preprocess-idls.pl:
505 * css/CSSPaintImageValue.cpp:
506 (WebCore::CSSPaintImageValue::image):
507 * css/DOMCSSPaintWorklet.cpp:
508 (WebCore::DOMCSSPaintWorklet::ensurePaintWorklet):
509 (WebCore::DOMCSSPaintWorklet::ensurePaintWorkletGlobalScope): Deleted.
510 * css/DOMCSSPaintWorklet.h:
511 * css/DOMCSSPaintWorklet.idl:
513 (WebCore::Document::ensureCSSPaintWorklet):
514 (WebCore::Document::setCSSPaintWorkletGlobalScope):
515 (WebCore::Document::ensureCSSPaintWorkletGlobalScope): Deleted.
517 (WebCore::Document::getCSSPaintWorkletGlobalScope):
518 * dom/EventTargetFactory.in:
519 * dom/ScriptExecutionContext.cpp:
520 (WebCore::ScriptExecutionContext::vm):
521 (WebCore::ScriptExecutionContext::execState):
522 * dom/ScriptExecutionContext.h:
523 (WebCore::ScriptExecutionContext::isWorkletGlobalScope const):
524 * inspector/agents/worker/WorkerDebuggerAgent.cpp:
525 (WebCore::WorkerDebuggerAgent::injectedScriptForEval):
526 * inspector/agents/worker/WorkerRuntimeAgent.cpp:
527 (WebCore::WorkerRuntimeAgent::injectedScriptForEval):
528 * platform/graphics/CustomPaintImage.cpp:
529 (WebCore::CustomPaintImage::CustomPaintImage):
530 (WebCore::CustomPaintImage::doCustomPaint):
531 * platform/graphics/CustomPaintImage.h:
532 * worklets/PaintWorkletGlobalScope.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp.
533 (WebCore::PaintWorkletGlobalScope::create):
534 (WebCore::PaintWorkletGlobalScope::PaintWorkletGlobalScope):
535 (WebCore::PaintWorkletGlobalScope::devicePixelRatio):
536 (WebCore::PaintWorkletGlobalScope::addRegisteredPaint):
537 * worklets/PaintWorkletGlobalScope.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.h.
538 * worklets/PaintWorkletGlobalScope.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl.
539 * worklets/Worklet.cpp: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp.
540 (WebCore::Worklet::create):
541 (WebCore::Worklet::Worklet):
542 (WebCore::Worklet::addModule):
543 * worklets/Worklet.h: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.cpp.
544 * worklets/Worklet.idl: Copied from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl.
545 * worklets/WorkletConsoleClient.cpp: Copied from Source/WebCore/inspector/agents/worker/WorkerDebuggerAgent.cpp.
546 (WebCore::WorkletConsoleClient::WorkletConsoleClient):
547 (WebCore::WorkletConsoleClient::messageWithTypeAndLevel):
548 (WebCore::WorkletConsoleClient::count):
549 (WebCore::WorkletConsoleClient::time):
550 (WebCore::WorkletConsoleClient::timeEnd):
551 (WebCore::WorkletConsoleClient::profile):
552 (WebCore::WorkletConsoleClient::profileEnd):
553 (WebCore::WorkletConsoleClient::takeHeapSnapshot):
554 (WebCore::WorkletConsoleClient::timeStamp):
555 (WebCore::WorkletConsoleClient::record):
556 (WebCore::WorkletConsoleClient::recordEnd):
557 * worklets/WorkletConsoleClient.h: Added.
558 * worklets/WorkletGlobalScope.cpp: Added.
559 (WebCore::WorkletGlobalScope::WorkletGlobalScope):
560 (WebCore::WorkletGlobalScope::~WorkletGlobalScope):
561 (WebCore::WorkletGlobalScope::evaluate):
562 (WebCore::WorkletGlobalScope::isJSExecutionForbidden const):
563 (WebCore::WorkletGlobalScope::disableEval):
564 (WebCore::WorkletGlobalScope::disableWebAssembly):
565 (WebCore::WorkletGlobalScope::completeURL const):
566 (WebCore::WorkletGlobalScope::logExceptionToConsole):
567 (WebCore::WorkletGlobalScope::addConsoleMessage):
568 (WebCore::WorkletGlobalScope::addMessage):
569 * worklets/WorkletGlobalScope.h: Added.
570 (WebCore::WorkletGlobalScope::isPaintWorkletGlobalScope const):
571 (WebCore::WorkletGlobalScope::identifier const):
572 (WebCore::WorkletGlobalScope::script):
573 (WebCore::WorkletGlobalScope::jsRuntimeFlags const):
575 * worklets/WorkletGlobalScope.idl: Renamed from Source/WebCore/css/CSSPaintWorkletGlobalScope.idl.
576 * worklets/WorkletScriptController.cpp: Added.
577 (WebCore::WorkletScriptController::WorkletScriptController):
578 (WebCore::WorkletScriptController::~WorkletScriptController):
579 (WebCore::WorkletScriptController::forbidExecution):
580 (WebCore::WorkletScriptController::isExecutionForbidden const):
581 (WebCore::WorkletScriptController::disableEval):
582 (WebCore::WorkletScriptController::disableWebAssembly):
583 (WebCore::WorkletScriptController::initScriptWithSubclass):
584 (WebCore::WorkletScriptController::initScript):
585 (WebCore::WorkletScriptController::evaluate):
586 (WebCore::WorkletScriptController::setException):
587 * worklets/WorkletScriptController.h: Added.
588 (WebCore::WorkletScriptController::workletGlobalScopeWrapper):
589 (WebCore::WorkletScriptController::vm):
590 (WebCore::WorkletScriptController::initScriptIfNeeded):
592 2018-11-02 Myles C. Maxfield <mmaxfield@apple.com>
594 Clean up drawLineForDocumentMarker()
595 https://bugs.webkit.org/show_bug.cgi?id=191215
597 Reviewed by Zalan Bujtas.
599 In preparation for https://bugs.webkit.org/show_bug.cgi?id=190764, I need to do a little bit of refactoring.
600 This patch has no behavior change; it just does the following:
602 1. Renames drawLineForDocumentMarker() to drawDotsForDocumentMarker(), because 2 of the 3 implementations draw dots
603 2. Moves our implementation back into GraphicsContext, because it's simpler and GraphicsContext is already platform-
605 3. The signature used to accept a location and a width, but without a height, it's difficult to know what the bounding
606 box is. In particular, knowing the bounding box must be possible without a GraphicsContext. So, I've modified
607 the signature to accept a rectangle instead. The GraphicsContext draws only within this rectangle.
609 No new tests because there is no behavior change.
611 * platform/graphics/GraphicsContext.h:
612 * platform/graphics/GraphicsContextImpl.h:
613 * platform/graphics/cairo/CairoOperations.cpp:
614 (WebCore::Cairo::drawDotsForDocumentMarker):
615 (WebCore::Cairo::drawLineForDocumentMarker): Deleted.
616 * platform/graphics/cairo/CairoOperations.h:
617 * platform/graphics/cairo/GraphicsContextCairo.cpp:
618 (WebCore::GraphicsContext::drawDotsForDocumentMarker):
619 (WebCore::GraphicsContext::drawLineForDocumentMarker): Deleted.
620 * platform/graphics/cairo/GraphicsContextImplCairo.cpp:
621 (WebCore::GraphicsContextImplCairo::drawDotsForDocumentMarker):
622 (WebCore::GraphicsContextImplCairo::drawLineForDocumentMarker): Deleted.
623 * platform/graphics/cairo/GraphicsContextImplCairo.h:
624 * platform/graphics/cocoa/FontCascadeCocoa.mm:
625 * platform/graphics/cocoa/GraphicsContextCocoa.mm:
626 (WebCore::colorForMarkerLineStyle):
627 (WebCore::GraphicsContext::drawDotsForDocumentMarker):
628 (WebCore::GraphicsContext::drawLineForDocumentMarker): Deleted.
629 * platform/graphics/displaylists/DisplayListItems.cpp:
630 (WebCore::DisplayList::Item::sizeInBytes):
631 (WebCore::DisplayList::DrawDotsForDocumentMarker::apply const):
632 (WebCore::DisplayList::DrawDotsForDocumentMarker::localBounds const):
633 (WebCore::DisplayList::operator<<):
634 (WebCore::DisplayList::DrawLineForDocumentMarker::apply const): Deleted.
635 (WebCore::DisplayList::DrawLineForDocumentMarker::localBounds const): Deleted.
636 * platform/graphics/displaylists/DisplayListItems.h:
637 (WebCore::DisplayList::DrawDotsForDocumentMarker::create):
638 (WebCore::DisplayList::DrawDotsForDocumentMarker::rect const):
639 (WebCore::DisplayList::DrawDotsForDocumentMarker::DrawDotsForDocumentMarker):
640 (WebCore::DisplayList::DrawLineForDocumentMarker::create): Deleted.
641 (WebCore::DisplayList::DrawLineForDocumentMarker::point const): Deleted.
642 (WebCore::DisplayList::DrawLineForDocumentMarker::width const): Deleted.
643 (WebCore::DisplayList::DrawLineForDocumentMarker::DrawLineForDocumentMarker): Deleted.
644 * platform/graphics/displaylists/DisplayListRecorder.cpp:
645 (WebCore::DisplayList::Recorder::drawDotsForDocumentMarker):
646 (WebCore::DisplayList::Recorder::drawLineForDocumentMarker): Deleted.
647 * platform/graphics/displaylists/DisplayListRecorder.h:
648 * platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:
649 (Nicosia::CairoOperationRecorder::drawDotsForDocumentMarker):
650 (Nicosia::CairoOperationRecorder::drawLineForDocumentMarker): Deleted.
651 * platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h:
652 * platform/graphics/win/GraphicsContextCGWin.cpp:
653 (WebCore::GraphicsContext::drawDotsForDocumentMarker):
654 (WebCore::GraphicsContext::drawLineForDocumentMarker): Deleted.
655 * platform/graphics/win/GraphicsContextDirect2D.cpp:
656 (WebCore::GraphicsContext::drawDotsForDocumentMarker):
657 (WebCore::GraphicsContext::drawLineForDocumentMarker): Deleted.
658 * rendering/InlineTextBox.cpp:
659 (WebCore::InlineTextBox::paintPlatformDocumentMarker):
660 * rendering/RenderTheme.cpp:
661 (WebCore::RenderTheme::drawLineForDocumentMarker): Deleted.
662 * rendering/RenderTheme.h:
663 * rendering/RenderThemeCocoa.h:
664 * rendering/RenderThemeCocoa.mm:
665 (WebCore::RenderThemeCocoa::drawLineForDocumentMarker): Deleted.
666 * rendering/RenderThemeIOS.h:
667 * rendering/RenderThemeIOS.mm:
668 (WebCore::RenderThemeIOS::colorForMarkerLineStyle): Deleted.
669 * rendering/RenderThemeMac.h:
670 * rendering/RenderThemeMac.mm:
671 (WebCore::RenderThemeMac::colorForMarkerLineStyle): Deleted.
673 2018-11-02 Ali Juma <ajuma@chromium.org>
675 requestAnimationFrame causes bad location of position:fixed inside overflow:auto and iframe
676 https://bugs.webkit.org/show_bug.cgi?id=176243
678 Reviewed by Simon Fraser.
680 When a new layer tree is committed to the UIProcess, the positions of layers for fixed
681 or sticky nodes in the newly-committed tree can be stale, because of scrolling that has
682 happened in the UIProcess since the tree was updated in the WebProcess. To handle this,
683 RemoteLayerTreeDrawingAreaProxy::commitLayerTree updates the positions of these layers
684 by calling RemoteScrollingCoordinatorProxy::viewportChangedViaDelegatedScrolling, which
685 leads to a recursive traversal of the ScrollingTree to update each such layer. However,
686 since ScrollingTreeFrameScrollingNodeIOS didn't implement updateLayersAfterAncestorChange,
687 this traversal never descended into scrolling nodes within an iframe, so the layers for
688 these nodes were left with stale positions.
690 Implement ScrollingTreeFrameScrollingNodeIOS::updateLayersAfterAncestorChange so that
691 fixed and sticky layers within an iframe do get their positions updated when a new layer
694 * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
695 * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
696 (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateLayersAfterAncestorChange):
698 2018-11-02 Wenson Hsieh <wenson_hsieh@apple.com>
700 [iOS] Changing view scale sometimes does not zoom the page to the new initial scale, when the page is at initial scale
701 https://bugs.webkit.org/show_bug.cgi?id=191180
702 <rdar://problem/45744786>
704 Reviewed by Simon Fraser.
706 When computing the minimum scale in ViewportConfiguration::minimumScale, if our content width or height is
707 shorter than the view width or height, then we recompute the minimum scale such that the content dimensions will
708 fill the bounds of the view by setting the minimum scale to the view width or height divided by the content
711 Suppose the minimum scale is equal to some value `s`; additionally, let `w_c` denote the content width and `w_v`
712 denote the view width (as integers). If `w_v / s` is not an integral value, the computed content width `w_c` may
713 be rounded, such that `w_v / w_c` is not precisely equal to `s`. In the case that `w_v / w_c` is ever so
714 slightly larger than `s`, we will end up overriding the minimum scale `s` with `w_v / w_c`.
716 As a result, specifying a viewport with a decimal `minimum-scale` will sometimes cause the computed minimum
717 scale of the viewport (and platform view) to be very slightly different from the minimum scale. The new layout
718 test below exercises this scenario, specifying a viewport with minimum and initial scales of 0.94 that results
719 in `ViewportConfiguration::minimumScale` returning 0.94158.
721 With the `WebPage::setViewportConfigurationViewLayoutSize` check added in r237127, this means setting
722 `_viewScale:` when the page is at initial scale sometimes doesn't zoom the page to the new initial scale when it
723 should, since the page scale factor and the initial scale are different enough such that
724 `areEssentiallyEqualAsFloat` returns false.
726 This patch addresses these issues by snapping to the minimum scale if the computed scale that fits content
727 dimensions to view dimensions results in a minimum scale that is close enough to the configuration's minimum
728 scale, such that the difference can be attributed to rounding error when computing content or view dimensions.
730 Test: fast/viewport/ios/viewport-minimum-and-initial-scale.html
732 * page/ViewportConfiguration.cpp:
733 (WebCore::ViewportConfiguration::minimumScale const):
735 2018-11-02 Philippe Normand <pnormand@igalia.com>
737 [GTK][WPE] Unreviewed, another --no-video --no-web-audio build fix following r237677
739 * inspector/agents/InspectorDOMAgent.cpp:
740 (WebCore::InspectorDOMAgent::addEventListenersToNode):
742 2018-11-02 Daniel Bates <dabates@apple.com>
744 [iOS] Normalize character string based on key code
745 https://bugs.webkit.org/show_bug.cgi?id=191120
747 Reviewed by Tim Horton.
749 Following r236417 (https://bugs.webkit.org/show_bug.cgi?id=189604) we always have a valid key code
750 for a special key (e.g. page up) and can simplify the character string normalization code.
752 No functionality changed. So, no new tests.
754 * platform/ios/WebEvent.mm:
755 (normalizedStringWithAppKitCompatibilityMapping): Modified to take a key code and wrote algorithm
758 (-[WebEvent initWithKeyEventType:timeStamp:characters:charactersIgnoringModifiers:modifiers:isRepeating:withFlags:keyCode:isTabKey:characterSet:]):
759 (-[WebEvent initWithKeyEventType:timeStamp:characters:charactersIgnoringModifiers:modifiers:isRepeating:withFlags:withInputManagerHint:keyCode:isTabKey:]):
760 Pass the key code for the event to normalizedStringWithAppKitCompatibilityMapping().
762 2018-11-02 Daniel Bates <dabates@apple.com>
764 [iOS] WebKit should dispatch DOM events when a modifier key is pressed
765 https://bugs.webkit.org/show_bug.cgi?id=190487
767 Reviewed by Tim Horton.
769 Add support for modifier flags change events.
771 * platform/ios/PlatformEventFactoryIOS.mm:
772 (WebCore::modifiersForEvent): Modifier keys do not have an associated character and do not
773 participate in key repeat.
774 (WebCore::keyIdentifierForKeyEvent): Identify modifier keys, returning "Unidentified" if
775 the modifier key is unidentified. This matches the behavior on Mac.
776 (WebCore::keyForKeyEvent): Identify modifier keys, returning the empty string if the modifier
777 key is unidentified. This matches the behavior on Mac.
778 (WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder):
779 * platform/ios/WebEvent.h:
781 * platform/ios/WebEvent.mm:
782 (-[WebEvent initWithKeyEventType:timeStamp:characters:charactersIgnoringModifiers:modifiers:isRepeating:withFlags:keyCode:isTabKey:characterSet:]):
783 (-[WebEvent initWithKeyEventType:timeStamp:characters:charactersIgnoringModifiers:modifiers:isRepeating:withFlags:withInputManagerHint:keyCode:isTabKey:]):
784 Modifier keys do not have an associated character and do not participate in key repeat.
786 (-[WebEvent _eventDescription]): Modified to print a description for a keydown or keyup event
787 that represents a modifier flags change.
788 (-[WebEvent characters]): Modifier keys do not have an associated character. Assert this
789 invariant as it is a programming error. On Mac, the same operation would result in a
790 NSInternalInconsistencyException exception being raised.
791 (-[WebEvent charactersIgnoringModifiers]): Ditto.
793 2018-11-02 Ali Juma <ajuma@chromium.org>
795 Allow cross-document intersection observing
796 https://bugs.webkit.org/show_bug.cgi?id=165746
798 Reviewed by Simon Fraser.
800 Add logic to compute the intersection between the viewport and an element in a
803 Add a FloatRect version of ScrollView::rootViewToContents, and FloatRect versions
804 of the methods it calls.
806 Test: http/tests/intersection-observer/intermediate-frame-changes.html
807 Also covered by rebased tests in imported/w3c/web-platform-tests/intersection-observer.
810 (WebCore::computeClippedRectInRootContentsSpace):
811 (WebCore::computeIntersectionState):
812 (WebCore::Document::updateIntersectionObservations):
813 * page/FrameView.cpp:
814 (WebCore::FrameView::viewportContentsChanged):
815 (WebCore::FrameView::convertFromContainingViewToRenderer const):
816 (WebCore::FrameView::convertFromContainingView const):
818 * platform/ScrollView.cpp:
819 (WebCore::ScrollView::viewToContents const):
820 (WebCore::ScrollView::contentsToView const):
821 (WebCore::ScrollView::rootViewToContents const):
822 * platform/ScrollView.h:
823 * platform/Widget.cpp:
824 (WebCore::Widget::convertFromRootView const):
825 (WebCore::Widget::convertFromContainingView const):
828 2018-11-02 Rob Buis <rbuis@igalia.com>
830 Remove ENABLE_OPENCL fully
831 https://bugs.webkit.org/show_bug.cgi?id=191172
833 Reviewed by Yusuke Suzuki.
835 No new tests since no change in functionality.
837 * platform/graphics/filters/FilterEffect.h:
838 (WebCore::FilterEffect::hasResult const):
839 (WebCore::FilterEffect::applyAll):
840 (WebCore::FilterEffect::openCLImage): Deleted.
841 (WebCore::FilterEffect::setOpenCLImage): Deleted.
843 2018-11-02 Zalan Bujtas <zalan@apple.com>
845 [LFC][IFC] Add support for intrinsic width calculation
846 https://bugs.webkit.org/show_bug.cgi?id=191144
848 Reviewed by Antti Koivisto.
850 This is the inline formatting version of the shrink-to-fit computation. It generates inline runs
851 and uses InlineLineBreaker to compute min/max width. This is very similar to ::layout.
853 Test: fast/inline/simple-shrink-to-fit-inline-block.html
855 * layout/inlineformatting/InlineFormattingContext.cpp:
856 (WebCore::Layout::InlineFormattingContext::layout const):
857 (WebCore::Layout::InlineFormattingContext::computeWidthAndMargin const):
858 (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin const):
859 (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot const):
860 (WebCore::Layout::InlineFormattingContext::computeWidthAndHeightForReplacedInlineBox const):
861 (WebCore::Layout::InlineFormattingContext::collectInlineContent const):
862 (WebCore::Layout::InlineFormattingContext::instrinsicWidthConstraints const):
863 (WebCore::Layout::InlineFormattingContext::computeWidthAndHeightForInlineBox const): Deleted.
864 * layout/inlineformatting/InlineFormattingContext.h:
866 2018-11-02 Zalan Bujtas <zalan@apple.com>
868 [LFC][BFC] BlockFormattingContext::instrinsicWidthConstraints logic should look similar to ::layout
869 https://bugs.webkit.org/show_bug.cgi?id=191181
871 Reviewed by Antti Koivisto.
873 * layout/blockformatting/BlockFormattingContext.cpp:
874 (WebCore::Layout::BlockFormattingContext::instrinsicWidthConstraints const):
876 2018-11-02 Zalan Bujtas <zalan@apple.com>
878 [LFC] Align shrink-to-fit width computation with the layout implementation.
879 https://bugs.webkit.org/show_bug.cgi?id=191179
881 Reviewed by Antti Koivisto.
883 There are many similarities between layout and shrink-to-fit.
884 They both operate on formatting roots only (shrink-to-fit -> float, out-of-flow, inline-block) and in both cases
885 the algoritm depends on what type of formatting context the element establishes.
887 This patch is in preparation for transforming the "shrink-to-fit" width computation to make it behave more like layout.
888 With this change the instrinsicWidthConstraints() computation happens in the formatting context that the element establishes (similar to layout).
890 * layout/FormattingContext.cpp:
891 (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry const):
892 * layout/FormattingContext.h:
893 (WebCore::Layout::FormattingContext::Geometry::outOfFlowHorizontalGeometry):
894 (WebCore::Layout::FormattingContext::Geometry::floatingWidthAndMargin):
895 (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
896 (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
897 * layout/FormattingContextGeometry.cpp:
898 (WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
899 (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
900 (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
901 (WebCore::Layout::FormattingContext::Geometry::outOfFlowHorizontalGeometry):
902 (WebCore::Layout::FormattingContext::Geometry::floatingWidthAndMargin):
903 * layout/blockformatting/BlockFormattingContext.cpp:
904 (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin const):
905 (WebCore::Layout::BlockFormattingContext::instrinsicWidthConstraints const):
906 * layout/blockformatting/BlockFormattingContext.h:
907 * layout/inlineformatting/InlineFormattingContext.cpp:
908 (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot const):
909 (WebCore::Layout::InlineFormattingContext::instrinsicWidthConstraints const):
910 * layout/inlineformatting/InlineFormattingContext.h:
911 * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
912 (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
914 2018-11-01 Antoine Quint <graouts@apple.com>
916 [Web Animations] Make document.getAnimations() return declarative animations in the correct order
917 https://bugs.webkit.org/show_bug.cgi?id=191153
919 Reviewed by Dean Jackson.
921 The Web Animations spec has the notion of "composite order" which determines the order in which animations should
922 be returned when document.getAnimations() is called. The CSS Transitions and CSS Animations specifications also
923 determine the composite order of their respective animation classes, as well as the notion of "owning element",
924 the element that was the animation target when specified through style, prior to any manipulation via the Web
925 Animations API. We implement these two notions so that we can pass the document.getAnimations() tests for
926 declarative animations.
928 It is important that we have the notion of an "owning element" since when a CSS Transition or CSS Animation is
929 modified via the Web Animations API in a way that an animation created through CSS we must consider no longer
930 as a declarative animation but as a regular Web Animation. In this patch, we remove the DeclarativeAnimation's
931 target(), which returned a reference, to owningElement(), which returns a pointer and return nullptr once the
932 declarative animation has been modified.
934 In order to also keep a correct count of declarative animations applied to elements, we correctly add transitions
935 that have completed to a list of completed transitions, as specified by the CSS Transitions spec. We have had this
936 list declared in AnimationTimeline.h for a while but never actually did the work to add items to it. Thanks to that,
937 AnimationTimeline::updateCSSTransitionsForElement() now correctly accounts for completed transitions so that they
938 may be canceled if overridden with a new animation, correctly removing their "owning element".
940 Finally, now that we have saner lists of animations per classes, we can apply the right sorting routines to match
941 the composite order for CSS Transitions, CSS Animations and Web Animations, keeping a list of all animations created
942 in order as the final criterion for sorting.
944 * animation/AnimationTimeline.cpp:
945 (WebCore::AnimationTimeline::animationTimingDidChange): Make sure this animation is tracked on the list of all animations
946 created for this timeline in the order in which they were created, which is needed to sort animations correctly when
947 document.getAnimations() is called.
948 (WebCore::AnimationTimeline::animationWasAddedToElement): We've removed the relevantMapForAnimation() method which we used
949 to determine which map we should add an animation to based on its class and instead have code that accounts for not just
950 the animation's class, but also whether it has an owning element since a valid owning element is required to qualify as
951 a CSS Transition or CSS Animation, regardless of the animation's original class.
952 (WebCore::removeAnimationFromMapForElement): Adding this helper to remove an animation from the provided animation map so
953 that animationWasRemovedFromElement() can call this with all of the various animation maps.
954 (WebCore::AnimationTimeline::animationWasRemovedFromElement): Check all of the various animation maps to see which may
955 contain the animation we're trying to remove as the owning element might have been cleared by the time this function is
956 called and looking at the animation's class would not be sufficient to determine which animation map the animation was in.
957 (WebCore::AnimationTimeline::removeDeclarativeAnimationFromListsForOwningElement): New function in which the logic from
958 animationWasRemovedFromElement() that dealt with removing animations from the list of running CSS Animations/Transitions as
959 well as completed CSS Transitions was factored out. This allowed us to also call this function from
960 DeclarativeAnimation::disassociateFromOwningElement().
961 (WebCore::AnimationTimeline::elementWasRemoved): We no longer need to remove an animation as canceling it will remove it
962 correctly when DocumentTimeline::updateAnimationsAndSendEvents() is called.
963 (WebCore::AnimationTimeline::updateCSSAnimationsForElement): Call cancelDeclarativeAnimation() instead of the removed
964 cancelOrRemoveDeclarativeAnimation() when a CSS Animation should be canceled.
965 (WebCore::AnimationTimeline::ensureRunningTransitionsByProperty): Now that we correctly remove transitions from the list
966 of running transitions once they've completed or have been canceled, we need a helper to always get a valid map of running
967 transitions for a given element as that map can be cleared while updateCSSTransitionsForElement() is running.
968 (WebCore::AnimationTimeline::updateCSSTransitionsForElement): Call cancelDeclarativeAnimation() instead of the removed
969 cancelOrRemoveDeclarativeAnimation() when a CSS Transition should be canceled. Additionally we always get the list of running
970 transitions for a given element as it can be cleared by a prior cancelation.
971 (WebCore::AnimationTimeline::cancelDeclarativeAnimation): New function replacing cancelOrRemoveDeclarativeAnimation() in which
972 we call the new DeclarativeAnimation::cancelFromStyle() function on the provided animation and then remove the animation from
973 all known lists, including the new list of all animations. We do this final part so that the animation gets re-added as if it
974 were a new animation since canceling a declarative animation via a style change removes its declarative-ness. This guarantees
975 that a declarative animation that is canceled through style but then resumed through the Web Animations API sorts after any
976 declarative animation with an owning element.
977 (WebCore::AnimationTimeline::relevantMapForAnimation): Deleted.
978 (WebCore::AnimationTimeline::cancelOrRemoveDeclarativeAnimation): Deleted.
979 * animation/AnimationTimeline.h:
980 (WebCore::AnimationTimeline::timingModelDidChange): Deleted. This was left over in the patch where we implemented the "update
981 animations and send events" procedure.
982 (WebCore::AnimationTimeline::animations const): Deleted.
983 * animation/CSSAnimation.cpp:
984 (WebCore::CSSAnimation::create): Some refactoring to make the handling of a declarative animation's owning element part of the
985 DeclarativeAnimation constructor.
986 * animation/CSSTransition.cpp:
987 (WebCore::CSSTransition::create): Some refactoring to make the handling of a declarative animation's owning element part of the
988 DeclarativeAnimation constructor.
989 * animation/DeclarativeAnimation.cpp:
990 (WebCore::DeclarativeAnimation::DeclarativeAnimation):
991 (WebCore::DeclarativeAnimation::tick): Make sure we disassociate from the animation's owning element once we transition from a
992 relevant state to an idle state. This will catch any changes made via the Web Animations API to a declarative animation when the
993 "update animations and send events" procedure is run.
994 (WebCore::DeclarativeAnimation::disassociateFromOwningElement): Remove this animation from the list of declarative animations on
995 the associated timeline and make owningElement() nullptr so that document.getAnimations() will know to sort this animation with other
996 Web Animations created via the Web Animations API.
997 (WebCore::DeclarativeAnimation::initialize):
998 (WebCore::DeclarativeAnimation::cancelFromStyle): New method called from AnimationTimeline::cancelDeclarativeAnimation() which
999 cancels the animation but also disassociates it from its owning element.
1000 (WebCore::DeclarativeAnimation::invalidateDOMEvents):
1001 (WebCore::DeclarativeAnimation::enqueueDOMEvent):
1002 * animation/DeclarativeAnimation.h:
1003 (WebCore::DeclarativeAnimation::owningElement const):
1004 (WebCore::DeclarativeAnimation::target const): Deleted.
1005 * animation/DocumentTimeline.cpp:
1006 (WebCore::compareDeclarativeAnimationOwningElementPositionsInDocumentTreeOrder): Adding a new utility used when sorting both
1007 CSS Transitions and CSS Animations by tree order when their owning element differ, with special logic for pseudo-elements.
1008 (WebCore::DocumentTimeline::getAnimations const): Filter and sort animations according to their composite order.
1009 (WebCore::DocumentTimeline::updateAnimationsAndSendEvents): Compile a list of transitions that move to a finished state to
1010 the list of completed transitions so that they may be canceled correctly in AnimationTimeline::updateCSSTransitionsForElement().
1011 (WebCore::DocumentTimeline::transitionDidComplete):
1012 * animation/DocumentTimeline.h:
1014 2018-11-02 Zan Dobersek <zdobersek@igalia.com>
1016 PNGImageDecoder: report no repetition for non-animated images
1017 https://bugs.webkit.org/show_bug.cgi?id=191068
1019 Reviewed by Michael Catanzaro.
1021 When building with APNG support enabled, the
1022 PNGImageDecoder::repetitionCount() method until now reported infinite
1023 repetition count for all PNG images, even the ones that were not
1024 animated. This is now changed so that no repetition is reported for
1025 non-animated images.
1027 * platform/image-decoders/png/PNGImageDecoder.cpp:
1028 (WebCore::PNGImageDecoder::repetitionCount const):
1030 2018-11-02 Justin Fan <justin_fan@apple.com>
1032 [WebGPU] Experimental prototype for MSL shaders
1033 https://bugs.webkit.org/show_bug.cgi?id=191084
1035 Reviewed by Dean Jackson.
1037 Begin implementation for WebGPUDevice and WebGPUShaderModule and associated descriptor objects.
1039 Test: webgpu/webgpu-basics.html
1040 Test: webgpu/shader-modules.html
1043 * DerivedSources.make:
1044 * Modules/webgpu/GPUDevice.cpp:
1045 (WebCore::GPUDevice::createShaderModule const):
1046 * Modules/webgpu/GPUDevice.h:
1047 (WebCore::GPUDevice::platformDevice const):
1048 * Modules/webgpu/GPUShaderModule.h:
1049 (WebCore::GPUShaderModule::platformShaderModule const):
1050 * Modules/webgpu/GPUShaderModuleDescriptor.h:
1051 * Modules/webgpu/WebGPU.cpp:
1052 (WebCore::WebGPU::requestAdapter const):
1053 * Modules/webgpu/WebGPUAdapter.cpp:
1054 (WebCore::WebGPUAdapter::create):
1055 (WebCore::WebGPUAdapter::createDevice):
1056 * Modules/webgpu/WebGPUAdapter.h:
1057 * Modules/webgpu/WebGPUAdapter.idl:
1058 * Modules/webgpu/WebGPUDevice.cpp:
1059 (WebCore::WebGPUDevice::create):
1060 (WebCore::WebGPUDevice::WebGPUDevice):
1061 (WebCore::WebGPUDevice::createShaderModule const):
1062 * Modules/webgpu/WebGPUDevice.h:
1063 * Modules/webgpu/WebGPUDevice.idl:
1064 * Modules/webgpu/WebGPUShaderModule.cpp:
1065 (WebCore::WebGPUShaderModule::create):
1066 (WebCore::WebGPUShaderModule::WebGPUShaderModule):
1067 * Modules/webgpu/WebGPUShaderModule.h:
1068 * Modules/webgpu/WebGPUShaderModule.idl:
1069 * Modules/webgpu/WebGPUShaderModuleDescriptor.h:
1070 * Modules/webgpu/WebGPUShaderModuleDescriptor.idl:
1071 * Modules/webgpu/WebGPUSwapChain.cpp:
1072 (WebCore::WebGPUSwapChain::configure):
1073 * Modules/webgpu/WebGPUSwapChain.h:
1074 * Modules/webgpu/WebGPUSwapChain.idl:
1075 * Modules/webgpu/cocoa/GPUDeviceMetal.mm:
1076 (WebCore::GPUDevice::create):
1077 (WebCore::GPUDevice::GPUDevice):
1078 * Modules/webgpu/cocoa/GPUShaderModuleMetal.mm:
1079 (WebCore::GPUShaderModule::create):
1080 (WebCore::GPUShaderModule::GPUShaderModule):
1083 * WebCore.xcodeproj/project.pbxproj:
1084 * bindings/js/WebCoreBuiltinNames.h:
1085 * platform/Logging.h:
1087 2018-11-01 Jiewen Tan <jiewen_tan@apple.com>
1089 Replace CommonRandom SPI with API
1090 https://bugs.webkit.org/show_bug.cgi?id=191178
1091 <rdar://problem/45722391>
1093 Reviewed by Brent Fulgham.
1095 The API is available since macOS 10.10 and iOS 10, and therefore it is safe to replace
1096 all SPI usages with API.
1098 No change of behaviors.
1100 * crypto/CommonCryptoUtilities.h:
1101 * crypto/mac/CryptoKeyMac.cpp:
1102 (WebCore::CryptoKey::randomData):
1103 * crypto/mac/SerializedCryptoKeyWrapMac.mm:
1104 (WebCore::createAndStoreMasterKey):
1105 (WebCore::wrapSerializedCryptoKey):
1107 (WebCore::Crypto::getRandomValues):
1109 2018-11-01 Chris Dumez <cdumez@apple.com>
1111 [WebIDL] Rename CallWith=ScriptState to CallWith=ExecState
1112 https://bugs.webkit.org/show_bug.cgi?id=191162
1114 Reviewed by Alex Christensen.
1116 Rename CallWith=ScriptState to CallWith=ExecState in our Web IDL as ScriptState is no longer a thing
1117 in modern WebKit. The implementation is actually passed an ExecState nowadays.
1119 * Modules/applepay/ApplePaySession.idl:
1120 * Modules/encryptedmedia/MediaKeyStatusMap.idl:
1121 * Modules/fetch/FetchBody.idl:
1122 * Modules/indexeddb/IDBCursor.idl:
1123 * Modules/indexeddb/IDBFactory.idl:
1124 * Modules/indexeddb/IDBIndex.idl:
1125 * Modules/indexeddb/IDBKeyRange.idl:
1126 * Modules/indexeddb/IDBObjectStore.idl:
1127 * Modules/mediastream/RTCPeerConnection.idl:
1128 * animation/Animatable.idl:
1129 * animation/KeyframeEffect.idl:
1130 * animation/KeyframeEffectReadOnly.idl:
1131 * bindings/scripts/CodeGeneratorJS.pm:
1133 (GenerateConstructorDefinition):
1134 * bindings/scripts/IDLAttributes.json:
1135 * bindings/scripts/test/JS/JSTestObj.cpp:
1136 (WebCore::jsTestObjWithExecStateAttributeGetter):
1137 (WebCore::jsTestObjWithExecStateAttribute):
1138 (WebCore::setJSTestObjWithExecStateAttributeSetter):
1139 (WebCore::setJSTestObjWithExecStateAttribute):
1140 (WebCore::jsTestObjWithScriptExecutionContextAndExecStateAttributeGetter):
1141 (WebCore::jsTestObjWithScriptExecutionContextAndExecStateAttribute):
1142 (WebCore::setJSTestObjWithScriptExecutionContextAndExecStateAttributeSetter):
1143 (WebCore::setJSTestObjWithScriptExecutionContextAndExecStateAttribute):
1144 (WebCore::jsTestObjWithScriptExecutionContextAndExecStateWithSpacesAttributeGetter):
1145 (WebCore::jsTestObjWithScriptExecutionContextAndExecStateWithSpacesAttribute):
1146 (WebCore::setJSTestObjWithScriptExecutionContextAndExecStateWithSpacesAttributeSetter):
1147 (WebCore::setJSTestObjWithScriptExecutionContextAndExecStateWithSpacesAttribute):
1148 (WebCore::jsTestObjPrototypeFunctionWithExecStateVoidBody):
1149 (WebCore::jsTestObjPrototypeFunctionWithExecStateVoid):
1150 (WebCore::jsTestObjPrototypeFunctionWithExecStateObjBody):
1151 (WebCore::jsTestObjPrototypeFunctionWithExecStateObj):
1152 (WebCore::jsTestObjPrototypeFunctionWithExecStateVoidExceptionBody):
1153 (WebCore::jsTestObjPrototypeFunctionWithExecStateVoidException):
1154 (WebCore::jsTestObjPrototypeFunctionWithExecStateObjExceptionBody):
1155 (WebCore::jsTestObjPrototypeFunctionWithExecStateObjException):
1156 (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndExecStateBody):
1157 (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndExecState):
1158 (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndExecStateObjExceptionBody):
1159 (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndExecStateObjException):
1160 (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndExecStateWithSpacesBody):
1161 (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndExecStateWithSpaces):
1162 (WebCore::jsTestObjWithScriptStateAttributeGetter): Deleted.
1163 (WebCore::jsTestObjWithScriptStateAttribute): Deleted.
1164 (WebCore::setJSTestObjWithScriptStateAttributeSetter): Deleted.
1165 (WebCore::setJSTestObjWithScriptStateAttribute): Deleted.
1166 (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeGetter): Deleted.
1167 (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttribute): Deleted.
1168 (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeSetter): Deleted.
1169 (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute): Deleted.
1170 (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttributeGetter): Deleted.
1171 (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute): Deleted.
1172 (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttributeSetter): Deleted.
1173 (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute): Deleted.
1174 (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoidBody): Deleted.
1175 (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoid): Deleted.
1176 (WebCore::jsTestObjPrototypeFunctionWithScriptStateObjBody): Deleted.
1177 (WebCore::jsTestObjPrototypeFunctionWithScriptStateObj): Deleted.
1178 (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoidExceptionBody): Deleted.
1179 (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoidException): Deleted.
1180 (WebCore::jsTestObjPrototypeFunctionWithScriptStateObjExceptionBody): Deleted.
1181 (WebCore::jsTestObjPrototypeFunctionWithScriptStateObjException): Deleted.
1182 (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateBody): Deleted.
1183 (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptState): Deleted.
1184 (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjExceptionBody): Deleted.
1185 (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException): Deleted.
1186 (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpacesBody): Deleted.
1187 (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces): Deleted.
1188 * bindings/scripts/test/TestObj.idl:
1189 * bindings/scripts/test/TestPromiseRejectionEvent.idl:
1190 * crypto/SubtleCrypto.idl:
1192 * dom/ErrorEvent.idl:
1193 * dom/MessagePort.idl:
1194 * dom/MouseEvent.idl:
1195 * html/HTMLCanvasElement.idl:
1196 * html/HTMLFrameElement.idl:
1197 * html/OffscreenCanvas.idl:
1198 * html/track/DataCue.idl:
1199 * inspector/CommandLineAPIHost.idl:
1200 * page/DOMWindow.idl:
1201 * page/RemoteDOMWindow.idl:
1202 * page/WindowOrWorkerGlobalScope.idl:
1203 * testing/Internals.idl:
1204 * workers/DedicatedWorkerGlobalScope.idl:
1205 * workers/Worker.idl:
1207 2018-11-01 Fujii Hironori <Hironori.Fujii@sony.com>
1209 Rename <wtf/unicode/UTF8.h> to <wtf/unicode/UTF8Conversion.h> in order to avoid conflicting with ICU's unicode/utf8.h
1210 https://bugs.webkit.org/show_bug.cgi?id=189693
1212 Reviewed by Yusuke Suzuki.
1214 No new tests because there's no behaviro changes.
1216 * platform/SharedBuffer.cpp: Replaced <wtf/unicode/UTF8.h> with <wtf/unicode/UTF8Conversion.h>.
1217 * xml/XSLTProcessorLibxslt.cpp: Ditto.
1218 * xml/parser/XMLDocumentParserLibxml2.cpp: Ditto.
1220 2018-11-01 John Wilander <wilander@apple.com>
1222 In WebCore::ResourceLoadObserver, use document.sessionID().isEphemeral() when possible and check for page existence when not
1223 https://bugs.webkit.org/show_bug.cgi?id=191119
1224 <rdar://problem/44176965>
1226 Reviewed by Chris Dumez.
1230 * loader/ResourceLoadObserver.cpp:
1231 (WebCore::ResourceLoadObserver::logSubresourceLoading):
1232 (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
1234 2018-11-01 Devin Rousso <drousso@apple.com>
1236 Web Inspector: Network: remove unnecessary media event tracking
1237 https://bugs.webkit.org/show_bug.cgi?id=191174
1239 Reviewed by Joseph Pecoraro.
1241 No new tests, as this simply removes some event listeners for the WebInspector frontend.
1243 * inspector/agents/InspectorDOMAgent.cpp:
1244 (WebCore::InspectorDOMAgent::addEventListenersToNode):
1246 2018-11-01 Chris Dumez <cdumez@apple.com>
1248 Location object sans browsing context
1249 https://bugs.webkit.org/show_bug.cgi?id=191060
1251 Reviewed by Geoffrey Garen.
1253 As per https://github.com/whatwg/html/pull/4076, a Location object's URL should be "about:blank" when
1254 it does not have a browsing context (Frame), not "".
1256 No new tests, rebaselined existing tests.
1258 * page/Location.cpp:
1259 (WebCore::Location::url const):
1260 (WebCore::Location::href const):
1261 (WebCore::Location::protocol const):
1262 (WebCore::Location::host const):
1263 (WebCore::Location::hostname const):
1264 (WebCore::Location::port const):
1265 (WebCore::Location::pathname const):
1266 (WebCore::Location::search const):
1267 (WebCore::Location::origin const):
1268 (WebCore::Location::hash const):
1270 2018-11-01 Sihui Liu <sihui_liu@apple.com>
1272 Add a storage limit for IndexedDB
1273 https://bugs.webkit.org/show_bug.cgi?id=190598
1274 <rdar://problem/44654715>
1276 Reviewed by Chris Dumez.
1278 Set a storage limit in IndexedDB for each pair of mainFrameOrigin and openingOrigin.
1279 IndexedDB will return a QuotaExceededError if limit is reached.
1281 If the size of free disk space is over 1 GB, the default limit is 500 MB; otherwise it is
1282 half the free disk space.
1284 Test: storage/indexeddb/storage-limit.html
1286 * Modules/indexeddb/server/IDBBackingStore.h:
1287 * Modules/indexeddb/server/IDBServer.cpp:
1288 (WebCore::IDBServer::IDBServer::createBackingStore):
1289 (WebCore::IDBServer::IDBServer::setPerOriginQuota):
1290 * Modules/indexeddb/server/IDBServer.h:
1291 (WebCore::IDBServer::IDBServer::perOriginQuota const):
1292 * Modules/indexeddb/server/MemoryIDBBackingStore.h:
1293 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1294 (WebCore::IDBServer::SQLiteIDBBackingStore::SQLiteIDBBackingStore):
1295 (WebCore::IDBServer::SQLiteIDBBackingStore::quotaForOrigin const):
1296 (WebCore::IDBServer::SQLiteIDBBackingStore::maximumSize const):
1297 (WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction):
1298 (WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore):
1299 (WebCore::IDBServer::SQLiteIDBBackingStore::renameObjectStore):
1300 (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
1301 (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexRecord):
1302 (WebCore::IDBServer::SQLiteIDBBackingStore::renameIndex):
1303 (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
1304 (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedSetKeyGeneratorValue):
1305 * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
1306 * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1307 (WebCore::IDBServer::UniqueIDBDatabase::setQuota):
1308 * Modules/indexeddb/server/UniqueIDBDatabase.h:
1310 2018-11-01 Justin Michaud <justin_michaud@apple.com>
1312 CSS Custom Properties API Should Support syntax="*" and "<length>", and handle cycles properly
1313 https://bugs.webkit.org/show_bug.cgi?id=191042
1315 Reviewed by Antti Koivisto.
1317 Refactor code so that:
1318 - All properties applied in StyleResolver::applyMatchedProperties are only applied once.
1319 - Custom properties are only resolved once, in StyleResolver, when they are applied to the RenderStyle. They were previously resolved
1320 every time they were referenced, and again in RenderStyle.
1321 - The font-size property is applied after its variable references, but before custom properties that depend on it.
1322 - Cycles are detected at the same time as resolution.
1323 - MutableStyleProperties' custom properties cannot be set from Javascript or WebKitLegacy if they do not parse for the property's type.
1324 If they contain var(--...) references, however, then they can be set because we cannot check if the references are valid from setProperty.
1325 This behaviour matches chrome, but is not documented in the spec.
1326 - Custom property values have more explicit resolved/unresolved state.
1327 - RenderStyle only ever holds resolved custom properties, and StyleResolver::CascadedProperties only holds unresolved properties.
1329 Tests: css-custom-properties-api/crash.html
1330 css-custom-properties-api/cycles.html
1331 css-custom-properties-api/inline.html
1333 * css/CSSComputedStyleDeclaration.cpp:
1334 (WebCore::ComputedStyleExtractor::customPropertyValue):
1335 * css/CSSCustomPropertyValue.cpp:
1336 (WebCore::CSSCustomPropertyValue::equals const):
1337 (WebCore::CSSCustomPropertyValue::customCSSText const):
1338 (WebCore::CSSCustomPropertyValue::tokens const):
1339 (WebCore::CSSCustomPropertyValue::checkVariablesForCycles const): Deleted.
1340 (WebCore::CSSCustomPropertyValue::resolveVariableReferences const): Deleted.
1341 (WebCore::CSSCustomPropertyValue::setResolvedTypedValue): Deleted.
1342 * css/CSSCustomPropertyValue.h:
1343 * css/CSSRegisteredCustomProperty.cpp:
1344 (WebCore::CSSRegisteredCustomProperty::CSSRegisteredCustomProperty):
1345 * css/CSSRegisteredCustomProperty.h:
1346 * css/CSSVariableData.cpp:
1347 (WebCore::CSSVariableData::CSSVariableData):
1348 (WebCore::CSSVariableData::consumeAndUpdateTokens): Deleted.
1349 (WebCore::CSSVariableData::checkVariablesForCycles const): Deleted.
1350 (WebCore::CSSVariableData::checkVariablesForCyclesWithRange const): Deleted.
1351 (WebCore::CSSVariableData::resolveVariableFallback const): Deleted.
1352 (WebCore::CSSVariableData::resolveVariableReference const): Deleted.
1353 (WebCore::CSSVariableData::resolveVariableReferences const): Deleted.
1354 (WebCore::CSSVariableData::resolveTokenRange const): Deleted.
1355 * css/CSSVariableData.h:
1356 (WebCore::CSSVariableData::create):
1357 (WebCore::CSSVariableData::createResolved): Deleted.
1358 (WebCore::CSSVariableData::needsVariableResolution const): Deleted.
1359 (WebCore::CSSVariableData::CSSVariableData): Deleted.
1360 * css/CSSVariableReferenceValue.cpp:
1361 (WebCore::resolveVariableFallback):
1362 (WebCore::resolveVariableReference):
1363 (WebCore::resolveTokenRange):
1364 (WebCore::CSSVariableReferenceValue::resolveVariableReferences const):
1365 (WebCore::CSSVariableReferenceValue::checkVariablesForCycles const): Deleted.
1366 * css/CSSVariableReferenceValue.h:
1367 (WebCore::CSSVariableReferenceValue::create):
1368 (WebCore::CSSVariableReferenceValue::equals const):
1369 (WebCore::CSSVariableReferenceValue::variableDataValue const): Deleted.
1370 * css/DOMCSSRegisterCustomProperty.cpp:
1371 (WebCore::DOMCSSRegisterCustomProperty::registerProperty):
1372 * css/PropertySetCSSStyleDeclaration.cpp:
1373 (WebCore::PropertySetCSSStyleDeclaration::setProperty):
1374 * css/StyleBuilderCustom.h:
1375 (WebCore::StyleBuilderCustom::applyInitialCustomProperty):
1376 (WebCore::StyleBuilderCustom::applyValueCustomProperty):
1377 * css/StyleProperties.cpp:
1378 (WebCore::MutableStyleProperties::setCustomProperty):
1379 * css/StyleProperties.h:
1380 * css/StyleResolver.cpp:
1381 (WebCore::StyleResolver::State::setStyle):
1382 (WebCore::StyleResolver::styleForKeyframe):
1383 (WebCore::StyleResolver::styleForPage):
1384 (WebCore::StyleResolver::applyMatchedProperties):
1385 (WebCore::StyleResolver::applyPropertyToCurrentStyle):
1386 (WebCore::StyleResolver::applyProperty):
1387 (WebCore::StyleResolver::resolvedVariableValue const):
1388 (WebCore::StyleResolver::CascadedProperties::applyDeferredProperties):
1389 (WebCore::StyleResolver::CascadedProperties::Property::apply):
1390 (WebCore::StyleResolver::applyCascadedCustomProperty):
1391 (WebCore::StyleResolver::applyCascadedProperties):
1392 * css/StyleResolver.h:
1393 * css/parser/CSSParser.cpp:
1394 (WebCore::CSSParser::parseValueWithVariableReferences):
1395 * css/parser/CSSParser.h:
1396 * css/parser/CSSPropertyParser.cpp:
1397 (WebCore::CSSPropertyParser::CSSPropertyParser):
1398 (WebCore::CSSPropertyParser::canParseTypedCustomPropertyValue):
1399 (WebCore::CSSPropertyParser::parseTypedCustomPropertyValue):
1400 (WebCore::CSSPropertyParser::collectParsedCustomPropertyValueDependencies):
1401 (WebCore::CSSPropertyParser::parseValueStart):
1402 (WebCore::CSSPropertyParser::parseSingleValue):
1403 * css/parser/CSSPropertyParser.h:
1404 * css/parser/CSSVariableParser.cpp:
1405 (WebCore::CSSVariableParser::parseDeclarationValue):
1406 * dom/ConstantPropertyMap.cpp:
1407 (WebCore::ConstantPropertyMap::setValueForProperty):
1408 (WebCore::variableDataForPositivePixelLength):
1409 (WebCore::variableDataForPositiveDuration):
1410 * rendering/style/RenderStyle.cpp:
1411 (WebCore::RenderStyle::checkVariablesInCustomProperties): Deleted.
1412 * rendering/style/RenderStyle.h:
1413 (WebCore::RenderStyle::setInheritedCustomPropertyValue):
1414 (WebCore::RenderStyle::setNonInheritedCustomPropertyValue):
1415 * rendering/style/StyleCustomPropertyData.h:
1416 (WebCore::StyleCustomPropertyData::operator== const):
1417 (WebCore::StyleCustomPropertyData::setCustomPropertyValue):
1418 (WebCore::StyleCustomPropertyData::StyleCustomPropertyData):
1421 2018-11-01 Said Abou-Hallawa <sabouhallawa@apple.com>
1423 [CG] Adopt CG SPI for non-even cornered rounded rects
1424 https://bugs.webkit.org/show_bug.cgi?id=190155
1426 Reviewed by Simon Fraser.
1428 Instead of creating bezier curves for the non-even corners of the rounded
1429 rects, we should use the optimized SPI provided by CG.
1431 * platform/graphics/cg/PathCG.cpp:
1432 (WebCore::Path::platformAddPathForRoundedRect):
1434 2018-11-01 Youenn Fablet <youenn@apple.com>
1436 RTCTrackEvent.streams should be SameObject
1437 https://bugs.webkit.org/show_bug.cgi?id=191130
1439 Reviewed by Eric Carlson.
1441 Mimick SameObject using CachedAttribute.
1442 Covered by rebased test.
1444 * Modules/mediastream/RTCTrackEvent.idl:
1446 2018-10-31 Zalan Bujtas <zalan@apple.com>
1448 [LFC][IFC] Add support for inline-block elements.
1449 https://bugs.webkit.org/show_bug.cgi?id=191143
1451 Reviewed by Antti Koivisto.
1453 This patch add support for laying out non-shrink-to-width inline-block elements.
1455 Test: fast/inline/simple-inline-block.html
1457 * layout/FormattingContext.h:
1458 (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
1459 * layout/FormattingContextGeometry.cpp:
1460 (WebCore::Layout::contentHeightForFormattingContextRoot):
1461 (WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
1462 * layout/inlineformatting/InlineFormattingContext.cpp:
1463 (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot const):
1464 * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
1465 (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
1466 (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockHeightAndMargin):
1467 * layout/layouttree/LayoutInlineContainer.cpp:
1468 (WebCore::Layout::InlineContainer::establishesInlineFormattingContext const):
1469 * layout/layouttree/LayoutInlineContainer.h:
1470 * layout/layouttree/LayoutTreeBuilder.cpp:
1471 (WebCore::Layout::TreeBuilder::createSubTree):
1473 2018-11-01 Claudio Saavedra <csaavedra@igalia.com>
1475 Fix build with VIDEO and WEB_AUDIO disabled
1476 https://bugs.webkit.org/show_bug.cgi?id=191147
1478 Reviewed by Philippe Normand.
1480 Supported or not, there were a few build fixes needed
1481 to be able to build WebKit with media disabled. Mostly
1484 * Modules/mediasource/VideoPlaybackQuality.cpp:
1485 * Modules/mediasource/VideoPlaybackQuality.h:
1486 * Modules/mediasource/VideoPlaybackQuality.idl:
1488 (WebCore::Document::dispatchFullScreenChangeOrErrorEvent):
1489 * inspector/agents/InspectorDOMAgent.cpp:
1490 (WebCore::InspectorDOMAgent::InspectorDOMAgent):
1491 (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend):
1492 * inspector/agents/InspectorDOMAgent.h:
1493 * rendering/RenderThemeGtk.cpp:
1495 2018-10-31 Devin Rousso <drousso@apple.com>
1497 Web Inspector: Canvas: create a setting for auto-recording newly created contexts
1498 https://bugs.webkit.org/show_bug.cgi?id=190856
1500 Reviewed by Brian Burg.
1502 Test: inspector/canvas/setRecordingAutoCaptureFrameCount.html
1504 * inspector/agents/InspectorCanvasAgent.h:
1505 (WebCore::InspectorCanvasAgent::RecordingOptions): Added.
1506 * inspector/agents/InspectorCanvasAgent.cpp:
1507 (WebCore::InspectorCanvasAgent::enable):
1508 (WebCore::InspectorCanvasAgent::disable):
1509 (WebCore::InspectorCanvasAgent::setRecordingAutoCaptureFrameCount): Added.
1510 (WebCore::InspectorCanvasAgent::startRecording):
1511 (WebCore::InspectorCanvasAgent::didCreateCanvasRenderingContext):
1512 (WebCore::InspectorCanvasAgent::didFinishRecordingCanvasFrame):
1513 (WebCore::InspectorCanvasAgent::consoleStartRecordingCanvas):
1514 (WebCore::InspectorCanvasAgent::startRecording): Added.
1515 Unify the different functions that are able to start a recording to use a single path.
1517 * inspector/InspectorCanvas.h:
1518 * inspector/InspectorCanvas.cpp:
1519 (WebCore::InspectorCanvas::resetRecordingData):
1520 (WebCore::InspectorCanvas::recordAction):
1521 (WebCore::InspectorCanvas::setFrameCount): Added.
1522 (WebCore::InspectorCanvas::overFrameCount const): Added.
1524 2018-10-31 Devin Rousso <drousso@apple.com>
1526 Web Inspector: display low-power enter/exit events in Timelines and Network node waterfalls
1527 https://bugs.webkit.org/show_bug.cgi?id=190641
1528 <rdar://problem/45319049>
1530 Reviewed by Joseph Pecoraro.
1532 No new tests, as low power mode is indeterminate. Should not affect functionality.
1534 * inspector/agents/InspectorDOMAgent.h:
1535 * inspector/agents/InspectorDOMAgent.cpp:
1536 (WebCore::InspectorDOMAgent::InspectorDOMAgent):
1537 (WebCore::InspectorDOMAgent::addEventListenersToNode):
1538 (WebCore::InspectorDOMAgent::mediaMetricsTimerFired): Added.
1540 2018-10-31 Alicia Boya García <aboya@igalia.com>
1542 [MSE] Use tolerance when growing the coded frame group
1543 https://bugs.webkit.org/show_bug.cgi?id=190085
1545 Reviewed by Jer Noble.
1547 Test: media/media-source/media-source-append-acb-tolerance.html
1549 This patch introduces a millisecond tolerance in the range of
1550 potential frames that should be erased frame from the track buffer
1551 when the coded frame group is growing.
1553 This is necessary because some files have imprecise overlapping
1554 timestamps (especially WebM files).
1556 This fixes a stall when seeking back and forth in YouTube with WebM
1559 A test case simulating the problem with video/mock using timestamps
1560 similar to those of a typical 30 fps WebM video is also added.
1562 * Modules/mediasource/SourceBuffer.cpp:
1563 (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
1565 2018-10-31 Jer Noble <jer.noble@apple.com>
1567 MediaSource.isTypeSupported('video/mp4; codecs="hvc1.1.6.L60.B0') is inproperly rejected
1568 https://bugs.webkit.org/show_bug.cgi?id=191129
1570 Reviewed by Eric Carlson.
1572 Test: media/media-source/media-source-istypesupported-case-sensitive.html
1574 According to RFC 2045: "All media type values, subtype values, and parameter names as
1575 defined are case-insensitive. However, parameter values are case-sensitive unless otherwise
1576 specified for the specific parameter." So rather than fold the entire ContentType into lower-
1577 case, leave the original string intact and require clients to enforce case-insensitivity.
1579 * Modules/mediasource/MediaSource.cpp:
1580 (WebCore::MediaSource::isTypeSupported):
1582 2018-10-31 Jer Noble <jer.noble@apple.com>
1584 Unreivewed build fix; fix the non-HAVE_AVCONTENTKEYSESSION builds by adding guards around
1585 access of m_cdmInstance.
1587 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1588 (WebCore::MediaPlayerPrivateAVFoundationObjC::attemptToDecryptWithInstance):
1590 2018-10-31 YUHAN WU <yuhan_wu@apple.com>
1592 MediaRecorder should fire dataavailable event when all tracks are ended and stop() is called
1593 https://bugs.webkit.org/show_bug.cgi?id=190778
1594 <rdar://problem/45703574>
1596 Reviewed by Youenn Fablet.
1598 Add a include to fix the unified build error.
1600 No tests since no new functionality.
1602 * Modules/webgpu/WebGPUDevice.cpp:
1604 2018-10-26 Jer Noble <jer.noble@apple.com>
1606 [EME][Cocoa] Cannot play unmuxed video and audio fMP4 streams encrypted with different keys via MSE
1607 https://bugs.webkit.org/show_bug.cgi?id=190946
1609 Reviewed by Eric Carlson.
1611 Use separate AVContentKeySessions per CDMInstanceSession (rather than one AVContentKeySession per
1614 - Add a mechanism for sending a message out from platform/CDMInstance to MediaKeySession without
1615 requiring MediaKeySession to send a callback first.
1617 - Move all the AVContentKeySession delegate methods from CDMInstanceFairPlayStreamingAVFObjC to
1618 CDMInstanceSessionFairPlayStreamingAVFObjC.
1620 - Add a mechanism for requesting the correct CDMInstanceSession for a given KeyID.
1622 - Support key renewal through a "renew" message.
1624 - Remember the keyID in SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID()
1625 and ask for the correct CDMInstanceSession for that keyID in attemptToDecrypt().
1627 - Pass the CDMInstance down from MediaPlayerPrivateMediaSourceAVFObjC -> SourceBufferPrivateAVFObjC.
1629 * Modules/encryptedmedia/MediaKeySession.cpp:
1630 (WebCore::MediaKeySession::sendMessage):
1631 * Modules/encryptedmedia/MediaKeySession.h:
1632 * platform/encryptedmedia/CDMInstanceSession.h:
1633 * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h:
1634 * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
1635 (-[WebCoreFPSContentKeySessionDelegate initWithParent:]):
1636 (WebCore::CDMInstanceFairPlayStreamingAVFObjC::initializeWithConfiguration):
1637 (WebCore::CDMInstanceFairPlayStreamingAVFObjC::createSession):
1638 (WebCore::CDMInstanceFairPlayStreamingAVFObjC::outputObscuredDueToInsufficientExternalProtectionChanged):
1639 (WebCore::CDMInstanceFairPlayStreamingAVFObjC::sessionForKeyIDs const):
1640 (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::CDMInstanceSessionFairPlayStreamingAVFObjC):
1641 (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::~CDMInstanceSessionFairPlayStreamingAVFObjC):
1642 (WebCore::keyIDsForRequest):
1643 (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::keyIDs):
1644 (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::requestLicense):
1645 (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::updateLicense):
1646 (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::closeSession):
1647 (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::removeSessionData):
1648 (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::didProvideRequest):
1649 (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::didProvideRenewingRequest):
1650 (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::didFailToProvideRequest):
1651 (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::requestDidSucceed):
1652 (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::nextRequest):
1653 (WebCore::requestStatusToCDMStatus):
1654 (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::keyStatuses const):
1655 (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::outputObscuredDueToInsufficientExternalProtectionChanged):
1656 (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::ensureSession):
1657 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1658 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1659 (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
1660 (WebCore::MediaPlayerPrivateAVFoundationObjC::cdmInstanceAttached):
1661 (WebCore::MediaPlayerPrivateAVFoundationObjC::cdmInstanceDetached):
1662 (WebCore::MediaPlayerPrivateAVFoundationObjC::attemptToDecryptWithInstance):
1663 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1664 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1665 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::outputObscuredDueToInsufficientExternalProtectionChanged):
1666 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::cdmInstanceAttached):
1667 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::cdmInstanceDetached):
1668 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::attemptToDecryptWithInstance):
1669 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::waitingForKey const):
1670 * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
1671 * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
1672 (WebCore::MediaSourcePrivateAVFObjC::addSourceBuffer):
1673 (WebCore::MediaSourcePrivateAVFObjC::cdmInstanceAttached):
1674 (WebCore::MediaSourcePrivateAVFObjC::cdmInstanceDetached):
1675 (WebCore::MediaSourcePrivateAVFObjC::attemptToDecryptWithInstance):
1676 (WebCore::MediaSourcePrivateAVFObjC::waitingForKey const):
1677 (WebCore::MediaSourcePrivateAVFObjC::outputObscuredDueToInsufficientExternalProtectionChanged):
1678 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
1679 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1680 (WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID):
1681 (WebCore::SourceBufferPrivateAVFObjC::destroyParser):
1682 (WebCore::SourceBufferPrivateAVFObjC::setCDMInstance):
1683 (WebCore::SourceBufferPrivateAVFObjC::attemptToDecrypt):
1684 (WebCore::SourceBufferPrivateAVFObjC::outputObscuredDueToInsufficientExternalProtectionChanged):
1686 2018-10-31 Zach Li <zacharyli323@gmail.com>
1688 Add credit card autofill button
1689 https://bugs.webkit.org/show_bug.cgi?id=191051
1690 <rdar://problem/45657011>
1692 Reviewed by Wenson Hsieh.
1694 Test: fast/forms/auto-fill-button/input-credit-card-auto-fill-button.html
1696 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1697 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1699 (input::-webkit-credit-card-auto-fill-button):
1700 Add credit card autofill button.
1701 (input::-webkit-credit-card-auto-fill-button:hover):
1702 (input::-webkit-credit-card-auto-fill-button:active):
1703 * html/HTMLTextFormControlElement.h:
1704 * html/TextFieldInputType.cpp:
1705 (WebCore::autoFillButtonTypeToAccessibilityLabel):
1706 (WebCore::autoFillButtonTypeToAutoFillButtonText):
1707 (WebCore::autoFillButtonTypeToAutoFillButtonPseudoClassName):
1708 (WebCore::isAutoFillButtonTypeChanged):
1709 * platform/LocalizedStrings.cpp:
1710 (WebCore::AXAutoFillCreditCardLabel):
1711 * platform/LocalizedStrings.h:
1712 * testing/Internals.cpp:
1713 (WebCore::toAutoFillButtonType):
1714 (WebCore::toInternalsAutoFillButtonType):
1715 * testing/Internals.h:
1716 * testing/Internals.idl:
1718 2018-10-31 Eric Carlson <eric.carlson@apple.com>
1720 [MediaStream] Don't reveal device IDs until the user has granted permission to capture
1721 https://bugs.webkit.org/show_bug.cgi?id=191112
1722 <rdar://problem/45699932>
1724 Reviewed by Youenn Fablet.
1726 No new tests, existing tests updated.
1728 * Modules/mediastream/MediaDevicesRequest.cpp:
1729 (WebCore::MediaDevicesRequest::start): Don't reveal device ID or group ID until the user
1730 has granted permssion to capture.
1732 2018-10-31 YUHAN WU <yuhan_wu@apple.com>
1734 MediaRecorder should fire dataavailable event when all tracks are ended and stop() is called
1735 https://bugs.webkit.org/show_bug.cgi?id=190778
1737 Reviewed by Youenn Fablet.
1739 Implement JavaScript dispatch event dataavailable and JavaScript exposed method stop().
1740 Implement a mock string as the output buffer of MediaRecorder.
1741 Remove the declaration of timecode in BlobEvent since it has not been implemented in MediaRecorder and MediaRecorderPrivate.
1743 Tests: http/wpt/mediarecorder/MediaRecorder-dataavailable.html
1744 http/wpt/mediarecorder/MediaRecorder-mock-dataavailable.html
1745 imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-destroy-script-execution.html
1746 imported/w3c/web-platform-tests/mediacapture-record/support/MediaRecorder-iframe.html
1749 * Modules/mediarecorder/BlobEvent.cpp: Added.
1750 (WebCore::BlobEvent::create):
1751 (WebCore::BlobEvent::BlobEvent):
1752 (WebCore::BlobEvent::eventInterface const):
1753 * Modules/mediarecorder/BlobEvent.h:
1754 * Modules/mediarecorder/BlobEvent.idl:
1755 * Modules/mediarecorder/MediaRecorder.cpp:
1756 (WebCore::MediaRecorder::MediaRecorder):
1757 (WebCore::MediaRecorder::~MediaRecorder):
1758 (WebCore::MediaRecorder::stop):
1759 (WebCore::MediaRecorder::startRecording):
1760 (WebCore::MediaRecorder::stopRecording):
1761 (WebCore::MediaRecorder::stopRecordingInternal):
1762 (WebCore::MediaRecorder::didAddOrRemoveTrack):
1763 (WebCore::MediaRecorder::trackEnded):
1764 (WebCore::MediaRecorder::sampleBufferUpdated):
1765 (WebCore::MediaRecorder::audioSamplesAvailable):
1766 (WebCore::MediaRecorder::scheduleDeferredTask):
1767 * Modules/mediarecorder/MediaRecorder.h:
1768 * Modules/mediarecorder/MediaRecorder.idl:
1770 * WebCore.xcodeproj/project.pbxproj:
1772 * dom/EventNames.in:
1773 * platform/mediarecorder/MediaRecorderPrivate.h: Added.
1774 * platform/mediarecorder/MediaRecorderPrivateMock.cpp: Added.
1775 (WebCore::MediaRecorderPrivateMock::sampleBufferUpdated):
1776 (WebCore::MediaRecorderPrivateMock::audioSamplesAvailable):
1777 (WebCore::MediaRecorderPrivateMock::generateMockString):
1778 (WebCore::MediaRecorderPrivateMock::fetchData):
1779 * platform/mediarecorder/MediaRecorderPrivateMock.h: Added.
1781 2018-10-31 Claudio Saavedra <csaavedra@igalia.com>
1783 [GTK][WPE] Remaining topPrivatelyControlledDomain() fixes
1784 https://bugs.webkit.org/show_bug.cgi?id=191110
1786 Reviewed by Michael Catanzaro.
1788 Covered by existing tests.
1790 Turns out that this method is expected to reject domains that
1791 are not registrable. Also sync with the Mac implementation in
1792 that given domains that are not all ASCII should be returned
1793 back as is. This fixes the remaining Public Suffix API tests.
1795 * platform/soup/PublicSuffixSoup.cpp:
1796 (WebCore::topPrivatelyControlledDomain):
1798 2018-10-31 Antti Koivisto <antti@apple.com>
1800 Remove LayerFlushScheduler
1801 https://bugs.webkit.org/show_bug.cgi?id=191103
1803 Reviewed by Anders Carlsson.
1805 It is only used in WK1.
1808 * WebCore.xcodeproj/project.pbxproj:
1809 * platform/graphics/ca/LayerFlushScheduler.cpp: Removed.
1810 * platform/graphics/ca/LayerFlushScheduler.h: Removed.
1811 * platform/graphics/ca/LayerFlushSchedulerClient.h: Removed.
1812 * platform/graphics/ca/cocoa/LayerFlushSchedulerMac.cpp: Removed.
1814 2018-10-31 Zalan Bujtas <zalan@apple.com>
1816 Missing from r237634
1818 * layout/inlineformatting/InlineFormattingState.cpp:
1819 (WebCore::Layout::InlineFormattingState::formattingContext):
1821 2018-10-31 Zalan Bujtas <zalan@apple.com>
1823 [LFC] Do not pass LayoutState& to compute* and layout* functions
1824 https://bugs.webkit.org/show_bug.cgi?id=191100
1826 Reviewed by Antti Koivisto.
1828 Reduce noise by removing LayoutState& parameter where possible.
1830 * layout/FormattingContext.cpp:
1831 (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry const):
1832 (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry const):
1833 (WebCore::Layout::FormattingContext::computeBorderAndPadding const):
1834 (WebCore::Layout::FormattingContext::placeInFlowPositionedChildren const):
1835 (WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const):
1836 (WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const):
1837 * layout/FormattingContext.h:
1838 * layout/FormattingContextGeometry.cpp:
1839 (WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
1840 * layout/LayoutFormattingState.cpp:
1841 (WebCore::Layout::LayoutState::layoutFormattingContextSubtree):
1842 * layout/blockformatting/BlockFormattingContext.cpp:
1843 (WebCore::Layout::BlockFormattingContext::layout const):
1844 (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const):
1845 (WebCore::Layout::BlockFormattingContext::computeStaticPosition const):
1846 (WebCore::Layout::BlockFormattingContext::computeEstimatedMarginTop const):
1847 (WebCore::Layout::BlockFormattingContext::computeEstimatedMarginTopForAncestors const):
1848 (WebCore::Layout::BlockFormattingContext::precomputeVerticalPositionForFormattingRootIfNeeded const):
1849 (WebCore::Layout::BlockFormattingContext::computeFloatingPosition const):
1850 (WebCore::Layout::BlockFormattingContext::computePositionToAvoidFloats const):
1851 (WebCore::Layout::BlockFormattingContext::computeVerticalPositionForFloatClear const):
1852 (WebCore::Layout::BlockFormattingContext::computeInFlowPositionedPosition const):
1853 (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin const):
1854 (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin const):
1855 (WebCore::Layout::BlockFormattingContext::instrinsicWidthConstraints const):
1856 * layout/blockformatting/BlockFormattingContext.h:
1857 * layout/inlineformatting/InlineFormattingContext.cpp:
1858 (WebCore::Layout::InlineFormattingContext::layout const):
1859 (WebCore::Layout::InlineFormattingContext::initializeNewLine const):
1860 (WebCore::Layout::InlineFormattingContext::layoutInlineContent const):
1861 (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot const):
1862 (WebCore::Layout::InlineFormattingContext::computeWidthAndHeightForInlineBox const):
1863 (WebCore::Layout::InlineFormattingContext::computeFloatPosition const):
1864 (WebCore::Layout::InlineFormattingContext::computeStaticPosition const):
1865 (WebCore::Layout::InlineFormattingContext::computeInFlowPositionedPosition const):
1866 (WebCore::Layout::InlineFormattingContext::instrinsicWidthConstraints const):
1867 * layout/inlineformatting/InlineFormattingContext.h:
1869 2018-10-31 Zalan Bujtas <zalan@apple.com>
1871 [LFC] FormattingContext class should take FormattingState&
1872 https://bugs.webkit.org/show_bug.cgi?id=191099
1874 Reviewed by Antti Koivisto.
1876 This is in preparation for not passing LayoutState& into every layout functions.
1877 FormattingContext has FormattingState now and LayoutState can be acquired through FormattingState.
1878 LayoutState <- FormattingState <- FormattingContext
1880 * layout/FormattingContext.cpp:
1881 (WebCore::Layout::FormattingContext::FormattingContext):
1882 (WebCore::Layout::FormattingContext::formattingState const):
1883 (WebCore::Layout::FormattingContext::layoutState const):
1884 * layout/FormattingContext.h:
1885 * layout/FormattingState.cpp:
1886 (WebCore::Layout::FormattingState::FormattingState):
1887 * layout/FormattingState.h:
1888 (WebCore::Layout::FormattingState::layoutState const):
1889 * layout/LayoutFormattingState.h:
1890 * layout/blockformatting/BlockFormattingContext.cpp:
1891 (WebCore::Layout::BlockFormattingContext::BlockFormattingContext):
1892 * layout/blockformatting/BlockFormattingContext.h:
1893 * layout/blockformatting/BlockFormattingState.cpp:
1894 (WebCore::Layout::BlockFormattingState::BlockFormattingState):
1895 (WebCore::Layout::BlockFormattingState::formattingContext):
1896 (WebCore::Layout::BlockFormattingState::formattingContext const): Deleted.
1897 * layout/blockformatting/BlockFormattingState.h:
1898 * layout/inlineformatting/InlineFormattingContext.cpp:
1899 (WebCore::Layout::InlineFormattingContext::InlineFormattingContext):
1900 * layout/inlineformatting/InlineFormattingContext.h:
1901 * layout/inlineformatting/InlineFormattingState.cpp:
1902 (WebCore::Layout::InlineFormattingState::InlineFormattingState):
1903 (WebCore::Layout::InlineFormattingState::formattingContext):
1904 (WebCore::Layout::InlineFormattingState::formattingContext const): Deleted.
1905 * layout/inlineformatting/InlineFormattingState.h:
1907 2018-10-31 Zalan Bujtas <zalan@apple.com>
1909 [LFC] The *FormattingState class should provide the *FormattingContext.
1910 https://bugs.webkit.org/show_bug.cgi?id=191089
1912 Reviewed by Antti Koivisto.
1914 BlockFormattingState provides the BlockFormattingContext object, while InlineFormattingState provides the InlineFormattingContext.
1916 * layout/FormattingContext.cpp:
1917 (WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const):
1918 * layout/FormattingState.h:
1919 * layout/LayoutFormattingState.cpp:
1920 (WebCore::Layout::LayoutState::layoutFormattingContextSubtree):
1921 (WebCore::Layout::LayoutState::formattingContext const): Deleted.
1922 * layout/LayoutFormattingState.h:
1923 * layout/blockformatting/BlockFormattingContext.cpp:
1924 (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const):
1925 (WebCore::Layout::BlockFormattingContext::instrinsicWidthConstraints const):
1926 * layout/blockformatting/BlockFormattingState.cpp:
1927 (WebCore::Layout::BlockFormattingState::formattingContext const):
1928 * layout/blockformatting/BlockFormattingState.h:
1929 * layout/inlineformatting/InlineFormattingContext.cpp:
1930 (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot const):
1931 * layout/inlineformatting/InlineFormattingState.cpp:
1932 (WebCore::Layout::InlineFormattingState::formattingContext const):
1933 * layout/inlineformatting/InlineFormattingState.h:
1935 2018-10-31 Zalan Bujtas <zalan@apple.com>
1937 [LFC] Rename LayoutContext to LayoutState
1938 https://bugs.webkit.org/show_bug.cgi?id=191080
1940 Reviewed by Antti Koivisto.
1942 LayoutContext naming was a bit misleading since none of the other *FormattingContext classes (BlockFormattingContext etc) hold states.
1943 (LayoutContext.cpp -> LayoutFormattingState.cpp because LayoutState.cpp name is already taken.)
1945 Now the current state is as follows:
1949 2. State content for each formatting subtrees
1953 * WebCore.xcodeproj/project.pbxproj:
1954 * layout/FormattingContext.cpp:
1955 (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry const):
1956 (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry const):
1957 (WebCore::Layout::FormattingContext::computeBorderAndPadding const):
1958 (WebCore::Layout::FormattingContext::placeInFlowPositionedChildren const):
1959 (WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const):
1960 (WebCore::Layout::FormattingContext::mapBoxToAncestor):
1961 (WebCore::Layout::FormattingContext::mapTopLeftToAncestor):
1962 (WebCore::Layout::FormattingContext::mapCoordinateToAncestor):
1963 (WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const):
1964 * layout/FormattingContext.h:
1965 (WebCore::Layout::FormattingContext::Geometry::outOfFlowVerticalGeometry):
1966 (WebCore::Layout::FormattingContext::Geometry::outOfFlowHorizontalGeometry):
1967 (WebCore::Layout::FormattingContext::Geometry::floatingHeightAndMargin):
1968 (WebCore::Layout::FormattingContext::Geometry::floatingWidthAndMargin):
1969 (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin):
1970 (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
1971 (WebCore::Layout::FormattingContext::Geometry::complicatedCases):
1972 (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
1973 (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
1974 (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
1975 (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
1976 (WebCore::Layout::FormattingContext::Geometry::floatingReplacedHeightAndMargin):
1977 (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin):
1978 (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
1979 * layout/FormattingContextGeometry.cpp:
1980 (WebCore::Layout::contentHeightForFormattingContextRoot):
1981 (WebCore::Layout::FormattingContext::Geometry::computedMaxHeight):
1982 (WebCore::Layout::FormattingContext::Geometry::computedMinHeight):
1983 (WebCore::Layout::staticVerticalPositionForOutOfFlowPositioned):
1984 (WebCore::Layout::staticHorizontalPositionForOutOfFlowPositioned):
1985 (WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
1986 (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
1987 (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
1988 (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
1989 (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
1990 (WebCore::Layout::FormattingContext::Geometry::complicatedCases):
1991 (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
1992 (WebCore::Layout::FormattingContext::Geometry::floatingReplacedHeightAndMargin):
1993 (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin):
1994 (WebCore::Layout::FormattingContext::Geometry::outOfFlowVerticalGeometry):
1995 (WebCore::Layout::FormattingContext::Geometry::outOfFlowHorizontalGeometry):
1996 (WebCore::Layout::FormattingContext::Geometry::floatingHeightAndMargin):
1997 (WebCore::Layout::FormattingContext::Geometry::floatingWidthAndMargin):
1998 (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin):
1999 (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
2000 (WebCore::Layout::FormattingContext::Geometry::computedBorder):
2001 (WebCore::Layout::FormattingContext::Geometry::computedPadding):
2002 (WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedHorizontalMarginValue):
2003 (WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedVerticalMarginValue):
2004 * layout/FormattingState.cpp:
2005 (WebCore::Layout::FormattingState::FormattingState):
2006 * layout/FormattingState.h:
2007 (WebCore::Layout::FormattingState::setInstrinsicWidthConstraints):
2008 (WebCore::Layout::FormattingState::instrinsicWidthConstraints const):
2009 * layout/LayoutFormattingState.cpp: Renamed from Source/WebCore/layout/LayoutContext.cpp.
2010 (WebCore::Layout::LayoutState::LayoutState):
2011 (WebCore::Layout::LayoutState::initializeRoot):
2012 (WebCore::Layout::LayoutState::updateLayout):
2013 (WebCore::Layout::LayoutState::layoutFormattingContextSubtree):
2014 (WebCore::Layout::LayoutState::displayBoxForLayoutBox const):
2015 (WebCore::Layout::LayoutState::styleChanged):
2016 (WebCore::Layout::LayoutState::markNeedsUpdate):
2017 (WebCore::Layout::LayoutState::formattingStateForBox const):
2018 (WebCore::Layout::LayoutState::establishedFormattingState const):
2019 (WebCore::Layout::LayoutState::createFormattingStateForFormattingRootIfNeeded):
2020 (WebCore::Layout::LayoutState::formattingContext const):
2021 * layout/LayoutFormattingState.h: Renamed from Source/WebCore/layout/LayoutContext.h.
2022 (WebCore::Layout::LayoutState::setInQuirksMode):
2023 (WebCore::Layout::LayoutState::hasDisplayBox const):
2024 (WebCore::Layout::LayoutState::inQuirksMode const):
2025 * layout/Verification.cpp:
2026 (WebCore::Layout::outputMismatchingSimpleLineInformationIfNeeded):
2027 (WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):
2028 (WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):
2029 (WebCore::Layout::verifyAndOutputSubtree):
2030 (WebCore::Layout::LayoutState::verifyAndOutputMismatchingLayoutTree const):
2031 (WebCore::Layout::LayoutContext::verifyAndOutputMismatchingLayoutTree const): Deleted.
2032 * layout/blockformatting/BlockFormattingContext.cpp:
2033 (WebCore::Layout::BlockFormattingContext::layout const):
2034 (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const):
2035 (WebCore::Layout::BlockFormattingContext::computeStaticPosition const):
2036 (WebCore::Layout::BlockFormattingContext::computeEstimatedMarginTop const):
2037 (WebCore::Layout::BlockFormattingContext::computeEstimatedMarginTopForAncestors const):
2038 (WebCore::Layout::BlockFormattingContext::precomputeVerticalPositionForFormattingRootIfNeeded const):
2039 (WebCore::Layout::hasPrecomputedMarginTop):
2040 (WebCore::Layout::BlockFormattingContext::computeFloatingPosition const):
2041 (WebCore::Layout::BlockFormattingContext::computePositionToAvoidFloats const):
2042 (WebCore::Layout::BlockFormattingContext::computeVerticalPositionForFloatClear const):
2043 (WebCore::Layout::BlockFormattingContext::computeInFlowPositionedPosition const):
2044 (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin const):
2045 (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin const):
2046 (WebCore::Layout::BlockFormattingContext::instrinsicWidthConstraints const):
2047 * layout/blockformatting/BlockFormattingContext.h:
2048 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
2049 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin):
2050 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
2051 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
2052 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin):
2053 * layout/blockformatting/BlockFormattingContextGeometry.cpp:
2054 (WebCore::Layout::isStretchedToInitialContainingBlock):
2055 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
2056 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
2057 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin):
2058 (WebCore::Layout::BlockFormattingContext::Geometry::staticPosition):
2059 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowPositionedPosition):
2060 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
2061 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin):
2062 (WebCore::Layout::BlockFormattingContext::Geometry::instrinsicWidthConstraints):
2063 (WebCore::Layout::BlockFormattingContext::Geometry::estimatedMarginTop):
2064 * layout/blockformatting/BlockFormattingState.cpp:
2065 (WebCore::Layout::BlockFormattingState::BlockFormattingState):
2066 * layout/blockformatting/BlockFormattingState.h:
2067 * layout/blockformatting/BlockInvalidation.cpp:
2068 (WebCore::Layout::computeUpdateType):
2069 (WebCore::Layout::computeUpdateTypeForAncestor):
2070 (WebCore::Layout::BlockInvalidation::invalidate):
2071 * layout/blockformatting/BlockInvalidation.h:
2072 * layout/blockformatting/BlockMarginCollapse.cpp:
2073 (WebCore::Layout::isMarginTopCollapsedWithParent):
2074 (WebCore::Layout::isMarginBottomCollapsedThrough):
2075 (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::collapsedMarginTopFromFirstChild):
2076 (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::nonCollapsedMarginTop):
2077 (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::computedNonCollapsedMarginTop):
2078 (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::computedNonCollapsedMarginBottom):
2079 (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginTop):
2080 (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBottom):
2081 (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::isMarginBottomCollapsedWithParent):
2082 (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::collapsedMarginBottomFromLastChild):
2083 (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::nonCollapsedMarginBottom):
2084 * layout/displaytree/DisplayBox.h:
2085 * layout/floats/FloatAvoider.cpp:
2086 (WebCore::Layout::FloatAvoider::FloatAvoider):
2087 * layout/floats/FloatAvoider.h:
2088 * layout/floats/FloatBox.cpp:
2089 (WebCore::Layout::FloatBox::FloatBox):
2090 * layout/floats/FloatBox.h:
2091 * layout/floats/FloatingContext.cpp:
2092 (WebCore::Layout::FloatingContext::positionForFloat const):
2093 (WebCore::Layout::FloatingContext::positionForFloatAvoiding const):
2094 (WebCore::Layout::FloatingContext::verticalPositionWithClearance const):
2095 * layout/floats/FloatingContext.h:
2096 (WebCore::Layout::FloatingContext::layoutState const):
2097 (WebCore::Layout::FloatingContext::layoutContext const): Deleted.
2098 * layout/floats/FloatingState.cpp:
2099 (WebCore::Layout::FloatingState::FloatItem::FloatItem):
2100 (WebCore::Layout::FloatingState::FloatingState):
2101 (WebCore::Layout::FloatingState::constraints const):
2102 * layout/floats/FloatingState.h:
2103 (WebCore::Layout::FloatingState::create):
2104 (WebCore::Layout::FloatingState::layoutState const):
2105 (WebCore::Layout::FloatingState::layoutContext const): Deleted.
2106 * layout/inlineformatting/InlineFormattingContext.cpp:
2107 (WebCore::Layout::InlineFormattingContext::layout const):
2108 (WebCore::Layout::InlineFormattingContext::initializeNewLine const):
2109 (WebCore::Layout::InlineFormattingContext::layoutInlineContent const):
2110 (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot const):
2111 (WebCore::Layout::InlineFormattingContext::computeWidthAndHeightForInlineBox const):
2112 (WebCore::Layout::InlineFormattingContext::computeFloatPosition const):
2113 (WebCore::Layout::InlineFormattingContext::computeStaticPosition const):
2114 (WebCore::Layout::InlineFormattingContext::computeInFlowPositionedPosition const):
2115 (WebCore::Layout::InlineFormattingContext::instrinsicWidthConstraints const):
2116 * layout/inlineformatting/InlineFormattingContext.h:
2117 * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
2118 (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
2119 (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockHeightAndMargin):
2120 * layout/inlineformatting/InlineFormattingState.cpp:
2121 (WebCore::Layout::InlineFormattingState::InlineFormattingState):
2122 * layout/inlineformatting/InlineFormattingState.h:
2123 * layout/inlineformatting/InlineInvalidation.cpp:
2124 (WebCore::Layout::InlineInvalidation::invalidate):
2125 * layout/inlineformatting/InlineInvalidation.h:
2126 * layout/inlineformatting/InlineLineBreaker.cpp:
2127 (WebCore::Layout::InlineLineBreaker::InlineLineBreaker):
2128 (WebCore::Layout::InlineLineBreaker::runWidth const):
2129 * layout/inlineformatting/InlineLineBreaker.h:
2130 * layout/layouttree/LayoutTreeBuilder.cpp:
2131 (WebCore::Layout::outputInlineRuns):
2132 (WebCore::Layout::outputLayoutTree):
2133 (WebCore::Layout::showLayoutTree):
2134 * layout/layouttree/LayoutTreeBuilder.h:
2135 * page/FrameViewLayoutContext.cpp:
2136 (WebCore::layoutUsingFormattingContext):
2138 2018-10-30 Wenson Hsieh <wenson_hsieh@apple.com>
2140 [Cocoa] Attachment dropped from one web view to another is missing its file wrapper
2141 https://bugs.webkit.org/show_bug.cgi?id=190530
2142 <rdar://problem/45232149>
2144 Reviewed by Tim Horton.
2146 Add support for copying and pasting attachment elements across web views by encoding and adding file wrapper
2147 data as subresources in the web archive when writing selected web content to the pasteboard, and then decoding
2148 and creating NSFileWrappers upon reading web content.
2150 Test: WKAttachmentTests.CopyAndPasteBetweenWebViews
2152 * WebCore.xcodeproj/project.pbxproj:
2153 * editing/Editor.cpp:
2154 (WebCore::Editor::registerAttachments):
2157 Add registerAttachments(), which registers _WKAttachments in the UI process given a list of
2158 SerializedAttachmentData. This behaves similarly to registerAttachmentIdentifiers(), but differs in that (1) it
2159 sends serialized file wrapper data, and (2) it sends a list of serialized attachments, rather than information
2160 about just a single attachment.
2162 * editing/SerializedAttachmentData.h:
2164 Introduce SerializedAttachmentData, a struct containing information needed to serialize and deserialize an
2165 attachment. These are used both when writing attachment data to the pasteboard, and when consuming attachment
2168 * editing/cocoa/WebContentReaderCocoa.mm:
2169 (WebCore::replaceRichContentWithAttachments):
2171 Add a step when pasting rich content with attachments, to collect and send serialized attachments to the client.
2172 Also, drive-by fix: don't WTFMove() the Ref here if it's still going to be used below.
2174 * html/HTMLAttachmentElement.cpp:
2175 (WebCore::HTMLAttachmentElement::archiveResourceURL):
2176 * html/HTMLAttachmentElement.h:
2178 Add a static helper function to compute a URL that represents the data for the given attachment identifier, for
2179 use in a web archive resource.
2181 * loader/archive/cf/LegacyWebArchive.cpp:
2182 (WebCore::addSubresourcesForAttachmentElementsIfNecessary):
2184 Add a helper function to create and append ArchiveResources representing attachment element data when writing
2185 attachments to the pasteboard via web archive data.
2187 (WebCore::LegacyWebArchive::create):
2188 * page/EditorClient.h:
2189 (WebCore::EditorClient::registerAttachments):
2190 (WebCore::EditorClient::serializedAttachmentDataForIdentifiers):
2192 2018-10-30 David Kilzer <ddkilzer@apple.com>
2194 XSLTProcessor should limit max transform depth
2195 <https://webkit.org/b/191075>
2196 <rdar://problem/45531453>
2198 Reviewed by Alex Christensen.
2200 Test: fast/xsl/xslt-max-depth.html
2202 * xml/SoftLinkLibxslt.cpp: Add macro for `xsltMaxDepth` global.
2203 * xml/SoftLinkLibxslt.h: Ditto.
2204 * xml/XSLTProcessorLibxslt.cpp:
2205 (WebCore::XSLTProcessor::transformToString): Set `xsltMaxDepth`
2206 to 1000. Default in libxslt.dylib is 3000.
2208 2018-10-30 Jim Mason <jmason@ibinx.com>
2210 [GTK] Scrollbars not following gtk-primary-button-warps-slider setting
2211 https://bugs.webkit.org/show_bug.cgi?id=191067
2213 Reviewed by Michael Catanzaro.
2215 * platform/gtk/ScrollbarThemeGtk.cpp:
2216 (WebCore::ScrollbarThemeGtk::handleMousePressEvent):
2218 2018-10-30 Alexey Proskuryakov <ap@apple.com>
2220 Clean up some obsolete MAX_ALLOWED macros
2221 https://bugs.webkit.org/show_bug.cgi?id=190916
2223 Reviewed by Tim Horton.
2225 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2226 (WebCore::exernalDeviceDisplayNameForPlayer):
2227 * platform/mac/PlatformEventFactoryMac.mm:
2228 (WebCore::globalPointForEvent):
2229 (WebCore::pointForEvent):
2230 (WebCore::mouseButtonForEvent):
2231 (WebCore::PlatformMouseEventBuilder::PlatformMouseEventBuilder):
2233 2018-10-30 Ali Juma <ajuma@chromium.org>
2235 Calling window.open("", "_self") allows working around restrictions on window.close()
2236 https://bugs.webkit.org/show_bug.cgi?id=191073
2238 Reviewed by Chris Dumez.
2240 Do not treat a re-used frame in DOMWindow::createWindow as having been opened by DOM.
2242 Test: fast/dom/Window/window-open-self-disallow-close.html
2244 * page/DOMWindow.cpp:
2245 (WebCore::DOMWindow::createWindow):
2247 2018-10-30 Andy Estes <aestes@apple.com>
2249 [Payment Request] Implement PaymentResponse.retry()
2250 https://bugs.webkit.org/show_bug.cgi?id=190985
2252 Reviewed by Daniel Bates.
2254 Implemented the retry() method on PaymentResponse as specified in the Payment Request API
2255 W3C Editor's Draft of 24 October 2018.
2257 See https://w3c.github.io/payment-request/#retry-method for details.
2259 Tests: http/tests/paymentrequest/payment-response-rejects-if-not-active.https.html
2260 http/tests/paymentrequest/payment-response-retry-method.https.html
2262 * Modules/applepay/PaymentCoordinator.h:
2263 (WebCore::PaymentCoordinator::client): Added. Returns m_client.
2264 * Modules/applepay/PaymentCoordinatorClient.h:
2265 (WebCore::PaymentCoordinatorClient::isMockPaymentCoordinator const): Added. Used to downcast
2266 a PaymentCoordinatorClient to a MockPaymentCoordinator.
2267 * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
2268 (WebCore::ApplePayPaymentHandler::computeTotalAndLineItems const): Made const.
2269 (WebCore::ApplePayPaymentHandler::computeErrors const): Broke this function into
2270 computeAddressErrors, computePayerErrors, and computePaymentMethodErrors, then modified this
2271 function to call those functions. Exceptions thrown by computePaymentMethodErrors are ignored.
2272 (WebCore::ApplePayPaymentHandler::computeAddressErrors const): Added.
2273 (WebCore::ApplePayPaymentHandler::computePayerErrors const): Added.
2274 (WebCore::ApplePayPaymentHandler::computePaymentMethodErrors const): Added.
2275 (WebCore::ApplePayPaymentHandler::complete): Added ASSERTs to verify whether result is a
2277 (WebCore::ApplePayPaymentHandler::retry): Computed PaymentErrors from PaymentValidationErrors,
2278 ensured the PaymentAuthorizationResult was non-final by adding an unknown error if necessary,
2279 and called PaymentCoordinator::completePaymentSession.
2280 * Modules/applepay/paymentrequest/ApplePayPaymentHandler.h:
2281 * Modules/paymentrequest/PaymentHandler.h:
2282 * Modules/paymentrequest/PaymentRequest.cpp:
2283 (WebCore::PaymentRequest::show): Changed to call settleShowPromise.
2284 (WebCore::PaymentRequest::abortWithException): Changed to abort PaymentResponse's retry
2285 promise, if present, instead of PaymentResponse's show promise.
2286 (WebCore::PaymentRequest::settleShowPromise): Added. Settles m_showPromise then sets it to
2288 (WebCore::PaymentRequest::closeActivePaymentHandler): Added. Hides the active payment
2289 handler then sets it to std::nullopt.
2290 (WebCore::PaymentRequest::stop): Stopped calling abortWithException, since that function
2291 might settle PaymentResponse's retry promise. PaymentResponse is now an ActiveDOMObject and
2292 will settle its own promise in its implementation of stop.
2293 (WebCore::PaymentRequest::abort): Changed to throw an InvalidStateError if there is a
2294 pending retry promise and to call abortWithException instead of stop.
2295 (WebCore::PaymentRequest::completeMerchantValidation): Changed to call abortWithException
2297 (WebCore::PaymentRequest::settleDetailsPromise): Ditto.
2298 (WebCore::PaymentRequest::accept): Updated the existing PaymentResponse, if present, rather
2299 than creating a new one. Settled the existing PaymentResponse's retry promise, if present,
2300 rather than the show promise.
2301 (WebCore::PaymentRequest::complete): Changed to throw an AbortError if there is no longer an
2302 active payment handler.
2303 (WebCore::PaymentRequest::retry): Changed to throw an AbortError if there is no longer an
2304 active payment handler, and to call PaymentHandler::retry if there is.
2305 (WebCore::PaymentRequest::cancel): Changed to call abortWithException instead of stop.
2306 * Modules/paymentrequest/PaymentRequest.h:
2307 * Modules/paymentrequest/PaymentRequest.idl:
2308 * Modules/paymentrequest/PaymentResponse.cpp:
2309 (WebCore::PaymentResponse::PaymentResponse):
2310 (WebCore::PaymentResponse::finishConstruction): Pending activities create strong references
2311 to |this|, so they cannot be created in constructors without relaxing adoption requirements.
2312 Added this function so that the pending activity can be created after the PaymentResponse is
2313 created and adopted.
2314 (WebCore::PaymentResponse::~PaymentResponse):
2315 (WebCore::PaymentResponse::complete): Updated to throw an AbortError or InvalidStateError
2317 (WebCore::PaymentResponse::retry): Implemented. Throws an AbortError or InvalidStateError
2318 when necessary, otherwise calls PaymentRequest::retry and stores the retry promise in
2320 (WebCore::PaymentResponse::abortWithException): Added. Rejects the retry promise with
2321 |exception|, clears the pending activity, and sets m_state to Completed.
2322 (WebCore::PaymentResponse::settleRetryPromise): Added. Settles the retry promise and sets it
2324 (WebCore::PaymentResponse::canSuspendForDocumentSuspension const): Added. Returns true if
2325 there is no pending activity.
2326 (WebCore::PaymentResponse::stop): Added. Rejects the retry promise with AbortError, clears
2327 the pending activity, and sets m_state to Stopped.
2328 * Modules/paymentrequest/PaymentResponse.h: Changed create to call finishConstruction and
2329 made PaymentResponse an ActiveDOMObject instead of a ContextDestructionObserver.
2330 * testing/Internals.cpp:
2331 (WebCore::Internals::Internals): Changed to only create a MockPaymentCoordinator for main frames.
2332 (WebCore::Internals::mockPaymentCoordinator): Changed to get the MockPaymentCoordinator by
2333 downcasting the page's payment coordinator client.
2334 * testing/Internals.h:
2335 * testing/Internals.idl:
2336 * testing/MockPaymentCoordinator.cpp:
2337 (WebCore::MockPaymentCoordinator::completePaymentSession): Changed to only increment
2338 hideCount for final results.
2339 * testing/MockPaymentCoordinator.h:
2340 (isType): Added so that PaymentCoordinatorClients can be downcasted to MockPaymentCoordinators.
2342 2018-10-30 Zalan Bujtas <zalan@apple.com>
2344 [iOS] Use the mainframe view size to compute window.outerWidth/height.
2345 https://bugs.webkit.org/show_bug.cgi?id=191070
2346 <rdar://problem/42368377>
2348 Reviewed by Tim Horton.
2350 Use a more reasonable value for window.outerWidth and height.
2351 (WKWebView's frame rect -> drawing area sizing -> WebPage's view size -> FrameView size)
2353 * page/DOMWindow.cpp:
2354 (WebCore::DOMWindow::outerHeight const):
2355 (WebCore::DOMWindow::outerWidth const):
2357 2018-10-30 Andy Estes <aestes@apple.com>
2359 [Apple Pay] PaymentRequest.canMakePayment() should resolve to true whenever Apple Pay is available
2360 https://bugs.webkit.org/show_bug.cgi?id=191039
2362 Reviewed by Megan Gardner.
2364 During a recent Web Payments WG F2F, we decided that canMakePayment() should return true
2365 whenever the user agent supports one or more of the specified payment methods, even if those
2366 payment methods do not have active instruments.
2368 Change WebKit's implementation of canMakePayment() for Apple Pay to resolve with the value
2369 of ApplePaySession.canMakePayments() rather than ApplePaySession.canMakePaymentsWithActiveCard().
2371 Added a test case to http/tests/paymentrequest/payment-request-canmakepayment-method.https.html.
2373 * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
2374 (WebCore::ApplePayPaymentHandler::canMakePayment):
2375 (WebCore::shouldDiscloseApplePayCapability): Deleted.
2376 * testing/MockPaymentCoordinator.cpp:
2377 (WebCore::MockPaymentCoordinator::canMakePayments):
2378 (WebCore::MockPaymentCoordinator::canMakePaymentsWithActiveCard):
2379 * testing/MockPaymentCoordinator.h:
2380 * testing/MockPaymentCoordinator.idl:
2382 2018-10-30 Sihui Liu <sihui_liu@apple.com>
2384 Add a deprecation warning to console for Web SQL
2385 https://bugs.webkit.org/show_bug.cgi?id=190936
2387 Reviewed by Ryosuke Niwa.
2389 No new tests. Just adding a console message.
2391 * Modules/webdatabase/DOMWindowWebDatabase.cpp:
2392 (WebCore::DOMWindowWebDatabase::openDatabase):
2394 2018-10-30 Sihui Liu <sihui_liu@apple.com>
2396 IndexedDB: iteration of cursors skip records if updated or deleted
2397 https://bugs.webkit.org/show_bug.cgi?id=190917
2398 <rdar://problem/35250410>
2400 Reviewed by Chris Dumez.
2402 When object store has changes, we cleared cached records and reset the SQLite statement,
2403 updating the boundary to the next key in cursor's direction. Therefore, the cursor could
2404 jump to the next key after update or deletion.
2405 We should cache those records before changing the statement.
2407 Test: storage/indexeddb/cursor-update-while-iterating.html
2409 * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
2410 (WebCore::IDBServer::SQLiteIDBCursor::objectStoreRecordsChanged):
2411 (WebCore::IDBServer::SQLiteIDBCursor::fetch):
2412 * Modules/indexeddb/server/SQLiteIDBCursor.h:
2414 2018-10-29 Zalan Bujtas <zalan@apple.com>
2416 [LFC][IFC] Introduce InlineFormattingContextGeometry class
2417 https://bugs.webkit.org/show_bug.cgi?id=191054
2419 Reviewed by Antti Koivisto.
2421 This is in preparation for inline-block support.
2423 Move float and inline-block elements layout to layoutFormattingContextRoot().
2424 computeWidthAndHeightForInlineBox takes care of replaced elements.
2427 * WebCore.xcodeproj/project.pbxproj:
2428 * layout/inlineformatting/InlineFormattingContext.cpp:
2429 (WebCore::Layout::InlineFormattingContext::layout const):
2430 (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot const):
2431 (WebCore::Layout::InlineFormattingContext::computeWidthAndHeightForInlineBox const):
2432 (WebCore::Layout::InlineFormattingContext::computeWidthAndHeight const): Deleted.
2433 * layout/inlineformatting/InlineFormattingContext.h:
2434 * layout/inlineformatting/InlineFormattingContextGeometry.cpp: Added.
2435 (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
2436 (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockHeightAndMargin):
2438 2018-10-28 Antoine Quint <graouts@apple.com>
2440 [Web Animations] Implement the update animations and send events procedure
2441 https://bugs.webkit.org/show_bug.cgi?id=191013
2442 <rdar://problem/45620495>
2444 Reviewed by Dean Jackson.
2446 While we implemented the various parts of what the Web Animations specification refers to as the "update animations and send events"
2447 procedure, we did not implement it as one function and in the correct order, specifically updating animations and sending events in
2448 two separate tasks. We now have a single method on DocumentTimeline which runs as the DisplayRefreshMonitor fires to update each
2449 "relevant" animation with the current time, perform a microtask checkpoint and dispatch events.
2451 Implementing this procedure allowed us to make several enhancements:
2453 1. We introduce the concept of a "relevant" animation, which is essentially an animation that is either pending or playing. All animations
2454 in a different state are no longer owned by the DocumentTimeline and can thus be destroyed if the developer doesn't hold references in JS.
2455 Maintaining such a list guarantees that we're only updating animations that would have changed state since the last time the "update animations
2456 and send events" procedure was run. Note that DeclarativeAnimation instances are also considered to be relevant if they have queued DOM events
2457 to dispatch as they could otherwise be destroyed before they can fully dispatch them.
2459 2. We no longer conflate the timing model and effects. Until now the way we would update animations was to go through all elements for which
2460 we had a registered animation, invalidate their style and finally forcing a style update on the document. We had a separate data structure where
2461 we help animations without targets so we update these as well in a separate pass, in order to make sure that promises and events would fire for
2462 them as expected. We now let the "update animations and send events" procedure update the timing of all relevant animations and let individual
2463 animation effects invalidate their style as needed, the document style invalidation happening naturally without DocumentTimeline forcing it.
2465 3. We use a single step to schedule the update of animations, which is to register for a display refresh monitor update provided a "relevant"
2466 animation is known since the previous update. Until now we first had an "timing model invalidation" task scheduled upon any change of an animation's
2467 timing model, which would then create a timer to the earliest moment any listed animation would require an update, finally registering a display
2468 refresh monitor update, which used at least GenericTaskQueue<Timer> and potentially two, whereas we use none right now.
2470 4. We allow for a display refresh monitor update to be canceled should the number of "relevant" animations since the last update goes back to 0.
2472 To facilitate all of this, we have changed the m_animations ListHashSet to contain only the "relevant" animations, and no longer every animation created
2473 that has this DocumentTimeline set as their "timeline" property. To keep this list current, every single change that changes a given animation's timing
2474 ends up calling AnimationTimeline::animationTimingDidChange() passing the animation as the sole parameter and adding this animation to m_animations. We
2475 immediately schedule a display refresh monitor update if one wasn't already scheduled. Then, when running the "update animations and send events"
2476 procedure, we call a new WebAnimation::tick() method on each of those animations, which updates this animation's effect and relevance, using the newly
2477 computed relevance to identify whether this animation should be kept in the m_animations ListHashSet.
2479 This is only the first step towards a more efficient update and ownership model of animations by the document timeline since animations created as CSS
2480 Animations and CSS Transitions are committed through CSS have dedicated data structures that are not updated in this particular patch, but this will be
2481 addressed in a followup to keep this already significant patch smaller. Another issue that will be addressed later is the ability to not schedule display
2482 refresh monitor udpates when only accelerated animations are running.
2484 * animation/AnimationTimeline.cpp:
2485 (WebCore::AnimationTimeline::animationTimingDidChange): Called by animations when any aspect of their timing model changes. The provided animation is then
2486 added to the m_animations list unless its timeline is no longer this timeline.
2487 (WebCore::AnimationTimeline::removeAnimation): Remove the provided animation from m_animations and remove any animation registered on the element-specific
2488 animation lists if this animation has an effect with a target.
2489 (WebCore::AnimationTimeline::animationWasAddedToElement): We no longer need to worry about the m_animationsWithoutTarget data structure since we removed it.
2490 (WebCore::removeCSSTransitionFromMap): Fix a bug where we would remove any CSSTransition in the provided map that had a matching transition-property instead
2491 of checking the CSSTransition registered for this transition-property was indeed the provided CSSTransition. The other code changes in this patch made this
2492 code now cause regressions in the Web Platform Tests.
2493 (WebCore::AnimationTimeline::animationWasRemovedFromElement): Stop updating m_animationsWithoutTarget since it no longer exists.
2494 (WebCore::AnimationTimeline::elementWasRemoved):
2495 (WebCore::AnimationTimeline::updateCSSAnimationsForElement): Fix a small error that caused a regression in the Web Platform Tests where we could attempt to
2496 call setBackingAnimation() on a nullptr instead of a valid CSSAnimation.
2497 (WebCore::AnimationTimeline::cancelOrRemoveDeclarativeAnimation):
2498 (WebCore::AnimationTimeline::addAnimation): Deleted.
2499 * animation/AnimationTimeline.h:
2500 (WebCore::AnimationTimeline::hasElementAnimations const): Deleted.
2501 (WebCore::AnimationTimeline:: const): Deleted.
2502 (WebCore::AnimationTimeline::elementToAnimationsMap): Deleted.
2503 (WebCore::AnimationTimeline::elementToCSSAnimationsMap): Deleted.
2504 (WebCore::AnimationTimeline::elementToCSSTransitionsMap): Deleted.
2505 * animation/CSSTransition.cpp:
2506 (WebCore::CSSTransition::canBeListed const): Deleted.
2507 * animation/CSSTransition.h:
2508 * animation/DeclarativeAnimation.cpp:
2509 (WebCore::DeclarativeAnimation::tick): Call the superclass's method and queue any necessary DOM events reflecting the timing model changes.
2510 (WebCore::DeclarativeAnimation::needsTick const): Call the superclass's method and return true also if we have pending events since otherwise this animation
2511 could be removed from m_animations on its AnimationTimeline and potentially destroyed before the GenericEventQueue had a chance to dispatch all events.
2512 (WebCore::DeclarativeAnimation::startTime const): We removed the custom binding for this IDL property and renamed the method from bindingsStartTime to startTime.
2513 (WebCore::DeclarativeAnimation::setStartTime): We removed the custom binding for this IDL property and renamed the method from setBindingsStartTime to setStartTime.
2514 (WebCore::DeclarativeAnimation::bindingsStartTime const): Deleted.
2515 (WebCore::DeclarativeAnimation::setBindingsStartTime): Deleted.
2516 * animation/DeclarativeAnimation.h:
2517 * animation/DocumentAnimationScheduler.cpp:
2518 (WebCore::DocumentAnimationScheduler::unscheduleWebAnimationsResolution): Add a method to mark that we no longer need a display refresh monitor update for this
2519 document's animation timeline. This is called when m_animations becomes empty.
2520 * animation/DocumentAnimationScheduler.h:
2521 * animation/DocumentTimeline.cpp:
2522 (WebCore::DocumentTimeline::DocumentTimeline):
2523 (WebCore::DocumentTimeline::detachFromDocument): Stop clearing two task queues and a timer that no longer exist and instead only clear the task queue to clear
2524 the cached current time, which we queue any time we generate a new one (see DocumentTimeline::currentTime).
2525 (WebCore::DocumentTimeline::getAnimations const): Use isRelevant() instead of canBeListed().
2526 (WebCore::DocumentTimeline::updateThrottlingState):
2527 (WebCore::DocumentTimeline::suspendAnimations):
2528 (WebCore::DocumentTimeline::resumeAnimations):
2529 (WebCore::DocumentTimeline::numberOfActiveAnimationsForTesting const):
2530 (WebCore::DocumentTimeline::currentTime): Queue a task in the new m_currentTimeClearingTaskQueue task queue to clear the current time that we've generated and cached
2531 in the next run loop (provided all pending JS execution has also completed).
2532 (WebCore::DocumentTimeline::maybeClearCachedCurrentTime):
2533 (WebCore::DocumentTimeline::scheduleAnimationResolutionIfNeeded): Schedule a display refresh monitor update if we are not suspended and have "relevant" animations.
2534 (WebCore::DocumentTimeline::animationTimingDidChange): Call scheduleAnimationResolutionIfNeeded() after calling the superclass's implementation.
2535 (WebCore::DocumentTimeline::removeAnimation): Call unscheduleAnimationResolution() if the list of "relevant" animations is now empty.
2536 (WebCore::DocumentTimeline::unscheduleAnimationResolution): Unschedule a pending display refresh monitor update.
2537 (WebCore::DocumentTimeline::animationResolutionTimerFired):
2538 (WebCore::DocumentTimeline::updateAnimationsAndSendEvents): Implement the "update animations and send events" procedure as specified by the Web Animations spec.
2539 During this procedure, we call tick() on all animations listed in m_animations and create a list of animations to remove from that list if this animation is no
2540 longer relevant following the call to tick().
2541 (WebCore::DocumentTimeline::enqueueAnimationPlaybackEvent):
2542 (WebCore::DocumentTimeline::timingModelDidChange): Deleted.
2543 (WebCore::DocumentTimeline::scheduleInvalidationTaskIfNeeded): Deleted.
2544 (WebCore::DocumentTimeline::performInvalidationTask): Deleted.
2545 (WebCore::DocumentTimeline::updateAnimationSchedule): Deleted.
2546 (WebCore::DocumentTimeline::animationScheduleTimerFired): Deleted.
2547 (WebCore::DocumentTimeline::updateAnimations): Deleted.
2548 (WebCore::compareAnimationPlaybackEvents): Deleted.
2549 (WebCore::DocumentTimeline::performEventDispatchTask): Deleted.
2550 * animation/DocumentTimeline.h:
2551 * animation/WebAnimation.cpp: The majority of the changes to this class is that we call the new timingDidChange() method when any code that modifies the timing model
2552 is run. We also remove methods to set the pending play and pause tasks as well as the animation's start time and hold time since any time we're changing these instance
2553 variables, we later already have a call to update the timing model and we were doing more work than needed. As a result we no longer need an internal method to set the
2554 start time and can stop requiring a custom IDL binding for the "startTime" property.
2555 (WebCore::WebAnimation::effectTimingPropertiesDidChange):
2556 (WebCore::WebAnimation::setEffect):
2557 (WebCore::WebAnimation::setEffectInternal):
2558 (WebCore::WebAnimation::setTimeline):
2559 (WebCore::WebAnimation::setTimelineInternal):
2560 (WebCore::WebAnimation::startTime const):
2561 (WebCore::WebAnimation::setStartTime):
2562 (WebCore::WebAnimation::silentlySetCurrentTime):
2563 (WebCore::WebAnimation::setCurrentTime):
2564 (WebCore::WebAnimation::setPlaybackRate):
2565 (WebCore::WebAnimation::cancel):
2566 (WebCore::WebAnimation::resetPendingTasks):
2567 (WebCore::WebAnimation::finish):
2568 (WebCore::WebAnimation::timingDidChange): New method called any time a timing property changed where we run the "update the finished state" procedure and notify the
2569 animation's timeline that its timing changed so that it can be considered the next time the "update animations and send events" procedure runs.
2570 (WebCore::WebAnimation::invalidateEffect):
2571 (WebCore::WebAnimation::updateFinishedState): Update the animation's relevance after running the procedure as specified.
2572 (WebCore::WebAnimation::play):
2573 (WebCore::WebAnimation::runPendingPlayTask):
2574 (WebCore::WebAnimation::pause):
2575 (WebCore::WebAnimation::runPendingPauseTask):
2576 (WebCore::WebAnimation::needsTick const):
2577 (WebCore::WebAnimation::tick): New method called during the "update animations and send events" procedure where we run the "update the finished state" procedure and run
2578 the pending play and pause tasks.
2579 (WebCore::WebAnimation::resolve):
2580 (WebCore::WebAnimation::updateRelevance):
2581 (WebCore::WebAnimation::computeRelevance):
2582 (WebCore::WebAnimation::timingModelDidChange): Deleted.
2583 (WebCore::WebAnimation::setHoldTime): Deleted.
2584 (WebCore::WebAnimation::bindingsStartTime const): Deleted.
2585 (WebCore::WebAnimation::setBindingsStartTime): Deleted.
2586 (WebCore::WebAnimation::setTimeToRunPendingPlayTask): Deleted.
2587 (WebCore::WebAnimation::setTimeToRunPendingPauseTask): Deleted.
2588 (WebCore::WebAnimation::updatePendingTasks): Deleted.
2589 (WebCore::WebAnimation::timeToNextRequiredTick const): Deleted.
2590 (WebCore::WebAnimation::runPendingTasks): Deleted.
2591 (WebCore::WebAnimation::canBeListed const): Deleted.
2592 * animation/WebAnimation.h:
2593 (WebCore::WebAnimation::isRelevant const):
2594 (WebCore::WebAnimation::hasPendingPlayTask const):
2595 (WebCore::WebAnimation::isEffectInvalidationSuspended):
2596 * animation/WebAnimation.idl:
2598 (WebCore::Element::getAnimations): Use isRelevant() instead of canBeListed().
2600 2018-10-30 Youenn Fablet <youenn@apple.com>
2602 LibWebRTCRtpReceiverBackend::getSynchronizationSources should use Vector::append
2603 https://bugs.webkit.org/show_bug.cgi?id=191026
2605 Reviewed by Eric Carlson.
2607 Covered by updated test.
2609 * Modules/mediastream/libwebrtc/LibWebRTCRtpReceiverBackend.cpp:
2610 (WebCore::LibWebRTCRtpReceiverBackend::getSynchronizationSources const):
2612 2018-10-30 Claudio Saavedra <csaavedra@igalia.com>
2614 [GTK][WPE] Fixes to the PublicSuffix implementation
2615 https://bugs.webkit.org/show_bug.cgi?id=191031
2617 Reviewed by Michael Catanzaro.
2619 Covered by existing tests.
2621 Downcase hostnames before passing it on to the underlying
2622 libsoup API. Special case localhost and fix a mixed-up
2623 libsoup GError checks. This fixes most of the failures.
2625 * platform/soup/PublicSuffixSoup.cpp:
2626 (WebCore::isPublicSuffix):
2627 (WebCore::topPrivatelyControlledDomain):
2629 2018-10-29 Zalan Bujtas <zalan@apple.com>
2631 Missing from r237549
2633 * layout/blockformatting/BlockFormattingContext.cpp:
2634 (WebCore::Layout::BlockFormattingContext::precomputeVerticalPositionForFormattingRootIfNeeded const):
2635 (WebCore::Layout::hasPrecomputedMarginTop):
2637 2018-10-29 Ross Kirsling <ross.kirsling@sony.com>
2639 Unreviewed speculative build fix for AppleWin after r237559.
2641 * PlatformAppleWin.cmake:
2643 2018-10-29 Justin Michaud <justin_michaud@apple.com>
2645 Revert r237347 registered custom properties... https://bugs.webkit.org/show_bug.cgi?id=190039
2646 https://bugs.webkit.org/show_bug.cgi?id=190919
2648 Reviewed by Michael Saboff.
2650 * css/CSSComputedStyleDeclaration.cpp:
2651 (WebCore::ComputedStyleExtractor::customPropertyValue):
2652 * css/CSSCustomPropertyValue.cpp:
2653 (WebCore::CSSCustomPropertyValue::customCSSText const):
2654 (WebCore::CSSCustomPropertyValue::tokens const):
2655 (WebCore::CSSCustomPropertyValue::checkVariablesForCycles const):
2656 (WebCore::CSSCustomPropertyValue::resolveVariableReferences const):
2657 (WebCore::CSSCustomPropertyValue::setResolvedTypedValue):
2658 (WebCore::CSSCustomPropertyValue::equals const): Deleted.
2659 * css/CSSCustomPropertyValue.h:
2660 * css/CSSRegisteredCustomProperty.cpp:
2661 (WebCore::CSSRegisteredCustomProperty::CSSRegisteredCustomProperty):
2662 * css/CSSRegisteredCustomProperty.h:
2663 * css/CSSVariableData.cpp:
2664 (WebCore::CSSVariableData::consumeAndUpdateTokens):
2665 (WebCore::CSSVariableData::CSSVariableData):
2666 (WebCore::CSSVariableData::checkVariablesForCycles const):
2667 (WebCore::CSSVariableData::checkVariablesForCyclesWithRange const):
2668 (WebCore::CSSVariableData::resolveVariableFallback const):
2669 (WebCore::CSSVariableData::resolveVariableReference const):
2670 (WebCore::CSSVariableData::resolveVariableReferences const):
2671 (WebCore::CSSVariableData::resolveTokenRange const):
2672 * css/CSSVariableData.h:
2673 (WebCore::CSSVariableData::create):
2674 (WebCore::CSSVariableData::createResolved):
2675 (WebCore::CSSVariableData::needsVariableResolution const):
2676 (WebCore::CSSVariableData::CSSVariableData):
2677 * css/CSSVariableReferenceValue.cpp:
2678 (WebCore::CSSVariableReferenceValue::checkVariablesForCycles const):
2679 (WebCore::resolveVariableFallback): Deleted.
2680 (WebCore::resolveVariableReference): Deleted.
2681 (WebCore::resolveTokenRange): Deleted.
2682 (WebCore::CSSVariableReferenceValue::resolveVariableReferences const): Deleted.
2683 * css/CSSVariableReferenceValue.h:
2684 (WebCore::CSSVariableReferenceValue::create):
2685 (WebCore::CSSVariableReferenceValue::variableDataValue const):
2686 (WebCore::CSSVariableReferenceValue::equals const):
2687 * css/DOMCSSRegisterCustomProperty.cpp:
2688 (WebCore::DOMCSSRegisterCustomProperty::registerProperty):
2689 * css/PropertySetCSSStyleDeclaration.cpp:
2690 (WebCore::PropertySetCSSStyleDeclaration::setProperty):
2691 * css/StyleBuilderCustom.h:
2692 (WebCore::StyleBuilderCustom::applyInitialCustomProperty):
2693 (WebCore::StyleBuilderCustom::applyValueCustomProperty):
2694 * css/StyleProperties.cpp:
2695 (WebCore::MutableStyleProperties::setCustomProperty):
2696 * css/StyleProperties.h:
2697 * css/StyleResolver.cpp:
2698 (WebCore::StyleResolver::State::setStyle):
2699 (WebCore::StyleResolver::styleForKeyframe):
2700 (WebCore::StyleResolver::styleForPage):
2701 (WebCore::StyleResolver::applyMatchedProperties):
2702 (WebCore::StyleResolver::applyPropertyToCurrentStyle):
2703 (WebCore::StyleResolver::applyProperty):
2704 (WebCore::StyleResolver::resolvedVariableValue const):
2705 (WebCore::StyleResolver::CascadedProperties::applyDeferredProperties):
2706 (WebCore::StyleResolver::CascadedProperties::Property::apply):
2707 (WebCore::StyleResolver::applyCascadedProperties):
2708 (WebCore::StyleResolver::applyCascadedCustomProperty): Deleted.
2709 * css/StyleResolver.h:
2710 * css/parser/CSSParser.cpp:
2711 (WebCore::CSSParser::parseValueWithVariableReferences):
2712 * css/parser/CSSParser.h:
2713 * css/parser/CSSPropertyParser.cpp:
2714 (WebCore::CSSPropertyParser::CSSPropertyParser):
2715 (WebCore::CSSPropertyParser::parseValueStart):
2716 (WebCore::CSSPropertyParser::parseSingleValue):
2717 (WebCore::CSSPropertyParser::canParseTypedCustomPropertyValue): Deleted.
2718 (WebCore::CSSPropertyParser::parseTypedCustomPropertyValue): Deleted.
2719 (WebCore::CSSPropertyParser::collectParsedCustomPropertyValueDependencies): Deleted.
2720 * css/parser/CSSPropertyParser.h:
2721 * css/parser/CSSVariableParser.cpp:
2722 (WebCore::CSSVariableParser::parseDeclarationValue):
2723 * dom/ConstantPropertyMap.cpp:
2724 (WebCore::ConstantPropertyMap::setValueForProperty):
2725 (WebCore::variableDataForPositivePixelLength):
2726 (WebCore::variableDataForPositiveDuration):
2727 * rendering/style/RenderStyle.cpp:
2728 (WebCore::RenderStyle::checkVariablesInCustomProperties):
2729 * rendering/style/RenderStyle.h:
2730 (WebCore::RenderStyle::setInheritedCustomPropertyValue):
2731 (WebCore::RenderStyle::setNonInheritedCustomPropertyValue):
2732 * rendering/style/StyleCustomPropertyData.h:
2733 (WebCore::StyleCustomPropertyData::operator== const):
2734 (WebCore::StyleCustomPropertyData::setCustomPropertyValue):
2735 (WebCore::StyleCustomPropertyData::StyleCustomPropertyData):
2737 2018-10-29 Youenn Fablet <youenn@apple.com>
2739 Handle MDNS resolution of candidates through libwebrtc directly
2740 https://bugs.webkit.org/show_bug.cgi?id=190681
2742 Reviewed by Eric Carlson.
2744 Remove the previous MDNS resolution mechanism.
2745 Instead, add support for the AsyncResolver mechanism added to libwebrtc.
2746 Covered by current mdns webrtc test that is unflaked.
2748 * Modules/mediastream/PeerConnectionBackend.cpp:
2749 (WebCore::PeerConnectionBackend::addIceCandidate):
2750 * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
2751 (WebCore::LibWebRTCProvider::createPeerConnection):
2752 * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
2753 * testing/MockLibWebRTCPeerConnection.cpp:
2754 (WebCore::MockLibWebRTCPeerConnectionFactory::CreatePeerConnection):
2755 * testing/MockLibWebRTCPeerConnection.h:
2757 2018-10-29 Devin Rousso <drousso@apple.com>
2759 Web Inspector: increase size limits for NetworkResourceData
2760 https://bugs.webkit.org/show_bug.cgi?id=191034
2761 <rdar://problem/45529852>
2763 Reviewed by Joseph Pecoraro.
2765 No tests since no new functionality.
2767 * inspector/NetworkResourcesData.cpp:
2768 All resources: 100MB => 200MB
2769 Each resource: 10MB => 50MB
2771 2018-10-29 Tim Horton <timothy_horton@apple.com>
2773 Modernize WebKit nibs and lprojs for localization's sake
2774 https://bugs.webkit.org/show_bug.cgi?id=190911
2775 <rdar://problem/45349466>
2777 Reviewed by Dan Bernstein.
2779 * PlatformGTK.cmake:
2780 * PlatformWPE.cmake:
2781 * PlatformWin.cmake:
2782 * WebCore.xcodeproj/project.pbxproj:
2783 * en.lproj/Localizable.strings: Renamed from Source/WebCore/English.lproj/Localizable.strings.
2784 * en.lproj/Localizable.stringsdict: Renamed from Source/WebCore/English.lproj/Localizable.stringsdict.
2785 * en.lproj/mediaControlsLocalizedStrings.js: Renamed from Source/WebCore/English.lproj/mediaControlsLocalizedStrings.js.
2786 * en.lproj/modern-media-controls-localized-strings.js: Renamed from Source/WebCore/English.lproj/modern-media-controls-localized-strings.js.
2789 2018-10-29 Tim Horton <timothy_horton@apple.com>
2791 Make FindOptionsShowOverlay work on iOS
2792 https://bugs.webkit.org/show_bug.cgi?id=190551
2794 Reviewed by Andy Estes.
2796 * platform/graphics/GraphicsContext.h:
2797 Export some more GraphicsContext methods.
2799 2018-10-29 Youenn Fablet <youenn@apple.com>
2801 Invalid ssrc value in the stats of type 'inbound-rtp'
2802 https://bugs.webkit.org/show_bug.cgi?id=190826
2803 <rdar://problem/45487435>
2805 Reviewed by Eric Carlson.
2807 Value was not initialized in WebCore if missing from libwebrtc.
2808 Change value to an optional so that it will not appear if libwebrtc does not expose it.
2809 Move integer/boolean values from being initialized to be optional so
2810 that we do not expose them to JS if not exposed by libwebrtc.
2812 Covered by updated tests.
2814 * Modules/mediastream/RTCStatsReport.h:
2816 2018-10-29 Jer Noble <jer.noble@apple.com>
2818 CRASH in CoreGraphics: ERROR_CGDataProvider_BufferIsNotBigEnough
2819 https://bugs.webkit.org/show_bug.cgi?id=190954
2821 Reviewed by Simon Fraser.
2823 Crash analyitics show that WebProcess will crash in ERROR_CGDataProvider_BufferIsNotBigEnough,
2824 which attempts to fetch the last byte in the image buffer in order to verify that the entire
2825 buffer is readable. Unfortunately, the stack trace generated by this crash does not identify
2826 what CGDataProvider is responsible for the not-big-enough buffer. In order to identify which
2827 CGDataProvider created by WebKit is responsible (if any), we will add our own version of
2828 ERROR_CGDataProvider_BufferIsNotBigEnough, called at CGDataProvider creation time, which should
2829 generate a crash within the responsible stack frame.
2831 (This assumes that the issue is the wrong sized buffer at CGDataProvider creation time, and not
2832 that the buffer itself is reclaimed between creation time and access.)
2834 * WebCore.xcodeproj/project.pbxproj:
2835 * platform/graphics/cg/GraphicsContext3DCG.cpp:
2836 (WebCore::GraphicsContext3D::paintToCanvas):
2837 * platform/graphics/cg/ImageBufferCG.cpp:
2838 (WebCore::ImageBuffer::ImageBuffer):
2839 (WebCore::ImageBuffer::toCFData const):
2841 * platform/graphics/cocoa/WebGLLayer.mm:
2842 (-[WebGLLayer copyImageSnapshotWithColorSpace:]):
2843 * platform/graphics/cv/PixelBufferConformerCV.cpp:
2844 (WebCore::CVPixelBufferGetBytePointerCallback):
2845 (WebCore::PixelBufferConformerCV::createImageFromPixelBuffer):
2846 * platform/graphics/cg/ImageUtilitiesCG.h: Added.
2847 (WebCore::verifyImageBufferIsBigEnough):
2849 2018-10-29 David Kilzer <ddkilzer@apple.com>
2851 Fix clang static analyzer warning in StyleBuilderConverter.h
2852 <https://webkit.org/b/190907>
2854 Reviewed by Antti Koivisto.
2856 Fix the following clang static warning in StyleBuilderConverter.h:
2857 Value stored to 'autoFlow' during its initialization is never read
2859 * css/StyleBuilderConverter.h:
2860 (WebCore::StyleBuilderConverter::convertGridAutoFlow): Move
2861 assignment of RenderStyle::initialGridAutoFlow() to `default`
2862 case. Make `CSSValueDense` consistent with other cases by
2863 assigning value to `autoFlow` instead of returning early.
2865 2018-10-29 Youenn Fablet <youenn@apple.com>
2867 Guard H264 simulcast with a runtime flag
2868 https://bugs.webkit.org/show_bug.cgi?id=191025
2870 Reviewed by Eric Carlson.
2872 Add a runtime flag for H264 simulcast and enable libwebrtc field trial based on it.
2873 Covered by existing test.
2875 * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
2876 (WebCore::LibWebRTCMediaEndpoint::LibWebRTCMediaEndpoint):
2877 * page/RuntimeEnabledFeatures.h:
2878 (WebCore::RuntimeEnabledFeatures::webRTCH264SimulcastEnabled const):
2879 (WebCore::RuntimeEnabledFeatures::setWebRTCH264SimulcastEnabled):
2881 2018-10-29 Zalan Bujtas <zalan@apple.com>
2883 [LFC][IFC] Compute estimated margin top for inline formatting root's ancestors
2884 https://bugs.webkit.org/show_bug.cgi?id=191018
2886 Reviewed by Antti Koivisto.
2888 <div><img style="float: left"></div>
2889 This inline formatting context (root -> div) inherits the floating context from the parent block formatting context.
2890 Floats are added to the floating context relative to the floating context's root. In order to position this float properly we
2891 need to precompute the ancestor's margin top (stop at the block formatting root boundary).
2893 Test: fast/inline/simple-intruding-floats3.html
2895 * layout/blockformatting/BlockFormattingContext.cpp:
2896 (WebCore::Layout::BlockFormattingContext::precomputeVerticalPositionForFormattingRootIfNeeded const):
2898 2018-10-29 Zalan Bujtas <zalan@apple.com>
2900 [LFC] Add support for inflow non replaced content height when the box is an inline formatting root.
2901 https://bugs.webkit.org/show_bug.cgi?id=191011
2903 Reviewed by Antti Koivisto.
2905 // 10.6.3 Block-level non-replaced elements in normal flow when 'overflow' computes to 'visible'
2906 // Height is the bottom edge of the last line box, if the box establishes a inline formatting context with one or more lines
2908 This is temporary until after inline runs transition to the display tree.
2910 Test: fast/inline/simple-intruding-floats2.html
2912 * layout/blockformatting/BlockFormattingContextGeometry.cpp:
2913 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
2914 * layout/inlineformatting/InlineRun.h:
2915 (WebCore::Layout::InlineRun::logicalLeft const):
2916 (WebCore::Layout::InlineRun::logicalRight const):
2917 (WebCore::Layout::InlineRun::logicalTop const):
2918 (WebCore::Layout::InlineRun::logicalBottom const):
2919 (WebCore::Layout::InlineRun::width const):
2920 (WebCore::Layout::InlineRun::height const):
2921 (WebCore::Layout::InlineRun::setWidth):
2922 (WebCore::Layout::InlineRun::setLogicalLeft):
2923 (WebCore::Layout::InlineRun::setLogicalRight):
2924 (WebCore::Layout::InlineRun::moveHorizontally):
2925 (WebCore::Layout::InlineRun::InlineRun):
2926 * layout/inlineformatting/Line.cpp:
2927 (WebCore::Layout::InlineFormattingContext::Line::appendContent):
2929 2018-10-29 Zalan Bujtas <zalan@apple.com>
2931 [LFC][IFC] Add support for simple intruding floats.
2932 https://bugs.webkit.org/show_bug.cgi?id=190998
2934 Reviewed by Antti Koivisto.
2936 In order to be able to figure out whether a float is intruding on a line, we need to provide the line's final vertical position.
2937 This vertical position must be in the same coordinate system as the float's position is. In case of intruding float,
2938 it is the parent block formatting root's coordinate system (that's where the float lives.)
2940 Test: fast/inline/simple-intruding-float1.html
2942 * layout/blockformatting/BlockFormattingContext.cpp:
2943 (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const):
2944 (WebCore::Layout::BlockFormattingContext::computeEstimatedMarginTopForAncestors const):
2945 (WebCore::Layout::BlockFormattingContext::precomputeVerticalPositionForFormattingRootIfNeeded const):
2946 (WebCore::Layout::BlockFormattingContext::computeFloatingPosition const):
2947 (WebCore::Layout::BlockFormattingContext::computePositionToAvoidFloats const):
2948 (WebCore::Layout::BlockFormattingContext::computeVerticalPositionForFloatClear const):
2949 * layout/blockformatting/BlockFormattingContext.h:
2950 * layout/floats/FloatingState.cpp:
2951 (WebCore::Layout::FloatingState::constraints const):
2953 2018-10-29 Zalan Bujtas <zalan@apple.com>
2955 [LFC][IFC] Inline layout produces separate runs when float is present.
2956 https://bugs.webkit.org/show_bug.cgi?id=190980
2958 Reviewed by Antti Koivisto.
2960 <div>foo<img src="foobar.jpg" style="float: left">bar</div> produces 2 inline boxes (foo) and (bar) -> current inline code
2961 while it is really just one continuous run (foobar) -> LFC
2962 Adjust verification code to check for such runs.
2964 * layout/Verification.cpp:
2965 (WebCore::Layout::checkForMatchingNonTextRuns):
2966 (WebCore::Layout::checkForMatchingTextRuns):
2967 (WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):
2968 * layout/inlineformatting/InlineRun.h:
2969 (WebCore::Layout::InlineRun::textContext const):
2971 2018-10-29 Youenn Fablet <youenn@apple.com>
2973 [WebRTC] Enable VP8 by default
2974 https://bugs.webkit.org/show_bug.cgi?id=190672
2975 <rdar://problem/43663785>
2977 Reviewed by Eric Carlson.
2979 No change of behavior.
2981 * page/RuntimeEnabledFeatures.h: Set default value to true.
2983 2018-10-28 Andy Estes <aestes@apple.com>
2985 [Payment Request] Implement MerchantValidationEvent.methodName
2986 https://bugs.webkit.org/show_bug.cgi?id=190058
2988 Reviewed by Darin Adler.
2990 Implemented MerchantValidationEvent's methodName attribute and MerchantValidationEventInit's
2991 methodName property as specified in the Payment Request API W3C Editor's Draft of
2994 Covered by web-platform-tests/payment-request/MerchantValidationEvent/constructor.https.html.
2996 * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
2997 (WebCore::ApplePayPaymentHandler::validateMerchant): Passed the payment method identifier
2998 (as a string) to MerchantValidationEvent::create()
2999 * Modules/paymentrequest/MerchantValidationEvent.cpp:
3000 (WebCore::MerchantValidationEvent::create): Validated the methodName before constructing the
3001 event, throwing a RangeError on failure.
3002 (WebCore::MerchantValidationEvent::MerchantValidationEvent):
3003 * Modules/paymentrequest/MerchantValidationEvent.h:
3004 * Modules/paymentrequest/MerchantValidationEvent.idl:
3006 2018-10-27 Antoine Quint <graouts@apple.com>
3008 [Web Animations] Remove WebAnimation::description()
3009 https://bugs.webkit.org/show_bug.cgi?id=190995
3011 Reviewed by Dean Jackson.
3013 This method is never used.
3015 * animation/WebAnimation.cpp:
3016 (WebCore::WebAnimation::description): Deleted.
3017 * animation/WebAnimation.h:
3019 2018-10-27 Antoine Quint <graouts@apple.com>
3021 [Web Animations] Move the logic of Document::getAnimations() to DocumentTimeline
3022 https://bugs.webkit.org/show_bug.cgi?id=190994
3024 Reviewed by Dean Jackson.
3026 It would be cleaner to have the logic of document.getAnimations() on the DocumentTimeline instead of the Document, keep more
3027 animation-related code compartmentalized in the animation directory. No change in behavior, so no test update.
3029 * animation/DocumentTimeline.cpp:
3030 (WebCore::DocumentTimeline::getAnimations const):
3031 * animation/DocumentTimeline.h:
3033 (WebCore::Document::getAnimations):
3035 2018-10-27 Antoine Quint <graouts@apple.com>
3037 [Web Animations] Move bindings methods requiring style flush from CSSAnimation to DeclarativeAnimation
3038 https://bugs.webkit.org/show_bug.cgi?id=190996
3040 Reviewed by Dean Jackson.
3042 Moving all of the IDL bindings methods that require flushing style from CSSAnimation to its superclass
3043 DeclarativeAnimation so we follow the same route in CSSTransition. Note that there was code in
3044 CSSAnimation::bindingsCurrentTime() that was not moved as it proved to not be necessary.
3046 * animation/CSSAnimation.cpp:
3047 (WebCore::CSSAnimation::bindingsPlay):
3048 (WebCore::CSSAnimation::bindingsPause):
3049 (WebCore::CSSAnimation::bindingsStartTime const): Deleted.
3050 (WebCore::CSSAnimation::setBindingsStartTime): Deleted.
3051 (WebCore::CSSAnimation::bindingsCurrentTime const): Deleted.
3052 (WebCore::CSSAnimation::setBindingsCurrentTime): Deleted.
3053 (WebCore::CSSAnimation::bindingsPlayState const): Deleted.
3054 (WebCore::CSSAnimation::bindingsPending const): Deleted.
3055 (WebCore::CSSAnimation::bindingsReady): Deleted.
3056 (WebCore::CSSAnimation::bindingsFinished): Deleted.
3057 (WebCore::CSSAnimation::flushPendingStyleChanges const): Deleted.
3058 * animation/CSSAnimation.h:
3059 * animation/DeclarativeAnimation.cpp:
3060 (WebCore::DeclarativeAnimation::bindingsStartTime const):
3061 (WebCore::DeclarativeAnimation::setBindingsStartTime):
3062 (WebCore::DeclarativeAnimation::bindingsCurrentTime const):
3063 (WebCore::DeclarativeAnimation::setBindingsCurrentTime):
3064 (WebCore::DeclarativeAnimation::bindingsPlayState const):
3065 (WebCore::DeclarativeAnimation::bindingsPending const):
3066 (WebCore::DeclarativeAnimation::bindingsReady):
3067 (WebCore::DeclarativeAnimation::bindingsFinished):
3068 (WebCore::DeclarativeAnimation::bindingsPlay):
3069 (WebCore::DeclarativeAnimation::bindingsPause):
3070 (WebCore::DeclarativeAnimation::flushPendingStyleChanges const):
3071 * animation/DeclarativeAnimation.h:
3073 2018-10-27 Charlie Turner <cturner@igalia.com>
3075 [EME] Add a logging macro
3076 https://bugs.webkit.org/show_bug.cgi?id=190984
3078 Reviewed by Xabier Rodriguez-Calvar.
3080 No tests since no new functionality.
3082 * Modules/encryptedmedia/MediaKeySession.cpp:
3083 (WebCore::MediaKeySession::MediaKeySession):
3084 (WebCore::MediaKeySession::generateRequest):
3085 (WebCore::MediaKeySession::update):
3086 (WebCore::MediaKeySession::close):
3087 (WebCore::MediaKeySession::remove):
3088 (WebCore::MediaKeySession::sessionClosed):
3089 * Modules/encryptedmedia/MediaKeys.cpp:
3090 (WebCore::MediaKeys::createSession):
3091 * Modules/encryptedmedia/NavigatorEME.cpp:
3092 (WebCore::NavigatorEME::requestMediaKeySystemAccess):
3093 * platform/Logging.h:
3095 2018-10-27 Xabier Rodriguez Calvar <calvaris@igalia.com>
3097 [GStreamer][EME] Post key received to bus should be done before waking up other threads
3098 https://bugs.webkit.org/show_bug.cgi?id=190822
3100 Reviewed by Philippe Normand.
3102 Notify after posting message to bus.
3104 * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
3105 (webkitMediaCommonEncryptionDecryptSinkEventHandler):
3107 2018-10-27 Charlie Turner <cturner@igalia.com>
3109 Fix release build with -DLOG_DISABLED=0
3110 https://bugs.webkit.org/show_bug.cgi?id=190866
3112 Reviewed by Xabier Rodriguez-Calvar.
3114 No new tests since no functionality changed.
3116 * platform/graphics/Font.cpp:
3117 * platform/graphics/Font.h:
3118 * platform/graphics/FontPlatformData.h:
3119 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3120 * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
3121 * platform/graphics/win/FontPlatformDataWin.cpp:
3123 2018-10-26 Commit Queue <commit-queue@webkit.org>
3125 Unreviewed, rolling out r237458.
3126 https://bugs.webkit.org/show_bug.cgi?id=190973
3128 broke internal iOS builds (Requested by zalan on #webkit).
3132 "Adopt -setOverrideRouteSharingPolicy:routingContextUID: SPI"
3133 https://bugs.webkit.org/show_bug.cgi?id=190951
3134 https://trac.webkit.org/changeset/237458
3136 2018-10-26 Antoine Quint <graouts@apple.com>
3138 [Web Animations] Remove useless internals methods
3139 https://bugs.webkit.org/show_bug.cgi?id=190968
3141 Reviewed by Dean Jackson.
3143 We had a few internals methods added early on in the Web Animations implementation that are no longer
3144 relevant now that the full API is implemented. We can safely remove them now.
3146 * animation/AnimationTimeline.cpp:
3147 (WebCore::AnimationTimeline::setCurrentTime): Deleted.
3148 (WebCore::AnimationTimeline::description): Deleted.
3149 * animation/AnimationTimeline.h:
3150 (WebCore::AnimationTimeline::currentTime):
3151 (WebCore::AnimationTimeline::pause): Deleted.
3152 * animation/DocumentTimeline.cpp:
3153 (WebCore::DocumentTimeline::currentTime):
3154 (WebCore::DocumentTimeline::pause): Deleted.
3155 * animation/DocumentTimeline.h:
3156 * testing/Internals.cpp:
3157 (WebCore::Internals::timelineDescription): Deleted.
3158 (WebCore::Internals::pauseTimeline): Deleted.
3159 (WebCore::Internals::setTimelineCurrentTime): Deleted.
3160 * testing/Internals.h:
3161 * testing/Internals.idl:
3163 2018-10-26 Antoine Quint <graouts@apple.com>
3165 Web Inspector: Crash in http/tests/inspector/network/resource-response-source-memory-cache-revalidate-expired-only.html
3166 https://bugs.webkit.org/show_bug.cgi?id=190955
3168 Reviewed by Dean Jackson.
3170 We can get in situations when running tests where runtime flags are not consistent throughout the time a test is run since
3171 showing the Web Inspector can cause flags to be re-set after the initial test was loaded. As such, to avoid crashes due to
3172 the ASSERT(!frame().animation().hasAnimations()) in FrameView::didDestroyRenderTree(), we now cancel animations upon teardown
3173 no matter what the value of the runtime flag for the Web Animations CSS Integration on both the DocumentTimeline (if it exists)
3174 and the CSSAnimationController.
3177 (WebCore::Element::removedFromAncestor):
3178 * dom/PseudoElement.cpp:
3179 (WebCore::PseudoElement::clearHostElement):
3180 * page/FrameView.cpp:
3181 (WebCore::FrameView::didDestroyRenderTree):
3182 * rendering/updating/RenderTreeUpdater.cpp:
3183 (WebCore::RenderTreeUpdater::tearDownRenderers):
3185 2018-10-26 Timothy Hatcher <timothy@apple.com>
3187 Use dark appearance scrollbar when page background is dark or document supports dark mode.
3188 https://bugs.webkit.org/show_bug.cgi?id=190937
3189 rdar://problem/41225839
3191 Reviewed by Beth Dakin.
3193 * page/FrameView.cpp:
3194 (WebCore::FrameView::useDarkAppearance const): Added. Ask the document.
3195 (WebCore::FrameView::paintScrollCorner): Set LocalDefaultSystemAppearance based
3196 on the scrollbar overlay style too.
3198 * platform/ScrollableArea.h:
3199 (WebCore::ScrollableArea::useDarkAppearance const): Added. Default to false.
3200 * platform/mac/ScrollAnimatorMac.mm:
3201 (-[WebScrollerImpDelegate effectiveAppearanceForScrollerImp:]): Added.
3202 Ask the ScrollableArea if a dark appearance is desired.
3204 2018-10-26 Antti Koivisto <antti@apple.com>
3206 Use random() instead of begin() to limit cache sizes
3207 https://bugs.webkit.org/show_bug.cgi?id=190957
3209 Reviewed by Chris Dumez.
3211 We currently use cache.remove(cache.begin()) pattern to limit sized of various caches.
3212 This is a bad pattern for tables that never rehash (because they have fixed maximum size) as most of the
3213 keys get permanently stuck in the table.
3215 * css/CSSValuePool.cpp:
3216 (WebCore::CSSValuePool::createColorValue):
3217 (WebCore::CSSValuePool::createFontFamilyValue):
3218 (WebCore::CSSValuePool::createFontFaceValue):
3219 * dom/InlineStyleSheetOwner.cpp:
3220 (WebCore::InlineStyleSheetOwner::createSheet):
3221 * dom/SelectorQuery.cpp:
3222 * platform/graphics/FontCascade.cpp:
3223 (WebCore::retrieveOrAddCachedFonts):
3224 * platform/graphics/cocoa/FontCacheCoreText.cpp:
3225 (WebCore::shouldAutoActivateFontIfNeeded):
3226 * platform/mac/PublicSuffixMac.mm:
3227 (WebCore::topPrivatelyControlledDomain):
3229 2018-10-26 Jer Noble <jer.noble@apple.com>
3231 Adopt -setOverrideRouteSharingPolicy:routingContextUID: SPI
3232 https://bugs.webkit.org/show_bug.cgi?id=190951
3233 <rdar://problem/45213065>
3235 Reviewed by Alex Christensen.
3237 Request the correct route policy and context from the VideoFullscreenModel.
3239 * platform/cocoa/VideoFullscreenModel.h:
3240 (WebCore::VideoFullscreenModel::requestRouteSharingPolicyAndContextUID):
3241 * platform/cocoa/VideoFullscreenModelVideoElement.h:
3242 * platform/cocoa/VideoFullscreenModelVideoElement.mm:
3243 (WebCore::VideoFullscreenModelVideoElement::requestRouteSharingPolicyAndContextUID):
3244 * platform/ios/VideoFullscreenInterfaceAVKit.h:
3245 * platform/ios/VideoFullscreenInterfaceAVKit.mm:
3246 (-[WebAVPlayerViewController setWebKitOverrideRouteSharingPolicy:routingContextUID:]):
3247 (VideoFullscreenInterfaceAVKit::setVideoFullscreenModel):
3248 (VideoFullscreenInterfaceAVKit::doSetup):
3250 2018-10-26 Zalan Bujtas <zalan@apple.com>
3252 [LFC][IFC] Add more inline information to outputLayoutTree
3253 https://bugs.webkit.org/show_bug.cgi?id=190945
3255 Reviewed by Antti Koivisto.
3257 * layout/layouttree/LayoutTreeBuilder.cpp:
3258 (WebCore::Layout::outputInlineRuns):
3259 (WebCore::Layout::outputLayoutBox):
3261 2018-10-26 Zalan Bujtas <zalan@apple.com>
3263 [LFC][IFC] Layout floats as part of the inline content
3264 https://bugs.webkit.org/show_bug.cgi?id=190942
3266 Reviewed by Antti Koivisto.
3268 Add float handling to InlineFormattingContext::layoutInlineContent.
3269 Note that floats don't actually generate inline runs.
3271 Test: fast/block/basic/inline-content-with-floating-image.html
3273 * layout/blockformatting/BlockFormattingContext.cpp:
3274 (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const):
3275 * layout/floats/FloatAvoider.cpp:
3276 (WebCore::Layout::FloatAvoider::FloatAvoider): Check if any mapping is needed.
3277 * layout/inlineformatting/InlineFormattingContext.cpp:
3278 (WebCore::Layout::isTrimmableContent):
3279 (WebCore::Layout::InlineFormattingContext::layoutInlineContent const):
3280 (WebCore::Layout::trimLeadingRun): Deleted.
3281 * layout/inlineformatting/InlineFormattingContext.h:
3282 (WebCore::Layout::InlineFormattingContext::Line::isClosed const):
3283 * layout/inlineformatting/Line.cpp:
3284 (WebCore::Layout::InlineFormattingContext::Line::init):
3285 (WebCore::Layout::InlineFormattingContext::Line::adjustLogicalLeft):
3286 (WebCore::Layout::InlineFormattingContext::Line::adjustLogicalRight):
3287 (WebCore::Layout::InlineFormattingContext::Line::appendContent):
3288 (WebCore::Layout::InlineFormattingContext::Line::close):
3290 2018-10-26 Zalan Bujtas <zalan@apple.com>
3292 [LFC][IFC] Adjust current line with float constraints.
3293 https://bugs.webkit.org/show_bug.cgi?id=190940
3295 Reviewed by Antti Koivisto.
3297 * layout/inlineformatting/InlineFormattingContext.cpp:
3298 (WebCore::Layout::InlineFormattingContext::initializeNewLine const):
3299 (WebCore::Layout::InlineFormattingContext::layoutInlineContent const):
3300 * layout/inlineformatting/InlineFormattingContext.h:
3301 * layout/inlineformatting/InlineRun.h:
3302 (WebCore::Layout::InlineRun::moveHorizontally):
3303 * layout/inlineformatting/Line.cpp:
3304 (WebCore::Layout::InlineFormattingContext::Line::adjustLogicalLeft):
3305 (WebCore::Layout::InlineFormattingContext::Line::adjustLogicalRight):
3307 2018-10-26 Zalan Bujtas <zalan@apple.com>
3309 [LFC][IFC] Compute float box size and position
3310 https://bugs.webkit.org/show_bug.cgi?id=190938
3312 Reviewed by Antti Koivisto.
3314 * layout/inlineformatting/InlineFormattingContext.cpp:
3315 (WebCore::Layout::InlineFormattingContext::computeWidthAndHeight const):
3316 (WebCore::Layout::InlineFormattingContext::computeFloatPosition const):
3317 * layout/inlineformatting/InlineFormattingContext.h:
3319 2018-10-26 Zalan Bujtas <zalan@apple.com>
3321 [LFC][IFC] Add line logical top and bottom
3322 https://bugs.webkit.org/show_bug.cgi?id=190934
3324 Reviewed by Antti Koivisto.
3326 * layout/inlineformatting/InlineFormattingContext.cpp:
3327 (WebCore::Layout::InlineFormattingContext::initializeNewLine const):
3328 (WebCore::Layout::InlineFormattingContext::layoutInlineContent const):
3329 * layout/inlineformatting/InlineFormattingContext.h:
3330 (WebCore::Layout::InlineFormattingContext::Line::isFirstLine const):
3331 (WebCore::Layout::InlineFormattingContext::Line::logicalTop const):
3332 (WebCore::Layout::InlineFormattingContext::Line::logicalBottom const):
3333 * layout/inlineformatting/Line.cpp: