1 2018-02-09 Andy Estes <aestes@apple.com>
3 [Payment Request] Crash in PaymentRequest::canMakePayment() when Apple Pay payment method data is missing required fields
4 https://bugs.webkit.org/show_bug.cgi?id=182631
8 PaymentRequest::canMakePayment() needs to parse each payment method's serialized data to
9 determine if it is a supported payment method. If parsing fails by raising an exception, we
10 intend to skip over that payment method and try the next one. If all payment method data
11 fail to parse, we resolve the returned promise with false. At no point do we intend to
12 propagate the parsing exception up to the calling script, however.
14 Even though we intend to swallow any exceptions from parsing, we failed to clear the
15 JavaScript VM's exception state. The next time WebCore tries to execute JavaScript, a
16 release assertion is raised due to seeing an unexpected exception in the VM.
18 Fix this by using a CatchScope in PaymentRequest::canMakePayment(), and calling
19 CatchScope::clearException() in the places we intend to swallow exceptions.
21 Added a test case to http/tests/paymentrequest/payment-request-canmakepayment-method.https.html.
23 * Modules/paymentrequest/PaymentRequest.cpp:
24 (WebCore::PaymentRequest::canMakePayment):
26 2018-02-09 Zalan Bujtas <zalan@apple.com>
28 [RenderTreeBuilder] Move multicolumn descendant/sibling removal logic to RenderTreeBuilder
29 https://bugs.webkit.org/show_bug.cgi?id=182628
30 <rdar://problem/37369528>
32 Reviewed by Antti Koivisto.
34 No change in functionality
36 * rendering/RenderBlockFlow.cpp:
37 (WebCore::RenderBlockFlow::takeChild):
38 * rendering/RenderFragmentedFlow.h:
39 * rendering/RenderMultiColumnFlow.cpp:
40 (WebCore::RenderMultiColumnFlow::handleSpannerRemoval): Deleted.
41 (WebCore::RenderMultiColumnFlow::fragmentedFlowRelativeWillBeRemoved): Deleted.
42 * rendering/RenderMultiColumnFlow.h:
43 * rendering/updating/RenderTreeBuilder.cpp:
44 (WebCore::RenderTreeBuilder::multiColumnRelativeWillBeRemoved):
45 * rendering/updating/RenderTreeBuilder.h:
46 * rendering/updating/RenderTreeBuilderMultiColumn.cpp:
47 (WebCore::RenderTreeBuilder::MultiColumn::handleSpannerRemoval):
48 (WebCore::RenderTreeBuilder::MultiColumn::multiColumnRelativeWillBeRemoved):
49 * rendering/updating/RenderTreeBuilderMultiColumn.h:
51 2018-02-09 Youenn Fablet <youenn@apple.com>
53 Add support for cache storage of blob response
54 https://bugs.webkit.org/show_bug.cgi?id=182637
56 Reviewed by Brady Eidson.
58 Covered by updated WPT test.
59 When putting a blob response in cache, create a readable stream to easily get the body.
60 Make clear that caching form data is not supported.
62 * Modules/cache/DOMCache.cpp:
63 (WebCore::DOMCache::put):
64 * Modules/fetch/FetchBody.h:
65 (WebCore::FetchBody::isBlob const):
66 (WebCore::FetchBody::isFormData const):
67 * Modules/fetch/FetchResponse.h:
69 2018-02-09 Youenn Fablet <youenn@apple.com>
71 Make CoreAudioCaptureSource error logging be release logging
72 https://bugs.webkit.org/show_bug.cgi?id=182614
74 Reviewed by Eric Carlson.
76 No change of behavior.
78 * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
79 (WebCore::CoreAudioSharedUnit::addEchoCancellationSource):
80 (WebCore::CoreAudioSharedUnit::setupAudioUnit):
81 (WebCore::CoreAudioSharedUnit::configureMicrophoneProc):
82 (WebCore::CoreAudioSharedUnit::configureSpeakerProc):
83 (WebCore::CoreAudioSharedUnit::checkTimestamps):
84 (WebCore::CoreAudioSharedUnit::provideSpeakerData):
85 (WebCore::CoreAudioSharedUnit::processMicrophoneSamples):
86 (WebCore::CoreAudioSharedUnit::cleanupAudioUnit):
87 (WebCore::CoreAudioSharedUnit::reconfigureAudioUnit):
88 (WebCore::CoreAudioSharedUnit::startInternal):
89 (WebCore::CoreAudioSharedUnit::verifyIsCapturing):
90 (WebCore::CoreAudioSharedUnit::stopInternal):
91 (WebCore::CoreAudioSharedUnit::defaultInputDevice):
93 2018-02-09 Carlos Garcia Campos <cgarcia@igalia.com>
95 Add a way to check if a host is an IP address
96 https://bugs.webkit.org/show_bug.cgi?id=182427
98 Reviewed by Alex Christensen.
100 There are several places where this is needed. We currently just assume that any host ending in a digit is an IP
101 address, except in PublicSuffix where platform specific code is used. This patch adds URL::hostIsIPAddress()
102 platform specific implementations, falling back to current assumption if there isn't an implementation for the
105 * page/OriginAccessEntry.cpp:
106 (WebCore::OriginAccessEntry::OriginAccessEntry): Use URL::hostIsIPAddress().
108 (WebCore::URL::hostIsIPAddress): Fallback implementation.
110 * platform/mac/PublicSuffixMac.mm:
111 (WebCore::topPrivatelyControlledDomain): Use URL::hostIsIPAddress().
112 * platform/mac/URLMac.mm:
113 (WebCore::URL::hostIsIPAddress): Move implementation from PublicSuffixMac.mm.
114 * platform/network/curl/CookieUtil.cpp:
115 (WebCore::CookieUtil::isIPAddress): Use URL::hostIsIPAddress().
116 * platform/soup/URLSoup.cpp:
117 (WebCore::URL::hostIsIPAddress): Use g_hostname_is_ip_address().
119 2018-02-08 Philippe Normand <pnormand@igalia.com>
121 [GStreamer][WebAudio] Winamp2-js woes
122 https://bugs.webkit.org/show_bug.cgi?id=182612
124 Reviewed by Xabier Rodriguez Calvar and Carlos Alberto Lopez Perez.
126 Test: webaudio/silence-after-playback.html
128 * platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:
129 (WebCore::copyGStreamerBuffersToAudioChannel): Clear the bus if
130 the adapter can't provide enough data. This prevents a nasty noise
131 after playing songs in Winamp.
132 (WebCore::AudioSourceProviderGStreamer::setClient): No need to set
133 the client more than once, this fixes runtime warnings.
135 2018-02-09 Zalan Bujtas <zalan@apple.com>
137 [RenderTreeBuilder] Move multicolumn spanner mutation logic to RenderTreeBuilder
138 https://bugs.webkit.org/show_bug.cgi?id=182627
139 <rdar://problem/37367284>
141 Reviewed by Antti Koivisto.
143 Move spanner triggered mutation logic to RenderTreeBuilder.
145 No change in functionality.
147 * rendering/RenderFragmentedFlow.h:
148 * rendering/RenderMultiColumnFlow.cpp:
149 (WebCore::RenderMultiColumnFlow::isColumnSpanningDescendant const):
150 (WebCore::findSetRendering): Deleted.
151 (WebCore::isValidColumnSpanner): Deleted.
152 (WebCore::spannerPlacehoderCandidate): Deleted.
153 (WebCore::RenderMultiColumnFlow::processPossibleSpannerDescendant): Deleted.
154 (WebCore::RenderMultiColumnFlow::fragmentedFlowDescendantInserted): Deleted.
155 * rendering/RenderMultiColumnFlow.h:
156 * rendering/RenderObject.cpp:
157 (WebCore::RenderObject::insertedIntoTree):
158 * rendering/updating/RenderTreeBuilder.cpp:
159 (WebCore::RenderTreeBuilder::multiColumnDescendantInserted):
160 * rendering/updating/RenderTreeBuilder.h:
161 * rendering/updating/RenderTreeBuilderMultiColumn.cpp:
162 (WebCore::findSetRendering):
163 (WebCore::spannerPlacehoderCandidate):
164 (WebCore::isValidColumnSpanner):
165 (WebCore::RenderTreeBuilder::MultiColumn::multiColumnDescendantInserted):
166 (WebCore::RenderTreeBuilder::MultiColumn::processPossibleSpannerDescendant):
167 * rendering/updating/RenderTreeBuilderMultiColumn.h:
169 2018-02-09 Javier Fernandez <jfernandez@igalia.com>
171 [css-align] Implement the new behavior of 'legacy' for justify-items
172 https://bugs.webkit.org/show_bug.cgi?id=172712
174 Reviewed by Antti Koivisto.
176 The syntax of the 'justify-items' property accepts a new 'legacy' value,
177 replacing the 'auto' value which is now parsed as invalid.
179 https://github.com/w3c/csswg-drafts/issues/1318
181 This change affects also to the 'place-items' shorthand, which doesn't
182 accept 'auto' and, for the time being, neither 'legacy'.
184 Since the new value 'legacy' is also the default value, I don't expect
185 this change to break content of sites currently using the 'justify-items'
188 No new tests, rebaselined existing test.
190 * css/CSSComputedStyleDeclaration.cpp:
191 (WebCore::valueForItemPositionWithOverflowAlignment):
192 (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
193 * css/CSSPrimitiveValueMappings.h:
194 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
195 (WebCore::CSSPrimitiveValue::operator ItemPosition const):
196 * css/CSSProperties.json:
197 * css/StyleResolver.cpp:
198 (WebCore::StyleResolver::adjustRenderStyle):
199 * css/parser/CSSPropertyParser.cpp:
201 (WebCore::isNormalOrStretch):
202 (WebCore::consumeSelfPositionOverflowPosition):
203 (WebCore::consumeJustifyItems):
204 (WebCore::consumeSimplifiedDefaultPosition):
205 (WebCore::consumeSimplifiedSelfPosition):
206 (WebCore::CSSPropertyParser::consumePlaceItemsShorthand):
207 (WebCore::CSSPropertyParser::consumePlaceSelfShorthand):
208 * rendering/RenderFlexibleBox.cpp:
209 (WebCore::alignmentOffset):
210 * rendering/RenderGrid.cpp:
211 (WebCore::RenderGrid::columnAxisPositionForChild const):
212 (WebCore::RenderGrid::rowAxisPositionForChild const):
213 * rendering/style/RenderStyle.cpp:
214 (WebCore::resolvedSelfAlignment):
215 (WebCore::RenderStyle::resolvedJustifyItems const):
216 * rendering/style/RenderStyle.h:
217 (WebCore::RenderStyle::initialJustifyItems):
218 * rendering/style/RenderStyleConstants.h:
219 * rendering/style/StyleRareNonInheritedData.cpp:
220 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
222 2018-02-09 Yacine Bandou <yacine.bandou_ext@softathome.com>
224 [EME][GStreamer] Add support for encrypted caps in GStreamerUtilities
225 https://bugs.webkit.org/show_bug.cgi?id=181990
227 Reviewed by Xabier Rodriguez-Calvar.
229 Add the support of encrypted caps in GStreamerUtilities.
230 Refactor the manner that the caps are handled, such as how to extract the resolution
231 from the video caps or how to check if the caps are encrypted.
233 The attachTrack function in PlaybackPipeline doesn't need the "structure" parameter,
234 it is already included in the "caps" parameter.
236 Replace the "mediaType" parameter by the "caps" parameter in reattachTrack function,
237 it allows to use the new functions that handle the caps in GStreamerUtilities.
240 media/encrypted-media/clearKey/clearKey-cenc-audio-playback-mse.html
241 media/encrypted-media/clearKey/clearKey-cenc-video-playback-mse.html
243 * platform/graphics/gstreamer/GStreamerUtilities.cpp:
244 (WebCore::getVideoSizeAndFormatFromCaps): Add the support of video encrypted caps.
245 (WebCore::getVideoResolutionFromCaps):
246 (WebCore::capsMediaType):
247 (WebCore::doCapsHaveType):
248 (WebCore::areEncryptedCaps): Add a new functions in order to handle the caps properly.
249 * platform/graphics/gstreamer/GStreamerUtilities.h:
250 * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
251 (WebCore::AppendPipeline::parseDemuxerSrcPadCaps):
252 * platform/graphics/gstreamer/mse/GStreamerMediaDescription.cpp:
253 (WebCore::GStreamerMediaDescription::codec const):
254 (WebCore::GStreamerMediaDescription::isVideo const):
255 (WebCore::GStreamerMediaDescription::isAudio const):
256 * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
257 (WebCore::MediaPlayerPrivateGStreamerMSE::trackDetected):
258 * platform/graphics/gstreamer/mse/PlaybackPipeline.cpp:
259 (WebCore::PlaybackPipeline::attachTrack):
260 (WebCore::PlaybackPipeline::reattachTrack):
261 * platform/graphics/gstreamer/mse/PlaybackPipeline.h:
262 * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
263 (webKitMediaSrcUpdatePresentationSize): Refactor some parts by using the new added functions.
265 2018-02-09 Philippe Normand <pnormand@igalia.com>
267 [GStreamer] Layout test fast/replaced/border-radius-clip.html crashes with GStreamer-CRITICAL **: gst_segment_to_stream_time: assertion 'segment->format == format' failed in gst_segment_to_stream_time()
268 https://bugs.webkit.org/show_bug.cgi?id=176802
270 Reviewed by Xabier Rodriguez Calvar.
272 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
273 (WebCore::MediaPlayerPrivateGStreamer::load): Prevent the player from loading animated gifs.
275 2018-02-09 Antti Koivisto <antti@apple.com>
277 Move compiled selectors to StyleRule
278 https://bugs.webkit.org/show_bug.cgi?id=182602
280 Reviewed by Zalan Bujtas.
282 Currently they are owned by RuleData. Several RuleData objects can refer to the same StyleRule, requiring recompilation.
283 Compiled selectors are context-independent so they can be shared between all clients.
285 * WebCore.xcodeproj/project.pbxproj:
286 * css/CSSSelectorList.cpp:
287 (WebCore::CSSSelectorList::listSize const):
289 Compute the number of complex selectors on the list.
291 * css/CSSSelectorList.h:
292 * css/DocumentRuleSets.cpp:
293 (WebCore::makeRuleSet):
294 (WebCore::DocumentRuleSets::classInvalidationRuleSets const):
296 Pass around list index along with the selector index (compiled selectors are found by list index).
298 * css/ElementRuleCollector.cpp:
299 (WebCore::ElementRuleCollector::ruleMatches):
301 (WebCore::RuleData::RuleData):
303 (WebCore::RuleData::compilationStatus const): Deleted.
304 (WebCore::RuleData::compiledSelectorCodeRef const): Deleted.
305 (WebCore::RuleData::setCompiledSelector const): Deleted.
306 (WebCore::RuleData::~RuleData): Deleted.
307 (WebCore::RuleData::compiledSelectorUsed const): Deleted.
309 (WebCore::StyleRule::StyleRule):
312 Add CompiledSelector member.
314 * cssjit/CompiledSelector.h: Added.
316 Move to a header of its own to keeps dependencies simple.
318 (WebCore::SelectorCompilationStatus::SelectorCompilationStatus):
319 (WebCore::SelectorCompilationStatus::operator Status const):
320 * cssjit/SelectorCompiler.h:
322 (WebCore::SelectorCompilationStatus::SelectorCompilationStatus): Deleted.
323 (WebCore::SelectorCompilationStatus::operator Status const): Deleted.
325 2018-02-08 Antoine Quint <graouts@apple.com>
327 [Web Animations] Always expose "composite" in output of getKeyframes()
328 https://bugs.webkit.org/show_bug.cgi?id=182600
330 Reviewed by Dean Jackson.
332 The Web Animations spec has changed and whereas the output of getKeyframes() would not feature the "composite" property
333 for "null" values, it now lists "composite" in all cases.
335 To support this, we needed to fix an issue in the code generator such that a "null" default value for an optional enum
338 * animation/KeyframeEffect.cpp:
339 (WebCore::KeyframeEffect::getKeyframes):
340 * animation/KeyframeEffect.h:
341 * animation/KeyframeEffect.idl:
342 * bindings/scripts/CodeGeneratorJS.pm:
343 (GenerateDefaultValue):
344 * bindings/scripts/test/JS/JSTestObj.cpp:
345 (WebCore::convertDictionary<TestObj::Dictionary>):
346 (WebCore::convertDictionaryToJS):
347 * bindings/scripts/test/TestObj.idl:
349 2018-02-08 Youenn Fablet <youenn@apple.com>
351 CoreAudioCaptureSourceIOSListener should be a WebProcess singleton
352 https://bugs.webkit.org/show_bug.cgi?id=182606
353 <rdar://problem/37355283>
355 Reviewed by Eric Carlson.
357 Not testable right now as this relies on iOS specific Core Audio stack.
358 Efforts should be made to somehow mock that part and mock interruptions.
360 Made CoreAudioCaptureSourceFactoryIOS responsible to receive iOS interruption messages.
361 Before the patch, individual capture sources were receiving these messages.
362 When there is only one capture source per process this is fine but with more capture sources,
363 this is messing up things as they all share the same shared unit and we would try to interrupt it or resume it several times.
365 Also, if we are suspended and there is no more capture source, the shared unit will remain suspended indefinitely, as we will
366 not process the interruption messages.
367 With the patch, we always process the messages.
368 We still go through the active source as done now to limit the changes.
369 In case of no source, we go to the shared unit.
370 In the future, we should directly go to the shared unit and clients of the shared unit should see their state being updated.
372 As a way to prevent staying suspended on iOS, we unsuspend ourselves in CoreAudioCaptureSource constructor.
373 This is fine as this constructor is only called when getUserMedia grants access to the camera which always goes to the UIProcess.
374 And the UIProcess is only processing getUserMedia calls if the WebProcess is foregrounded.
376 * platform/mediastream/ios/CoreAudioCaptureSourceIOS.h:
377 * platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm:
378 (-[WebCoreAudioCaptureSourceIOSListener initWithCallback:]):
379 (WebCore::CoreAudioCaptureSourceFactoryIOS::CoreAudioCaptureSourceFactoryIOS):
380 (WebCore::CoreAudioCaptureSourceFactoryIOS::~CoreAudioCaptureSourceFactoryIOS):
381 (WebCore::CoreAudioCaptureSourceFactory::singleton):
382 * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
383 (WebCore::CoreAudioCaptureSourceFactory::singleton):
384 (WebCore::CoreAudioCaptureSource::create):
385 (WebCore::CoreAudioCaptureSourceFactory::beginInterruption):
386 (WebCore::CoreAudioCaptureSourceFactory::endInterruption):
387 (WebCore::CoreAudioCaptureSourceFactory::scheduleReconfiguration):
388 (WebCore::CoreAudioCaptureSource::factory):
389 (WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource):
390 (WebCore::CoreAudioCaptureSource::~CoreAudioCaptureSource):
391 (WebCore::CoreAudioCaptureSource::startProducingData):
392 (WebCore::CoreAudioCaptureSource::scheduleReconfiguration):
393 (WebCore::CoreAudioCaptureSource::beginInterruption):
394 (WebCore::CoreAudioCaptureSource::endInterruption):
395 * platform/mediastream/mac/CoreAudioCaptureSource.h:
396 (WebCore::CoreAudioCaptureSourceFactory::setCoreAudioActiveSource):
397 (WebCore::CoreAudioCaptureSourceFactory::unsetCoreAudioActiveSource):
398 (WebCore::CoreAudioCaptureSourceFactory::coreAudioActiveSource):
400 2018-02-08 Chris Dumez <cdumez@apple.com>
402 There should be a way to disable [OverrideBuiltins] behavior in a given DOMWrapperWorld
403 https://bugs.webkit.org/show_bug.cgi?id=182524
404 <rdar://problem/9057327>
406 Reviewed by Ryosuke Niwa.
408 Add new flag on DOMWrapperWorld indicating if the [OverrideBuiltins] behavior should
409 be enabled in this world or not. The behavior is enabled by default for Web-compatibility.
410 This flag is queried in accessVisibleNamedProperty() when doing the named property
413 Covered by new API test.
415 * bindings/js/DOMWrapperWorld.h:
416 (WebCore::DOMWrapperWorld::disableOverrideBuiltinsBehavior):
417 (WebCore::DOMWrapperWorld::shouldDisableOverrideBuiltinsBehavior const):
418 * bindings/js/JSDOMAbstractOperations.h:
419 (WebCore::accessVisibleNamedProperty):
421 2018-02-08 Per Arne Vollan <pvollan@apple.com>
423 Move WebVideoFullscreenController from WebCore to WebKitLegacy.
424 https://bugs.webkit.org/show_bug.cgi?id=182615
426 Reviewed by Eric Carlson.
428 It is only used by WK1. Also there are a few references to NSApp in WebVideoFullscreenController.mm.
429 Ideally, we should not reference NSApp in WebCore.
431 No new tests. No change in behavior.
434 * WebCore.xcodeproj/project.pbxproj:
435 * html/HTMLMediaElement.h:
436 * platform/mac/WebVideoFullscreenController.h: Removed.
437 * platform/mac/WebVideoFullscreenController.mm: Removed.
438 * platform/mac/WebVideoFullscreenHUDWindowController.h: Removed.
439 * platform/mac/WebVideoFullscreenHUDWindowController.mm: Removed.
440 * platform/mac/WebWindowAnimation.h: Removed.
441 * platform/mac/WebWindowAnimation.mm: Removed.
443 2018-02-08 Chris Dumez <cdumez@apple.com>
445 Form submission after navigation fails when decidePolicyForNavigationAction is async
446 https://bugs.webkit.org/show_bug.cgi?id=182412
447 <rdar://problem/35181099>
449 Reviewed by Alex Christensen.
451 When the form is submitted and schedules the load in an iframe that is already loading,
452 FrameLoader::stopLoading() is called as expected. However, because policy checks can
453 now be asynchronous, stopLoading() also needs to stop pending policy checks. Otherwise,
454 continueLoadAfterNavigationPolicy() gets called for a cancelled load and we're in trouble
455 because the FrameLoader was reused for another load since then.
457 Test: http/tests/navigation/sync-form-submit-iframe.html
459 * loader/FrameLoader.cpp:
460 (WebCore::FrameLoader::stopLoading):
462 2018-02-08 Zalan Bujtas <zalan@apple.com>
464 [RenderTreeBuilder] Do not use RenderTreeBuilder::current() in RenderRubyRun::takeChild
465 https://bugs.webkit.org/show_bug.cgi?id=182607
466 <rdar://problem/37355944>
468 Reviewed by Sam Weinig.
470 No change in functionality.
472 * rendering/RenderRubyRun.cpp:
473 (WebCore::RenderRubyRun::takeChild):
475 2018-02-08 Antti Koivisto <antti@apple.com>
477 Use invalidation rulesets for attribute selectors
478 https://bugs.webkit.org/show_bug.cgi?id=182569
480 Reviewed by Zalan Bujtas.
482 Attribute change style invalidation should use invalidation rulesets, similarly how class change invalidation already does.
483 We'll invalidate fewer unnecessary elements immediately and enable more significant future gains.
485 * css/DocumentRuleSets.cpp:
486 (WebCore::DocumentRuleSets::collectFeatures const):
487 (WebCore::DocumentRuleSets::classInvalidationRuleSets const):
488 (WebCore::DocumentRuleSets::attributeInvalidationRuleSets const):
490 Make and cache invalidation RuleSets for an attribute.
492 (WebCore::DocumentRuleSets::ancestorAttributeRulesForHTML const): Deleted.
493 * css/DocumentRuleSets.h:
494 * css/RuleFeature.cpp:
495 (WebCore::RuleFeatureSet::recursivelyCollectFeaturesFromSelector):
497 Collect attribute selectors along with match elements.
499 (WebCore::RuleFeatureSet::collectFeatures):
500 (WebCore::RuleFeatureSet::add):
501 (WebCore::RuleFeatureSet::registerContentAttribute):
503 Separate hash to deal with invalidation of content:attr(foo) special case.
505 (WebCore::RuleFeatureSet::clear):
506 (WebCore::RuleFeatureSet::shrinkToFit):
507 (WebCore::makeAttributeSelectorKey): Deleted.
509 (WebCore::RuleFeature::RuleFeature):
510 * css/StyleBuilderCustom.h:
511 (WebCore::StyleBuilderCustom::applyValueContent):
512 (WebCore::StyleBuilderCustom::applyValueAlt):
514 Use registerContentAttribute()
516 * html/HTMLEmbedElement.cpp:
517 (WebCore::hasTypeOrSrc):
518 (WebCore::HTMLEmbedElement::parseAttribute):
520 Invalidate style if both type and src attributes go missing as this changes result of rendererIsNeeded().
521 This was previously relying on any attribute change invalidating style.
523 (WebCore::HTMLEmbedElement::rendererIsNeeded):
524 * style/AttributeChangeInvalidation.cpp:
525 (WebCore::Style::AttributeChangeInvalidation::invalidateStyle):
527 Collect the invalidation rulesets for this attribute change.
528 Also check if any attribute selector actually changes state, unlike with classes attribute changes may
529 often not lead to a selector becoming non-matching.
531 (WebCore::Style::AttributeChangeInvalidation::invalidateStyleWithRuleSets):
532 (WebCore::Style::AttributeChangeInvalidation::invalidateDescendants): Deleted.
533 * style/AttributeChangeInvalidation.h:
534 (WebCore::Style::AttributeChangeInvalidation::AttributeChangeInvalidation):
535 (WebCore::Style::AttributeChangeInvalidation::~AttributeChangeInvalidation):
536 * style/ClassChangeInvalidation.cpp:
537 (WebCore::Style::ClassChangeInvalidation::computeInvalidation):
539 Should not bail on shadow tree invalidation as we may also need to invalidate siblings.
541 2018-02-08 Zalan Bujtas <zalan@apple.com>
543 [RenderTreeBuilder] Introduce RenderTreeBuilder to moveChild(ren)To() functions
544 https://bugs.webkit.org/show_bug.cgi?id=182596
545 <rdar://problem/37340553>
547 Reviewed by Sam Weinig.
549 This is in preparation for moving mutation code out of moveChildTo/moveChildrenTo.
551 No change in functionality.
553 * rendering/RenderBlock.cpp:
554 (WebCore::RenderBlock::dropAnonymousBoxChild):
555 (WebCore::RenderBlock::takeChild):
556 * rendering/RenderBlock.h:
557 (WebCore::RenderBlock::moveAllChildrenIncludingFloatsTo):
558 * rendering/RenderBlockFlow.cpp:
559 (WebCore::RenderBlockFlow::styleDidChange):
560 (WebCore::RenderBlockFlow::moveAllChildrenIncludingFloatsTo):
561 * rendering/RenderBlockFlow.h:
562 * rendering/RenderBoxModelObject.cpp:
563 (WebCore::RenderBoxModelObject::moveChildTo):
564 (WebCore::RenderBoxModelObject::moveChildrenTo):
565 * rendering/RenderBoxModelObject.h:
566 (WebCore::RenderBoxModelObject::moveChildTo):
567 (WebCore::RenderBoxModelObject::moveAllChildrenTo):
568 (WebCore::RenderBoxModelObject::moveChildrenTo):
569 * rendering/RenderElement.cpp:
570 (WebCore::RenderElement::styleDidChange):
571 (WebCore::RenderElement::removeAnonymousWrappersForInlinesIfNecessary): Deleted.
572 * rendering/RenderElement.h:
573 * rendering/RenderRubyRun.cpp:
574 (WebCore::RenderRubyRun::takeChild):
575 * rendering/updating/RenderTreeBuilder.cpp:
576 (WebCore::RenderTreeBuilder::makeChildrenNonInline):
577 (WebCore::RenderTreeBuilder::splitAnonymousBoxesAroundChild):
578 (WebCore::RenderTreeBuilder::removeAnonymousWrappersForInlineChildrenIfNeeded):
579 (WebCore::RenderTreeBuilder::childFlowStateChangesAndNoLongerAffectsParentBlock):
580 (WebCore::RenderTreeBuilder::removeFromParentAndDestroyCleaningUpAnonymousWrappers):
581 * rendering/updating/RenderTreeBuilder.h:
582 * rendering/updating/RenderTreeBuilderMultiColumn.cpp:
583 (WebCore::RenderTreeBuilder::MultiColumn::createFragmentedFlow):
584 (WebCore::RenderTreeBuilder::MultiColumn::destroyFragmentedFlow):
585 * rendering/updating/RenderTreeBuilderRuby.cpp:
586 (WebCore::RenderTreeBuilder::Ruby::moveInlineChildren):
587 (WebCore::RenderTreeBuilder::Ruby::moveBlockChildren):
588 * rendering/updating/RenderTreeBuilderTable.cpp:
589 (WebCore::RenderTreeBuilder::Table::collapseAndDestroyAnonymousSiblingRows):
591 2018-02-08 Matt Lewis <jlewis3@apple.com>
593 Unreviewed, rolling out r228261.
595 This broke an internal build
599 "Add a way to check if a host is an IP address"
600 https://bugs.webkit.org/show_bug.cgi?id=182427
601 https://trac.webkit.org/changeset/228261
603 2018-02-08 Philippe Normand <pnormand@igalia.com>
605 [GStreamer] WebKit improperly handles missing GStreamer elements
606 https://bugs.webkit.org/show_bug.cgi?id=171205
608 Reviewed by Michael Catanzaro.
610 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
611 (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Add a
612 test checking the videoflip element was correctly created. It
613 might not be available on some exotic distros such as Gentoo.
615 2018-02-08 Chris Fleizach <cfleizach@apple.com>
617 AX: Defer attribute computation until needed.
618 https://bugs.webkit.org/show_bug.cgi?id=182386
619 <rdar://problem/37115277>
621 Reviewed by Zalan Bujtas.
623 Accessibility is doing too much work when handling attribute changes. Here's how we can improve this:
624 1) Defer attribute changes while the tree is dirty (and coalesce them).
625 2) Don't create AXObjects when an attribute changes unnecessarily. If no client has requested an ax object, it's likely no work needs to be done
626 (with the exception of a few attributes like aria-modal)
627 3) Stop calculating the entire accessible ARIA label when trying to decide if an element should be ignored. That's generally wasteful and the
628 consequence of including more AX elements in the tree is very minimal.
630 * accessibility/AXObjectCache.cpp:
631 (WebCore::rendererNeedsDeferredUpdate):
632 (WebCore::nodeAndRendererAreValid):
633 (WebCore::AXObjectCache::remove):
634 (WebCore::AXObjectCache::handleAriaExpandedChange):
635 (WebCore::AXObjectCache::handleAriaRoleChanged):
636 (WebCore::AXObjectCache::deferAttributeChangeIfNeeded):
637 (WebCore::AXObjectCache::shouldProcessAttributeChange):
638 (WebCore::AXObjectCache::handleAttributeChange):
639 (WebCore::AXObjectCache::prepareForDocumentDestruction):
640 (WebCore::AXObjectCache::performDeferredCacheUpdate):
641 (WebCore::AXObjectCache::deferRecomputeIsIgnoredIfNeeded):
642 (WebCore::AXObjectCache::deferRecomputeIsIgnored):
643 (WebCore::AXObjectCache::deferTextChangedIfNeeded):
644 (WebCore::AXObjectCache::deferSelectedChildrenChangedIfNeeded):
645 (WebCore::AXObjectCache::handleAttributeChanged): Deleted.
646 * accessibility/AXObjectCache.h:
647 (WebCore::AXObjectCache::deferAttributeChangeIfNeeded):
648 (WebCore::AXObjectCache::handleAttributeChanged): Deleted.
649 * accessibility/AccessibilityNodeObject.cpp:
650 (WebCore::AccessibilityNodeObject::hasAttributesRequiredForInclusion const):
651 * accessibility/AccessibleNode.cpp:
652 (WebCore::AccessibleNode::notifyAttributeChanged):
654 (WebCore::Element::attributeChanged):
656 2018-02-08 Chris Dumez <cdumez@apple.com>
658 Unreviewed, tiny partial rollout of r228260 as it caused some worker failures
660 * bindings/js/JSDOMGlobalObject.cpp:
661 (WebCore::toJSDOMGlobalObject):
662 * bindings/js/JSDOMGlobalObject.h:
663 * bindings/js/JSErrorHandler.cpp:
664 (WebCore::JSErrorHandler::handleEvent):
665 * bindings/js/JSEventListener.cpp:
666 (WebCore::toJSDOMGlobalObject): Deleted.
668 2018-02-08 Zalan Bujtas <zalan@apple.com>
670 [RenderTreeBuilder] Move RenderElement::removeAnonymousWrappersForInlinesIfNecessary to RenderTreeBuilder
671 https://bugs.webkit.org/show_bug.cgi?id=182582
672 <rdar://problem/37327890>
674 Reviewed by Antti Koivisto.
676 Tree mutation -> RenderTreeBuilder.
678 No change in functionality
680 * rendering/RenderElement.cpp:
681 (WebCore::RenderElement::styleDidChange):
682 (WebCore::RenderElement::removeAnonymousWrappersForInlinesIfNecessary): Deleted.
683 * rendering/RenderElement.h:
684 * rendering/updating/RenderTreeBuilder.cpp:
685 (WebCore::removeAnonymousWrappersForInlinesIfNecessary):
686 (WebCore::RenderTreeBuilder::childFlowStateChangesAndNoLongerAffectsParentBlock):
687 (WebCore::RenderTreeBuilder::removeFromParentAndDestroyCleaningUpAnonymousWrappers):
688 * rendering/updating/RenderTreeBuilder.h:
690 2018-02-08 Philippe Normand <pnormand@igalia.com>
692 [GStreamer] LayoutTest webaudio/silent-audio-interrupted-in-background.html makes its subsequent test flaky crash
693 https://bugs.webkit.org/show_bug.cgi?id=173916
695 Reviewed by Xabier Rodriguez Calvar.
697 This patch fixes two crashes and a runtime warning:
699 - The provider client configuration should be done from the main
700 thread but the no-more-pads signal of deinterleave was fired from
703 - The deinterleave pad-removed signal can be fired for a not fully
704 configured pipeline if the audio context is interrupted. So the
705 peer quark of the removed pad needs to be checked, it might be a
708 - The provider connects to the deinterleave signals only when a
709 client is provided, so the signal disconnection needs to check
710 that to avoid runtime warnings.
712 * platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:
713 (WebCore::AudioSourceProviderGStreamer::AudioSourceProviderGStreamer):
714 Create a main thread notifier.
715 (WebCore::AudioSourceProviderGStreamer::~AudioSourceProviderGStreamer):
716 Invalidate notifier and check a client was set before
717 disconnecting from deinterleave signals.
718 (WebCore::AudioSourceProviderGStreamer::handleRemovedDeinterleavePad):
719 Check validity of the pad peer.
720 (WebCore::AudioSourceProviderGStreamer::deinterleavePadsConfigured):
721 Set client from main thread.
722 * platform/audio/gstreamer/AudioSourceProviderGStreamer.h:
724 2018-02-08 Philippe Normand <pnormand@igalia.com>
726 [GStreamer][WebAudio] No need for version check in each loop iteration
727 https://bugs.webkit.org/show_bug.cgi?id=182577
729 Reviewed by Xabier Rodriguez Calvar.
731 * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
732 (webkit_web_audio_src_init): Detect version once only, when creating the element.
733 (webKitWebAudioSrcLoop): Use boolean variable instead of checking the version every time.
735 2018-02-08 Frederic Wang <fwang@igalia.com>
737 Add scrolling node types to distinguish main frames and subframes.
738 https://bugs.webkit.org/show_bug.cgi?id=182533
740 Reviewed by Simon Fraser.
742 This patch splits FrameScrollingNode type into two types: MainFrameScrollingNode and
743 SubframeScrollingNode. This is needed because new places in the code are likely to
744 distinguish them e.g. in ScrollingTreeScrollingNodeDelegateIOS::updateChildNodesAfterScroll
745 or when iOS frame scrolling is introduced (see bug 173833).
747 No new tests, behavior unchanged.
749 * page/scrolling/AsyncScrollingCoordinator.cpp:
750 (WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView): This is only called
751 for main frames, so pass MainFrameScrollingNode.
752 * page/scrolling/ScrollingCoordinator.cpp:
753 (WebCore::operator<<): Distinguish subframe and main frame when dumping.
754 * page/scrolling/ScrollingCoordinator.h: Split FrameScrollingNode into two cases.
755 * page/scrolling/ScrollingStateFrameScrollingNode.cpp: Add node type to constructor and
756 ASSERT it remains of type FrameScrollingNode.
757 (WebCore::ScrollingStateFrameScrollingNode::create):
758 (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
759 * page/scrolling/ScrollingStateFrameScrollingNode.h: Add node type to constructor.
760 * page/scrolling/ScrollingStateNode.h:
761 (WebCore::ScrollingStateNode::isFrameScrollingNode const): Includes the two cases.
762 * page/scrolling/ScrollingStateTree.cpp:
763 (WebCore::ScrollingStateTree::createNode): Split FrameScrollingNode into two cases and pass
765 (WebCore::ScrollingStateTree::attachNode): The first case only happens for main frames while
766 the second case only happens with subframes. Use the appriate node type.
767 * page/scrolling/ScrollingTreeFrameScrollingNode.cpp: Add node type to constructor and
768 ASSERT it remains of type FrameScrollingNode.
769 (WebCore::ScrollingTreeFrameScrollingNode::ScrollingTreeFrameScrollingNode):
770 * page/scrolling/ScrollingTreeFrameScrollingNode.h: Add node type to constructor.
771 * page/scrolling/ScrollingTreeNode.h: Includes the two cases.
772 (WebCore::ScrollingTreeNode::isFrameScrollingNode const):
773 * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h: Add node type to constructor.
774 * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm: Ditto.
775 (WebCore::ScrollingTreeFrameScrollingNodeIOS::create):
776 (WebCore::ScrollingTreeFrameScrollingNodeIOS::ScrollingTreeFrameScrollingNodeIOS):
777 * page/scrolling/ios/ScrollingTreeIOS.cpp: Split FrameScrollingNode into two cases.
778 (WebCore::ScrollingTreeIOS::createScrollingTreeNode):
779 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: Add node type to constructor.
780 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: Ditto.
781 (WebCore::ScrollingTreeFrameScrollingNodeMac::create):
782 (WebCore::ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac):
783 * page/scrolling/mac/ScrollingTreeMac.cpp: Split FrameScrollingNode into two cases.
784 (ScrollingTreeMac::createScrollingTreeNode):
785 * rendering/RenderLayerCompositor.cpp:
786 (WebCore::RenderLayerCompositor::reattachSubframeScrollLayers): Distinguish the cases of
787 main frames and subframes.
788 (WebCore::scrollCoordinationRoleForNodeType): Split FrameScrollingNode into two cases.
789 (WebCore::RenderLayerCompositor::updateScrollCoordinationForThisFrame): Distinguish the cases
790 of main frames and subframes.
791 (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer): Split FrameScrollingNode into
794 2018-02-07 Darin Adler <darin@apple.com>
796 Try to fix ErrorEvent tests seen failing on buildbot after fix for bug 179591.
798 * bindings/js/JSErrorHandler.cpp:
799 (WebCore::JSErrorHandler::handleEvent): Add back line of code accidentally removed.
801 2018-02-05 Carlos Garcia Campos <cgarcia@igalia.com>
803 Add a way to check if a host is an IP address
804 https://bugs.webkit.org/show_bug.cgi?id=182427
806 Reviewed by Alex Christensen.
808 There are several places where this is needed. We currently just assume that any host ending in a digit is an IP
809 address, except in PublicSuffix where platform specific code is used. This patch adds URL::hostIsIPAddress()
810 platform specific implementations, falling back to current assumption if there isn't an implementation for the
813 * page/OriginAccessEntry.cpp:
814 (WebCore::OriginAccessEntry::OriginAccessEntry): Use URL::hostIsIPAddress().
816 (WebCore::URL::hostIsIPAddress): Fallback implementation.
818 * platform/mac/PublicSuffixMac.mm:
819 (WebCore::topPrivatelyControlledDomain): Use URL::hostIsIPAddress().
820 * platform/mac/URLMac.mm:
821 (WebCore::URL::hostIsIPAddress): Move implementation from PublicSuffixMac.mm.
822 * platform/network/curl/CookieUtil.cpp:
823 (WebCore::CookieUtil::isIPAddress): Use URL::hostIsIPAddress().
824 * platform/soup/URLSoup.cpp:
825 (WebCore::URL::hostIsIPAddress): Use g_hostname_is_ip_address().
827 2018-01-13 Darin Adler <darin@apple.com>
830 https://bugs.webkit.org/show_bug.cgi?id=179591
832 Reviewed by Chris Dumez.
834 - removed all use of Deprecated::ScriptValue
836 - fixed uses of JSC::Strong that can lead to reference cycles in CustomEvent,
837 MessageEvent, and PopStateEvent, refactoring to share more code
839 - removed incorrect use of CachedAttribute on attributes that can change values
840 (should have fixed a bug; can we find a way to test this?)
842 - did a more thorough job of clearing state from events, including clearing
843 certain things before dispatching, and clearing more in initKeyboardEvent
844 (may have fixed some obscure low-severity bugs; can we find a way to test this?)
846 - removed "dummy" keyboard events
848 - reworked code that omits details from error events for security reasons;
849 old approach was "sanitizing" the error by removing the details if not
850 allowed, new approach is adding the details only if allowed
852 * Modules/encryptedmedia/NavigatorEME.h: Added forward declaration needed
855 * Modules/indexeddb/IDBCursor.h: Added comment about incorrect use of JSC::Strong.
856 * Modules/indexeddb/IDBRequest.h: Ditto.
857 * Modules/paymentrequest/PaymentResponse.h: Ditto.
859 * WebCore.xcodeproj/project.pbxproj: Added JSValueInWrappedObject.h.
861 * bindings/js/CommonVM.cpp:
862 (WebCore::commonVMSlow): Use VM::create instead of VM::createLeaked. Also use
863 local variable instead of the global.
865 * bindings/js/DOMWrapperWorld.h: Put the inline bodies of the currentWorld and
866 worldForDOMObject functions separate from the declarations; long term goal is
867 that the declarations serve as documentation, and are not interspersed with the
868 implementations. Changed currentWorld to take a reference instead of a pointer
869 to ExecState. Added isWorldCompatible function.
871 * bindings/js/JSCustomElementInterface.cpp:
872 (WebCore::JSCustomElementInterface::upgradeElement): Use toJSDOMWindow instead
873 of toJSDOMGlobalObject and added check for null.
874 (WebCore::JSCustomElementInterface::invokeCallback): Ditto.
876 * bindings/js/JSCustomEventCustom.cpp:
877 (WebCore::JSCustomEvent::detail const): Use cachedPropertyValue.
878 (WebCore::JSCustomEvent::visitAdditionalChildren): Added. Needed now that we are
879 using JSValueInWrappedObject instead of JSC::Strong.
881 * bindings/js/JSDOMConvertEventListener.h:
882 (WebCore::Converter<IDLEventListener<T>>::convert): Pass a reference.
883 * bindings/js/JSDOMGlobalObject.cpp:
884 (WebCore::toJSDOMGlobalObject): Ditto.
886 * bindings/js/JSDOMGlobalObject.cpp:
887 (WebCore::JSDOMGlobalObject::JSDOMGlobalObject): Moved initialization to nullptr
889 (WebCore::toJSDOMGlobalObject): Deleted.
890 * bindings/js/JSDOMGlobalObject.h: Updated for the above.
892 * bindings/js/JSDOMWindowBase.h: Updated includes. Added "DOMWindow.h" but also
893 expanded the deprecated "JSDOMBinding.h" into all the things it includes.
895 * bindings/js/JSDOMWindowProxy.cpp:
896 (WebCore::JSDOMWindowProxy::finishCreation): Tweak argument type to match usage.
897 (WebCore::JSDOMWindowProxy::create): Moved here from header, rolled in the code
898 that creates the structure.
899 (WebCore::JSDOMWindowProxy::setWindow): Take a reference instead of a pointer
901 (WebCore::JSDOMWindowProxy::toWrapped): Use ? : instead of if.
902 (WebCore::toJS): Pass a reference.
903 * bindings/js/JSDOMWindowProxy.h: Updated for abvoe changes.
905 * bindings/js/JSDOMWrapper.cpp:
906 (WebCore::cloneAcrossWorlds): Added.
907 * bindings/js/JSDOMWrapper.h: Ditto.
909 * bindings/js/JSErrorHandler.cpp:
910 (WebCore::JSErrorHandler::JSErrorHandler): Changed to take a reference.
912 (WebCore::JSErrorHandler::create): Moved here from header. No longer inline, but
913 the constructor is now inline, so same number of levels of function calls, and
914 less code compiled at the call site and less to compile in the header.
915 (WebCore::JSErrorHandler::handleEvent): Use toJSDOMWindow instead
916 of toJSDOMGlobalObject.
917 * bindings/js/JSErrorHandler.h: Ditto. Also made createJSErrorHandler take
918 references instead of pointers.
920 * bindings/js/JSEventListener.cpp:
921 (WebCore::JSEventListener::create): Moved here from the header.
922 (WebCore::createEventListenerForEventHandlerAttribute): Updated for change to
924 (WebCore::toJSDOMGlobalObject): Moved here from JSDOMGlobalObject.cpp because
925 this is the only place this function is used now. Also, this was one of four
926 different overrides and so it was good to delete the other three. Also updated
927 to take a reference rather than a "must not be null" pointer.
928 (WebCore::JSEventListener::handleEvent): Coding style tweaks.
929 (WebCore::JSEventListener::virtualisAttribute const): Deleted. Now isAttribute
930 is virtual and uses final as needed to remain inline-able and efficient.
931 (WebCore::JSEventListener::operator== const): Use is<> and downcast<> instead
932 of JSEventListener::cast.
933 (WebCore::eventHandlerAttribute): Updated for change to currentWorld.
934 (WebCore::setEventHandlerAttribute): Ditto.
935 (WebCore::setWindowEventHandlerAttribute): Ditto.
936 (WebCore::setDocumentEventHandlerAttribute): Ditto.
938 * bindings/js/JSEventListener.h: Moved create functions into the cpp file.
939 Removed the cast function, since callers can use is<> and downcast<> instead.
940 Use final rather than override and made isAttribute override the virtual
941 function in the base class, eliminating virtualIsAttribute.
943 * bindings/js/JSExtendableMessageEventCustom.cpp:
944 (WebCore::JSExtendableMessageEvent::data const): Use isWorldCompatible.
945 Still need to return here and fix the reference cycle for this class.
947 * bindings/js/JSLazyEventListener.cpp:
948 (WebCore::eventParameterName): Moved up so it can be used by the constructor.
949 (WebCore::convertZeroToOne): Added, so that the constructor can fix up text
950 positions passed in to it as part of initializing a data member.
951 (WebCore::JSLazyEventListener::JSLazyEventListener): Changed to take
952 a CreationArguments object instead of lots of separate arguments.
953 (WebCore::JSLazyEventListener::initializeJSFunction const): Removed unneeded
954 checks of m_code and m_eventParameterName, both guaranteed not to be null
955 by the constructor. Tweaked coding style a bit.
956 (WebCore::JSLazyEventListener::create): Pass CreationArguments object.
957 * bindings/js/JSLazyEventListener.h: Updated for above changes. Changed the
958 m_eventParameterName to be a reference since it's always a global string
959 that is never destroyed.
961 * bindings/js/JSMessageEventCustom.cpp:
962 (WebCore::JSMessageEvent::data const): Use cachedPropertyValue and also
963 updated for the new version of MessageEvent that uses a Variant instead
964 of a type plus separate functions for each type.
965 (WebCore::JSMessageEvent::visitAdditionalChildren): Added. Needed now that we are
966 using JSValueInWrappedObject instead of JSC::Strong.
968 * bindings/js/JSPopStateEventCustom.cpp:
969 (WebCore::JSPopStateEvent::state const): Use isWorldCompatible and also updated
970 to use JSValueInWrappedObject instead of JSC::Strong. Would be nice to share more
971 code with CustomEvent and MessageEvent, but at the moment they are subtly different.
972 Changed cacheState from a function to a lambda.
973 (WebCore::JSPopStateEvent::visitAdditionalChildren): Added. Needed now that we are
974 using JSValueInWrappedObject instead of JSC::Strong.
976 * bindings/js/JSValueInWrappedObject.h: Added.
978 * bindings/js/ScriptCachedFrameData.cpp:
979 (WebCore::ScriptCachedFrameData::restore): Updated for changes to JSDOMWindowProxy.
980 * bindings/js/ScriptController.cpp:
981 (WebCore::ScriptController::createWindowProxy): Ditto.
982 (WebCore::ScriptController::setDOMWindowForWindowProxy): Ditto.
984 * bindings/js/WorkerScriptController.cpp: Removed include of ScriptValue.h.
985 (WebCore::WorkerScriptController::evaluate): Reworked to use the new
986 canIncludeErrorDetails instead of sanitizeScriptError. Added a FIXME about the
987 strange handling of the error message out argument.
989 * bindings/scripts/CodeGeneratorJS.pm:
990 (GenerateRuntimeEnableConditionalString): Pass a reference to worldForDOMObject.
991 (GenerateImplementation): Removed an incorrect comment about a removed error
992 check that is truly unneeded.
993 (GenerateAttributeGetterBodyDefinition): Pass a reference to worldForDOMObject.
994 (GenerateAttributeSetterBodyDefinition): Pass references to createJSErrorHandler
995 and worldForDOMObject.
996 (GenerateCallWith): Pass a reference to worldForDOMObject.
998 * bindings/scripts/test/JS/JSTestGlobalObject.cpp: Updated for above changes.
999 * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp: Ditto.
1000 * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
1002 * dom/CustomEvent.cpp:
1003 (WebCore::CustomEvent::CustomEvent): Marked inline. Removed now unneeded
1005 (WebCore::CustomEvent::create): Moved here from header. No longer inline, but
1006 the constructor is now inline, so same number of levels of function calls, and
1007 less code compiled at the call site and less to compile in the header.
1008 (WebCore::CustomEvent::initCustomEvent): Updated to use JSValueInWrappedObject.
1009 (WebCore::CustomEvent::trySerializeDetail): Deleted. Now handled by bindings.
1010 * dom/CustomEvent.h: Updated for the above.
1011 * dom/CustomEvent.idl: Added JSCustomMarkFunction and removed
1012 CallWith=ScriptState.
1015 (WebCore::Document::shouldBypassMainWorldContentSecurityPolicy const):
1016 Updated to pass reference to currentWorld but also rewrote to be more direct.
1019 (WebCore::Element::isKeyboardFocusable const): Take a pointer instead of a
1020 reference to the keyboard event. This function can be called with no event;
1021 before this patch we were using a "dummy event".
1022 * dom/Element.h: Ditto.
1024 * dom/ErrorEvent.cpp:
1025 (WebCore::ErrorEvent::error): Use isWorldCompatible.
1028 (WebCore::Event::create): Moved here from header.
1029 (WebCore::Event::createForBindings): Ditto.
1030 (WebCore::Event::initEvent): Updated to use the name m_canceled instead of
1031 the name m_defaultPrevented.
1032 (WebCore::Event::resetBeforeDispatch): Added. Clears m_defaultHandled so
1033 a value left over from a previous dispatch doesn't affect the next dispatch.
1035 * dom/Event.h: Renamed m_defaultPrevented to m_canceled to match specification
1036 terminology and be slightly clearer. Added resetBeforeDispatch. Removed the
1037 setDefaultPrevented function.
1039 * dom/EventDispatcher.cpp:
1040 (WebCore::EventDispatcher::dispatchEvent): Added call to resetBeforeDispatch.
1042 * dom/EventListener.h: Made isAttribute virtual and got rid of virtualIsAttribute,
1043 which was an alternative to using "final" before we had that in the language.
1045 * dom/EventTarget.cpp:
1046 (WebCore::EventTarget::dispatchEvent): Added call to resetBeforeDispatch.
1048 * dom/KeyboardEvent.cpp:
1049 (WebCore::KeyboardEvent::KeyboardEvent): Removed unneeded code that initializes
1050 m_handledByInputMethod to false; we do that in the class definition now.
1051 (WebCore::KeyboardEvent::create): Moved here from header.
1052 (WebCore::KeyboardEvent::createForBindings): Ditto.
1053 (WebCore::KeyboardEvent::initKeyboardEvent): Added code to reset m_charCode,
1054 m_isComposing, m_keyCode, m_repeat, m_underlyingPlatformEvent, m_which, m_code,
1055 and m_key. These are needed now that we can reuse an existing event; we don't
1056 want them getting out of sync with the other data members.
1057 (WebCore::KeyboardEvent::keyCode const): Updated for name change from m_keyEvent
1058 to m_underlyingPlatformEvent.
1059 (WebCore::KeyboardEvent::charCode const): Ditto.
1060 (WebCore::findKeyboardEvent): Deleted. Was unused.
1061 * dom/KeyboardEvent.h: Updated for the above. Removed KeyboardEvent::createForDummy.
1063 * dom/MessageEvent.cpp:
1064 (WebCore::MessageEvent::MessageEvent): Removed unnneded ExecState argument.
1065 Simplified since m_data is now a Variant.
1066 (WebCore::MessageEvent::create): More of the same.
1067 (WebCore::MessageEvent::initMessageEvent): Ditto.
1068 (WebCore::MessageEvent::trySerializeData): Deleted.
1069 (WebCore::MessageEvent::data const): Deleted.
1070 * dom/MessageEvent.h: Use a Variant.
1071 * dom/MessageEvent.idl: Added JSCustomMarkFunction and removed
1072 CallWith=ScriptState and CachedAttribute.
1074 * dom/MouseEvent.h: Removed obsolete comment.
1075 * dom/MouseEvent.idl: Wrap line differently.
1077 * dom/PopStateEvent.cpp:
1078 (WebCore::PopStateEvent::PopStateEvent): Removed unneeded ExecState argument.
1079 Updated to use JSValueInWrappedObject.
1080 (WebCore::PopStateEvent::create): Ditto.
1081 (WebCore::PopStateEvent::trySerializeState): Ditto.
1082 * dom/PopStateEvent.h: Ditto.
1083 * dom/PopStateEvent.idl: Use JSCustomMarkFunction, and don't use
1084 ConstructorCallWith=ScriptState.
1086 * dom/ScriptExecutionContext.cpp:
1087 (WebCore::ScriptExecutionContext::sanitizeScriptError): Deleted.
1088 (WebCore::ScriptExecutionContext::canIncludeErrorDetails): Added.
1089 (WebCore::ScriptExecutionContext::dispatchErrorEvent): Clarify by
1090 using canIncludeErrorDetails instead of sanitizeScriptError.
1091 * dom/ScriptExecutionContext.h: Ditto.
1093 * dom/WheelEvent.cpp:
1094 (WebCore::WheelEvent::WheelEvent): Updated for name change and also to
1095 eliminate m_initializedWithPlatformWheelEvent.
1096 (WebCore::WheelEvent::create): Moved here from header.
1097 (WebCore::WheelEvent::createForBindings): Ditto.
1098 (WebCore::WheelEvent::initWebKitWheelEvent): Renamed from initWheelEvent.
1099 * dom/WheelEvent.h: Renamed initWheelEvent to initWebKitWheelEvent since
1100 there is no standard init function for wheel events and we have this only
1101 for backward compatibility. Got rid of the separate boolean
1102 m_initializedWithPlatformWheelEvent and instead made the renamed
1103 m_wheelEvent, m_underlyingPlatformEvent, optional for when there is no
1104 underlying platform event.
1106 * html/BaseDateAndTimeInputType.cpp:
1107 (WebCore::BaseDateAndTimeInputType::isKeyboardFocusable const): Take a
1108 pointer to the event so we can handle the case where there is no event.
1109 * html/BaseDateAndTimeInputType.h: Ditto.
1110 * html/HTMLAnchorElement.cpp:
1111 (WebCore::HTMLAnchorElement::isKeyboardFocusable const): Ditto.
1112 * html/HTMLAnchorElement.h: Ditto.
1113 * html/HTMLAreaElement.cpp:
1114 (WebCore::HTMLAreaElement::isKeyboardFocusable const): Ditto.
1115 * html/HTMLAreaElement.h: Ditto.
1116 * html/HTMLDocument.cpp: Added include of "DOMWindow.h".
1117 * html/HTMLFormControlElement.cpp:
1118 (WebCore::HTMLFormControlElement::isKeyboardFocusable const): Take
1119 pointer to the event.
1120 * html/HTMLFormControlElement.h: Ditto.
1121 * html/HTMLFrameOwnerElement.cpp:
1122 (WebCore::HTMLFrameOwnerElement::isKeyboardFocusable const): Ditto.
1123 * html/HTMLFrameOwnerElement.h: Ditto.
1124 * html/HTMLIFrameElement.h: Ditto.
1125 * html/HTMLInputElement.cpp:
1126 (WebCore::HTMLInputElement::isKeyboardFocusable const): Ditto.
1127 (WebCore::HTMLInputElement::isTextFormControlKeyboardFocusable const): Ditto.
1128 * html/HTMLInputElement.h: Ditto.
1129 * html/HTMLPlugInElement.cpp:
1130 (WebCore::HTMLPlugInElement::isKeyboardFocusable const): Ditto.
1131 * html/HTMLPlugInElement.h: Ditto.
1132 * html/HTMLSelectElement.cpp:
1133 (WebCore::HTMLSelectElement::isKeyboardFocusable const): Ditto.
1134 * html/HTMLSelectElement.h: Ditto.
1135 * html/HTMLTextAreaElement.cpp:
1136 (WebCore::HTMLTextAreaElement::isKeyboardFocusable const): Ditto.
1137 * html/HTMLTextAreaElement.h: Ditto.
1138 * html/InputType.cpp:
1139 (WebCore::InputType::isKeyboardFocusable const): Ditto.
1140 * html/InputType.h: Ditto.
1141 * html/RadioInputType.cpp:
1142 (WebCore::RadioInputType::isKeyboardFocusable const): Ditto.
1143 * html/RadioInputType.h: Ditto.
1144 * html/TextFieldInputType.cpp:
1145 (WebCore::TextFieldInputType::isKeyboardFocusable const): Ditto.
1146 * html/TextFieldInputType.h: Ditto.
1148 * inspector/CommandLineAPIHost.cpp:
1149 (WebCore::listenerEntriesFromListenerInfo): Pass reference to currentWorld.
1150 Use is<> and downcast<> instead of JSEventListener::cast.
1151 * inspector/PageScriptDebugServer.cpp:
1152 (WebCore::PageScriptDebugServer::isContentScript const): Pass reference to
1154 * inspector/agents/InspectorDOMAgent.cpp:
1155 (WebCore::InspectorDOMAgent::buildObjectForEventListener):
1156 Use is<> and downcast<> instead of JSEventListener::cast.
1158 * mathml/MathMLElement.cpp:
1159 (WebCore::MathMLElement::isKeyboardFocusable const): Take a
1160 pointer to the event so we can handle the case where there is no event.
1161 * mathml/MathMLElement.h: Ditto.
1163 * page/DOMWindow.cpp:
1164 (WebCore::DOMWindow::dispatchEvent): Added call to resetBeforeDispatch.
1165 All event dispatching paths now need to do this; there are 3.
1167 * page/EventHandler.cpp:
1168 (WebCore::handleWheelEventInAppropriateEnclosingBox): Use the new
1169 underlyingPlatformEvent function, less confusing than calling a function
1170 named wheelEvent() on an object of type WheelEvent. Also, it returns
1171 a const& to std::optional instead of a pointer, so updated for that.
1172 (WebCore::EventHandler::defaultWheelEventHandler): Ditto.
1173 (WebCore::EventHandler::internalKeyEvent): Use preventDefault instead
1174 of setDefaultPrevented(true).
1175 (WebCore::EventHandler::tabsToLinks const): Take a pointer.
1176 (WebCore::EventHandler::defaultArrowEventHandler): Pass a pointer.
1177 (WebCore::EventHandler::defaultTabEventHandler): Ditto.
1178 * page/EventHandler.h: Updated for the above.
1180 * page/EventSource.cpp:
1181 (WebCore::EventSource::dispatchMessageEvent): Pass a reference rather
1182 than a pointer when creating a message event.
1184 * page/FocusController.cpp:
1185 (WebCore::isFocusableElementOrScopeOwner): Use a pointer instead of reference
1187 (WebCore::isNonFocusableScopeOwner): Ditto.
1188 (WebCore::isFocusableScopeOwner): Ditto.
1189 (WebCore::shadowAdjustedTabIndex): Ditto.
1190 (WebCore::FocusController::findFocusableElementDescendingIntoSubframes):
1191 Renamed to use simpler terminology than "descending down into frame document".
1192 Changed to take a pointer instead of reference.
1193 (WebCore::FocusController::setInitialFocus): Pass nullptr instead of
1194 using KeyboardEvent::createForDummy.
1195 (WebCore::FocusController::advanceFocus): Pointer instead of reference.
1196 (WebCore::FocusController::advanceFocusInDocumentOrder): Ditto.
1197 (WebCore::FocusController::findFocusableElementAcrossFocusScope): Ditto.
1198 (WebCore::FocusController::findFocusableElementWithinScope): Ditto.
1199 (WebCore::FocusController::nextFocusableElementWithinScope): Ditto.
1200 (WebCore::FocusController::previousFocusableElementWithinScope): Ditto.
1201 (WebCore::FocusController::findFocusableElementOrScopeOwner): Ditto.
1202 (WebCore::FocusController::findElementWithExactTabIndex): Ditto.
1203 (WebCore::nextElementWithGreaterTabIndex): Ditto.
1204 (WebCore::previousElementWithLowerTabIndex): Ditto.
1205 (WebCore::FocusController::nextFocusableElement): Ditto.
1206 (WebCore::FocusController::previousFocusableElement): Ditto.
1207 (WebCore::FocusController::nextFocusableElementOrScopeOwner): Ditto.
1208 (WebCore::FocusController::previousFocusableElementOrScopeOwner): Ditto.
1209 (WebCore::FocusController::findFocusCandidateInContainer): Ditto.
1210 (WebCore::FocusController::advanceFocusDirectionallyInContainer): Ditto.
1211 (WebCore::FocusController::advanceFocusDirectionally): Ditto.
1212 * page/FocusController.h: Updated for the above.
1214 * page/PageConsoleClient.cpp:
1215 (WebCore::objectArgumentAt): Added. Helper to make functions below simpler.
1216 (WebCore::canvasRenderingContext): Factored out logic to get the context
1217 from either a canvas or a canvas rendering context from the functions below.
1218 Also updated to not use ScriptValue and to use auto quite a bit more.
1219 (WebCore::PageConsoleClient::record): Updated to use the functions above.
1220 (WebCore::PageConsoleClient::recordEnd): Ditto.
1222 * page/ios/EventHandlerIOS.mm:
1223 (WebCore::EventHandler::tabsToAllFormControls const): Take a pointer
1224 instead of a reference.
1225 * page/mac/EventHandlerMac.mm:
1226 (WebCore::EventHandler::tabsToAllFormControls const): Ditto.
1227 * page/win/EventHandlerWin.cpp:
1228 (WebCore::EventHandler::tabsToAllFormControls const): Ditto.
1229 * platform/glib/EventHandlerGLib.cpp:
1230 (WebCore::EventHandler::tabsToAllFormControls const): Ditto.
1231 * svg/SVGAElement.cpp:
1232 (WebCore::SVGAElement::isKeyboardFocusable const): Ditto.
1233 * svg/SVGAElement.h: Ditto.
1235 * testing/Internals.cpp:
1236 (WebCore::Internals::isFromCurrentWorld const): Use isWorldCompatible.
1238 2018-02-07 Andy Estes <aestes@apple.com>
1240 ASSERTION FAILED: vm->currentThreadIsHoldingAPILock() seen with http/tests/paymentrequest/payment-request-show-method.https.html
1241 https://bugs.webkit.org/show_bug.cgi?id=182591
1243 Reviewed by Youenn Fablet.
1245 Fixes assertion failures in http/tests/paymentrequest/payment-request-show-method.https.html.
1247 DOMPromise::whenSettled() calls the JSC API without first aquiring the API lock, and
1248 r228195 added a call to whenSettled() where the lock is not guaranteed to be already
1251 Fix this by creating a JSLockHolder in DOMPromise::whenSettled().
1253 * bindings/js/JSDOMPromise.cpp:
1254 (WebCore::DOMPromise::whenSettled):
1256 2018-02-07 Ryan Haddad <ryanhaddad@apple.com>
1258 Unreviewed, rolling out r228243.
1260 Introduced an assertion failure with API test
1261 FullscreenZoomInitialFrame.WebKit
1265 "Assert that NSApp is not running in the WebProcess."
1266 https://bugs.webkit.org/show_bug.cgi?id=182553
1267 https://trac.webkit.org/changeset/228243
1269 2018-02-07 Christopher Reid <chris.reid@sony.com>
1271 [Curl] Cookie Database has some warnings when compiled in clang
1272 https://bugs.webkit.org/show_bug.cgi?id=182583
1274 Reviewed by Alex Christensen.
1276 No new tests, no change in behavior.
1278 Fixing unused-parameter, missing-field-initializers, reorder, and pragma-once-outside-header warnings.
1280 * platform/network/NetworkStorageSession.h:
1281 * platform/network/curl/CookieJarCurlDatabase.cpp:
1282 * platform/network/curl/CookieJarDB.cpp:
1283 * platform/network/curl/NetworkStorageSessionCurl.cpp:
1285 2018-02-07 Ryosuke Niwa <rniwa@webkit.org>
1287 Remove unused CSSParserContext in CSSParser::parseInlineStyleDeclaration
1288 https://bugs.webkit.org/show_bug.cgi?id=182587
1290 Reviewed by Simon Fraser.
1292 Removed the code. There is no need to create an unused CSSParserContext in CSSParser.
1294 * css/parser/CSSParser.cpp:
1295 (WebCore::CSSParser::parseInlineStyleDeclaration):
1296 * css/parser/CSSParser.h:
1297 * css/parser/CSSParserImpl.cpp:
1298 (WebCore::CSSParserImpl::parseInlineStyleDeclaration):
1299 * css/parser/CSSParserImpl.h:
1301 2018-02-07 Ross Kirsling <ross.kirsling@sony.com>
1303 Add missing #if ENABLE(VIDEO_TRACK) after r228201.
1304 https://bugs.webkit.org/show_bug.cgi?id=182585
1306 Reviewed by Chris Dumez.
1308 * loader/LinkPreloadResourceClients.h:
1310 2018-02-07 Per Arne Vollan <pvollan@apple.com>
1312 Assert that NSApp is not running in the WebProcess.
1313 https://bugs.webkit.org/show_bug.cgi?id=182553
1314 <rdar://problem/37316144>
1316 Reviewed by Simon Fraser.
1318 In WebCore, there are a few places where NSApp is referenced. Since the WebContent process
1319 is no longer using the NSApplication run loop, and NSApp is no longer guaranteed to be
1320 valid, we should make sure that the NSApp is not referenced by the WebContent process or
1321 the Network process, by asserting that the NSApplication event loop is running when NSApp
1322 is referenced. It is still ok for the UIProcess to reference NSApp. Adding these assert
1323 will help catch references to NSApp when the NSApplication run loop is not used.
1324 Also, do not post a fake mouse event in PasteBoard::setDragImage when the NSApplication
1325 run loop is not running, since this is only relevant in WK1.
1327 No new tests, covered by existing tests.
1329 * page/mac/EventHandlerMac.mm:
1330 (WebCore::lastEventIsMouseUp):
1331 (WebCore::EventHandler::sendFakeEventsAfterWidgetTracking):
1332 * platform/mac/PasteboardMac.mm:
1333 (WebCore::Pasteboard::setDragImage):
1334 * platform/mac/WebVideoFullscreenController.mm:
1335 (-[WebVideoFullscreenController windowDidLoad]):
1336 (-[WebVideoFullscreenController updateMenuAndDockForFullscreen]):
1337 * platform/mac/WebWindowAnimation.mm:
1338 (WebCore::WebWindowAnimationDurationFromDuration):
1340 2018-02-07 Youenn Fablet <youenn@apple.com>
1342 ASSERTION FAILED: m_timeOrigin in Performance::Performance()
1343 https://bugs.webkit.org/show_bug.cgi?id=182558
1344 <rdar://problem/37297551>
1346 Reviewed by Chris Dumez.
1348 Test: http/wpt/fetch/cors-preflight-star.any.serviceworker.html
1350 * loader/CrossOriginPreflightChecker.cpp:
1351 (WebCore::CrossOriginPreflightChecker::startPreflight):
1353 2018-02-07 Wenson Hsieh <wenson_hsieh@apple.com>
1355 REGRESSION(r226396): File paths are inserted when dropping image files
1356 https://bugs.webkit.org/show_bug.cgi?id=182557
1357 <rdar://problem/37294120>
1359 Reviewed by Ryosuke Niwa.
1361 Reverts unintended changes in <http://trac.webkit.org/r226396>. Before r226396, WebContentReader::readFilenames
1362 (a helper function in macOS-specific code) contained logic to create and insert attachment elements if
1363 ENABLE(ATTACHMENT_ELEMENT); otherwise, it would fall back to inserting the visible URL as a text node. Since we
1364 enable the attachment element on all Cocoa platforms via xcconfig files, this was effectively dead code.
1366 However, when r226396 (which moved this out from macOS to Cocoa platform code) refactored this helper function,
1367 it also moved this chunk of code out of the !ENABLE(ATTACHMENT) conditional and into a PLATFORM(MAC) guard,
1368 which means that we now fall back to inserting file paths as text when attachment elements are disabled. To fix
1369 this, we simply remove the (previously) dead code.
1371 A more subtle difference is that we no longer always return true from WebContentReader::readFilePaths. This
1372 means that when we drop files, we no longer skip over the early return in documentFragmentFromDragData when
1373 we've made a fragment, so we read the file path as a URL. To address this, we just restore the pre-macOS 10.13.4
1374 behavior of initializing the document fragment.
1376 Test: modified editing/pasteboard/drag-files-to-editable-element-as-URLs.html.
1378 * editing/WebContentReader.cpp:
1379 (WebCore::WebContentReader::ensureFragment): Deleted.
1381 Remove this helper, as it was only used in WebContentReader::readFilePaths.
1383 * editing/WebContentReader.h:
1384 * editing/cocoa/WebContentReaderCocoa.mm:
1385 (WebCore::WebContentReader::readFilePaths):
1387 2018-02-07 John Wilander <wilander@apple.com>
1389 Restrict Referer to just the origin for third parties in private mode and third parties ITP blocks cookies for in regular mode
1390 https://bugs.webkit.org/show_bug.cgi?id=182559
1391 <rdar://problem/36990337>
1393 Reviewed by Andy Estes.
1395 Tests: http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-redirects.html
1396 http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-requests.html
1397 http/tests/security/strip-referrer-to-origin-for-third-party-redirects-in-private-mode.html
1398 http/tests/security/strip-referrer-to-origin-for-third-party-requests-in-private-mode.html
1400 * page/SecurityPolicy.cpp:
1401 (WebCore::SecurityPolicy::referrerToOriginString):
1402 Now exposed within WebCore. This is to make sure we create a proper referrer
1403 string in WebCore::ResourceRequestBase::setExistingHTTPReferrerToOriginString().
1404 (WebCore::referrerToOriginString): Deleted.
1405 Used to be internal.
1406 * page/SecurityPolicy.h:
1407 * platform/network/ResourceRequestBase.cpp:
1408 (WebCore::ResourceRequestBase::setExistingHTTPReferrerToOriginString):
1409 New, exported function used in WebKit. Note that this function does not
1410 set the referrer if the request has none since before.
1411 * platform/network/ResourceRequestBase.h:
1414 2018-02-07 Zalan Bujtas <zalan@apple.com>
1416 [RenderTreeBuilder] Remove RenderElement::destroyLeftoverChildren.
1417 https://bugs.webkit.org/show_bug.cgi?id=182518
1418 <rdar://problem/37256035>
1420 Reviewed by Antti Koivisto.
1422 Remove leftover children before we call takeChild() on the parent (as opposed to when
1423 we finally call destroy() on the parent).
1424 This patch also explicitly destroys the top level pagination renderers.
1426 Covered by existing tests.
1428 * rendering/RenderElement.cpp:
1429 (WebCore::RenderElement::removeAndDestroyChild):
1430 (WebCore::RenderElement::destroyLeftoverChildren): Deleted.
1431 * rendering/RenderElement.h:
1432 * rendering/RenderObject.cpp:
1433 (WebCore::RenderObject::destroy):
1434 * rendering/updating/RenderTreeUpdater.cpp:
1435 (WebCore::RenderTreeUpdater::tearDownRenderers):
1436 (WebCore::RenderTreeUpdater::tearDownLeftoverPaginationRenderersIfNeeded):
1437 * rendering/updating/RenderTreeUpdater.h:
1439 2018-02-07 Daniel Bates <dabates@apple.com>
1441 Log error when authentication challenge is blocked due to an insecure request
1442 https://bugs.webkit.org/show_bug.cgi?id=182358
1444 Reviewed by Andy Estes.
1446 Emit an error message to Web Inspector console that explains why an authentication
1447 challenge was blocked so that a developer can fix up their site.
1449 Tests: http/tests/security/mixedContent/insecure-basic-auth-image.https.html
1450 http/tests/security/mixedContent/secure-page-navigates-to-basic-auth-insecure-page.https.html
1451 http/tests/security/mixedContent/secure-page-navigates-to-basic-auth-secure-page-via-insecure-redirect.https.html
1453 * loader/FrameLoader.cpp:
1454 (WebCore::FrameLoader::receivedFirstData): Log to the console an error message
1455 if the document we are loading was forbidden from prompting for credentials.
1456 Also removed duplicate assertion to ensure document is non-null and update
1457 call to LinkLoader::loadLinksFromHeader() to use local variable to access
1458 the document we are loading instead of asking the frame for it, again.
1459 (WebCore::FrameLoader::reportAuthenticationChallengeBlocked): Added.
1460 * loader/FrameLoader.h:
1462 * loader/ResourceLoader.cpp:
1463 (WebCore::ResourceLoader::init):
1464 (WebCore::ResourceLoader::willSendRequestInternal):
1465 Track the decision to forbid asking for credentials due to Fetch spec. requirements (m_canAskClientForCredentials)
1466 independently from the decision to forbid them due to making an insecure request (m_wasInsecureRequestSeen)
1467 so that we know the reason why we blocked asking for credentials when we receive an authentication challenge.
1469 (WebCore::ResourceLoader::didBlockAuthenticationChallenge): Added.
1470 (WebCore::ResourceLoader::isAllowedToAskUserForCredentials const): Modified code now that we track
1471 whether we have seen an insecure request so far independently from decision to forbid prompting for
1472 credentials due to a Fetch spec. requirement.
1474 (WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
1475 Store a bit whether we have seen an insecure request when loading the resource so far. Disallow
1476 asking for credentials if we have seen an insecure request so far. Once we receive a response
1478 * loader/ResourceLoader.h:
1479 (WebCore::ResourceLoader::wasAuthenticationChallengeBlocked const): Added.
1480 (WebCore::ResourceLoader::wasInsecureRequestSeen const): Added.
1482 2018-02-06 Matt Lewis <jlewis3@apple.com>
1484 Removed the assertions from VideoFullscreenInterfaceAVKit.mm temporarily to stop the resulting crashes during debugging.
1485 https://bugs.webkit.org/show_bug.cgi?id=182527
1487 Unreviewed build fix.
1489 * platform/ios/VideoFullscreenInterfaceAVKit.mm:
1490 (VideoFullscreenInterfaceAVKit::exitFullscreen):
1491 (VideoFullscreenInterfaceAVKit::cleanupFullscreen):
1493 2018-02-07 Zalan Bujtas <zalan@apple.com>
1495 [RenderTreeBuilder] Move RenderBlock::removeLeftoverAnonymousBlock to RenderTreeBuilder
1496 https://bugs.webkit.org/show_bug.cgi?id=182510
1497 <rdar://problem/37250037>
1499 Reviewed by Antti Koivisto.
1501 Do not reinvent subtree reparenting.
1503 Covered by existing tests.
1505 * rendering/RenderBlock.cpp:
1506 (WebCore::RenderBlock::removeLeftoverAnonymousBlock): Deleted.
1507 * rendering/RenderBlock.h:
1508 * rendering/RenderBoxModelObject.cpp:
1509 (WebCore::RenderBoxModelObject::moveAllChildrenToInternal):
1510 * rendering/RenderBoxModelObject.h:
1511 * rendering/RenderButton.h:
1512 * rendering/RenderElement.cpp:
1513 (WebCore::RenderElement::detachRendererInternal):
1514 (WebCore::RenderElement::attachRendererInternal):
1515 (WebCore::RenderElement::insertChildInternal):
1516 (WebCore::RenderElement::takeChildInternal):
1517 * rendering/RenderElement.h:
1518 * rendering/RenderRuby.h:
1519 * rendering/RenderRubyRun.h:
1520 * rendering/RenderTextControl.h:
1521 * rendering/updating/RenderTreeBuilderBlock.cpp:
1522 (WebCore::RenderTreeBuilder::Block::insertChildIgnoringContinuation):
1523 (WebCore::RenderTreeBuilder::Block::childBecameNonInline):
1524 (WebCore::RenderTreeBuilder::Block::removeLeftoverAnonymousBlock):
1525 * rendering/updating/RenderTreeBuilderBlock.h:
1527 2018-02-06 Don Olmstead <don.olmstead@sony.com>
1529 Remove WebCore/ForwardingHeaders directory
1530 https://bugs.webkit.org/show_bug.cgi?id=182347
1532 Reviewed by Keith Miller.
1534 No new tests. No change in behavior.
1537 * ForwardingHeaders/bindings/ScriptFunctionCall.h: Removed.
1538 * ForwardingHeaders/bindings/ScriptObject.h: Removed.
1539 * ForwardingHeaders/bindings/ScriptValue.h: Removed.
1540 * ForwardingHeaders/builtins/BuiltinNames.h: Removed.
1541 * ForwardingHeaders/builtins/BuiltinUtils.h: Removed.
1542 * ForwardingHeaders/builtins/JSCBuiltins.h: Removed.
1543 * ForwardingHeaders/bytecode/CodeBlock.h: Removed.
1544 * ForwardingHeaders/bytecode/SpeculatedType.h: Removed.
1545 * ForwardingHeaders/bytecode/UnlinkedFunctionExecutable.h: Removed.
1546 * ForwardingHeaders/debugger/Debugger.h: Removed.
1547 * ForwardingHeaders/domjit/DOMJITAbstractHeap.h: Removed.
1548 * ForwardingHeaders/domjit/DOMJITEffect.h: Removed.
1549 * ForwardingHeaders/domjit/DOMJITGetterSetter.h: Removed.
1550 * ForwardingHeaders/domjit/DOMJITHeapRange.h: Removed.
1551 * ForwardingHeaders/domjit/DOMJITSignature.h: Removed.
1552 * ForwardingHeaders/heap/BlockDirectoryInlines.h: Removed.
1553 * ForwardingHeaders/heap/DeleteAllCodeEffort.h: Removed.
1554 * ForwardingHeaders/heap/FastMallocAlignedMemoryAllocator.h: Removed.
1555 * ForwardingHeaders/heap/GCActivityCallback.h: Removed.
1556 * ForwardingHeaders/heap/GCFinalizationCallback.h: Removed.
1557 * ForwardingHeaders/heap/HandleTypes.h: Removed.
1558 * ForwardingHeaders/heap/Heap.h: Removed.
1559 * ForwardingHeaders/heap/HeapInlines.h: Removed.
1560 * ForwardingHeaders/heap/HeapObserver.h: Removed.
1561 * ForwardingHeaders/heap/IncrementalSweeper.h: Removed.
1562 * ForwardingHeaders/heap/LockDuringMarking.h: Removed.
1563 * ForwardingHeaders/heap/MachineStackMarker.h: Removed.
1564 * ForwardingHeaders/heap/MarkedBlockInlines.h: Removed.
1565 * ForwardingHeaders/heap/MarkingConstraint.h: Removed.
1566 * ForwardingHeaders/heap/RunningScope.h: Removed.
1567 * ForwardingHeaders/heap/SimpleMarkingConstraint.h: Removed.
1568 * ForwardingHeaders/heap/SlotVisitor.h: Removed.
1569 * ForwardingHeaders/heap/SlotVisitorInlines.h: Removed.
1570 * ForwardingHeaders/heap/Strong.h: Removed.
1571 * ForwardingHeaders/heap/StrongInlines.h: Removed.
1572 * ForwardingHeaders/heap/SubspaceInlines.h: Removed.
1573 * ForwardingHeaders/heap/ThreadLocalCache.h: Removed.
1574 * ForwardingHeaders/heap/Weak.h: Removed.
1575 * ForwardingHeaders/heap/WeakInlines.h: Removed.
1576 * ForwardingHeaders/inspector/ConsoleMessage.h: Removed.
1577 * ForwardingHeaders/inspector/ContentSearchUtilities.h: Removed.
1578 * ForwardingHeaders/inspector/IdentifiersFactory.h: Removed.
1579 * ForwardingHeaders/inspector/InjectedScript.h: Removed.
1580 * ForwardingHeaders/inspector/InjectedScriptBase.h: Removed.
1581 * ForwardingHeaders/inspector/InjectedScriptHost.h: Removed.
1582 * ForwardingHeaders/inspector/InjectedScriptManager.h: Removed.
1583 * ForwardingHeaders/inspector/InjectedScriptModule.h: Removed.
1584 * ForwardingHeaders/inspector/InspectorAgentBase.h: Removed.
1585 * ForwardingHeaders/inspector/InspectorAgentRegistry.h: Removed.
1586 * ForwardingHeaders/inspector/InspectorBackendDispatcher.h: Removed.
1587 * ForwardingHeaders/inspector/InspectorBackendDispatchers.h: Removed.
1588 * ForwardingHeaders/inspector/InspectorEnvironment.h: Removed.
1589 * ForwardingHeaders/inspector/InspectorFrontendChannel.h: Removed.
1590 * ForwardingHeaders/inspector/InspectorFrontendDispatchers.h: Removed.
1591 * ForwardingHeaders/inspector/InspectorFrontendRouter.h: Removed.
1592 * ForwardingHeaders/inspector/InspectorProtocolObjects.h: Removed.
1593 * ForwardingHeaders/inspector/InspectorProtocolTypes.h: Removed.
1594 * ForwardingHeaders/inspector/PerGlobalObjectWrapperWorld.h: Removed.
1595 * ForwardingHeaders/inspector/ScriptArguments.h: Removed.
1596 * ForwardingHeaders/inspector/ScriptBreakpoint.h: Removed.
1597 * ForwardingHeaders/inspector/ScriptCallFrame.h: Removed.
1598 * ForwardingHeaders/inspector/ScriptCallStack.h: Removed.
1599 * ForwardingHeaders/inspector/ScriptCallStackFactory.h: Removed.
1600 * ForwardingHeaders/inspector/ScriptDebugListener.h: Removed.
1601 * ForwardingHeaders/inspector/ScriptDebugServer.h: Removed.
1602 * ForwardingHeaders/inspector/agents/InspectorAgent.h: Removed.
1603 * ForwardingHeaders/inspector/agents/InspectorConsoleAgent.h: Removed.
1604 * ForwardingHeaders/inspector/agents/InspectorDebuggerAgent.h: Removed.
1605 * ForwardingHeaders/inspector/agents/InspectorHeapAgent.h: Removed.
1606 * ForwardingHeaders/inspector/agents/InspectorRuntimeAgent.h: Removed.
1607 * ForwardingHeaders/inspector/agents/InspectorScriptProfilerAgent.h: Removed.
1608 * ForwardingHeaders/interpreter/CallFrame.h: Removed.
1609 * ForwardingHeaders/interpreter/FrameTracers.h: Removed.
1610 * ForwardingHeaders/interpreter/ShadowChicken.h: Removed.
1611 * ForwardingHeaders/interpreter/StackVisitor.h: Removed.
1612 * ForwardingHeaders/jit/JITCode.h: Removed.
1613 * ForwardingHeaders/jit/JITMathICForwards.h: Removed.
1614 * ForwardingHeaders/jit/Snippet.h: Removed.
1615 * ForwardingHeaders/jit/SnippetParams.h: Removed.
1616 * ForwardingHeaders/jit/SpillRegistersMode.h: Removed.
1617 * ForwardingHeaders/masm/X86Assembler.h: Removed.
1618 * ForwardingHeaders/parser/ParserError.h: Removed.
1619 * ForwardingHeaders/parser/SourceCode.h: Removed.
1620 * ForwardingHeaders/parser/SourceProvider.h: Removed.
1621 * ForwardingHeaders/parser/SourceProviderCache.h: Removed.
1622 * ForwardingHeaders/profiler/ProfilerDatabase.h: Removed.
1623 * ForwardingHeaders/runtime/ArgList.h: Removed.
1624 * ForwardingHeaders/runtime/ArrayBuffer.h: Removed.
1625 * ForwardingHeaders/runtime/ArrayBufferView.h: Removed.
1626 * ForwardingHeaders/runtime/ArrayPrototype.h: Removed.
1627 * ForwardingHeaders/runtime/AuxiliaryBarrierInlines.h: Removed.
1628 * ForwardingHeaders/runtime/BooleanObject.h: Removed.
1629 * ForwardingHeaders/runtime/CallData.h: Removed.
1630 * ForwardingHeaders/runtime/CatchScope.h: Removed.
1631 * ForwardingHeaders/runtime/CommonIdentifiers.h: Removed.
1632 * ForwardingHeaders/runtime/Completion.h: Removed.
1633 * ForwardingHeaders/runtime/ConfigFile.h: Removed.
1634 * ForwardingHeaders/runtime/ConsoleClient.h: Removed.
1635 * ForwardingHeaders/runtime/ConsoleTypes.h: Removed.
1636 * ForwardingHeaders/runtime/ConstructAbility.h: Removed.
1637 * ForwardingHeaders/runtime/ConstructData.h: Removed.
1638 * ForwardingHeaders/runtime/DataView.h: Removed.
1639 * ForwardingHeaders/runtime/DateInstance.h: Removed.
1640 * ForwardingHeaders/runtime/Error.h: Removed.
1641 * ForwardingHeaders/runtime/ErrorHandlingScope.h: Removed.
1642 * ForwardingHeaders/runtime/ErrorInstance.h: Removed.
1643 * ForwardingHeaders/runtime/ErrorPrototype.h: Removed.
1644 * ForwardingHeaders/runtime/Exception.h: Removed.
1645 * ForwardingHeaders/runtime/ExceptionHelpers.h: Removed.
1646 * ForwardingHeaders/runtime/Float32Array.h: Removed.
1647 * ForwardingHeaders/runtime/Float64Array.h: Removed.
1648 * ForwardingHeaders/runtime/FunctionConstructor.h: Removed.
1649 * ForwardingHeaders/runtime/FunctionExecutable.h: Removed.
1650 * ForwardingHeaders/runtime/FunctionPrototype.h: Removed.
1651 * ForwardingHeaders/runtime/HashMapImpl.h: Removed.
1652 * ForwardingHeaders/runtime/Identifier.h: Removed.
1653 * ForwardingHeaders/runtime/IdentifierInlines.h: Removed.
1654 * ForwardingHeaders/runtime/InitializeThreading.h: Removed.
1655 * ForwardingHeaders/runtime/Int16Array.h: Removed.
1656 * ForwardingHeaders/runtime/Int32Array.h: Removed.
1657 * ForwardingHeaders/runtime/Int8Array.h: Removed.
1658 * ForwardingHeaders/runtime/InternalFunction.h: Removed.
1659 * ForwardingHeaders/runtime/Intrinsic.h: Removed.
1660 * ForwardingHeaders/runtime/IterationKind.h: Removed.
1661 * ForwardingHeaders/runtime/IteratorOperations.h: Removed.
1662 * ForwardingHeaders/runtime/IteratorPrototype.h: Removed.
1663 * ForwardingHeaders/runtime/JSAPIValueWrapper.h: Removed.
1664 * ForwardingHeaders/runtime/JSArray.h: Removed.
1665 * ForwardingHeaders/runtime/JSArrayBuffer.h: Removed.
1666 * ForwardingHeaders/runtime/JSArrayBufferView.h: Removed.
1667 * ForwardingHeaders/runtime/JSCInlines.h: Removed.
1668 * ForwardingHeaders/runtime/JSCJSValue.h: Removed.
1669 * ForwardingHeaders/runtime/JSCJSValueInlines.h: Removed.
1670 * ForwardingHeaders/runtime/JSCallee.h: Removed.
1671 * ForwardingHeaders/runtime/JSCell.h: Removed.
1672 * ForwardingHeaders/runtime/JSCellInlines.h: Removed.
1673 * ForwardingHeaders/runtime/JSDataView.h: Removed.
1674 * ForwardingHeaders/runtime/JSDestructibleObject.h: Removed.
1675 * ForwardingHeaders/runtime/JSDestructibleObjectHeapCellType.h: Removed.
1676 * ForwardingHeaders/runtime/JSExportMacros.h: Removed.
1677 * ForwardingHeaders/runtime/JSFunction.h: Removed.
1678 * ForwardingHeaders/runtime/JSGlobalObject.h: Removed.
1679 * ForwardingHeaders/runtime/JSGlobalObjectInlines.h: Removed.
1680 * ForwardingHeaders/runtime/JSInternalPromise.h: Removed.
1681 * ForwardingHeaders/runtime/JSInternalPromiseDeferred.h: Removed.
1682 * ForwardingHeaders/runtime/JSLock.h: Removed.
1683 * ForwardingHeaders/runtime/JSMap.h: Removed.
1684 * ForwardingHeaders/runtime/JSMapIterator.h: Removed.
1685 * ForwardingHeaders/runtime/JSModuleLoader.h: Removed.
1686 * ForwardingHeaders/runtime/JSModuleRecord.h: Removed.
1687 * ForwardingHeaders/runtime/JSNativeStdFunction.h: Removed.
1688 * ForwardingHeaders/runtime/JSONObject.h: Removed.
1689 * ForwardingHeaders/runtime/JSObject.h: Removed.
1690 * ForwardingHeaders/runtime/JSObjectInlines.h: Removed.
1691 * ForwardingHeaders/runtime/JSPromise.h: Removed.
1692 * ForwardingHeaders/runtime/JSPromiseConstructor.h: Removed.
1693 * ForwardingHeaders/runtime/JSPromiseDeferred.h: Removed.
1694 * ForwardingHeaders/runtime/JSProxy.h: Removed.
1695 * ForwardingHeaders/runtime/JSRunLoopTimer.h: Removed.
1696 * ForwardingHeaders/runtime/JSScriptFetchParameters.h: Removed.
1697 * ForwardingHeaders/runtime/JSScriptFetcher.h: Removed.
1698 * ForwardingHeaders/runtime/JSSegmentedVariableObjectHeapCellType.h: Removed.
1699 * ForwardingHeaders/runtime/JSSet.h: Removed.
1700 * ForwardingHeaders/runtime/JSSetIterator.h: Removed.
1701 * ForwardingHeaders/runtime/JSSourceCode.h: Removed.
1702 * ForwardingHeaders/runtime/JSString.h: Removed.
1703 * ForwardingHeaders/runtime/JSTypedArrays.h: Removed.
1704 * ForwardingHeaders/runtime/JSWithScope.h: Removed.
1705 * ForwardingHeaders/runtime/Lookup.h: Removed.
1706 * ForwardingHeaders/runtime/MapBase.h: Removed.
1707 * ForwardingHeaders/runtime/MapData.h: Removed.
1708 * ForwardingHeaders/runtime/MapDataInlines.h: Removed.
1709 * ForwardingHeaders/runtime/MatchResult.h: Removed.
1710 * ForwardingHeaders/runtime/Microtask.h: Removed.
1711 * ForwardingHeaders/runtime/ObjectConstructor.h: Removed.
1712 * ForwardingHeaders/runtime/ObjectPrototype.h: Removed.
1713 * ForwardingHeaders/runtime/Operations.h: Removed.
1714 * ForwardingHeaders/runtime/PrivateName.h: Removed.
1715 * ForwardingHeaders/runtime/PromiseDeferredTimer.h: Removed.
1716 * ForwardingHeaders/runtime/PropertyNameArray.h: Removed.
1717 * ForwardingHeaders/runtime/Protect.h: Removed.
1718 * ForwardingHeaders/runtime/RegExp.h: Removed.
1719 * ForwardingHeaders/runtime/RegExpObject.h: Removed.
1720 * ForwardingHeaders/runtime/RuntimeFlags.h: Removed.
1721 * ForwardingHeaders/runtime/SamplingProfiler.h: Removed.
1722 * ForwardingHeaders/runtime/ScriptFetchParameters.h: Removed.
1723 * ForwardingHeaders/runtime/ScriptFetcher.h: Removed.
1724 * ForwardingHeaders/runtime/StringObject.h: Removed.
1725 * ForwardingHeaders/runtime/StringPrototype.h: Removed.
1726 * ForwardingHeaders/runtime/Structure.h: Removed.
1727 * ForwardingHeaders/runtime/StructureChain.h: Removed.
1728 * ForwardingHeaders/runtime/StructureInlines.h: Removed.
1729 * ForwardingHeaders/runtime/Symbol.h: Removed.
1730 * ForwardingHeaders/runtime/SymbolTable.h: Removed.
1731 * ForwardingHeaders/runtime/ThrowScope.h: Removed.
1732 * ForwardingHeaders/runtime/TypedArrayController.h: Removed.
1733 * ForwardingHeaders/runtime/TypedArrayInlines.h: Removed.
1734 * ForwardingHeaders/runtime/TypedArrays.h: Removed.
1735 * ForwardingHeaders/runtime/Uint16Array.h: Removed.
1736 * ForwardingHeaders/runtime/Uint32Array.h: Removed.
1737 * ForwardingHeaders/runtime/Uint8Array.h: Removed.
1738 * ForwardingHeaders/runtime/Uint8ClampedArray.h: Removed.
1739 * ForwardingHeaders/runtime/VM.h: Removed.
1740 * ForwardingHeaders/runtime/VMEntryScope.h: Removed.
1741 * ForwardingHeaders/runtime/Watchdog.h: Removed.
1742 * ForwardingHeaders/runtime/WeakGCMap.h: Removed.
1743 * ForwardingHeaders/runtime/WeakGCMapInlines.h: Removed.
1744 * ForwardingHeaders/runtime/WriteBarrier.h: Removed.
1745 * ForwardingHeaders/wasm/WasmModule.h: Removed.
1746 * ForwardingHeaders/wasm/js/JSWebAssemblyModule.h: Removed.
1747 * ForwardingHeaders/yarr/RegularExpression.h: Removed.
1748 * ForwardingHeaders/yarr/Yarr.h: Removed.
1749 * ForwardingHeaders/yarr/YarrInterpreter.h: Removed.
1750 * ForwardingHeaders/yarr/YarrJIT.h: Removed.
1751 * ForwardingHeaders/yarr/YarrPattern.h: Removed.
1752 * Modules/applepay/cocoa/PaymentMerchantSessionCocoa.mm:
1753 * Modules/encryptedmedia/MediaKeyMessageEvent.h:
1754 * Modules/encryptedmedia/MediaKeyMessageEventInit.h:
1755 * Modules/encryptedmedia/MediaKeyStatusMap.h:
1756 * Modules/encryptedmedia/legacy/LegacyCDM.h:
1757 * Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp:
1758 * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.cpp:
1759 * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.cpp:
1760 * Modules/encryptedmedia/legacy/WebKitMediaKeySession.h:
1761 * Modules/encryptedmedia/legacy/WebKitMediaKeys.h:
1762 * Modules/fetch/FetchBody.cpp:
1763 * Modules/fetch/FetchRequestInit.h:
1764 * Modules/fetch/FetchResponse.h:
1765 * Modules/indexeddb/IDBCursor.cpp:
1766 * Modules/indexeddb/IDBCursor.h:
1767 * Modules/indexeddb/IDBCursorWithValue.cpp:
1768 * Modules/indexeddb/IDBDatabase.cpp:
1769 * Modules/indexeddb/IDBIndex.cpp:
1770 * Modules/indexeddb/IDBKey.cpp:
1771 * Modules/indexeddb/IDBKeyRange.cpp:
1772 * Modules/indexeddb/IDBObjectStore.cpp:
1773 * Modules/indexeddb/IDBRequest.cpp:
1774 * Modules/indexeddb/IDBRequest.h:
1775 * Modules/indexeddb/client/TransactionOperation.cpp:
1776 * Modules/indexeddb/server/MemoryObjectStore.cpp:
1777 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1778 * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1779 * Modules/mediacontrols/MediaControlsHost.cpp:
1780 * Modules/mediasource/SourceBuffer.cpp:
1781 * Modules/mediastream/RTCDataChannel.cpp:
1782 * Modules/plugins/QuickTimePluginReplacement.mm:
1783 * Modules/webaudio/AsyncAudioDecoder.cpp:
1784 * Modules/webaudio/AudioBuffer.cpp:
1785 * Modules/webaudio/AudioBuffer.h:
1786 * Modules/webaudio/AudioContext.cpp:
1787 * Modules/webaudio/AudioContext.h:
1788 * Modules/webaudio/AudioParam.h:
1789 * Modules/webaudio/AudioParamTimeline.h:
1790 * Modules/webaudio/PeriodicWave.h:
1791 * Modules/webaudio/RealtimeAnalyser.cpp:
1792 * Modules/webaudio/RealtimeAnalyser.h:
1793 * Modules/webaudio/ScriptProcessorNode.cpp:
1794 * Modules/webaudio/WaveShaperProcessor.h:
1795 * Modules/webauthn/AuthenticatorResponse.h:
1796 * Modules/webauthn/PublicKeyCredential.h:
1797 * Modules/websockets/WebSocket.cpp:
1798 * Modules/websockets/WebSocketChannel.cpp:
1799 * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
1800 * Modules/webvr/VREyeParameters.h:
1801 * Modules/webvr/VRFrameData.h:
1802 * Modules/webvr/VRPose.h:
1803 * Modules/webvr/VRStageParameters.h:
1804 * PlatformWin.cmake:
1805 * bindings/IDLTypes.h:
1806 * bindings/js/BufferSource.h:
1807 * bindings/js/CachedScriptFetcher.h:
1808 * bindings/js/CachedScriptSourceProvider.h:
1809 * bindings/js/CallTracerTypes.h:
1810 * bindings/js/CommonVM.cpp:
1811 * bindings/js/DOMGCOutputConstraint.cpp:
1812 * bindings/js/DOMGCOutputConstraint.h:
1813 * bindings/js/GCController.cpp:
1814 * bindings/js/GCController.h:
1815 * bindings/js/IDBBindingUtilities.cpp:
1816 * bindings/js/JSCallbackData.cpp:
1817 * bindings/js/JSCallbackData.h:
1818 * bindings/js/JSCustomElementInterface.cpp:
1819 * bindings/js/JSCustomElementInterface.h:
1820 * bindings/js/JSCustomEventCustom.cpp:
1821 * bindings/js/JSCustomXPathNSResolver.cpp:
1822 * bindings/js/JSCustomXPathNSResolver.h:
1823 * bindings/js/JSDOMBinding.h:
1824 * bindings/js/JSDOMBuiltinConstructorBase.cpp:
1825 * bindings/js/JSDOMConstructorBase.cpp:
1826 * bindings/js/JSDOMConvertBase.h:
1827 * bindings/js/JSDOMConvertBufferSource.h:
1828 * bindings/js/JSDOMConvertDate.cpp:
1829 * bindings/js/JSDOMConvertInterface.h:
1830 * bindings/js/JSDOMConvertJSON.h:
1831 * bindings/js/JSDOMConvertNumbers.cpp:
1832 * bindings/js/JSDOMConvertNumbers.h:
1833 * bindings/js/JSDOMConvertObject.h:
1834 * bindings/js/JSDOMConvertRecord.h:
1835 * bindings/js/JSDOMConvertSequences.h:
1836 * bindings/js/JSDOMConvertStrings.cpp:
1837 * bindings/js/JSDOMConvertUnion.h:
1838 * bindings/js/JSDOMExceptionHandling.cpp:
1839 * bindings/js/JSDOMExceptionHandling.h:
1840 * bindings/js/JSDOMGlobalObject.cpp:
1841 * bindings/js/JSDOMGlobalObject.h:
1842 * bindings/js/JSDOMGlobalObjectTask.cpp:
1843 * bindings/js/JSDOMGuardedObject.h:
1844 * bindings/js/JSDOMIterator.cpp:
1845 * bindings/js/JSDOMIterator.h:
1846 * bindings/js/JSDOMMapLike.cpp:
1847 * bindings/js/JSDOMMapLike.h:
1848 * bindings/js/JSDOMPromise.cpp:
1849 * bindings/js/JSDOMPromise.h:
1850 * bindings/js/JSDOMPromiseDeferred.cpp:
1851 * bindings/js/JSDOMPromiseDeferred.h:
1852 * bindings/js/JSDOMWindowBase.cpp:
1853 * bindings/js/JSDOMWindowCustom.cpp:
1854 * bindings/js/JSDOMWindowProxy.cpp:
1855 * bindings/js/JSDOMWindowProxy.h:
1856 * bindings/js/JSDOMWrapper.cpp:
1857 * bindings/js/JSDOMWrapper.h:
1858 * bindings/js/JSDOMWrapperCache.cpp:
1859 * bindings/js/JSDOMWrapperCache.h:
1860 * bindings/js/JSDynamicDowncast.h:
1861 * bindings/js/JSErrorHandler.cpp:
1862 * bindings/js/JSEventCustom.cpp:
1863 * bindings/js/JSEventListener.cpp:
1864 * bindings/js/JSEventListener.h:
1865 * bindings/js/JSHTMLElementCustom.cpp:
1866 * bindings/js/JSHistoryCustom.cpp:
1867 * bindings/js/JSIDBCursorWithValueCustom.cpp:
1868 * bindings/js/JSIDBIndexCustom.cpp:
1869 * bindings/js/JSImageDataCustom.cpp:
1870 * bindings/js/JSLazyEventListener.cpp:
1871 * bindings/js/JSLocationCustom.cpp:
1872 * bindings/js/JSMainThreadExecState.h:
1873 * bindings/js/JSMainThreadExecStateInstrumentation.h:
1874 * bindings/js/JSMessageChannelCustom.cpp:
1875 * bindings/js/JSMessageEventCustom.cpp:
1876 * bindings/js/JSNodeIteratorCustom.cpp:
1877 * bindings/js/JSPopStateEventCustom.cpp:
1878 * bindings/js/JSReadableStreamPrivateConstructors.cpp:
1879 * bindings/js/JSTreeWalkerCustom.cpp:
1880 * bindings/js/JSWebGL2RenderingContextCustom.cpp:
1881 * bindings/js/JSWorkerGlobalScopeBase.cpp:
1882 * bindings/js/ReadableStreamDefaultController.cpp:
1883 * bindings/js/ReadableStreamDefaultController.h:
1884 * bindings/js/ScheduledAction.cpp:
1885 * bindings/js/ScheduledAction.h:
1886 * bindings/js/ScriptCachedFrameData.cpp:
1887 * bindings/js/ScriptCachedFrameData.h:
1888 * bindings/js/ScriptController.cpp:
1889 * bindings/js/ScriptController.h:
1890 * bindings/js/ScriptControllerMac.mm:
1891 * bindings/js/ScriptModuleLoader.cpp:
1892 * bindings/js/ScriptModuleLoader.h:
1893 * bindings/js/ScriptSourceCode.h:
1894 * bindings/js/ScriptState.cpp:
1895 * bindings/js/ScriptWrappable.h:
1896 * bindings/js/ScriptWrappableInlines.h:
1897 * bindings/js/SerializedScriptValue.cpp:
1898 * bindings/js/SerializedScriptValue.h:
1899 * bindings/js/StructuredClone.cpp:
1900 * bindings/js/WebCoreBuiltinNames.h:
1901 * bindings/js/WebCoreJSClientData.cpp:
1902 * bindings/js/WebCoreTypedArrayController.cpp:
1903 * bindings/js/WebCoreTypedArrayController.h:
1904 * bindings/js/WorkerScriptController.cpp:
1905 * bindings/js/WorkerScriptController.h:
1906 * bridge/NP_jsobject.cpp:
1907 * bridge/c/CRuntimeObject.cpp:
1908 * bridge/c/c_class.cpp:
1909 * bridge/c/c_instance.cpp:
1910 * bridge/c/c_runtime.cpp:
1911 * bridge/c/c_utility.cpp:
1912 * bridge/c/c_utility.h:
1913 * bridge/jsc/BridgeJSC.cpp:
1914 * bridge/jsc/BridgeJSC.h:
1915 * bridge/npruntime.cpp:
1916 * bridge/objc/ObjCRuntimeObject.mm:
1917 * bridge/objc/WebScriptObject.mm:
1918 * bridge/objc/WebScriptObjectPrivate.h:
1919 * bridge/objc/objc_instance.mm:
1920 * bridge/objc/objc_runtime.h:
1921 * bridge/objc/objc_runtime.mm:
1922 * bridge/objc/objc_utility.h:
1923 * bridge/objc/objc_utility.mm:
1924 * bridge/runtime_array.cpp:
1925 * bridge/runtime_array.h:
1926 * bridge/runtime_method.cpp:
1927 * bridge/runtime_method.h:
1928 * bridge/runtime_object.cpp:
1929 * bridge/runtime_object.h:
1930 * bridge/runtime_root.cpp:
1931 * bridge/runtime_root.h:
1932 * crypto/SubtleCrypto.cpp:
1933 * crypto/SubtleCrypto.h:
1934 * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
1935 * crypto/keys/CryptoRsaKeyAlgorithm.h:
1936 * crypto/mac/CryptoKeyRSAMac.cpp:
1937 * crypto/parameters/CryptoAlgorithmEcdsaParams.h:
1938 * crypto/parameters/CryptoAlgorithmHkdfParams.h:
1939 * crypto/parameters/CryptoAlgorithmHmacKeyParams.h:
1940 * crypto/parameters/CryptoAlgorithmPbkdf2Params.h:
1941 * crypto/parameters/CryptoAlgorithmRsaHashedImportParams.h:
1942 * crypto/parameters/CryptoAlgorithmRsaHashedKeyGenParams.h:
1943 * crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h:
1944 * css/CSSFontFaceSource.h:
1945 * css/DOMMatrixReadOnly.cpp:
1946 * css/DOMMatrixReadOnly.h:
1948 * dom/CustomElementReactionQueue.cpp:
1949 * dom/CustomElementRegistry.cpp:
1950 * dom/CustomEvent.cpp:
1951 * dom/CustomEvent.h:
1954 * dom/ErrorEvent.cpp:
1956 * dom/LoadableScript.h:
1957 * dom/MessageEvent.cpp:
1958 * dom/MessageEvent.h:
1959 * dom/ModuleFetchParameters.h:
1960 * dom/PopStateEvent.cpp:
1961 * dom/PopStateEvent.h:
1962 * dom/PromiseRejectionEvent.cpp:
1963 * dom/PromiseRejectionEvent.h:
1964 * dom/RejectedPromiseTracker.cpp:
1965 * dom/RejectedPromiseTracker.h:
1966 * dom/ScriptExecutionContext.cpp:
1967 * dom/ScriptExecutionContext.h:
1968 * dom/TextEncoder.cpp:
1969 * dom/TextEncoder.h:
1970 * domjit/DOMJITHelpers.h:
1971 * domjit/DOMJITIDLTypeFilter.h:
1972 * domjit/JSDocumentDOMJIT.cpp:
1973 * domjit/JSNodeDOMJIT.cpp:
1974 * fileapi/BlobBuilder.cpp:
1975 * fileapi/FileReader.cpp:
1976 * fileapi/FileReaderLoader.cpp:
1977 * fileapi/FileReaderSync.cpp:
1978 * html/BaseTextInputType.cpp:
1979 * html/EmailInputType.cpp:
1980 * html/HTMLAllCollection.cpp:
1981 * html/HTMLCanvasElement.cpp:
1982 * html/HTMLImageLoader.cpp:
1983 * html/HTMLMediaElement.cpp:
1984 * html/HTMLPlugInImageElement.cpp:
1985 * html/ImageData.cpp:
1987 * html/MediaEncryptedEventInit.h:
1988 * html/WebKitMediaKeyError.h:
1989 * html/canvas/WebGLAny.h:
1990 * html/canvas/WebGLRenderingContext.cpp:
1991 * html/canvas/WebGLRenderingContextBase.cpp:
1992 * html/canvas/WebGLRenderingContextBase.h:
1993 * html/canvas/WebGPUBuffer.cpp:
1994 * html/canvas/WebGPURenderingContext.cpp:
1995 * html/canvas/WebGPURenderingContext.h:
1996 * html/track/DataCue.cpp:
1997 * html/track/DataCue.h:
1998 * inspector/CommandLineAPIHost.cpp:
1999 * inspector/CommandLineAPIHost.h:
2000 * inspector/CommandLineAPIModule.cpp:
2001 * inspector/CommandLineAPIModule.h:
2002 * inspector/InspectorCanvas.cpp:
2003 * inspector/InspectorCanvas.h:
2004 * inspector/InspectorClient.cpp:
2005 * inspector/InspectorController.cpp:
2006 * inspector/InspectorController.h:
2007 * inspector/InspectorDatabaseResource.h:
2008 * inspector/InspectorFrontendClientLocal.cpp:
2009 * inspector/InspectorFrontendHost.cpp:
2010 * inspector/InspectorInstrumentation.cpp:
2011 * inspector/InspectorInstrumentation.h:
2012 * inspector/InspectorOverlay.cpp:
2013 * inspector/InspectorOverlay.h:
2014 * inspector/InspectorShaderProgram.cpp:
2015 * inspector/InspectorShaderProgram.h:
2016 * inspector/InspectorStyleSheet.cpp:
2017 * inspector/InspectorStyleSheet.h:
2018 * inspector/InspectorWebAgentBase.h:
2019 * inspector/InstrumentingAgents.h:
2020 * inspector/PageScriptDebugServer.cpp:
2021 * inspector/PageScriptDebugServer.h:
2022 * inspector/TimelineRecordFactory.cpp:
2023 * inspector/WebInjectedScriptHost.h:
2024 * inspector/WebInjectedScriptManager.h:
2025 * inspector/WorkerInspectorController.cpp:
2026 * inspector/WorkerInspectorController.h:
2027 * inspector/WorkerScriptDebugServer.cpp:
2028 * inspector/WorkerScriptDebugServer.h:
2029 * inspector/WorkerToPageFrontendChannel.h:
2030 * inspector/agents/InspectorApplicationCacheAgent.h:
2031 * inspector/agents/InspectorCSSAgent.cpp:
2032 * inspector/agents/InspectorCSSAgent.h:
2033 * inspector/agents/InspectorCanvasAgent.cpp:
2034 * inspector/agents/InspectorCanvasAgent.h:
2035 * inspector/agents/InspectorDOMAgent.cpp:
2036 * inspector/agents/InspectorDOMAgent.h:
2037 * inspector/agents/InspectorDOMDebuggerAgent.cpp:
2038 * inspector/agents/InspectorDOMDebuggerAgent.h:
2039 * inspector/agents/InspectorDOMStorageAgent.cpp:
2040 * inspector/agents/InspectorDOMStorageAgent.h:
2041 * inspector/agents/InspectorDatabaseAgent.cpp:
2042 * inspector/agents/InspectorDatabaseAgent.h:
2043 * inspector/agents/InspectorIndexedDBAgent.cpp:
2044 * inspector/agents/InspectorIndexedDBAgent.h:
2045 * inspector/agents/InspectorLayerTreeAgent.cpp:
2046 * inspector/agents/InspectorLayerTreeAgent.h:
2047 * inspector/agents/InspectorMemoryAgent.cpp:
2048 * inspector/agents/InspectorMemoryAgent.h:
2049 * inspector/agents/InspectorNetworkAgent.cpp:
2050 * inspector/agents/InspectorNetworkAgent.h:
2051 * inspector/agents/InspectorPageAgent.cpp:
2052 * inspector/agents/InspectorPageAgent.h:
2053 * inspector/agents/InspectorTimelineAgent.cpp:
2054 * inspector/agents/InspectorTimelineAgent.h:
2055 * inspector/agents/InspectorWorkerAgent.h:
2056 * inspector/agents/WebConsoleAgent.cpp:
2057 * inspector/agents/WebConsoleAgent.h:
2058 * inspector/agents/WebDebuggerAgent.h:
2059 * inspector/agents/WebHeapAgent.h:
2060 * inspector/agents/page/PageDebuggerAgent.cpp:
2061 * inspector/agents/page/PageRuntimeAgent.cpp:
2062 * inspector/agents/page/PageRuntimeAgent.h:
2063 * inspector/agents/worker/ServiceWorkerAgent.h:
2064 * inspector/agents/worker/WorkerDebuggerAgent.cpp:
2065 * inspector/agents/worker/WorkerRuntimeAgent.cpp:
2066 * inspector/agents/worker/WorkerRuntimeAgent.h:
2067 * loader/EmptyClients.cpp:
2068 * page/CaptionUserPreferences.cpp:
2070 * page/ChromeClient.h:
2072 * page/DOMWindow.cpp:
2075 * page/OriginThreadLocalCache.h:
2076 * page/PageConsoleClient.cpp:
2077 * page/PageConsoleClient.h:
2078 * page/PageDebuggable.cpp:
2079 * page/PageGroup.cpp:
2080 * page/SettingsBase.h:
2081 * page/UserContentController.cpp:
2082 * page/cocoa/ResourceUsageThreadCocoa.mm:
2083 * page/csp/ContentSecurityPolicy.cpp:
2084 * page/ios/FrameIOS.mm:
2085 * page/linux/ResourceUsageOverlayLinux.cpp:
2086 * page/linux/ResourceUsageThreadLinux.cpp:
2087 * platform/MediaSample.h:
2088 * platform/SerializedPlatformRepresentation.h:
2089 * platform/SharedBuffer.h:
2090 * platform/audio/mac/CARingBuffer.h:
2091 * platform/cocoa/SharedBufferCocoa.mm:
2092 * platform/graphics/ImageBuffer.h:
2093 * platform/graphics/LegacyCDMSession.h:
2094 * platform/graphics/MediaPlayer.h:
2095 * platform/graphics/avfoundation/CDMFairPlayStreaming.cpp:
2096 * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
2097 * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
2098 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2099 * platform/graphics/avfoundation/MediaSampleAVFObjC.h:
2100 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2101 * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
2102 * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
2103 * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
2104 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2105 * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
2106 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2107 * platform/graphics/cairo/ImageBufferCairo.cpp:
2108 * platform/graphics/cg/ImageBufferDataCG.cpp:
2109 * platform/graphics/cg/ImageBufferDataCG.h:
2110 * platform/graphics/cocoa/GPUDeviceMetal.mm:
2111 * platform/graphics/filters/FEBlend.cpp:
2112 * platform/graphics/filters/FEColorMatrix.cpp:
2113 * platform/graphics/filters/FEComponentTransfer.cpp:
2114 * platform/graphics/filters/FEComposite.cpp:
2115 * platform/graphics/filters/FEConvolveMatrix.cpp:
2116 * platform/graphics/filters/FEDisplacementMap.cpp:
2117 * platform/graphics/filters/FEDropShadow.cpp:
2118 * platform/graphics/filters/FEGaussianBlur.cpp:
2119 * platform/graphics/filters/FELighting.h:
2120 * platform/graphics/filters/FEMorphology.cpp:
2121 * platform/graphics/filters/FETurbulence.cpp:
2122 * platform/graphics/filters/FilterEffect.cpp:
2123 * platform/graphics/filters/FilterEffect.h:
2124 * platform/graphics/gpu/GPUBuffer.h:
2125 * platform/graphics/gpu/GPUDevice.h:
2126 * platform/graphics/iso/ISOBox.cpp:
2127 * platform/graphics/iso/ISOOriginalFormatBox.cpp:
2128 * platform/graphics/iso/ISOProtectionSchemeInfoBox.cpp:
2129 * platform/graphics/iso/ISOSchemeInformationBox.cpp:
2130 * platform/graphics/iso/ISOSchemeTypeBox.cpp:
2131 * platform/graphics/iso/ISOTrackEncryptionBox.cpp:
2132 * platform/graphics/iso/ISOVTTCue.cpp:
2133 * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2134 * platform/graphics/win/ImageBufferDataDirect2D.cpp:
2135 * platform/graphics/win/ImageBufferDataDirect2D.h:
2136 * platform/ios/wak/WebCoreThread.mm:
2137 * platform/mac/SerializedPlatformRepresentationMac.mm:
2138 * platform/mac/StringUtilities.mm:
2139 * platform/mock/mediasource/MockBox.cpp:
2140 * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
2141 * svg/graphics/SVGImage.cpp:
2142 * testing/GCObservation.cpp:
2143 * testing/GCObservation.h:
2144 * testing/Internals.cpp:
2145 * testing/Internals.h:
2146 * testing/LegacyMockCDM.cpp:
2147 * testing/MockCDMFactory.cpp:
2148 * testing/js/WebCoreTestSupport.cpp:
2149 * workers/Worker.cpp:
2151 * workers/WorkerConsoleClient.cpp:
2152 * workers/WorkerConsoleClient.h:
2153 * workers/WorkerGlobalScope.cpp:
2154 * workers/WorkerGlobalScope.h:
2155 * workers/WorkerGlobalScopeProxy.h:
2156 * workers/WorkerInspectorProxy.cpp:
2157 * workers/WorkerMessagingProxy.cpp:
2158 * workers/WorkerThread.h:
2159 * workers/service/ExtendableEvent.cpp:
2160 * workers/service/ServiceWorker.cpp:
2161 * workers/service/ServiceWorker.h:
2162 * workers/service/ServiceWorkerClient.h:
2163 * workers/service/context/ServiceWorkerInspectorProxy.cpp:
2164 * workers/service/context/ServiceWorkerThread.cpp:
2165 * xml/XMLHttpRequest.cpp:
2167 2018-02-06 Said Abou-Hallawa <sabouhallawa@apple.com>
2169 Rendering SVG images with same size as WebGL texture doesn't work correctly
2170 https://bugs.webkit.org/show_bug.cgi?id=182367
2172 Reviewed by Dean Jackson.
2174 If am image buffer is created for a webgl texture and then it is reused
2175 for another texture, it has to be cleared before drawing.
2177 Test: webgl/webgl-texture-image-buffer-reuse.html
2179 * html/canvas/WebGLRenderingContextBase.cpp:
2180 (WebCore::WebGLRenderingContextBase::LRUImageBufferCache::imageBuffer):
2182 2018-02-06 Youenn Fablet <youenn@apple.com>
2184 Use downcast in createLinkPreloadResourceClient
2185 https://bugs.webkit.org/show_bug.cgi?id=182488
2187 Reviewed by Antti Koivisto.
2189 No observable change of behavior.
2190 Add a new link preloader client for text track.
2192 * loader/LinkLoader.cpp:
2193 (WebCore::createLinkPreloadResourceClient):
2194 * loader/LinkPreloadResourceClients.h:
2196 2018-02-06 Youenn Fablet <youenn@apple.com>
2198 imported/w3c/web-platform-tests/service-workers/service-worker/fetch-event-respond-with-response-body-with-invalid-chunk.https.html is flaky
2199 https://bugs.webkit.org/show_bug.cgi?id=182541
2201 Reviewed by Chris Dumez.
2203 Covered by test being no longer flaky.
2204 In case of loading error when getting the response body, we were only reporting
2205 the error if there was a callback set or a ReadableStream already created.
2206 Otherwise, we were just stopping loading and if creating a ReadableStream, we were just returning an empty body.
2208 FetchBodyOwner now stores a loading error.
2209 In case a readable stream is created, it will error it if there is a loading error.
2210 If there is not and the loading failed later on, the stream will be errored using the current code path.
2212 * Modules/cache/DOMCache.cpp:
2213 (WebCore::DOMCache::put):
2214 * Modules/fetch/FetchResponse.cpp:
2215 (WebCore::FetchResponse::clone):
2216 (WebCore::FetchResponse::BodyLoader::didFail):
2217 * Modules/fetch/FetchResponse.h:
2218 * workers/service/context/ServiceWorkerFetch.cpp:
2219 (WebCore::ServiceWorkerFetch::processResponse):
2221 2018-02-06 Andy Estes <aestes@apple.com>
2223 [Payment Request] show() should take an optional PaymentDetailsUpdate promise
2224 https://bugs.webkit.org/show_bug.cgi?id=182538
2225 <rdar://problem/36754552>
2227 Reviewed by Tim Horton.
2229 Taught show() to take an optional promise for a PaymentDetailsUpdate.
2231 Added test cases to http/tests/paymentrequest/payment-request-show-method.https.html.
2233 * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
2234 (WebCore::ApplePayPaymentHandler::detailsUpdated):
2236 Changed to take a PaymentRequest::UpdateReason instead of a eventType string.
2238 (WebCore::ApplePayPaymentHandler::shippingAddressUpdated):
2239 (WebCore::ApplePayPaymentHandler::shippingOptionUpdated):
2240 (WebCore::ApplePayPaymentHandler::paymentMethodUpdated):
2241 (WebCore::ApplePayPaymentHandler::didAuthorizePayment):
2242 (WebCore::ApplePayPaymentHandler::didSelectShippingMethod):
2243 (WebCore::ApplePayPaymentHandler::didSelectShippingContact):
2244 (WebCore::ApplePayPaymentHandler::didSelectPaymentMethod):
2246 Asserted that only one of the PaymentSession delegates is executing at a time.
2248 * Modules/applepay/paymentrequest/ApplePayPaymentHandler.h:
2249 * Modules/paymentrequest/PaymentHandler.h:
2251 Changed detailsUpdated to take a PaymentRequest::UpdateReason instead of a eventType string.
2253 * Modules/paymentrequest/PaymentRequest.cpp:
2254 (WebCore::PaymentRequest::show):
2256 If there is a details promise, call updateWith() with UpdateReason::ShowDetailsResolved.
2258 (WebCore::PaymentRequest::shippingAddressChanged):
2259 (WebCore::PaymentRequest::shippingOptionChanged):
2260 (WebCore::PaymentRequest::paymentMethodChanged):
2262 Used whenDetailsSettled() to ensure that update events do not start before the show()
2263 details promise settles.
2265 (WebCore::PaymentRequest::updateWith):
2266 (WebCore::PaymentRequest::settleDetailsPromise):
2268 Changed to use a PaymentRequest::UpdateReason instead of a eventType string.
2270 (WebCore::PaymentRequest::whenDetailsSettled):
2272 If there is a details promise, wait for it to settle before executing the callback.
2274 * Modules/paymentrequest/PaymentRequest.h:
2276 Defined enum class UpdateReason.
2278 * Modules/paymentrequest/PaymentRequest.idl:
2280 Updated show() to take an optional Promise<PaymentDetailsUpdate>.
2282 * Modules/paymentrequest/PaymentRequestUpdateEvent.cpp:
2283 (WebCore::PaymentRequestUpdateEvent::updateWith):
2285 Map the event type to a PaymentRequest::UpdateReason.
2287 2018-02-06 Dean Jackson <dino@apple.com>
2289 REGRESSION: WebGL no longer producing a transparent canvas on iOS
2290 https://bugs.webkit.org/show_bug.cgi?id=182550
2291 <rdar://problem/37234491>
2293 Reviewed by Eric Carlson.
2295 Due to some weirdness GL_RGBA8 is sometimes different between iOS and
2296 other platforms. Only tell the WebGLLayer that it is opaque when it really
2299 Covered by existing test: fast/canvas/webgl/context-attributes-alpha
2301 * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
2302 (WebCore::GraphicsContext3D::setRenderbufferStorageFromDrawable): Look at the context
2303 attributes to decide if we should use an opaque layer.
2304 * platform/graphics/cocoa/WebGLLayer.mm: Ditto.
2305 (-[WebGLLayer initWithGraphicsContext3D:]):
2307 2018-02-06 Andy Estes <aestes@apple.com>
2309 [WebIDL] Support optional Promise arguments
2310 https://bugs.webkit.org/show_bug.cgi?id=182399
2311 <rdar://problem/36754552>
2313 Reviewed by Sam Weinig and Chris Dumez.
2315 Previously, declaring a Promise argument as optional would result in a native type of
2316 std::optional<RefPtr<DOMPromise>>. This is wasteful, since RefPtr can represent an optional
2317 argument by storing nullptr. Further, PassArgumentExpression() assumed Promises were never
2318 optional and tried to pass the argument as a Ref by calling RefPtr::releaseNonNull().
2320 This patch removes the std::optional wrapper around optional Promises and simply passes the
2321 promise as a RefPtr to native code.
2323 * bindings/scripts/CodeGeneratorJS.pm:
2324 (PassArgumentExpression):
2325 (GenerateParametersCheck):
2326 * bindings/scripts/test/JS/JSTestObj.cpp:
2327 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalPromiseBody):
2328 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalPromise):
2329 * bindings/scripts/test/TestObj.idl:
2331 2018-02-06 Youenn Fablet <youenn@apple.com>
2333 HasServiceWorkerRegistration bit should be sent when creating a new page
2334 https://bugs.webkit.org/show_bug.cgi?id=182410
2336 Reviewed by Chris Dumez.
2338 Covered by new API test.
2340 Changed the default value of service workers being registered to false.
2341 Every page created in the process will be responsible to change the value to true,
2342 at which time the value will be kept to true for the lifetime of the process.
2344 * workers/service/ServiceWorkerProvider.h:
2346 2018-02-06 Ross Kirsling <ross.kirsling@sony.com>
2348 Add missing #if ENABLE(VIDEO) after r228092.
2349 https://bugs.webkit.org/show_bug.cgi?id=182539
2351 Reviewed by Michael Catanzaro.
2353 * html/ImageBitmap.cpp:
2355 2018-02-06 Antoine Quint <graouts@apple.com>
2357 [Modern Media Controls] Test at media/modern-media-controls/tracks-panel/tracks-panel-controls-bar-remains-visible-after-clicking-over-it.html fails
2358 https://bugs.webkit.org/show_bug.cgi?id=182425
2360 Reviewed by Dean Jackson.
2362 This test failed because the controls bar would not hit test at the moment we synthesized a mousemove over the controls bar as the first step towards
2363 synthesizing a click on the controls bar to dismiss the tracks panel. Indeed, it would have "pointer-events" set to "none" until the tracks panel was
2364 dismissed, which would only happen after the click event had been propagated. All we need to do is to ensure that none of the controls within the controls
2365 bar get activated as a result of clicking over them when the tracks panel is visible, so we instead set "pointer-events" to "none" on all children of a
2366 controls bar rather than the controls bar itself, which can thus still hit test.
2368 * Modules/modern-media-controls/controls/media-controls.css:
2369 (.media-controls.shows-tracks-panel > .controls-bar > *,):
2370 (.media-controls.shows-tracks-panel > .controls-bar,): Deleted.
2372 2018-02-06 Chris Dumez <cdumez@apple.com>
2374 Service workers registrations are saved to disk before the install / activation succeeds
2375 https://bugs.webkit.org/show_bug.cgi?id=182535
2376 <rdar://problem/36591485>
2378 Reviewed by Youenn Fablet.
2380 Service workers registrations are saved to disk before the install / activation succeeds.
2381 This means if the browser exits before the install / activation succeeds, we may restore
2382 from disk a registration with an “active” worker which may have never been installed /
2385 To address the issue, we now delay saving the registration to disk until after the service
2386 worker has been activated.
2388 No new tests, restoration from disk is covered by API tests that still pass.
2390 * workers/service/server/SWServer.cpp:
2391 (WebCore::SWServer::didFinishActivation):
2392 (WebCore::SWServer::installContextData):
2394 2018-02-06 Ms2ger <Ms2ger@igalia.com>
2396 Initialize ImageBitmap::m_bitmapData in the constructor.
2397 https://bugs.webkit.org/show_bug.cgi?id=182487
2399 Reviewed by Sam Weinig.
2401 This removes the span of time where an ImageBitmap object would exist
2402 with a null m_bitmapData during its construction.
2404 No new tests: no behavior changes.
2406 * html/ImageBitmap.cpp:
2407 (WebCore::ImageBitmap::create): update signature
2408 (WebCore::ImageBitmap::createPromise): update callers
2409 (WebCore::ImageBitmap::ImageBitmap): update signature
2410 * html/ImageBitmap.h: update signatures
2412 2018-02-05 Ryosuke Niwa <rniwa@webkit.org>
2414 Release assertion in inlineVideoFrame
2415 https://bugs.webkit.org/show_bug.cgi?id=182513
2416 <rdar://problem/37159363>
2418 Reviewed by Zalan Bujtas.
2420 The bug was caused by the fact it's not always safe to invoke updateLayout even when isSafeToUpdateStyleOrLayout
2421 on a document of a flattened frame on iOS. isSafeToUpdateStyleOrLayout returns true when the frame view is in
2422 the frame-flattening mode to avoid hitting a release asssertion in updateLayout of the frame. However, it's still
2423 not safe to invoke updateLayout on a parent frame in this case.
2425 As a result, inlineVideoFrame (in Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm) invokes updateLayout
2426 even when the top-level document is not safe to update when the video element is in a frame-flattened document.
2428 Fixed this bug by explicitly checking that we still have a live render tree and document hasn't been stopped.
2429 Also replaced other uses of isSafeToUpdateStyleOrLayout by more explicit checks.
2431 * accessibility/AccessibilityObject.cpp:
2432 (WebCore::AccessibilityObject::updateBackingStore): Made the early exit condition added in r227006 more explicit.
2433 Namely, InspectorDOMAgent::pseudoElementCreated is invoked during style recalc.
2435 (WebCore::isSafeToUpdateStyleOrLayout): Made this local to the file.
2436 (WebCore::Document::updateStyleIfNeeded):
2437 (WebCore::Document::updateLayout):
2439 * html/MediaElementSession.cpp:
2440 (WebCore::isMainContentForPurposesOfAutoplay): Made the early exit condition added in r227529 more explicit. Don't
2441 update the layout when the render tree had been destroyed or the active DOM objects had been stopped.
2443 2018-02-05 Youenn Fablet <youenn@apple.com>
2445 Crash in imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub.html
2446 https://bugs.webkit.org/show_bug.cgi?id=182422
2447 <rdar://problem/37182665>
2449 Reviewed by Alex Christensen.
2451 Covered by test no longer crashing in Debug mode.
2452 Make sure completionHandler is called on the main thread.
2454 * platform/network/cocoa/WebCoreNSURLSession.mm:
2455 (-[WebCoreNSURLSessionDataTask resource:receivedRedirect:request:completionHandler:]):
2457 2018-02-05 Filip Pizlo <fpizlo@apple.com>
2459 Global objects should be able to use TLCs to allocate from different blocks from each other
2460 https://bugs.webkit.org/show_bug.cgi?id=182227
2462 Reviewed by Daniel Bates and Chris Dumez.
2464 No new tests because no change in behavior.
2466 Adopt JSC TLC API to put distance between objects from different security origins. WebCore has
2467 a subclass of ThreadLocalCache that supports hash-consing based on the relevant origin data
2468 using the existing SecurityOriginHash. It's Document's job to initiate this, but all of the
2469 logic is in WebCore::OriginThreadLocalCache.
2471 Workers don't opt into this. They just get the VM's default TLC all the time.
2473 * ForwardingHeaders/heap/ThreadLocalCache.h: Added.
2475 * WebCore.xcodeproj/project.pbxproj:
2476 * bindings/js/JSDOMGlobalObject.cpp:
2477 (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
2478 * bindings/js/JSDOMGlobalObject.h:
2479 * bindings/js/JSDOMWindowBase.cpp:
2480 (WebCore::JSDOMWindowBase::JSDOMWindowBase):
2482 (WebCore::Document::initSecurityContext):
2483 (WebCore::Document::threadLocalCache):
2485 * page/OriginThreadLocalCache.cpp: Added.
2486 (WebCore::threadLocalCacheMap):
2487 (WebCore::OriginThreadLocalCache::create):
2488 (WebCore::OriginThreadLocalCache::~OriginThreadLocalCache):
2489 (WebCore::OriginThreadLocalCache::OriginThreadLocalCache):
2490 * page/OriginThreadLocalCache.h: Added.
2491 * page/SecurityOrigin.cpp:
2492 (WebCore::SecurityOrigin::passesFileCheck const):
2493 (WebCore::SecurityOrigin::setEnforcesFilePathSeparation):
2494 (WebCore::SecurityOrigin::toString const):
2495 (WebCore::SecurityOrigin::enforceFilePathSeparation): Deleted.
2496 * page/SecurityOrigin.h:
2497 (WebCore::SecurityOrigin::enforcesFilePathSeparation const):
2499 2018-02-05 Per Arne Vollan <pvollan@apple.com>
2501 [Win] Release assert failed under NetworkStateNotifier::singleton.
2502 https://bugs.webkit.org/show_bug.cgi?id=182516
2504 Reviewed by Brent Fulgham.
2506 The callback NetworkStateNotifier::addressChangeCallback will always be called on a
2507 worker thread on Windows. Since the method NetworkStateNotifier::singleton() is
2508 called by NetworkStateNotifier::addressChangeCallback, but has to be called on the
2509 on the main thread, the call has to be moved there.
2511 No new tests. I have not been able to reproduce the crash.
2513 * platform/network/win/NetworkStateNotifierWin.cpp:
2514 (WebCore::NetworkStateNotifier::addressChangeCallback):
2516 2018-02-05 Don Olmstead <don.olmstead@sony.com>
2518 Abstract heap generator should include JavaScriptCore headers directly
2519 https://bugs.webkit.org/show_bug.cgi?id=182501
2521 Reviewed by Alex Christensen.
2523 No new tests. No change in behavior.
2525 * domjit/generate-abstract-heap.rb:
2527 2018-02-05 Wenson Hsieh <wenson_hsieh@apple.com>
2529 [Extra zoom mode] Implement number pad UI when editing `tel` and `number` inputs
2530 https://bugs.webkit.org/show_bug.cgi?id=182472
2531 <rdar://problem/35143057>
2533 Reviewed by Tim Horton.
2535 Adds a localized string for the "Done" button text in extra zoomed form controls.
2537 * English.lproj/Localizable.strings:
2538 * platform/LocalizedStrings.cpp:
2539 (WebCore::formControlDoneButtonTitle):
2540 * platform/LocalizedStrings.h:
2542 2018-02-05 John Wilander <wilander@apple.com>
2544 Build fix for r228115, simple naming issue succeeded —> success.
2545 https://bugs.webkit.org/show_bug.cgi?id=182507
2546 <rdar://problem/37248566>
2548 Reviewed by Eric Carlson.
2550 No new tests. Build fix.
2552 * platform/ios/VideoFullscreenInterfaceAVKit.mm:
2553 (VideoFullscreenInterfaceAVKit::enterFullscreenHandler):
2554 succeeded —> success
2556 2018-02-05 Matt Lewis <jlewis3@apple.com>
2558 Unreviewed, rolling out r228086.
2560 This introduced a failure with API test
2561 URLTest.HostIsIPAddress.
2565 "Add a way to check if a host is an IP address"
2566 https://bugs.webkit.org/show_bug.cgi?id=182427
2567 https://trac.webkit.org/changeset/228086
2569 2018-02-05 Matt Lewis <jlewis3@apple.com>
2571 Unreviewed, rolling out r228103.
2573 This caused multiple tests to crash.
2577 "Use downcast in createLinkPreloadResourceClient"
2578 https://bugs.webkit.org/show_bug.cgi?id=182488
2579 https://trac.webkit.org/changeset/228103
2581 2018-02-05 Eric Carlson <eric.carlson@apple.com>
2583 [iOS] VideoFullscreenInterfaceAVKit should not ignore errors
2584 https://bugs.webkit.org/show_bug.cgi?id=182497
2585 <rdar://problem/36986898>
2587 Reviewed by Jer Noble.
2589 Always call layoutIfNeeded before calling -[AVPlayerViewController enterFullScreenAnimated:completionHandler]
2590 or -[AVPlayerViewController exitFullScreenAnimated:completionHandler] because they both fail
2591 if the view needs layout. Also don't ignore errors returned by those calls.
2593 No new tests, the failure is non deterministic and I was not able to reproduce in a test.
2595 * platform/ios/VideoFullscreenInterfaceAVKit.mm:
2596 (VideoFullscreenInterfaceAVKit::applicationDidBecomeActive):
2597 (VideoFullscreenInterfaceAVKit::enterFullscreenStandard):
2598 (VideoFullscreenInterfaceAVKit::exitFullscreen):
2599 (VideoFullscreenInterfaceAVKit::cleanupFullscreen):
2600 (VideoFullscreenInterfaceAVKit::didStartPictureInPicture):
2601 (VideoFullscreenInterfaceAVKit::prepareForPictureInPictureStopWithCompletionHandler):
2602 (VideoFullscreenInterfaceAVKit::doEnterFullscreen):
2603 (VideoFullscreenInterfaceAVKit::exitFullscreenHandler):
2604 (VideoFullscreenInterfaceAVKit::enterFullscreenHandler):
2606 2018-02-05 Daniel Bates <dabates@apple.com>
2608 REGRESSION (r222795): Nike app "Refused to set unsafe header" when adding and viewing cart
2609 https://bugs.webkit.org/show_bug.cgi?id=182491
2610 <rdar://problem/36533447>
2612 Reviewed by Brent Fulgham.
2614 Exempt Nike from the XHR header restrictions in r222795.
2616 Following r222795 only Dashboard widgets are allowed to set arbitrary XHR headers.
2617 However Nike also depends on such functionality.
2619 * platform/RuntimeApplicationChecks.h:
2620 * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
2621 (WebCore::IOSApplication::isNike):
2623 2018-02-02 Brent Fulgham <bfulgham@apple.com>
2625 Improve NetworkResourceLoader logging so it can be used for 'setCookiesFromDOM'
2626 https://bugs.webkit.org/show_bug.cgi?id=182455
2627 <rdar://problem/36626601>
2629 Reviewed by Chris Dumez.
2631 After this refactoring, a convenience method I added in r227860 is no longer needed.
2632 This patch removes this dead code.
2634 * platform/network/NetworkStorageSession.h: Export 'cookieStoragePartition' so it can
2636 * platform/network/cf/NetworkStorageSessionCFNet.cpp:
2637 (WebCore::NetworkStorageSession::hasStorageAccessForFrame): Deleted unused method.
2639 2018-02-05 Antti Koivisto <antti@apple.com>
2641 Make ASSERT_WITH_SECURITY_IMPLICATION in CachedResourceClientWalker::next a release assert
2642 https://bugs.webkit.org/show_bug.cgi?id=182492
2644 Reviewed by Youenn Fablet.
2646 * loader/cache/CachedResourceClientWalker.h:
2647 (WebCore::CachedResourceClientWalker::next):
2649 2018-02-05 John Wilander <wilander@apple.com>
2651 Storage Access API: Add testRunner.getAllStorageAccessEntries() to make testing easier and more explicit
2652 https://bugs.webkit.org/show_bug.cgi?id=181601
2653 <rdar://problem/36475837>
2655 Reviewed by Alex Christensen.
2657 No new tests. Existing test updated.
2659 http/tests/storageAccess/request-and-grant-access-then-detach-should-not-have-access.html
2660 was found to be flaky. With the testRunner.hasStorageAccessEntry() getter
2661 it's possible to check access even if a frame doesn't respond timely to
2662 postMessage after detach and attach.
2664 * platform/network/NetworkStorageSession.h:
2665 * platform/network/cf/NetworkStorageSessionCFNet.cpp:
2666 (WebCore::NetworkStorageSession::getAllStorageAccessEntries const):
2668 2018-02-05 Youenn Fablet <youenn@apple.com>
2670 Use downcast in createLinkPreloadResourceClient
2671 https://bugs.webkit.org/show_bug.cgi?id=182488
2673 Reviewed by Antti Koivisto.
2675 No observable change of behavior.
2677 * loader/LinkLoader.cpp:
2678 (WebCore::createLinkPreloadResourceClient):
2680 2018-02-05 Chris Dumez <cdumez@apple.com>
2682 Layout Test imported/w3c/web-platform-tests/service-workers/service-worker/register-same-scope-different-script-url.https.html is flaky
2683 https://bugs.webkit.org/show_bug.cgi?id=181166
2684 <rdar://problem/37169508>
2686 Reviewed by Youenn Fablet.
2688 I found out that this test was flakily timing out because our jobQueues would sometimes get stuck
2689 when their current job's connection or service worker (when scheduled by a service worker) would
2690 go away before the job is complete.
2692 This patch makes our job queues operation more robust by:
2693 1. Cancelling all jobs from a given connection when a SWServerConnection goes away
2694 2. Cancelling all jobs from a given service worker when a service worker gets terminated
2696 We also make sure service workers created by a job get properly terminated when a job
2697 is canceled to avoid leaving service workers in limbo.
2699 No new tests, unskipped existing flaky test.
2701 * workers/service/ServiceWorkerContainer.cpp:
2702 (WebCore::ServiceWorkerContainer::addRegistration):
2703 (WebCore::ServiceWorkerContainer::removeRegistration):
2704 (WebCore::ServiceWorkerContainer::updateRegistration):
2705 * workers/service/ServiceWorkerJobData.cpp:
2706 (WebCore::ServiceWorkerJobData::ServiceWorkerJobData):
2707 (WebCore::ServiceWorkerJobData::isolatedCopy const):
2708 * workers/service/ServiceWorkerJobData.h:
2709 (WebCore::ServiceWorkerJobData::encode const):
2710 (WebCore::ServiceWorkerJobData::decode):
2711 * workers/service/server/SWServer.cpp:
2712 (WebCore::SWServer::startScriptFetch):
2713 (WebCore::SWServer::scriptContextFailedToStart):
2714 (WebCore::SWServer::scriptContextStarted):
2715 (WebCore::SWServer::terminatePreinstallationWorker):
2716 (WebCore::SWServer::installContextData):
2717 (WebCore::SWServer::workerContextTerminated):
2718 (WebCore::SWServer::unregisterConnection):
2719 * workers/service/server/SWServer.h:
2720 * workers/service/server/SWServerJobQueue.cpp:
2721 (WebCore::SWServerJobQueue::removeAllJobsMatching):
2722 (WebCore::SWServerJobQueue::cancelJobsFromConnection):
2723 (WebCore::SWServerJobQueue::cancelJobsFromServiceWorker):
2724 * workers/service/server/SWServerJobQueue.h:
2725 * workers/service/server/SWServerRegistration.cpp:
2726 (WebCore::SWServerRegistration::setPreInstallationWorker):
2728 2018-02-05 Antti Koivisto <antti@apple.com>
2730 Crash on sfgate.com because mismatching link preload types
2731 https://bugs.webkit.org/show_bug.cgi?id=182483
2732 <rdar://problem/37065331>
2734 Reviewed by Daniel Bates.
2736 Preloading the same URL with different 'as' types causes some confusion.
2738 Test: http/tests/preload/link-preload-type-mismatch.html
2740 * loader/LinkLoader.cpp:
2741 (WebCore::createLinkPreloadResourceClient):
2743 Ensure we use the actual resource type when creating the client.
2745 (WebCore::LinkLoader::preloadIfNeeded):
2747 Don't construct client if the types don't match. This can happen if there is an existing
2748 preload for the same resource with different type.
2750 2018-02-05 Manuel Rego Casasnovas <rego@igalia.com>
2752 [css-grid] Rename gutter properties to remove "grid-" prefix
2753 https://bugs.webkit.org/show_bug.cgi?id=180290
2755 Reviewed by Javier Fernandez.
2757 This patch applies the resoultion of the CSS WG to unprefix
2758 the CSS Grid Layout gutter properties:
2759 https://github.com/w3c/csswg-drafts/issues/1696
2761 column-gap already existed before, as it's part of Multicol.
2762 The patch adds the new properties row-gap and gap, and keep the legacy ones
2764 - grid-column-gap => column-gap
2765 - grid-row-gap => row-gap
2768 As column-gap was already animatable, this change takes advantage
2769 to make animatable row-gap too.
2771 Tests: imported/w3c/web-platform-tests/css/css-align/gaps/
2773 * css/CSSComputedStyleDeclaration.cpp:
2774 (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
2775 * css/CSSProperties.json:
2776 * css/StyleProperties.cpp:
2777 * css/parser/CSSParserFastPaths.cpp:
2778 (WebCore::isSimpleLengthPropertyID):
2779 * css/parser/CSSPropertyParser.cpp:
2780 (WebCore::CSSPropertyParser::parseSingleValue):
2781 (WebCore::CSSPropertyParser::parseShorthand):
2782 * page/animation/CSSPropertyAnimation.cpp:
2783 (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
2784 * rendering/RenderGrid.cpp:
2785 (WebCore::RenderGrid::availableSpaceForGutters const):
2786 (WebCore::RenderGrid::gridGap const):
2787 * rendering/style/RenderStyle.h:
2788 (WebCore::RenderStyle::gridAutoRows const):
2789 (WebCore::RenderStyle::columnGap const):
2790 (WebCore::RenderStyle::rowGap const):
2791 (WebCore::RenderStyle::setGridItemRowEnd):
2792 (WebCore::RenderStyle::setColumnGap):
2793 (WebCore::RenderStyle::setRowGap):
2794 (WebCore::RenderStyle::initialRowGap):
2795 * rendering/style/StyleGridData.cpp:
2796 (WebCore::StyleGridData::StyleGridData):
2797 * rendering/style/StyleGridData.h:
2798 (WebCore::StyleGridData::operator== const):
2799 * rendering/style/StyleMultiColData.cpp:
2800 (WebCore::StyleMultiColData::StyleMultiColData):
2801 (WebCore::StyleMultiColData::operator== const):
2802 * rendering/style/StyleMultiColData.h:
2803 * rendering/style/StyleRareNonInheritedData.cpp:
2804 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2805 (WebCore::StyleRareNonInheritedData::operator== const):
2806 * rendering/style/StyleRareNonInheritedData.h:
2808 2018-02-05 Ms2ger <Ms2ger@igalia.com>
2810 Implement createImageBitmap(HTMLVideoElement)
2811 https://bugs.webkit.org/show_bug.cgi?id=182388
2813 Reviewed by Žan Doberšek.
2815 The implementation is inspired by CanvasRenderingContext2DBase::drawImage().
2819 - web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html
2820 - web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args.html
2823 * html/ImageBitmap.cpp:
2824 (WebCore::taintsOrigin): Add function to help with the implementation.
2825 (WebCore::ImageBitmap::createPromise): Fill in implementation.
2827 2018-02-05 Zan Dobersek <zdobersek@igalia.com>
2829 Unreviewed, rolling out r228085.
2831 Pixel data stride is imposed by OpenGL and shouldn't be
2836 "[Cairo] Correctly calculate stride in
2837 GraphicsContext3D::paintToCanvas()"
2838 https://bugs.webkit.org/show_bug.cgi?id=182466
2839 https://trac.webkit.org/changeset/228085
2841 2018-02-05 Carlos Garcia Campos <cgarcia@igalia.com>
2843 [SOUP] WebSockets must use system proxy settings
2844 https://bugs.webkit.org/show_bug.cgi?id=126384
2846 Reviewed by Michael Catanzaro.
2848 Use soup_session_connect_async() when available to create the WebSockets connection instead of GSocketClient
2851 * platform/network/soup/SocketStreamHandleImpl.h:
2852 * platform/network/soup/SocketStreamHandleImplSoup.cpp:
2853 (WebCore::wssSocketClientEventCallback):
2854 (WebCore::SocketStreamHandleImpl::create):
2855 (WebCore::SocketStreamHandleImpl::connected):
2856 (WebCore::SocketStreamHandleImpl::connectedCallback):
2857 (WebCore::SocketStreamHandleImpl::platformClose):
2859 2018-02-05 Carlos Garcia Campos <cgarcia@igalia.com>
2861 Add a way to check if a host is an IP address
2862 https://bugs.webkit.org/show_bug.cgi?id=182427
2864 Reviewed by Alex Christensen.
2866 There are several places where this is needed. We currently just assume that any host ending in a digit is an IP
2867 address, except in PublicSuffix where platform specific code is used. This patch adds URL::hostIsIPAddress()
2868 platform specific implementations, falling back to current assumption if there isn't an implementation for the
2871 * page/OriginAccessEntry.cpp:
2872 (WebCore::OriginAccessEntry::OriginAccessEntry): Use URL::hostIsIPAddress().
2874 (WebCore::URL::hostIsIPAddress): Fallback implementation.
2876 * platform/mac/PublicSuffixMac.mm:
2877 (WebCore::topPrivatelyControlledDomain): Use URL::hostIsIPAddress().
2878 * platform/mac/URLMac.mm:
2879 (WebCore::URL::hostIsIPAddress): Move implementation from PublicSuffixMac.mm.
2880 * platform/network/curl/CookieUtil.cpp:
2881 (WebCore::CookieUtil::isIPAddress): Use URL::hostIsIPAddress().
2882 * platform/soup/URLSoup.cpp:
2883 (WebCore::URL::hostIsIPAddress): Use g_hostname_is_ip_address().
2885 2018-02-04 Zan Dobersek <zdobersek@igalia.com>
2887 [Cairo] Correctly calculate stride in GraphicsContext3D::paintToCanvas()
2888 https://bugs.webkit.org/show_bug.cgi?id=182466
2890 Reviewed by Michael Catanzaro.
2892 * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
2893 (WebCore::GraphicsContext3D::paintToCanvas):
2894 Use cairo_format_stride_for_width() to obtain stride that Cairo thinks
2895 is appropriate for the given width, taking into account internal
2896 alignment requirements.
2898 2018-02-04 Zan Dobersek <zdobersek@igalia.com>
2900 [Cairo] Split TexMap functionality out of GraphicsContext3DCairo
2901 https://bugs.webkit.org/show_bug.cgi?id=182465
2903 Reviewed by Michael Catanzaro.
2905 Take the Non-Cairo GraphicsContext3D functionality that's stashed in
2906 GraphicsContext3DCairo and move it into the GraphicsContext3DTextureMapper
2909 In GraphicsContext3DCairo.cpp, only the Cairo-specific GraphicsContext3D
2910 functionality remains, specifically ImageExtractor and paintToCanvas().
2912 Everything else is moved into GraphicsContext3DTextureMapper.cpp. This
2913 filename and its location under platform/graphics/texmap/ was chosen
2914 since all the ports using this file (GTK, WPE, WinCairo) are also using
2915 the TextureMapper module. Various #if-guards are simplified in the
2916 moved-over code to reflect this.
2918 GraphicsContext3DCairo.cpp now better reflects GraphicsContext3DCG.cpp,
2919 with both implementing functionality specific to a 2D painting library,
2920 whereas GraphicsContext3DTextureMapper.cpp reflects
2921 GraphicsContext3DCocoa.cpp in covering functionality needed to integrate
2922 the GraphicsContext3D output into the platform-specific composition
2925 No new tests -- no change in behavior.
2927 * platform/TextureMapper.cmake:
2928 * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
2929 (WebCore::activeContexts): Deleted.
2930 (WebCore::GraphicsContext3D::create): Deleted.
2931 (WebCore::GraphicsContext3D::GraphicsContext3D): Deleted.
2932 (WebCore::GraphicsContext3D::~GraphicsContext3D): Deleted.
2933 (WebCore::GraphicsContext3D::setContextLostCallback): Deleted.
2934 (WebCore::GraphicsContext3D::setErrorMessageCallback): Deleted.
2935 (WebCore::GraphicsContext3D::makeContextCurrent): Deleted.
2936 (WebCore::GraphicsContext3D::checkGPUStatus): Deleted.
2937 (WebCore::GraphicsContext3D::platformGraphicsContext3D): Deleted.
2938 (WebCore::GraphicsContext3D::platformTexture const): Deleted.
2939 (WebCore::GraphicsContext3D::isGLES2Compliant const): Deleted.
2940 (WebCore::GraphicsContext3D::platformLayer const): Deleted.
2941 (WebCore::GraphicsContext3D::getExtensions): Deleted.
2942 * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp: Copied from Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp.
2943 (WebCore::activeContexts):
2944 (WebCore::GraphicsContext3D::create):
2945 (WebCore::GraphicsContext3D::GraphicsContext3D):
2946 (WebCore::GraphicsContext3D::~GraphicsContext3D):
2947 (WebCore::GraphicsContext3D::setContextLostCallback):
2948 (WebCore::GraphicsContext3D::setErrorMessageCallback):
2949 (WebCore::GraphicsContext3D::makeContextCurrent):
2950 (WebCore::GraphicsContext3D::checkGPUStatus):
2951 (WebCore::GraphicsContext3D::platformGraphicsContext3D):
2952 (WebCore::GraphicsContext3D::platformTexture const):
2953 (WebCore::GraphicsContext3D::isGLES2Compliant const):
2954 (WebCore::GraphicsContext3D::platformLayer const):
2955 (WebCore::GraphicsContext3D::getExtensions):
2957 2018-02-04 Zan Dobersek <zdobersek@igalia.com>
2959 Simplify GraphicsContext3D::paintToCanvas()
2960 https://bugs.webkit.org/show_bug.cgi?id=182459
2962 Reviewed by Michael Catanzaro.
2964 Cairo-specific paintToCanvas() method is dropped in favor of the more
2965 common one that operates on a GraphicsContext object. The platform
2966 context object is then retrieved inside the Cairo-speficic
2967 paintToCanvas() implementation, and not at the call site in
2968 GraphicsContext3D::paintRenderingResultsToCanvas().
2970 GraphicsContext3D::paintToCanvas() is also modified so that the image
2971 and canvas sizes are passed through IntSize objects, and not through
2972 a width-and-height pair of integer values.
2974 No new tests -- no change in behavior.
2976 * platform/graphics/GraphicsContext3D.h:
2977 * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
2978 (WebCore::GraphicsContext3D::paintToCanvas):
2979 * platform/graphics/cg/GraphicsContext3DCG.cpp:
2980 (WebCore::GraphicsContext3D::paintToCanvas):
2981 * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2982 (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
2984 2018-02-03 Alexey Proskuryakov <ap@apple.com>
2986 Tweak availability macros for CAN_DISALLOW_USER_INSTALLED_FONTS
2988 Rubber-stamped by Maciej Stachowiak.
2990 * platform/graphics/cocoa/FontCacheCoreText.cpp:
2992 2018-02-02 Daniel Bates <dabates@apple.com>
2994 Clean up FrameLoader::receivedFirstData()
2995 https://bugs.webkit.org/show_bug.cgi?id=182361
2997 Reviewed by Andy Estes.
2999 * loader/FrameLoader.cpp:
3000 (WebCore::FrameLoader::receivedFirstData):
3002 2018-02-02 Myles C. Maxfield <mmaxfield@apple.com>
3004 Test fix after r227995
3005 https://bugs.webkit.org/show_bug.cgi?id=180951
3009 Webfonts shouldn't be run through CTFontDescriptorCreateMatchingFontDescriptor().
3010 Also, unify macOS's and iOS's implementation of FontCache::lastResortFallbackFont().
3012 Covered by existing tests.
3014 * platform/graphics/cocoa/FontCacheCoreText.cpp:
3015 (WebCore::FontDatabase::collectionForFamily):
3016 (WebCore::FontDatabase::fontForPostScriptName):
3017 (WebCore::addAttributesForInstalledFonts):
3018 (WebCore::addAttributesForWebFonts):
3019 (WebCore::installedFontMandatoryAttributes):
3020 (WebCore::FontCache::lastResortFallbackFont):
3021 (WebCore::addAttributesForUserInstalledFonts): Deleted.
3022 (WebCore::mandatoryAttributesForUserInstalledFonts): Deleted.
3023 * platform/graphics/cocoa/FontCacheCoreText.h:
3024 * platform/graphics/ios/FontCacheIOS.mm:
3025 (WebCore::FontCache::lastResortFallbackFont): Deleted.
3026 * platform/graphics/mac/FontCacheMac.mm:
3027 (WebCore::FontCache::lastResortFallbackFont): Deleted.
3028 * platform/graphics/mac/FontCustomPlatformData.cpp:
3029 (WebCore::FontCustomPlatformData::fontPlatformData):
3031 2018-02-02 Basuke Suzuki <Basuke.Suzuki@sony.com>
3033 Fix build error after r 227457 with VIDEO and WEB_AUDIO disabled
3034 https://bugs.webkit.org/show_bug.cgi?id=182395
3036 Reviewed by Eric Carlson
3038 * platform/audio/PlatformMediaSessionManager.cpp:
3039 (WebCore::PlatformMediaSessionManager::updateNowPlayingInfoIfNecessary):
3041 2018-02-02 Don Olmstead <don.olmstead@sony.com>
3043 Remove WebCore/ForwardingHeaders directory
3044 https://bugs.webkit.org/show_bug.cgi?id=182347
3046 Reviewed by Alex Christensen.
3048 Baseline tests updated.
3050 * bindings/scripts/CodeGeneratorJS.pm:
3051 (AddToIncludesForIDLType):
3052 (GenerateEnumerationImplementationContent):
3053 (GenerateDictionaryImplementationContent):
3055 (GenerateOverloadDispatcher):
3056 (addUnscopableProperties):
3057 (GenerateImplementation):
3058 (GenerateOperationDefinition):
3059 (GenerateSerializerDefinition):
3060 (GenerateConstructorHelperMethods):
3061 * bindings/scripts/test/JS/JSInterfaceName.cpp:
3062 * bindings/scripts/test/JS/JSMapLike.cpp:
3063 * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
3064 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3065 * bindings/scripts/test/JS/JSTestCEReactions.cpp:
3066 * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
3067 * bindings/scripts/test/JS/JSTestCallTracer.cpp:
3068 * bindings/scripts/test/JS/JSTestCallbackFunctionRethrow.cpp:
3069 * bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.cpp:
3070 * bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp:
3071 * bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
3072 * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
3073 * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
3074 * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
3075 * bindings/scripts/test/JS/JSTestDOMJIT.h:
3076 * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
3077 * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3078 * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3079 * bindings/scripts/test/JS/JSTestException.cpp:
3080 * bindings/scripts/test/JS/JSTestException.h:
3081 * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
3082 * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
3083 * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
3084 * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
3085 * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
3086 * bindings/scripts/test/JS/JSTestInterface.cpp:
3087 * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
3088 * bindings/scripts/test/JS/JSTestIterable.cpp:
3089 * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
3090 * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3091 * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
3092 * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
3093 * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
3094 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3095 * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
3096 * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
3097 * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
3098 * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
3099 * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
3100 * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
3101 * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
3102 * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
3103 * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
3104 * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
3105 * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
3106 * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
3107 * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
3108 * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
3109 * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
3110 * bindings/scripts/test/JS/JSTestNode.cpp:
3111 * bindings/scripts/test/JS/JSTestObj.cpp:
3112 * bindings/scripts/test/JS/JSTestObj.h:
3113 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3114 * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
3115 * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
3116 * bindings/scripts/test/JS/JSTestPluginInterface.cpp:
3117 * bindings/scripts/test/JS/JSTestPluginInterface.h:
3118 * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
3119 * bindings/scripts/test/JS/JSTestSerialization.cpp:
3120 * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp:
3121 * bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
3122 * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
3123 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3124 * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
3125 * bindings/scripts/test/JS/JSTestStandaloneEnumeration.cpp:
3126 * bindings/scripts/test/JS/JSTestStringifier.cpp:
3127 * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
3128 * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
3129 * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
3130 * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
3131 * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
3132 * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
3133 * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3134 * dom/make_event_factory.pl:
3135 (generateImplementation):
3137 2018-02-02 David Quesada <david_quesada@apple.com>
3139 WebAppManifest scope should default to the containing directory of start_url if 'scope' is not specified
3140 https://bugs.webkit.org/show_bug.cgi?id=182363
3141 rdar://problem/37093498
3143 Reviewed by Ryosuke Niwa.
3145 If an app manifest doesn't specify a scope, we should default to the "parent directory" of
3146 the start URL, rather than leaving the app unbounded. This is more reasonable than using the
3147 entire internet as the app scope.
3149 No new tests, updates to the existing tests verify the new behavior.
3151 * Modules/applicationmanifest/ApplicationManifestParser.cpp:
3152 (WebCore::ApplicationManifestParser::parseScope):
3154 2018-02-02 Youenn Fablet <youenn@apple.com>
3156 Clearing all service worker registrations should wait for importing service worker registration to finish
3157 https://bugs.webkit.org/show_bug.cgi?id=182407
3158 <rdar://problem/37167523>
3160 Reviewed by Chris Dumez.
3162 * workers/service/server/SWServer.cpp:
3163 (WebCore::SWServer::clear): ensure completion handler is called on early exit case.
3165 2018-02-02 Youenn Fablet <youenn@apple.com>
3167 Clearing all service worker registrations should wait for importing service worker registration to finish
3168 https://bugs.webkit.org/show_bug.cgi?id=182407
3170 Reviewed by Chris Dumez.
3172 Covered by existing tests and the service worker API test being no longer flaky.
3174 * workers/service/server/SWServer.cpp:
3175 (WebCore::SWServer::registrationStoreImportComplete):
3176 (WebCore::SWServer::clearAll):
3177 (WebCore::SWServer::clear):
3178 (WebCore::SWServer::getOriginsWithRegistrations):
3179 * workers/service/server/SWServer.h:
3181 2018-02-02 Chris Dumez <cdumez@apple.com>
3183 Clearing a registration should null out its workers before setting their state to "redundant"
3184 https://bugs.webkit.org/show_bug.cgi?id=182418
3185 <rdar://problem/37142874>
3187 Reviewed by Youenn Fablet.
3189 Clearing a registration should null out its workers before setting their state to "redundant".
3190 This seems to match Firefox and Chrome.
3192 No new tests, rebaselined existing test.
3194 * workers/service/server/SWServerRegistration.cpp:
3195 (WebCore::SWServerRegistration::clear):
3196 (WebCore::clearRegistrationWorker): Deleted.
3198 2018-02-02 Antoine Quint <graouts@apple.com>
3200 [Modern Media Controls] Turn media/modern-media-controls/tracks-panel and media/modern-media-controls/tracks-support back on
3201 https://bugs.webkit.org/show_bug.cgi?id=182426
3203 Reviewed by Dean Jackson.
3205 Ensure that the tracks panel isn't dismissed by updating the layout.
3207 * Modules/modern-media-controls/controls/inline-media-controls.js:
3208 (InlineMediaControls.prototype.layout):
3210 2018-02-02 Commit Queue <commit-queue@webkit.org>
3212 Unreviewed, rolling out r227964.
3213 https://bugs.webkit.org/show_bug.cgi?id=182423
3215 It broke several unit tests (Requested by KaL on #webkit).
3219 "[SOUP] Ensure domain is valid when converting a WebCore
3221 https://bugs.webkit.org/show_bug.cgi?id=182328
3222 https://trac.webkit.org/changeset/227964
3224 2018-02-01 Chris Dumez <cdumez@apple.com>
3226 When SW install fails, null out registration.installing before setting worker state to "redundant"
3227 https://bugs.webkit.org/show_bug.cgi?id=182416
3228 <rdar://problem/37141997>
3230 Reviewed by Youenn Fablet.
3232 When SW install fails, null out registration.installing before setting worker state to "redundant".
3233 This does not match the spec but this is what Firefox and Chrome do. This is also what the
3234 web-platform-tests expect.
3236 Test: http/tests/workers/service/install-fails.html
3238 * workers/service/server/SWServerJobQueue.cpp:
3239 (WebCore::SWServerJobQueue::didFinishInstall):
3241 2018-02-01 Myles C. Maxfield <mmaxfield@apple.com>
3243 Test fix after r227848.
3244 https://bugs.webkit.org/show_bug.cgi?id=180951
3248 Using kCTFontNameAttribute on an in-memory font causes CTFontDescriptorCreateMatchingFontDescriptor()
3249 to return nullptr. Luckily, we weren't using that attribute anyway.
3251 Covered by existing tests.
3253 * platform/graphics/cocoa/FontCacheCoreText.cpp:
3254 (WebCore::mandatoryAttributesForUserInstalledFonts):
3256 2018-02-01 Youenn Fablet <youenn@apple.com>
3258 Delay service worker process creation until actually needed by SWServer
3259 https://bugs.webkit.org/show_bug.cgi?id=182301
3261 Reviewed by Chris Dumez.
3263 Rename SWServer::Connection::scheduleJobInServer to scheduleJob.
3264 Add sessionID getter from an SWServer.
3266 * workers/service/server/SWServer.h:
3267 (WebCore::SWServer::sessionID const):
3269 2018-02-01 Fujii Hironori <Hironori.Fujii@sony.com>
3271 REGRESSION(r227594) [WinCairo] NULL pointer crash in GraphicsContext::getWindowsContext
3272 https://bugs.webkit.org/show_bug.cgi?id=182282
3274 Reviewed by Žan Doberšek.
3276 ImageBufferCairo has been changed to use GraphicsContextImplCairo
3277 in r227594. But, GraphicsContext::getWindowsContext doesn't care
3278 the case of using GraphicsContextImpl and crashes due to null
3279 dereference of GraphicsContext::m_data.
3281 GraphicsContext::getWindowsContext should create a HDC in that case.
3283 Remove the argument mayCreateBitmap because it is always
3286 No new tests (Covered by the existing tests)
3288 * platform/graphics/GraphicsContext.h:
3289 Removed a argument mayCreateBitmap of getWindowsContext and releaseWindowsContext.
3290 * platform/graphics/win/GraphicsContextCGWin.cpp:
3291 (WebCore::GraphicsContext::releaseWindowsContext): Ditto.
3292 * platform/graphics/win/GraphicsContextCairoWin.cpp:
3293 (WebCore::GraphicsContext::releaseWindowsContext): Ditto.
3294 * platform/graphics/win/GraphicsContextDirect2D.cpp:
3295 (WebCore::GraphicsContext::releaseWindowsContext): Ditto.
3296 * platform/graphics/win/GraphicsContextWin.cpp:
3297 (WebCore::GraphicsContext::getWindowsContext):
3298 Create a HDC if m_impl is null. Removed a argument mayCreateBitmap.
3299 * platform/graphics/win/LocalWindowsContext.h:
3300 (WebCore::LocalWindowsContext::LocalWindowsContext):
3301 Removed m_mayCreateBitmap.
3302 (WebCore::LocalWindowsContext::~LocalWindowsContext): Ditto.
3304 2018-02-01 Christopher Reid <chris.reid@sony.com>
3306 [Curl] Use SQLite database in cookie jar implementation for Curl port
3307 https://bugs.webkit.org/show_bug.cgi?id=174942
3309 Reviewed by Alex Christensen.
3311 No new tests, Set-Cookie is already tested in Layout tests.
3313 Adding an initial SQLite CookieJar implementation to the curl network layer.
3314 WebCore will now parse and handle both HTTP and DOM cookies instead of using libcurl.
3315 This currently supports cookie storage and retrieval.
3316 Cookie deletion is not yet implemented.
3318 * platform/Curl.cmake:
3319 * platform/network/NetworkStorageSession.h: Added cookieDB storage in curl.
3320 * platform/network/curl/CookieJarCurl.cpp: Removed the old curl cookie handling.
3321 * platform/network/curl/CookieJarCurl.h:
3322 * platform/network/curl/CookieJarCurlDatabase.cpp: Added.
3323 * platform/network/curl/CookieJarCurlDatabase.h: Added.
3324 * platform/network/curl/CookieJarDB.cpp: Added.
3325 * platform/network/curl/CookieJarDB.h: Added.
3326 * platform/network/curl/CookieUtil.cpp: Added.
3327 * platform/network/curl/CookieUtil.h: Added.
3328 * platform/network/curl/CurlContext.cpp: Removed the old curl cookie handling.
3329 * platform/network/curl/CurlContext.h:
3330 * platform/network/curl/CurlRequest.cpp: Added handlers for HTTP response cookies.
3331 * platform/network/curl/NetworkStorageSessionCurl.cpp:
3332 * platform/network/curl/ResourceHandleCurlDelegate.cpp:
3334 2018-02-01 Chris Dumez <cdumez@apple.com>
3336 Add missing RETURN_IF_EXCEPTION() after object->get() calls in convertDictionary<>()
3337 https://bugs.webkit.org/show_bug.cgi?id=182392
3338 <rdar://problem/37119215>
3340 Reviewed by Geoffrey Garen.
3342 Add missing RETURN_IF_EXCEPTION() after object->get() calls in convertDictionary<>(),
3343 given that getting the property from the object can throw an exception.
3345 No new tests, rebaselined existing test.
3347 * bindings/scripts/CodeGeneratorJS.pm:
3348 (GenerateDictionaryImplementationContent):
3349 * bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
3350 (WebCore::convertDictionary<TestCallbackInterface::Dictionary>):
3351 * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3352 (WebCore::convertDictionary<TestEventConstructor::Init>):
3353 * bindings/scripts/test/JS/JSTestObj.cpp:
3354 (WebCore::convertDictionary<TestObj::Dictionary>):
3355 (WebCore::convertDictionary<TestObj::DictionaryThatShouldNotTolerateNull>):
3356 (WebCore::convertDictionary<TestObj::DictionaryThatShouldTolerateNull>):
3357 (WebCore::convertDictionary<AlternateDictionaryName>):
3358 (WebCore::convertDictionary<TestObj::ParentDictionary>):
3359 (WebCore::convertDictionary<TestObj::ChildDictionary>):
3360 (WebCore::convertDictionary<TestObj::ConditionalDictionaryA>):
3361 (WebCore::convertDictionary<TestObj::ConditionalDictionaryB>):
3362 (WebCore::convertDictionary<TestObj::ConditionalDictionaryC>):
3363 * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
3364 (WebCore::convertDictionary<TestPromiseRejectionEvent::Init>):
3365 * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
3366 (WebCore::convertDictionary<DictionaryImplName>):
3368 2018-02-01 Ryosuke Niwa <rniwa@webkit.org>
3370 Some test cases in accessibility/mac/selection-notification-focus-change.html fail
3371 https://bugs.webkit.org/show_bug.cgi?id=182212
3372 <rdar://problem/36937147>
3374 Reviewed by Antti Koivisto and Wenson Hsieh.
3376 The failure was caused by the async update of the selection appearance not preserving selection reveal intent.
3377 Fixed the bug by storing the intent in a member variable and using it later.
3380 (WebCore::Element::focus): Removed an unnecessary synchronous layout update.
3381 * editing/FrameSelection.cpp:
3382 (WebCore::FrameSelection::setNeedsSelectionUpdate): Use the default intent to preserve the old behavior.
3383 (WebCore::FrameSelection::respondToNodeModification): Ditto.
3384 (WebCore::FrameSelection::setSelection): Save the selection reveal intent.
3385 (WebCore::FrameSelection::updateAppearanceAfterLayoutOrStyleChange): Use the saved intent.
3386 * editing/FrameSelection.h:
3387 * page/FocusController.cpp:
3388 (WebCore::FocusController::advanceFocusDirectionally): Always update the layout before invoking
3389 nodeRectInAbsoluteCoordinates.
3391 2018-02-01 Zalan Bujtas <zalan@apple.com>
3393 [RenderTreeBuilder] Move RenderRubyRun::rubyBaseSafe to RenderTre