1 2018-11-14 Devin Rousso <drousso@apple.com>
3 Web Inspector: Canvas: send a call stack with each action instead of an array of call frames
4 https://bugs.webkit.org/show_bug.cgi?id=191628
6 Reviewed by Dean Jackson.
8 Updated existing test: inspector/model/recording.html
10 * inspector/InspectorCanvas.h:
11 * inspector/InspectorCanvas.cpp:
12 (WebCore::InspectorCanvas::indexForData):
13 (WebCore::InspectorCanvas::buildInitialState):
14 (WebCore::InspectorCanvas::buildAction):
15 Drive-by: prevent de-duplicated objects from being destroyed while recording.
17 2018-11-14 Stephan Szabo <stephan.szabo@sony.com>
19 [Win] Compile Service Worker support
20 https://bugs.webkit.org/show_bug.cgi?id=191409
22 Reviewed by Youenn Fablet.
24 Fix compilation errors when ENABLE(SERVICE_WORKER)
25 on Windows with clang-cl. Clang on dllexport
26 platforms does not support specifying the
27 dllexport on both a class and members of the class
28 and unistd.h isn't provided but also appeared to
31 No new tests, should be covered by existing tests.
33 * workers/service/ServiceWorkerProvider.h:
34 * workers/service/context/SWContextManager.cpp:
36 2018-11-14 Joseph Pecoraro <pecoraro@apple.com>
38 Web Inspector: Keep Web Inspector window alive across process swaps (PSON) (Remote Inspector)
39 https://bugs.webkit.org/show_bug.cgi?id=191494
40 <rdar://problem/45469854>
42 Reviewed by Devin Rousso.
44 * inspector/InspectorClient.h:
45 (WebCore::InspectorClient::allowRemoteInspectionToPageDirectly const):
46 Provide a hook so that a client may wish to allow direct remote inspection of the Page.
47 This is used by WebKitLegacy only.
51 Only enable the PageDebuggable if the client wishes remote inspection of the Page directly.
52 This is used by WebKitLegacy only.
54 * inspector/InspectorController.cpp:
55 (WebCore::InspectorController::connectFrontend):
56 * inspector/InspectorController.h:
57 * page/PageDebuggable.cpp:
58 (WebCore::PageDebuggable::connect):
59 (WebCore::PageDebuggable::disconnect):
60 * page/PageDebuggable.h:
61 When a frontend connects, always enable the developer extras for the Page.
62 This is pretty much only for the remote path, which allows inspection if developer
63 extras were not already enabled (iOS). This simplifies the logic, and toggling
64 developer extras after it was already enabled is not really important.
66 2018-11-14 Per Arne Vollan <pvollan@apple.com>
68 REGRESSION (WEBPROCESS_WINDOWSERVER_BLOCKING): requestAnimationFrame Stops Completing
69 https://bugs.webkit.org/show_bug.cgi?id=190884
71 Reviewed by Dean Jackson.
73 Only notify display refresh monitors with matching display ID.
75 Test: fast/animation/request-animation-frame-in-two-pages.html
77 * platform/graphics/DisplayRefreshMonitorManager.cpp:
78 (WebCore::DisplayRefreshMonitorManager::displayWasUpdated):
79 * platform/graphics/DisplayRefreshMonitorManager.h:
81 2018-11-14 Youenn Fablet <youenn@apple.com>
83 Convert libwebrtc error types to DOM exceptions
84 https://bugs.webkit.org/show_bug.cgi?id=191590
86 Reviewed by Alex Christensen.
88 Make use of overloaded callback method that provides an error type.
89 This type is then used to create a DOM exception with the correct type.
90 Covered by existing tests.
92 * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
93 (WebCore::LibWebRTCMediaEndpoint::doSetRemoteDescription):
94 (WebCore::LibWebRTCMediaEndpoint::createSessionDescriptionFailed):
95 (WebCore::LibWebRTCMediaEndpoint::setLocalSessionDescriptionFailed):
96 (WebCore::LibWebRTCMediaEndpoint::setRemoteSessionDescriptionFailed):
97 * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
98 * Modules/mediastream/libwebrtc/LibWebRTCObservers.h:
99 (WebCore::toExceptionCode):
101 2018-11-14 Youenn Fablet <youenn@apple.com>
103 Allow to remove MediaStreamPrivate observers when iterating over observers
104 https://bugs.webkit.org/show_bug.cgi?id=187256
106 Reviewed by Eric Carlson.
108 Migrate the observer list from a Vector to a HashSet.
109 This is more robust to multiple observing and keeping of order of observers is not required.
110 Copy the set of observers to a vector before iterating over it.
111 This allows to remove an observer while iterating, which is now used in UserMediaRequest.
113 Covered by existing tests.
115 * Modules/mediastream/UserMediaRequest.cpp:
116 (WebCore::UserMediaRequest::mediaStreamIsReady):
117 * platform/mediastream/MediaStreamPrivate.cpp:
118 (WebCore::MediaStreamPrivate::addObserver):
119 (WebCore::MediaStreamPrivate::removeObserver):
120 (WebCore::MediaStreamPrivate::forEachObserver const):
121 (WebCore::MediaStreamPrivate::updateActiveState):
122 (WebCore::MediaStreamPrivate::addTrack):
123 (WebCore::MediaStreamPrivate::removeTrack):
124 (WebCore::MediaStreamPrivate::characteristicsChanged):
125 * platform/mediastream/MediaStreamPrivate.h:
127 2018-11-14 Youenn Fablet <youenn@apple.com>
129 Calling removeTrack on different RTCPeerConnection should throw InvalidAccessError
130 https://bugs.webkit.org/show_bug.cgi?id=191603
132 Reviewed by Chris Dumez.
134 Make sure to check that the sender peer connection backend is matching.
135 Covered by rebased WPT test.
137 * Modules/mediastream/RTCPeerConnection.cpp:
138 (WebCore::RTCPeerConnection::removeTrack):
139 * Modules/mediastream/RTCRtpSender.cpp:
140 (WebCore::RTCRtpSender::isCreatedBy const):
141 * Modules/mediastream/RTCRtpSender.h:
143 2018-11-14 Fujii Hironori <Hironori.Fujii@sony.com>
145 [curl] Unify CookieJarCurlDatabase and the abstract class CookieJarCurl
146 https://bugs.webkit.org/show_bug.cgi?id=191620
148 Reviewed by Alex Christensen.
150 Remove a abstract class CookieJarCurl which is not needed anymore.
151 And, rename CookieJarCurlDatabase to CookieJarCurl.
153 No new tests because there's no behaviour change in WebCore.
155 * platform/Curl.cmake: Replaced CookieJarCurlDatabase.cpp with CookieJarCurl.cpp.
156 * platform/network/curl/CookieJarCurl.cpp: Renamed from Source/WebCore/platform/network/curl/CookieJarCurlDatabase.cpp.
157 * platform/network/curl/CookieJarCurl.h: Merged CookieJarCurl.h and CookieJarCurlDatabase.h.
158 * platform/network/curl/CookieJarCurlDatabase.h: Removed.
159 * platform/network/curl/NetworkStorageSessionCurl.cpp:
160 (WebCore::NetworkStorageSession::NetworkStorageSession): Replaced CookieJarCurlDatabase with CookieJarCurl.
162 2018-11-14 Christopher Reid <chris.reid@sony.com>
164 [WPE] Remove glib usage in PlatformKeyboardEventWPE.cpp
165 https://bugs.webkit.org/show_bug.cgi?id=191606
167 Reviewed by Michael Catanzaro.
171 Use StringBuilder::append(UChar32) as a generic way to convert a uint32_t code point to WTFString.
173 * platform/wpe/PlatformKeyboardEventWPE.cpp:
174 (WebCore::PlatformKeyboardEvent::keyValueForWPEKeyCode):
175 (WebCore::PlatformKeyboardEvent::singleCharacterString):
177 2018-11-13 Zalan Bujtas <zalan@apple.com>
179 [LFC][IFC] Construct dedicated runs when the inline element requires it (part 2)
180 https://bugs.webkit.org/show_bug.cgi?id=191623
182 Reviewed by Antti Koivisto.
184 This patch expands the breaking behaviour to support separate start/end breaks.
186 <span>parent </span><span style="padding: 10px;">start<span> middle </span>end</span><span> parent</span>
188 input to line breaking -> <parent start middle end parent>
189 output of line breaking (considering infinite constraint) -> <parent start middle end parent>
190 due to padding, final runs -> <parent><start middle end><parent>
193 "start" -> BreakAtStart
199 <span>parent </span><span style="padding-right: 10px;">start<span> middle </span>end</span><span> parent</span>
201 line breaking -> <parent start middle end parent>
202 due to padding-right, final runs -> <parent start middle end><parent>
210 * layout/inlineformatting/InlineFormattingContext.cpp:
211 (WebCore::Layout::InlineFormattingContext::splitInlineRunIfNeeded const):
212 (WebCore::Layout::InlineFormattingContext::collectInlineContent const): Move to a recursive algorithm (which is fine, inline contents don't tend to be too deep)
213 (WebCore::Layout::InlineFormattingContext::contentRequiresSeparateRun const): Deleted.
214 * layout/inlineformatting/InlineFormattingContext.h:
215 * layout/inlineformatting/InlineFormattingState.cpp:
216 (WebCore::Layout::InlineFormattingState::detachingRules const):
217 * layout/inlineformatting/InlineFormattingState.h:
218 (WebCore::Layout::InlineFormattingState::lastInlineItem const):
219 (WebCore::Layout::InlineFormattingState::addDetachingRule):
221 2018-11-14 Youenn Fablet <youenn@apple.com>
223 Add support for RTCRtpCodecParameters.sdpFmtpLine
224 https://bugs.webkit.org/show_bug.cgi?id=191591
226 Reviewed by Eric Carlson.
228 Covered by rebased test.
230 * Modules/mediastream/RTCRtpCodecParameters.h:
231 * Modules/mediastream/RTCRtpCodecParameters.idl:
232 * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
233 (WebCore::toRTCCodecParameters):
235 2018-11-14 Youenn Fablet <youenn@apple.com>
237 Add support for transport and peerConnection stats
238 https://bugs.webkit.org/show_bug.cgi?id=191592
240 Reviewed by Alex Christensen.
242 Covered by rebased tests.
244 * Modules/mediastream/RTCStatsReport.h:
245 (WebCore::RTCStatsReport::TransportStats::TransportStats):
246 (WebCore::RTCStatsReport::PeerConnectionStats::PeerConnectionStats):
247 * Modules/mediastream/RTCStatsReport.idl:
248 * Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp:
249 (WebCore::fillRTCTransportStats):
250 (WebCore::fillRTCPeerConnectionStats):
251 (WebCore::LibWebRTCStatsCollector::OnStatsDelivered):
253 2018-11-14 Ali Juma <ajuma@chromium.org>
255 Transform of composited layer not updated when layer also needs repaint
256 https://bugs.webkit.org/show_bug.cgi?id=191598
258 Reviewed by Simon Fraser.
260 Trigger a compositing geometry update whenever a RenderLayer's transform changes,
261 even when other parts of its style have changed in a way that produces a
262 StyleDifference greater than RecompositeLayer.
264 Test: compositing/geometry/transform-and-repaint-updates-geometry.html
266 * rendering/RenderLayerCompositor.cpp:
267 (WebCore::RenderLayerCompositor::layerStyleChanged):
269 2018-11-13 Jiewen Tan <jiewen_tan@apple.com>
271 [WebAuthN] Support CTAP HID authenticators on macOS
272 https://bugs.webkit.org/show_bug.cgi?id=188623
273 <rdar://problem/43353777>
275 Reviewed by Brent Fulgham and Chris Dumez.
277 This patch removes AuthenticatorCoordinatorClient::~AuthenticatorCoordinatorClient to ignore
278 any incompleted CompletionHandlers as calling them in destructors could cause unexpected cyclic
279 dependency. Also, it adds a hack to temporarily deal with nullable userhandle.
281 Tests: http/wpt/webauthn/ctap-hid-failure.https.html
282 http/wpt/webauthn/ctap-hid-success.https.html
283 http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https.html
284 http/wpt/webauthn/public-key-credential-create-failure-hid.https.html
285 http/wpt/webauthn/public-key-credential-create-success-hid.https.html
286 http/wpt/webauthn/public-key-credential-get-failure-hid-silent.https.html
287 http/wpt/webauthn/public-key-credential-get-failure-hid.https.html
288 http/wpt/webauthn/public-key-credential-get-success-hid.https.html
290 * Modules/webauthn/AuthenticatorCoordinatorClient.cpp:
291 (WebCore::AuthenticatorCoordinatorClient::~AuthenticatorCoordinatorClient): Deleted.
292 * Modules/webauthn/AuthenticatorCoordinatorClient.h:
293 * Modules/webauthn/PublicKeyCredentialCreationOptions.h:
294 * Modules/webauthn/fido/DeviceResponseConverter.cpp:
295 (fido::readCTAPGetAssertionResponse):
296 * Modules/webauthn/fido/FidoConstants.h:
298 2018-11-13 Ross Kirsling <ross.kirsling@sony.com>
300 [WebRTC] Provide default implementation of LibWebRTCProvider
301 https://bugs.webkit.org/show_bug.cgi?id=191611
303 Reviewed by Michael Catanzaro.
305 Refactor LibWebRTCProvider such that platform-specific implementations need not worry about specifying defaults.
308 * platform/GStreamer.cmake:
309 * platform/SourcesGLib.txt:
310 * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
311 * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:
312 * platform/mediastream/libwebrtc/LibWebRTCProviderGStreamer.cpp: Renamed from Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProviderGlib.cpp.
313 * platform/mediastream/libwebrtc/LibWebRTCProviderGStreamer.h: Renamed from Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProviderGlib.h.
314 * platform/mediastream/libwebrtc/LibWebRTCProviderWin.cpp: Removed.
316 2018-11-13 Timothy Hatcher <timothy@apple.com>
318 Use a light scrollbar for transparent web views in dark mode.
319 https://bugs.webkit.org/show_bug.cgi?id=191559
320 rdar://problem/46000489
322 Reviewed by Dean Jackson.
324 Test: css-dark-mode/supported-color-schemes-scrollbar.html
326 * css/CSSProperties.json: Marked supported-color-schemes as a custom Value.
327 * css/StyleBuilderCustom.h:
328 (WebCore::StyleBuilderCustom::applyValueSupportedColorSchemes):
329 * editing/cocoa/WebContentReaderCocoa.mm: Use FrameView's useDarkAppearance().
330 (WebCore::createFragment):
331 * inspector/InspectorOverlay.cpp:
332 (WebCore::InspectorOverlay::paint): Use FrameView's useDarkAppearance().
333 * page/FrameView.cpp:
334 (WebCore::FrameView::recalculateScrollbarOverlayStyle): Use a light scrollbar for
335 transparent web views in dark mode.
336 (WebCore::FrameView::rendererForSupportedColorSchemes const): Added.
337 Return the body for document element renderer.
338 (WebCore::FrameView::useDarkAppearance const): Use rendererForSupportedColorSchemes.
339 (WebCore::FrameView::styleColorOptions const): Added. Ditto.
341 * rendering/style/RenderStyle.cpp:
342 (WebCore::rareInheritedDataChangeRequiresRepaint): Drive-by fix. Added supportedColorSchemes.
343 * rendering/style/RenderStyle.h:
344 (WebCore::RenderStyle::setHasExplicitlySetSupportedColorSchemes): Added.
345 (WebCore::RenderStyle::hasExplicitlySetSupportedColorSchemes const): Added.
346 (WebCore::RenderStyle::NonInheritedFlags::operator== const): Added supportedColorSchemes.
347 * svg/graphics/SVGImage.cpp:
348 (WebCore::SVGImage::draw): Use FrameView's useDarkAppearance().
349 * testing/Internals.cpp:
350 (WebCore::Internals::setViewIsTransparent): Added.
351 (WebCore::Internals::scrollbarOverlayStyle const): Added.
352 * testing/Internals.h:
353 * testing/Internals.idl: Added setViewIsTransparent and scrollbarOverlayStyle.
355 2018-11-13 Ross Kirsling <ross.kirsling@sony.com>
357 [AppleWin] Unreviewed build fix after r238108.
359 * platform/graphics/ca/win/PlatformCALayerWin.cpp:
361 (PlatformCALayerWin::embeddedViewID const):
362 * platform/graphics/ca/win/PlatformCALayerWin.h:
364 2018-11-13 Youenn Fablet <youenn@apple.com>
366 RTCPeerConnection.getTransceivers is not always exposing all transceivers
367 https://bugs.webkit.org/show_bug.cgi?id=191589
369 Reviewed by Eric Carlson.
371 Implement the collect transceiver algorithm using libwebrtc backend.
372 Call this algorithm everytime transceivers are retrieved from JS.
373 For Plan B, make this a no-op as this is not supported.
374 Introduce senders/receivers/transceivers getters where we just look at already created transceivers.
376 Covered by existing and rebased tests.
378 * Modules/mediastream/PeerConnectionBackend.h:
379 (WebCore::PeerConnectionBackend::collectTransceivers):
380 * Modules/mediastream/RTCPeerConnection.cpp:
381 (WebCore::RTCPeerConnection::getSenders const):
382 (WebCore::RTCPeerConnection::getReceivers const):
383 (WebCore::RTCPeerConnection::getTransceivers const):
384 * Modules/mediastream/RTCPeerConnection.h:
385 * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
386 (WebCore::LibWebRTCMediaEndpoint::collectTransceivers):
387 * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
388 * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
389 (WebCore::LibWebRTCPeerConnectionBackend::addTrack):
390 (WebCore::LibWebRTCPeerConnectionBackend::existingTransceiver):
391 (WebCore::LibWebRTCPeerConnectionBackend::collectTransceivers):
392 (WebCore::LibWebRTCPeerConnectionBackend::applyRotationForOutgoingVideoSources):
393 (WebCore::LibWebRTCPeerConnectionBackend::shouldOfferAllowToReceive const):
394 * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
396 2018-11-13 Wenson Hsieh <wenson_hsieh@apple.com>
398 [iOS] Do not show selection UI for editable elements with opacity near zero
399 https://bugs.webkit.org/show_bug.cgi?id=191442
400 <rdar://problem/45958625>
402 Reviewed by Simon Fraser.
404 Tests: editing/selection/ios/do-not-zoom-to-focused-hidden-contenteditable.html
405 editing/selection/ios/hide-selection-after-hiding-contenteditable.html
406 editing/selection/ios/hide-selection-in-contenteditable-nested-transparency.html
407 editing/selection/ios/hide-selection-in-hidden-contenteditable-frame.html
408 editing/selection/ios/hide-selection-in-hidden-contenteditable.html
410 * rendering/RenderObject.cpp:
411 (WebCore::RenderObject::isTransparentRespectingParentFrames const):
413 Add a helper function to determine whether a RenderObject is contained within a transparent layer, taking parent
414 frames into account. A layer is considered transparent if its opacity is less than a small threshold (i.e. 0.01).
415 Opacity on ancestor elements is applied multiplicatively.
417 * rendering/RenderObject.h:
419 2018-11-13 Eric Carlson <eric.carlson@apple.com>
421 [MediaStream] Observer AVCaptureDevice "suspended" property
422 https://bugs.webkit.org/show_bug.cgi?id=191587
423 <rdar://problem/46030598>
425 Reviewed by Youenn Fablet.
427 No new tests, AVCapture can only be tested manually.
429 * platform/mediastream/mac/AVCaptureDeviceManager.h:
430 * platform/mediastream/mac/AVCaptureDeviceManager.mm:
431 (WebCore::AVCaptureDeviceManager::captureDevicesInternal): Don't notify of devices "changes"
432 the first time the device list is scanned.
433 (WebCore::deviceIsAvailable): Don't check for "isInUseByAnotherApplication", it doesn't
434 change device availability.
435 (WebCore::AVCaptureDeviceManager::beginObservingDevices): New, observe "suspended" on all
436 devices and add them to the cached list.
437 (WebCore::AVCaptureDeviceManager::stopObservingDevices): New, opposite of above.
438 (WebCore::AVCaptureDeviceManager::refreshCaptureDevices): Watch for changes in the list of
440 (WebCore::AVCaptureDeviceManager::~AVCaptureDeviceManager): Stop observing all cached devices.
441 (WebCore::AVCaptureDeviceManager::registerForDeviceNotifications):
442 (-[WebCoreAVCaptureDeviceManagerObserver disconnect]):
443 (-[WebCoreAVCaptureDeviceManagerObserver deviceConnectedDidChange:]):
444 (-[WebCoreAVCaptureDeviceManagerObserver observeValueForKeyPath:ofObject:change:context:]):
445 (WebCore::AVCaptureDeviceManager::refreshAVCaptureDevicesOfType): Deleted.
446 (WebCore::AVCaptureDeviceManager::deviceConnected): Deleted.
447 (WebCore::AVCaptureDeviceManager::deviceDisconnected): Deleted.
448 (-[WebCoreAVCaptureDeviceManagerObserver deviceDisconnected:]): Deleted.
449 (-[WebCoreAVCaptureDeviceManagerObserver deviceConnected:]): Deleted.
451 * platform/mediastream/mac/AVVideoCaptureSource.h:
452 * platform/mediastream/mac/AVVideoCaptureSource.mm:
453 (WebCore::AVVideoCaptureSource::~AVVideoCaptureSource): Stop observing "running" (not "rate")
455 (WebCore::AVVideoCaptureSource::setupSession): Observe "running" (not "rate"), and "suspended".
456 (WebCore::AVVideoCaptureSource::captureDeviceSuspendedDidChange):
457 (-[WebCoreAVVideoCaptureSourceObserver observeValueForKeyPath:ofObject:change:context:]):
459 2018-11-13 Devin Rousso <drousso@apple.com>
461 Web Inspector: REGRESSION(r238122): fetching the CertificateInfo triggers an ASSERT in workers
462 https://bugs.webkit.org/show_bug.cgi?id=191597
464 Reviewed by Joseph Pecoraro.
466 When WebInspector is open, the `CertificateInfo` for every `ResourceResponse` is now fetched,
467 meaning that we may try to fetch in situations previously unexpected.
469 * platform/network/cocoa/ResourceResponseCocoa.mm:
470 (WebCore::ResourceResponse::platformCertificateInfo const):
472 2018-11-13 Timothy Hatcher <timothy@apple.com>
474 Treat supported-color-schemes as the second highest priority property.
475 https://bugs.webkit.org/show_bug.cgi?id=191556
476 rdar://problem/46000076
478 Reviewed by Dean Jackson.
480 Test: css-dark-mode/supported-color-schemes-priority.html
482 * css/CSSProperties.json: Make supported-color-schemes high-priority and add a comment.
483 * css/StyleResolver.cpp:
484 (WebCore::StyleResolver::applyMatchedProperties): Manually handle supported-color-schemes
485 after -webkit-ruby-position, before other properties, so it can affect resolved colors.
487 2018-11-13 Charlie Turner <cturner@igalia.com>
489 [EME][GStreamer] Make CDMInstance's available in decryptors, and factor out some EME utility classes.
490 https://bugs.webkit.org/show_bug.cgi?id=191316
492 Reviewed by Xabier Rodriguez-Calvar.
494 Another preparation in patch getting ready to move the decryption
495 logic behind the CDMInstance and out of the GStreamer decryptors
496 themselves. The first step taken here is to arrange for the
497 instances to always be available in the decryptors when they need
500 In doing so, there were a number of hairy bits of code that could
501 use some abstraction, so the opportunity was taken to do that as
504 Covered by tests in media/encrypted-media and
505 imported/w3c/web-platform-tests/encrypted-media.
507 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
508 (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Remove
509 drm-key-needed since it was not being used anywhere.
510 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
511 (WebCore::MediaPlayerPrivateGStreamerBase::handleSyncMessage):
512 Factor out the parsing of decryption system information from
513 GStreamer, since it was not clear what that code was doing unless
514 you squinted pretty hard. Also remove the duplicated
515 initialization-data-encountered posting.
516 (WebCore::MediaPlayerPrivateGStreamerBase::initializationDataEncountered):
517 Refactored to make it a more general method and usable in more
518 situations. It now has an optional to stop it from eliding init
519 datas for a different key system. This is required the first time
520 we post them, since if a CDM instance has already been set, and if
521 the stream init datas are for different systems, we ended up never
522 posting an encrypted event.
523 (WebCore::MediaPlayerPrivateGStreamerBase::attemptToDecryptWithLocalInstance):
524 Actually send a CDMInstance now when in regular playback mode.
525 (WebCore::MediaPlayerPrivateGStreamerBase::dispatchDecryptionKey):
526 Remove m_needToSendCredentials, it was not being used.
527 (WebCore::MediaPlayerPrivateGStreamerBase::handleProtectionEvent):
528 Refactored to use the new initializationDataEncountered.
529 (WebCore::MediaPlayerPrivateGStreamerBase::reportWaitingForKey):
530 Log the waiting state, since it was currently not clear what that
531 logging message was even telling you!
532 (WebCore::extractEventsAndSystemsFromMessage): Deleted.
533 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
534 * platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h:
535 (WebCore::InitData::InitData): New class that encapsulates both
536 single instantiation and streaming instantiation.
537 (WebCore::InitData::append): Used for the streaming mode, when you
538 are concatenating init datas together.
539 (WebCore::InitData::payload const):
540 (WebCore::InitData::systemId const):
541 (WebCore::InitData::payloadContainerType const):
542 (WebCore::InitData::isFromDifferentContainer):
543 (WebCore::ProtectionSystemEvents::ProtectionSystemEvents):
544 (WebCore::ProtectionSystemEvents::events const):
545 (WebCore::ProtectionSystemEvents::availableSystems const):
546 * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
547 (webkitMediaCommonEncryptionDecryptTransformInPlace): If you post
548 waiting-for-key after requesting a CDM instance, it will flap back
549 to not waiting for a key almost immediately, didn't make sense
550 positing after requesting an instance. Also post key-received when
552 (webkitMediaCommonEncryptionDecryptSinkEventHandler): It has now
553 been arranged that a CDMInstance will always be present in an OOB
554 message, so parse it out here.
555 * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
556 (WebCore::MediaPlayerPrivateGStreamerMSE::attemptToDecryptWithInstance):
557 As above, make sure when posting the OOB that a CDMInstance is present.
559 2018-11-13 Charlie Turner <cturner@igalia.com>
561 Various compiler warnings/errors fixes.
562 https://bugs.webkit.org/show_bug.cgi?id=191583
564 Reviewed by Frédéric Wang.
566 * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
567 (WebCore::IDBServer::MemoryIDBBackingStore::clearObjectStore):
568 ASSERT is only compiled in DEBUG mode, so guarding with
569 !LOG_DISABLED is wrong.
570 * rendering/RenderLayerCompositor.cpp:
571 (WebCore::RenderLayerCompositor::updateCompositingLayers):
572 showPaintOrderTree is only compiled in ENABLE(TREE_DEBUGGING)
573 mode, so guarding with !LOG_DISABLED was wrong.
574 (WebCore::RenderLayerCompositor::computeCompositingRequirements):
575 Ditto, this time with member .depth.
576 (WebCore::RenderLayerCompositor::traverseUnchangedSubtree): Ditto.
577 * rendering/svg/SVGRenderSupport.cpp:
578 (WebCore::SVGRenderSupport::styleChanged): Add another unused
581 2018-11-12 Antoine Quint <graouts@apple.com>
583 [Web Animations] Don't schedule animation frames or update style while an accelerated animation is running
584 https://bugs.webkit.org/show_bug.cgi?id=191542
585 <rdar://problem/45356027>
587 Reviewed by Simon Fraser.
589 Test: animations/no-style-recalc-during-accelerated-animation.html
591 In order to be more power-efficient, we stop scheduling calls to updateAnimationsAndSendEvents() when running only accelerated
592 animations. To do that, we prevent scheduling further animation resolution if we're in the process of updating animations, and
593 when we are done, call the new DocumentTimeline::scheduleNextTick() method that will check whether we have only accelerated
594 animations running, and in that case check which of those animations needs an update the soonest and starts a timer scheduled
595 for that time when we'll schedule animation resolution.
597 By default, animations compute the time until their natural completion but in the case of CSS Animations, we want to make sure
598 we also update animations in-flight to dispatch "animationiteration" events.
600 * animation/AnimationEffect.h: Make the simpleIterationProgress() public so it can be called by WebAnimation::timeToNextTick().
601 * animation/DocumentTimeline.cpp:
602 (WebCore::DocumentTimeline::DocumentTimeline): Create the m_tickScheduleTimer and set it up to call scheduleAnimationResolutionIfNeeded().
603 (WebCore::DocumentTimeline::suspendAnimations): If we don't already have a cached current time, cache the current time.
604 (WebCore::DocumentTimeline::resumeAnimations): Reset the cached current time to ensure we'll get a fresh one when updating animations next.
605 (WebCore::DocumentTimeline::liveCurrentTime const): Factor the code to compute the current time out of currentTime() so that we can
606 cache the current time in suspendAnimations() without also automatically clearing the current time.
607 (WebCore::DocumentTimeline::currentTime): Use liveCurrentTime() and cacheCurrentTime() since much of the code from this function has been
608 factored out into those. Additionally, we were failing to clear the current time if called inside an animation frame, which we now do correctly
609 by virtue of using cacheCurrentTime(). This fixes some flakiness.
610 (WebCore::DocumentTimeline::cacheCurrentTime): Factor the code to cache the current time out of currentTime().
611 (WebCore::DocumentTimeline::maybeClearCachedCurrentTime): No need to clear the current time if we get suspended.
612 (WebCore::DocumentTimeline::scheduleAnimationResolutionIfNeeded): Prevent scheduling an animation update if we're in the middle of one already,
613 scheduleNextTick() will be called after animations are updated to see if we should schedule an animation update instead.
614 (WebCore::DocumentTimeline::unscheduleAnimationResolution): Cancel the m_tickScheduleTimer if we need to unschedule animation resolution.
615 (WebCore::DocumentTimeline::animationResolutionTimerFired): Factor the call to applyPendingAcceleratedAnimations() out of updateAnimationsAndSendEvents()
616 and call scheduleNextTick().
617 (WebCore::DocumentTimeline::updateAnimationsAndSendEvents): Set the new m_isUpdatingAnimations member variable to true while this function is running.
618 (WebCore::DocumentTimeline::scheduleNextTick): Schedule an animation update immediately if we have any relevant animation that is not accelerated.
619 Otherwise, iterate through all animations to figure out the earliest moment at which we need to update animations.
620 (WebCore::DocumentTimeline::updateListOfElementsWithRunningAcceleratedAnimationsForElement): Use the new WebAnimation::isRunningAccelerated() function.
621 * animation/DocumentTimeline.h:
622 * animation/WebAnimation.cpp:
623 (WebCore::WebAnimation::isRunningAccelerated const): Since we end up checking if an animation is running with an accelerated effect, we introduce a new
624 function to get that information directly through the WebAnimation object without bothering about its effect.
625 (WebCore::WebAnimation::resolve): We should only call updateFinishedState() here since timingDidChange() would also notify the timeline about a potential
626 change in relevance, which is not necessary and which would schedule an animation frame even for animations that are accelerated.
627 (WebCore::WebAnimation::timeToNextTick const): Compute the time until our animation completion or, in the case of CSS animations, the next iteration.
628 * animation/WebAnimation.h:
630 2018-11-13 Miguel Gomez <magomez@igalia.com>
632 [GTK][WPE] Incorrect tile coverage when resizing a layer out of the visible area
633 https://bugs.webkit.org/show_bug.cgi?id=191545
635 Reviewed by Žan Doberšek.
637 Keep track of layer size changes even if they happen when the layer is not in the visible
638 area, so we can update edge tiles when the layer gets visible.
640 * platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
641 (WebCore::TiledBackingStore::createTiles):
642 * platform/graphics/texmap/coordinated/TiledBackingStore.h:
644 2018-11-12 Rob Buis <rbuis@igalia.com>
646 Content-Type parameter values should allow empty quoted strings
647 https://bugs.webkit.org/show_bug.cgi?id=191388
649 Reviewed by Dean Jackson.
651 According to RFC 2045 and https://mimesniff.spec.whatwg.org/#parsing-a-mime-type empty
652 quoted strings are acceptable for Content-Type parameter values. They
653 are accepted by Firefox and Chrome implementations as well.
655 Test: web-platform-tests/xhr/overridemimetype-blob.html
657 * platform/network/ParsedContentType.cpp:
658 (WebCore::parseToken):
659 (WebCore::parseQuotedString):
660 (WebCore::parseContentType):
661 * platform/network/ParsedContentType.h:
663 2018-11-12 Christopher Reid <chris.reid@sony.com>
665 [Curl] Reject entire cookie if the domain fails a tailmatch.
666 https://bugs.webkit.org/show_bug.cgi?id=191406
668 Reviewed by Youenn Fablet.
670 Currently we don't put domain attribute of cookie when it fails a tailmatch. As Firefox
671 and Chrome do, we are going to reject the entire cookie if the domain fails a tailmatch instead.
672 Also cleanup Cookie database implementation to make them testable better.
674 Tests: TestWebKitAPI/Tests/WebCore/curl/Cookies.cpp
676 * platform/network/curl/CookieJarDB.cpp:
677 (WebCore::CookieJarDB::canAcceptCookie): Added.
678 (WebCore::CookieJarDB::setCookie):
679 * platform/network/curl/CookieUtil.cpp:
680 (WebCore::CookieUtil::parseCookieAttributes):
681 (WebCore::CookieUtil::parseCookieHeader):
682 * platform/network/curl/CookieUtil.h:
684 2018-11-12 Devin Rousso <drousso@apple.com>
686 Web Inspector: Network: show secure certificate details per-request
687 https://bugs.webkit.org/show_bug.cgi?id=191447
688 <rdar://problem/30019476>
690 Reviewed by Joseph Pecoraro.
692 Test: http/tests/inspector/network/resource-response-security.html
694 * loader/ResourceLoader.h:
695 (WebCore::ResourceLoader::shouldIncludeCertificateInfo const):
696 * loader/ResourceLoader.cpp:
697 (WebCore::ResourceLoader::shouldIncludeCertificateInfo const): Added.
698 Always save certificate information when WebInspector is open.
700 * platform/network/CertificateInfoBase.h: Added.
701 (WebCore::CertificateInfoBase::containsNonRootSHA1SignedCertificate const):
702 (WebCore::CertificateInfoBase::summaryInfo const):
703 (WebCore::CertificateInfoBase::isEmpty const):
704 * platform/network/cf/CertificateInfo.h:
705 (WebCore::CertificateInfo::summaryInfo const): Added.
706 * platform/network/cf/CertificateInfoCFNet.cpp: Renamed from Source/WebCore/platform/network/mac/CertificateInfoMac.mm.
707 (WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate):
708 (WebCore::CertificateInfo::summaryInfo const): Added.
709 * platform/network/curl/CertificateInfo.h:
710 (WebCore::CertificateInfo::summaryInfo const): Added.
711 (WebCore::CertificateInfo::isEmpty const): Added.
712 * platform/network/soup/CertificateInfo.h:
713 (WebCore::CertificateInfo::summaryInfo const): Added.
714 (WebCore::CertificateInfo::isEmpty const): Added.
715 Create base class for `CertificateInfo` so that `InspectorNetworkAgent` doesn't need to have
716 platform-specific code in its implementation.
718 * platform/network/cocoa/CertificateInfoCocoa.mm: Renamed from Source/WebCore/platform/network/mac/CertificateInfoMac.mm.
719 * platform/network/curl/CertificateInfoCFNet.cpp: Renamed from Source/WebCore/platform/network/curl/CertificateInfo.cpp.
720 * platform/network/soup/CertificateInfoSoup.cpp: Renamed from Source/WebCore/platform/network/soup/CertificateInfo.cpp.
722 * inspector/NetworkResourcesData.h:
723 (WebCore::NetworkResourcesData::ResourceData::certificateInfo const): Added.
724 (WebCore::NetworkResourcesData::ResourceData::setCertificateInfo): Added.
725 * inspector/NetworkResourcesData.cpp:
726 (WebCore::NetworkResourcesData::responseReceived):
728 * inspector/agents/InspectorNetworkAgent.cpp:
729 (WebCore::InspectorNetworkAgent::buildObjectForResourceResponse):
731 * PlatformAppleWin.cmake:
734 * WebCore.xcodeproj/project.pbxproj:
735 * platform/Curl.cmake:
736 * platform/SourcesSoup.txt:
738 2018-11-12 Zalan Bujtas <zalan@apple.com>
740 Do not collapse the soon-to-be-parent anon block when we shuffle around the marker item renderer.
741 https://bugs.webkit.org/show_bug.cgi?id=191554
742 <rdar://problem/45825265>
744 Reviewed by Antti Koivisto.
746 While moving the marker item renderer to its correct subtree, we accidentally remove the soon-to-be parent anonymous block.
747 Moving a renderer is a 2 step process:
748 1. Detach the renderer from its current parent
749 2. Attach it to its new parent.
750 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
751 is not needed anymore (except we use it as the new parent).
753 Test: fast/inline/marker-list-item-move-should-not-crash.html
755 * rendering/updating/RenderTreeBuilder.cpp:
756 (WebCore::RenderTreeBuilder::detach):
757 * rendering/updating/RenderTreeBuilder.h:
758 * rendering/updating/RenderTreeBuilderBlock.cpp:
759 (WebCore::RenderTreeBuilder::Block::detach):
760 * rendering/updating/RenderTreeBuilderBlock.h:
761 * rendering/updating/RenderTreeBuilderList.cpp:
762 (WebCore::RenderTreeBuilder::List::updateItemMarker):
764 2018-11-12 Javier Fernandez <jfernandez@igalia.com>
766 [css-grid] Refactoring to make more explicit the orthogonal items' pre-layout logic
767 https://bugs.webkit.org/show_bug.cgi?id=191358
769 Reviewed by Manuel Rego Casasnovas.
771 These changes are just a refactoring to ease the integration of the new Baseline Alignment
772 logic in a follow up patch.
774 We need to properly estimate the grid area size of orthogonal items so that we can perform
775 an accurate pre-layout. This is important because orthogonal items will synthesize their baseline
776 if they participate in any baseline alignment context.
778 No new tests, since no behavior change has been introduced in this patch.
780 * rendering/Grid.cpp:
781 (WebCore::Grid::setNeedsItemsPlacement):
783 * rendering/GridTrackSizingAlgorithm.cpp:
784 (WebCore::GridTrackSizingAlgorithm::estimatedGridAreaBreadthForChild const):
785 (WebCore::GridTrackSizingAlgorithm::gridAreaBreadthForChild const):
786 (WebCore::GridTrackSizingAlgorithm::isRelativeGridLengthAsAuto const):
787 (WebCore::GridTrackSizingAlgorithm::isRelativeSizedTrackAsAuto const):
788 (WebCore::GridTrackSizingAlgorithm::gridTrackSize const):
789 (WebCore::IndefiniteSizeStrategy::findUsedFlexFraction const):
790 (WebCore::GridTrackSizingAlgorithm::run):
791 (WebCore::GridTrackSizingAlgorithm::reset):
792 * rendering/GridTrackSizingAlgorithm.h:
793 (WebCore::GridTrackSizingAlgorithmStrategy::gridTrackSize const):
794 * rendering/RenderGrid.cpp:
795 (WebCore::RenderGrid::repeatTracksSizingIfNeeded):
796 (WebCore::RenderGrid::layoutBlock):
797 (WebCore::RenderGrid::computeIntrinsicLogicalWidths const):
798 (WebCore::RenderGrid::computeTrackSizesForIndefiniteSize const):
799 (WebCore::RenderGrid::placeItemsOnGrid const):
800 (WebCore::RenderGrid::performGridItemsPreLayout const):
801 (WebCore::overrideSizeChanged):
802 (WebCore::hasRelativeBlockAxisSize):
803 (WebCore::RenderGrid::updateGridAreaLogicalSize const):
804 (WebCore::RenderGrid::layoutGridItems):
805 * rendering/RenderGrid.h:
807 2018-11-12 Sihui Liu <sihui_liu@apple.com>
809 imported/w3c/web-platform-tests/IndexedDB/keygenerator-explicit.html crashing on iOS device
810 https://bugs.webkit.org/show_bug.cgi?id=191500
812 Reviewed by Dean Jackson.
814 When double value is bigger than maximum unsigned int, converting double to unsigned int has
815 different behaviors on macOS and iOS. On macOS, the result would be 0 while on iOS it would be
816 maximum unsigned int.
818 Covered by existing test.
820 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
821 (WebCore::IDBServer::SQLiteIDBBackingStore::generateKeyNumber):
822 (WebCore::IDBServer::SQLiteIDBBackingStore::maybeUpdateKeyGeneratorNumber):
824 2018-11-12 Basuke Suzuki <basuke.suzuki@sony.com>
826 [Curl] Add API Test for Curl cookie backend.
827 https://bugs.webkit.org/show_bug.cgi?id=191493
829 Reviewed by Youenn Fablet.
831 Refactoring for cookie backend interface.
833 Tests: TestWebKitAPI/Tests/WebCore/curl/Cookies.cpp
835 * platform/FileSystem.h:
836 * platform/network/curl/CookieJarCurlDatabase.cpp:
837 (WebCore::cookiesForSession):
838 (WebCore::CookieJarCurlDatabase::setCookiesFromDOM const):
839 (WebCore::CookieJarCurlDatabase::setCookiesFromHTTPResponse const):
840 (WebCore::CookieJarCurlDatabase::getRawCookies const):
841 * platform/network/curl/CookieJarDB.cpp:
842 (WebCore::CookieJarDB::openDatabase):
843 (WebCore::CookieJarDB::checkSQLiteReturnCode):
844 (WebCore::CookieJarDB::isEnabled const):
845 (WebCore::CookieJarDB::searchCookies):
846 (WebCore::CookieJarDB::setCookie):
847 (WebCore::CookieJarDB::deleteCookie):
848 (WebCore::CookieJarDB::deleteCookieInternal):
849 (WebCore::CookieJarDB::deleteCookies):
850 (WebCore::CookieJarDB::deleteAllCookies):
851 (WebCore::CookieJarDB::executeSimpleSql):
852 (WebCore::CookieJarDB::isEnabled): Deleted.
853 * platform/network/curl/CookieJarDB.h:
854 * platform/network/curl/CookieUtil.cpp:
855 (WebCore::CookieUtil::parseCookieHeader):
856 * platform/network/curl/CookieUtil.h:
857 * platform/win/FileSystemWin.cpp:
858 (WebCore::FileSystem::generateTemporaryPath):
859 (WebCore::FileSystem::openTemporaryFile):
860 (WebCore::FileSystem::createTemporaryDirectory):
861 (WebCore::FileSystem::deleteNonEmptyDirectory):
863 2018-11-12 Tim Horton <timothy_horton@apple.com>
865 Make it possible to edit images inline
866 https://bugs.webkit.org/show_bug.cgi?id=191352
867 <rdar://problem/30107985>
869 Reviewed by Dean Jackson.
871 Tests: editing/images/basic-editable-image.html
872 editing/images/reparent-editable-image-maintains-strokes.html
874 Add the beginnings of a mechanism to replace images with a special attribute
875 with a native drawing view in the UI process.
877 * page/Settings.yaml:
878 Add a setting to control whether images become natively editable when they
879 have the x-apple-editable-image attribute.
881 * html/HTMLImageElement.cpp:
882 (WebCore::HTMLImageElement::editableImageViewID const):
883 Lazily generate an EmbeddedViewID and persist it on the <img> element.
885 * html/HTMLImageElement.h:
886 Rearrange the service controls methods to sit before the members.
887 Add m_editableImageViewID and editableImageViewID().
889 * platform/graphics/GraphicsLayer.cpp:
890 (WebCore::GraphicsLayer::nextEmbeddedViewID):
891 * platform/graphics/GraphicsLayer.h:
892 (WebCore::GraphicsLayer::setContentsToEmbeddedView):
893 Add a new ContentsLayerPurpose, EmbeddedView, which is only supported
894 on Cocoa platforms and when using RemoteLayerTree.
895 Add ContentsLayerEmbeddedViewType, which currently only has the EditableImage type.
896 Add setContentsToEmbeddedView, which takes a ContentsLayerEmbeddedViewType
897 and an EmbeddedViewID to uniquely identify and communicate about the
898 embedded view (which may move between layers, since it is tied to an element).
900 * platform/graphics/ca/GraphicsLayerCA.cpp:
901 (WebCore::GraphicsLayerCA::createPlatformCALayerForEmbeddedView):
902 (WebCore::GraphicsLayerCA::setContentsToEmbeddedView):
903 When setting GraphicsLayer's contents to an embedded view, we use
904 a special PlatformCALayer factory that takes the EmbeddedViewID and type.
905 GraphicsLayerCARemote will override this and make a correctly-initialized
906 PlatformCALayerRemote that keeps track of the EmbeddedViewID.
908 * platform/graphics/ca/GraphicsLayerCA.h:
909 * platform/graphics/ca/PlatformCALayer.cpp:
910 (WebCore::operator<<):
911 * platform/graphics/ca/PlatformCALayer.h:
912 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
913 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
914 (WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
915 (WebCore::PlatformCALayerCocoa::embeddedViewID const):
916 Add stubs and logging for EmbeddedViewID on PlatformCALayer.
917 These will be overridden by PlatformCALayerRemote to do more interesting things.
919 * rendering/RenderImage.cpp:
920 (WebCore::RenderImage::isEditableImage const):
921 Add a getter that return true if the setting is enabled and
922 x-apple-editable-image is empty or true.
924 (WebCore::RenderImage::requiresLayer const):
925 RenderImage requires a layer either if RenderReplaced does, or we are an
928 * rendering/RenderImage.h:
929 * rendering/RenderLayer.cpp:
930 (WebCore::RenderLayer::shouldBeNormalFlowOnly const):
931 (WebCore::RenderLayer::calculateClipRects const):
932 * rendering/RenderLayerBacking.cpp:
933 (WebCore::RenderLayerBacking::updateConfiguration):
934 Push the EmbeddedViewID and type down to GraphicsLayer for editable images.
936 * rendering/RenderLayerCompositor.cpp:
937 (WebCore::RenderLayerCompositor::requiresCompositingLayer const):
938 (WebCore::RenderLayerCompositor::requiresOwnBackingStore const):
939 (WebCore::RenderLayerCompositor::reasonsForCompositing const):
940 (WebCore::RenderLayerCompositor::requiresCompositingForEditableImage const):
941 * rendering/RenderLayerCompositor.h:
942 Make editable images require compositing implicitly.
944 2018-11-12 Don Olmstead <don.olmstead@sony.com>
946 Shipped PNGs include bad profiles: iCCP: known incorrect sRGB profile
947 https://bugs.webkit.org/show_bug.cgi?id=189230
948 <rdar://problem/44050379>
950 Reviewed by Joseph Pecoraro.
952 Runs all png images through zopflipng. This results in a smaller file
953 size and takes care of this issue as a byproduct.
955 * Modules/modern-media-controls/images/iOS/airplay-placard@1x.png:
956 * Modules/modern-media-controls/images/iOS/airplay-placard@2x.png:
957 * Modules/modern-media-controls/images/iOS/airplay-placard@3x.png:
958 * Modules/modern-media-controls/images/iOS/invalid-placard@1x.png:
959 * Modules/modern-media-controls/images/iOS/invalid-placard@2x.png:
960 * Modules/modern-media-controls/images/iOS/invalid-placard@3x.png:
961 * Modules/modern-media-controls/images/iOS/pip-placard@1x.png:
962 * Modules/modern-media-controls/images/iOS/pip-placard@2x.png:
963 * Modules/modern-media-controls/images/iOS/pip-placard@3x.png:
964 * Modules/modern-media-controls/images/macOS/airplay-placard@1x.png:
965 * Modules/modern-media-controls/images/macOS/airplay-placard@2x.png:
966 * Modules/modern-media-controls/images/macOS/invalid-placard@1x.png:
967 * Modules/modern-media-controls/images/macOS/invalid-placard@2x.png:
968 * Modules/modern-media-controls/images/macOS/pip-placard@1x.png:
969 * Modules/modern-media-controls/images/macOS/pip-placard@2x.png:
970 * Resources/AttachmentPlaceholder.png:
971 * Resources/AttachmentPlaceholder@2x.png:
972 * Resources/ListButtonArrow.png:
973 * Resources/ListButtonArrow@2x.png:
974 * Resources/missingImage.png:
975 * Resources/missingImage@2x.png:
976 * Resources/missingImage@3x.png:
977 * Resources/moveCursor.png:
978 * Resources/northEastSouthWestResizeCursor.png:
979 * Resources/northSouthResizeCursor.png:
980 * Resources/northWestSouthEastResizeCursor.png:
981 * Resources/nullPlugin.png:
982 * Resources/nullPlugin@2x.png:
983 * Resources/panIcon.png:
984 * Resources/textAreaResizeCorner.png:
985 * Resources/textAreaResizeCorner@2x.png:
986 * Resources/urlIcon.png:
988 2018-11-12 Youenn Fablet <youenn@apple.com>
990 RealtimeOutgoing A/V sources should observe their sources only if having a sink
991 https://bugs.webkit.org/show_bug.cgi?id=191490
993 Reviewed by Eric Carlson.
995 Observe the source that generates media based on the sinks:
996 - Do not observe at creation time
997 - For first sink, start observing
998 - When no more sink, stop observing
999 Apply this principle for both outgoing audio and video sources.
1000 Add locks for the sinks to ensure thread-safety.
1001 Make sinks HashSet which is more robust.
1003 Do some refactoring to better isolate generic outgoing sources from Cocoa/GTK implementations.
1005 Covered by existing tests and updated webrtc/remove-track.html.
1007 * platform/mediastream/RealtimeOutgoingAudioSource.cpp:
1008 (WebCore::RealtimeOutgoingAudioSource::~RealtimeOutgoingAudioSource):
1009 (WebCore::RealtimeOutgoingAudioSource::stop):
1010 (WebCore::RealtimeOutgoingAudioSource::AddSink):
1011 (WebCore::RealtimeOutgoingAudioSource::RemoveSink):
1012 (WebCore::RealtimeOutgoingAudioSource::sendAudioFrames):
1013 * platform/mediastream/RealtimeOutgoingAudioSource.h:
1014 * platform/mediastream/RealtimeOutgoingVideoSource.cpp:
1015 (WebCore::RealtimeOutgoingVideoSource::RealtimeOutgoingVideoSource):
1016 (WebCore::RealtimeOutgoingVideoSource::~RealtimeOutgoingVideoSource):
1017 (WebCore::RealtimeOutgoingVideoSource::observeSource):
1018 (WebCore::RealtimeOutgoingVideoSource::setSource):
1019 (WebCore::RealtimeOutgoingVideoSource::stop):
1020 (WebCore::RealtimeOutgoingVideoSource::AddOrUpdateSink):
1021 (WebCore::RealtimeOutgoingVideoSource::RemoveSink):
1022 * platform/mediastream/RealtimeOutgoingVideoSource.h:
1023 (WebCore::RealtimeOutgoingVideoSource::isSilenced const):
1024 * platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceLibWebRTC.cpp:
1025 (WebCore::RealtimeOutgoingAudioSourceLibWebRTC::pullAudioData):
1026 * platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.cpp:
1027 (WebCore::RealtimeOutgoingAudioSourceCocoa::RealtimeOutgoingAudioSourceCocoa):
1028 (WebCore::RealtimeOutgoingAudioSourceCocoa::audioSamplesAvailable):
1029 (WebCore::RealtimeOutgoingAudioSourceCocoa::pullAudioData):
1030 * platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.h:
1031 * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:
1032 (WebCore::RealtimeOutgoingVideoSourceCocoa::sampleBufferUpdated):
1034 2018-11-12 Youenn Fablet <youenn@apple.com>
1036 Support setting stream ids when adding a transceiver
1037 https://bugs.webkit.org/show_bug.cgi?id=191307
1039 Reviewed by Eric Carlson.
1041 Add support for streams in RTCTransceiverInit.
1042 Add plumbing down to libwebrtc.
1043 Covered by rebased tests.
1045 * Modules/mediastream/RTCPeerConnection.h:
1046 * Modules/mediastream/RTCPeerConnection.idl:
1047 * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
1048 (WebCore::fromRtpTransceiverInit):
1050 2018-11-12 Antti Koivisto <antti@apple.com>
1052 Support dynamic pseudo-classes on elements with display: contents
1053 https://bugs.webkit.org/show_bug.cgi?id=181640
1054 <rdar://problem/36605415>
1056 Reviewed by Dean Jackson.
1058 The code for :hover and :active style invalidation assumes that only elements with renderer need invalidation.
1060 This patch fixes '.display-content-element:hover span' case but not '.display-content-element:hover' case but
1061 includes tests for both. The latter is not super useful anyway (as it only affects rendering with inherited
1064 Test: fast/css/display-contents-hover-active.html
1067 (WebCore::Document::updateHoverActiveState):
1069 Traverse up in composed tree instead of render tree when invalidating. This has the same order as render tree
1070 but also includes display:content elements. This also allows removing the special display:none case.
1073 (WebCore::Element::setActive):
1074 (WebCore::Element::setHovered):
1076 Also look into display:contents style for invalidation checks.
1078 (WebCore::Element::renderOrDisplayContentsStyle const):
1080 Make this helper an Element member.
1084 (WebCore::Node::parentElementInComposedTree const):
1086 Support starting from a PseudoElement. This is consistent with ComposedTreeAncestorIterator.
1088 * rendering/updating/RenderTreePosition.cpp:
1089 (WebCore::RenderTreePosition::nextSiblingRenderer const):
1090 * style/StyleTreeResolver.cpp:
1091 (WebCore::Style::TreeResolver::resolveElement):
1092 (WebCore::Style::TreeResolver::createAnimatedElementUpdate):
1093 (WebCore::Style::shouldResolveElement):
1094 (WebCore::Style::TreeResolver::resolveComposedTree):
1095 (WebCore::Style::renderOrDisplayContentsStyle): Deleted.
1097 Use the Element::renderOrDisplayContentsStyle() instead.
1099 2018-11-12 Antoine Quint <graouts@apple.com>
1101 [Web Animations] Turn Web Animations experimental
1102 https://bugs.webkit.org/show_bug.cgi?id=191543
1104 Reviewed by Dean Jackson.
1106 * page/RuntimeEnabledFeatures.h:
1108 2018-11-12 Simon Fraser <simon.fraser@apple.com>
1110 feFlood with alpha color doesn't work correctly
1111 https://bugs.webkit.org/show_bug.cgi?id=163666
1113 Reviewed by Zalan Bujtas.
1115 FEFlood::platformApplySoftware() erroneously used colorWithOverrideAlpha()
1116 rather than multiplying the flood color with the flood opacity as other browsers do.
1118 Test: svg/filters/feFlood-with-alpha-color.html
1120 * platform/graphics/Color.cpp:
1121 (WebCore::Color::colorWithAlpha const): I tried using colorWithAlphaMultipliedBy() elsewhere,
1122 and it triggered a behavior change, so add a comment.
1123 * platform/graphics/filters/FEFlood.cpp:
1124 (WebCore::FEFlood::platformApplySoftware):
1125 * svg/SVGStopElement.cpp:
1126 (WebCore::SVGStopElement::stopColorIncludingOpacity const):
1128 2018-11-12 Eric Carlson <eric.carlson@apple.com>
1130 Require <iframe allow="display"> for an iframe to use getDisplayMedia
1131 https://bugs.webkit.org/show_bug.cgi?id=191505
1132 <rdar://problem/45968811>
1134 Reviewed by Jer Noble.
1136 Test: http/tests/media/media-stream/get-display-media-iframe-allow-attribute.html
1138 * Modules/mediastream/MediaDevicesRequest.cpp:
1139 (WebCore::MediaDevicesRequest::start):
1140 * Modules/mediastream/UserMediaController.cpp:
1141 (WebCore::isAllowedToUse):
1142 (WebCore::UserMediaController::canCallGetUserMedia):
1143 (WebCore::UserMediaController::logGetUserMediaDenial):
1144 * Modules/mediastream/UserMediaController.h:
1145 * Modules/mediastream/UserMediaRequest.cpp:
1146 (WebCore::UserMediaRequest::start):
1148 2018-11-12 Simon Fraser <simon.fraser@apple.com>
1150 Make compositing updates incremental
1151 https://bugs.webkit.org/show_bug.cgi?id=90342
1153 Reviewed by Antti Koivisto.
1155 Previously, updating compositing layers required two full RenderLayer tree traversals,
1156 and all the work was done for every RenderLayer on each composting update. This could be expensive
1157 on pages with lots of RenderLayers.
1159 These changes make compositing updates more incremental. Compositing updates still require
1160 two tree traversals. The first determines which RenderLayers need to be composited (of those which
1161 weren't already made composited at style-change time), because of reasons that can only be determined
1162 post-layout, and indirect reasons including overlap. The second traversal updates the configuration, geometry
1163 and GraphicsLayer tree for the composited layers. Dependencies on both descendant and ancestor state make
1164 it hard to fold these two traversals together.
1166 In order to minimize the work done during these traversals, dirty bits are stored on RenderLayers,
1167 and propagated to ancestor layers in paint order. There are two sets of bits: those related to the first
1168 "compositing requirements" traversal, and those related to the second "update backing and hierarchy" traversal.
1169 When a RenderLayer gets a dirty bit set, bits are propagated to ancestors to indicate that children need
1172 Sadly entire subtrees can't be skipped during the "compositing requirements" traversal because we still have
1173 to accumulate overlap rects, but RenderLayerCompositor::traverseUnchangedSubtree() is used to minimize
1174 work in that case. Subtrees can be skipped in the "update backing and hierarchy" traversal. Entire traversals can
1175 be skipped if no change has triggered the need for that traversal.
1177 These changes fix a correctness issue where transform changes now trigger overlap re-evaluation, which causes
1178 more layer geometry updates than before. This regressed the MotionMark "Focus" test, when geometry updates
1179 triggered layer resizes as the filter blur radius changed, which then triggered repaints. This is fixed by
1180 excluding composited filters from the composited bounds (but still taking them into account for overlap).
1182 Care is taken to avoid triggering traversals in non-composited documents (tested by no-updates-in-non-composited-iframe.html).
1184 Code to set the dirty bits is added in various places that change properties that compositing depends on.
1186 These changes also subsume the patch in 176196; we now never consult properties that rely on layout from the
1187 style change code path, and the only call stack for geometry updates is from the "update backing and hierarchy"
1188 traversal, which is always a pre-order traversal.
1190 Tests: compositing/geometry/stacking-context-change-layer-reparent.html
1191 compositing/layer-creation/change-to-overlap.html
1192 compositing/updates/no-updates-in-non-composited-iframe.html
1194 * html/canvas/WebGLRenderingContextBase.cpp:
1195 (WebCore::WebGLRenderingContextBase::markContextChanged): Need to differentiate between a canvas becoming composited
1196 for the first time, and its pixels changing with a new 'CanvasPixelsChanged' value.
1197 * page/FrameView.cpp:
1198 (WebCore::FrameView::setViewportConstrainedObjectsNeedLayout):
1200 (WebCore::Page::setPageScaleFactor):
1201 * platform/graphics/ca/GraphicsLayerCA.cpp:
1202 (WebCore::GraphicsLayerCA::updateBackdropFilters): If we just made a layer for backdrops, we need to update sublayers.
1203 * rendering/RenderBox.cpp:
1204 (WebCore::RenderBox::styleWillChange):
1205 * rendering/RenderLayer.cpp:
1206 (WebCore::RenderLayer::RenderLayer):
1207 (WebCore::RenderLayer::~RenderLayer):
1208 (WebCore::RenderLayer::addChild):
1209 (WebCore::RenderLayer::removeChild):
1210 (WebCore::RenderLayer::shouldBeStackingContext const):
1211 (WebCore::RenderLayer::stackingContext const):
1212 (WebCore::RenderLayer::dirtyZOrderLists):
1213 (WebCore::RenderLayer::dirtyNormalFlowList):
1214 (WebCore::RenderLayer::updateNormalFlowList):
1215 (WebCore::RenderLayer::rebuildZOrderLists):
1216 (WebCore::RenderLayer::setAncestorsHaveCompositingDirtyFlag):
1217 (WebCore::RenderLayer::contentChanged):
1218 (WebCore::RenderLayer::updateLayerPositions):
1219 (WebCore::RenderLayer::updateTransform):
1220 (WebCore::RenderLayer::updateLayerPosition):
1221 (WebCore::RenderLayer::enclosingCompositingLayer const):
1222 (WebCore::RenderLayer::enclosingCompositingLayerForRepaint const):
1223 (WebCore::RenderLayer::clippingRootForPainting const):
1224 (WebCore::RenderLayer::scrollTo):
1225 (WebCore::RenderLayer::updateCompositingLayersAfterScroll):
1226 (WebCore::RenderLayer::updateScrollInfoAfterLayout):
1227 (WebCore::RenderLayer::paintLayerContents):
1228 (WebCore::RenderLayer::hitTest):
1229 (WebCore::RenderLayer::hitTestLayer):
1230 (WebCore::RenderLayer::calculateClipRects const):
1231 (WebCore::outputPaintOrderTreeLegend):
1232 (WebCore::outputPaintOrderTreeRecursive):
1233 (WebCore::compositingContainer): Deleted.
1234 * rendering/RenderLayer.h:
1235 (WebCore::RenderLayer::clearZOrderLists):
1236 (WebCore::RenderLayer::paintOrderParent const):
1237 * rendering/RenderLayerBacking.cpp:
1238 (WebCore::RenderLayerBacking::updateCompositedBounds):
1239 (WebCore::RenderLayerBacking::updateAfterWidgetResize):
1240 (WebCore::RenderLayerBacking::updateAfterLayout):
1241 (WebCore::RenderLayerBacking::updateConfigurationAfterStyleChange):
1242 (WebCore::RenderLayerBacking::updateConfiguration):
1243 (WebCore::RenderLayerBacking::updateGeometry):
1244 (WebCore::RenderLayerBacking::setRequiresBackgroundLayer):
1245 (WebCore::RenderLayerBacking::updateMaskingLayer):
1246 (WebCore::RenderLayerBacking::paintsContent const):
1247 (WebCore::RenderLayerBacking::contentChanged):
1248 (WebCore::RenderLayerBacking::setContentsNeedDisplay):
1249 (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
1250 (WebCore::RenderLayerBacking::startAnimation):
1251 (WebCore::RenderLayerBacking::animationFinished):
1252 (WebCore::RenderLayerBacking::startTransition):
1253 (WebCore::RenderLayerBacking::transitionFinished):
1254 (WebCore::RenderLayerBacking::setCompositedBounds):
1255 * rendering/RenderLayerBacking.h:
1256 * rendering/RenderLayerCompositor.cpp:
1257 (WebCore::RenderLayerCompositor::CompositingState::CompositingState):
1258 (WebCore::RenderLayerCompositor::enableCompositingMode):
1259 (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
1260 (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlagsAfterLayout):
1261 (WebCore::RenderLayerCompositor::willRecalcStyle):
1262 (WebCore::RenderLayerCompositor::didRecalcStyleWithNoPendingLayout):
1263 (WebCore::RenderLayerCompositor::updateCompositingLayers):
1264 (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1265 (WebCore::RenderLayerCompositor::traverseUnchangedSubtree):
1266 (WebCore::RenderLayerCompositor::updateBackingAndHierarchy):
1267 (WebCore::RenderLayerCompositor::appendDocumentOverlayLayers):
1268 (WebCore::RenderLayerCompositor::layerBecameNonComposited):
1269 (WebCore::RenderLayerCompositor::logLayerInfo):
1270 (WebCore::clippingChanged):
1271 (WebCore::styleAffectsLayerGeometry):
1272 (WebCore::RenderLayerCompositor::layerStyleChanged):
1273 (WebCore::RenderLayerCompositor::needsCompositingUpdateForStyleChangeOnNonCompositedLayer const):
1274 (WebCore::RenderLayerCompositor::updateBacking):
1275 (WebCore::RenderLayerCompositor::updateLayerCompositingState):
1276 (WebCore::RenderLayerCompositor::layerWasAdded):
1277 (WebCore::RenderLayerCompositor::layerWillBeRemoved):
1278 (WebCore::RenderLayerCompositor::enclosingNonStackingClippingLayer const):
1279 (WebCore::RenderLayerCompositor::computeExtent const):
1280 (WebCore::RenderLayerCompositor::addToOverlapMap):
1281 (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
1282 (WebCore::RenderLayerCompositor::rootLayerConfigurationChanged):
1283 (WebCore::RenderLayerCompositor::parentFrameContentLayers):
1284 (WebCore::RenderLayerCompositor::updateRootLayerPosition):
1285 (WebCore::RenderLayerCompositor::needsToBeComposited const):
1286 (WebCore::RenderLayerCompositor::requiresCompositingLayer const):
1287 (WebCore::RenderLayerCompositor::requiresOwnBackingStore const):
1288 (WebCore::RenderLayerCompositor::reasonsForCompositing const):
1289 (WebCore::RenderLayerCompositor::clippedByAncestor const):
1290 (WebCore::RenderLayerCompositor::requiresCompositingForAnimation const):
1291 (WebCore::RenderLayerCompositor::requiresCompositingForTransform const):
1292 (WebCore::RenderLayerCompositor::requiresCompositingForVideo const):
1293 (WebCore::RenderLayerCompositor::requiresCompositingForFilters const):
1294 (WebCore::RenderLayerCompositor::requiresCompositingForWillChange const):
1295 (WebCore::RenderLayerCompositor::requiresCompositingForPlugin const):
1296 (WebCore::RenderLayerCompositor::requiresCompositingForFrame const):
1297 (WebCore::RenderLayerCompositor::requiresCompositingForScrollableFrame const):
1298 (WebCore::RenderLayerCompositor::requiresCompositingForPosition const):
1299 (WebCore::RenderLayerCompositor::requiresCompositingForOverflowScrolling const):
1300 (WebCore::RenderLayerCompositor::styleChangeMayAffectIndirectCompositingReasons):
1301 (WebCore::RenderLayerCompositor::fixedLayerIntersectsViewport const):
1302 (WebCore::RenderLayerCompositor::useCoordinatedScrollingForLayer const):
1303 (WebCore::RenderLayerCompositor::rootOrBodyStyleChanged):
1304 (WebCore::RenderLayerCompositor::rootBackgroundColorOrTransparencyChanged):
1305 (WebCore::operator<<):
1306 (WebCore::RenderLayerCompositor::setCompositingLayersNeedRebuild): Deleted.
1307 (WebCore::checkIfDescendantClippingContextNeedsUpdate): Deleted.
1308 (WebCore::isScrollableOverflow): Deleted.
1309 (WebCore::styleHasTouchScrolling): Deleted.
1310 (WebCore::styleChangeRequiresLayerRebuild): Deleted.
1311 (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): Deleted.
1312 (WebCore::RenderLayerCompositor::rootFixedBackgroundsChanged): Deleted.
1313 (WebCore::RenderLayerCompositor::updateLayerTreeGeometry): Deleted.
1314 (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry): Deleted.
1315 * rendering/RenderLayerCompositor.h:
1316 * rendering/RenderTreeAsText.cpp:
1317 (WebCore::writeLayers):
1319 2018-11-12 Rob Buis <rbuis@igalia.com>
1321 CSSCalcOperation constructor wastes 6KB of Vector capacity on cnn.com
1322 https://bugs.webkit.org/show_bug.cgi?id=190839
1324 Reviewed by Frédéric Wang.
1326 The CSSCalcOperation ctor that takes a leftSide and rightSide parameter
1327 wastes memory since it will always have size 2 but claims the
1328 default Vector size. So make sure to reserve an initial capacity of 2.
1330 * css/CSSCalculationValue.cpp:
1332 2018-11-12 Yusuke Suzuki <yusukesuzuki@slowstart.org>
1334 WTFMove(xxx) is used in arguments while other arguments touch xxx
1335 https://bugs.webkit.org/show_bug.cgi?id=191544
1337 Reviewed by Alex Christensen.
1339 The order of the evaluation of C++ arguments is undefined. If we use WTFMove(xxx),
1340 xxx should not be touched in the other arguments. This patch fixes such uses in
1343 * Modules/indexeddb/IDBObjectStore.cpp:
1344 (WebCore::IDBObjectStore::deleteIndex):
1345 * Modules/indexeddb/IDBTransaction.cpp:
1346 (WebCore::IDBTransaction::scheduleOperation):
1347 * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
1348 (WebCore::IDBServer::MemoryIDBBackingStore::registerObjectStore):
1349 * Modules/indexeddb/server/MemoryObjectStore.cpp:
1350 (WebCore::IDBServer::MemoryObjectStore::registerIndex):
1352 2018-11-12 Zalan Bujtas <zalan@apple.com>
1354 [LFC][IFC] Construct dedicated runs when the inline element requires it.
1355 https://bugs.webkit.org/show_bug.cgi?id=191509
1357 Reviewed by Antti Koivisto.
1359 In certain cases, a run can overlap multiple inline elements like this:
1361 <span>normal text content</span><span style="position: relative; left: 10px;">but this one needs a dedicated run</span><span>end of text</span>
1363 The content above generates one long run <normal text contentbut this one needs dedicated runend of text> <- input to line breaking.
1364 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.
1366 * layout/inlineformatting/InlineFormattingContext.cpp:
1367 (WebCore::Layout::InlineFormattingContext::layout const):
1368 (WebCore::Layout::contentRequiresSeparateRun):
1369 (WebCore::Layout::InlineFormattingContext::splitInlineRunIfNeeded const):
1370 (WebCore::Layout::InlineFormattingContext::postProcessInlineRuns const):
1371 (WebCore::Layout::InlineFormattingContext::closeLine const):
1372 (WebCore::Layout::InlineFormattingContext::appendContentToLine const):
1373 (WebCore::Layout::InlineFormattingContext::layoutInlineContent const):
1374 (WebCore::Layout::InlineFormattingContext::instrinsicWidthConstraints const):
1375 * layout/inlineformatting/InlineFormattingContext.h:
1376 (WebCore::Layout::InlineFormattingContext::inlineFormattingState const):
1377 * layout/inlineformatting/InlineLineBreaker.cpp:
1378 (WebCore::Layout::InlineLineBreaker::nextRun): mid-word breaking is not implemented yet.
1379 * layout/inlineformatting/InlineRun.h:
1380 (WebCore::Layout::InlineRun::overlapsMultipleInlineItems const):
1381 * layout/inlineformatting/InlineRunProvider.cpp:
1382 (WebCore::Layout::InlineRunProvider::processInlineTextItem):
1383 * layout/inlineformatting/InlineRunProvider.h:
1384 (WebCore::Layout::InlineRunProvider::Run::TextContext::expand):
1385 (WebCore::Layout::InlineRunProvider::Run::textContext):
1386 (WebCore::Layout::InlineRunProvider::Run::TextContext::setStart): Deleted.
1387 (WebCore::Layout::InlineRunProvider::Run::TextContext::setLength): Deleted.
1389 2018-11-12 Jer Noble <jer.noble@apple.com>
1391 [MSE] Frame re-ordering can cause iframes to never be enqueued
1392 https://bugs.webkit.org/show_bug.cgi?id=191485
1394 Reviewed by Eric Carlson.
1396 Test: media/media-source/media-source-dropped-iframe.html
1398 Some frame re-ordering techniques result in files where the first frame has a
1399 decode timestamp < 0, but a presentation timestamp >= 0. When appending these
1400 samples to existing content, we can fail to enqueue the first frame because its
1401 DTS overlaps an existing sample, but the presentation timestamp does not.
1402 Rather than try to only enqueue samples whose decode timestamps are > than the
1403 greatest decode end timestamp (minus some fudge factor), allow all frames to be
1404 added to the decode queue if they are strictly ordered greater than the last
1407 * Modules/mediasource/SourceBuffer.cpp:
1408 (WebCore::SourceBuffer::TrackBuffer::TrackBuffer):
1409 (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
1410 (WebCore::SourceBuffer::provideMediaData):
1411 (WebCore::SourceBuffer::reenqueueMediaForTime):
1413 2018-11-12 Yusuke Suzuki <yusukesuzuki@slowstart.org>
1415 IDBTransaction does not use "RefPtr<IDBTransaction> self"
1416 https://bugs.webkit.org/show_bug.cgi?id=190436
1418 Reviewed by Alex Christensen.
1420 It seems that `RefPtr<IDBTransaction> self;` is not effective since it does not capture anything.
1421 Use `protectedThis = makeRef(*this)` instead.
1425 * Modules/indexeddb/IDBTransaction.cpp:
1426 (WebCore::IDBTransaction::IDBTransaction):
1428 2018-11-12 Alicia Boya GarcÃa <aboya@igalia.com>
1430 [MSE][GStreamer] Introduce AbortableTaskQueue
1431 https://bugs.webkit.org/show_bug.cgi?id=190902
1433 Reviewed by Xabier Rodriguez-Calvar.
1435 A new synchronization primitive is introduced: AbortableTaskQueue,
1436 which allows to send work to the main thread from a background thread
1437 with the option to perform two-phase cancellation (startAborting() and
1440 This new primitive has been used to overhaul GstBus messaging in
1441 AppendPipeline. A lot of code made redundant has been deleted in the
1442 process and lots of internal functions were now able to be made
1443 private. As part of the refactor all glib signals in AppendPipeline
1444 now use lambdas. All usages of WTF::isMainThread() in AppendPipeline
1445 have been replaced by isMainThread() for consistency with the rest of
1448 Two-phase cancellation is still not used in AppendPipeline as of this
1449 patch, but it will be used in a future patch that makes use of
1450 GStreamer flushes to implement correct MSE abort semantics. There are
1451 unit tests to ensure it works correctly, even if it's still not used.
1453 * WebCore.xcodeproj/project.pbxproj:
1454 * platform/AbortableTaskQueue.h: Added.
1455 * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
1456 (WebCore::AppendPipeline::dumpAppendState):
1457 (WebCore::AppendPipeline::AppendPipeline):
1458 (WebCore::AppendPipeline::~AppendPipeline):
1459 (WebCore::AppendPipeline::appsrcEndOfAppendCheckerProbe):
1460 (WebCore::AppendPipeline::handleAppsinkNewSampleFromAnyThread):
1461 (WebCore::AppendPipeline::connectDemuxerSrcPadToAppsinkFromAnyThread):
1462 * platform/graphics/gstreamer/mse/AppendPipeline.h:
1463 (WebCore::AppendPipeline::sourceBufferPrivate):
1464 (WebCore::AppendPipeline::appsinkCaps):
1465 (WebCore::AppendPipeline::track):
1466 (WebCore::AppendPipeline::demuxerSrcPadCaps):
1467 (WebCore::AppendPipeline::playerPrivate):
1469 2018-11-12 Xabier Rodriguez Calvar <calvaris@igalia.com>
1471 [GStreamer][EME] waitingforkey event should consider decryptors' waiting status
1472 https://bugs.webkit.org/show_bug.cgi?id=191459
1474 Reviewed by Carlos Garcia Campos.
1476 The new cross platform architecture to report waitingforkey and
1477 recover from it requires a more accurate knowledge of what is
1478 going on with the decryptors because events are reported only once
1479 (per key exchange run) and crossplatform only continues if we are
1480 actually ready to continue, meaning that no decryptors are
1483 * platform/graphics/gstreamer/GUniquePtrGStreamer.h: Added
1484 GstIterator deleter.
1485 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1486 (WebCore::MediaPlayerPrivateGStreamerBase::setWaitingForKey): Bail
1487 out if we are requested to not wait anymore but there are still
1489 (WebCore::MediaPlayerPrivateGStreamerBase::waitingForKey const):
1490 Query the pipeline, just a query after pipeline is built and
1491 manual inspection during build. The query is optimal but sometimes
1492 we can get this request when the pipeline is under construction so
1493 queries do not arrive at the decryptors and we have to deliver it
1495 (WebCore::MediaPlayerPrivateGStreamerBase::reportWaitingForKey:
1496 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
1497 (WebCore::MediaPlayerPrivateGStreamerBase::reportWaitingForKey:
1498 Deleted because it is now inlined.
1499 * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
1500 (webKitMediaClearKeyDecryptorDecrypt): Fixed small compiler warning.
1501 * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
1502 (webkit_media_common_encryption_decrypt_class_init): Override
1504 (webkitMediaCommonEncryptionDecryptTransformInPlace): When the
1505 decryptor is going to block to wait, report before. When the
1506 decryptor receives the key, report it got it.
1507 (webkitMediaCommonEncryptionDecryptSinkEventHandler): Do not
1508 handle waitingforkey here.
1509 (webkitMediaCommonEncryptionDecryptorQueryHandler): Report if the
1510 decryptor is waiting.
1512 2018-11-12 Michael Catanzaro <mcatanzaro@igalia.com>
1514 [GTK] Silence ATK_XY_PARENT warnings
1515 https://bugs.webkit.org/show_bug.cgi?id=191504
1517 Reviewed by Carlos Garcia Campos.
1519 * accessibility/atk/WebKitAccessibleInterfaceComponent.cpp:
1521 * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1523 * accessibility/atk/WebKitAccessibleUtil.cpp:
1524 (contentsRelativeToAtkCoordinateType):
1526 2018-11-11 Wenson Hsieh <wenson_hsieh@apple.com>
1528 Implement a new edit command to change the enclosing list type
1529 https://bugs.webkit.org/show_bug.cgi?id=191487
1530 <rdar://problem/45955922>
1532 Reviewed by Ryosuke Niwa.
1534 Add support for a new edit command that changes the type of the enclosing list element around the selection from
1535 unordered to ordered list and vice versa. This new edit command is exposed only to internal WebKit2 clients, via
1536 SPI on WKWebView (`-_changeListType:`).
1538 This is currently intended for use in Mail compose, but may also be adopted by legacy Notes in the future. As
1539 such, the behavior of this editing command mostly matches shipping behavior in Mail compose (which is currently
1540 implemented entirely by Mail). See below for more details.
1542 Test: editing/execCommand/change-list-type.html
1543 WKWebViewEditActions.ChangeListType
1546 * WebCore.xcodeproj/project.pbxproj:
1547 * editing/ChangeListTypeCommand.cpp: Added.
1548 (WebCore::listConversionTypeForSelection):
1549 (WebCore::ChangeListTypeCommand::listConversionType):
1551 Helper that returns a potential list conversion command that may be executed at the given document's selection,
1552 if any exists. We also use existing logic from Mail here to determine which list to change, by walking up the
1553 DOM from the lowest common ancestor container of the current selection until we hit the first list element.
1555 (WebCore::ChangeListTypeCommand::createNewList):
1557 Helper method to create a new list element to replace the given list, and then clone element data from the given
1558 list to the new list. This addresses an existing bug in Mail, wherein changing list type for an enclosing list
1559 which contains inline style properties drops the inline styles, because existing logic in Mail that implements
1560 this editing command only copies the `class` attribute of the old list to the new list.
1562 (WebCore::ChangeListTypeCommand::doApply):
1564 Apply the edit command by running the following steps:
1565 - Find the enclosing list element, if any (see above).
1566 - Create a new list element of the opposite type as the enclosing list, and clone over element data from the
1567 list element being replaced.
1568 - Insert the new list next to the original list.
1569 - Move all children of the original list to the new list.
1570 - Remove the original list.
1571 - Set the selection to the end of the new list.
1573 * editing/ChangeListTypeCommand.h: Added.
1574 * editing/EditAction.h:
1576 Add a pair of new edit actions for conversion from unordered list to ordered list and vice versa.
1578 * editing/Editor.cpp:
1579 (WebCore::Editor::changeSelectionListType):
1581 Implement this by creating and applying a new ChangeListTypeCommand.
1583 (WebCore::Editor::canChangeSelectionListType): Deleted.
1585 Remove this for now, since there's no need for it until full support for edit command validation is implemented.
1588 * testing/Internals.cpp:
1589 (WebCore::Internals::changeSelectionListType):
1590 * testing/Internals.h:
1591 * testing/Internals.idl:
1593 Add internal hooks to change list type from layout tests.
1595 2018-11-11 Daniel Bates <dabates@apple.com>
1597 [iOS] Draw caps lock indicator in password fields
1598 https://bugs.webkit.org/show_bug.cgi?id=190565
1599 <rdar://problem/45262343>
1601 Reviewed by Dean Jackson.
1603 Draw the caps lock indicator in a focused password field on iOS. This makes the behavior of password
1604 fields on iOS more closely match the behavior of password fields on Mac.
1606 The majority of this patch is implementing PlatformKeyboardEvent::currentCapsLockState() for iOS.
1607 In Legacy WebKit, the implementation boils down to calling call -[::WebEvent modifierFlags]. In
1608 Modern WebKit the UIProcess is responsible for -[::WebEvent modifierFlags] and passing it the
1609 WebProcess to store such that invocations of PlatformKeyboardEvent::currentCapsLockState() consult
1610 the store in the WebProcess. A smaller part of this patch is having both the legacy and modern
1611 web views listen for keyboard availability changes so as to update the the caps lock state when
1612 a hardware keyboard is detached or attached.
1614 * WebCore.xcodeproj/project.pbxproj:
1615 * page/EventHandler.cpp:
1616 (WebCore::EventHandler::capsLockStateMayHaveChanged const): Extracted from EventHandler::internalKeyEvent()
1617 so that it can shared between WebCore, Modern WebKit, and Legacy WebKit code.
1618 (WebCore::EventHandler::internalKeyEvent): Modified to call capsLockStateMayHaveChanged().
1619 * page/EventHandler.h:
1620 * platform/cocoa/KeyEventCocoa.mm:
1621 (WebCore::PlatformKeyboardEvent::currentCapsLockState): Moved from KeyEventMac.mm.
1622 (WebCore::PlatformKeyboardEvent::getCurrentModifierState): Moved from KeyEventMac.mm.
1623 * platform/ios/KeyEventIOS.mm:
1624 (WebCore::PlatformKeyboardEvent::currentStateOfModifierKeys): Fetch the current modifier state.
1625 (WebCore::PlatformKeyboardEvent::currentCapsLockState): Deleted; we now use the Cocoa implementation.
1626 (WebCore::PlatformKeyboardEvent::getCurrentModifierState): Deleted; we now use the Cocoa implementation.
1627 * platform/ios/WebEvent.h:
1628 * platform/ios/WebEvent.mm:
1629 (+[WebEvent modifierFlags]): Added.
1630 * platform/mac/KeyEventMac.mm:
1631 (WebCore::PlatformKeyboardEvent::currentCapsLockState): Deleted; moved to KeyEventCocoa.mm to be shared
1632 by both Mac and iOS.
1633 (WebCore::PlatformKeyboardEvent::getCurrentModifierState): Deleted; moved to KeyEventCocoa.mm to be shared
1634 by both Mac and iOS.
1635 * rendering/RenderThemeCocoa.h:
1636 * rendering/RenderThemeCocoa.mm:
1637 (WebCore::RenderThemeCocoa::shouldHaveCapsLockIndicator const): Moved from RenderThemeMac.mm.
1638 * rendering/RenderThemeIOS.h:
1639 * rendering/RenderThemeIOS.mm:
1640 (WebCore::RenderThemeIOS::shouldHaveCapsLockIndicator const): Deleted.
1641 * rendering/RenderThemeMac.h:
1642 * rendering/RenderThemeMac.mm:
1643 (WebCore::RenderThemeMac::shouldHaveCapsLockIndicator const): Deleted; moved to RenderThemeCocoa.mm to be
1644 shared by both Mac and iOS.
1646 2018-11-11 Zalan Bujtas <zalan@apple.com>
1648 [LFC][BFC] In-flow positioned logic is really formatting context dependent.
1649 https://bugs.webkit.org/show_bug.cgi?id=191512
1651 Reviewed by Simon Fraser.
1653 Move block formatting context specific code from FormattingContext to BlockFormattingContext.
1655 * layout/FormattingContext.cpp:
1656 (WebCore::Layout::FormattingContext::placeInFlowPositionedChildren const): Deleted.
1657 * layout/FormattingContext.h:
1658 * layout/FormattingContextGeometry.cpp:
1659 (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset):
1660 * layout/blockformatting/BlockFormattingContext.cpp:
1661 (WebCore::Layout::BlockFormattingContext::placeInFlowPositionedChildren const):
1662 (WebCore::Layout::BlockFormattingContext::computeInFlowPositionedPosition const): Deleted.
1663 * layout/blockformatting/BlockFormattingContext.h:
1664 * layout/blockformatting/BlockFormattingContextGeometry.cpp:
1665 (WebCore::Layout::BlockFormattingContext::Geometry::inFlowPositionedPosition): Deleted.
1666 * layout/inlineformatting/InlineFormattingContext.cpp:
1667 (WebCore::Layout::InlineFormattingContext::computeInFlowPositionedPosition const): Deleted.
1668 * layout/inlineformatting/InlineFormattingContext.h:
1670 2018-11-11 Myles C. Maxfield <mmaxfield@apple.com>
1672 Address post-review comments after r237955
1673 https://bugs.webkit.org/show_bug.cgi?id=191496
1675 Reviewed by Darin Adler.
1677 * rendering/TextDecorationPainter.cpp:
1678 (WebCore::TextDecorationPainter::paintTextDecoration):
1679 * style/InlineTextBoxStyle.cpp:
1680 (WebCore::computeUnderlineOffset):
1681 * style/InlineTextBoxStyle.h:
1683 2018-11-11 Benjamin Poulain <benjamin@webkit.org>
1685 Fix a fixme: rename wtfObjcMsgSend to wtfObjCMsgSend
1686 https://bugs.webkit.org/show_bug.cgi?id=191492
1688 Reviewed by Alex Christensen.
1692 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1693 * page/mac/EventHandlerMac.mm:
1694 * platform/mac/URLMac.mm:
1695 * platform/mac/WebCoreNSURLExtras.mm:
1696 * platform/mac/WebCoreObjCExtras.mm:
1697 * rendering/RenderThemeMac.mm:
1699 2018-11-10 Benjamin Poulain <benjamin@webkit.org>
1701 Fix a fixme: rename wtfObjcMsgSend to wtfObjCMsgSend
1702 https://bugs.webkit.org/show_bug.cgi?id=191492
1704 Reviewed by Alex Christensen.
1706 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1707 * page/mac/EventHandlerMac.mm:
1708 * platform/mac/URLMac.mm:
1709 * platform/mac/WebCoreNSURLExtras.mm:
1710 * platform/mac/WebCoreObjCExtras.mm:
1711 * rendering/RenderThemeMac.mm:
1712 (WebCore::RenderThemeMac::systemColor const):
1714 2018-11-10 Megan Gardner <megan_gardner@apple.com>
1716 Fix build for 32bit Mac
1717 https://bugs.webkit.org/show_bug.cgi?id=191511
1719 Unreviewed Build Fix.
1721 Build fix, not tests needed.
1723 Make the apporiate delecrations for 32-bit mac support.
1725 * editing/mac/DictionaryLookup.mm:
1727 2018-11-10 Simon Fraser <simon.fraser@apple.com>
1729 Remove support for -webkit-svg-shadow
1730 https://bugs.webkit.org/show_bug.cgi?id=187429
1731 <rdar://problem/41920735>
1733 Reviewed by Dean Jackson.
1735 -webkit-svg-shadow was a non-standard hack for online iWork, and they no longer use it,
1736 so remove it. No other browser supports it, and chromestatus say it's used on less than
1739 * css/CSSComputedStyleDeclaration.cpp:
1740 (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
1741 * css/CSSProperties.json:
1742 * css/SVGCSSComputedStyleDeclaration.cpp:
1743 (WebCore::ComputedStyleExtractor::svgPropertyValue):
1744 * css/StyleBuilderCustom.h:
1745 (WebCore::StyleBuilderCustom::applyInitialWebkitSvgShadow): Deleted.
1746 (WebCore::StyleBuilderCustom::applyInheritWebkitSvgShadow): Deleted.
1747 (WebCore::StyleBuilderCustom::applyValueWebkitSvgShadow): Deleted.
1748 * css/parser/CSSPropertyParser.cpp:
1749 (WebCore::CSSPropertyParser::parseSingleValue):
1750 * rendering/RenderElement.cpp:
1751 (WebCore::RenderElement::didAttachChild):
1752 * rendering/svg/RenderSVGImage.cpp:
1753 (WebCore::RenderSVGImage::layout):
1754 * rendering/svg/RenderSVGImage.h:
1755 * rendering/svg/RenderSVGModelObject.cpp:
1756 (WebCore::RenderSVGModelObject::RenderSVGModelObject):
1757 * rendering/svg/RenderSVGModelObject.h:
1758 (WebCore::RenderSVGModelObject::repaintRectInLocalCoordinatesExcludingSVGShadow const): Deleted.
1759 (WebCore::RenderSVGModelObject::hasSVGShadow const): Deleted.
1760 (WebCore::RenderSVGModelObject::setHasSVGShadow): Deleted.
1761 * rendering/svg/RenderSVGRoot.cpp:
1762 (WebCore::RenderSVGRoot::RenderSVGRoot):
1763 (WebCore::RenderSVGRoot::updateCachedBoundaries):
1764 * rendering/svg/RenderSVGRoot.h:
1765 * rendering/svg/RenderSVGShape.cpp:
1766 (WebCore::RenderSVGShape::updateRepaintBoundingBox):
1767 * rendering/svg/RenderSVGShape.h:
1768 * rendering/svg/SVGRenderSupport.cpp:
1769 (WebCore::SVGRenderSupport::clippedOverflowRectForRepaint):
1770 (WebCore::SVGRenderSupport::layoutChildren):
1771 (WebCore::SVGRenderSupport::styleChanged):
1772 (WebCore::SVGRenderSupport::repaintRectForRendererInLocalCoordinatesExcludingSVGShadow): Deleted.
1773 (WebCore::SVGRenderSupport::rendererHasSVGShadow): Deleted.
1774 (WebCore::SVGRenderSupport::setRendererHasSVGShadow): Deleted.
1775 (WebCore::SVGRenderSupport::intersectRepaintRectWithShadows): Deleted.
1776 (WebCore::SVGRenderSupport::childAdded): Deleted.
1777 * rendering/svg/SVGRenderSupport.h:
1779 2018-11-10 Ryan Haddad <ryanhaddad@apple.com>
1781 Unreviewed, rolling out r238065.
1783 Breaks internal builds.
1787 "Make it possible to edit images inline"
1788 https://bugs.webkit.org/show_bug.cgi?id=191352
1789 https://trac.webkit.org/changeset/238065
1791 2018-11-10 Tim Horton <timothy_horton@apple.com>
1793 Make it possible to edit images inline
1794 https://bugs.webkit.org/show_bug.cgi?id=191352
1795 <rdar://problem/30107985>
1797 Reviewed by Dean Jackson.
1799 Tests: editing/images/basic-editable-image.html
1800 editing/images/reparent-editable-image-maintains-strokes.html
1802 Add the beginnings of a mechanism to replace images with a special attribute
1803 with a native drawing view in the UI process.
1805 * page/Settings.yaml:
1806 Add a setting to control whether images become natively editable when they
1807 have the x-apple-editable-image attribute.
1809 * html/HTMLImageElement.cpp:
1810 (WebCore::HTMLImageElement::editableImageViewID const):
1811 Lazily generate an EmbeddedViewID and persist it on the <img> element.
1813 * html/HTMLImageElement.h:
1814 Rearrange the service controls methods to sit before the members.
1815 Add m_editableImageViewID and editableImageViewID().
1817 * platform/graphics/GraphicsLayer.cpp:
1818 (WebCore::GraphicsLayer::nextEmbeddedViewID):
1819 * platform/graphics/GraphicsLayer.h:
1820 (WebCore::GraphicsLayer::setContentsToEmbeddedView):
1821 Add a new ContentsLayerPurpose, EmbeddedView, which is only supported
1822 on Cocoa platforms and when using RemoteLayerTree.
1823 Add ContentsLayerEmbeddedViewType, which currently only has the EditableImage type.
1824 Add setContentsToEmbeddedView, which takes a ContentsLayerEmbeddedViewType
1825 and an EmbeddedViewID to uniquely identify and communicate about the
1826 embedded view (which may move between layers, since it is tied to an element).
1828 * platform/graphics/ca/GraphicsLayerCA.cpp:
1829 (WebCore::GraphicsLayerCA::createPlatformCALayerForEmbeddedView):
1830 (WebCore::GraphicsLayerCA::setContentsToEmbeddedView):
1831 When setting GraphicsLayer's contents to an embedded view, we use
1832 a special PlatformCALayer factory that takes the EmbeddedViewID and type.
1833 GraphicsLayerCARemote will override this and make a correctly-initialized
1834 PlatformCALayerRemote that keeps track of the EmbeddedViewID.
1836 * platform/graphics/ca/GraphicsLayerCA.h:
1837 * platform/graphics/ca/PlatformCALayer.cpp:
1838 (WebCore::operator<<):
1839 * platform/graphics/ca/PlatformCALayer.h:
1840 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
1841 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
1842 (WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
1843 (WebCore::PlatformCALayerCocoa::embeddedViewID const):
1844 Add stubs and logging for EmbeddedViewID on PlatformCALayer.
1845 These will be overridden by PlatformCALayerRemote to do more interesting things.
1847 * rendering/RenderImage.cpp:
1848 (WebCore::RenderImage::isEditableImage const):
1849 Add a getter that return true if the setting is enabled and
1850 x-apple-editable-image is empty or true.
1852 (WebCore::RenderImage::requiresLayer const):
1853 RenderImage requires a layer either if RenderReplaced does, or we are an
1856 * rendering/RenderImage.h:
1857 * rendering/RenderLayer.cpp:
1858 (WebCore::RenderLayer::shouldBeNormalFlowOnly const):
1859 (WebCore::RenderLayer::calculateClipRects const):
1860 * rendering/RenderLayerBacking.cpp:
1861 (WebCore::RenderLayerBacking::updateConfiguration):
1862 Push the EmbeddedViewID and type down to GraphicsLayer for editable images.
1864 * rendering/RenderLayerCompositor.cpp:
1865 (WebCore::RenderLayerCompositor::requiresCompositingLayer const):
1866 (WebCore::RenderLayerCompositor::requiresOwnBackingStore const):
1867 (WebCore::RenderLayerCompositor::reasonsForCompositing const):
1868 (WebCore::RenderLayerCompositor::requiresCompositingForEditableImage const):
1869 * rendering/RenderLayerCompositor.h:
1870 Make editable images require compositing implicitly.
1872 2018-11-09 Zalan Bujtas <zalan@apple.com>
1874 [iOS] Issue initial paint soon after the visuallyNonEmpty milestone is fired.
1875 https://bugs.webkit.org/show_bug.cgi?id=191078
1876 <rdar://problem/45736178>
1878 Reviewed by Antti Koivisto.
1880 1. Improve visuallyNonEmpty milestone confidence level.
1881 Ignore whitespace and non visible text content.
1882 Parsing the main document should not necessarily fire the milestone. Check if there's any pending scripts/css/font loading.
1883 Check if the html/body is actually visible.
1885 2. Issue initial paint soon after the milestone fires.
1886 Use a 0ms timer to flush the initial paint.
1887 Throttle additional flushes for 500ms and 1.5s (original behaviour).
1889 3. Suspend optional style recalcs and layouts while painting is being throttled.
1890 When parsing yields we initiate a 0ms style recalc/layout timer.
1891 These optional layouts produce content that we have no intention to paint.
1894 (WebCore::Document::scheduleStyleRecalc):
1895 (WebCore::Document::shouldScheduleLayout):
1896 * page/ChromeClient.h:
1897 * page/FrameView.cpp:
1898 (WebCore::FrameView::resetLayoutMilestones):
1899 (WebCore::FrameView::qualifiesAsVisuallyNonEmpty const):
1900 (WebCore::FrameView::updateSignificantRenderedTextMilestoneIfNeeded):
1901 (WebCore::FrameView::updateIsVisuallyNonEmpty):
1903 (WebCore::FrameView::incrementVisuallyNonEmptyCharacterCount): Ignore whitespace characters. Some pages start with plenty of whitespace only content.
1904 * platform/graphics/FontCascade.h:
1905 * rendering/RenderText.cpp: Check whether the text is actually visible at this point.
1906 (WebCore::RenderText::RenderText):
1908 2018-11-09 John Wilander <wilander@apple.com>
1910 Add ability to configure document.cookie lifetime cap through user defaults
1911 https://bugs.webkit.org/show_bug.cgi?id=191480
1912 <rdar://problem/45240871>
1914 Reviewed by Chris Dumez.
1916 No new tests. Existing test makes sure we don't regress.
1918 This change makes the capped lifetime in seconds configurable through
1921 * platform/network/NetworkStorageSession.h:
1922 * platform/network/cf/NetworkStorageSessionCFNet.cpp:
1923 (WebCore::NetworkStorageSession::setAgeCapForClientSideCookies):
1924 (WebCore::NetworkStorageSession::setShouldCapLifetimeForClientSideCookies): Deleted.
1925 Renamed setAgeCapForClientSideCookies().
1926 * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
1927 (WebCore::filterCookies):
1928 (WebCore::NetworkStorageSession::setCookiesFromDOM const):
1930 2018-11-09 Ryan Haddad <ryanhaddad@apple.com>
1932 Unreviewed, rolling out r238047.
1934 Introduced layout test failures on iOS simulator.
1938 "[iOS] Draw caps lock indicator in password fields"
1939 https://bugs.webkit.org/show_bug.cgi?id=190565
1940 https://trac.webkit.org/changeset/238047
1942 2018-11-09 Tim Horton <timothy_horton@apple.com>
1944 Normal-flow-only flex items don't correctly respect z-index
1945 https://bugs.webkit.org/show_bug.cgi?id=191486
1947 Reviewed by Simon Fraser.
1949 Test: css3/flexbox/z-index-with-normal-flow-only.html
1951 * rendering/RenderLayer.cpp:
1952 (WebCore::canCreateStackingContext):
1953 r125693 did not ensure that flex items which would otherwise be
1954 normal-flow-only would be put into the z-order tree when necessary.
1955 Fix by respecting the same trigger we use to make layers for flex items;
1956 namely, not having auto z-index.
1958 2018-11-09 Wenson Hsieh <wenson_hsieh@apple.com>
1960 [Cocoa] Implement SPI on WKWebView to increase and decrease list levels
1961 https://bugs.webkit.org/show_bug.cgi?id=191471
1962 <rdar://problem/45952472>
1964 Reviewed by Tim Horton.
1966 Add new method stubs for changing the list type for the current selection (to be implemented in a future patch).
1968 * editing/Editor.cpp:
1969 (WebCore::Editor::canChangeSelectionListType):
1970 (WebCore::Editor::changeSelectionListType):
1973 2018-11-09 Keith Rollin <krollin@apple.com>
1975 Unreviewed build fix after https://bugs.webkit.org/show_bug.cgi?id=191324
1977 Remove the use of .xcfilelists until their side-effects are better
1980 * WebCore.xcodeproj/project.pbxproj:
1982 2018-11-09 Jer Noble <jer.noble@apple.com>
1984 SourceBuffer throws an error when appending a second init segment after changeType().
1985 https://bugs.webkit.org/show_bug.cgi?id=191474
1987 Reviewed by Eric Carlson.
1989 Test: media/media-source/media-source-changetype-second-init.html
1991 When encountering an initialization segment after changeType(), add the parsed codec types
1992 to the list of allowed codecs.
1994 * Modules/mediasource/SourceBuffer.cpp:
1995 (WebCore::SourceBuffer::validateInitializationSegment):
1996 * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
1997 (WebCore::MockMediaPlayerMediaSource::supportsType):
1998 * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
1999 (WebCore::MockSourceBufferPrivate::canSwitchToType):
2000 * platform/mock/mediasource/MockSourceBufferPrivate.h:
2002 2018-11-09 Eric Carlson <eric.carlson@apple.com>
2004 [MediaStream] AVVideoCaptureSource reports incorrect size when frames are scaled
2005 https://bugs.webkit.org/show_bug.cgi?id=191479
2006 <rdar://problem/45952201>
2008 Reviewed by Jer Noble.
2010 No new tests, tested manually.
2012 * platform/mediastream/RealtimeVideoSource.cpp:
2013 (WebCore::RealtimeVideoSource::standardVideoSizes): Drive-by fix: add a few more standard
2014 video frame sizes, correct a typo.
2015 (WebCore::RealtimeVideoSource::bestSupportedSizeAndFrameRate): Drive-by fix: don't consider
2016 rescaled sized when we already have an exact or aspect ratio match because it won't be used.
2018 * platform/mediastream/mac/AVVideoCaptureSource.h:
2019 (WebCore::AVVideoCaptureSource::width const): Deleted.
2020 (WebCore::AVVideoCaptureSource::height const): Deleted.
2021 * platform/mediastream/mac/AVVideoCaptureSource.mm:
2022 (WebCore::AVVideoCaptureSource::setSizeAndFrameRateWithPreset): Delete m_requestedSize.
2023 (WebCore::AVVideoCaptureSource::shutdownCaptureSession): Delete m_width and m_height.
2024 (WebCore::AVVideoCaptureSource::processNewFrame): Don't call setSize with captured size,
2025 the frame may be resized before deliver.
2027 2018-11-09 Ross Kirsling <ross.kirsling@sony.com>
2029 Unreviewed MSVC build fix after r238039 (and r238046).
2031 * bindings/js/JSWorkerGlobalScopeBase.cpp:
2032 * bindings/js/JSWorkerGlobalScopeBase.h:
2034 2018-11-09 Basuke Suzuki <basuke.suzuki@sony.com>
2036 [Curl][WebKit] Implement Proxy configuration API.
2037 https://bugs.webkit.org/show_bug.cgi?id=189053
2039 Reviewed by Youenn Fablet.
2041 Added API to set proxy from the app.
2043 No new tests because there's no behaviour change in WebCore.
2045 * platform/network/NetworkStorageSession.h:
2046 * platform/network/curl/CurlContext.h:
2047 (WebCore::CurlContext::setProxySettings):
2048 * platform/network/curl/CurlProxySettings.h:
2049 * platform/network/curl/NetworkStorageSessionCurl.cpp:
2050 (WebCore::NetworkStorageSession::setProxySettings const):
2052 2018-11-09 Antti Koivisto <antti@apple.com>
2054 Use OptionSet for layout milestones
2055 https://bugs.webkit.org/show_bug.cgi?id=191470
2057 Reviewed by Dean Jackson.
2059 * WebCore.xcodeproj/project.pbxproj:
2060 * loader/EmptyFrameLoaderClient.h:
2061 * loader/FrameLoader.cpp:
2062 (WebCore::FrameLoader::didReachLayoutMilestone):
2063 * loader/FrameLoader.h:
2064 * loader/FrameLoaderClient.h:
2065 * page/FrameView.cpp:
2066 (WebCore::FrameView::FrameView):
2067 (WebCore::FrameView::addPaintPendingMilestones):
2068 (WebCore::FrameView::fireLayoutRelatedMilestonesIfNeeded):
2069 (WebCore::FrameView::firePaintRelatedMilestonesIfNeeded):
2071 * page/LayoutMilestone.h: Copied from Source/WebCore/page/LayoutMilestones.h.
2073 Renamed to appease WK2 IPC code generation.
2075 * page/LayoutMilestones.h: Removed.
2077 (WebCore::Page::addLayoutMilestones):
2078 (WebCore::Page::removeLayoutMilestones):
2079 (WebCore::Page::isCountingRelevantRepaintedObjects const):
2081 (WebCore::Page::requestedLayoutMilestones const):
2083 2018-11-09 Daniel Bates <dabates@apple.com>
2085 [iOS] Draw caps lock indicator in password fields
2086 https://bugs.webkit.org/show_bug.cgi?id=190565
2087 <rdar://problem/45262343>
2089 Reviewed by Dean Jackson.
2091 Draw the caps lock indicator in a focused password field on iOS. This makes the behavior of password
2092 fields on iOS more closely match the behavior of password fields on Mac. For now, we only draw the
2093 indicator when caps locks is enabled via the hardware keyboard. We will look to support the software
2094 keyboard in a subsequent commit (see <https://bugs.webkit.org/show_bug.cgi?id=191475>).
2096 The majority of this patch is implementing PlatformKeyboardEvent::currentCapsLockState() for iOS.
2097 In Legacy WebKit, the implementation boils down to calling call -[::WebEvent modifierFlags]. In
2098 Modern WebKit the UIProcess is responsible for -[::WebEvent modifierFlags] and passing it the
2099 WebProcess to store such that invocations of PlatformKeyboardEvent::currentCapsLockState() consult
2100 the store in the WebProcess. A smaller part of this patch is having both the legacy and modern
2101 web views listen for keyboard availability changes so as to update the the caps lock state when
2102 a hardware keyboard is detached or attached.
2104 * WebCore.xcodeproj/project.pbxproj:
2105 * page/EventHandler.cpp:
2106 (WebCore::EventHandler::capsLockStateMayHaveChanged const): Extracted from EventHandler::internalKeyEvent()
2107 so that it can shared between WebCore, Modern WebKit, and Legacy WebKit code.
2108 (WebCore::EventHandler::internalKeyEvent): Modified to call capsLockStateMayHaveChanged().
2109 * page/EventHandler.h:
2110 * platform/cocoa/KeyEventCocoa.mm:
2111 (WebCore::PlatformKeyboardEvent::currentCapsLockState): Moved from KeyEventMac.mm.
2112 (WebCore::PlatformKeyboardEvent::getCurrentModifierState): Moved from KeyEventMac.mm.
2113 * platform/ios/KeyEventIOS.mm:
2114 (WebCore::PlatformKeyboardEvent::currentStateOfModifierKeys): Fetch the current modifier state.
2115 (WebCore::PlatformKeyboardEvent::currentCapsLockState): Deleted; we now use the Cocoa implementation.
2116 (WebCore::PlatformKeyboardEvent::getCurrentModifierState): Deleted; we now use the Cocoa implementation.
2117 * platform/ios/WebEvent.h:
2118 * platform/ios/WebEvent.mm:
2119 (+[WebEvent modifierFlags]): Added.
2120 * platform/mac/KeyEventMac.mm:
2121 (WebCore::PlatformKeyboardEvent::currentCapsLockState): Deleted; moved to KeyEventCocoa.mm to be shared
2122 by both Mac and iOS.
2123 (WebCore::PlatformKeyboardEvent::getCurrentModifierState): Deleted; moved to KeyEventCocoa.mm to be shared
2124 by both Mac and iOS.
2125 * rendering/RenderThemeCocoa.h:
2126 * rendering/RenderThemeCocoa.mm:
2127 (WebCore::RenderThemeCocoa::shouldHaveCapsLockIndicator const): Moved from RenderThemeMac.mm.
2128 * rendering/RenderThemeIOS.h:
2129 * rendering/RenderThemeIOS.mm:
2130 (WebCore::RenderThemeIOS::shouldHaveCapsLockIndicator const): Deleted.
2131 * rendering/RenderThemeMac.h:
2132 * rendering/RenderThemeMac.mm:
2133 (WebCore::RenderThemeMac::shouldHaveCapsLockIndicator const): Deleted; moved to RenderThemeCocoa.mm to be
2134 shared by both Mac and iOS.
2136 2018-11-09 Chris Dumez <cdumez@apple.com>
2138 Unreviewed attempt to fix WinCairo build after r238039.
2140 * bindings/js/JSWorkerGlobalScopeBase.h:
2142 2018-11-09 Fujii Hironori <Hironori.Fujii@sony.com>
2144 Extensions3DOpenGLES.h: warning: 'blitFramebuffer' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
2145 https://bugs.webkit.org/show_bug.cgi?id=191451
2147 Reviewed by Dean Jackson.
2149 No new tests because there is no behavior change.
2151 * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
2152 (WebCore::Extensions3DOpenGLES::setEXTContextLostCallback): Deleted unused method.
2153 * platform/graphics/opengl/Extensions3DOpenGLES.h: Marked 'override'.
2155 2018-11-09 Andy Estes <aestes@apple.com>
2157 [Payment Request] canMakePayment() should not consider serialized payment method data
2158 https://bugs.webkit.org/show_bug.cgi?id=191432
2160 Reviewed by Dean Jackson.
2162 In https://github.com/w3c/payment-request/pull/806, we're changing the specification of
2163 canMakePayment() to not consider serialized payment method data when deciding if a payment
2164 method is supported. For Apple Pay, this means we resolve to true for
2165 "https://apple.com/apple-pay", even if an ApplePayRequest is omitted or is missing required
2169 http/tests/paymentrequest/payment-request-canmakepayment-method.https.html and
2170 http/tests/paymentrequest/payment-request-show-method.https.html.
2172 * Modules/paymentrequest/PaymentRequest.cpp:
2173 (WebCore::PaymentRequest::canMakePayment):
2175 2018-11-09 Andy Estes <aestes@apple.com>
2177 [Payment Request] PaymentResponse.details should be updated when the user accepts a retried payment
2178 https://bugs.webkit.org/show_bug.cgi?id=191440
2180 Reviewed by Dean Jackson.
2182 PaymentResponse.details was being initialized in the PaymentResponse constructor and never
2183 updated when the user accepts a retried payment. We need to update it.
2185 Added a test case to http/tests/paymentrequest/payment-response-retry-method.https.html.
2187 * Modules/paymentrequest/PaymentRequest.cpp:
2188 (WebCore::PaymentRequest::accept):
2189 * Modules/paymentrequest/PaymentResponse.cpp:
2190 (WebCore::PaymentResponse::PaymentResponse):
2191 (WebCore::PaymentResponse::setDetailsFunction):
2192 * Modules/paymentrequest/PaymentResponse.h:
2194 2018-11-09 Fujii Hironori <Hironori.Fujii@sony.com>
2196 MediaPlayerPrivateMediaFoundation.h: warning: 'GetService' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
2197 https://bugs.webkit.org/show_bug.cgi?id=191453
2199 Reviewed by Per Arne Vollan.
2201 No new tests because there is no behavior change.
2203 * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h: Marked with 'override' and removed 'virtual'.
2205 2018-11-09 Chris Dumez <cdumez@apple.com>
2207 Unreviewed attempt to fix internal build on macOS.
2209 'Export' is defined in several headers.
2211 * bindings/js/JSDOMGlobalObject.cpp:
2212 * bindings/js/JSDOMGlobalObject.h:
2213 * bridge/jsc/BridgeJSC.cpp:
2214 * bridge/jsc/BridgeJSC.h:
2216 2018-11-09 Chris Dumez <cdumez@apple.com>
2218 HTML form validation bubble disappears
2219 https://bugs.webkit.org/show_bug.cgi?id=191418
2221 Reviewed by Simon Fraser.
2223 If we validate a form and find an invalid form control, we'll scroll it into view and show
2224 the validation bubble. However, scrolling the element into view may be an asynchronous
2225 operation, in which case it would discard the validation bubble prematurely because scrolling
2226 hides the validation bubble. To address the issue, we now show the validation message
2227 asynchronously after focusing the element (and potentially scrolling it into view).
2229 Test: fast/forms/scroll-into-view-and-show-validation-message.html
2231 * html/HTMLFormControlElement.cpp:
2232 (WebCore::HTMLFormControlElement::focusAndShowValidationMessage):
2234 2018-11-09 Brent Fulgham <bfulgham@apple.com>
2236 [Windows][DirectX] Be more rigors about BeginFigure/EndFigure and Close operations.
2237 https://bugs.webkit.org/show_bug.cgi?id=191452
2238 <rdar://problem/45933964>
2240 Reviewed by Zalan Bujtas.
2242 Do a better job of balancing the BeginFigure/EndFigure calls in
2243 the PathDirect2D implementation. Failure to do so puts the Geometry sink
2244 into an error state that prevents it from producing drawing output.
2247 * platform/graphics/Path.h:
2248 * platform/graphics/win/GraphicsContextDirect2D.cpp:
2249 (WebCore::GraphicsContext::drawPath): Flush is needed here.
2250 (WebCore::GraphicsContext::fillPath): Ditto.
2251 (WebCore::GraphicsContext::strokePath): Ditto.
2252 * platform/graphics/win/PathDirect2D.cpp:
2253 (WebCore::Path::drawDidComplete):
2254 (WebCore::Path::closeAnyOpenGeometries):
2255 (WebCore::Path::transform):
2256 (WebCore::Path::openFigureAtCurrentPointIfNecessary):
2257 (WebCore::Path::moveTo):
2258 (WebCore::Path::closeSubpath):
2260 2018-11-09 Jer Noble <jer.noble@apple.com>
2262 [Cocoa] Fix failing imported/w3c/web-platform-tests/media-source/mediasource-changetype-play.html test
2263 https://bugs.webkit.org/show_bug.cgi?id=191396
2265 Reviewed by Eric Carlson.
2267 When changeType() is called, exempt video and text tracks (in addition to just audio tracks)
2268 from "same codec" requirements.
2270 * Modules/mediasource/SourceBuffer.cpp:
2271 (WebCore::SourceBuffer::validateInitializationSegment):
2273 2018-11-09 Carlos Garcia Campos <cgarcia@igalia.com>
2275 REGRESSION(r236365): [GTK] Many form-related tests are failing
2276 https://bugs.webkit.org/show_bug.cgi?id=189993
2278 Reviewed by Michael Catanzaro.
2280 Only the first form data element is added to the message body due to a return added by mistake in r236365.
2282 * platform/network/soup/ResourceRequestSoup.cpp:
2283 (WebCore::ResourceRequest::updateSoupMessageBody const): Remove return.
2285 2018-11-09 Zalan Bujtas <zalan@apple.com>
2287 [LFC][IFC] Move some code from InlineFormattingContext::Line to InlineFormattingContext/Geometry
2288 https://bugs.webkit.org/show_bug.cgi?id=191445
2290 Reviewed by Antti Koivisto.
2292 The idea here is that Line should not have to deal with all the post processig tasks like the runs final aligments.
2293 (The line class would eventually turn into a collection of random things).
2295 * layout/inlineformatting/InlineFormattingContext.cpp:
2296 (WebCore::Layout::InlineFormattingContext::closeLine const):
2297 (WebCore::Layout::InlineFormattingContext::appendContentToLine const):
2298 (WebCore::Layout::InlineFormattingContext::layoutInlineContent const):
2299 * layout/inlineformatting/InlineFormattingContext.h:
2300 (WebCore::Layout::InlineFormattingContext::Line::contentLogicalLeft const):
2301 (WebCore::Layout::InlineFormattingContext::Line::lastRunType const):
2302 * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
2303 (WebCore::Layout::InlineFormattingContext::Geometry::adjustedLineLogicalLeft):
2304 (WebCore::Layout::InlineFormattingContext::Geometry::justifyRuns):
2305 (WebCore::Layout::InlineFormattingContext::Geometry::computeExpansionOpportunities):
2306 * layout/inlineformatting/Line.cpp:
2307 (WebCore::Layout::InlineFormattingContext::Line::Line):
2308 (WebCore::Layout::InlineFormattingContext::Line::init):
2309 (WebCore::Layout::InlineFormattingContext::Line::contentLogicalRight const):
2310 (WebCore::Layout::InlineFormattingContext::Line::appendContent):
2311 (WebCore::Layout::InlineFormattingContext::Line::close):
2312 (WebCore::Layout::adjustedLineLogicalLeft): Deleted.
2313 (WebCore::Layout::InlineFormattingContext::Line::contentLogicalRight): Deleted.
2314 (WebCore::Layout::InlineFormattingContext::Line::computeExpansionOpportunities): Deleted.
2315 (WebCore::Layout::InlineFormattingContext::Line::justifyRuns): Deleted.
2317 2018-11-09 Philippe Normand <pnormand@igalia.com>
2319 Unreviewed, GStreamer build warning fix
2321 * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:
2322 (WebCore::GStreamerVideoEncoder::newSampleCallback): Timesamp()
2323 returns a uint32_t, fix format string accordingly.
2325 2018-11-08 Said Abou-Hallawa <sabouhallawa@apple.com>
2327 Add an SPI to allow WebView clients to add additional supported image formats
2328 https://bugs.webkit.org/show_bug.cgi?id=190454
2330 Reviewed by Simon Fraser.
2332 Add an SPI to allow additional supported image formats in WebView. These
2333 additional formats can be set in the WKWebViewConfiguration as an NSArray
2334 of NStrings. Each string represents an image source type aka UTI.
2336 The ImageSourceType in the functions' names will be replaced by ImageType.
2337 ImageType in this context is the image UTI (Uniform Type Identifier).
2339 * platform/MIMETypeRegistry.cpp:
2340 (WebCore::MIMETypeRegistry::supportedImageMIMETypes):
2341 (WebCore::MIMETypeRegistry::additionalSupportedImageMIMETypes):
2342 (WebCore::supportedImageMIMETypesForEncoding):
2343 (WebCore::MIMETypeRegistry::isSupportedImageMIMEType):
2344 * platform/MIMETypeRegistry.h:
2345 * platform/graphics/cg/ImageDecoderCG.cpp:
2346 (WebCore::ImageDecoderCG::filenameExtension const):
2347 (WebCore::ImageDecoderCG::encodedDataStatus const):
2348 * platform/graphics/cg/ImageSourceCG.h:
2349 * platform/graphics/cg/ImageSourceCGMac.mm:
2350 (WebCore::MIMETypeForImageType):
2351 (WebCore::preferredExtensionForImageType):
2352 (WebCore::MIMETypeForImageSourceType): Deleted.
2353 (WebCore::preferredExtensionForImageSourceType): Deleted.
2354 * platform/graphics/cg/ImageSourceCGWin.cpp:
2355 (WebCore::MIMETypeForImageType):
2356 (WebCore::preferredExtensionForImageType):
2357 (WebCore::MIMETypeForImageSourceType): Deleted.
2358 (WebCore::preferredExtensionForImageSourceType): Deleted.
2359 * platform/graphics/cg/UTIRegistry.cpp:
2360 (WebCore::defaultSupportedImageTypes):
2361 (WebCore::additionalSupportedImageTypes):
2362 (WebCore::setAdditionalSupportedImageTypes):
2363 (WebCore::isSupportedImageType):
2364 (WebCore::supportedDefaultImageSourceTypes): Deleted.
2365 (WebCore::isSupportImageSourceType): Deleted.
2366 * platform/graphics/cg/UTIRegistry.h:
2368 2018-11-08 Megan Gardner <megan_gardner@apple.com>
2370 Adopt Reveal Framework to replace Lookup
2371 https://bugs.webkit.org/show_bug.cgi?id=191097
2373 Reviewed by Tim Horton.
2375 Reveal is not currently testable.
2377 The Reveal framework does the same job as Lookup and DataDectors.
2378 In this patch we switch from using Lookup to determine what text
2379 to select and define to using Reveal and RVItems. Since this
2380 code needs to work on older systems, and Reveal is newer, we also need
2381 to keep around the old code for old systems so that they can also
2382 continue to work. Eventually we will remove this code and also likly switch
2383 to passing RVItems across from the web process rather than making them
2387 * WebCore.xcodeproj/project.pbxproj:
2388 * editing/mac/DictionaryLookup.h:
2389 * editing/mac/DictionaryLookup.mm:
2391 Create a delegate to respond to Reveal and help draw the string or highlight.
2393 (-[WebRevealHighlight initWithHighlightRect:useDefaultHighlight:attributedString:]):
2394 (-[WebRevealHighlight setClearTextIndicator:]):
2395 (-[WebRevealHighlight revealContext:rectsForItem:]):
2396 (-[WebRevealHighlight revealContext:drawRectsForItem:]):
2397 (-[WebRevealHighlight revealContext:shouldUseDefaultHighlightForItem:]):
2398 (-[WebRevealHighlight revealContext:stopHighlightingItem:]):
2399 (WebCore::showPopupOrCreateAnimationController):
2401 Unify the code paths and utalize the Reveal framework to create and/or display the popovers.
2403 (WebCore::DictionaryLookup::showPopup):
2404 (WebCore::DictionaryLookup::animationControllerForPopup):
2406 Pipe the new callback through.
2408 (WebCore::tokenRange): Deleted.
2410 Only used with Lookup
2412 (WebCore::selectionContainsPosition): Deleted.
2414 Only used with Lookup.
2416 * editing/mac/DictionaryLookupLegacy.mm: Copied from Source/WebCore/editing/mac/DictionaryLookup.mm.
2418 Keep a copy of the previous implementation of DictionaryLookup, because Reveal not available on older
2421 (WebCore::tokenRange):
2422 (WebCore::selectionContainsPosition):
2423 (WebCore::expandSelectionByCharacters):
2424 (WebCore::showPopupOrCreateAnimationController):
2425 (WebCore::DictionaryLookup::showPopup):
2426 (WebCore::DictionaryLookup::hidePopup):
2427 (WebCore::DictionaryLookup::animationControllerForPopup):
2429 2018-11-08 Keith Rollin <krollin@apple.com>
2431 Create .xcfilelist files
2432 https://bugs.webkit.org/show_bug.cgi?id=191324
2433 <rdar://problem/45852819>
2435 Reviewed by Alex Christensen.
2437 As part of preparing for enabling XCBuild, create and use .xcfilelist
2438 files. These files are using during Run Script build phases in an
2439 Xcode project. If a Run Script build phase produces new files that are
2440 used later as inputs to subsequent build phases, XCBuild needs to know
2441 about these files. These files can be either specified in an "output
2442 files" section of the Run Script phase editor, or in .xcfilelist files
2443 that are associated with the Run Script build phase.
2445 This patch takes the second approach. It consists of three sets of changes:
2447 - Modify the DerivedSources.make files to have a
2448 'print_all_generated_files" target that produces a list of the files
2451 - Create a shell script that produces .xcfilelist files from the
2452 output of the previous step, as well as for the files created in the
2453 Generate Unified Sources build steps.
2455 - Add the new .xcfilelist files to the associated projects.
2457 Note that, with these changes, the Xcode workspace and projects can no
2458 longer be fully loaded into Xcode 9. Xcode will attempt to load the
2459 projects that have .xcfilelist files associated with them, but will
2460 fail and display a placeholder for those projects instead. It's
2461 expected that all developers are using Xcode 10 by now and that not
2462 being able to load into Xcode 9 is not a practical issue. Keep in mind
2463 that this is strictly an IDE issue, and that the projects can still be
2464 built with `xcodebuild`.
2466 Also note that the shell script that creates the .xcfilelist files can
2467 also be used to verify that the set of files that's currently checked
2468 in is up-to-date. This checking can be used as part of a check-in hook
2469 or part of check-webkit-style to sooner catch cases where the
2470 .xcfilelist files need to be regenerated.
2472 No new tests -- no changed functionality.
2474 * DerivedSources.make:
2475 * DerivedSources.xcfilelist: Added.
2476 * UnifiedSources.xcfilelist: Added.
2477 * WebCore.xcodeproj/project.pbxproj:
2479 2018-11-08 Don Olmstead <don.olmstead@sony.com>
2481 Provide generic implementation of SSLKeyGenerator functions
2482 https://bugs.webkit.org/show_bug.cgi?id=191428
2484 Reviewed by Michael Catanzaro.
2486 No new tests. No change in behavior.
2488 Both SSLKeyGeneratorGLib and SSLKeyGeneratorIOS were stub
2489 implementations. Since <keygen> is deprecated it looks unlikely that
2490 an implementation is actually needed, however an implementation is
2491 needed until support is reomved.
2495 * WebCore.xcodeproj/project.pbxproj:
2496 * platform/SSLKeyGenerator.cpp: Added.
2497 (WebCore::getSupportedKeySizes):
2498 (WebCore::signedPublicKeyAndChallengeString):
2499 * platform/SourcesGLib.txt:
2500 * platform/glib/SSLKeyGeneratorGLib.cpp: Removed.
2501 * platform/ios/SSLKeyGeneratorIOS.cpp: Removed.
2503 2018-11-07 Myles C. Maxfield <mmaxfield@apple.com>
2505 Unprefix text-decoration CSS3 properties
2506 https://bugs.webkit.org/show_bug.cgi?id=127193
2508 Reviewed by Dean Jackson.
2510 The properties are stable, and there is interop.
2512 Test: fast/css3-text/css3-text-decoration/unprefix.html
2514 * css/CSSComputedStyleDeclaration.cpp:
2515 (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
2516 * css/CSSProperties.json:
2517 * css/StyleResolver.cpp:
2518 (WebCore::shouldApplyPropertyInParseOrder):
2519 (WebCore::isValidVisitedLinkProperty):
2520 * css/parser/CSSParserFastPaths.cpp:
2521 (WebCore::isColorPropertyID):
2522 (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
2523 (WebCore::CSSParserFastPaths::isKeywordPropertyID):
2524 * css/parser/CSSPropertyParser.cpp:
2525 (WebCore::CSSPropertyParser::parseSingleValue):
2526 * editing/cocoa/DataDetection.mm:
2527 (WebCore::DataDetection::detectContentInRange):
2528 * rendering/TextDecorationPainter.cpp:
2529 (WebCore::decorationColor):
2530 * rendering/style/RenderStyle.cpp:
2531 (WebCore::RenderStyle::colorIncludingFallback const):
2532 (WebCore::RenderStyle::visitedDependentColor const):
2534 2018-11-08 Timothy Hatcher <timothy@apple.com>
2536 Add experimental support for a `supported-color-schemes` CSS property.
2537 https://bugs.webkit.org/show_bug.cgi?id=191319
2538 rdar://problem/45852261
2540 Reviewed by Dean Jackson.
2542 Tests: css-dark-mode/parse-supported-color-schemes.html
2543 css-dark-mode/supported-color-schemes-css.html
2545 * WebCore.xcodeproj/project.pbxproj:
2546 * css/CSSComputedStyleDeclaration.cpp:
2547 (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
2548 * css/CSSProperties.json:
2549 * css/CSSValueKeywords.in:
2550 * css/StyleBuilderConverter.h:
2551 (WebCore::StyleBuilderConverter::updateSupportedColorSchemes):
2552 (WebCore::StyleBuilderConverter::convertSupportedColorSchemes):
2553 * css/StyleResolver.cpp:
2554 (WebCore::StyleResolver::colorFromPrimitiveValue const):
2555 * css/parser/CSSPropertyParser.cpp:
2556 (WebCore::consumeSupportedColorSchemes):
2557 (WebCore::CSSPropertyParser::parseSingleValue):
2559 (WebCore::Document::resetLinkColor):
2560 (WebCore::Document::resetVisitedLinkColor):
2561 (WebCore::Document::resetActiveLinkColor):
2562 (WebCore::Document::processSupportedColorSchemes):
2563 (WebCore::Document::useDarkAppearance const):
2564 (WebCore::Document::styleColorOptions const):
2566 * editing/cocoa/WebContentReaderCocoa.mm:
2567 (WebCore::createFragment):
2568 * html/canvas/CanvasRenderingContext2D.cpp:
2569 (WebCore::CanvasRenderingContext2D::drawFocusIfNeededInternal):
2570 * inspector/InspectorOverlay.cpp:
2571 (WebCore::InspectorOverlay::paint):
2572 * page/FrameView.cpp:
2573 (WebCore::FrameView::useDarkAppearance const):
2574 (WebCore::FrameView::paintScrollCorner):
2575 * platform/mac/DragImageMac.mm:
2576 (WebCore::createDragImageForLink):
2577 * rendering/InlineFlowBox.cpp:
2578 (WebCore::InlineFlowBox::paintBoxDecorations):
2579 * rendering/InlineTextBox.cpp:
2580 (WebCore::InlineTextBox::paintPlatformDocumentMarker):
2581 * rendering/RenderBox.cpp:
2582 (WebCore::RenderBox::paintRootBoxFillLayers):
2583 (WebCore::RenderBox::paintBackground):
2584 * rendering/RenderElement.cpp:
2585 (WebCore::RenderElement::selectionColor const):
2586 (WebCore::RenderElement::selectionBackgroundColor const):
2587 (WebCore::RenderElement::paintFocusRing):
2588 * rendering/RenderImage.cpp:
2589 (WebCore::RenderImage::paintAreaElementFocusRing):
2590 * rendering/RenderLayerBacking.cpp:
2591 (WebCore::RenderLayerBacking::paintContents):
2592 * rendering/RenderLayerCompositor.cpp:
2593 (WebCore::RenderLayerCompositor::paintContents):
2594 * rendering/RenderListBox.cpp:
2595 (WebCore::RenderListBox::paintItemForeground):
2596 (WebCore::RenderListBox::paintItemBackground):
2597 * rendering/RenderObject.cpp:
2598 (WebCore::RenderObject::useDarkAppearance const):
2599 (WebCore::RenderObject::styleColorOptions const):
2600 * rendering/RenderObject.h:
2601 * rendering/RenderTableCell.cpp:
2602 (WebCore::RenderTableCell::paintBackgroundsBehindCell):
2603 * rendering/RenderTheme.cpp:
2604 (WebCore::RenderTheme::paint):
2605 * rendering/RenderTheme.h:
2606 (WebCore::RenderTheme::usingDarkAppearance const): Deleted.
2607 * rendering/RenderThemeMac.h:
2608 * rendering/RenderThemeMac.mm:
2609 (WebCore::RenderThemeMac::documentViewFor const):
2610 (WebCore::RenderThemeMac::adjustMenuListStyle const):
2611 (WebCore::RenderThemeMac::paintCellAndSetFocusedElementNeedsRepaintIfNecessary):
2612 (WebCore::RenderThemeMac::paintSliderThumb):
2613 (WebCore::RenderThemeMac::usingDarkAppearance const): Deleted.
2614 * rendering/style/RenderStyle.h:
2615 (WebCore::RenderStyle::supportedColorSchemes const):
2616 (WebCore::RenderStyle::setSupportedColorSchemes):
2617 (WebCore::RenderStyle::initialSupportedColorSchemes):
2618 * rendering/style/RenderStyleConstants.h:
2619 * rendering/style/StyleRareInheritedData.cpp:
2620 (WebCore::StyleRareInheritedData::StyleRareInheritedData):
2621 (WebCore::StyleRareInheritedData::operator== const):
2622 * rendering/style/StyleRareInheritedData.h:
2623 * rendering/style/StyleSupportedColorSchemes.h: Added.
2624 (WebCore::StyleSupportedColorSchemes::StyleSupportedColorSchemes):
2625 (WebCore::StyleSupportedColorSchemes::operator== const):
2626 (WebCore::StyleSupportedColorSchemes::operator!= const):
2627 (WebCore::StyleSupportedColorSchemes::isAuto const):
2628 (WebCore::StyleSupportedColorSchemes::isOnly const):
2629 (WebCore::StyleSupportedColorSchemes::colorSchemes const):
2630 (WebCore::StyleSupportedColorSchemes::add):
2631 (WebCore::StyleSupportedColorSchemes::contains const):
2632 (WebCore::StyleSupportedColorSchemes::setAllowsTransformations):
2633 (WebCore::StyleSupportedColorSchemes::allowsTransformations const):
2634 * svg/graphics/SVGImage.cpp:
2635 (WebCore::SVGImage::draw):
2637 2018-11-08 Joseph Pecoraro <pecoraro@apple.com>
2639 Web Inspector: Restrict domains at the target level instead of only at the window level
2640 https://bugs.webkit.org/show_bug.cgi?id=191344
2642 Reviewed by Devin Rousso.
2644 * inspector/WorkerInspectorController.cpp:
2645 (WebCore::WorkerInspectorController::WorkerInspectorController):
2646 Remove Inspector domain from workers. It was unused anyways.
2648 2018-11-08 Dean Jackson <dino@apple.com>
2650 Add a String literal that returns a String
2651 https://bugs.webkit.org/show_bug.cgi?id=191425
2652 <rdar://problem/45914556>
2654 Reviewed by Sam Weinig.
2656 Use _str where possible.
2660 * Modules/fetch/FetchRequest.cpp:
2661 (WebCore::computeReferrer):
2662 * Modules/indexeddb/IDBKeyPath.cpp:
2663 (WebCore::loggingString):
2664 * Modules/webdatabase/OriginLock.cpp:
2665 (WebCore::OriginLock::lockFileNameForPath):
2666 * css/CSSBasicShapes.cpp:
2667 (WebCore::updateCornerRadiusWidthAndHeight):
2668 * html/canvas/WebGL2RenderingContext.cpp:
2669 (WebCore::WebGL2RenderingContext::getParameter):
2670 * html/canvas/WebGLRenderingContext.cpp:
2671 (WebCore::WebGLRenderingContext::getParameter):
2672 * loader/LinkHeader.cpp:
2673 (WebCore::parseParameterValue):
2674 * loader/LinkLoader.cpp:
2675 (WebCore::LinkLoader::preloadIfNeeded):
2676 * page/NavigatorBase.cpp:
2677 (WebCore::NavigatorBase::platform):
2678 * platform/DateComponents.cpp:
2679 (WebCore::DateComponents::toString const):
2680 * platform/mac/PlatformEventFactoryMac.mm:
2681 (WebCore::keyIdentifierForKeyEvent):
2682 * rendering/RenderListMarker.cpp:
2683 (WebCore::RenderListMarker::suffix const):
2684 * rendering/RenderMenuList.cpp:
2685 (RenderMenuList::setText):
2686 * testing/InternalSettings.cpp:
2687 (WebCore::InternalSettings::userInterfaceDirectionPolicy):
2688 (WebCore::InternalSettings::systemLayoutDirection):
2689 * testing/Internals.cpp:
2690 (WebCore::Internals::shadowRootType const):
2691 (WebCore::Internals::getCurrentCursorInfo):
2693 2018-11-08 Jonathan Hammer <jonathan@e3software.com>
2695 Plain text drag in contenteditable is always DragOperationCopy, never DragOperationMove
2696 https://bugs.webkit.org/show_bug.cgi?id=191228
2697 <rdar://problem/45786830>
2699 Reviewed by Wenson Hsieh.
2701 DragController::beginDrag should not call cleanupAfterSystemDrag because
2702 the drag is still in progress even after the call to m_client.beginDrag()
2703 returns. This is in contrast to DragController::doSystemDrag, where the
2704 call to cleanupAfterSystemDrag is appropriate because the drag has
2705 concluded by the time m_client.startDrag() returns.
2707 Test: fast/events/drag-and-drop-move-not-copy.html
2709 * page/DragController.cpp:
2710 (WebCore::DragController::beginDrag):
2712 2018-11-08 Zalan Bujtas <zalan@apple.com>
2714 [BFC][IFC] InlineFormattingContext::Line::alignRuns() should take care of all the alignments.
2715 https://bugs.webkit.org/show_bug.cgi?id=191414
2717 Reviewed by Antti Koivisto.
2719 * layout/inlineformatting/Line.cpp:
2720 (WebCore::Layout::InlineFormattingContext::Line::close):
2722 2018-11-08 Jiewen Tan <jiewen_tan@apple.com>
2724 [WebAuthN] Import CTAP device request/response converters from Chromium
2725 https://bugs.webkit.org/show_bug.cgi?id=190784
2726 <rdar://problem/45460333>
2728 Reviewed by Brent Fulgham.
2730 This patch imports Chromium's CTAP device request/response converters:
2731 https://fidoalliance.org/specs/fido-v2.0-ps-20170927/fido-client-to-authenticator-protocol-v2.0-ps-20170927.html#message-encoding
2732 1. It directly imports the following files and suit them to WebKit's coding style:
2733 https://cs.chromium.org/chromium/src/device/fido/device_response_converter.cc?l=20&rcl=098dfd90850ffa84c27a884ab75edd2d99c4ec45
2734 https://cs.chromium.org/chromium/src/device/fido/device_response_converter.h?rcl=098dfd90850ffa84c27a884ab75edd2d99c4ec45
2735 https://cs.chromium.org/chromium/src/device/fido/authenticator_get_info_response.cc?rcl=098dfd90850ffa84c27a884ab75edd2d99c4ec45
2736 https://cs.chromium.org/chromium/src/device/fido/authenticator_get_info_response.h?rcl=098dfd90850ffa84c27a884ab75edd2d99c4ec45
2737 https://cs.chromium.org/chromium/src/device/fido/authenticator_supported_options.cc?rcl=098dfd90850ffa84c27a884ab75edd2d99c4ec45
2738 https://cs.chromium.org/chromium/src/device/fido/authenticator_supported_options.h?rcl=098dfd90850ffa84c27a884ab75edd2d99c4ec45
2739 https://cs.chromium.org/chromium/src/device/fido/ctap_request_unittest.cc?rcl=098dfd90850ffa84c27a884ab75edd2d99c4ec45
2740 https://cs.chromium.org/chromium/src/device/fido/ctap_response_unittest.cc?rcl=098dfd90850ffa84c27a884ab75edd2d99c4ec45
2741 https://cs.chromium.org/chromium/src/device/fido/fido_test_data.h?l=1&rcl=098dfd90850ffa84c27a884ab75edd2d99c4ec45
2742 2. It gathers the following methods into DeviceRequestConverter:
2743 CtapGetAssertionRequest::EncodeAsCBOR()
2744 CtapMakeCredentialRequest::EncodeAsCBOR()
2745 PublicKeyCredentialDescriptor::ConvertToCBOR()
2746 PublicKeyCredentialParams::ConvertToCBOR()
2747 PublicKeyCredentialRpEntity::ConvertToCBOR()
2748 PublicKeyCredentialUserEntity::ConvertToCBOR()
2749 3. It also apply a patch from Chromium to CBORValue:
2750 https://chromium.googlesource.com/chromium/src/+/7b6fbff35cd8e4d508f08e1cd93b4aa0a0dc402c%5E%21/
2752 Besides importing things from Chromium, it also implements UserVerificationRequirement for both
2753 PublicKeyCredentialCreationOptions and PublicKeyCredentialRequestOptions such that both options
2754 can specify more dimensions of a desired authenticator.
2756 Covered by API tests.
2759 * DerivedSources.make:
2760 * Modules/webauthn/PublicKeyCredentialCreationOptions.h:
2761 (WebCore::PublicKeyCredentialCreationOptions::AuthenticatorSelectionCriteria::encode const):
2762 (WebCore::PublicKeyCredentialCreationOptions::AuthenticatorSelectionCriteria::decode):
2763 * Modules/webauthn/PublicKeyCredentialCreationOptions.idl:
2764 * Modules/webauthn/PublicKeyCredentialRequestOptions.h:
2765 (WebCore::PublicKeyCredentialRequestOptions::encode const):
2766 (WebCore::PublicKeyCredentialRequestOptions::decode):
2767 * Modules/webauthn/PublicKeyCredentialRequestOptions.idl:
2768 * Modules/webauthn/UserVerificationRequirement.h: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredentialRequestOptions.idl.
2769 * Modules/webauthn/UserVerificationRequirement.idl: Copied from Source/WebCore/Modules/webauthn/PublicKeyCredentialRequestOptions.idl.
2770 * Modules/webauthn/cbor/CBORValue.cpp:
2771 (cbor::CBORValue::CBORValue):
2772 (cbor::CBORValue::getBool const):
2773 * Modules/webauthn/cbor/CBORValue.h:
2774 * Modules/webauthn/fido/AuthenticatorGetInfoResponse.cpp: Added.
2775 (fido::toArrayValue):
2776 (fido::AuthenticatorGetInfoResponse::AuthenticatorGetInfoResponse):
2777 (fido::AuthenticatorGetInfoResponse::setMaxMsgSize):
2778 (fido::AuthenticatorGetInfoResponse::setPinProtocols):
2779 (fido::AuthenticatorGetInfoResponse::setExtensions):
2780 (fido::AuthenticatorGetInfoResponse::setOptions):
2781 (fido::encodeAsCBOR):
2782 * Modules/webauthn/fido/AuthenticatorGetInfoResponse.h: Added.
2783 * Modules/webauthn/fido/AuthenticatorSupportedOptions.cpp: Added.
2784 (fido::AuthenticatorSupportedOptions::setSupportsResidentKey):
2785 (fido::AuthenticatorSupportedOptions::setUserVerificationAvailability):
2786 (fido::AuthenticatorSupportedOptions::setUserPresenceRequired):
2787 (fido::AuthenticatorSupportedOptions::setClientPinAvailability):
2788 (fido::AuthenticatorSupportedOptions::setIsPlatformDevice):
2789 (fido::convertToCBOR):
2790 * Modules/webauthn/fido/AuthenticatorSupportedOptions.h: Added.
2791 * Modules/webauthn/fido/DeviceRequestConverter.cpp: Added.
2792 (fido::convertRpEntityToCBOR):
2793 (fido::convertUserEntityToCBOR):
2794 (fido::convertParametersToCBOR):
2795 (fido::convertDescriptorToCBOR):
2796 (fido::encodeMakeCredenitalRequestAsCBOR):
2797 (fido::encodeGetAssertionRequestAsCBOR):
2798 (fido::encodeEmptyAuthenticatorRequest):
2799 * Modules/webauthn/fido/DeviceRequestConverter.h: Copied from Source/WebCore/Modules/webauthn/fido/FidoConstants.h.
2800 * Modules/webauthn/fido/DeviceResponseConverter.cpp: Added.
2801 (fido::convertStringToProtocolVersion):
2802 (fido::getResponseCode):
2803 (fido::getCredentialId):
2804 (fido::readCTAPMakeCredentialResponse):
2805 (fido::readCTAPGetAssertionResponse):
2806 (fido::readCTAPGetInfoResponse):
2807 * Modules/webauthn/fido/DeviceResponseConverter.h: Copied from Source/WebCore/Modules/webauthn/fido/FidoConstants.cpp.
2808 * Modules/webauthn/fido/FidoConstants.cpp:
2809 (fido::isCtapDeviceResponseCode):
2810 (fido::publicKeyCredentialTypeToString):
2811 * Modules/webauthn/fido/FidoConstants.h:
2813 * WebCore.xcodeproj/project.pbxproj:
2815 2018-11-07 Justin Michaud <justin_michaud@apple.com>
2817 CSS Painting API should pass size, arguments and input properties to paint callback
2818 https://bugs.webkit.org/show_bug.cgi?id=191309
2820 Reviewed by Chris Dumez.
2822 Call paint() callback with input properties and arguments. This patch adds a stub for
2823 the CSS Typed OM StylePropertyMapReadOnly, and passes all the arguments as strings without
2824 any syntax checking to the paint callback.
2826 Test: fast/css-custom-paint/properties.html
2829 * DerivedSources.make:
2831 * WebCore.xcodeproj/project.pbxproj:
2832 * bindings/js/JSCSSStyleValueCustom.cpp: Copied from Source/WebCore/css/CSSPaintCallback.h.
2833 (WebCore::toJSNewlyCreated):
2835 * bindings/js/WebCoreBuiltinNames.h:
2836 * css/CSSPaintCallback.h:
2837 * css/CSSPaintCallback.idl:
2838 * css/CSSPaintImageValue.cpp:
2839 (WebCore::CSSPaintImageValue::image):
2840 * css/CSSPaintImageValue.h:
2841 * css/CSSPaintSize.h: Copied from Source/WebCore/css/CSSPaintCallback.h.
2842 (WebCore::CSSPaintSize::create):
2843 (WebCore::CSSPaintSize::width const):
2844 (WebCore::CSSPaintSize::height const):
2845 (WebCore::CSSPaintSize::CSSPaintSize):
2846 * css/CSSPaintSize.idl: Copied from Source/WebCore/css/CSSPaintCallback.idl.
2847 * css/parser/CSSPropertyParserHelpers.cpp:
2848 (WebCore::CSSPropertyParserHelpers::consumeCustomPaint):
2849 * css/typedom/CSSNumericValue.h: Copied from Source/WebCore/css/CSSPaintCallback.h.
2850 * css/typedom/CSSNumericValue.idl: Copied from Source/WebCore/css/CSSPaintCallback.idl.
2851 * css/typedom/CSSStyleValue.h: Copied from Source/WebCore/css/CSSPaintCallback.h.
2852 (WebCore::CSSStyleValue::isUnitValue):
2853 (WebCore::CSSStyleValue::isUnparsedValue):
2854 * css/typedom/CSSStyleValue.idl: Copied from Source/WebCore/css/CSSPaintCallback.idl.
2855 * css/typedom/CSSUnitValue.h: Copied from Source/WebCore/css/CSSPaintCallback.h.
2856 * css/typedom/CSSUnitValue.idl: Copied from Source/WebCore/css/CSSPaintCallback.idl.
2857 * css/typedom/CSSUnparsedValue.h: Copied from Source/WebCore/css/CSSPaintCallback.h.
2858 * css/typedom/CSSUnparsedValue.idl: Copied from Source/WebCore/css/CSSPaintCallback.idl.
2859 * css/typedom/StylePropertyMapReadOnly.h: Copied from Source/WebCore/css/CSSPaintCallback.h.
2860 (WebCore::StylePropertyMapReadOnly::create):
2861 (WebCore::StylePropertyMapReadOnly::get):
2862 (WebCore::StylePropertyMapReadOnly::StylePropertyMapReadOnly):
2863 * css/typedom/StylePropertyMapReadOnly.idl: Copied from Source/WebCore/css/CSSPaintCallback.idl.
2864 * platform/graphics/CustomPaintImage.cpp:
2865 (WebCore::CustomPaintImage::CustomPaintImage):
2866 (WebCore::CustomPaintImage::doCustomPaint):
2867 * platform/graphics/CustomPaintImage.h:
2869 2018-11-07 Brent Fulgham <bfulgham@apple.com>
2871 Provide better Font fallbacks for DirectX backend
2872 https://bugs.webkit.org/show_bug.cgi?id=191412
2873 <rdar://problem/45899207>
2875 Reviewed by Zalan Bujtas.
2877 Registration of custom fonts through GDI are not always visible
2878 through the DirectWrite/GDI bridging layer. If a font is not located,
2879 locate the closest matching avialable font rather than failing.
2881 * platform/graphics/FontPlatformData.h:
2882 * platform/graphics/win/FontCustomPlatformData.cpp:
2883 (WebCore::FontCustomPlatformData::fontPlatformData): Use new font
2885 * platform/graphics/win/FontPlatformDataDirect2D.cpp:
2886 (WebCore::FontPlatformData::platformDataInit):
2887 (WebCore::FontPlatformData::platformIsEqual const):
2888 (WebCore::FontPlatformData::createFallbackFont): Added.
2890 2018-11-07 Zalan Bujtas <zalan@apple.com>
2892 Click and touch event listeners on the body don't work
2893 https://bugs.webkit.org/show_bug.cgi?id=191392
2894 <rdar://problem/5844416>
2896 Reviewed by Simon Fraser.
2898 Remove the old quirk of ignoring onclick handlers on the body and beyond.
2900 Test: fast/events/click-handler-on-body-simple.html
2902 * page/ios/FrameIOS.mm:
2903 (WebCore::Frame::nodeRespondingToClickEvents):
2905 2018-11-07 Brent Fulgham <bfulgham@apple.com>
2907 [Windows][DirectX] Update canvas code to pass more tests
2908 https://bugs.webkit.org/show_bug.cgi?id=191337
2909 <rdar://problem/45878801>
2911 Reviewed by Dean Jackson.
2913 Update the Direct2D code paths to comply with our canvas tests, improving the
2914 the test results scores to 579/770.
2916 PathDirect2D was updated with an implementation of 'addArcTo' based on work by
2917 Dirk Schulze <vbs85@gmx.de> (see https://hg.mozilla.org/mozilla-central/rev/b116b49459f8).
2919 Tests: canvas/philip/tests
2921 * platform/graphics/ImageBuffer.cpp:
2922 (WebCore::ImageBuffer::createCompatibleBuffer): Direct2D needs access to the graphics
2923 context to create the buffer.
2924 * platform/graphics/ImageBuffer.h:
2925 * platform/graphics/Path.h:
2926 * platform/graphics/win/GraphicsContextDirect2D.cpp:
2927 (WebCore::GraphicsContext::drawPattern): Flush needed.
2928 (WebCore::GraphicsContext::drawRect): Ditto.
2929 (WebCore::GraphicsContextPlatformPrivate::setMiterLimit): Correct for Direct2D definition of miter limit.
2930 (WebCore::GraphicsContextPlatformPrivate::strokeStyleProperties const): Added helper function.
2931 (WebCore::GraphicsContextPlatformPrivate::recomputeStrokeStyle): Update for new helper.
2932 (WebCore::GraphicsContext::drawLine): Ditto.
2933 (WebCore::drawWithShadowHelper): Ditto.
2934 (WebCore::GraphicsContext::fillRect): Add flush.
2935 (WebCore::GraphicsContext::platformFillRoundedRect): Update for helper.
2936 (WebCore::GraphicsContext::clipPath): Add flush.
2937 (WebCore::GraphicsContext::strokeRect): Ditto.
2938 (WebCore::GraphicsContext::drawLineForText): Update for upstream changes.
2939 (WebCore::GraphicsContext::drawLinesForText): Ditto.
2940 * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h:
2941 * platform/graphics/win/ImageBufferDirect2D.cpp:
2942 (WebCore::createCroppedImageIfNecessary): Add missing implementations.
2943 (WebCore::createBitmapImageAfterScalingIfNeeded): Ditto.
2944 (WebCore::ImageBuffer::copyImage const): Ditto.
2945 (WebCore::ImageBuffer::sinkIntoImage): Ditto.
2946 (WebCore::ImageBuffer::fastCopyImageMode): Ditto.
2947 (WebCore::ImageBuffer::sinkIntoNativeImage): Ditto.
2948 (WebCore::ImageBuffer::copyNativeImage const): Ditto.
2949 * platform/graphics/win/PathDirect2D.cpp:
2950 (WebCore::Path::operator=):
2951 (WebCore::Path::drawDidComplete): This should never have been const.
2952 It manipulates the path!
2953 (WebCore::Path::transform): Properly transform existing geometries.
2954 (WebCore::Path::openFigureAtCurrentPointIfNecessary): Added.
2955 (WebCore::Path::moveTo):
2956 (WebCore::Path::addLineTo): Make sure figure starts at a valid point.
2957 (WebCore::Path::addQuadCurveTo): Ditto.
2958 (WebCore::Path::addBezierCurveTo): Ditto.
2959 (WebCore::Path::addArcTo): Add implementation.
2960 (WebCore::Path::closeSubpath):
2961 (WebCore::drawArcSection):
2962 (WebCore::Path::addArc): Update to build large arcs out of small arc segments. If the
2963 arc is effectively a complete circle, use the ellipse drawing routines.
2964 (WebCore::Path::addRect): Make sure we start at a valid starting point.
2965 (WebCore::Path::addEllipse): Correct for definition of D2D ellipse.
2966 (WebCore::Path::drawDidComplete const): Deleted.
2967 * platform/graphics/win/SimpleFontDataDirect2D.cpp:
2968 (WebCore::Font::platformWidthForGlyph const):
2969 * rendering/svg/RenderSVGResourceClipper.cpp:
2970 (WebCore::RenderSVGResourceClipper::applyClippingToContext):
2971 * rendering/svg/RenderSVGResourceFilter.cpp:
2972 (WebCore::RenderSVGResourceFilter::applyResource):
2973 * rendering/svg/RenderSVGResourceMasker.cpp:
2974 (WebCore::RenderSVGResourceMasker::applyResource):
2975 * rendering/svg/SVGRenderingContext.cpp:
2976 (WebCore::SVGRenderingContext::createImageBuffer):
2977 * rendering/svg/SVGRenderingContext.h:
2979 2018-11-07 Wenson Hsieh <wenson_hsieh@apple.com>
2981 Add an editing command for creating and inserting child lists
2982 https://bugs.webkit.org/show_bug.cgi?id=191335
2983 <rdar://problem/45814050>
2985 Reviewed by Ryosuke Niwa.
2987 Currently, insertOrderedList and insertUnorderedList only toggle or change list state (i.e. if the selection is
2988 in an ordered or unordered list, reinserting the same list type removes the current list, and inserting a
2989 different list type changes the enclosing list).
2991 However, for certain internal clients (e.g. Mail), if the start of the selection is enclosed by a list item, we
2992 instead create a new list item and insert it after the enclosing list item, and then create a new list within
2993 that list item. Currently, this logic is implemented in Mail for legacy-WebKit-based Mail compose. This patch
2994 brings this logic into WebKit in the form of a new editing command.
2996 Tests: editing/execCommand/insert-nested-lists-in-table.html
2997 editing/execCommand/insert-nested-lists-with-pre.html
2998 editing/execCommand/insert-nested-lists.html
3001 * WebCore.xcodeproj/project.pbxproj:
3002 * editing/Editor.cpp:
3003 (WebCore::Editor::insertOrderedList):
3004 (WebCore::Editor::insertUnorderedList):
3005 * editing/EditorCommand.cpp:
3006 (WebCore::executeInsertOrderedList):
3007 (WebCore::executeInsertUnorderedList):
3008 (WebCore::executeInsertNestedUnorderedList):
3009 (WebCore::executeInsertNestedOrderedList):
3010 (WebCore::createCommandMap):
3011 * editing/IndentOutdentCommand.cpp:
3012 (WebCore::IndentOutdentCommand::outdentParagraph):
3013 * editing/InsertListCommand.cpp:
3014 (WebCore::InsertListCommand::doApply):
3015 (WebCore::InsertListCommand::editingAction const):
3016 * editing/InsertListCommand.h:
3018 Change a couple of `enum`s into `enum class`es.
3020 * editing/InsertNestedListCommand.cpp: Added.
3021 (WebCore::InsertNestedListCommand::insertUnorderedList):
3022 (WebCore::InsertNestedListCommand::insertOrderedList):
3023 (WebCore::InsertNestedListCommand::doApply):
3024 * editing/InsertNestedListCommand.h: Added.
3026 Add a new edit command to insert a new list (as a child of any containing list). If the start of the selection
3027 is in a list item, we create a new list item, move the selection into the list item, and increment its list
3028 level; otherwise, simply fall back to inserting a list.
3030 * editing/ModifySelectionListLevel.cpp:
3031 (WebCore::IncreaseSelectionListLevelCommand::doApply):
3032 (WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevel):
3033 (WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevelOrdered):
3034 (WebCore::IncreaseSelectionListLevelCommand::increaseSelectionListLevelUnordered):
3035 * editing/ModifySelectionListLevel.h:
3037 Expose this constructor, allowing other edit commands to change selection list level as a composite edit
3038 command. Also, change an `enum` into an `enum class`.
3040 (WebCore::IncreaseSelectionListLevelCommand::create):
3042 2018-11-07 Chris Dumez <cdumez@apple.com>
3044 ASSERT(renderer()) under HTMLTextAreaElement::updateValue()
3045 https://bugs.webkit.org/show_bug.cgi?id=191391
3046 <rdar://problem/34219633>
3048 Reviewed by Geoffrey Garen.
3050 Update HTMLTextFormControlElement::didEditInnerTextValue() to not call subtreeHasChanged()
3051 if the element has no renderer, similarly to what is already done in
3052 HTMLTextFormControlElement::setRangeText() and HTMLInputElement::setEditingValue().
3054 Test: editing/inserting/inset-html-textarea-without-renderer.html
3056 * html/HTMLTextFormControlElement.cpp:
3057 (WebCore::HTMLTextFormControlElement::didEditInnerTextValue):
3059 2018-11-07 Youenn Fablet <youenn@apple.com>
3061 Allow setting RTCRtpTransceiver.direction
3062 https://bugs.webkit.org/show_bug.cgi?id=191346
3064 Reviewed by Eric Carlson.
3066 Remove readonly from the direction attribute.
3067 Keep setDirection for now as it is in use, with an intent to remove it.
3068 Driven-by fix as in some cases, the rtc source track might be changed
3069 and current implementation is not expecting that.
3070 In such a case, stop observing the old track (which should no longer call us)
3071 before observing the new one.
3073 Covered by rebased tests.
3075 * Modules/mediastream/RTCRtpTransceiver.idl:
3076 * platform/mediastream/RealtimeIncomingAudioSource.cpp:
3077 (WebCore::RealtimeIncomingAudioSource::setSourceTrack):
3078 * platform/mediastream/RealtimeIncomingVideoSource.cpp:
3079 (WebCore::RealtimeIncomingVideoSource::setSourceTrack):
3081 2018-11-07 Sihui Liu <sihui_liu@apple.com>
3083 RELEASE_ASSERT(!m_hardClosedForUserDelete) fails in WebCore::IDBServer::UniqueIDBDatabase::invokeOperationAndTransactionTimer
3084 https://bugs.webkit.org/show_bug.cgi?id=191326
3085 <rdar://problem/45769269>
3087 Reviewed by Geoffrey Garen.
3089 UniqueIDBDatabase should ignore incoming requests or operations when it is already marked as
3090 hardClosedForUserDelete.
3092 Test: IndexedDB.IndexedDBUserDelete.
3094 * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3095 (WebCore::IDBServer::UniqueIDBDatabase::didPerformActivateTransactionInBackingStore):
3096 (WebCore::IDBServer::UniqueIDBDatabase::immediateCloseForUserDelete):
3097 * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
3098 (WebCore::IDBServer::UniqueIDBDatabaseConnection::establishTransaction):
3099 (WebCore::IDBServer::UniqueIDBDatabaseConnection::deleteTransaction):
3100 * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
3101 * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
3102 (WebCore::IDBServer::UniqueIDBDatabaseTransaction::commit):
3104 2018-11-07 Myles C. Maxfield <mmaxfield@apple.com>
3106 Positioned text underline can look like a strike-through
3107 https://bugs.webkit.org/show_bug.cgi?id=191341
3109 Reviewed by Simon Fraser.
3111 We should just clamp the value so it can't go above the baseline.
3113 We shouldn't do this at parse time because it's totally reasonable for text-underline-position: under to want
3114 a negative text-underline-offset. Instead, we just do it at used value time.
3116 Test: fast/css3-text/css3-text-decoration/text-underline-negative.html
3118 * style/InlineTextBoxStyle.cpp:
3119 (WebCore::computeUnderlineOffset):
3121 2018-11-07 Chris Dumez <cdumez@apple.com>
3123 Unreviewed, fix iOS build with recent SDKs.
3125 * platform/network/cocoa/ResourceResponseCocoa.mm:
3126 (WebCore::ResourceResponse::platformCertificateInfo const):
3128 2018-11-07 Chris Dumez <cdumez@apple.com>
3130 Unreviewed, fix iOS build with recent SDKs.
3132 * platform/network/cocoa/ResourceResponseCocoa.mm:
3133 (WebCore::ResourceResponse::platformCertificateInfo const):
3135 2018-11-07 Myles C. Maxfield <mmaxfield@apple.com>
3137 Dotted underlines that skip descenders are invisible
3138 https://bugs.webkit.org/show_bug.cgi?id=191403
3140 Reviewed by Simon Fraser.
3142 Turns out our underline bounding boxes had negative width. When drawing the full
3143 underline that was fine because it was handled by the 2D graphics engine, but when
3144 we try to split up the box into dots, our "for" loop was taking 0 iterations (because
3145 the end was before the start).
3147 Test: fast/css3-text/css3-text-decoration/text-underline-style.html
3149 * platform/graphics/cairo/GraphicsContextCairo.cpp:
3150 (WebCore::GraphicsContext::drawLineForText):
3151 * platform/graphics/cg/GraphicsContextCG.cpp:
3152 (WebCore::GraphicsContext::drawLineForText):
3153 * platform/graphics/win/GraphicsContextDirect2D.cpp:
3154 (WebCore::GraphicsContext::drawLineForText):
3156 2018-11-07 Andy Estes <aestes@apple.com>
3158 Crash in WebCore::PaymentRequest::canMakePayment when Apple Pay payment method data is missing
3159 https://bugs.webkit.org/show_bug.cgi?id=191331
3161 Reviewed by Alexey Proskuryakov.
3163 Apple Pay requires merchants specify an ApplePayRequest (which contains several required
3164 fields) as payment method data when constructing a new PaymentRequest. If the
3165 ApplePayRequest is missing required fields, or is missing entirely, canMakePayment() should
3168 We would properly resolve to false when an ApplePayRequest was specified with missing
3169 required fields, but we would crash when the ApplePayRequest was missing entirely.
3171 This patch fixes the crash by checking for an empty JSValue before trying to convert it to
3172 an ApplePayRequest struct. Because we stringify ApplePayRequests in the PaymentRequest
3173 constructor then parse them again in canMakePayments, an undefined or null payment method
3174 data stringifies to a null String, which then parses to an empty JSValue.
3176 Added test case to http/tests/paymentrequest/payment-request-canmakepayment-method.https.html.
3178 * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
3179 (WebCore::ApplePayPaymentHandler::convertData):
3180 * Modules/paymentrequest/PaymentRequest.cpp:
3181 (WebCore::PaymentRequest::canMakePayment):
3183 2018-11-07 Simon Fraser <simon.fraser@apple.com>
3185 Revert 237849: it breaks MotionMark
3186 https://bugs.webkit.org/show_bug.cgi?id=191398
3188 Reviewed by Simon Fraser.
3190 This change broke painting while the test is running.
3192 * rendering/RenderLayerCompositor.cpp:
3193 (WebCore::RenderLayerCompositor::updateScrollCoordinatedStatus):
3195 2018-11-07 Don Olmstead <don.olmstead@sony.com>
3197 Simplify macros in platform
3198 https://bugs.webkit.org/show_bug.cgi?id=191378
3200 Reviewed by Michael Catanzaro.
3202 No new tests. No change in behavior.
3204 Modifies a few cases where a platform macro could be simplified.
3206 * page/EventHandler.cpp:
3207 * platform/network/DNS.h:
3208 * platform/network/NetworkStateNotifier.h:
3210 2018-11-07 Simon Fraser <simon.fraser@apple.com>
3212 Some WK1 repaint tests are flakey
3213 https://bugs.webkit.org/show_bug.cgi?id=190627
3215 Reviewed by Zalan Bujtas.
3217 Repaint tracking in GraphicsLayerCA was sensitive to whether there were already dirty
3218 rects on the layer, since tracking happened after checks against existing dirty rects.
3219 This caused some WK1 repaint tests to be flakey, since there's no guarantee that
3220 no repaints happen between the last layer flush and a test calling startTrackingRepaints().
3222 Fix by moving the repaint tracking to before the checks against existing dirty rects.
3223 This is more similar to how repaint tracking on FrameView works.
3225 * platform/graphics/ca/GraphicsLayerCA.cpp:
3226 (WebCore::GraphicsLayerCA::setNeedsDisplayInRect):
3228 2018-11-07 Dean Jackson <dino@apple.com>
3230 [iOS] WebGL leaks exact GPU type
3231 https://bugs.webkit.org/show_bug.cgi?id=191393
3233 Reviewed by Tim Horton.
3235 The fully exposed renderer info shouldn't be necessary
3236 on iOS, where the GPUs and drivers are consistent
3237 enough that people shouldn't need to write code specifically
3238 for them. Reduce the ability to fingerprint by simply
3239 returning "Apple GPU".
3241 The other option would have been to disable the extension,
3242 but I think it might still be useful to know you're on
3245 Test: fast/canvas/webgl/hide-some-renderer-info.html
3247 * html/canvas/WebGL2RenderingContext.cpp: Return "Apple GPU"
3249 (WebCore::WebGL2RenderingContext::getParameter):
3250 * html/canvas/WebGLRenderingContext.cpp: Ditto.
3251 (WebCore::WebGLRenderingContext::getParameter):
3253 2018-11-07 Daniel Bates <dabates@apple.com>
3255 Override +[UIKeyboard isInHardwareKeyboardMode] in WebKitTestRunner and DumpRenderTree
3256 https://bugs.webkit.org/show_bug.cgi?id=190141
3258 Reviewed by Darin Adler.
3260 Remove the runtime application check for WebKitTestRunner as we no longer need this
3261 now that WebKitTestRunner and DumpRenderTree override +[UIKeyboard isInHardwareKeyboardMode].
3263 * platform/RuntimeApplicationChecks.h:
3264 * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
3265 (WebCore::IOSApplication::isWebKitTestRunner): Deleted.
3267 2018-11-07 Joseph Pecoraro <pecoraro@apple.com>
3269 Web Inspector: Fix "Javascript" => "JavaScript" enum in protocol generated objects
3270 https://bugs.webkit.org/show_bug.cgi?id=191340
3272 Reviewed by Devin Rousso.
3274 * inspector/agents/InspectorMemoryAgent.cpp:
3275 (WebCore::InspectorMemoryAgent::collectSample):
3278 2018-11-07 Dan Bernstein <mitz@apple.com>
3280 Add a pseudoclass that matches img elements that are backed by an attachment
3281 https://bugs.webkit.org/show_bug.cgi?id=191286
3282 <rdar://problem/45823554>
3284 Reviewed by Dean Jackson.
3286 Test: fast/css/has-attachment.html
3288 Added a :has-attachment pseudoclass, enabled only when the attachment element is enabled at
3289 runtime, that matches elements (currently only img elements qualify) that have an attachment
3290 element in their shadow DOM.
3292 * css/CSSSelector.cpp:
3293 (WebCore::CSSSelector::selectorText const): Handle the new PseudoClassHasAttachment value.
3294 * css/CSSSelector.h: Added a new value to the PseudoClassType enum.
3296 * css/SelectorChecker.cpp:
3297 (WebCore::SelectorChecker::checkOne const): Check the new PseudoClassHasAttachment value
3298 using the new hasAttachment test function.
3300 * css/SelectorCheckerTestFunctions.h:
3301 (WebCore::hasAttachment): Added. Tests if the element is an img element that has an
3304 * css/SelectorPseudoClassAndCompatibilityElementMap.in: Added has-attachment.
3306 * css/parser/CSSParserContext.cpp:
3307 (WebCore::CSSParserContext::CSSParserContext): Initialize new attachmentEnabled member based
3308 on RuntimeEnabledFeatures.
3309 (WebCore::operator==): Compare new attachmentEnabled member.
3310 * css/parser/CSSParserContext.h:
3311 (WebCore::CSSParserContextHash::hash): Include new attachmentEnabled member.
3313 * css/parser/CSSSelectorParser.cpp:
3314 (WebCore::CSSSelectorParser::consumePseudo): Reject :has-attachment if the attachment
3315 element is not enabled.
3317 * cssjit/SelectorCompiler.cpp:
3318 (WebCore::SelectorCompiler::addPseudoClassType): Handle PseudoClassHasAttachment.
3320 2018-11-07 Don Olmstead <don.olmstead@sony.com>
3322 Make generic MainThreadSharedTimer implementation
3323 https://bugs.webkit.org/show_bug.cgi?id=191327
3325 Reviewed by Michael Catanzaro.
3327 No new tests. No change in behavior.
3329 Moves generic implementation for MainThreadSharedTimerGlib.cpp into
3330 MainThreadSharedTimer.cpp.
3332 * platform/MainThreadSharedTimer.cpp:
3333 (WebCore::MainThreadSharedTimer::MainThreadSharedTimer):
3334 (WebCore::MainThreadSharedTimer::setFireInterval):
3335 (WebCore::MainThreadSharedTimer::stop):
3336 (WebCore::MainThreadSharedTimer::invalidate):
3337 * platform/MainThreadSharedTimer.h:
3338 * platform/SourcesGLib.txt:
3339 * platform/glib/MainThreadSharedTimerGLib.cpp: Removed.
3341 2018-11-07 Ali Juma <ajuma@chromium.org>
3343 IntersectionObserverEntry doesn't keep JS wrappers of rects alive
3344 https://bugs.webkit.org/show_bug.cgi?id=191330
3346 Reviewed by Chris Dumez.
3348 Retain wrappers of each rect in an IntersectionObserverEntry as long as the entry's wrapper
3349 is alive, by adding these wrappers as opaque roots.
3351 Test: intersection-observer/intersection-observer-entry-keeps-js-wrappers-of-rects-alive.html
3353 * bindings/js/JSIntersectionObserverEntryCustom.cpp:
3354 (WebCore::JSIntersectionObserverEntry::visitAdditionalChildren):
3355 * dom/DOMRectReadOnly.idl:
3356 * page/IntersectionObserverEntry.h:
3357 (WebCore::IntersectionObserverEntry::rootBounds const): Make this return a raw pointer instead of a RefPtr so that it
3358 can be called in JSIntersectionObserverEntry::visitAdditionalChildren, which can be called from non-main threads.
3359 (WebCore::IntersectionObserverEntry::boundingClientRect const): Ditto.
3360 (WebCore::IntersectionObserverEntry::intersectionRect const): Ditto.
3362 2018-11-07 Simon Fraser <simon.fraser@apple.com>
3364 TileController::tileSize() should not have side effects
3365 https://bugs.webkit.org/show_bug.cgi?id=191349
3367 Reviewed by Zalan Bujtas.
3369 Calling TileController::tileSize() would recompute a new tile size and set m_tileSizeLocked,
3370 which caused test failures if logging was enabled when running tests.
3372 * platform/graphics/ca/TileController.cpp:
3373 (WebCore::TileController::tileSize const):
3374 (WebCore::TileController::computeTileSize):
3375 * platform/graphics/ca/TileController.h:
3376 * platform/graphics/ca/TileGrid.cpp:
3377 (WebCore::TileGrid::revalidateTiles):
3379 2018-11-07 Charlie Turner <cturner@igalia.com>
3381 [EME][GStreamer] Ensure key id buffers are present and simplify lifetime management of ClearKey class.
3382 https://bugs.webkit.org/show_bug.cgi?id=191157
3384 Reviewed by Xabier Rodriguez-Calvar.
3386 This is in preparation for moving the clearkey decryptor behind a
3387 new decrypt API in CDMInstance, which will be sent into the