1 2018-11-15 Jiewen Tan <jiewen_tan@apple.com>
3 [WebAuthN] PublicKeyCredentialCreationOptions::AuthenticatorSelectionCriteria::AuthenticatorAttachment should be optional
4 https://bugs.webkit.org/show_bug.cgi?id=191522
6 Reviewed by Brent Fulgham.
8 Accordign to the WebIDL, AuthenticatorSelectionCriteria::AuthenticatorAttachment should be optional.
9 https://www.w3.org/TR/webauthn/#dictdef-authenticatorselectioncriteria
11 Covered by existing tests.
13 * Modules/webauthn/PublicKeyCredentialCreationOptions.h:
14 (WebCore::PublicKeyCredentialCreationOptions::AuthenticatorSelectionCriteria::decode):
16 2018-11-15 Ross Kirsling <ross.kirsling@sony.com>
18 DragImage should have a complete default implementation
19 https://bugs.webkit.org/show_bug.cgi?id=191666
21 Reviewed by Dean Jackson.
23 Move WPE's stub implementation down into the base implementation file.
26 * platform/DragImage.cpp:
27 (WebCore::dragImageSize):
28 (WebCore::deleteDragImage):
29 (WebCore::scaleDragImage):
30 (WebCore::dissolveDragImageToFraction):
31 (WebCore::createDragImageFromImage):
32 (WebCore::createDragImageIconForCachedImageFilename):
33 (WebCore::createDragImageForLink):
34 * platform/wpe/DragImageWPE.cpp: Removed.
36 2018-11-15 Jiewen Tan <jiewen_tan@apple.com>
38 [WebAuthN] UserHandle can be null
39 https://bugs.webkit.org/show_bug.cgi?id=191521
41 Reviewed by Alex Christensen.
43 According to the newest spec as of 7 August, 2018: https://www.w3.org/TR/webauthn/#conforming-authenticators-u2f.
44 UserHandle can now be null.
46 Covered by existing tests.
48 * Modules/webauthn/AuthenticatorAssertionResponse.h:
49 (WebCore::AuthenticatorAssertionResponse::create):
50 (WebCore::AuthenticatorAssertionResponse::userHandle const):
51 (WebCore::AuthenticatorAssertionResponse::AuthenticatorAssertionResponse):
52 * Modules/webauthn/AuthenticatorAssertionResponse.idl:
53 * Modules/webauthn/PublicKeyCredential.cpp:
54 (WebCore::PublicKeyCredential::tryCreate):
55 * Modules/webauthn/PublicKeyCredentialData.h:
56 (WebCore::PublicKeyCredentialData::encode const):
57 (WebCore::PublicKeyCredentialData::decode):
58 * Modules/webauthn/fido/DeviceResponseConverter.cpp:
59 (fido::readCTAPGetAssertionResponse):
61 2018-11-15 Youenn Fablet <youenn@apple.com>
63 Modernize RTCPeerConnection handling of pendingActivity
64 https://bugs.webkit.org/show_bug.cgi?id=191661
66 Reviewed by Eric Carlson.
68 makePendingActivity is the modern way to handle set/unset of pending activity.
69 No change of behavior.
71 * Modules/mediastream/RTCPeerConnection.cpp:
72 (WebCore::RTCPeerConnection::create):
73 (WebCore::RTCPeerConnection::doStop):
74 * Modules/mediastream/RTCPeerConnection.h:
76 2018-11-15 Keith Rollin <krollin@apple.com>
78 Delete old .xcfilelist files
79 https://bugs.webkit.org/show_bug.cgi?id=191669
80 <rdar://problem/46081994>
82 Reviewed by Chris Dumez.
84 .xcfilelist files were created and added to the Xcode project files in
85 https://trac.webkit.org/changeset/238008/webkit. However, they caused
86 build issues and they were removed from the Xcode projects in
87 https://trac.webkit.org/changeset/238055/webkit. This check-in removes
88 the files from the repository altogether. They'll ultimately be
89 replaced with new files with names that indicate whether the
90 associated files are inputs to the Run Script phase or are files
91 created by the Run Script phase.
93 No new tests -- no changed functionality.
95 * DerivedSources.xcfilelist: Removed.
96 * UnifiedSources.xcfilelist: Removed.
98 2018-11-15 Youenn Fablet <youenn@apple.com>
100 Update RTCPeerConnection JS built-ins to be closer to specWe
101 https://bugs.webkit.org/show_bug.cgi?id=191665
103 Reviewed by Eric Carlson.
105 Simplify JS built-ins since we no longer need to support callback versions of the API.
106 Make sure to have the right number of parameters in the JS built-in functions.
107 Make some simplification to the code.
108 Covered by existing tests and rebased test.
110 * Modules/mediastream/RTCPeerConnection.js:
113 (setLocalDescription):
114 (setRemoteDescription):
116 * Modules/mediastream/RTCPeerConnectionInternals.js:
118 (callbacksAndDictionaryOverload): Deleted.
120 2018-11-15 Simon Fraser <simon.fraser@apple.com>
122 REGRESSION(r238090): Composited iframe contents disappear after switching tabs in Safari
123 https://bugs.webkit.org/show_bug.cgi?id=191673
124 rdar://problem/46083440
126 Reviewed by Antti Koivisto.
128 Switching tabs in Safari triggers the "setIsInWindow" code path, that detaches the layer
129 tree for every Frame. They get re-attached on tab show, and for subframes this involves
130 the triggering of a fake style recalc in the parent document via scheduleInvalidateStyleAndLayerComposition().
132 The style diff that's sent to RenderLayerCompositor::layerStyleChanged() as a result of that
133 fake style recalc is RecompositeLayer, but the code was failing to trigger the necessary
134 layer configuration update that gets iframe layers parented.
136 This stop-gap patch triggers layer config updates on every RecompositeLayer diff. A future
137 patch will optimize this, and add a layout test.
139 * rendering/RenderLayerCompositor.cpp:
140 (WebCore::RenderLayerCompositor::layerStyleChanged):
142 2018-11-15 Zalan Bujtas <zalan@apple.com>
144 [LFC][IFC] Skip non-inflow boxes while splitting the inline runs.
145 https://bugs.webkit.org/show_bug.cgi?id=191690
147 Reviewed by Antti Koivisto.
149 Skip all non-inflow boxes (floats, out-of-flow positioned elements). They don't participate in the inline run context.
151 * layout/Verification.cpp:
152 (WebCore::Layout::LayoutState::verifyAndOutputMismatchingLayoutTree const):
153 * layout/inlineformatting/InlineFormattingContext.cpp:
154 (WebCore::Layout::InlineFormattingContext::splitInlineRunIfNeeded const):
156 2018-11-15 Zalan Bujtas <zalan@apple.com>
158 [LFC] FormattingContext base class should not declare computeStaticPosition.
159 https://bugs.webkit.org/show_bug.cgi?id=191683
161 Reviewed by Antti Koivisto.
163 Apparently only BlockFormattingContext uses it.
165 * layout/FormattingContext.h:
166 * layout/blockformatting/BlockFormattingContext.h:
167 * layout/inlineformatting/InlineFormattingContext.cpp:
168 (WebCore::Layout::InlineFormattingContext::computeStaticPosition const): Deleted.
169 * layout/inlineformatting/InlineFormattingContext.h:
171 2018-11-14 Zalan Bujtas <zalan@apple.com>
173 [LFC][IFC] Add support for in-flow positioned inline boxes.
174 https://bugs.webkit.org/show_bug.cgi?id=191672
176 Reviewed by Antti Koivisto.
178 We might offset the in-flow positioned runs differently once runs are moved over to the display tree.
180 Test: fast/inline/simple-inline-inflow-positioned.html
182 * layout/Verification.cpp:
183 (WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):
184 * layout/inlineformatting/InlineFormattingContext.cpp:
185 (WebCore::Layout::InlineFormattingContext::splitInlineRunsIfNeeded const):
186 (WebCore::Layout::InlineFormattingContext::postProcessInlineRuns const):
187 (WebCore::Layout::InlineFormattingContext::placeInFlowPositionedChildren const):
188 (WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const):
189 * layout/inlineformatting/InlineFormattingContext.h:
190 * layout/inlineformatting/InlineRun.h:
191 (WebCore::Layout::InlineRun::moveVertically):
192 * layout/layouttree/LayoutTreeBuilder.cpp:
193 (WebCore::Layout::outputInlineRuns):
195 2018-11-15 Thibault Saunier <tsaunier@igalia.com>
197 [GStreamer][WebRTC] Add support for sending silence or silencing an incoming track
198 https://bugs.webkit.org/show_bug.cgi?id=191631
200 Reviewed by Xabier Rodriguez-Calvar.
202 This will be tested once webkit.org/b/186933 is implemented.
204 * platform/mediastream/gstreamer/RealtimeIncomingAudioSourceLibWebRTC.cpp:
205 (WebCore::RealtimeIncomingAudioSourceLibWebRTC::OnData):
206 * platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceLibWebRTC.cpp:
207 (WebCore::RealtimeOutgoingAudioSourceLibWebRTC::pullAudioData):
209 2018-11-15 Antti Koivisto <antti@apple.com>
211 REGRESSION(r238178): fast/forms/access-key-mutated.html and fast/forms/access-key-case-insensitive.html are timing out
212 https://bugs.webkit.org/show_bug.cgi?id=191642
214 Reviewed by Zalan Bujtas.
216 Invalidate access key map even when thorttling style recalcs.
219 (WebCore::Document::scheduleStyleRecalc):
221 2018-11-15 Antti Koivisto <antti@apple.com>
223 Remove fonts from CSSFontFaceSet safely
224 https://bugs.webkit.org/show_bug.cgi?id=191676
226 Reviewed by Zalan Bujtas.
228 Test: fast/text/font-face-set-remove-safely.html
230 * css/CSSFontFaceSet.cpp:
231 (WebCore::CSSFontFaceSet::remove):
233 2018-11-15 Manuel Rego Casasnovas <rego@igalia.com>
235 [css-grid] Consider scrollbars in populateGridPositionsForDirection()
236 https://bugs.webkit.org/show_bug.cgi?id=191656
238 Reviewed by Javier Fernandez.
240 We never care about scrollbars in RenderGrid::populateGridPositionsForDirection(),
241 that's fine if the scrollbars are at the end (e.g. on the right in horizontal writing mode and LTR direction)
242 but it causes problems when they're at the beginning (e.g. on the left in horizontal writing mode and RTL direction).
244 The patch modifies the method so it takes into account scrollbar size
245 in order to compute the position of the columns/rows depending on the direction and the writing mode.
247 Tests: imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-001.html
248 imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-vertical-lr-001.html
249 imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-vertical-rl-001.html
251 * rendering/RenderGrid.cpp:
252 (WebCore::RenderGrid::populateGridPositionsForDirection):
254 2018-11-14 Keith Rollin <krollin@apple.com>
256 Move scripts for Derived and Unified Sources to external files
257 https://bugs.webkit.org/show_bug.cgi?id=191670
258 <rdar://problem/46082278>
260 Reviewed by Keith Miller.
262 Move the scripts in the Generate Derived Sources and Generate Unified
263 Sources Run Script phases from the Xcode projects to external shell
264 script files. Then invoke those scripts from the Run Script phases.
265 This refactoring is being performed to support later work that will
266 invoke these scripts in other contexts.
268 The scripts were maintained as-is when making the move. I did a little
269 reformatting and added 'set -e' to the top of each file, but that's
272 No new tests -- no changed functionality.
274 * Scripts/generate-derived-sources.sh: Added.
275 * Scripts/generate-unified-sources.sh: Added.
276 * WebCore.xcodeproj/project.pbxproj:
278 2018-11-14 Keith Rollin <krollin@apple.com>
280 Fix #end vs. #endif typo.
281 https://bugs.webkit.org/show_bug.cgi?id=191668
282 <rdar://problem/46081704>
284 Reviewed by Alexey Proskuryakov.
286 Source/WebCore/SourcesCocoa.txt had a #end that should have been a
287 #endif. Fix this, an add a check to generate-unified-source-bundles.rb
288 to detect similar typos.
290 No new tests -- no changed functionality.
294 2018-11-14 Keith Rollin <krollin@apple.com>
296 Remove VideoFullscreenLayerManager.mm from WebCore/SourcesCocoa.txt
297 https://bugs.webkit.org/show_bug.cgi?id=191667
298 <rdar://problem/46081286>
300 Reviewed by Eric Carlson.
302 VideoFullscreenLayerManager.mm no longer exists.
304 No new tests -- No changed functionality.
308 2018-11-14 Timothy Hatcher <timothy@apple.com>
310 Enabled dark mode CSS support by default.
311 https://bugs.webkit.org/show_bug.cgi?id=191609
312 rdar://problem/46046861
314 Reviewed by Megan Gardner.
316 * page/RuntimeEnabledFeatures.h: Set m_isDarkModeCSSEnabled to true.
318 2018-11-14 Timothy Hatcher <timothy@apple.com>
320 Default the view background color and text color to different values when in dark mode.
321 https://bugs.webkit.org/show_bug.cgi?id=191607
322 rdar://problem/46045854
324 Reviewed by Dean Jackson.
326 Test: css-dark-mode/default-colors.html
329 (html): Set color: text on macOS.
331 (WebCore::Document::processSupportedColorSchemes): Call recalculateBaseBackgroundColor().
332 * editing/EditingStyle.cpp:
333 (WebCore::caretColorFromStyle): Added.
334 (WebCore::EditingStyle::prepareToApplyAt): Use equalIgnoringSemanticColor. Check for
335 caret-color directly since removeEquivalentProperties fails with semantic colors.
336 (WebCore::extractPropertiesNotIn): Use equalIgnoringSemanticColor. Check for caret-color
337 directly since removeEquivalentProperties fails with semantic colors.
339 (WebCore::Frame::createView): Drop backgroundColor.
341 * page/FrameView.cpp:
342 (WebCore::FrameView::recalculateBaseBackgroundColor): Added.
343 (WebCore::FrameView::updateBackgroundRecursively): Drop backgroundColor argument.
344 Calculate the backgroundColor based on the transparent argument only.
346 * platform/graphics/Color.h:
347 (WebCore::equalIgnoringSemanticColor): Added for EditingStyle.
348 * rendering/RenderBox.cpp:
349 (WebCore::RenderBox::styleDidChange): Call recalculateBaseBackgroundColor().
350 * rendering/RenderLayerBacking.cpp:
351 (WebCore::RenderLayerBacking::shouldDumpPropertyForLayer const): Use isWhiteColor()
352 since it ignores the semantic color flag.
353 * testing/Internals.cpp:
354 (WebCore::Internals::setViewIsTransparent): Drop backgroundColor.
355 (WebCore::Internals::viewBaseBackgroundColor): Added.
356 * testing/Internals.h:
357 * testing/Internals.idl: Added viewBaseBackgroundColor.
359 2018-11-14 Justin Fan <justin_fan@apple.com>
361 [WebGPU] Code quality concerns raised for 191291: [WebGPU] Experimental prototype for WebGPURenderPipeline and WebGPUSwapChain
362 https://bugs.webkit.org/show_bug.cgi?id=191383
364 Reviewed by Dean Jackson.
366 Covered by existing WebGPU tests introduced in original patch.
368 * Modules/webgpu/GPUDevice.h:
369 * Modules/webgpu/GPUPipelineStageDescriptor.h:
370 * Modules/webgpu/GPURenderPipelineDescriptor.h: Now a base struct with a guaranteed vertex stage member.
371 (): Refactored into enum class.
372 (WebCore::GPURenderPipelineDescriptor::GPURenderPipelineDescriptor): Removed in favor of init-list construction.
373 (WebCore::GPURenderPipelineDescriptor::primitiveTopology): Now a proper enum class member.
374 * Modules/webgpu/GPUShaderModule.h:
375 * Modules/webgpu/WebGPUDevice.cpp:
376 (WebCore::WebGPUDevice::createRenderPipeline const):
377 * Modules/webgpu/WebGPUShaderModule.h:
378 (WebCore::WebGPUShaderModule::module const):
379 * Modules/webgpu/WebGPUShaderStage.h: Replaced enum with constants to better reflect IDL.
380 * Modules/webgpu/cocoa/GPURenderPipeline.h:
381 * Modules/webgpu/cocoa/GPURenderPipelineMetal.mm:
382 (WebCore::setFunctionsForPipelineDescriptor):
383 (WebCore::GPURenderPipeline::create):
384 * Modules/webgpu/cocoa/GPUSwapChain.h:
385 * WebCore.xcodeproj/project.pbxproj: Removed GPUPipelineDescriptorBase.
387 2018-11-14 Joseph Pecoraro <pecoraro@apple.com>
389 Web Inspector: Pass Inspector::FrontendChannel as a reference connect/disconnect methods
390 https://bugs.webkit.org/show_bug.cgi?id=191612
392 Reviewed by Matt Baker.
394 * inspector/InspectorController.cpp:
395 (WebCore::InspectorController::connectFrontend):
396 (WebCore::InspectorController::disconnectFrontend):
397 (WebCore::InspectorController::show):
398 * inspector/InspectorController.h:
399 * inspector/WorkerInspectorController.cpp:
400 (WebCore::WorkerInspectorController::connectFrontend):
401 (WebCore::WorkerInspectorController::disconnectFrontend):
402 * page/PageDebuggable.cpp:
403 (WebCore::PageDebuggable::connect):
404 (WebCore::PageDebuggable::disconnect):
405 * page/PageDebuggable.h:
406 * testing/Internals.cpp:
407 (WebCore::InspectorStubFrontend::InspectorStubFrontend):
408 (WebCore::InspectorStubFrontend::closeWindow):
409 * workers/service/context/ServiceWorkerDebuggable.cpp:
410 (WebCore::ServiceWorkerDebuggable::connect):
411 (WebCore::ServiceWorkerDebuggable::disconnect):
412 * workers/service/context/ServiceWorkerDebuggable.h:
413 * workers/service/context/ServiceWorkerInspectorProxy.cpp:
414 (WebCore::ServiceWorkerInspectorProxy::connectToWorker):
415 (WebCore::ServiceWorkerInspectorProxy::disconnectFromWorker):
416 * workers/service/context/ServiceWorkerInspectorProxy.h:
418 2018-11-14 Timothy Hatcher <timothy@apple.com>
420 Update prefers-color-scheme media query matching based on GitHub issue #3278.
421 https://bugs.webkit.org/show_bug.cgi?id=191654
422 rdar://problem/46074307
424 Reviewed by Simon Fraser.
426 Test: css-dark-mode/prefers-color-scheme.html
428 * css/MediaQueryEvaluator.cpp:
429 (WebCore::prefersColorSchemeEvaluate): Return true when there is no value. Return false
430 for `no-preference` since there is no macOS option for no user preference.
431 * css/MediaQueryExpression.cpp:
432 (WebCore::isFeatureValidWithoutValue): Added prefers-color-scheme.
434 2018-11-14 Devin Rousso <drousso@apple.com>
436 Web Inspector: Canvas: send a call stack with each action instead of an array of call frames
437 https://bugs.webkit.org/show_bug.cgi?id=191628
439 Reviewed by Dean Jackson.
441 Updated existing test: inspector/model/recording.html
443 * inspector/InspectorCanvas.h:
444 * inspector/InspectorCanvas.cpp:
445 (WebCore::InspectorCanvas::indexForData):
446 (WebCore::InspectorCanvas::buildInitialState):
447 (WebCore::InspectorCanvas::buildAction):
448 Drive-by: prevent de-duplicated objects from being destroyed while recording.
450 2018-11-14 Stephan Szabo <stephan.szabo@sony.com>
452 [Win] Compile Service Worker support
453 https://bugs.webkit.org/show_bug.cgi?id=191409
455 Reviewed by Youenn Fablet.
457 Fix compilation errors when ENABLE(SERVICE_WORKER)
458 on Windows with clang-cl. Clang on dllexport
459 platforms does not support specifying the
460 dllexport on both a class and members of the class
461 and unistd.h isn't provided but also appeared to
464 No new tests, should be covered by existing tests.
466 * workers/service/ServiceWorkerProvider.h:
467 * workers/service/context/SWContextManager.cpp:
469 2018-11-14 Joseph Pecoraro <pecoraro@apple.com>
471 Web Inspector: Keep Web Inspector window alive across process swaps (PSON) (Remote Inspector)
472 https://bugs.webkit.org/show_bug.cgi?id=191494
473 <rdar://problem/45469854>
475 Reviewed by Devin Rousso.
477 * inspector/InspectorClient.h:
478 (WebCore::InspectorClient::allowRemoteInspectionToPageDirectly const):
479 Provide a hook so that a client may wish to allow direct remote inspection of the Page.
480 This is used by WebKitLegacy only.
484 Only enable the PageDebuggable if the client wishes remote inspection of the Page directly.
485 This is used by WebKitLegacy only.
487 * inspector/InspectorController.cpp:
488 (WebCore::InspectorController::connectFrontend):
489 * inspector/InspectorController.h:
490 * page/PageDebuggable.cpp:
491 (WebCore::PageDebuggable::connect):
492 (WebCore::PageDebuggable::disconnect):
493 * page/PageDebuggable.h:
494 When a frontend connects, always enable the developer extras for the Page.
495 This is pretty much only for the remote path, which allows inspection if developer
496 extras were not already enabled (iOS). This simplifies the logic, and toggling
497 developer extras after it was already enabled is not really important.
499 2018-11-14 Per Arne Vollan <pvollan@apple.com>
501 REGRESSION (WEBPROCESS_WINDOWSERVER_BLOCKING): requestAnimationFrame Stops Completing
502 https://bugs.webkit.org/show_bug.cgi?id=190884
504 Reviewed by Dean Jackson.
506 Only notify display refresh monitors with matching display ID.
508 Test: fast/animation/request-animation-frame-in-two-pages.html
510 * platform/graphics/DisplayRefreshMonitorManager.cpp:
511 (WebCore::DisplayRefreshMonitorManager::displayWasUpdated):
512 * platform/graphics/DisplayRefreshMonitorManager.h:
514 2018-11-14 Youenn Fablet <youenn@apple.com>
516 Convert libwebrtc error types to DOM exceptions
517 https://bugs.webkit.org/show_bug.cgi?id=191590
519 Reviewed by Alex Christensen.
521 Make use of overloaded callback method that provides an error type.
522 This type is then used to create a DOM exception with the correct type.
523 Covered by existing tests.
525 * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
526 (WebCore::LibWebRTCMediaEndpoint::doSetRemoteDescription):
527 (WebCore::LibWebRTCMediaEndpoint::createSessionDescriptionFailed):
528 (WebCore::LibWebRTCMediaEndpoint::setLocalSessionDescriptionFailed):
529 (WebCore::LibWebRTCMediaEndpoint::setRemoteSessionDescriptionFailed):
530 * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
531 * Modules/mediastream/libwebrtc/LibWebRTCObservers.h:
532 (WebCore::toExceptionCode):
534 2018-11-14 Youenn Fablet <youenn@apple.com>
536 Allow to remove MediaStreamPrivate observers when iterating over observers
537 https://bugs.webkit.org/show_bug.cgi?id=187256
539 Reviewed by Eric Carlson.
541 Migrate the observer list from a Vector to a HashSet.
542 This is more robust to multiple observing and keeping of order of observers is not required.
543 Copy the set of observers to a vector before iterating over it.
544 This allows to remove an observer while iterating, which is now used in UserMediaRequest.
546 Covered by existing tests.
548 * Modules/mediastream/UserMediaRequest.cpp:
549 (WebCore::UserMediaRequest::mediaStreamIsReady):
550 * platform/mediastream/MediaStreamPrivate.cpp:
551 (WebCore::MediaStreamPrivate::addObserver):
552 (WebCore::MediaStreamPrivate::removeObserver):
553 (WebCore::MediaStreamPrivate::forEachObserver const):
554 (WebCore::MediaStreamPrivate::updateActiveState):
555 (WebCore::MediaStreamPrivate::addTrack):
556 (WebCore::MediaStreamPrivate::removeTrack):
557 (WebCore::MediaStreamPrivate::characteristicsChanged):
558 * platform/mediastream/MediaStreamPrivate.h:
560 2018-11-14 Youenn Fablet <youenn@apple.com>
562 Calling removeTrack on different RTCPeerConnection should throw InvalidAccessError
563 https://bugs.webkit.org/show_bug.cgi?id=191603
565 Reviewed by Chris Dumez.
567 Make sure to check that the sender peer connection backend is matching.
568 Covered by rebased WPT test.
570 * Modules/mediastream/RTCPeerConnection.cpp:
571 (WebCore::RTCPeerConnection::removeTrack):
572 * Modules/mediastream/RTCRtpSender.cpp:
573 (WebCore::RTCRtpSender::isCreatedBy const):
574 * Modules/mediastream/RTCRtpSender.h:
576 2018-11-14 Fujii Hironori <Hironori.Fujii@sony.com>
578 [curl] Unify CookieJarCurlDatabase and the abstract class CookieJarCurl
579 https://bugs.webkit.org/show_bug.cgi?id=191620
581 Reviewed by Alex Christensen.
583 Remove a abstract class CookieJarCurl which is not needed anymore.
584 And, rename CookieJarCurlDatabase to CookieJarCurl.
586 No new tests because there's no behaviour change in WebCore.
588 * platform/Curl.cmake: Replaced CookieJarCurlDatabase.cpp with CookieJarCurl.cpp.
589 * platform/network/curl/CookieJarCurl.cpp: Renamed from Source/WebCore/platform/network/curl/CookieJarCurlDatabase.cpp.
590 * platform/network/curl/CookieJarCurl.h: Merged CookieJarCurl.h and CookieJarCurlDatabase.h.
591 * platform/network/curl/CookieJarCurlDatabase.h: Removed.
592 * platform/network/curl/NetworkStorageSessionCurl.cpp:
593 (WebCore::NetworkStorageSession::NetworkStorageSession): Replaced CookieJarCurlDatabase with CookieJarCurl.
595 2018-11-14 Christopher Reid <chris.reid@sony.com>
597 [WPE] Remove glib usage in PlatformKeyboardEventWPE.cpp
598 https://bugs.webkit.org/show_bug.cgi?id=191606
600 Reviewed by Michael Catanzaro.
604 Use StringBuilder::append(UChar32) as a generic way to convert a uint32_t code point to WTFString.
606 * platform/wpe/PlatformKeyboardEventWPE.cpp:
607 (WebCore::PlatformKeyboardEvent::keyValueForWPEKeyCode):
608 (WebCore::PlatformKeyboardEvent::singleCharacterString):
610 2018-11-13 Zalan Bujtas <zalan@apple.com>
612 [LFC][IFC] Construct dedicated runs when the inline element requires it (part 2)
613 https://bugs.webkit.org/show_bug.cgi?id=191623
615 Reviewed by Antti Koivisto.
617 This patch expands the breaking behaviour to support separate start/end breaks.
619 <span>parent </span><span style="padding: 10px;">start<span> middle </span>end</span><span> parent</span>
621 input to line breaking -> <parent start middle end parent>
622 output of line breaking (considering infinite constraint) -> <parent start middle end parent>
623 due to padding, final runs -> <parent><start middle end><parent>
626 "start" -> BreakAtStart
632 <span>parent </span><span style="padding-right: 10px;">start<span> middle </span>end</span><span> parent</span>
634 line breaking -> <parent start middle end parent>
635 due to padding-right, final runs -> <parent start middle end><parent>
643 * layout/inlineformatting/InlineFormattingContext.cpp:
644 (WebCore::Layout::InlineFormattingContext::splitInlineRunIfNeeded const):
645 (WebCore::Layout::InlineFormattingContext::collectInlineContent const): Move to a recursive algorithm (which is fine, inline contents don't tend to be too deep)
646 (WebCore::Layout::InlineFormattingContext::contentRequiresSeparateRun const): Deleted.
647 * layout/inlineformatting/InlineFormattingContext.h:
648 * layout/inlineformatting/InlineFormattingState.cpp:
649 (WebCore::Layout::InlineFormattingState::detachingRules const):
650 * layout/inlineformatting/InlineFormattingState.h:
651 (WebCore::Layout::InlineFormattingState::lastInlineItem const):
652 (WebCore::Layout::InlineFormattingState::addDetachingRule):
654 2018-11-14 Youenn Fablet <youenn@apple.com>
656 Add support for RTCRtpCodecParameters.sdpFmtpLine
657 https://bugs.webkit.org/show_bug.cgi?id=191591
659 Reviewed by Eric Carlson.
661 Covered by rebased test.
663 * Modules/mediastream/RTCRtpCodecParameters.h:
664 * Modules/mediastream/RTCRtpCodecParameters.idl:
665 * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
666 (WebCore::toRTCCodecParameters):
668 2018-11-14 Youenn Fablet <youenn@apple.com>
670 Add support for transport and peerConnection stats
671 https://bugs.webkit.org/show_bug.cgi?id=191592
673 Reviewed by Alex Christensen.
675 Covered by rebased tests.
677 * Modules/mediastream/RTCStatsReport.h:
678 (WebCore::RTCStatsReport::TransportStats::TransportStats):
679 (WebCore::RTCStatsReport::PeerConnectionStats::PeerConnectionStats):
680 * Modules/mediastream/RTCStatsReport.idl:
681 * Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp:
682 (WebCore::fillRTCTransportStats):
683 (WebCore::fillRTCPeerConnectionStats):
684 (WebCore::LibWebRTCStatsCollector::OnStatsDelivered):
686 2018-11-14 Ali Juma <ajuma@chromium.org>
688 Transform of composited layer not updated when layer also needs repaint
689 https://bugs.webkit.org/show_bug.cgi?id=191598
691 Reviewed by Simon Fraser.
693 Trigger a compositing geometry update whenever a RenderLayer's transform changes,
694 even when other parts of its style have changed in a way that produces a
695 StyleDifference greater than RecompositeLayer.
697 Test: compositing/geometry/transform-and-repaint-updates-geometry.html
699 * rendering/RenderLayerCompositor.cpp:
700 (WebCore::RenderLayerCompositor::layerStyleChanged):
702 2018-11-13 Jiewen Tan <jiewen_tan@apple.com>
704 [WebAuthN] Support CTAP HID authenticators on macOS
705 https://bugs.webkit.org/show_bug.cgi?id=188623
706 <rdar://problem/43353777>
708 Reviewed by Brent Fulgham and Chris Dumez.
710 This patch removes AuthenticatorCoordinatorClient::~AuthenticatorCoordinatorClient to ignore
711 any incompleted CompletionHandlers as calling them in destructors could cause unexpected cyclic
712 dependency. Also, it adds a hack to temporarily deal with nullable userhandle.
714 Tests: http/wpt/webauthn/ctap-hid-failure.https.html
715 http/wpt/webauthn/ctap-hid-success.https.html
716 http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https.html
717 http/wpt/webauthn/public-key-credential-create-failure-hid.https.html
718 http/wpt/webauthn/public-key-credential-create-success-hid.https.html
719 http/wpt/webauthn/public-key-credential-get-failure-hid-silent.https.html
720 http/wpt/webauthn/public-key-credential-get-failure-hid.https.html
721 http/wpt/webauthn/public-key-credential-get-success-hid.https.html
723 * Modules/webauthn/AuthenticatorCoordinatorClient.cpp:
724 (WebCore::AuthenticatorCoordinatorClient::~AuthenticatorCoordinatorClient): Deleted.
725 * Modules/webauthn/AuthenticatorCoordinatorClient.h:
726 * Modules/webauthn/PublicKeyCredentialCreationOptions.h:
727 * Modules/webauthn/fido/DeviceResponseConverter.cpp:
728 (fido::readCTAPGetAssertionResponse):
729 * Modules/webauthn/fido/FidoConstants.h:
731 2018-11-13 Ross Kirsling <ross.kirsling@sony.com>
733 [WebRTC] Provide default implementation of LibWebRTCProvider
734 https://bugs.webkit.org/show_bug.cgi?id=191611
736 Reviewed by Michael Catanzaro.
738 Refactor LibWebRTCProvider such that platform-specific implementations need not worry about specifying defaults.
741 * platform/GStreamer.cmake:
742 * platform/SourcesGLib.txt:
743 * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
744 * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:
745 * platform/mediastream/libwebrtc/LibWebRTCProviderGStreamer.cpp: Renamed from Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProviderGlib.cpp.
746 * platform/mediastream/libwebrtc/LibWebRTCProviderGStreamer.h: Renamed from Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProviderGlib.h.
747 * platform/mediastream/libwebrtc/LibWebRTCProviderWin.cpp: Removed.
749 2018-11-13 Timothy Hatcher <timothy@apple.com>
751 Use a light scrollbar for transparent web views in dark mode.
752 https://bugs.webkit.org/show_bug.cgi?id=191559
753 rdar://problem/46000489
755 Reviewed by Dean Jackson.
757 Test: css-dark-mode/supported-color-schemes-scrollbar.html
759 * css/CSSProperties.json: Marked supported-color-schemes as a custom Value.
760 * css/StyleBuilderCustom.h:
761 (WebCore::StyleBuilderCustom::applyValueSupportedColorSchemes):
762 * editing/cocoa/WebContentReaderCocoa.mm: Use FrameView's useDarkAppearance().
763 (WebCore::createFragment):
764 * inspector/InspectorOverlay.cpp:
765 (WebCore::InspectorOverlay::paint): Use FrameView's useDarkAppearance().
766 * page/FrameView.cpp:
767 (WebCore::FrameView::recalculateScrollbarOverlayStyle): Use a light scrollbar for
768 transparent web views in dark mode.
769 (WebCore::FrameView::rendererForSupportedColorSchemes const): Added.
770 Return the body for document element renderer.
771 (WebCore::FrameView::useDarkAppearance const): Use rendererForSupportedColorSchemes.
772 (WebCore::FrameView::styleColorOptions const): Added. Ditto.
774 * rendering/style/RenderStyle.cpp:
775 (WebCore::rareInheritedDataChangeRequiresRepaint): Drive-by fix. Added supportedColorSchemes.
776 * rendering/style/RenderStyle.h:
777 (WebCore::RenderStyle::setHasExplicitlySetSupportedColorSchemes): Added.
778 (WebCore::RenderStyle::hasExplicitlySetSupportedColorSchemes const): Added.
779 (WebCore::RenderStyle::NonInheritedFlags::operator== const): Added supportedColorSchemes.
780 * svg/graphics/SVGImage.cpp:
781 (WebCore::SVGImage::draw): Use FrameView's useDarkAppearance().
782 * testing/Internals.cpp:
783 (WebCore::Internals::setViewIsTransparent): Added.
784 (WebCore::Internals::scrollbarOverlayStyle const): Added.
785 * testing/Internals.h:
786 * testing/Internals.idl: Added setViewIsTransparent and scrollbarOverlayStyle.
788 2018-11-13 Ross Kirsling <ross.kirsling@sony.com>
790 [AppleWin] Unreviewed build fix after r238108.
792 * platform/graphics/ca/win/PlatformCALayerWin.cpp:
794 (PlatformCALayerWin::embeddedViewID const):
795 * platform/graphics/ca/win/PlatformCALayerWin.h:
797 2018-11-13 Youenn Fablet <youenn@apple.com>
799 RTCPeerConnection.getTransceivers is not always exposing all transceivers
800 https://bugs.webkit.org/show_bug.cgi?id=191589
802 Reviewed by Eric Carlson.
804 Implement the collect transceiver algorithm using libwebrtc backend.
805 Call this algorithm everytime transceivers are retrieved from JS.
806 For Plan B, make this a no-op as this is not supported.
807 Introduce senders/receivers/transceivers getters where we just look at already created transceivers.
809 Covered by existing and rebased tests.
811 * Modules/mediastream/PeerConnectionBackend.h:
812 (WebCore::PeerConnectionBackend::collectTransceivers):
813 * Modules/mediastream/RTCPeerConnection.cpp:
814 (WebCore::RTCPeerConnection::getSenders const):
815 (WebCore::RTCPeerConnection::getReceivers const):
816 (WebCore::RTCPeerConnection::getTransceivers const):
817 * Modules/mediastream/RTCPeerConnection.h:
818 * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
819 (WebCore::LibWebRTCMediaEndpoint::collectTransceivers):
820 * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
821 * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
822 (WebCore::LibWebRTCPeerConnectionBackend::addTrack):
823 (WebCore::LibWebRTCPeerConnectionBackend::existingTransceiver):
824 (WebCore::LibWebRTCPeerConnectionBackend::collectTransceivers):
825 (WebCore::LibWebRTCPeerConnectionBackend::applyRotationForOutgoingVideoSources):
826 (WebCore::LibWebRTCPeerConnectionBackend::shouldOfferAllowToReceive const):
827 * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
829 2018-11-13 Wenson Hsieh <wenson_hsieh@apple.com>
831 [iOS] Do not show selection UI for editable elements with opacity near zero
832 https://bugs.webkit.org/show_bug.cgi?id=191442
833 <rdar://problem/45958625>
835 Reviewed by Simon Fraser.
837 Tests: editing/selection/ios/do-not-zoom-to-focused-hidden-contenteditable.html
838 editing/selection/ios/hide-selection-after-hiding-contenteditable.html
839 editing/selection/ios/hide-selection-in-contenteditable-nested-transparency.html
840 editing/selection/ios/hide-selection-in-hidden-contenteditable-frame.html
841 editing/selection/ios/hide-selection-in-hidden-contenteditable.html
843 * rendering/RenderObject.cpp:
844 (WebCore::RenderObject::isTransparentRespectingParentFrames const):
846 Add a helper function to determine whether a RenderObject is contained within a transparent layer, taking parent
847 frames into account. A layer is considered transparent if its opacity is less than a small threshold (i.e. 0.01).
848 Opacity on ancestor elements is applied multiplicatively.
850 * rendering/RenderObject.h:
852 2018-11-13 Eric Carlson <eric.carlson@apple.com>
854 [MediaStream] Observer AVCaptureDevice "suspended" property
855 https://bugs.webkit.org/show_bug.cgi?id=191587
856 <rdar://problem/46030598>
858 Reviewed by Youenn Fablet.
860 No new tests, AVCapture can only be tested manually.
862 * platform/mediastream/mac/AVCaptureDeviceManager.h:
863 * platform/mediastream/mac/AVCaptureDeviceManager.mm:
864 (WebCore::AVCaptureDeviceManager::captureDevicesInternal): Don't notify of devices "changes"
865 the first time the device list is scanned.
866 (WebCore::deviceIsAvailable): Don't check for "isInUseByAnotherApplication", it doesn't
867 change device availability.
868 (WebCore::AVCaptureDeviceManager::beginObservingDevices): New, observe "suspended" on all
869 devices and add them to the cached list.
870 (WebCore::AVCaptureDeviceManager::stopObservingDevices): New, opposite of above.
871 (WebCore::AVCaptureDeviceManager::refreshCaptureDevices): Watch for changes in the list of
873 (WebCore::AVCaptureDeviceManager::~AVCaptureDeviceManager): Stop observing all cached devices.
874 (WebCore::AVCaptureDeviceManager::registerForDeviceNotifications):
875 (-[WebCoreAVCaptureDeviceManagerObserver disconnect]):
876 (-[WebCoreAVCaptureDeviceManagerObserver deviceConnectedDidChange:]):
877 (-[WebCoreAVCaptureDeviceManagerObserver observeValueForKeyPath:ofObject:change:context:]):
878 (WebCore::AVCaptureDeviceManager::refreshAVCaptureDevicesOfType): Deleted.
879 (WebCore::AVCaptureDeviceManager::deviceConnected): Deleted.
880 (WebCore::AVCaptureDeviceManager::deviceDisconnected): Deleted.
881 (-[WebCoreAVCaptureDeviceManagerObserver deviceDisconnected:]): Deleted.
882 (-[WebCoreAVCaptureDeviceManagerObserver deviceConnected:]): Deleted.
884 * platform/mediastream/mac/AVVideoCaptureSource.h:
885 * platform/mediastream/mac/AVVideoCaptureSource.mm:
886 (WebCore::AVVideoCaptureSource::~AVVideoCaptureSource): Stop observing "running" (not "rate")
888 (WebCore::AVVideoCaptureSource::setupSession): Observe "running" (not "rate"), and "suspended".
889 (WebCore::AVVideoCaptureSource::captureDeviceSuspendedDidChange):
890 (-[WebCoreAVVideoCaptureSourceObserver observeValueForKeyPath:ofObject:change:context:]):
892 2018-11-13 Devin Rousso <drousso@apple.com>
894 Web Inspector: REGRESSION(r238122): fetching the CertificateInfo triggers an ASSERT in workers
895 https://bugs.webkit.org/show_bug.cgi?id=191597
897 Reviewed by Joseph Pecoraro.
899 When WebInspector is open, the `CertificateInfo` for every `ResourceResponse` is now fetched,
900 meaning that we may try to fetch in situations previously unexpected.
902 * platform/network/cocoa/ResourceResponseCocoa.mm:
903 (WebCore::ResourceResponse::platformCertificateInfo const):
905 2018-11-13 Timothy Hatcher <timothy@apple.com>
907 Treat supported-color-schemes as the second highest priority property.
908 https://bugs.webkit.org/show_bug.cgi?id=191556
909 rdar://problem/46000076
911 Reviewed by Dean Jackson.
913 Test: css-dark-mode/supported-color-schemes-priority.html
915 * css/CSSProperties.json: Make supported-color-schemes high-priority and add a comment.
916 * css/StyleResolver.cpp:
917 (WebCore::StyleResolver::applyMatchedProperties): Manually handle supported-color-schemes
918 after -webkit-ruby-position, before other properties, so it can affect resolved colors.
920 2018-11-13 Charlie Turner <cturner@igalia.com>
922 [EME][GStreamer] Make CDMInstance's available in decryptors, and factor out some EME utility classes.
923 https://bugs.webkit.org/show_bug.cgi?id=191316
925 Reviewed by Xabier Rodriguez-Calvar.
927 Another preparation in patch getting ready to move the decryption
928 logic behind the CDMInstance and out of the GStreamer decryptors
929 themselves. The first step taken here is to arrange for the
930 instances to always be available in the decryptors when they need
933 In doing so, there were a number of hairy bits of code that could
934 use some abstraction, so the opportunity was taken to do that as
937 Covered by tests in media/encrypted-media and
938 imported/w3c/web-platform-tests/encrypted-media.
940 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
941 (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Remove
942 drm-key-needed since it was not being used anywhere.
943 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
944 (WebCore::MediaPlayerPrivateGStreamerBase::handleSyncMessage):
945 Factor out the parsing of decryption system information from
946 GStreamer, since it was not clear what that code was doing unless
947 you squinted pretty hard. Also remove the duplicated
948 initialization-data-encountered posting.
949 (WebCore::MediaPlayerPrivateGStreamerBase::initializationDataEncountered):
950 Refactored to make it a more general method and usable in more
951 situations. It now has an optional to stop it from eliding init
952 datas for a different key system. This is required the first time
953 we post them, since if a CDM instance has already been set, and if
954 the stream init datas are for different systems, we ended up never
955 posting an encrypted event.
956 (WebCore::MediaPlayerPrivateGStreamerBase::attemptToDecryptWithLocalInstance):
957 Actually send a CDMInstance now when in regular playback mode.
958 (WebCore::MediaPlayerPrivateGStreamerBase::dispatchDecryptionKey):
959 Remove m_needToSendCredentials, it was not being used.
960 (WebCore::MediaPlayerPrivateGStreamerBase::handleProtectionEvent):
961 Refactored to use the new initializationDataEncountered.
962 (WebCore::MediaPlayerPrivateGStreamerBase::reportWaitingForKey):
963 Log the waiting state, since it was currently not clear what that
964 logging message was even telling you!
965 (WebCore::extractEventsAndSystemsFromMessage): Deleted.
966 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
967 * platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h:
968 (WebCore::InitData::InitData): New class that encapsulates both
969 single instantiation and streaming instantiation.
970 (WebCore::InitData::append): Used for the streaming mode, when you
971 are concatenating init datas together.
972 (WebCore::InitData::payload const):
973 (WebCore::InitData::systemId const):
974 (WebCore::InitData::payloadContainerType const):
975 (WebCore::InitData::isFromDifferentContainer):
976 (WebCore::ProtectionSystemEvents::ProtectionSystemEvents):
977 (WebCore::ProtectionSystemEvents::events const):
978 (WebCore::ProtectionSystemEvents::availableSystems const):
979 * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
980 (webkitMediaCommonEncryptionDecryptTransformInPlace): If you post
981 waiting-for-key after requesting a CDM instance, it will flap back
982 to not waiting for a key almost immediately, didn't make sense
983 positing after requesting an instance. Also post key-received when
985 (webkitMediaCommonEncryptionDecryptSinkEventHandler): It has now
986 been arranged that a CDMInstance will always be present in an OOB
987 message, so parse it out here.
988 * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
989 (WebCore::MediaPlayerPrivateGStreamerMSE::attemptToDecryptWithInstance):
990 As above, make sure when posting the OOB that a CDMInstance is present.
992 2018-11-13 Charlie Turner <cturner@igalia.com>
994 Various compiler warnings/errors fixes.
995 https://bugs.webkit.org/show_bug.cgi?id=191583
997 Reviewed by Frédéric Wang.
999 * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
1000 (WebCore::IDBServer::MemoryIDBBackingStore::clearObjectStore):
1001 ASSERT is only compiled in DEBUG mode, so guarding with
1002 !LOG_DISABLED is wrong.
1003 * rendering/RenderLayerCompositor.cpp:
1004 (WebCore::RenderLayerCompositor::updateCompositingLayers):
1005 showPaintOrderTree is only compiled in ENABLE(TREE_DEBUGGING)
1006 mode, so guarding with !LOG_DISABLED was wrong.
1007 (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1008 Ditto, this time with member .depth.
1009 (WebCore::RenderLayerCompositor::traverseUnchangedSubtree): Ditto.
1010 * rendering/svg/SVGRenderSupport.cpp:
1011 (WebCore::SVGRenderSupport::styleChanged): Add another unused
1014 2018-11-12 Antoine Quint <graouts@apple.com>
1016 [Web Animations] Don't schedule animation frames or update style while an accelerated animation is running
1017 https://bugs.webkit.org/show_bug.cgi?id=191542
1018 <rdar://problem/45356027>
1020 Reviewed by Simon Fraser.
1022 Test: animations/no-style-recalc-during-accelerated-animation.html
1024 In order to be more power-efficient, we stop scheduling calls to updateAnimationsAndSendEvents() when running only accelerated
1025 animations. To do that, we prevent scheduling further animation resolution if we're in the process of updating animations, and
1026 when we are done, call the new DocumentTimeline::scheduleNextTick() method that will check whether we have only accelerated
1027 animations running, and in that case check which of those animations needs an update the soonest and starts a timer scheduled
1028 for that time when we'll schedule animation resolution.
1030 By default, animations compute the time until their natural completion but in the case of CSS Animations, we want to make sure
1031 we also update animations in-flight to dispatch "animationiteration" events.
1033 * animation/AnimationEffect.h: Make the simpleIterationProgress() public so it can be called by WebAnimation::timeToNextTick().
1034 * animation/DocumentTimeline.cpp:
1035 (WebCore::DocumentTimeline::DocumentTimeline): Create the m_tickScheduleTimer and set it up to call scheduleAnimationResolutionIfNeeded().
1036 (WebCore::DocumentTimeline::suspendAnimations): If we don't already have a cached current time, cache the current time.
1037 (WebCore::DocumentTimeline::resumeAnimations): Reset the cached current time to ensure we'll get a fresh one when updating animations next.
1038 (WebCore::DocumentTimeline::liveCurrentTime const): Factor the code to compute the current time out of currentTime() so that we can
1039 cache the current time in suspendAnimations() without also automatically clearing the current time.
1040 (WebCore::DocumentTimeline::currentTime): Use liveCurrentTime() and cacheCurrentTime() since much of the code from this function has been
1041 factored out into those. Additionally, we were failing to clear the current time if called inside an animation frame, which we now do correctly
1042 by virtue of using cacheCurrentTime(). This fixes some flakiness.
1043 (WebCore::DocumentTimeline::cacheCurrentTime): Factor the code to cache the current time out of currentTime().
1044 (WebCore::DocumentTimeline::maybeClearCachedCurrentTime): No need to clear the current time if we get suspended.
1045 (WebCore::DocumentTimeline::scheduleAnimationResolutionIfNeeded): Prevent scheduling an animation update if we're in the middle of one already,
1046 scheduleNextTick() will be called after animations are updated to see if we should schedule an animation update instead.
1047 (WebCore::DocumentTimeline::unscheduleAnimationResolution): Cancel the m_tickScheduleTimer if we need to unschedule animation resolution.
1048 (WebCore::DocumentTimeline::animationResolutionTimerFired): Factor the call to applyPendingAcceleratedAnimations() out of updateAnimationsAndSendEvents()
1049 and call scheduleNextTick().
1050 (WebCore::DocumentTimeline::updateAnimationsAndSendEvents): Set the new m_isUpdatingAnimations member variable to true while this function is running.
1051 (WebCore::DocumentTimeline::scheduleNextTick): Schedule an animation update immediately if we have any relevant animation that is not accelerated.
1052 Otherwise, iterate through all animations to figure out the earliest moment at which we need to update animations.
1053 (WebCore::DocumentTimeline::updateListOfElementsWithRunningAcceleratedAnimationsForElement): Use the new WebAnimation::isRunningAccelerated() function.
1054 * animation/DocumentTimeline.h:
1055 * animation/WebAnimation.cpp:
1056 (WebCore::WebAnimation::isRunningAccelerated const): Since we end up checking if an animation is running with an accelerated effect, we introduce a new
1057 function to get that information directly through the WebAnimation object without bothering about its effect.
1058 (WebCore::WebAnimation::resolve): We should only call updateFinishedState() here since timingDidChange() would also notify the timeline about a potential
1059 change in relevance, which is not necessary and which would schedule an animation frame even for animations that are accelerated.
1060 (WebCore::WebAnimation::timeToNextTick const): Compute the time until our animation completion or, in the case of CSS animations, the next iteration.
1061 * animation/WebAnimation.h:
1063 2018-11-13 Miguel Gomez <magomez@igalia.com>
1065 [GTK][WPE] Incorrect tile coverage when resizing a layer out of the visible area
1066 https://bugs.webkit.org/show_bug.cgi?id=191545
1068 Reviewed by Žan Doberšek.
1070 Keep track of layer size changes even if they happen when the layer is not in the visible
1071 area, so we can update edge tiles when the layer gets visible.
1073 * platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
1074 (WebCore::TiledBackingStore::createTiles):
1075 * platform/graphics/texmap/coordinated/TiledBackingStore.h:
1077 2018-11-12 Rob Buis <rbuis@igalia.com>
1079 Content-Type parameter values should allow empty quoted strings
1080 https://bugs.webkit.org/show_bug.cgi?id=191388
1082 Reviewed by Dean Jackson.
1084 According to RFC 2045 and https://mimesniff.spec.whatwg.org/#parsing-a-mime-type empty
1085 quoted strings are acceptable for Content-Type parameter values. They
1086 are accepted by Firefox and Chrome implementations as well.
1088 Test: web-platform-tests/xhr/overridemimetype-blob.html
1090 * platform/network/ParsedContentType.cpp:
1091 (WebCore::parseToken):
1092 (WebCore::parseQuotedString):
1093 (WebCore::parseContentType):
1094 * platform/network/ParsedContentType.h:
1096 2018-11-12 Christopher Reid <chris.reid@sony.com>
1098 [Curl] Reject entire cookie if the domain fails a tailmatch.
1099 https://bugs.webkit.org/show_bug.cgi?id=191406
1101 Reviewed by Youenn Fablet.
1103 Currently we don't put domain attribute of cookie when it fails a tailmatch. As Firefox
1104 and Chrome do, we are going to reject the entire cookie if the domain fails a tailmatch instead.
1105 Also cleanup Cookie database implementation to make them testable better.
1107 Tests: TestWebKitAPI/Tests/WebCore/curl/Cookies.cpp
1109 * platform/network/curl/CookieJarDB.cpp:
1110 (WebCore::CookieJarDB::canAcceptCookie): Added.
1111 (WebCore::CookieJarDB::setCookie):
1112 * platform/network/curl/CookieUtil.cpp:
1113 (WebCore::CookieUtil::parseCookieAttributes):
1114 (WebCore::CookieUtil::parseCookieHeader):
1115 * platform/network/curl/CookieUtil.h:
1117 2018-11-12 Devin Rousso <drousso@apple.com>
1119 Web Inspector: Network: show secure certificate details per-request
1120 https://bugs.webkit.org/show_bug.cgi?id=191447
1121 <rdar://problem/30019476>
1123 Reviewed by Joseph Pecoraro.
1125 Test: http/tests/inspector/network/resource-response-security.html
1127 * loader/ResourceLoader.h:
1128 (WebCore::ResourceLoader::shouldIncludeCertificateInfo const):
1129 * loader/ResourceLoader.cpp:
1130 (WebCore::ResourceLoader::shouldIncludeCertificateInfo const): Added.
1131 Always save certificate information when WebInspector is open.
1133 * platform/network/CertificateInfoBase.h: Added.
1134 (WebCore::CertificateInfoBase::containsNonRootSHA1SignedCertificate const):
1135 (WebCore::CertificateInfoBase::summaryInfo const):
1136 (WebCore::CertificateInfoBase::isEmpty const):
1137 * platform/network/cf/CertificateInfo.h:
1138 (WebCore::CertificateInfo::summaryInfo const): Added.
1139 * platform/network/cf/CertificateInfoCFNet.cpp: Renamed from Source/WebCore/platform/network/mac/CertificateInfoMac.mm.
1140 (WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate):
1141 (WebCore::CertificateInfo::summaryInfo const): Added.
1142 * platform/network/curl/CertificateInfo.h:
1143 (WebCore::CertificateInfo::summaryInfo const): Added.
1144 (WebCore::CertificateInfo::isEmpty const): Added.
1145 * platform/network/soup/CertificateInfo.h:
1146 (WebCore::CertificateInfo::summaryInfo const): Added.
1147 (WebCore::CertificateInfo::isEmpty const): Added.
1148 Create base class for `CertificateInfo` so that `InspectorNetworkAgent` doesn't need to have
1149 platform-specific code in its implementation.
1151 * platform/network/cocoa/CertificateInfoCocoa.mm: Renamed from Source/WebCore/platform/network/mac/CertificateInfoMac.mm.
1152 * platform/network/curl/CertificateInfoCFNet.cpp: Renamed from Source/WebCore/platform/network/curl/CertificateInfo.cpp.
1153 * platform/network/soup/CertificateInfoSoup.cpp: Renamed from Source/WebCore/platform/network/soup/CertificateInfo.cpp.
1155 * inspector/NetworkResourcesData.h:
1156 (WebCore::NetworkResourcesData::ResourceData::certificateInfo const): Added.
1157 (WebCore::NetworkResourcesData::ResourceData::setCertificateInfo): Added.
1158 * inspector/NetworkResourcesData.cpp:
1159 (WebCore::NetworkResourcesData::responseReceived):
1161 * inspector/agents/InspectorNetworkAgent.cpp:
1162 (WebCore::InspectorNetworkAgent::buildObjectForResourceResponse):
1164 * PlatformAppleWin.cmake:
1165 * PlatformMac.cmake:
1167 * WebCore.xcodeproj/project.pbxproj:
1168 * platform/Curl.cmake:
1169 * platform/SourcesSoup.txt:
1171 2018-11-12 Zalan Bujtas <zalan@apple.com>
1173 Do not collapse the soon-to-be-parent anon block when we shuffle around the marker item renderer.
1174 https://bugs.webkit.org/show_bug.cgi?id=191554
1175 <rdar://problem/45825265>
1177 Reviewed by Antti Koivisto.
1179 While moving the marker item renderer to its correct subtree, we accidentally remove the soon-to-be parent anonymous block.
1180 Moving a renderer is a 2 step process:
1181 1. Detach the renderer from its current parent
1182 2. Attach it to its new parent.
1183 During step #1, we check if there is a chance to collapse anonymous blocks. In this case the soon-to-be-parent is a sibling anonymous block which, after detaching the marker sibling
1184 is not needed anymore (except we use it as the new parent).
1186 Test: fast/inline/marker-list-item-move-should-not-crash.html
1188 * rendering/updating/RenderTreeBuilder.cpp:
1189 (WebCore::RenderTreeBuilder::detach):
1190 * rendering/updating/RenderTreeBuilder.h:
1191 * rendering/updating/RenderTreeBuilderBlock.cpp:
1192 (WebCore::RenderTreeBuilder::Block::detach):
1193 * rendering/updating/RenderTreeBuilderBlock.h:
1194 * rendering/updating/RenderTreeBuilderList.cpp:
1195 (WebCore::RenderTreeBuilder::List::updateItemMarker):
1197 2018-11-12 Javier Fernandez <jfernandez@igalia.com>
1199 [css-grid] Refactoring to make more explicit the orthogonal items' pre-layout logic
1200 https://bugs.webkit.org/show_bug.cgi?id=191358
1202 Reviewed by Manuel Rego Casasnovas.
1204 These changes are just a refactoring to ease the integration of the new Baseline Alignment
1205 logic in a follow up patch.
1207 We need to properly estimate the grid area size of orthogonal items so that we can perform
1208 an accurate pre-layout. This is important because orthogonal items will synthesize their baseline
1209 if they participate in any baseline alignment context.
1211 No new tests, since no behavior change has been introduced in this patch.
1213 * rendering/Grid.cpp:
1214 (WebCore::Grid::setNeedsItemsPlacement):
1216 * rendering/GridTrackSizingAlgorithm.cpp:
1217 (WebCore::GridTrackSizingAlgorithm::estimatedGridAreaBreadthForChild const):
1218 (WebCore::GridTrackSizingAlgorithm::gridAreaBreadthForChild const):
1219 (WebCore::GridTrackSizingAlgorithm::isRelativeGridLengthAsAuto const):
1220 (WebCore::GridTrackSizingAlgorithm::isRelativeSizedTrackAsAuto const):
1221 (WebCore::GridTrackSizingAlgorithm::gridTrackSize const):
1222 (WebCore::IndefiniteSizeStrategy::findUsedFlexFraction const):
1223 (WebCore::GridTrackSizingAlgorithm::run):
1224 (WebCore::GridTrackSizingAlgorithm::reset):
1225 * rendering/GridTrackSizingAlgorithm.h:
1226 (WebCore::GridTrackSizingAlgorithmStrategy::gridTrackSize const):
1227 * rendering/RenderGrid.cpp:
1228 (WebCore::RenderGrid::repeatTracksSizingIfNeeded):
1229 (WebCore::RenderGrid::layoutBlock):
1230 (WebCore::RenderGrid::computeIntrinsicLogicalWidths const):
1231 (WebCore::RenderGrid::computeTrackSizesForIndefiniteSize const):
1232 (WebCore::RenderGrid::placeItemsOnGrid const):
1233 (WebCore::RenderGrid::performGridItemsPreLayout const):
1234 (WebCore::overrideSizeChanged):
1235 (WebCore::hasRelativeBlockAxisSize):
1236 (WebCore::RenderGrid::updateGridAreaLogicalSize const):
1237 (WebCore::RenderGrid::layoutGridItems):
1238 * rendering/RenderGrid.h:
1240 2018-11-12 Sihui Liu <sihui_liu@apple.com>
1242 imported/w3c/web-platform-tests/IndexedDB/keygenerator-explicit.html crashing on iOS device
1243 https://bugs.webkit.org/show_bug.cgi?id=191500
1245 Reviewed by Dean Jackson.
1247 When double value is bigger than maximum unsigned int, converting double to unsigned int has
1248 different behaviors on macOS and iOS. On macOS, the result would be 0 while on iOS it would be
1249 maximum unsigned int.
1251 Covered by existing test.
1253 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1254 (WebCore::IDBServer::SQLiteIDBBackingStore::generateKeyNumber):
1255 (WebCore::IDBServer::SQLiteIDBBackingStore::maybeUpdateKeyGeneratorNumber):
1257 2018-11-12 Basuke Suzuki <basuke.suzuki@sony.com>
1259 [Curl] Add API Test for Curl cookie backend.
1260 https://bugs.webkit.org/show_bug.cgi?id=191493
1262 Reviewed by Youenn Fablet.
1264 Refactoring for cookie backend interface.
1266 Tests: TestWebKitAPI/Tests/WebCore/curl/Cookies.cpp
1268 * platform/FileSystem.h:
1269 * platform/network/curl/CookieJarCurlDatabase.cpp:
1270 (WebCore::cookiesForSession):
1271 (WebCore::CookieJarCurlDatabase::setCookiesFromDOM const):
1272 (WebCore::CookieJarCurlDatabase::setCookiesFromHTTPResponse const):
1273 (WebCore::CookieJarCurlDatabase::getRawCookies const):
1274 * platform/network/curl/CookieJarDB.cpp:
1275 (WebCore::CookieJarDB::openDatabase):
1276 (WebCore::CookieJarDB::checkSQLiteReturnCode):
1277 (WebCore::CookieJarDB::isEnabled const):
1278 (WebCore::CookieJarDB::searchCookies):
1279 (WebCore::CookieJarDB::setCookie):
1280 (WebCore::CookieJarDB::deleteCookie):
1281 (WebCore::CookieJarDB::deleteCookieInternal):
1282 (WebCore::CookieJarDB::deleteCookies):
1283 (WebCore::CookieJarDB::deleteAllCookies):
1284 (WebCore::CookieJarDB::executeSimpleSql):
1285 (WebCore::CookieJarDB::isEnabled): Deleted.
1286 * platform/network/curl/CookieJarDB.h:
1287 * platform/network/curl/CookieUtil.cpp:
1288 (WebCore::CookieUtil::parseCookieHeader):
1289 * platform/network/curl/CookieUtil.h:
1290 * platform/win/FileSystemWin.cpp:
1291 (WebCore::FileSystem::generateTemporaryPath):
1292 (WebCore::FileSystem::openTemporaryFile):
1293 (WebCore::FileSystem::createTemporaryDirectory):
1294 (WebCore::FileSystem::deleteNonEmptyDirectory):
1296 2018-11-12 Tim Horton <timothy_horton@apple.com>
1298 Make it possible to edit images inline
1299 https://bugs.webkit.org/show_bug.cgi?id=191352
1300 <rdar://problem/30107985>
1302 Reviewed by Dean Jackson.
1304 Tests: editing/images/basic-editable-image.html
1305 editing/images/reparent-editable-image-maintains-strokes.html
1307 Add the beginnings of a mechanism to replace images with a special attribute
1308 with a native drawing view in the UI process.
1310 * page/Settings.yaml:
1311 Add a setting to control whether images become natively editable when they
1312 have the x-apple-editable-image attribute.
1314 * html/HTMLImageElement.cpp:
1315 (WebCore::HTMLImageElement::editableImageViewID const):
1316 Lazily generate an EmbeddedViewID and persist it on the <img> element.
1318 * html/HTMLImageElement.h:
1319 Rearrange the service controls methods to sit before the members.
1320 Add m_editableImageViewID and editableImageViewID().
1322 * platform/graphics/GraphicsLayer.cpp:
1323 (WebCore::GraphicsLayer::nextEmbeddedViewID):
1324 * platform/graphics/GraphicsLayer.h:
1325 (WebCore::GraphicsLayer::setContentsToEmbeddedView):
1326 Add a new ContentsLayerPurpose, EmbeddedView, which is only supported
1327 on Cocoa platforms and when using RemoteLayerTree.
1328 Add ContentsLayerEmbeddedViewType, which currently only has the EditableImage type.
1329 Add setContentsToEmbeddedView, which takes a ContentsLayerEmbeddedViewType
1330 and an EmbeddedViewID to uniquely identify and communicate about the
1331 embedded view (which may move between layers, since it is tied to an element).
1333 * platform/graphics/ca/GraphicsLayerCA.cpp:
1334 (WebCore::GraphicsLayerCA::createPlatformCALayerForEmbeddedView):
1335 (WebCore::GraphicsLayerCA::setContentsToEmbeddedView):
1336 When setting GraphicsLayer's contents to an embedded view, we use
1337 a special PlatformCALayer factory that takes the EmbeddedViewID and type.
1338 GraphicsLayerCARemote will override this and make a correctly-initialized
1339 PlatformCALayerRemote that keeps track of the EmbeddedViewID.
1341 * platform/graphics/ca/GraphicsLayerCA.h:
1342 * platform/graphics/ca/PlatformCALayer.cpp:
1343 (WebCore::operator<<):
1344 * platform/graphics/ca/PlatformCALayer.h:
1345 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
1346 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
1347 (WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
1348 (WebCore::PlatformCALayerCocoa::embeddedViewID const):
1349 Add stubs and logging for EmbeddedViewID on PlatformCALayer.
1350 These will be overridden by PlatformCALayerRemote to do more interesting things.
1352 * rendering/RenderImage.cpp:
1353 (WebCore::RenderImage::isEditableImage const):
1354 Add a getter that return true if the setting is enabled and
1355 x-apple-editable-image is empty or true.
1357 (WebCore::RenderImage::requiresLayer const):
1358 RenderImage requires a layer either if RenderReplaced does, or we are an
1361 * rendering/RenderImage.h:
1362 * rendering/RenderLayer.cpp:
1363 (WebCore::RenderLayer::shouldBeNormalFlowOnly const):
1364 (WebCore::RenderLayer::calculateClipRects const):
1365 * rendering/RenderLayerBacking.cpp:
1366 (WebCore::RenderLayerBacking::updateConfiguration):
1367 Push the EmbeddedViewID and type down to GraphicsLayer for editable images.
1369 * rendering/RenderLayerCompositor.cpp:
1370 (WebCore::RenderLayerCompositor::requiresCompositingLayer const):
1371 (WebCore::RenderLayerCompositor::requiresOwnBackingStore const):
1372 (WebCore::RenderLayerCompositor::reasonsForCompositing const):
1373 (WebCore::RenderLayerCompositor::requiresCompositingForEditableImage const):
1374 * rendering/RenderLayerCompositor.h:
1375 Make editable images require compositing implicitly.
1377 2018-11-12 Don Olmstead <don.olmstead@sony.com>
1379 Shipped PNGs include bad profiles: iCCP: known incorrect sRGB profile
1380 https://bugs.webkit.org/show_bug.cgi?id=189230
1381 <rdar://problem/44050379>
1383 Reviewed by Joseph Pecoraro.
1385 Runs all png images through zopflipng. This results in a smaller file
1386 size and takes care of this issue as a byproduct.
1388 * Modules/modern-media-controls/images/iOS/airplay-placard@1x.png:
1389 * Modules/modern-media-controls/images/iOS/airplay-placard@2x.png:
1390 * Modules/modern-media-controls/images/iOS/airplay-placard@3x.png:
1391 * Modules/modern-media-controls/images/iOS/invalid-placard@1x.png:
1392 * Modules/modern-media-controls/images/iOS/invalid-placard@2x.png:
1393 * Modules/modern-media-controls/images/iOS/invalid-placard@3x.png:
1394 * Modules/modern-media-controls/images/iOS/pip-placard@1x.png:
1395 * Modules/modern-media-controls/images/iOS/pip-placard@2x.png:
1396 * Modules/modern-media-controls/images/iOS/pip-placard@3x.png:
1397 * Modules/modern-media-controls/images/macOS/airplay-placard@1x.png:
1398 * Modules/modern-media-controls/images/macOS/airplay-placard@2x.png:
1399 * Modules/modern-media-controls/images/macOS/invalid-placard@1x.png:
1400 * Modules/modern-media-controls/images/macOS/invalid-placard@2x.png:
1401 * Modules/modern-media-controls/images/macOS/pip-placard@1x.png:
1402 * Modules/modern-media-controls/images/macOS/pip-placard@2x.png:
1403 * Resources/AttachmentPlaceholder.png:
1404 * Resources/AttachmentPlaceholder@2x.png:
1405 * Resources/ListButtonArrow.png:
1406 * Resources/ListButtonArrow@2x.png:
1407 * Resources/missingImage.png:
1408 * Resources/missingImage@2x.png:
1409 * Resources/missingImage@3x.png:
1410 * Resources/moveCursor.png:
1411 * Resources/northEastSouthWestResizeCursor.png:
1412 * Resources/northSouthResizeCursor.png:
1413 * Resources/northWestSouthEastResizeCursor.png:
1414 * Resources/nullPlugin.png:
1415 * Resources/nullPlugin@2x.png:
1416 * Resources/panIcon.png:
1417 * Resources/textAreaResizeCorner.png:
1418 * Resources/textAreaResizeCorner@2x.png:
1419 * Resources/urlIcon.png:
1421 2018-11-12 Youenn Fablet <youenn@apple.com>
1423 RealtimeOutgoing A/V sources should observe their sources only if having a sink
1424 https://bugs.webkit.org/show_bug.cgi?id=191490
1426 Reviewed by Eric Carlson.
1428 Observe the source that generates media based on the sinks:
1429 - Do not observe at creation time
1430 - For first sink, start observing
1431 - When no more sink, stop observing
1432 Apply this principle for both outgoing audio and video sources.
1433 Add locks for the sinks to ensure thread-safety.
1434 Make sinks HashSet which is more robust.
1436 Do some refactoring to better isolate generic outgoing sources from Cocoa/GTK implementations.
1438 Covered by existing tests and updated webrtc/remove-track.html.
1440 * platform/mediastream/RealtimeOutgoingAudioSource.cpp:
1441 (WebCore::RealtimeOutgoingAudioSource::~RealtimeOutgoingAudioSource):
1442 (WebCore::RealtimeOutgoingAudioSource::stop):
1443 (WebCore::RealtimeOutgoingAudioSource::AddSink):
1444 (WebCore::RealtimeOutgoingAudioSource::RemoveSink):
1445 (WebCore::RealtimeOutgoingAudioSource::sendAudioFrames):
1446 * platform/mediastream/RealtimeOutgoingAudioSource.h:
1447 * platform/mediastream/RealtimeOutgoingVideoSource.cpp:
1448 (WebCore::RealtimeOutgoingVideoSource::RealtimeOutgoingVideoSource):
1449 (WebCore::RealtimeOutgoingVideoSource::~RealtimeOutgoingVideoSource):
1450 (WebCore::RealtimeOutgoingVideoSource::observeSource):
1451 (WebCore::RealtimeOutgoingVideoSource::setSource):
1452 (WebCore::RealtimeOutgoingVideoSource::stop):
1453 (WebCore::RealtimeOutgoingVideoSource::AddOrUpdateSink):
1454 (WebCore::RealtimeOutgoingVideoSource::RemoveSink):
1455 * platform/mediastream/RealtimeOutgoingVideoSource.h:
1456 (WebCore::RealtimeOutgoingVideoSource::isSilenced const):
1457 * platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceLibWebRTC.cpp:
1458 (WebCore::RealtimeOutgoingAudioSourceLibWebRTC::pullAudioData):
1459 * platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.cpp:
1460 (WebCore::RealtimeOutgoingAudioSourceCocoa::RealtimeOutgoingAudioSourceCocoa):
1461 (WebCore::RealtimeOutgoingAudioSourceCocoa::audioSamplesAvailable):
1462 (WebCore::RealtimeOutgoingAudioSourceCocoa::pullAudioData):
1463 * platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.h:
1464 * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:
1465 (WebCore::RealtimeOutgoingVideoSourceCocoa::sampleBufferUpdated):
1467 2018-11-12 Youenn Fablet <youenn@apple.com>
1469 Support setting stream ids when adding a transceiver
1470 https://bugs.webkit.org/show_bug.cgi?id=191307
1472 Reviewed by Eric Carlson.
1474 Add support for streams in RTCTransceiverInit.
1475 Add plumbing down to libwebrtc.
1476 Covered by rebased tests.
1478 * Modules/mediastream/RTCPeerConnection.h:
1479 * Modules/mediastream/RTCPeerConnection.idl:
1480 * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
1481 (WebCore::fromRtpTransceiverInit):
1483 2018-11-12 Antti Koivisto <antti@apple.com>
1485 Support dynamic pseudo-classes on elements with display: contents
1486 https://bugs.webkit.org/show_bug.cgi?id=181640
1487 <rdar://problem/36605415>
1489 Reviewed by Dean Jackson.
1491 The code for :hover and :active style invalidation assumes that only elements with renderer need invalidation.
1493 This patch fixes '.display-content-element:hover span' case but not '.display-content-element:hover' case but
1494 includes tests for both. The latter is not super useful anyway (as it only affects rendering with inherited
1497 Test: fast/css/display-contents-hover-active.html
1500 (WebCore::Document::updateHoverActiveState):
1502 Traverse up in composed tree instead of render tree when invalidating. This has the same order as render tree
1503 but also includes display:content elements. This also allows removing the special display:none case.
1506 (WebCore::Element::setActive):
1507 (WebCore::Element::setHovered):
1509 Also look into display:contents style for invalidation checks.
1511 (WebCore::Element::renderOrDisplayContentsStyle const):
1513 Make this helper an Element member.
1517 (WebCore::Node::parentElementInComposedTree const):
1519 Support starting from a PseudoElement. This is consistent with ComposedTreeAncestorIterator.
1521 * rendering/updating/RenderTreePosition.cpp:
1522 (WebCore::RenderTreePosition::nextSiblingRenderer const):
1523 * style/StyleTreeResolver.cpp:
1524 (WebCore::Style::TreeResolver::resolveElement):
1525 (WebCore::Style::TreeResolver::createAnimatedElementUpdate):
1526 (WebCore::Style::shouldResolveElement):
1527 (WebCore::Style::TreeResolver::resolveComposedTree):
1528 (WebCore::Style::renderOrDisplayContentsStyle): Deleted.
1530 Use the Element::renderOrDisplayContentsStyle() instead.
1532 2018-11-12 Antoine Quint <graouts@apple.com>
1534 [Web Animations] Turn Web Animations experimental
1535 https://bugs.webkit.org/show_bug.cgi?id=191543
1537 Reviewed by Dean Jackson.
1539 * page/RuntimeEnabledFeatures.h:
1541 2018-11-12 Simon Fraser <simon.fraser@apple.com>
1543 feFlood with alpha color doesn't work correctly
1544 https://bugs.webkit.org/show_bug.cgi?id=163666
1546 Reviewed by Zalan Bujtas.
1548 FEFlood::platformApplySoftware() erroneously used colorWithOverrideAlpha()
1549 rather than multiplying the flood color with the flood opacity as other browsers do.
1551 Test: svg/filters/feFlood-with-alpha-color.html
1553 * platform/graphics/Color.cpp:
1554 (WebCore::Color::colorWithAlpha const): I tried using colorWithAlphaMultipliedBy() elsewhere,
1555 and it triggered a behavior change, so add a comment.
1556 * platform/graphics/filters/FEFlood.cpp:
1557 (WebCore::FEFlood::platformApplySoftware):
1558 * svg/SVGStopElement.cpp:
1559 (WebCore::SVGStopElement::stopColorIncludingOpacity const):
1561 2018-11-12 Eric Carlson <eric.carlson@apple.com>
1563 Require <iframe allow="display"> for an iframe to use getDisplayMedia
1564 https://bugs.webkit.org/show_bug.cgi?id=191505
1565 <rdar://problem/45968811>
1567 Reviewed by Jer Noble.
1569 Test: http/tests/media/media-stream/get-display-media-iframe-allow-attribute.html
1571 * Modules/mediastream/MediaDevicesRequest.cpp:
1572 (WebCore::MediaDevicesRequest::start):
1573 * Modules/mediastream/UserMediaController.cpp:
1574 (WebCore::isAllowedToUse):
1575 (WebCore::UserMediaController::canCallGetUserMedia):
1576 (WebCore::UserMediaController::logGetUserMediaDenial):
1577 * Modules/mediastream/UserMediaController.h:
1578 * Modules/mediastream/UserMediaRequest.cpp:
1579 (WebCore::UserMediaRequest::start):
1581 2018-11-12 Simon Fraser <simon.fraser@apple.com>
1583 Make compositing updates incremental
1584 https://bugs.webkit.org/show_bug.cgi?id=90342
1586 Reviewed by Antti Koivisto.
1588 Previously, updating compositing layers required two full RenderLayer tree traversals,
1589 and all the work was done for every RenderLayer on each composting update. This could be expensive
1590 on pages with lots of RenderLayers.
1592 These changes make compositing updates more incremental. Compositing updates still require
1593 two tree traversals. The first determines which RenderLayers need to be composited (of those which
1594 weren't already made composited at style-change time), because of reasons that can only be determined
1595 post-layout, and indirect reasons including overlap. The second traversal updates the configuration, geometry
1596 and GraphicsLayer tree for the composited layers. Dependencies on both descendant and ancestor state make
1597 it hard to fold these two traversals together.
1599 In order to minimize the work done during these traversals, dirty bits are stored on RenderLayers,
1600 and propagated to ancestor layers in paint order. There are two sets of bits: those related to the first
1601 "compositing requirements" traversal, and those related to the second "update backing and hierarchy" traversal.
1602 When a RenderLayer gets a dirty bit set, bits are propagated to ancestors to indicate that children need
1605 Sadly entire subtrees can't be skipped during the "compositing requirements" traversal because we still have
1606 to accumulate overlap rects, but RenderLayerCompositor::traverseUnchangedSubtree() is used to minimize
1607 work in that case. Subtrees can be skipped in the "update backing and hierarchy" traversal. Entire traversals can
1608 be skipped if no change has triggered the need for that traversal.
1610 These changes fix a correctness issue where transform changes now trigger overlap re-evaluation, which causes
1611 more layer geometry updates than before. This regressed the MotionMark "Focus" test, when geometry updates
1612 triggered layer resizes as the filter blur radius changed, which then triggered repaints. This is fixed by
1613 excluding composited filters from the composited bounds (but still taking them into account for overlap).
1615 Care is taken to avoid triggering traversals in non-composited documents (tested by no-updates-in-non-composited-iframe.html).
1617 Code to set the dirty bits is added in various places that change properties that compositing depends on.
1619 These changes also subsume the patch in 176196; we now never consult properties that rely on layout from the
1620 style change code path, and the only call stack for geometry updates is from the "update backing and hierarchy"
1621 traversal, which is always a pre-order traversal.
1623 Tests: compositing/geometry/stacking-context-change-layer-reparent.html
1624 compositing/layer-creation/change-to-overlap.html
1625 compositing/updates/no-updates-in-non-composited-iframe.html
1627 * html/canvas/WebGLRenderingContextBase.cpp:
1628 (WebCore::WebGLRenderingContextBase::markContextChanged): Need to differentiate between a canvas becoming composited
1629 for the first time, and its pixels changing with a new 'CanvasPixelsChanged' value.
1630 * page/FrameView.cpp:
1631 (WebCore::FrameView::setViewportConstrainedObjectsNeedLayout):
1633 (WebCore::Page::setPageScaleFactor):
1634 * platform/graphics/ca/GraphicsLayerCA.cpp:
1635 (WebCore::GraphicsLayerCA::updateBackdropFilters): If we just made a layer for backdrops, we need to update sublayers.
1636 * rendering/RenderBox.cpp:
1637 (WebCore::RenderBox::styleWillChange):
1638 * rendering/RenderLayer.cpp:
1639 (WebCore::RenderLayer::RenderLayer):
1640 (WebCore::RenderLayer::~RenderLayer):
1641 (WebCore::RenderLayer::addChild):
1642 (WebCore::RenderLayer::removeChild):
1643 (WebCore::RenderLayer::shouldBeStackingContext const):
1644 (WebCore::RenderLayer::stackingContext const):
1645 (WebCore::RenderLayer::dirtyZOrderLists):
1646 (WebCore::RenderLayer::dirtyNormalFlowList):
1647 (WebCore::RenderLayer::updateNormalFlowList):
1648 (WebCore::RenderLayer::rebuildZOrderLists):
1649 (WebCore::RenderLayer::setAncestorsHaveCompositingDirtyFlag):
1650 (WebCore::RenderLayer::contentChanged):
1651 (WebCore::RenderLayer::updateLayerPositions):
1652 (WebCore::RenderLayer::updateTransform):
1653 (WebCore::RenderLayer::updateLayerPosition):
1654 (WebCore::RenderLayer::enclosingCompositingLayer const):
1655 (WebCore::RenderLayer::enclosingCompositingLayerForRepaint const):
1656 (WebCore::RenderLayer::clippingRootForPainting const):
1657 (WebCore::RenderLayer::scrollTo):
1658 (WebCore::RenderLayer::updateCompositingLayersAfterScroll):
1659 (WebCore::RenderLayer::updateScrollInfoAfterLayout):
1660 (WebCore::RenderLayer::paintLayerContents):
1661 (WebCore::RenderLayer::hitTest):
1662 (WebCore::RenderLayer::hitTestLayer):
1663 (WebCore::RenderLayer::calculateClipRects const):
1664 (WebCore::outputPaintOrderTreeLegend):
1665 (WebCore::outputPaintOrderTreeRecursive):
1666 (WebCore::compositingContainer): Deleted.
1667 * rendering/RenderLayer.h:
1668 (WebCore::RenderLayer::clearZOrderLists):
1669 (WebCore::RenderLayer::paintOrderParent const):
1670 * rendering/RenderLayerBacking.cpp:
1671 (WebCore::RenderLayerBacking::updateCompositedBounds):
1672 (WebCore::RenderLayerBacking::updateAfterWidgetResize):
1673 (WebCore::RenderLayerBacking::updateAfterLayout):
1674 (WebCore::RenderLayerBacking::updateConfigurationAfterStyleChange):
1675 (WebCore::RenderLayerBacking::updateConfiguration):
1676 (WebCore::RenderLayerBacking::updateGeometry):
1677 (WebCore::RenderLayerBacking::setRequiresBackgroundLayer):
1678 (WebCore::RenderLayerBacking::updateMaskingLayer):
1679 (WebCore::RenderLayerBacking::paintsContent const):
1680 (WebCore::RenderLayerBacking::contentChanged):
1681 (WebCore::RenderLayerBacking::setContentsNeedDisplay):
1682 (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
1683 (WebCore::RenderLayerBacking::startAnimation):
1684 (WebCore::RenderLayerBacking::animationFinished):
1685 (WebCore::RenderLayerBacking::startTransition):
1686 (WebCore::RenderLayerBacking::transitionFinished):
1687 (WebCore::RenderLayerBacking::setCompositedBounds):
1688 * rendering/RenderLayerBacking.h:
1689 * rendering/RenderLayerCompositor.cpp:
1690 (WebCore::RenderLayerCompositor::CompositingState::CompositingState):
1691 (WebCore::RenderLayerCompositor::enableCompositingMode):
1692 (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
1693 (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlagsAfterLayout):
1694 (WebCore::RenderLayerCompositor::willRecalcStyle):
1695 (WebCore::RenderLayerCompositor::didRecalcStyleWithNoPendingLayout):
1696 (WebCore::RenderLayerCompositor::updateCompositingLayers):
1697 (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1698 (WebCore::RenderLayerCompositor::traverseUnchangedSubtree):
1699 (WebCore::RenderLayerCompositor::updateBackingAndHierarchy):
1700 (WebCore::RenderLayerCompositor::appendDocumentOverlayLayers):
1701 (WebCore::RenderLayerCompositor::layerBecameNonComposited):
1702 (WebCore::RenderLayerCompositor::logLayerInfo):
1703 (WebCore::clippingChanged):
1704 (WebCore::styleAffectsLayerGeometry):
1705 (WebCore::RenderLayerCompositor::layerStyleChanged):
1706 (WebCore::RenderLayerCompositor::needsCompositingUpdateForStyleChangeOnNonCompositedLayer const):
1707 (WebCore::RenderLayerCompositor::updateBacking):
1708 (WebCore::RenderLayerCompositor::updateLayerCompositingState):
1709 (WebCore::RenderLayerCompositor::layerWasAdded):
1710 (WebCore::RenderLayerCompositor::layerWillBeRemoved):
1711 (WebCore::RenderLayerCompositor::enclosingNonStackingClippingLayer const):
1712 (WebCore::RenderLayerCompositor::computeExtent const):
1713 (WebCore::RenderLayerCompositor::addToOverlapMap):
1714 (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
1715 (WebCore::RenderLayerCompositor::rootLayerConfigurationChanged):
1716 (WebCore::RenderLayerCompositor::parentFrameContentLayers):
1717 (WebCore::RenderLayerCompositor::updateRootLayerPosition):
1718 (WebCore::RenderLayerCompositor::needsToBeComposited const):
1719 (WebCore::RenderLayerCompositor::requiresCompositingLayer const):
1720 (WebCore::RenderLayerCompositor::requiresOwnBackingStore const):
1721 (WebCore::RenderLayerCompositor::reasonsForCompositing const):
1722 (WebCore::RenderLayerCompositor::clippedByAncestor const):
1723 (WebCore::RenderLayerCompositor::requiresCompositingForAnimation const):
1724 (WebCore::RenderLayerCompositor::requiresCompositingForTransform const):
1725 (WebCore::RenderLayerCompositor::requiresCompositingForVideo const):
1726 (WebCore::RenderLayerCompositor::requiresCompositingForFilters const):
1727 (WebCore::RenderLayerCompositor::requiresCompositingForWillChange const):
1728 (WebCore::RenderLayerCompositor::requiresCompositingForPlugin const):
1729 (WebCore::RenderLayerCompositor::requiresCompositingForFrame const):
1730 (WebCore::RenderLayerCompositor::requiresCompositingForScrollableFrame const):
1731 (WebCore::RenderLayerCompositor::requiresCompositingForPosition const):
1732 (WebCore::RenderLayerCompositor::requiresCompositingForOverflowScrolling const):
1733 (WebCore::RenderLayerCompositor::styleChangeMayAffectIndirectCompositingReasons):
1734 (WebCore::RenderLayerCompositor::fixedLayerIntersectsViewport const):
1735 (WebCore::RenderLayerCompositor::useCoordinatedScrollingForLayer const):
1736 (WebCore::RenderLayerCompositor::rootOrBodyStyleChanged):
1737 (WebCore::RenderLayerCompositor::rootBackgroundColorOrTransparencyChanged):
1738 (WebCore::operator<<):
1739 (WebCore::RenderLayerCompositor::setCompositingLayersNeedRebuild): Deleted.
1740 (WebCore::checkIfDescendantClippingContextNeedsUpdate): Deleted.
1741 (WebCore::isScrollableOverflow): Deleted.
1742 (WebCore::styleHasTouchScrolling): Deleted.
1743 (WebCore::styleChangeRequiresLayerRebuild): Deleted.
1744 (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): Deleted.
1745 (WebCore::RenderLayerCompositor::rootFixedBackgroundsChanged): Deleted.
1746 (WebCore::RenderLayerCompositor::updateLayerTreeGeometry): Deleted.
1747 (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry): Deleted.
1748 * rendering/RenderLayerCompositor.h:
1749 * rendering/RenderTreeAsText.cpp:
1750 (WebCore::writeLayers):
1752 2018-11-12 Rob Buis <rbuis@igalia.com>
1754 CSSCalcOperation constructor wastes 6KB of Vector capacity on cnn.com
1755 https://bugs.webkit.org/show_bug.cgi?id=190839
1757 Reviewed by Frédéric Wang.
1759 The CSSCalcOperation ctor that takes a leftSide and rightSide parameter
1760 wastes memory since it will always have size 2 but claims the
1761 default Vector size. So make sure to reserve an initial capacity of 2.
1763 * css/CSSCalculationValue.cpp:
1765 2018-11-12 Yusuke Suzuki <yusukesuzuki@slowstart.org>
1767 WTFMove(xxx) is used in arguments while other arguments touch xxx
1768 https://bugs.webkit.org/show_bug.cgi?id=191544
1770 Reviewed by Alex Christensen.
1772 The order of the evaluation of C++ arguments is undefined. If we use WTFMove(xxx),
1773 xxx should not be touched in the other arguments. This patch fixes such uses in
1776 * Modules/indexeddb/IDBObjectStore.cpp:
1777 (WebCore::IDBObjectStore::deleteIndex):
1778 * Modules/indexeddb/IDBTransaction.cpp:
1779 (WebCore::IDBTransaction::scheduleOperation):
1780 * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
1781 (WebCore::IDBServer::MemoryIDBBackingStore::registerObjectStore):
1782 * Modules/indexeddb/server/MemoryObjectStore.cpp:
1783 (WebCore::IDBServer::MemoryObjectStore::registerIndex):
1785 2018-11-12 Zalan Bujtas <zalan@apple.com>
1787 [LFC][IFC] Construct dedicated runs when the inline element requires it.
1788 https://bugs.webkit.org/show_bug.cgi?id=191509
1790 Reviewed by Antti Koivisto.
1792 In certain cases, a run can overlap multiple inline elements like this:
1794 <span>normal text content</span><span style="position: relative; left: 10px;">but this one needs a dedicated run</span><span>end of text</span>
1796 The content above generates one long run <normal text contentbut this one needs dedicated runend of text> <- input to line breaking.
1797 However, since the middle run is positioned, it needs to be moved independently from the rest of the content, hence it needs a dedicated inline run.
1799 * layout/inlineformatting/InlineFormattingContext.cpp:
1800 (WebCore::Layout::InlineFormattingContext::layout const):
1801 (WebCore::Layout::contentRequiresSeparateRun):
1802 (WebCore::Layout::InlineFormattingContext::splitInlineRunIfNeeded const):
1803 (WebCore::Layout::InlineFormattingContext::postProcessInlineRuns const):
1804 (WebCore::Layout::InlineFormattingContext::closeLine const):
1805 (WebCore::Layout::InlineFormattingContext::appendContentToLine const):
1806 (WebCore::Layout::InlineFormattingContext::layoutInlineContent const):
1807 (WebCore::Layout::InlineFormattingContext::instrinsicWidthConstraints const):
1808 * layout/inlineformatting/InlineFormattingContext.h:
1809 (WebCore::Layout::InlineFormattingContext::inlineFormattingState const):
1810 * layout/inlineformatting/InlineLineBreaker.cpp:
1811 (WebCore::Layout::InlineLineBreaker::nextRun): mid-word breaking is not implemented yet.
1812 * layout/inlineformatting/InlineRun.h:
1813 (WebCore::Layout::InlineRun::overlapsMultipleInlineItems const):
1814 * layout/inlineformatting/InlineRunProvider.cpp:
1815 (WebCore::Layout::InlineRunProvider::processInlineTextItem):
1816 * layout/inlineformatting/InlineRunProvider.h:
1817 (WebCore::Layout::InlineRunProvider::Run::TextContext::expand):
1818 (WebCore::Layout::InlineRunProvider::Run::textContext):
1819 (WebCore::Layout::InlineRunProvider::Run::TextContext::setStart): Deleted.
1820 (WebCore::Layout::InlineRunProvider::Run::TextContext::setLength): Deleted.
1822 2018-11-12 Jer Noble <jer.noble@apple.com>
1824 [MSE] Frame re-ordering can cause iframes to never be enqueued
1825 https://bugs.webkit.org/show_bug.cgi?id=191485
1827 Reviewed by Eric Carlson.
1829 Test: media/media-source/media-source-dropped-iframe.html
1831 Some frame re-ordering techniques result in files where the first frame has a
1832 decode timestamp < 0, but a presentation timestamp >= 0. When appending these
1833 samples to existing content, we can fail to enqueue the first frame because its
1834 DTS overlaps an existing sample, but the presentation timestamp does not.
1835 Rather than try to only enqueue samples whose decode timestamps are > than the
1836 greatest decode end timestamp (minus some fudge factor), allow all frames to be
1837 added to the decode queue if they are strictly ordered greater than the last
1840 * Modules/mediasource/SourceBuffer.cpp:
1841 (WebCore::SourceBuffer::TrackBuffer::TrackBuffer):
1842 (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
1843 (WebCore::SourceBuffer::provideMediaData):
1844 (WebCore::SourceBuffer::reenqueueMediaForTime):
1846 2018-11-12 Yusuke Suzuki <yusukesuzuki@slowstart.org>
1848 IDBTransaction does not use "RefPtr<IDBTransaction> self"
1849 https://bugs.webkit.org/show_bug.cgi?id=190436
1851 Reviewed by Alex Christensen.
1853 It seems that `RefPtr<IDBTransaction> self;` is not effective since it does not capture anything.
1854 Use `protectedThis = makeRef(*this)` instead.
1858 * Modules/indexeddb/IDBTransaction.cpp:
1859 (WebCore::IDBTransaction::IDBTransaction):
1861 2018-11-12 Alicia Boya GarcÃa <aboya@igalia.com>
1863 [MSE][GStreamer] Introduce AbortableTaskQueue
1864 https://bugs.webkit.org/show_bug.cgi?id=190902
1866 Reviewed by Xabier Rodriguez-Calvar.
1868 A new synchronization primitive is introduced: AbortableTaskQueue,
1869 which allows to send work to the main thread from a background thread
1870 with the option to perform two-phase cancellation (startAborting() and
1873 This new primitive has been used to overhaul GstBus messaging in
1874 AppendPipeline. A lot of code made redundant has been deleted in the
1875 process and lots of internal functions were now able to be made
1876 private. As part of the refactor all glib signals in AppendPipeline
1877 now use lambdas. All usages of WTF::isMainThread() in AppendPipeline
1878 have been replaced by isMainThread() for consistency with the rest of
1881 Two-phase cancellation is still not used in AppendPipeline as of this
1882 patch, but it will be used in a future patch that makes use of
1883 GStreamer flushes to implement correct MSE abort semantics. There are
1884 unit tests to ensure it works correctly, even if it's still not used.
1886 * WebCore.xcodeproj/project.pbxproj:
1887 * platform/AbortableTaskQueue.h: Added.
1888 * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
1889 (WebCore::AppendPipeline::dumpAppendState):
1890 (WebCore::AppendPipeline::AppendPipeline):
1891 (WebCore::AppendPipeline::~AppendPipeline):
1892 (WebCore::AppendPipeline::appsrcEndOfAppendCheckerProbe):
1893 (WebCore::AppendPipeline::handleAppsinkNewSampleFromAnyThread):
1894 (WebCore::AppendPipeline::connectDemuxerSrcPadToAppsinkFromAnyThread):
1895 * platform/graphics/gstreamer/mse/AppendPipeline.h:
1896 (WebCore::AppendPipeline::sourceBufferPrivate):
1897 (WebCore::AppendPipeline::appsinkCaps):
1898 (WebCore::AppendPipeline::track):
1899 (WebCore::AppendPipeline::demuxerSrcPadCaps):
1900 (WebCore::AppendPipeline::playerPrivate):
1902 2018-11-12 Xabier Rodriguez Calvar <calvaris@igalia.com>
1904 [GStreamer][EME] waitingforkey event should consider decryptors' waiting status
1905 https://bugs.webkit.org/show_bug.cgi?id=191459
1907 Reviewed by Carlos Garcia Campos.
1909 The new cross platform architecture to report waitingforkey and
1910 recover from it requires a more accurate knowledge of what is
1911 going on with the decryptors because events are reported only once
1912 (per key exchange run) and crossplatform only continues if we are
1913 actually ready to continue, meaning that no decryptors are
1916 * platform/graphics/gstreamer/GUniquePtrGStreamer.h: Added
1917 GstIterator deleter.
1918 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1919 (WebCore::MediaPlayerPrivateGStreamerBase::setWaitingForKey): Bail
1920 out if we are requested to not wait anymore but there are still
1922 (WebCore::MediaPlayerPrivateGStreamerBase::waitingForKey const):
1923 Query the pipeline, just a query after pipeline is built and
1924 manual inspection during build. The query is optimal but sometimes
1925 we can get this request when the pipeline is under construction so
1926 queries do not arrive at the decryptors and we have to deliver it
1928 (WebCore::MediaPlayerPrivateGStreamerBase::reportWaitingForKey:
1929 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
1930 (WebCore::MediaPlayerPrivateGStreamerBase::reportWaitingForKey:
1931 Deleted because it is now inlined.
1932 * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
1933 (webKitMediaClearKeyDecryptorDecrypt): Fixed small compiler warning.
1934 * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
1935 (webkit_media_common_encryption_decrypt_class_init): Override
1937 (webkitMediaCommonEncryptionDecryptTransformInPlace): When the
1938 decryptor is going to block to wait, report before. When the
1939 decryptor receives the key, report it got it.
1940 (webkitMediaCommonEncryptionDecryptSinkEventHandler): Do not
1941 handle waitingforkey here.
1942 (webkitMediaCommonEncryptionDecryptorQueryHandler): Report if the
1943 decryptor is waiting.
1945 2018-11-12 Michael Catanzaro <mcatanzaro@igalia.com>
1947 [GTK] Silence ATK_XY_PARENT warnings
1948 https://bugs.webkit.org/show_bug.cgi?id=191504
1950 Reviewed by Carlos Garcia Campos.
1952 * accessibility/atk/WebKitAccessibleInterfaceComponent.cpp:
1954 * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1956 * accessibility/atk/WebKitAccessibleUtil.cpp:
1957 (contentsRelativeToAtkCoordinateType):
1959 2018-11-11 Wenson Hsieh <wenson_hsieh@apple.com>
1961 Implement a new edit command to change the enclosing list type
1962 https://bugs.webkit.org/show_bug.cgi?id=191487
1963 <rdar://problem/45955922>
1965 Reviewed by Ryosuke Niwa.
1967 Add support for a new edit command that changes the type of the enclosing list element around the selection from
1968 unordered to ordered list and vice versa. This new edit command is exposed only to internal WebKit2 clients, via
1969 SPI on WKWebView (`-_changeListType:`).
1971 This is currently intended for use in Mail compose, but may also be adopted by legacy Notes in the future. As
1972 such, the behavior of this editing command mostly matches shipping behavior in Mail compose (which is currently
1973 implemented entirely by Mail). See below for more details.
1975 Test: editing/execCommand/change-list-type.html
1976 WKWebViewEditActions.ChangeListType
1979 * WebCore.xcodeproj/project.pbxproj:
1980 * editing/ChangeListTypeCommand.cpp: Added.
1981 (WebCore::listConversionTypeForSelection):
1982 (WebCore::ChangeListTypeCommand::listConversionType):
1984 Helper that returns a potential list conversion command that may be executed at the given document's selection,
1985 if any exists. We also use existing logic from Mail here to determine which list to change, by walking up the
1986 DOM from the lowest common ancestor container of the current selection until we hit the first list element.
1988 (WebCore::ChangeListTypeCommand::createNewList):
1990 Helper method to create a new list element to replace the given list, and then clone element data from the given
1991 list to the new list. This addresses an existing bug in Mail, wherein changing list type for an enclosing list
1992 which contains inline style properties drops the inline styles, because existing logic in Mail that implements
1993 this editing command only copies the `class` attribute of the old list to the new list.
1995 (WebCore::ChangeListTypeCommand::doApply):
1997 Apply the edit command by running the following steps:
1998 - Find the enclosing list element, if any (see above).
1999 - Create a new list element of the opposite type as the enclosing list, and clone over element data from the
2000 list element being replaced.
2001 - Insert the new list next to the original list.
2002 - Move all children of the original list to the new list.
2003 - Remove the original list.
2004 - Set the selection to the end of the new list.
2006 * editing/ChangeListTypeCommand.h: Added.
2007 * editing/EditAction.h:
2009 Add a pair of new edit actions for conversion from unordered list to ordered list and vice versa.
2011 * editing/Editor.cpp:
2012 (WebCore::Editor::changeSelectionListType):
2014 Implement this by creating and applying a new ChangeListTypeCommand.
2016 (WebCore::Editor::canChangeSelectionListType): Deleted.
2018 Remove this for now, since there's no need for it until full support for edit command validation is implemented.
2021 * testing/Internals.cpp:
2022 (WebCore::Internals::changeSelectionListType):
2023 * testing/Internals.h:
2024 * testing/Internals.idl:
2026 Add internal hooks to change list type from layout tests.
2028 2018-11-11 Daniel Bates <dabates@apple.com>
2030 [iOS] Draw caps lock indicator in password fields
2031 https://bugs.webkit.org/show_bug.cgi?id=190565
2032 <rdar://problem/45262343>
2034 Reviewed by Dean Jackson.
2036 Draw the caps lock indicator in a focused password field on iOS. This makes the behavior of password
2037 fields on iOS more closely match the behavior of password fields on Mac.
2039 The majority of this patch is implementing PlatformKeyboardEvent::currentCapsLockState() for iOS.
2040 In Legacy WebKit, the implementation boils down to calling call -[::WebEvent modifierFlags]. In
2041 Modern WebKit the UIProcess is responsible for -[::WebEvent modifierFlags] and passing it the
2042 WebProcess to store such that invocations of PlatformKeyboardEvent::currentCapsLockState() consult
2043 the store in the WebProcess. A smaller part of this patch is having both the legacy and modern
2044 web views listen for keyboard availability changes so as to update the the caps lock state when
2045 a hardware keyboard is detached or attached.
2047 * WebCore.xcodeproj/project.pbxproj:
2048 * page/EventHandler.cpp:
2049 (WebCore::EventHandler::capsLockStateMayHaveChanged const): Extracted from EventHandler::internalKeyEvent()
2050 so that it can shared between WebCore, Modern WebKit, and Legacy WebKit code.
2051 (WebCore::EventHandler::internalKeyEvent): Modified to call capsLockStateMayHaveChanged().
2052 * page/EventHandler.h:
2053 * platform/cocoa/KeyEventCocoa.mm:
2054 (WebCore::PlatformKeyboardEvent::currentCapsLockState): Moved from KeyEventMac.mm.
2055 (WebCore::PlatformKeyboardEvent::getCurrentModifierState): Moved from KeyEventMac.mm.
2056 * platform/ios/KeyEventIOS.mm:
2057 (WebCore::PlatformKeyboardEvent::currentStateOfModifierKeys): Fetch the current modifier state.
2058 (WebCore::PlatformKeyboardEvent::currentCapsLockState): Deleted; we now use the Cocoa implementation.
2059 (WebCore::PlatformKeyboardEvent::getCurrentModifierState): Deleted; we now use the Cocoa implementation.
2060 * platform/ios/WebEvent.h:
2061 * platform/ios/WebEvent.mm:
2062 (+[WebEvent modifierFlags]): Added.
2063 * platform/mac/KeyEventMac.mm:
2064 (WebCore::PlatformKeyboardEvent::currentCapsLockState): Deleted; moved to KeyEventCocoa.mm to be shared
2065 by both Mac and iOS.
2066 (WebCore::PlatformKeyboardEvent::getCurrentModifierState): Deleted; moved to KeyEventCocoa.mm to be shared
2067 by both Mac and iOS.
2068 * rendering/RenderThemeCocoa.h:
2069 * rendering/RenderThemeCocoa.mm:
2070 (WebCore::RenderThemeCocoa::shouldHaveCapsLockIndicator const): Moved from RenderThemeMac.mm.
2071 * rendering/RenderThemeIOS.h:
2072 * rendering/RenderThemeIOS.mm:
2073 (WebCore::RenderThemeIOS::shouldHaveCapsLockIndicator const): Deleted.
2074 * rendering/RenderThemeMac.h:
2075 * rendering/RenderThemeMac.mm:
2076 (WebCore::RenderThemeMac::shouldHaveCapsLockIndicator const): Deleted; moved to RenderThemeCocoa.mm to be
2077 shared by both Mac and iOS.
2079 2018-11-11 Zalan Bujtas <zalan@apple.com>
2081 [LFC][BFC] In-flow positioned logic is really formatting context dependent.
2082 https://bugs.webkit.org/show_bug.cgi?id=191512
2084 Reviewed by Simon Fraser.
2086 Move block formatting context specific code from FormattingContext to BlockFormattingContext.
2088 * layout/FormattingContext.cpp:
2089 (WebCore::Layout::FormattingContext::placeInFlowPositionedChildren const): Deleted.
2090 * layout/FormattingContext.h:
2091 * layout/FormattingContextGeometry.cpp:
2092 (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset):
2093 * layout/blockformatting/BlockFormattingContext.cpp:
2094 (WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren const):
2095 (WebCore::Layout::BlockFormattingContext::computeInFlowPositionedPosition const): Deleted.
2096 * layout/blockformatting/BlockFormattingContext.h:
2097 * layout/blockformatting/BlockFormattingContextGeometry.cpp:
2098 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowPositionedPosition): Deleted.
2099 * layout/inlineformatting/InlineFormattingContext.cpp:
2100 (WebCore::Layout::InlineFormattingContext::computeInFlowPositionedPosition const): Deleted.
2101 * layout/inlineformatting/InlineFormattingContext.h:
2103 2018-11-11 Myles C. Maxfield <mmaxfield@apple.com>
2105 Address post-review comments after r237955
2106 https://bugs.webkit.org/show_bug.cgi?id=191496
2108 Reviewed by Darin Adler.
2110 * rendering/TextDecorationPainter.cpp:
2111 (WebCore::TextDecorationPainter::paintTextDecoration):
2112 * style/InlineTextBoxStyle.cpp:
2113 (WebCore::computeUnderlineOffset):
2114 * style/InlineTextBoxStyle.h:
2116 2018-11-11 Benjamin Poulain <benjamin@webkit.org>
2118 Fix a fixme: rename wtfObjcMsgSend to wtfObjCMsgSend
2119 https://bugs.webkit.org/show_bug.cgi?id=191492
2121 Reviewed by Alex Christensen.
2125 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2126 * page/mac/EventHandlerMac.mm:
2127 * platform/mac/URLMac.mm:
2128 * platform/mac/WebCoreNSURLExtras.mm:
2129 * platform/mac/WebCoreObjCExtras.mm:
2130 * rendering/RenderThemeMac.mm:
2132 2018-11-10 Benjamin Poulain <benjamin@webkit.org>
2134 Fix a fixme: rename wtfObjcMsgSend to wtfObjCMsgSend
2135 https://bugs.webkit.org/show_bug.cgi?id=191492
2137 Reviewed by Alex Christensen.
2139 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2140 * page/mac/EventHandlerMac.mm:
2141 * platform/mac/URLMac.mm:
2142 * platform/mac/WebCoreNSURLExtras.mm:
2143 * platform/mac/WebCoreObjCExtras.mm:
2144 * rendering/RenderThemeMac.mm:
2145 (WebCore::RenderThemeMac::systemColor const):
2147 2018-11-10 Megan Gardner <megan_gardner@apple.com>
2149 Fix build for 32bit Mac
2150 https://bugs.webkit.org/show_bug.cgi?id=191511
2152 Unreviewed Build Fix.
2154 Build fix, not tests needed.
2156 Make the apporiate delecrations for 32-bit mac support.
2158 * editing/mac/DictionaryLookup.mm:
2160 2018-11-10 Simon Fraser <simon.fraser@apple.com>
2162 Remove support for -webkit-svg-shadow
2163 https://bugs.webkit.org/show_bug.cgi?id=187429
2164 <rdar://problem/41920735>
2166 Reviewed by Dean Jackson.
2168 -webkit-svg-shadow was a non-standard hack for online iWork, and they no longer use it,
2169 so remove it. No other browser supports it, and chromestatus say it's used on less than
2172 * css/CSSComputedStyleDeclaration.cpp:
2173 (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
2174 * css/CSSProperties.json:
2175 * css/SVGCSSComputedStyleDeclaration.cpp:
2176 (WebCore::ComputedStyleExtractor::svgPropertyValue):
2177 * css/StyleBuilderCustom.h:
2178 (WebCore::StyleBuilderCustom::applyInitialWebkitSvgShadow): Deleted.
2179 (WebCore::StyleBuilderCustom::applyInheritWebkitSvgShadow): Deleted.
2180 (WebCore::StyleBuilderCustom::applyValueWebkitSvgShadow): Deleted.
2181 * css/parser/CSSPropertyParser.cpp:
2182 (WebCore::CSSPropertyParser::parseSingleValue):
2183 * rendering/RenderElement.cpp:
2184 (WebCore::RenderElement::didAttachChild):
2185 * rendering/svg/RenderSVGImage.cpp:
2186 (WebCore::RenderSVGImage::layout):
2187 * rendering/svg/RenderSVGImage.h:
2188 * rendering/svg/RenderSVGModelObject.cpp:
2189 (WebCore::RenderSVGModelObject::RenderSVGModelObject):
2190 * rendering/svg/RenderSVGModelObject.h:
2191 (WebCore::RenderSVGModelObject::repaintRectInLocalCoordinatesExcludingSVGShadow const): Deleted.
2192 (WebCore::RenderSVGModelObject::hasSVGShadow const): Deleted.
2193 (WebCore::RenderSVGModelObject::setHasSVGShadow): Deleted.
2194 * rendering/svg/RenderSVGRoot.cpp:
2195 (WebCore::RenderSVGRoot::RenderSVGRoot):
2196 (WebCore::RenderSVGRoot::updateCachedBoundaries):
2197 * rendering/svg/RenderSVGRoot.h:
2198 * rendering/svg/RenderSVGShape.cpp:
2199 (WebCore::RenderSVGShape::updateRepaintBoundingBox):
2200 * rendering/svg/RenderSVGShape.h:
2201 * rendering/svg/SVGRenderSupport.cpp:
2202 (WebCore::SVGRenderSupport::clippedOverflowRectForRepaint):
2203 (WebCore::SVGRenderSupport::layoutChildren):
2204 (WebCore::SVGRenderSupport::styleChanged):
2205 (WebCore::SVGRenderSupport::repaintRectForRendererInLocalCoordinatesExcludingSVGShadow): Deleted.
2206 (WebCore::SVGRenderSupport::rendererHasSVGShadow): Deleted.
2207 (WebCore::SVGRenderSupport::setRendererHasSVGShadow): Deleted.
2208 (WebCore::SVGRenderSupport::intersectRepaintRectWithShadows): Deleted.
2209 (WebCore::SVGRenderSupport::childAdded): Deleted.
2210 * rendering/svg/SVGRenderSupport.h:
2212 2018-11-10 Ryan Haddad <ryanhaddad@apple.com>
2214 Unreviewed, rolling out r238065.
2216 Breaks internal builds.
2220 "Make it possible to edit images inline"
2221 https://bugs.webkit.org/show_bug.cgi?id=191352
2222 https://trac.webkit.org/changeset/238065
2224 2018-11-10 Tim Horton <timothy_horton@apple.com>
2226 Make it possible to edit images inline
2227 https://bugs.webkit.org/show_bug.cgi?id=191352
2228 <rdar://problem/30107985>
2230 Reviewed by Dean Jackson.
2232 Tests: editing/images/basic-editable-image.html
2233 editing/images/reparent-editable-image-maintains-strokes.html
2235 Add the beginnings of a mechanism to replace images with a special attribute
2236 with a native drawing view in the UI process.
2238 * page/Settings.yaml:
2239 Add a setting to control whether images become natively editable when they
2240 have the x-apple-editable-image attribute.
2242 * html/HTMLImageElement.cpp:
2243 (WebCore::HTMLImageElement::editableImageViewID const):
2244 Lazily generate an EmbeddedViewID and persist it on the <img> element.
2246 * html/HTMLImageElement.h:
2247 Rearrange the service controls methods to sit before the members.
2248 Add m_editableImageViewID and editableImageViewID().
2250 * platform/graphics/GraphicsLayer.cpp:
2251 (WebCore::GraphicsLayer::nextEmbeddedViewID):
2252 * platform/graphics/GraphicsLayer.h:
2253 (WebCore::GraphicsLayer::setContentsToEmbeddedView):
2254 Add a new ContentsLayerPurpose, EmbeddedView, which is only supported
2255 on Cocoa platforms and when using RemoteLayerTree.
2256 Add ContentsLayerEmbeddedViewType, which currently only has the EditableImage type.
2257 Add setContentsToEmbeddedView, which takes a ContentsLayerEmbeddedViewType
2258 and an EmbeddedViewID to uniquely identify and communicate about the
2259 embedded view (which may move between layers, since it is tied to an element).
2261 * platform/graphics/ca/GraphicsLayerCA.cpp:
2262 (WebCore::GraphicsLayerCA::createPlatformCALayerForEmbeddedView):
2263 (WebCore::GraphicsLayerCA::setContentsToEmbeddedView):
2264 When setting GraphicsLayer's contents to an embedded view, we use
2265 a special PlatformCALayer factory that takes the EmbeddedViewID and type.
2266 GraphicsLayerCARemote will override this and make a correctly-initialized
2267 PlatformCALayerRemote that keeps track of the EmbeddedViewID.
2269 * platform/graphics/ca/GraphicsLayerCA.h:
2270 * platform/graphics/ca/PlatformCALayer.cpp:
2271 (WebCore::operator<<):
2272 * platform/graphics/ca/PlatformCALayer.h:
2273 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
2274 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
2275 (WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
2276 (WebCore::PlatformCALayerCocoa::embeddedViewID const):
2277 Add stubs and logging for EmbeddedViewID on PlatformCALayer.
2278 These will be overridden by PlatformCALayerRemote to do more interesting things.
2280 * rendering/RenderImage.cpp:
2281 (WebCore::RenderImage::isEditableImage const):
2282 Add a getter that return true if the setting is enabled and
2283 x-apple-editable-image is empty or true.
2285 (WebCore::RenderImage::requiresLayer const):
2286 RenderImage requires a layer either if RenderReplaced does, or we are an
2289 * rendering/RenderImage.h:
2290 * rendering/RenderLayer.cpp:
2291 (WebCore::RenderLayer::shouldBeNormalFlowOnly const):
2292 (WebCore::RenderLayer::calculateClipRects const):
2293 * rendering/RenderLayerBacking.cpp:
2294 (WebCore::RenderLayerBacking::updateConfiguration):
2295 Push the EmbeddedViewID and type down to GraphicsLayer for editable images.
2297 * rendering/RenderLayerCompositor.cpp:
2298 (WebCore::RenderLayerCompositor::requiresCompositingLayer const):
2299 (WebCore::RenderLayerCompositor::requiresOwnBackingStore const):
2300 (WebCore::RenderLayerCompositor::reasonsForCompositing const):
2301 (WebCore::RenderLayerCompositor::requiresCompositingForEditableImage const):
2302 * rendering/RenderLayerCompositor.h:
2303 Make editable images require compositing implicitly.
2305 2018-11-09 Zalan Bujtas <zalan@apple.com>
2307 [iOS] Issue initial paint soon after the visuallyNonEmpty milestone is fired.
2308 https://bugs.webkit.org/show_bug.cgi?id=191078
2309 <rdar://problem/45736178>
2311 Reviewed by Antti Koivisto.
2313 1. Improve visuallyNonEmpty milestone confidence level.
2314 Ignore whitespace and non visible text content.
2315 Parsing the main document should not necessarily fire the milestone. Check if there's any pending scripts/css/font loading.
2316 Check if the html/body is actually visible.
2318 2. Issue initial paint soon after the milestone fires.
2319 Use a 0ms timer to flush the initial paint.
2320 Throttle additional flushes for 500ms and 1.5s (original behaviour).
2322 3. Suspend optional style recalcs and layouts while painting is being throttled.
2323 When parsing yields we initiate a 0ms style recalc/layout timer.
2324 These optional layouts produce content that we have no intention to paint.
2327 (WebCore::Document::scheduleStyleRecalc):
2328 (WebCore::Document::shouldScheduleLayout):
2329 * page/ChromeClient.h:
2330 * page/FrameView.cpp:
2331 (WebCore::FrameView::resetLayoutMilestones):
2332 (WebCore::FrameView::qualifiesAsVisuallyNonEmpty const):
2333 (WebCore::FrameView::updateSignificantRenderedTextMilestoneIfNeeded):
2334 (WebCore::FrameView::updateIsVisuallyNonEmpty):
2336 (WebCore::FrameView::incrementVisuallyNonEmptyCharacterCount): Ignore whitespace characters. Some pages start with plenty of whitespace only content.
2337 * platform/graphics/FontCascade.h:
2338 * rendering/RenderText.cpp: Check whether the text is actually visible at this point.
2339 (WebCore::RenderText::RenderText):
2341 2018-11-09 John Wilander <wilander@apple.com>
2343 Add ability to configure document.cookie lifetime cap through user defaults
2344 https://bugs.webkit.org/show_bug.cgi?id=191480
2345 <rdar://problem/45240871>
2347 Reviewed by Chris Dumez.
2349 No new tests. Existing test makes sure we don't regress.
2351 This change makes the capped lifetime in seconds configurable through
2354 * platform/network/NetworkStorageSession.h:
2355 * platform/network/cf/NetworkStorageSessionCFNet.cpp:
2356 (WebCore::NetworkStorageSession::setAgeCapForClientSideCookies):
2357 (WebCore::NetworkStorageSession::setShouldCapLifetimeForClientSideCookies): Deleted.
2358 Renamed setAgeCapForClientSideCookies().
2359 * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
2360 (WebCore::filterCookies):
2361 (WebCore::NetworkStorageSession::setCookiesFromDOM const):
2363 2018-11-09 Ryan Haddad <ryanhaddad@apple.com>
2365 Unreviewed, rolling out r238047.
2367 Introduced layout test failures on iOS simulator.
2371 "[iOS] Draw caps lock indicator in password fields"
2372 https://bugs.webkit.org/show_bug.cgi?id=190565
2373 https://trac.webkit.org/changeset/238047
2375 2018-11-09 Tim Horton <timothy_horton@apple.com>
2377 Normal-flow-only flex items don't correctly respect z-index
2378 https://bugs.webkit.org/show_bug.cgi?id=191486
2380 Reviewed by Simon Fraser.
2382 Test: css3/flexbox/z-index-with-normal-flow-only.html
2384 * rendering/RenderLayer.cpp:
2385 (WebCore::canCreateStackingContext):
2386 r125693 did not ensure that flex items which would otherwise be
2387 normal-flow-only would be put into the z-order tree when necessary.
2388 Fix by respecting the same trigger we use to make layers for flex items;
2389 namely, not having auto z-index.
2391 2018-11-09 Wenson Hsieh <wenson_hsieh@apple.com>
2393 [Cocoa] Implement SPI on WKWebView to increase and decrease list levels
2394 https://bugs.webkit.org/show_bug.cgi?id=191471
2395 <rdar://problem/45952472>
2397 Reviewed by Tim Horton.
2399 Add new method stubs for changing the list type for the current selection (to be implemented in a future patch).
2401 * editing/Editor.cpp:
2402 (WebCore::Editor::canChangeSelectionListType):
2403 (WebCore::Editor::changeSelectionListType):
2406 2018-11-09 Keith Rollin <krollin@apple.com>
2408 Unreviewed build fix after https://bugs.webkit.org/show_bug.cgi?id=191324
2410 Remove the use of .xcfilelists until their side-effects are better
2413 * WebCore.xcodeproj/project.pbxproj:
2415 2018-11-09 Jer Noble <jer.noble@apple.com>
2417 SourceBuffer throws an error when appending a second init segment after changeType().
2418 https://bugs.webkit.org/show_bug.cgi?id=191474
2420 Reviewed by Eric Carlson.
2422 Test: media/media-source/media-source-changetype-second-init.html
2424 When encountering an initialization segment after changeType(), add the parsed codec types
2425 to the list of allowed codecs.
2427 * Modules/mediasource/SourceBuffer.cpp:
2428 (WebCore::SourceBuffer::validateInitializationSegment):
2429 * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
2430 (WebCore::MockMediaPlayerMediaSource::supportsType):
2431 * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
2432 (WebCore::MockSourceBufferPrivate::canSwitchToType):
2433 * platform/mock/mediasource/MockSourceBufferPrivate.h:
2435 2018-11-09 Eric Carlson <eric.carlson@apple.com>
2437 [MediaStream] AVVideoCaptureSource reports incorrect size when frames are scaled
2438 https://bugs.webkit.org/show_bug.cgi?id=191479
2439 <rdar://problem/45952201>
2441 Reviewed by Jer Noble.
2443 No new tests, tested manually.
2445 * platform/mediastream/RealtimeVideoSource.cpp:
2446 (WebCore::RealtimeVideoSource::standardVideoSizes): Drive-by fix: add a few more standard
2447 video frame sizes, correct a typo.
2448 (WebCore::RealtimeVideoSource::bestSupportedSizeAndFrameRate): Drive-by fix: don't consider
2449 rescaled sized when we already have an exact or aspect ratio match because it won't be used.
2451 * platform/mediastream/mac/AVVideoCaptureSource.h:
2452 (WebCore::AVVideoCaptureSource::width const): Deleted.
2453 (WebCore::AVVideoCaptureSource::height const): Deleted.
2454 * platform/mediastream/mac/AVVideoCaptureSource.mm:
2455 (WebCore::AVVideoCaptureSource::setSizeAndFrameRateWithPreset): Delete m_requestedSize.
2456 (WebCore::AVVideoCaptureSource::shutdownCaptureSession): Delete m_width and m_height.
2457 (WebCore::AVVideoCaptureSource::processNewFrame): Don't call setSize with captured size,
2458 the frame may be resized before deliver.
2460 2018-11-09 Ross Kirsling <ross.kirsling@sony.com>
2462 Unreviewed MSVC build fix after r238039 (and r238046).
2464 * bindings/js/JSWorkerGlobalScopeBase.cpp:
2465 * bindings/js/JSWorkerGlobalScopeBase.h:
2467 2018-11-09 Basuke Suzuki <basuke.suzuki@sony.com>
2469 [Curl][WebKit] Implement Proxy configuration API.
2470 https://bugs.webkit.org/show_bug.cgi?id=189053
2472 Reviewed by Youenn Fablet.
2474 Added API to set proxy from the app.
2476 No new tests because there's no behaviour change in WebCore.
2478 * platform/network/NetworkStorageSession.h:
2479 * platform/network/curl/CurlContext.h:
2480 (WebCore::CurlContext::setProxySettings):
2481 * platform/network/curl/CurlProxySettings.h:
2482 * platform/network/curl/NetworkStorageSessionCurl.cpp:
2483 (WebCore::NetworkStorageSession::setProxySettings const):
2485 2018-11-09 Antti Koivisto <antti@apple.com>
2487 Use OptionSet for layout milestones
2488 https://bugs.webkit.org/show_bug.cgi?id=191470
2490 Reviewed by Dean Jackson.
2492 * WebCore.xcodeproj/project.pbxproj:
2493 * loader/EmptyFrameLoaderClient.h:
2494 * loader/FrameLoader.cpp:
2495 (WebCore::FrameLoader::didReachLayoutMilestone):
2496 * loader/FrameLoader.h:
2497 * loader/FrameLoaderClient.h:
2498 * page/FrameView.cpp:
2499 (WebCore::FrameView::FrameView):
2500 (WebCore::FrameView::addPaintPendingMilestones):
2501 (WebCore::FrameView::fireLayoutRelatedMilestonesIfNeeded):
2502 (WebCore::FrameView::firePaintRelatedMilestonesIfNeeded):
2504 * page/LayoutMilestone.h: Copied from Source/WebCore/page/LayoutMilestones.h.
2506 Renamed to appease WK2 IPC code generation.
2508 * page/LayoutMilestones.h: Removed.
2510 (WebCore::Page::addLayoutMilestones):
2511 (WebCore::Page::removeLayoutMilestones):
2512 (WebCore::Page::isCountingRelevantRepaintedObjects const):
2514 (WebCore::Page::requestedLayoutMilestones const):
2516 2018-11-09 Daniel Bates <dabates@apple.com>
2518 [iOS] Draw caps lock indicator in password fields
2519 https://bugs.webkit.org/show_bug.cgi?id=190565
2520 <rdar://problem/45262343>
2522 Reviewed by Dean Jackson.
2524 Draw the caps lock indicator in a focused password field on iOS. This makes the behavior of password
2525 fields on iOS more closely match the behavior of password fields on Mac. For now, we only draw the
2526 indicator when caps locks is enabled via the hardware keyboard. We will look to support the software
2527 keyboard in a subsequent commit (see <https://bugs.webkit.org/show_bug.cgi?id=191475>).
2529 The majority of this patch is implementing PlatformKeyboardEvent::currentCapsLockState() for iOS.
2530 In Legacy WebKit, the implementation boils down to calling call -[::WebEvent modifierFlags]. In
2531 Modern WebKit the UIProcess is responsible for -[::WebEvent modifierFlags] and passing it the
2532 WebProcess to store such that invocations of PlatformKeyboardEvent::currentCapsLockState() consult
2533 the store in the WebProcess. A smaller part of this patch is having both the legacy and modern
2534 web views listen for keyboard availability changes so as to update the the caps lock state when
2535 a hardware keyboard is detached or attached.
2537 * WebCore.xcodeproj/project.pbxproj:
2538 * page/EventHandler.cpp:
2539 (WebCore::EventHandler::capsLockStateMayHaveChanged const): Extracted from EventHandler::internalKeyEvent()
2540 so that it can shared between WebCore, Modern WebKit, and Legacy WebKit code.
2541 (WebCore::EventHandler::internalKeyEvent): Modified to call capsLockStateMayHaveChanged().
2542 * page/EventHandler.h:
2543 * platform/cocoa/KeyEventCocoa.mm:
2544 (WebCore::PlatformKeyboardEvent::currentCapsLockState): Moved from KeyEventMac.mm.
2545 (WebCore::PlatformKeyboardEvent::getCurrentModifierState): Moved from KeyEventMac.mm.
2546 * platform/ios/KeyEventIOS.mm:
2547 (WebCore::PlatformKeyboardEvent::currentStateOfModifierKeys): Fetch the current modifier state.
2548 (WebCore::PlatformKeyboardEvent::currentCapsLockState): Deleted; we now use the Cocoa implementation.
2549 (WebCore::PlatformKeyboardEvent::getCurrentModifierState): Deleted; we now use the Cocoa implementation.
2550 * platform/ios/WebEvent.h:
2551 * platform/ios/WebEvent.mm:
2552 (+[WebEvent modifierFlags]): Added.
2553 * platform/mac/KeyEventMac.mm:
2554 (WebCore::PlatformKeyboardEvent::currentCapsLockState): Deleted; moved to KeyEventCocoa.mm to be shared
2555 by both Mac and iOS.
2556 (WebCore::PlatformKeyboardEvent::getCurrentModifierState): Deleted; moved to KeyEventCocoa.mm to be shared
2557 by both Mac and iOS.
2558 * rendering/RenderThemeCocoa.h:
2559 * rendering/RenderThemeCocoa.mm:
2560 (WebCore::RenderThemeCocoa::shouldHaveCapsLockIndicator const): Moved from RenderThemeMac.mm.
2561 * rendering/RenderThemeIOS.h:
2562 * rendering/RenderThemeIOS.mm:
2563 (WebCore::RenderThemeIOS::shouldHaveCapsLockIndicator const): Deleted.
2564 * rendering/RenderThemeMac.h:
2565 * rendering/RenderThemeMac.mm:
2566 (WebCore::RenderThemeMac::shouldHaveCapsLockIndicator const): Deleted; moved to RenderThemeCocoa.mm to be
2567 shared by both Mac and iOS.
2569 2018-11-09 Chris Dumez <cdumez@apple.com>
2571 Unreviewed attempt to fix WinCairo build after r238039.
2573 * bindings/js/JSWorkerGlobalScopeBase.h:
2575 2018-11-09 Fujii Hironori <Hironori.Fujii@sony.com>
2577 Extensions3DOpenGLES.h: warning: 'blitFramebuffer' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
2578 https://bugs.webkit.org/show_bug.cgi?id=191451
2580 Reviewed by Dean Jackson.
2582 No new tests because there is no behavior change.
2584 * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
2585 (WebCore::Extensions3DOpenGLES::setEXTContextLostCallback): Deleted unused method.
2586 * platform/graphics/opengl/Extensions3DOpenGLES.h: Marked 'override'.
2588 2018-11-09 Andy Estes <aestes@apple.com>
2590 [Payment Request] canMakePayment() should not consider serialized payment method data
2591 https://bugs.webkit.org/show_bug.cgi?id=191432
2593 Reviewed by Dean Jackson.
2595 In https://github.com/w3c/payment-request/pull/806, we're changing the specification of
2596 canMakePayment() to not consider serialized payment method data when deciding if a payment
2597 method is supported. For Apple Pay, this means we resolve to true for
2598 "https://apple.com/apple-pay", even if an ApplePayRequest is omitted or is missing required
2602 http/tests/paymentrequest/payment-request-canmakepayment-method.https.html and
2603 http/tests/paymentrequest/payment-request-show-method.https.html.
2605 * Modules/paymentrequest/PaymentRequest.cpp:
2606 (WebCore::PaymentRequest::canMakePayment):
2608 2018-11-09 Andy Estes <aestes@apple.com>
2610 [Payment Request] PaymentResponse.details should be updated when the user accepts a retried payment
2611 https://bugs.webkit.org/show_bug.cgi?id=191440
2613 Reviewed by Dean Jackson.
2615 PaymentResponse.details was being initialized in the PaymentResponse constructor and never
2616 updated when the user accepts a retried payment. We need to update it.
2618 Added a test case to http/tests/paymentrequest/payment-response-retry-method.https.html.
2620 * Modules/paymentrequest/PaymentRequest.cpp:
2621 (WebCore::PaymentRequest::accept):
2622 * Modules/paymentrequest/PaymentResponse.cpp:
2623 (WebCore::PaymentResponse::PaymentResponse):
2624 (WebCore::PaymentResponse::setDetailsFunction):
2625 * Modules/paymentrequest/PaymentResponse.h:
2627 2018-11-09 Fujii Hironori <Hironori.Fujii@sony.com>
2629 MediaPlayerPrivateMediaFoundation.h: warning: 'GetService' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
2630 https://bugs.webkit.org/show_bug.cgi?id=191453
2632 Reviewed by Per Arne Vollan.
2634 No new tests because there is no behavior change.
2636 * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h: Marked with 'override' and removed 'virtual'.
2638 2018-11-09 Chris Dumez <cdumez@apple.com>
2640 Unreviewed attempt to fix internal build on macOS.
2642 'Export' is defined in several headers.
2644 * bindings/js/JSDOMGlobalObject.cpp:
2645 * bindings/js/JSDOMGlobalObject.h:
2646 * bridge/jsc/BridgeJSC.cpp:
2647 * bridge/jsc/BridgeJSC.h:
2649 2018-11-09 Chris Dumez <cdumez@apple.com>
2651 HTML form validation bubble disappears
2652 https://bugs.webkit.org/show_bug.cgi?id=191418
2654 Reviewed by Simon Fraser.
2656 If we validate a form and find an invalid form control, we'll scroll it into view and show
2657 the validation bubble. However, scrolling the element into view may be an asynchronous
2658 operation, in which case it would discard the validation bubble prematurely because scrolling
2659 hides the validation bubble. To address the issue, we now show the validation message
2660 asynchronously after focusing the element (and potentially scrolling it into view).
2662 Test: fast/forms/scroll-into-view-and-show-validation-message.html
2664 * html/HTMLFormControlElement.cpp:
2665 (WebCore::HTMLFormControlElement::focusAndShowValidationMessage):
2667 2018-11-09 Brent Fulgham <bfulgham@apple.com>
2669 [Windows][DirectX] Be more rigors about BeginFigure/EndFigure and Close operations.
2670 https://bugs.webkit.org/show_bug.cgi?id=191452
2671 <rdar://problem/45933964>
2673 Reviewed by Zalan Bujtas.
2675 Do a better job of balancing the BeginFigure/EndFigure calls in
2676 the PathDirect2D implementation. Failure to do so puts the Geometry sink
2677 into an error state that prevents it from producing drawing output.
2680 * platform/graphics/Path.h:
2681 * platform/graphics/win/GraphicsContextDirect2D.cpp:
2682 (WebCore::GraphicsContext::drawPath): Flush is needed here.
2683 (WebCore::GraphicsContext::fillPath): Ditto.
2684 (WebCore::GraphicsContext::strokePath): Ditto.
2685 * platform/graphics/win/PathDirect2D.cpp:
2686 (WebCore::Path::drawDidComplete):
2687 (WebCore::Path::closeAnyOpenGeometries):
2688 (WebCore::Path::transform):
2689 (WebCore::Path::openFigureAtCurrentPointIfNecessary):
2690 (WebCore::Path::moveTo):
2691 (WebCore::Path::closeSubpath):
2693 2018-11-09 Jer Noble <jer.noble@apple.com>
2695 [Cocoa] Fix failing imported/w3c/web-platform-tests/media-source/mediasource-changetype-play.html test
2696 https://bugs.webkit.org/show_bug.cgi?id=191396
2698 Reviewed by Eric Carlson.
2700 When changeType() is called, exempt video and text tracks (in addition to just audio tracks)
2701 from "same codec" requirements.
2703 * Modules/mediasource/SourceBuffer.cpp:
2704 (WebCore::SourceBuffer::validateInitializationSegment):
2706 2018-11-09 Carlos Garcia Campos <cgarcia@igalia.com>
2708 REGRESSION(r236365): [GTK] Many form-related tests are failing
2709 https://bugs.webkit.org/show_bug.cgi?id=189993
2711 Reviewed by Michael Catanzaro.
2713 Only the first form data element is added to the message body due to a return added by mistake in r236365.
2715 * platform/network/soup/ResourceRequestSoup.cpp:
2716 (WebCore::ResourceRequest::updateSoupMessageBody const): Remove return.
2718 2018-11-09 Zalan Bujtas <zalan@apple.com>
2720 [LFC][IFC] Move some code from InlineFormattingContext::Line to InlineFormattingContext/Geometry
2721 https://bugs.webkit.org/show_bug.cgi?id=191445
2723 Reviewed by Antti Koivisto.
2725 The idea here is that Line should not have to deal with all the post processig tasks like the runs final aligments.
2726 (The line class would eventually turn into a collection of random things).
2728 * layout/inlineformatting/InlineFormattingContext.cpp:
2729 (WebCore::Layout::InlineFormattingContext::closeLine const):
2730 (WebCore::Layout::InlineFormattingContext::appendContentToLine const):
2731 (WebCore::Layout::InlineFormattingContext::layoutInlineContent const):
2732 * layout/inlineformatting/InlineFormattingContext.h:
2733 (WebCore::Layout::InlineFormattingContext::Line::contentLogicalLeft const):
2734 (WebCore::Layout::InlineFormattingContext::Line::lastRunType const):
2735 * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
2736 (WebCore::Layout::InlineFormattingContext::Geometry::adjustedLineLogicalLeft):
2737 (WebCore::Layout::InlineFormattingContext::Geometry::justifyRuns):
2738 (WebCore::Layout::InlineFormattingContext::Geometry::computeExpansionOpportunities):
2739 * layout/inlineformatting/Line.cpp:
2740 (WebCore::Layout::InlineFormattingContext::Line::Line):
2741 (WebCore::Layout::InlineFormattingContext::Line::init):
2742 (WebCore::Layout::InlineFormattingContext::Line::contentLogicalRight const):
2743 (WebCore::Layout::InlineFormattingContext::Line::appendContent):
2744 (WebCore::Layout::InlineFormattingContext::Line::close):
2745 (WebCore::Layout::adjustedLineLogicalLeft): Deleted.
2746 (WebCore::Layout::InlineFormattingContext::Line::contentLogicalRight): Deleted.
2747 (WebCore::Layout::InlineFormattingContext::Line::computeExpansionOpportunities): Deleted.
2748 (WebCore::Layout::InlineFormattingContext::Line::justifyRuns): Deleted.
2750 2018-11-09 Philippe Normand <pnormand@igalia.com>
2752 Unreviewed, GStreamer build warning fix
2754 * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:
2755 (WebCore::GStreamerVideoEncoder::newSampleCallback): Timesamp()
2756 returns a uint32_t, fix format string accordingly.
2758 2018-11-08 Said Abou-Hallawa <sabouhallawa@apple.com>
2760 Add an SPI to allow WebView clients to add additional supported image formats
2761 https://bugs.webkit.org/show_bug.cgi?id=190454
2763 Reviewed by Simon Fraser.
2765 Add an SPI to allow additional supported image formats in WebView. These
2766 additional formats can be set in the WKWebViewConfiguration as an NSArray
2767 of NStrings. Each string represents an image source type aka UTI.
2769 The ImageSourceType in the functions' names will be replaced by ImageType.
2770 ImageType in this context is the image UTI (Uniform Type Identifier).
2772 * platform/MIMETypeRegistry.cpp:
2773 (WebCore::MIMETypeRegistry::supportedImageMIMETypes):
2774 (WebCore::MIMETypeRegistry::additionalSupportedImageMIMETypes):
2775 (WebCore::supportedImageMIMETypesForEncoding):
2776 (WebCore::MIMETypeRegistry::isSupportedImageMIMEType):
2777 * platform/MIMETypeRegistry.h:
2778 * platform/graphics/cg/ImageDecoderCG.cpp:
2779 (WebCore::ImageDecoderCG::filenameExtension const):
2780 (WebCore::ImageDecoderCG::encodedDataStatus const):
2781 * platform/graphics/cg/ImageSourceCG.h:
2782 * platform/graphics/cg/ImageSourceCGMac.mm:
2783 (WebCore::MIMETypeForImageType):
2784 (WebCore::preferredExtensionForImageType):
2785 (WebCore::MIMETypeForImageSourceType): Deleted.
2786 (WebCore::preferredExtensionForImageSourceType): Deleted.
2787 * platform/graphics/cg/ImageSourceCGWin.cpp:
2788 (WebCore::MIMETypeForImageType):
2789 (WebCore::preferredExtensionForImageType):
2790 (WebCore::MIMETypeForImageSourceType): Deleted.
2791 (WebCore::preferredExtensionForImageSourceType): Deleted.
2792 * platform/graphics/cg/UTIRegistry.cpp:
2793 (WebCore::defaultSupportedImageTypes):
2794 (WebCore::additionalSupportedImageTypes):
2795 (WebCore::setAdditionalSupportedImageTypes):
2796 (WebCore::isSupportedImageType):
2797 (WebCore::supportedDefaultImageSourceTypes): Deleted.
2798 (WebCore::isSupportImageSourceType): Deleted.
2799 * platform/graphics/cg/UTIRegistry.h:
2801 2018-11-08 Megan Gardner <megan_gardner@apple.com>
2803 Adopt Reveal Framework to replace Lookup
2804 https://bugs.webkit.org/show_bug.cgi?id=191097
2806 Reviewed by Tim Horton.
2808 Reveal is not currently testable.
2810 The Reveal framework does the same job as Lookup and DataDectors.
2811 In this patch we switch from using Lookup to determine what text
2812 to select and define to using Reveal and RVItems. Since this
2813 code needs to work on older systems, and Reveal is newer, we also need
2814 to keep around the old code for old systems so that they can also
2815 continue to work. Eventually we will remove this code and also likly switch
2816 to passing RVItems across from the web process rather than making them
2820 * WebCore.xcodeproj/project.pbxproj:
2821 * editing/mac/DictionaryLookup.h:
2822 * editing/mac/DictionaryLookup.mm:
2824 Create a delegate to respond to Reveal and help draw the string or highlight.
2826 (-[WebRevealHighlight initWithHighlightRect:useDefaultHighlight:attributedString:]):
2827 (-[WebRevealHighlight setClearTextIndicator:]):
2828 (-[WebRevealHighlight revealContext:rectsForItem:]):
2829 (-[WebRevealHighlight revealContext:drawRectsForItem:]):
2830 (-[WebRevealHighlight revealContext:shouldUseDefaultHighlightForItem:]):
2831 (-[WebRevealHighlight revealContext:stopHighlightingItem:]):
2832 (WebCore::showPopupOrCreateAnimationController):
2834 Unify the code paths and utalize the Reveal framework to create and/or display the popovers.
2836 (WebCore::DictionaryLookup::showPopup):
2837 (WebCore::DictionaryLookup::animationControllerForPopup):
2839 Pipe the new callback through.
2841 (WebCore::tokenRange): Deleted.
2843 Only used with Lookup
2845 (WebCore::selectionContainsPosition): Deleted.
2847 Only used with Lookup.
2849 * editing/mac/DictionaryLookupLegacy.mm: Copied from Source/WebCore/editing/mac/DictionaryLookup.mm.
2851 Keep a copy of the previous implementation of DictionaryLookup, because Reveal not available on older
2854 (WebCore::tokenRange):
2855 (WebCore::selectionContainsPosition):
2856 (WebCore::expandSelectionByCharacters):
2857 (WebCore::showPopupOrCreateAnimationController):
2858 (WebCore::DictionaryLookup::showPopup):
2859 (WebCore::DictionaryLookup::hidePopup):
2860 (WebCore::DictionaryLookup::animationControllerForPopup):
2862 2018-11-08 Keith Rollin <krollin@apple.com>
2864 Create .xcfilelist files
2865 https://bugs.webkit.org/show_bug.cgi?id=191324
2866 <rdar://problem/45852819>
2868 Reviewed by Alex Christensen.
2870 As part of preparing for enabling XCBuild, create and use .xcfilelist
2871 files. These files are using during Run Script build phases in an
2872 Xcode project. If a Run Script build phase produces new files that are
2873 used later as inputs to subsequent build phases, XCBuild needs to know
2874 about these files. These files can be either specified in an "output
2875 files" section of the Run Script phase editor, or in .xcfilelist files
2876 that are associated with the Run Script build phase.
2878 This patch takes the second approach. It consists of three sets of changes:
2880 - Modify the DerivedSources.make files to have a
2881 'print_all_generated_files" target that produces a list of the files
2884 - Create a shell script that produces .xcfilelist files from the
2885 output of the previous step, as well as for the files created in the
2886 Generate Unified Sources build steps.
2888 - Add the new .xcfilelist files to the associated projects.
2890 Note that, with these changes, the Xcode workspace and projects can no
2891 longer be fully loaded into Xcode 9. Xcode will attempt to load the
2892 projects that have .xcfilelist files associated with them, but will
2893 fail and display a placeholder for those projects instead. It's
2894 expected that all developers are using Xcode 10 by now and that not
2895 being able to load into Xcode 9 is not a practical issue. Keep in mind
2896 that this is strictly an IDE issue, and that the projects can still be
2897 built with `xcodebuild`.
2899 Also note that the shell script that creates the .xcfilelist files can
2900 also be used to verify that the set of files that's currently checked
2901 in is up-to-date. This checking can be used as part of a check-in hook
2902 or part of check-webkit-style to sooner catch cases where the
2903 .xcfilelist files need to be regenerated.
2905 No new tests -- no changed functionality.
2907 * DerivedSources.make:
2908 * DerivedSources.xcfilelist: Added.
2909 * UnifiedSources.xcfilelist: Added.
2910 * WebCore.xcodeproj/project.pbxproj:
2912 2018-11-08 Don Olmstead <don.olmstead@sony.com>
2914 Provide generic implementation of SSLKeyGenerator functions
2915 https://bugs.webkit.org/show_bug.cgi?id=191428
2917 Reviewed by Michael Catanzaro.
2919 No new tests. No change in behavior.
2921 Both SSLKeyGeneratorGLib and SSLKeyGeneratorIOS were stub
2922 implementations. Since <keygen> is deprecated it looks unlikely that
2923 an implementation is actually needed, however an implementation is
2924 needed until support is reomved.
2928 * WebCore.xcodeproj/project.pbxproj:
2929 * platform/SSLKeyGenerator.cpp: Added.
2930 (WebCore::getSupportedKeySizes):
2931 (WebCore::signedPublicKeyAndChallengeString):
2932 * platform/SourcesGLib.txt:
2933 * platform/glib/SSLKeyGeneratorGLib.cpp: Removed.
2934 * platform/ios/SSLKeyGeneratorIOS.cpp: Removed.
2936 2018-11-07 Myles C. Maxfield <mmaxfield@apple.com>
2938 Unprefix text-decoration CSS3 properties
2939 https://bugs.webkit.org/show_bug.cgi?id=127193
2941 Reviewed by Dean Jackson.
2943 The properties are stable, and there is interop.
2945 Test: fast/css3-text/css3-text-decoration/unprefix.html
2947 * css/CSSComputedStyleDeclaration.cpp:
2948 (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
2949 * css/CSSProperties.json:
2950 * css/StyleResolver.cpp:
2951 (WebCore::shouldApplyPropertyInParseOrder):
2952 (WebCore::isValidVisitedLinkProperty):
2953 * css/parser/CSSParserFastPaths.cpp:
2954 (WebCore::isColorPropertyID):
2955 (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
2956 (WebCore::CSSParserFastPaths::isKeywordPropertyID):
2957 * css/parser/CSSPropertyParser.cpp:
2958 (WebCore::CSSPropertyParser::parseSingleValue):
2959 * editing/cocoa/DataDetection.mm:
2960 (WebCore::DataDetection::detectContentInRange):
2961 * rendering/TextDecorationPainter.cpp:
2962 (WebCore::decorationColor):
2963 * rendering/style/RenderStyle.cpp:
2964 (WebCore::RenderStyle::colorIncludingFallback const):
2965 (WebCore::RenderStyle::visitedDependentColor const):
2967 2018-11-08 Timothy Hatcher <timothy@apple.com>
2969 Add experimental support for a `supported-color-schemes` CSS property.
2970 https://bugs.webkit.org/show_bug.cgi?id=191319
2971 rdar://problem/45852261
2973 Reviewed by Dean Jackson.
2975 Tests: css-dark-mode/parse-supported-color-schemes.html
2976 css-dark-mode/supported-color-schemes-css.html
2978 * WebCore.xcodeproj/project.pbxproj:
2979 * css/CSSComputedStyleDeclaration.cpp:
2980 (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
2981 * css/CSSProperties.json:
2982 * css/CSSValueKeywords.in:
2983 * css/StyleBuilderConverter.h:
2984 (WebCore::StyleBuilderConverter::updateSupportedColorSchemes):
2985 (WebCore::StyleBuilderConverter::convertSupportedColorSchemes):
2986 * css/StyleResolver.cpp:
2987 (WebCore::StyleResolver::colorFromPrimitiveValue const):
2988 * css/parser/CSSPropertyParser.cpp:
2989 (WebCore::consumeSupportedColorSchemes):
2990 (WebCore::CSSPropertyParser::parseSingleValue):
2992 (WebCore::Document::resetLinkColor):
2993 (WebCore::Document::resetVisitedLinkColor):
2994 (WebCore::Document::resetActiveLinkColor):
2995 (WebCore::Document::processSupportedColorSchemes):
2996 (WebCore::Document::useDarkAppearance const):
2997 (WebCore::Document::styleColorOptions const):
2999 * editing/cocoa/WebContentReaderCocoa.mm:
3000 (WebCore::createFragment):
3001 * html/canvas/CanvasRenderingContext2D.cpp:
3002 (WebCore::CanvasRenderingContext2D::drawFocusIfNeededInternal):
3003 * inspector/InspectorOverlay.cpp:
3004 (WebCore::InspectorOverlay::paint):
3005 * page/FrameView.cpp:
3006 (WebCore::FrameView::useDarkAppearance const):
3007 (WebCore::FrameView::paintScrollCorner):
3008 * platform/mac/DragImageMac.mm:
3009 (WebCore::createDragImageForLink):
3010 * rendering/InlineFlowBox.cpp:
3011 (WebCore::InlineFlowBox::paintBoxDecorations):
3012 * rendering/InlineTextBox.cpp:
3013 (WebCore::InlineTextBox::paintPlatformDocumentMarker):
3014 * rendering/RenderBox.cpp:
3015 (WebCore::RenderBox::paintRootBoxFillLayers):
3016 (WebCore::RenderBox::paintBackground):
3017 * rendering/RenderElement.cpp:
3018 (WebCore::RenderElement::selectionColor const):
3019 (WebCore::RenderElement::selectionBackgroundColor const):
3020 (WebCore::RenderElement::paintFocusRing):
3021 * rendering/RenderImage.cpp:
3022 (WebCore::RenderImage::paintAreaElementFocusRing):
3023 * rendering/RenderLayerBacking.cpp:
3024 (WebCore::RenderLayerBacking::paintContents):
3025 * rendering/RenderLayerCompositor.cpp:
3026 (WebCore::RenderLayerCompositor::paintContents):
3027 * rendering/RenderListBox.cpp:
3028 (WebCore::RenderListBox::paintItemForeground):
3029 (WebCore::RenderListBox::paintItemBackground):
3030 * rendering/RenderObject.cpp:
3031 (WebCore::RenderObject::useDarkAppearance const):
3032 (WebCore::RenderObject::styleColorOptions const):
3033 * rendering/RenderObject.h:
3034 * rendering/RenderTableCell.cpp:
3035 (WebCore::RenderTableCell::paintBackgroundsBehindCell):
3036 * rendering/RenderTheme.cpp:
3037 (WebCore::RenderTheme::paint):
3038 * rendering/RenderTheme.h:
3039 (WebCore::RenderTheme::usingDarkAppearance const): Deleted.
3040 * rendering/RenderThemeMac.h:
3041 * rendering/RenderThemeMac.mm:
3042 (WebCore::RenderThemeMac::documentViewFor const):
3043 (WebCore::RenderThemeMac::adjustMenuListStyle const):
3044 (WebCore::RenderThemeMac::paintCellAndSetFocusedElementNeedsRepaintIfNecessary):
3045 (WebCore::RenderThemeMac::paintSliderThumb):
3046 (WebCore::RenderThemeMac::usingDarkAppearance const): Deleted.
3047 * rendering/style/RenderStyle.h:
3048 (WebCore::RenderStyle::supportedColorSchemes const):
3049 (WebCore::RenderStyle::setSupportedColorSchemes):
3050 (WebCore::RenderStyle::initialSupportedColorSchemes):
3051 * rendering/style/RenderStyleConstants.h:
3052 * rendering/style/StyleRareInheritedData.cpp:
3053 (WebCore::StyleRareInheritedData::StyleRareInheritedData):
3054 (WebCore::StyleRareInheritedData::operator== const):
3055 * rendering/style/StyleRareInheritedData.h:
3056 * rendering/style/StyleSupportedColorSchemes.h: Added.
3057 (WebCore::StyleSupportedColorSchemes::StyleSupportedColorSchemes):
3058 (WebCore::StyleSupportedColorSchemes::operator== const):
3059 (WebCore::StyleSupportedColorSchemes::operator!= const):
3060 (WebCore::StyleSupportedColorSchemes::isAuto const):
3061 (WebCore::StyleSupportedColorSchemes::isOnly const):
3062 (WebCore::StyleSupportedColorSchemes::colorSchemes const):
3063 (WebCore::StyleSupportedColorSchemes::add):
3064 (WebCore::StyleSupportedColorSchemes::contains const):
3065 (WebCore::StyleSupportedColorSchemes::setAllowsTransformations):
3066 (WebCore::StyleSupportedColorSchemes::allowsTransformations const):
3067 * svg/graphics/SVGImage.cpp:
3068 (WebCore::SVGImage::draw):
3070 2018-11-08 Joseph Pecoraro <pecoraro@apple.com>
3072 Web Inspector: Restrict domains at the target level instead of only at the window level
3073 https://bugs.webkit.org/show_bug.cgi?id=191344
3075 Reviewed by Devin Rousso.
3077 * inspector/WorkerInspectorController.cpp:
3078 (WebCore::WorkerInspectorController::WorkerInspectorController):
3079 Remove Inspector domain from workers. It was unused anyways.
3081 2018-11-08 Dean Jackson <dino@apple.com>
3083 Add a String literal that returns a String
3084 https://bugs.webkit.org/show_bug.cgi?id=191425
3085 <rdar://problem/45914556>
3087 Reviewed by Sam Weinig.
3089 Use _str where possible.
3093 * Modules/fetch/FetchRequest.cpp:
3094 (WebCore::computeReferrer):
3095 * Modules/indexeddb/IDBKeyPath.cpp:
3096 (WebCore::loggingString):
3097 * Modules/webdatabase/OriginLock.cpp:
3098 (WebCore::OriginLock::lockFileNameForPath):
3099 * css/CSSBasicShapes.cpp:
3100 (WebCore::updateCornerRadiusWidthAndHeight):
3101 * html/canvas/WebGL2RenderingContext.cpp:
3102 (WebCore::WebGL2RenderingContext::getParameter):
3103 * html/canvas/WebGLRenderingContext.cpp:
3104 (WebCore::WebGLRenderingContext::getParameter):
3105 * loader/LinkHeader.cpp:
3106 (WebCore::parseParameterValue):
3107 * loader/LinkLoader.cpp:
3108 (WebCore::LinkLoader::preloadIfNeeded):
3109 * page/NavigatorBase.cpp:
3110 (WebCore::NavigatorBase::platform):
3111 * platform/DateComponents.cpp:
3112 (WebCore::DateComponents::toString const):
3113 * platform/mac/PlatformEventFactoryMac.mm:
3114 (WebCore::keyIdentifierForKeyEvent):
3115 * rendering/RenderListMarker.cpp:
3116 (WebCore::RenderListMarker::suffix const):
3117 * rendering/RenderMenuList.cpp:
3118 (RenderMenuList::setText):
3119 * testing/InternalSettings.cpp:
3120 (WebCore::InternalSettings::userInterfaceDirectionPolicy):
3121 (WebCore::InternalSettings::systemLayoutDirection):
3122 * testing/Internals.cpp:
3123 (WebCore::Internals::shadowRootType const):
3124 (WebCore::Internals::getCurrentCursorInfo):
3126 2018-11-08 Jonathan Hammer <jonathan@e3software.com>
3128 Plain text drag in contenteditable is always DragOperationCopy, never DragOperationMove
3129 https://bugs.webkit.org/show_bug.cgi?id=191228
3130 <rdar://problem/45786830>
3132 Reviewed by Wenson Hsieh.
3134 DragController::beginDrag should not call cleanupAfterSystemDrag because
3135 the drag is still in progress even after the call to m_client.beginDrag()
3136 returns. This is in contrast to DragController::doSystemDrag, where the
3137 call to cleanupAfterSystemDrag is appropriate because the drag has
3138 concluded by the time m_client.startDrag() returns.
3140 Test: fast/events/drag-and-drop-move-not-copy.html
3142 * page/DragController.cpp:
3143 (WebCore::DragController::beginDrag):
3145 2018-11-08 Zalan Bujtas <zalan@apple.com>
3147 [BFC][IFC] InlineFormattingContext::Line::alignRuns() should take care of all the alignments.
3148 https://bugs.webkit.org/show_bug.cgi?id=191414
3150 Reviewed by Antti Koivisto.
3152 * layout/inlineformatting/Line.cpp:
3153 (WebCore::Layout::InlineFormattingContext::Line::close):
3155 2018-11-08 Jiewen Tan <jiewen_tan@apple.com>
3157 [WebAuthN] Import CTAP device request/response converters from Chromium
3158 https://bugs.webkit.org/show_bug.cgi?id=190784
3159 <rdar://problem/45460333>
3161 Reviewed by Brent Fulgham.
3163 This patch imports Chromium's CTAP device request/response converters:
3164 https://fidoalliance.org/specs/fido-v2.0-ps-20170927/fido-client-to-authenticator-protocol-v2.0-ps-20170927.html#message-encoding
3165 1. It directly imports the following files and suit them to WebKit's coding style:
3166 https://cs.chromium.org/chromium/src/device/fido/device_response_converter.cc?l=20&rcl=098dfd90850ffa84c27a884ab75edd2d99c4ec45
3167 https://cs.chromium.org/chromium/src/device/fido/device_response_converter.h?rcl=098dfd90850ffa84c27a884ab75edd2d99c4ec45
3168 https://cs.chromium.org/chromium/src/device/fido/authenticator_get_info_response.cc?rcl=098dfd90850ffa84c27a884ab75edd2d99c4ec45
3169 https://cs.chromium.org/chromium/src/device/fido/authenticator_get_info_response.h?rcl=098dfd90850ffa84c27a884ab75edd2d99c4ec45
3170 https://cs.chromium.org/chromium/src/device/fido/authenticator_supported_options.cc?rcl=098dfd90850ffa84c27a884ab75edd2d99c4ec45
3171 https://cs.chromium.org/chromium/src/device/fido/authenticator_supported_options.h?rcl=098dfd90850ffa84c27a884ab75edd2d99c4ec45
3172 https://cs.chromium.org/chromium/src/device/fido/ctap_request_unittest.cc?rcl=098dfd90850ffa84c27a884ab75edd2d99c4ec45
3173 https://cs.chromium.org/chromium/src/device/fido/ctap_response_unittest.cc?rcl=098dfd90850ffa84c27a884ab75edd2d99c4ec45
3174 https://cs.chromium.org/chromium/src/device/fido/fido_test_data.h?l=1&rcl=098dfd90850ffa84c27a884ab75edd2d99c4ec45
3175 2. It gathers the following methods into DeviceRequestConverter:
3176 CtapGetAssertionRequest::EncodeAsCBOR()
3177 CtapMakeCredentialRequest::EncodeAsCBOR()
3178 PublicKeyCredentialDescriptor::ConvertToCBOR()
3179 PublicKeyCredentialParams::ConvertToCBOR()
3180 PublicKeyCredentialRpEntity::ConvertToCBOR()
3181 PublicKeyCredentialUserEntity::ConvertToCBOR()
3182 3. It also apply a patch from Chromium to CBORValue:
3183 https://chromium.googlesource.com/chromium/src/+/7b6fbff35cd8e4d508f08e1cd93b4aa0a0dc402c%5E%21/
3185 Besides importing things from Chromium, it also implements UserVerificationRequirement for both
3186 PublicKeyCredentialCreationOptions and PublicKeyCredentialRequestOptions such that both options
3187 can specify more dimensions of a desired authenticator.
3189 Covered by API tests.
3192 * DerivedSources.make:
3193 * Modules/webauthn/PublicKeyCredentialCreationOptions.h:
3194 (WebCore::PublicKeyCredentialCreationOptions::AuthenticatorSelectionCriteria::encode const):
3195 (WebCore::PublicKeyCredentialCreationOptions::AuthenticatorSelectionCriteria::decode):
3196 * Modules/webauthn/PublicKeyCredentialCreationOptions.idl:
3197 * Modules/webauthn/PublicKeyCredentialRequestOptions.h:
3198 (WebCore::PublicKeyCredentialRequestOptions::encode const):
3199 (WebCore::PublicKeyCredentialRequestOptions::decode):
3200 * Modules/webauthn/PublicKeyCredentialRequestOptions.idl:
3201 * Modules/webauthn/UserVerificationRequirement.h: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredentialRequestOptions.idl.
3202 * Modules/webauthn/UserVerificationRequirement.idl: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredentialRequestOptions.idl.
3203 * Modules/webauthn/cbor/CBORValue.cpp:
3204 (cbor::CBORValue::CBORValue):
3205 (cbor::CBORValue::getBool const):
3206 * Modules/webauthn/cbor/CBORValue.h:
3207 * Modules/webauthn/fido/AuthenticatorGetInfoResponse.cpp: Added.
3208 (fido::toArrayValue):
3209 (fido::AuthenticatorGetInfoResponse::AuthenticatorGetInfoResponse):
3210 (fido::AuthenticatorGetInfoResponse::setMaxMsgSize):
3211 (fido::AuthenticatorGetInfoResponse::setPinProtocols):
3212 (fido::AuthenticatorGetInfoResponse::setExtensions):
3213 (fido::AuthenticatorGetInfoResponse::setOptions):
3214 (fido::encodeAsCBOR):
3215 * Modules/webauthn/fido/AuthenticatorGetInfoResponse.h: Added.
3216 * Modules/webauthn/fido/AuthenticatorSupportedOptions.cpp: Added.
3217 (fido::AuthenticatorSupportedOptions::setSupportsResidentKey):
3218 (fido::AuthenticatorSupportedOptions::setUserVerificationAvailability):
3219 (fido::AuthenticatorSupportedOptions::setUserPresenceRequired):
3220 (fido::AuthenticatorSupportedOptions::setClientPinAvailability):
3221 (fido::AuthenticatorSupportedOptions::setIsPlatformDevice):
3222 (fido::convertToCBOR):
3223 * Modules/webauthn/fido/AuthenticatorSupportedOptions.h: Added.
3224 * Modules/webauthn/fido/DeviceRequestConverter.cpp: Added.
3225 (fido::convertRpEntityToCBOR):
3226 (fido::convertUserEntityToCBOR):
3227 (fido::convertParametersToCBOR):
3228 (fido::convertDescriptorToCBOR):
3229 (fido::encodeMakeCredenitalRequestAsCBOR):
3230 (fido::encodeGetAssertionRequestAsCBOR):
3231 (fido::encodeEmptyAuthenticatorRequest):
3232 * Modules/webauthn/fido/DeviceRequestConverter.h: Copied from Source/WebCore/Modules/webauthn/fido/FidoConstants.h.
3233 * Modules/webauthn/fido/DeviceResponseConverter.cpp: Added.
3234 (fido::convertStringToProtocolVersion):
3235 (fido::getResponseCode):
3236 (fido::getCredentialId):
3237 (fido::readCTAPMakeCredentialResponse):
3238 (fido::readCTAPGetAssertionResponse):
3239 (fido::readCTAPGetInfoResponse):
3240 * Modules/webauthn/fido/DeviceResponseConverter.h: Copied from Source/WebCore/Modules/webauthn/fido/FidoConstants.cpp.
3241 * Modules/webauthn/fido/FidoConstants.cpp:
3242 (fido::isCtapDeviceResponseCode):
3243 (fido::publicKeyCredentialTypeToString):
3244 * Modules/webauthn/fido/FidoConstants.h:
3246 * WebCore.xcodeproj/project.pbxproj:
3248 2018-11-07 Justin Michaud <justin_michaud@apple.com>
3250 CSS Painting API should pass size, arguments and input properties to paint callback
3251 https://bugs.webkit.org/show_bug.cgi?id=191309
3253 Reviewed by Chris Dumez.
3255 Call paint() callback with input properties and arguments. This patch adds a stub for
3256 the CSS Typed OM StylePropertyMapReadOnly, and passes all the arguments as strings without
3257 any syntax checking to the paint callback.
3259 Test: fast/css-custom-paint/properties.html
3262 * DerivedSources.make:
3264 * WebCore.xcodeproj/project.pbxproj:
3265 * bindings/js/JSCSSStyleValueCustom.cpp: Copied from Source/WebCore/css/CSSPaintCallback.h.
3266 (WebCore::toJSNewlyCreated):
3268 * bindings/js/WebCoreBuiltinNames.h:
3269 * css/CSSPaintCallback.h:
3270 * css/CSSPaintCallback.idl:
3271 * css/CSSPaintImageValue.cpp:
3272 (WebCore::CSSPaintImageValue::image):
3273 * css/CSSPaintImageValue.h:
3274 * css/CSSPaintSize.h: Copied from Source/WebCore/css/CSSPaintCallback.h.
3275 (WebCore::CSSPaintSize::create):
3276 (WebCore::CSSPaintSize::width const):
3277 (WebCore::CSSPaintSize::height const):
3278 (WebCore::CSSPaintSize::CSSPaintSize):
3279 * css/CSSPaintSize.idl: Copied from Source/WebCore/css/CSSPaintCallback.idl.
3280 * css/parser/CSSPropertyParserHelpers.cpp:
3281 (WebCore::CSSPropertyParserHelpers::consumeCustomPaint):
3282 * css/typedom/CSSNumericValue.h: Copied from Source/WebCore/css/CSSPaintCallback.h.
3283 * css/typedom/CSSNumericValue.idl: Copied from Source/WebCore/css/CSSPaintCallback.idl.
3284 * css/typedom/CSSStyleValue.h: Copied from Source/WebCore/css/CSSPaintCallback.h.
3285 (WebCore::CSSStyleValue::isUnitValue):
3286 (WebCore::CSSStyleValue::isUnparsedValue):
3287 * css/typedom/CSSStyleValue.idl: Copied from Source/WebCore/css/CSSPaintCallback.idl.
3288 * css/typedom/CSSUnitValue.h: Copied from Source/WebCore/css/CSSPaintCallback.h.
3289 * css/typedom/CSSUnitValue.idl: Copied from Source/WebCore/css/CSSPaintCallback.idl.
3290 * css/typedom/CSSUnparsedValue.h: Copied from Source/WebCore/css/CSSPaintCallback.h.
3291 * css/typedom/CSSUnparsedValue.idl: Copied from Source/WebCore/css/CSSPaintCallback.idl.
3292 * css/typedom/StylePropertyMapReadOnly.h: Copied from Source/WebCore/css/CSSPaintCallback.h.
3293 (WebCore::StylePropertyMapReadOnly::create):
3294 (WebCore::StylePropertyMapReadOnly::get):
3295 (WebCore::StylePropertyMapReadOnly::StylePropertyMapReadOnly):
3296 * css/typedom/StylePropertyMapReadOnly.idl: Copied from Source/WebCore/css/CSSPaintCallback.idl.
3297 * platform/graphics/CustomPaintImage.cpp:
3298 (WebCore::CustomPaintImage::CustomPaintImage):
3299 (WebCore::CustomPaintImage::doCustomPaint):
3300 * platform/graphics/CustomPaintImage.h:
3302 2018-11-07 Brent Fulgham <bfulgham@apple.com>
3304 Provide better Font fallbacks for DirectX backend
3305 https://bugs.webkit.org/show_bug.cgi?id=191412
3306 <rdar://problem/45899207>
3308 Reviewed by Zalan Bujtas.
3310 Registration of custom fonts through GDI are not always visible
3311 through the DirectWrite/GDI bridging layer. If a font is not located,
3312 locate the closest matching avialable font rather than failing.
3314 * platform/graphics/FontPlatformData.h:
3315 * platform/graphics/win/FontCustomPlatformData.cpp:
3316 (WebCore::FontCustomPlatformData::fontPlatformData): Use new font
3318 * platform/graphics/win/FontPlatformDataDirect2D.cpp:
3319 (WebCore::FontPlatformData::platformDataInit):
3320 (WebCore::FontPlatformData::platformIsEqual const):
3321 (WebCore::FontPlatformData::createFallbackFont): Added.
3323 2018-11-07 Zalan Bujtas <zalan@apple.com>
3325 Click and touch event listeners on the body don't work
3326 https://bugs.webkit.org/show_bug.cgi?id=191392
3327 <rdar://problem/5844416>
3329 Reviewed by Simon Fraser.
3331 Remove the old quirk of ignoring onclick handlers on the body and beyond.
3333 Test: fast/events/click-handler-on-body-simple.html
3335 * page/ios/FrameIOS.mm:
3336 (WebCore::Frame::nodeRespondingToClickEvents):
3338 2018-11-07 Brent Fulgham <bfulgham@apple.com>
3340 [Windows][DirectX] Update canvas code to pass more tests
3341 https://bugs.webkit.org/show_bug.cgi?id=191337
3342 <rdar://problem/45878801>
3344 Reviewed by Dean Jackson.
3346 Update the Direct2D code paths to comply with our canvas tests, improving the
3347 the test results scores to 579/770.
3349 PathDirect2D was updated with an implementation of 'addArcTo' based on work by
3350 Dirk Schulze <vbs85@gmx.de> (see https://hg.mozilla.org/mozilla-central/rev/b116b49459f8).
3352 Tests: canvas/philip/tests
3354 * platform/graphics/ImageBuffer.cpp:
3355 (WebCore::ImageBuffer::createCompatibleBuffer): Direct2D needs access to the graphics
3356 context to create the buffer.
3357 * platform/graphics/ImageBuffer.h:
3358 * platform/graphics/Path.h:
3359 * platform/graphics/win/GraphicsContextDirect2D.cpp:
3360 (WebCore::GraphicsContext::drawPattern): Flush needed.
3361 (WebCore::GraphicsContext::drawRect): Ditto.
3362 (WebCore::GraphicsContextPlatformPrivate::setMiterLimit): Correct for Direct2D definition of miter limit.
3363 (WebCore::GraphicsContextPlatformPrivate::strokeStyleProperties const): Added helper function.
3364 (WebCore::GraphicsContextPlatformPrivate::recomputeStrokeStyle): Update for new helper.
3365 (WebCore::GraphicsContext::drawLine): Ditto.
3366 (WebCore::drawWithShadowHelper): Ditto.
3367 (WebCore::GraphicsContext::fillRect): Add flush.
3368 (WebCore::GraphicsContext::platformFillRoundedRect): Update for helper.
3369 (WebCore::GraphicsContext::clipPath): Add flush.
3370 (WebCore::GraphicsContext::strokeRect): Ditto.
3371 (WebCore::GraphicsContext::drawLineForText): Update for upstream changes.
3372 (WebCore::GraphicsContext::drawLinesForText): Ditto.
3373 * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h:
3374 * platform/graphics/win/ImageBufferDirect2D.cpp:
3375 (WebCore::createCroppedImageIfNecessary): Add missing implementations.
3376 (WebCore::createBitmapImageAfterScalingIfNeeded): Ditto.
3377 (WebCore::ImageBuffer::copyImage const): Ditto.
3378 (WebCore::ImageBuffer::sinkIntoImage): Ditto.
3379 (WebCore::ImageBuffer::fastCopyImageMode): Ditto.
3380 (WebCore::ImageBuffer::sinkIntoNativeImage): Ditto.
3381 (WebCore::ImageBuffer::copyNativeImage const): Ditto.
3382 * platform/graphics/win/PathDirect2D.cpp:
3383 (WebCore::Path::operator=):
3384 (WebCore::Path::drawDidComplete): This should never have been const.
3385 It manipulates the path!
3386 (WebCore::Path::transform): Properly transform existing geometries.
3387 (WebCore::Path::openFigureAtCurrentPointIfNecessary): Added.
3388 (WebCore::Path::moveTo):
3389 (WebCore::Path::addLineTo): Make sure figure starts at a valid point.
3390 (WebCore::Path::addQuadCurveTo): Ditto.
3391 (WebCore::Path::addBezierCurveTo): Ditto.
3392 (WebCore::Path::addArcTo): Add implementation.
3393 (WebCore::Path::closeSubpath):
3394 (WebCore::drawArcSection):
3395 (WebCore::Path::addArc): Update to build large arcs out of small arc segments. If the
3396 arc is effectively a complete circle, use the ellipse drawing routines.
3397 (WebCore::Path::addRect): Make sure we start at a valid starting point.
3398 (WebCore::Path::addEllipse): Correct for definition of D2D ellipse.
3399 (WebCore::Path::drawDidComplete const): Deleted.
3400 * platform/graphics/win/SimpleFontDataDirect2D.cpp:
3401 (WebCore::Font::platformWidthForGlyph const):
3402 * rendering/svg/RenderSVGResourceClipper.cpp:
3403 (WebCore::RenderSVGResourceClipper::applyClippingToContext):
3404 * rendering/svg/RenderSVGResourceFilter.cpp:
3405 (WebCore::RenderSVGResourceFilter::applyResource):
3406 * rendering/svg/RenderSVGResourceMasker.cpp:
3407 (WebCore::RenderSVGResourceMasker::applyResource):
3408 * rendering/svg/SVGRenderingContext.cpp:
3409 (WebCore::SVGRenderingContext::createImageBuffer):
3410 * rendering/svg/SVGRenderingContext.h:
3412 2018-11-07 Wenson Hsieh <wenson_hsieh@apple.com>
3414 Add an editing command for creating and inserting child lists
3415 https://bugs.webkit.org/show_bug.cgi?id=191335
3416 <rdar://problem/45814050>
3418 Reviewed by Ryosuke Niwa.
3420 Currently, insertOrderedList and insertUnorderedList only toggle or change list state (i.e. if the selection is
3421 in an ordered or unordered list, reinserting the same list type removes the current list, and inserting a
3422 different list type changes the enclosing list).
3424 However, for certain internal clients (e.g. Mail), if the start of the selection is enclosed by a list item, we
3425 instead create a new list item and insert it after the enclosing list item, and then create a new list within
3426 that list item. Currently, this logic is implemented in Mail for legacy-WebKit-based Mail compose. This patch
3427 brings this logic into WebKit in the form of a new editing command.
3429 Tests: editing/execCommand/insert-nested-lists-in-table.html
3430 editing/execCommand/insert-nested-lists-with-pre.html
3431 editing/execCommand/insert-nested-lists.html
3434 * WebCore.xcodeproj/project.pbxproj:
3435 * editing/Editor.cpp:
3436 (WebCore::Editor::insertOrderedList):
3437 (WebCore::Editor::insertUnorderedList):
3438 * editing/EditorCommand.cpp:
3439 (WebCore::executeInsertOrderedList):
3440 (WebCore::executeInsertUnorderedList):
3441 (WebCore::executeInsertNestedUnorderedList):
3442 (WebCore::executeInsertNestedOrderedList):
3443 (WebCore::createCommandMap):
3444 * editing/IndentOutdentCommand.cpp:
3445 (WebCore::IndentOutdentCommand::outdentParagraph):
3446 * editing/InsertListCommand.cpp:
3447 (WebCore::InsertListCommand::doApply):
3448 (WebCore::InsertListCommand::editingAction const):
3449 * editing/InsertListCommand.h:
3451 Change a couple of `enum`s into `enum class`es.
3453 * editing/InsertNestedListCommand.cpp: Added.
3454 (WebCore::InsertNestedListCommand::insertUnorderedList):
3455 (WebCore::InsertNestedListCommand::insertOrderedList):
3456 (WebCore::InsertNestedListCommand::doApply):
3457 * editing/InsertNestedListCommand.h: Added.
3459 Add a new edit command to insert a new list (as a child of any containing list). If the start of the selection
3460 is in a list item, we create a new list item, move the selection into the list item, and increment its list
3461 level; otherwise, simply fall back to inserting a list.
3463 * editing/ModifySelectionListLevel.cpp:
3464 (WebCore::IncreaseSelectionListLevelCommand::doApply):
3465 (WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevel):
3466 (WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevelOrdered):
3467 (WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevelUnordered):
3468 * editing/ModifySelectionListLevel.h:
3470 Expose this constructor, allowing other edit commands to change selection list level as a composite edit
3471 command. Also, change an `enum` into an `enum class`.
3473 (WebCore::IncreaseSelectionListLevelCommand::create):
3475 2018-11-07 Chris Dumez <cdumez@apple.com>
3477 ASSERT(renderer()) under HTMLTextAreaElement::updateValue()
3478 https://bugs.webkit.org/show_bug.cgi?id=191391
3479 <rdar://problem/34219633>
3481 Reviewed by Geoffrey Garen.
3483 Update HTMLTextFormControlElement::didEditInnerTextValue() to not call subtreeHasChanged()
3484 if the element has no renderer, similarly to what is already done in
3485 HTMLTextFormControlElement::setRangeText() and HTMLInputElement::setEditingValue().
3487 Test: editing/inserting/inset-html-textarea-without-renderer.html
3489 * html/HTMLTextFormControlElement.cpp:
3490 (WebCore::HTMLTextFormControlElement::didEditInnerTextValue):
3492 2018-11-07 Youenn Fablet <youenn@apple.com>
3494 Allow setting RTCRtpTransceiver.direction
3495 https://bugs.webkit.org/show_bug.cgi?id=191346
3497 Reviewed by Eric Carlson.
3499 Remove readonly from the direction attribute.
3500 Keep setDirection for now as it is in use, with an intent to remove it.
3501 Driven-by fix as in some cases, the rtc source track might be changed
3502 and current implementation is not expecting that.
3503 In such a case, stop observing the old track (which should no longer call us)
3504 before observing the new one.
3506 Covered by rebased tests.
3508 * Modules/mediastream/RTCRtpTransceiver.idl:
3509 * platform/mediastream/RealtimeIncomingAudioSource.cpp:
3510 (WebCore::RealtimeIncomingAudioSource::setSourceTrack):
3511 * platform/mediastream/RealtimeIncomingVideoSource.cpp:
3512 (WebCore::RealtimeIncomingVideoSource::setSourceTrack):
3514 2018-11-07 Sihui Liu <sihui_liu@apple.com>
3516 RELEASE_ASSERT(!m_hardClosedForUserDelete) fails in WebCore::IDBServer::UniqueIDBDatabase::invokeOperationAndTransactionTimer
3517 https://bugs.webkit.org/show_bug.cgi?id=191326
3518 <rdar://problem/45769269>
3520 Reviewed by Geoffrey Garen.
3522 UniqueIDBDatabase should ignore incoming requests or operations when it is already marked as
3523 hardClosedForUserDelete.
3525 Test: IndexedDB.IndexedDBUserDelete.
3527 * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3528 (WebCore::IDBServer::UniqueIDBDatabase::didPerformActivateTransactionInBackingStore):
3529 (WebCore::IDBServer::UniqueIDBDatabase::immediateCloseForUserDelete):
3530 * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
3531 (WebCore::IDBServer::UniqueIDBDatabaseConnection::establishTransaction):
3532 (WebCore::IDBServer::UniqueIDBDatabaseConnection::deleteTransaction):
3533 * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
3534 * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
3535 (WebCore::IDBServer::UniqueIDBDatabaseTransaction::commit):
3537 2018-11-07 Myles C. Maxfield <mmaxfield@apple.com>
3539 Positioned text underline can look like a strike-through
3540 https://bugs.webkit.org/show_bug.cgi?id=191341
3542 Reviewed by Simon Fraser.
3544 We should just clamp the value so it can't go above the baseline.
3546 We shouldn't do this at parse time because it's totally reasonable for text-underline-position: under to want
3547 a negative text-underline-offset. Instead, we just do it at used value time.
3549 Test: fast/css3-text/css3-text-decoration/text-underline-negative.html
3551 * style/InlineTextBoxStyle.cpp:
3552 (WebCore::computeUnderlineOffset):
3554 2018-11-07 Chris Dumez <cdumez@apple.com>
3556 Unreviewed, fix iOS build with recent SDKs.
3558 * platform/network/cocoa/ResourceResponseCocoa.mm:
3559 (WebCore::ResourceResponse::platformCertificateInfo const):
3561 2018-11-07 Chris Dumez <cdumez@apple.com>
3563 Unreviewed, fix iOS build with recent SDKs.
3565 * platform/network/cocoa/ResourceResponseCocoa.mm:
3566 (WebCore::ResourceResponse::platformCertificateInfo const):
3568 2018-11-07 Myles C. Maxfield <mmaxfield@apple.com>
3570 Dotted underlines that skip descenders are invisible
3571 https://bugs.webkit.org/show_bug.cgi?id=191403
3573 Reviewed by Simon Fraser.
3575 Turns out our underline bounding boxes had negative width. When drawing the full
3576 underline that was fine because it was handled by the 2D graphics engine, but when
3577 we try to split up the box into dots, our "for" loop was taking 0 iterations (because
3578 the end was before the start).
3580 Test: fast/css3-text/css3-text-decoration/text-underline-style.html
3582 * platform/graphics/cairo/GraphicsContextCairo.cpp:
3583 (WebCore::GraphicsContext::drawLineForText):
3584 * platform/graphics/cg/GraphicsContextCG.cpp:
3585 (WebCore::GraphicsContext::drawLineForText):
3586 * platform/graphics/win/GraphicsContextDirect2D.cpp:
3587 (WebCore::GraphicsContext::drawLineForText):
3589 2018-11-07 Andy Estes <aestes@apple.com>
3591 Crash in WebCore::PaymentRequest::canMakePayment when Apple Pay payment method data is missing
3592 https://bugs.webkit.org/show_bug.cgi?id=191331
3594 Reviewed by Alexey Proskuryakov.
3596 Apple Pay requires merchants specify an ApplePayRequest (which contains several required
3597 fields) as payment method data when constructing a new PaymentRequest. If the
3598 ApplePayRequest is missing required fields, or is missing entirely, canMakePayment() should
3601 We would properly resolve to false when an ApplePayRequest was specified with missing
3602 required fields, but we would crash when the ApplePayRequest was missing entirely.
3604 This patch fixes the crash by checking for an empty JSValue before trying to convert it to
3605 an ApplePayRequest struct. Because we stringify ApplePayRequests in the PaymentRequest
3606 constructor then parse them again in canMakePayments, an undefined or null payment method
3607 data stringifies to a null String, which then parses to an empty JSValue.
3609 Added test case to http/tests/paymentrequest/payment-request-canmakepayment-method.https.html.
3611 * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
3612 (WebCore::ApplePayPaymentHandler::convertData):
3613 * Modules/paymentrequest/PaymentRequest.cpp:
3614 (WebCore::PaymentRequest::canMakePayment):
3616 2018-11-07 Simon Fraser <simon.fraser@apple.com>
3618 Revert 237849: it breaks MotionMark
3619 https://bugs.webkit.org/show_bug.cgi?id=191398
3621 Reviewed by Simon Fraser.
3623 This change broke painting while the test is running.
3625 * rendering/RenderLayerCompositor.cpp:
3626 (WebCore::RenderLayerCompositor::updateScrollCoordinatedStatus):
3628 2018-11-07 Don Olmstead <don.olmstead@sony.com>
3630 Simplify macros in platform
3631 https://bugs.webkit.org/show_bug.cgi?id=191378
3633 Reviewed by Michael Catanzaro.
3635 No new tests. No change in behavior.
3637 Modifies a few cases where a platform macro could be simplified.
3639 * page/EventHandler.cpp:
3640 * platform/network/DNS.h:
3641 * platform/network/NetworkStateNotifier.h:
3643 2018-11-07 Simon Fraser <simon.fraser@apple.com>
3645 Some WK1 repaint tests are flakey
3646 https://bugs.webkit.org/show_bug.cgi?id=190627
3648 Reviewed by Zalan Bujtas.
3650 Repaint tracking in GraphicsLayerCA was sensitive to whether there were already dirty
3651 rects on the layer, since tracking happened after checks against existing dirty rects.
3652 This caused some WK1 repaint tests to be flakey, since there's no guarantee that
3653 no repaints happen between the last layer flush and a test calling startTrackingRepaints().
3655 Fix by moving the repaint tracking to before the checks against existing dirty rects.
3656 This is more similar to how repaint tracking on FrameView works.
3658 * platform/graphics/ca/GraphicsLayerCA.cpp:
3659 (WebCore::GraphicsLayerCA::setNeedsDisplayInRect):
3661 2018-11-07 Dean Jackson <dino@apple.com>
3663 [iOS] WebGL leaks exact GPU type
3664 https://bugs.webkit.org/show_bug.cgi?id=191393
3666 Reviewed by Tim Horton.
3668 The fully exposed renderer info shouldn't be necessary
3669 on iOS, where the GPUs and drivers are consistent
3670 enough that people shouldn't need to write code specifically
3671 for them. Reduce the ability to fingerprint by simply
3672 returning "Apple GPU".
3674 The other option would have been to disable the extension,
3675 but I think it might still be useful to know you're on
3678 Test: fast/canvas/webgl/hide-some-renderer-info.html
3680 * html/canvas/WebGL2RenderingContext.cpp: Return "Apple GPU"
3682 (WebCore::WebGL2RenderingContext::getParameter):
3683 * html/canvas/WebGLRenderingContext.cpp: Ditto.
3684 (WebCore::WebGLRenderingContext::getParameter):
3686 2018-11-07 Daniel Bates <dabates@apple.com>
3688 Override +[UIKeyboard isInHardwareKeyboardMode] in WebKitTestRunner and DumpRenderTree
3689 https://bugs.webkit.org/show_bug.cgi?id=190141
3691 Reviewed by Darin Adler.
3693 Remove the runtime application check for WebKitTestRunner as we no longer need this
3694 now that WebKitTestRunner and DumpRenderTree override +[UIKeyboard isInHardwareKeyboardMode].
3696 * platform/RuntimeApplicationChecks.h:
3697 * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
3698 (WebCore::IOSApplication::isWebKitTestRunner): Deleted.
3700 2018-11-07 Joseph Pecoraro <pecoraro@apple.com>
3702 Web Inspector: Fix "Javascript" => "JavaScript" enum in protocol generated objects
3703 https://bugs.webkit.org/show_bug.cgi?id=191340
3705 Reviewed by Devin Rousso.
3707 * inspector/agents/InspectorMemoryAgent.cpp:
3708 (WebCore::InspectorMemoryAgent::collectSample):
3711 2018-11-07 Dan Bernstein <mitz@apple.com>
3713 Add a pseudoclass that matches img elements that are backed by an attachment
3714 https://bugs.webkit.org/show_bug.cgi?id=191286
3715 <rdar://problem/45823554>
3717 Reviewed by Dean Jackson.
3719 Test: fast/css/has-attachment.html
3721 Added a :has-attachment pseudoclass, enabled only when the attachment element is enabled at
3722 runtime, that matches elements (currently only img elements qualify) that have an attachment
3723 element in their shadow DOM.
3725 * css/CSSSelector.cpp:
3726 (WebCore::CSSSelector::selectorText const): Handle the new PseudoClassHasAttachment value.
3727 * css/CSSSelector.h: Added a new value to the PseudoClassType enum.
3729 * css/SelectorChecker.cpp:
3730 (WebCore::SelectorChecker::checkOne const): Check the new PseudoClassHasAttachment value
3731 using the new hasAttachment test function.
3733 * css/SelectorCheckerTestFunctions.h:
3734 (WebCore::hasAttachment): Added. Tests if the element is an img element that has an
3737 * css/SelectorPseudoClassAndCompatibilityElementMap.in: Added has-attachment.
3739 * css/parser/CSSParserContext.cpp:
3740 (WebCore::CSSParserContext::CSSParserContext): Initialize new attachmentEnabled member based
3741 on RuntimeEnabledFeatures.
3742 (WebCore::operator==): Compare new attachmentEnabled member.
3743 * css/parser/CSSParserContext.h:
3744 (WebCore::CSSParserContextHash::hash): Include new attachmentEnabled member.
3746 * css/parser/CSSSelectorParser.cpp:
3747 (WebCore::CSSSelectorParser::consumePseudo): Reject :has-attachment if the attachment
3748 element is not enabled.
3750 * cssjit/SelectorCompiler.cpp:
3751 (WebCore::SelectorCompiler::addPseudoClassType): Handle PseudoClassHasAttachment.
3753 2018-11-07 Don Olmstead <don.olmstead@sony.com>
3755 Make generic MainThreadSharedTimer implementation
3756 https://bugs.webkit.org/show_bug.cgi?id=191327
3758 Reviewed by Michael Catanzaro.
3760 No new tests. No change in behavior.
3762 Moves generic implementation for MainThreadSharedTimerGlib.cpp into
3763 MainThreadSharedTimer.cpp.
3765 * platform/MainThreadSharedTimer.cpp:
3766 (WebCore::MainThreadSharedTimer::MainThreadSharedTimer):
3767 (WebCore::MainThreadSharedTimer::setFireInterval):
3768 (WebCore::MainThreadSharedTimer::stop):
3769 (WebCore::MainThreadSharedTimer::invalidate):
3770 * platform/MainThreadSharedTimer.h:
3771 * platform/SourcesGLib.txt:
3772 * platform/glib/MainThreadSharedTimerGLib.cpp: Removed.
3774 2018-11-07 Ali Juma <ajuma@chromium.org>
3776 IntersectionObserverEntry doesn't keep JS wrappers of rects alive
3777 https://bugs.webkit.org/show_bug.cgi?id=191330
3779 Reviewed by Chris Dumez.
3781 Retain wrappers of each rect in an IntersectionObserverEntry as long as the entry's wrapper
3782 is alive, by adding these wrappers as opaque roots.
3784 Test: intersection-observer/intersection-observer-entry-keeps-js-wrappers-of-rects-alive.html
3786 * bindings/js/JSIntersectionObserverEntryCustom.cpp:
3787 (WebCore::JSIntersectionObserverEntry::visitAdditionalChildren):
3788 * dom/DOMRectReadOnly.idl:
3789 * page/IntersectionObserverEntry.h:
3790 (WebCore::IntersectionObserverEntry::rootBounds const): Make this return a raw pointer instead of a RefPtr so that it
3791 can be called in JSIntersectionObserverEntry::visitAdditionalChildren, which can be called from non-main threads.
3792 (WebCore::IntersectionObserverEntry::boundingClientRect const): Ditto.
3793 (WebCore::IntersectionObserverEntry::intersectionRect const): Ditto.
3795 2018-11-07 Simon Fraser <simon.fraser@apple.com>
3797 TileController::tileSize() should not have side effects
3798 https://bugs.webkit.org/show_bug.cgi?id=191349
3800 Reviewed by Zalan Bujtas.
3802 Calling TileController::tileSize() would recompute a new tile size and set m_tileSizeLocked,
3803 which caused test failures if logging was enabled when running tests.
3805 * platform/graphics/ca/TileController.cpp:
3806 (WebCore::TileController::tileSize const):
3807 (WebCore::TileController::computeTileSize):
3808 * platform/graphics/ca/TileController.h:
3809 * platform/graphics/ca/TileGrid.cpp:
3810 (WebCore::TileGrid::revalidateTiles):
3812 2018-11-07 Charlie Turner <cturner@igalia.com>
3814 [EME][GStreamer] Ensure key id buffers are present and simplify lifetime management of ClearKey class.
3815 https://bugs.webkit.org/show_bug.cgi?id=191157
3817 Reviewed by Xabier Rodriguez-Calvar.
3819 This is in preparation for moving the clearkey decryptor behind a
3820 new decrypt API in CDMInstance, which will be sent into the
3821 pipeline to handle key management and decryption. This is for a
3824 Covered by existing clear key tests in media/encrypted-media.
3826 * platform/graphics/gstreamer/GStreamerCommon.h:
3827 (WebCore::GstMappedBuffer::data const): Add a const data accessor,
3828 since we are now providing operator=='s on const objects of this
3829 class that need const access to the data pointer.
3830 (WebCore::GstMappedBuffer::operator==): Add a swap of the new
3831 equality operator so you don't have to remember to have the
3832 GstBuffer on the RHS of the equality all the time.
3833 (WebCore::operator==): Define an equality operator between Gst
3834 buffers and WebCore's mapped buffers. Gst creates a ref and a
3835 separate read view under the covers in the memcmp call, so we do
3836 not need to map the buffer ourselves.
3837 * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
3838 (webkit_media_clear_key_decrypt_class_init): Remove setup/release
3840 (webkit_media_clear_key_decrypt_init): Initialize gcrypt cipher
3841 here once instead of for every buffer to be decrypted.
3842 (webKitMediaClearKeyDecryptorFinalize): And destroy the cipher
3843 context when the decryptor is destroyed.
3844 (webKitMediaClearKeyDecryptorFindAndSetKey): Factor out the key
3845 retrieval and context setting in this method, call it for each
3847 (webKitMediaClearKeyDecryptorDecrypt): Base key id buffer into
3848 this function, and remove cipher creation / destroy methods.
3849 * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
3850 (webkit_media_common_encryption_decrypt_class_init): Remove
3851 setup/release bindings.
3852 (webkitMediaCommonEncryptionDecryptTransformInPlace): Ensure a key
3853 id is present and pass it to the decrypt class method.
3854 (webKitMediaCommonEncryptionDecryptDefaultSetupCipher): Deleted.
3855 (webKitMediaCommonEncryptionDecryptDefaultReleaseCipher): Deleted.
3856 * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h:
3858 2018-11-07 Frederic Wang <fwang@igalia.com>
3860 [Cairo] Move state change operations from GraphicsContextCairo to CairoOperations
3861 https://bugs.webkit.org/show_bug.cgi?id=179610
3863 Unreviewed build fix.
3865 * platform/graphics/cairo/GraphicsContextCairo.cpp: Add missing include.
3867 2018-11-06 Joseph Pecoraro <pecoraro@apple.com>
3869 ServiceWorker Inspector: Uncaught Exception: null is not an object (evaluating 'resource.target.addResource')
3870 https://bugs.webkit.org/show_bug.cgi?id=191339
3872 Reviewed by Matt Baker.
3874 * workers/service/ServiceWorkerJob.cpp:
3875 (WebCore::ServiceWorkerJob::fetchScriptWithContext):
3876 Use the Service Worker's identifier, not this static but otherwise unknown identifier.
3878 2018-11-06 Youenn Fablet <youenn@apple.com>
3880 sender.replaceTrack() fails with InvalidStateError if the transceiver.direction is "inactive"
3881 https://bugs.webkit.org/show_bug.cgi?id=191202
3883 Reviewed by Eric Carlson.
3885 Covered by updated test.
3887 * Modules/mediastream/RTCPeerConnection.cpp:
3888 (WebCore::RTCPeerConnection::removeTrack):
3889 Update as per spec, in particular make sure to not stop the sender when removing the track.
3891 2018-11-06 Justin Fan <justin_fan@apple.com>
3893 [WebGPU] Experimental prototype for WebGPURenderPipeline and WebGPUSwapChain
3894 https://bugs.webkit.org/show_bug.cgi?id=191291
3896 Reviewed by Myles Maxfield.
3898 Test: webgpu/render-pipelines.html
3899 Also update test webgpu/webgpu-basics.html to create a WebGPURenderPipeline.
3901 Begin implementation of WebGPURenderPipeline and WebGPUSwapChain. A WebGPURenderPipeline is backed by a
3902 GPURenderPipeline, created lazily using the properties of the passed-in WebGPURenderPipelineDescriptor.
3903 On Metal-supported systems, GPURenderPipeline is an interface to a MTLRenderPipelineState.
3904 The MTLRenderPipelineState is created with the WebGPUDevice currently configured on the WebGPURenderingContext.
3907 * Configurations/FeatureDefines.xcconfig:
3908 * DerivedSources.make:
3909 * Modules/webgpu/GPUDevice.cpp:
3910 (WebCore::GPUDevice::createRenderPipeline const):
3911 * Modules/webgpu/GPUDevice.h:
3912 * Modules/webgpu/GPUPipelineDescriptorBase.h:
3913 * Modules/webgpu/GPUPipelineStageDescriptor.h:
3914 * Modules/webgpu/GPURenderPipelineDescriptor.h:
3915 (WebCore::GPURenderPipelineDescriptor::GPURenderPipelineDescriptor):
3916 (WebCore::GPURenderPipelineDescriptor::primitiveTopology):
3917 * Modules/webgpu/WebGPUDevice.cpp:
3918 (WebCore::WebGPUDevice::createRenderPipeline const):
3919 * Modules/webgpu/WebGPUDevice.h:
3920 (WebCore::WebGPUDevice::adapter const):
3921 (WebCore::WebGPUDevice::device const):
3922 * Modules/webgpu/WebGPUDevice.idl:
3923 * Modules/webgpu/WebGPUPipelineDescriptorBase.h:
3924 * Modules/webgpu/WebGPUPipelineDescriptorBase.idl:
3925 * Modules/webgpu/WebGPUPipelineStageDescriptor.h:
3926 * Modules/webgpu/WebGPUPipelineStageDescriptor.idl:
3927 * Modules/webgpu/WebGPURenderPipeline.cpp:
3928 (WebCore::WebGPURenderPipeline::create):
3929 (WebCore::WebGPURenderPipeline::WebGPURenderPipeline):
3930 * Modules/webgpu/WebGPURenderPipeline.h:
3931 * Modules/webgpu/WebGPURenderPipeline.idl:
3932 * Modules/webgpu/WebGPURenderPipelineDescriptor.h:
3933 * Modules/webgpu/WebGPURenderPipelineDescriptor.idl:
3934 * Modules/webgpu/WebGPURenderingContext.cpp:
3935 (WebCore::WebGPURenderingContext::create):
3936 (WebCore::WebGPURenderingContext::WebGPURenderingContext):
3937 * Modules/webgpu/WebGPURenderingContext.h:
3938 * Modules/webgpu/WebGPUShaderModule.h:
3939 (WebCore::WebGPUShaderModule::module const):
3940 * Modules/webgpu/WebGPUShaderStage.h:
3941 * Modules/webgpu/WebGPUShaderStage.idl:
3942 * Modules/webgpu/WebGPUSwapChain.cpp:
3943 (WebCore::WebGPUSwapChain::configure):
3944 (WebCore::WebGPUSwapChain::reshape):
3945 (WebCore::WebGPUSwapChain::markLayerComposited):
3946 * Modules/webgpu/WebGPUSwapChain.h:
3947 (WebCore::WebGPUSwapChain::WebGPUSwapChain):
3948 * Modules/webgpu/WebGPUSwapChain.idl:
3949 * Modules/webgpu/cocoa/GPURenderPipeline.h:
3950 (WebCore::GPURenderPipeline::platformRenderPipeline const):
3951 * Modules/webgpu/cocoa/GPURenderPipelineMetal.mm: Added.
3952 (WebCore::setFunctionsForPipelineDescriptor):
3953 (WebCore::GPURenderPipeline::create):
3954 (WebCore::GPURenderPipeline::GPURenderPipeline):
3955 * Modules/webgpu/cocoa/GPUSwapChain.h:
3956 (WebCore::GPUSwapChain::platformLayer const):
3957 * Modules/webgpu/cocoa/GPUSwapChainMetal.mm:
3958 (WebCore::GPUSwapChain::create):
3959 (WebCore::GPUSwapChain::GPUSwapChain):
3960 (WebCore::GPUSwapChain::setDevice):
3961 (WebCore::GPUSwapChain::reshape):
3962 (WebCore::GPUSwapChain::present):
3965 * WebCore.xcodeproj/project.pbxproj:
3966 * bindings/js/WebCoreBuiltinNames.h:
3968 2018-11-06 Youenn Fablet <youenn@apple.com>
3970 Add support for sender/receiver getCapabilities