1 2018-02-09 Zalan Bujtas <zalan@apple.com>
3 [RenderTreeBuilder] Move multicolumn descendant/sibling removal logic to RenderTreeBuilder
4 https://bugs.webkit.org/show_bug.cgi?id=182628
5 <rdar://problem/37369528>
7 Reviewed by Antti Koivisto.
9 No change in functionality
11 * rendering/RenderBlockFlow.cpp:
12 (WebCore::RenderBlockFlow::takeChild):
13 * rendering/RenderFragmentedFlow.h:
14 * rendering/RenderMultiColumnFlow.cpp:
15 (WebCore::RenderMultiColumnFlow::handleSpannerRemoval): Deleted.
16 (WebCore::RenderMultiColumnFlow::fragmentedFlowRelativeWillBeRemoved): Deleted.
17 * rendering/RenderMultiColumnFlow.h:
18 * rendering/updating/RenderTreeBuilder.cpp:
19 (WebCore::RenderTreeBuilder::multiColumnRelativeWillBeRemoved):
20 * rendering/updating/RenderTreeBuilder.h:
21 * rendering/updating/RenderTreeBuilderMultiColumn.cpp:
22 (WebCore::RenderTreeBuilder::MultiColumn::handleSpannerRemoval):
23 (WebCore::RenderTreeBuilder::MultiColumn::multiColumnRelativeWillBeRemoved):
24 * rendering/updating/RenderTreeBuilderMultiColumn.h:
26 2018-02-09 Youenn Fablet <youenn@apple.com>
28 Add support for cache storage of blob response
29 https://bugs.webkit.org/show_bug.cgi?id=182637
31 Reviewed by Brady Eidson.
33 Covered by updated WPT test.
34 When putting a blob response in cache, create a readable stream to easily get the body.
35 Make clear that caching form data is not supported.
37 * Modules/cache/DOMCache.cpp:
38 (WebCore::DOMCache::put):
39 * Modules/fetch/FetchBody.h:
40 (WebCore::FetchBody::isBlob const):
41 (WebCore::FetchBody::isFormData const):
42 * Modules/fetch/FetchResponse.h:
44 2018-02-09 Youenn Fablet <youenn@apple.com>
46 Make CoreAudioCaptureSource error logging be release logging
47 https://bugs.webkit.org/show_bug.cgi?id=182614
49 Reviewed by Eric Carlson.
51 No change of behavior.
53 * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
54 (WebCore::CoreAudioSharedUnit::addEchoCancellationSource):
55 (WebCore::CoreAudioSharedUnit::setupAudioUnit):
56 (WebCore::CoreAudioSharedUnit::configureMicrophoneProc):
57 (WebCore::CoreAudioSharedUnit::configureSpeakerProc):
58 (WebCore::CoreAudioSharedUnit::checkTimestamps):
59 (WebCore::CoreAudioSharedUnit::provideSpeakerData):
60 (WebCore::CoreAudioSharedUnit::processMicrophoneSamples):
61 (WebCore::CoreAudioSharedUnit::cleanupAudioUnit):
62 (WebCore::CoreAudioSharedUnit::reconfigureAudioUnit):
63 (WebCore::CoreAudioSharedUnit::startInternal):
64 (WebCore::CoreAudioSharedUnit::verifyIsCapturing):
65 (WebCore::CoreAudioSharedUnit::stopInternal):
66 (WebCore::CoreAudioSharedUnit::defaultInputDevice):
68 2018-02-09 Carlos Garcia Campos <cgarcia@igalia.com>
70 Add a way to check if a host is an IP address
71 https://bugs.webkit.org/show_bug.cgi?id=182427
73 Reviewed by Alex Christensen.
75 There are several places where this is needed. We currently just assume that any host ending in a digit is an IP
76 address, except in PublicSuffix where platform specific code is used. This patch adds URL::hostIsIPAddress()
77 platform specific implementations, falling back to current assumption if there isn't an implementation for the
80 * page/OriginAccessEntry.cpp:
81 (WebCore::OriginAccessEntry::OriginAccessEntry): Use URL::hostIsIPAddress().
83 (WebCore::URL::hostIsIPAddress): Fallback implementation.
85 * platform/mac/PublicSuffixMac.mm:
86 (WebCore::topPrivatelyControlledDomain): Use URL::hostIsIPAddress().
87 * platform/mac/URLMac.mm:
88 (WebCore::URL::hostIsIPAddress): Move implementation from PublicSuffixMac.mm.
89 * platform/network/curl/CookieUtil.cpp:
90 (WebCore::CookieUtil::isIPAddress): Use URL::hostIsIPAddress().
91 * platform/soup/URLSoup.cpp:
92 (WebCore::URL::hostIsIPAddress): Use g_hostname_is_ip_address().
94 2018-02-08 Philippe Normand <pnormand@igalia.com>
96 [GStreamer][WebAudio] Winamp2-js woes
97 https://bugs.webkit.org/show_bug.cgi?id=182612
99 Reviewed by Xabier Rodriguez Calvar and Carlos Alberto Lopez Perez.
101 Test: webaudio/silence-after-playback.html
103 * platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:
104 (WebCore::copyGStreamerBuffersToAudioChannel): Clear the bus if
105 the adapter can't provide enough data. This prevents a nasty noise
106 after playing songs in Winamp.
107 (WebCore::AudioSourceProviderGStreamer::setClient): No need to set
108 the client more than once, this fixes runtime warnings.
110 2018-02-09 Zalan Bujtas <zalan@apple.com>
112 [RenderTreeBuilder] Move multicolumn spanner mutation logic to RenderTreeBuilder
113 https://bugs.webkit.org/show_bug.cgi?id=182627
114 <rdar://problem/37367284>
116 Reviewed by Antti Koivisto.
118 Move spanner triggered mutation logic to RenderTreeBuilder.
120 No change in functionality.
122 * rendering/RenderFragmentedFlow.h:
123 * rendering/RenderMultiColumnFlow.cpp:
124 (WebCore::RenderMultiColumnFlow::isColumnSpanningDescendant const):
125 (WebCore::findSetRendering): Deleted.
126 (WebCore::isValidColumnSpanner): Deleted.
127 (WebCore::spannerPlacehoderCandidate): Deleted.
128 (WebCore::RenderMultiColumnFlow::processPossibleSpannerDescendant): Deleted.
129 (WebCore::RenderMultiColumnFlow::fragmentedFlowDescendantInserted): Deleted.
130 * rendering/RenderMultiColumnFlow.h:
131 * rendering/RenderObject.cpp:
132 (WebCore::RenderObject::insertedIntoTree):
133 * rendering/updating/RenderTreeBuilder.cpp:
134 (WebCore::RenderTreeBuilder::multiColumnDescendantInserted):
135 * rendering/updating/RenderTreeBuilder.h:
136 * rendering/updating/RenderTreeBuilderMultiColumn.cpp:
137 (WebCore::findSetRendering):
138 (WebCore::spannerPlacehoderCandidate):
139 (WebCore::isValidColumnSpanner):
140 (WebCore::RenderTreeBuilder::MultiColumn::multiColumnDescendantInserted):
141 (WebCore::RenderTreeBuilder::MultiColumn::processPossibleSpannerDescendant):
142 * rendering/updating/RenderTreeBuilderMultiColumn.h:
144 2018-02-09 Javier Fernandez <jfernandez@igalia.com>
146 [css-align] Implement the new behavior of 'legacy' for justify-items
147 https://bugs.webkit.org/show_bug.cgi?id=172712
149 Reviewed by Antti Koivisto.
151 The syntax of the 'justify-items' property accepts a new 'legacy' value,
152 replacing the 'auto' value which is now parsed as invalid.
154 https://github.com/w3c/csswg-drafts/issues/1318
156 This change affects also to the 'place-items' shorthand, which doesn't
157 accept 'auto' and, for the time being, neither 'legacy'.
159 Since the new value 'legacy' is also the default value, I don't expect
160 this change to break content of sites currently using the 'justify-items'
163 No new tests, rebaselined existing test.
165 * css/CSSComputedStyleDeclaration.cpp:
166 (WebCore::valueForItemPositionWithOverflowAlignment):
167 (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
168 * css/CSSPrimitiveValueMappings.h:
169 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
170 (WebCore::CSSPrimitiveValue::operator ItemPosition const):
171 * css/CSSProperties.json:
172 * css/StyleResolver.cpp:
173 (WebCore::StyleResolver::adjustRenderStyle):
174 * css/parser/CSSPropertyParser.cpp:
176 (WebCore::isNormalOrStretch):
177 (WebCore::consumeSelfPositionOverflowPosition):
178 (WebCore::consumeJustifyItems):
179 (WebCore::consumeSimplifiedDefaultPosition):
180 (WebCore::consumeSimplifiedSelfPosition):
181 (WebCore::CSSPropertyParser::consumePlaceItemsShorthand):
182 (WebCore::CSSPropertyParser::consumePlaceSelfShorthand):
183 * rendering/RenderFlexibleBox.cpp:
184 (WebCore::alignmentOffset):
185 * rendering/RenderGrid.cpp:
186 (WebCore::RenderGrid::columnAxisPositionForChild const):
187 (WebCore::RenderGrid::rowAxisPositionForChild const):
188 * rendering/style/RenderStyle.cpp:
189 (WebCore::resolvedSelfAlignment):
190 (WebCore::RenderStyle::resolvedJustifyItems const):
191 * rendering/style/RenderStyle.h:
192 (WebCore::RenderStyle::initialJustifyItems):
193 * rendering/style/RenderStyleConstants.h:
194 * rendering/style/StyleRareNonInheritedData.cpp:
195 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
197 2018-02-09 Yacine Bandou <yacine.bandou_ext@softathome.com>
199 [EME][GStreamer] Add support for encrypted caps in GStreamerUtilities
200 https://bugs.webkit.org/show_bug.cgi?id=181990
202 Reviewed by Xabier Rodriguez-Calvar.
204 Add the support of encrypted caps in GStreamerUtilities.
205 Refactor the manner that the caps are handled, such as how to extract the resolution
206 from the video caps or how to check if the caps are encrypted.
208 The attachTrack function in PlaybackPipeline doesn't need the "structure" parameter,
209 it is already included in the "caps" parameter.
211 Replace the "mediaType" parameter by the "caps" parameter in reattachTrack function,
212 it allows to use the new functions that handle the caps in GStreamerUtilities.
215 media/encrypted-media/clearKey/clearKey-cenc-audio-playback-mse.html
216 media/encrypted-media/clearKey/clearKey-cenc-video-playback-mse.html
218 * platform/graphics/gstreamer/GStreamerUtilities.cpp:
219 (WebCore::getVideoSizeAndFormatFromCaps): Add the support of video encrypted caps.
220 (WebCore::getVideoResolutionFromCaps):
221 (WebCore::capsMediaType):
222 (WebCore::doCapsHaveType):
223 (WebCore::areEncryptedCaps): Add a new functions in order to handle the caps properly.
224 * platform/graphics/gstreamer/GStreamerUtilities.h:
225 * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
226 (WebCore::AppendPipeline::parseDemuxerSrcPadCaps):
227 * platform/graphics/gstreamer/mse/GStreamerMediaDescription.cpp:
228 (WebCore::GStreamerMediaDescription::codec const):
229 (WebCore::GStreamerMediaDescription::isVideo const):
230 (WebCore::GStreamerMediaDescription::isAudio const):
231 * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
232 (WebCore::MediaPlayerPrivateGStreamerMSE::trackDetected):
233 * platform/graphics/gstreamer/mse/PlaybackPipeline.cpp:
234 (WebCore::PlaybackPipeline::attachTrack):
235 (WebCore::PlaybackPipeline::reattachTrack):
236 * platform/graphics/gstreamer/mse/PlaybackPipeline.h:
237 * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
238 (webKitMediaSrcUpdatePresentationSize): Refactor some parts by using the new added functions.
240 2018-02-09 Philippe Normand <pnormand@igalia.com>
242 [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()
243 https://bugs.webkit.org/show_bug.cgi?id=176802
245 Reviewed by Xabier Rodriguez Calvar.
247 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
248 (WebCore::MediaPlayerPrivateGStreamer::load): Prevent the player from loading animated gifs.
250 2018-02-09 Antti Koivisto <antti@apple.com>
252 Move compiled selectors to StyleRule
253 https://bugs.webkit.org/show_bug.cgi?id=182602
255 Reviewed by Zalan Bujtas.
257 Currently they are owned by RuleData. Several RuleData objects can refer to the same StyleRule, requiring recompilation.
258 Compiled selectors are context-independent so they can be shared between all clients.
260 * WebCore.xcodeproj/project.pbxproj:
261 * css/CSSSelectorList.cpp:
262 (WebCore::CSSSelectorList::listSize const):
264 Compute the number of complex selectors on the list.
266 * css/CSSSelectorList.h:
267 * css/DocumentRuleSets.cpp:
268 (WebCore::makeRuleSet):
269 (WebCore::DocumentRuleSets::classInvalidationRuleSets const):
271 Pass around list index along with the selector index (compiled selectors are found by list index).
273 * css/ElementRuleCollector.cpp:
274 (WebCore::ElementRuleCollector::ruleMatches):
276 (WebCore::RuleData::RuleData):
278 (WebCore::RuleData::compilationStatus const): Deleted.
279 (WebCore::RuleData::compiledSelectorCodeRef const): Deleted.
280 (WebCore::RuleData::setCompiledSelector const): Deleted.
281 (WebCore::RuleData::~RuleData): Deleted.
282 (WebCore::RuleData::compiledSelectorUsed const): Deleted.
284 (WebCore::StyleRule::StyleRule):
287 Add CompiledSelector member.
289 * cssjit/CompiledSelector.h: Added.
291 Move to a header of its own to keeps dependencies simple.
293 (WebCore::SelectorCompilationStatus::SelectorCompilationStatus):
294 (WebCore::SelectorCompilationStatus::operator Status const):
295 * cssjit/SelectorCompiler.h:
297 (WebCore::SelectorCompilationStatus::SelectorCompilationStatus): Deleted.
298 (WebCore::SelectorCompilationStatus::operator Status const): Deleted.
300 2018-02-08 Antoine Quint <graouts@apple.com>
302 [Web Animations] Always expose "composite" in output of getKeyframes()
303 https://bugs.webkit.org/show_bug.cgi?id=182600
305 Reviewed by Dean Jackson.
307 The Web Animations spec has changed and whereas the output of getKeyframes() would not feature the "composite" property
308 for "null" values, it now lists "composite" in all cases.
310 To support this, we needed to fix an issue in the code generator such that a "null" default value for an optional enum
313 * animation/KeyframeEffect.cpp:
314 (WebCore::KeyframeEffect::getKeyframes):
315 * animation/KeyframeEffect.h:
316 * animation/KeyframeEffect.idl:
317 * bindings/scripts/CodeGeneratorJS.pm:
318 (GenerateDefaultValue):
319 * bindings/scripts/test/JS/JSTestObj.cpp:
320 (WebCore::convertDictionary<TestObj::Dictionary>):
321 (WebCore::convertDictionaryToJS):
322 * bindings/scripts/test/TestObj.idl:
324 2018-02-08 Youenn Fablet <youenn@apple.com>
326 CoreAudioCaptureSourceIOSListener should be a WebProcess singleton
327 https://bugs.webkit.org/show_bug.cgi?id=182606
328 <rdar://problem/37355283>
330 Reviewed by Eric Carlson.
332 Not testable right now as this relies on iOS specific Core Audio stack.
333 Efforts should be made to somehow mock that part and mock interruptions.
335 Made CoreAudioCaptureSourceFactoryIOS responsible to receive iOS interruption messages.
336 Before the patch, individual capture sources were receiving these messages.
337 When there is only one capture source per process this is fine but with more capture sources,
338 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.
340 Also, if we are suspended and there is no more capture source, the shared unit will remain suspended indefinitely, as we will
341 not process the interruption messages.
342 With the patch, we always process the messages.
343 We still go through the active source as done now to limit the changes.
344 In case of no source, we go to the shared unit.
345 In the future, we should directly go to the shared unit and clients of the shared unit should see their state being updated.
347 As a way to prevent staying suspended on iOS, we unsuspend ourselves in CoreAudioCaptureSource constructor.
348 This is fine as this constructor is only called when getUserMedia grants access to the camera which always goes to the UIProcess.
349 And the UIProcess is only processing getUserMedia calls if the WebProcess is foregrounded.
351 * platform/mediastream/ios/CoreAudioCaptureSourceIOS.h:
352 * platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm:
353 (-[WebCoreAudioCaptureSourceIOSListener initWithCallback:]):
354 (WebCore::CoreAudioCaptureSourceFactoryIOS::CoreAudioCaptureSourceFactoryIOS):
355 (WebCore::CoreAudioCaptureSourceFactoryIOS::~CoreAudioCaptureSourceFactoryIOS):
356 (WebCore::CoreAudioCaptureSourceFactory::singleton):
357 * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
358 (WebCore::CoreAudioCaptureSourceFactory::singleton):
359 (WebCore::CoreAudioCaptureSource::create):
360 (WebCore::CoreAudioCaptureSourceFactory::beginInterruption):
361 (WebCore::CoreAudioCaptureSourceFactory::endInterruption):
362 (WebCore::CoreAudioCaptureSourceFactory::scheduleReconfiguration):
363 (WebCore::CoreAudioCaptureSource::factory):
364 (WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource):
365 (WebCore::CoreAudioCaptureSource::~CoreAudioCaptureSource):
366 (WebCore::CoreAudioCaptureSource::startProducingData):
367 (WebCore::CoreAudioCaptureSource::scheduleReconfiguration):
368 (WebCore::CoreAudioCaptureSource::beginInterruption):
369 (WebCore::CoreAudioCaptureSource::endInterruption):
370 * platform/mediastream/mac/CoreAudioCaptureSource.h:
371 (WebCore::CoreAudioCaptureSourceFactory::setCoreAudioActiveSource):
372 (WebCore::CoreAudioCaptureSourceFactory::unsetCoreAudioActiveSource):
373 (WebCore::CoreAudioCaptureSourceFactory::coreAudioActiveSource):
375 2018-02-08 Chris Dumez <cdumez@apple.com>
377 There should be a way to disable [OverrideBuiltins] behavior in a given DOMWrapperWorld
378 https://bugs.webkit.org/show_bug.cgi?id=182524
379 <rdar://problem/9057327>
381 Reviewed by Ryosuke Niwa.
383 Add new flag on DOMWrapperWorld indicating if the [OverrideBuiltins] behavior should
384 be enabled in this world or not. The behavior is enabled by default for Web-compatibility.
385 This flag is queried in accessVisibleNamedProperty() when doing the named property
388 Covered by new API test.
390 * bindings/js/DOMWrapperWorld.h:
391 (WebCore::DOMWrapperWorld::disableOverrideBuiltinsBehavior):
392 (WebCore::DOMWrapperWorld::shouldDisableOverrideBuiltinsBehavior const):
393 * bindings/js/JSDOMAbstractOperations.h:
394 (WebCore::accessVisibleNamedProperty):
396 2018-02-08 Per Arne Vollan <pvollan@apple.com>
398 Move WebVideoFullscreenController from WebCore to WebKitLegacy.
399 https://bugs.webkit.org/show_bug.cgi?id=182615
401 Reviewed by Eric Carlson.
403 It is only used by WK1. Also there are a few references to NSApp in WebVideoFullscreenController.mm.
404 Ideally, we should not reference NSApp in WebCore.
406 No new tests. No change in behavior.
409 * WebCore.xcodeproj/project.pbxproj:
410 * html/HTMLMediaElement.h:
411 * platform/mac/WebVideoFullscreenController.h: Removed.
412 * platform/mac/WebVideoFullscreenController.mm: Removed.
413 * platform/mac/WebVideoFullscreenHUDWindowController.h: Removed.
414 * platform/mac/WebVideoFullscreenHUDWindowController.mm: Removed.
415 * platform/mac/WebWindowAnimation.h: Removed.
416 * platform/mac/WebWindowAnimation.mm: Removed.
418 2018-02-08 Chris Dumez <cdumez@apple.com>
420 Form submission after navigation fails when decidePolicyForNavigationAction is async
421 https://bugs.webkit.org/show_bug.cgi?id=182412
422 <rdar://problem/35181099>
424 Reviewed by Alex Christensen.
426 When the form is submitted and schedules the load in an iframe that is already loading,
427 FrameLoader::stopLoading() is called as expected. However, because policy checks can
428 now be asynchronous, stopLoading() also needs to stop pending policy checks. Otherwise,
429 continueLoadAfterNavigationPolicy() gets called for a cancelled load and we're in trouble
430 because the FrameLoader was reused for another load since then.
432 Test: http/tests/navigation/sync-form-submit-iframe.html
434 * loader/FrameLoader.cpp:
435 (WebCore::FrameLoader::stopLoading):
437 2018-02-08 Zalan Bujtas <zalan@apple.com>
439 [RenderTreeBuilder] Do not use RenderTreeBuilder::current() in RenderRubyRun::takeChild
440 https://bugs.webkit.org/show_bug.cgi?id=182607
441 <rdar://problem/37355944>
443 Reviewed by Sam Weinig.
445 No change in functionality.
447 * rendering/RenderRubyRun.cpp:
448 (WebCore::RenderRubyRun::takeChild):
450 2018-02-08 Antti Koivisto <antti@apple.com>
452 Use invalidation rulesets for attribute selectors
453 https://bugs.webkit.org/show_bug.cgi?id=182569
455 Reviewed by Zalan Bujtas.
457 Attribute change style invalidation should use invalidation rulesets, similarly how class change invalidation already does.
458 We'll invalidate fewer unnecessary elements immediately and enable more significant future gains.
460 * css/DocumentRuleSets.cpp:
461 (WebCore::DocumentRuleSets::collectFeatures const):
462 (WebCore::DocumentRuleSets::classInvalidationRuleSets const):
463 (WebCore::DocumentRuleSets::attributeInvalidationRuleSets const):
465 Make and cache invalidation RuleSets for an attribute.
467 (WebCore::DocumentRuleSets::ancestorAttributeRulesForHTML const): Deleted.
468 * css/DocumentRuleSets.h:
469 * css/RuleFeature.cpp:
470 (WebCore::RuleFeatureSet::recursivelyCollectFeaturesFromSelector):
472 Collect attribute selectors along with match elements.
474 (WebCore::RuleFeatureSet::collectFeatures):
475 (WebCore::RuleFeatureSet::add):
476 (WebCore::RuleFeatureSet::registerContentAttribute):
478 Separate hash to deal with invalidation of content:attr(foo) special case.
480 (WebCore::RuleFeatureSet::clear):
481 (WebCore::RuleFeatureSet::shrinkToFit):
482 (WebCore::makeAttributeSelectorKey): Deleted.
484 (WebCore::RuleFeature::RuleFeature):
485 * css/StyleBuilderCustom.h:
486 (WebCore::StyleBuilderCustom::applyValueContent):
487 (WebCore::StyleBuilderCustom::applyValueAlt):
489 Use registerContentAttribute()
491 * html/HTMLEmbedElement.cpp:
492 (WebCore::hasTypeOrSrc):
493 (WebCore::HTMLEmbedElement::parseAttribute):
495 Invalidate style if both type and src attributes go missing as this changes result of rendererIsNeeded().
496 This was previously relying on any attribute change invalidating style.
498 (WebCore::HTMLEmbedElement::rendererIsNeeded):
499 * style/AttributeChangeInvalidation.cpp:
500 (WebCore::Style::AttributeChangeInvalidation::invalidateStyle):
502 Collect the invalidation rulesets for this attribute change.
503 Also check if any attribute selector actually changes state, unlike with classes attribute changes may
504 often not lead to a selector becoming non-matching.
506 (WebCore::Style::AttributeChangeInvalidation::invalidateStyleWithRuleSets):
507 (WebCore::Style::AttributeChangeInvalidation::invalidateDescendants): Deleted.
508 * style/AttributeChangeInvalidation.h:
509 (WebCore::Style::AttributeChangeInvalidation::AttributeChangeInvalidation):
510 (WebCore::Style::AttributeChangeInvalidation::~AttributeChangeInvalidation):
511 * style/ClassChangeInvalidation.cpp:
512 (WebCore::Style::ClassChangeInvalidation::computeInvalidation):
514 Should not bail on shadow tree invalidation as we may also need to invalidate siblings.
516 2018-02-08 Zalan Bujtas <zalan@apple.com>
518 [RenderTreeBuilder] Introduce RenderTreeBuilder to moveChild(ren)To() functions
519 https://bugs.webkit.org/show_bug.cgi?id=182596
520 <rdar://problem/37340553>
522 Reviewed by Sam Weinig.
524 This is in preparation for moving mutation code out of moveChildTo/moveChildrenTo.
526 No change in functionality.
528 * rendering/RenderBlock.cpp:
529 (WebCore::RenderBlock::dropAnonymousBoxChild):
530 (WebCore::RenderBlock::takeChild):
531 * rendering/RenderBlock.h:
532 (WebCore::RenderBlock::moveAllChildrenIncludingFloatsTo):
533 * rendering/RenderBlockFlow.cpp:
534 (WebCore::RenderBlockFlow::styleDidChange):
535 (WebCore::RenderBlockFlow::moveAllChildrenIncludingFloatsTo):
536 * rendering/RenderBlockFlow.h:
537 * rendering/RenderBoxModelObject.cpp:
538 (WebCore::RenderBoxModelObject::moveChildTo):
539 (WebCore::RenderBoxModelObject::moveChildrenTo):
540 * rendering/RenderBoxModelObject.h:
541 (WebCore::RenderBoxModelObject::moveChildTo):
542 (WebCore::RenderBoxModelObject::moveAllChildrenTo):
543 (WebCore::RenderBoxModelObject::moveChildrenTo):
544 * rendering/RenderElement.cpp:
545 (WebCore::RenderElement::styleDidChange):
546 (WebCore::RenderElement::removeAnonymousWrappersForInlinesIfNecessary): Deleted.
547 * rendering/RenderElement.h:
548 * rendering/RenderRubyRun.cpp:
549 (WebCore::RenderRubyRun::takeChild):
550 * rendering/updating/RenderTreeBuilder.cpp:
551 (WebCore::RenderTreeBuilder::makeChildrenNonInline):
552 (WebCore::RenderTreeBuilder::splitAnonymousBoxesAroundChild):
553 (WebCore::RenderTreeBuilder::removeAnonymousWrappersForInlineChildrenIfNeeded):
554 (WebCore::RenderTreeBuilder::childFlowStateChangesAndNoLongerAffectsParentBlock):
555 (WebCore::RenderTreeBuilder::removeFromParentAndDestroyCleaningUpAnonymousWrappers):
556 * rendering/updating/RenderTreeBuilder.h:
557 * rendering/updating/RenderTreeBuilderMultiColumn.cpp:
558 (WebCore::RenderTreeBuilder::MultiColumn::createFragmentedFlow):
559 (WebCore::RenderTreeBuilder::MultiColumn::destroyFragmentedFlow):
560 * rendering/updating/RenderTreeBuilderRuby.cpp:
561 (WebCore::RenderTreeBuilder::Ruby::moveInlineChildren):
562 (WebCore::RenderTreeBuilder::Ruby::moveBlockChildren):
563 * rendering/updating/RenderTreeBuilderTable.cpp:
564 (WebCore::RenderTreeBuilder::Table::collapseAndDestroyAnonymousSiblingRows):
566 2018-02-08 Matt Lewis <jlewis3@apple.com>
568 Unreviewed, rolling out r228261.
570 This broke an internal build
574 "Add a way to check if a host is an IP address"
575 https://bugs.webkit.org/show_bug.cgi?id=182427
576 https://trac.webkit.org/changeset/228261
578 2018-02-08 Philippe Normand <pnormand@igalia.com>
580 [GStreamer] WebKit improperly handles missing GStreamer elements
581 https://bugs.webkit.org/show_bug.cgi?id=171205
583 Reviewed by Michael Catanzaro.
585 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
586 (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Add a
587 test checking the videoflip element was correctly created. It
588 might not be available on some exotic distros such as Gentoo.
590 2018-02-08 Chris Fleizach <cfleizach@apple.com>
592 AX: Defer attribute computation until needed.
593 https://bugs.webkit.org/show_bug.cgi?id=182386
594 <rdar://problem/37115277>
596 Reviewed by Zalan Bujtas.
598 Accessibility is doing too much work when handling attribute changes. Here's how we can improve this:
599 1) Defer attribute changes while the tree is dirty (and coalesce them).
600 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
601 (with the exception of a few attributes like aria-modal)
602 3) Stop calculating the entire accessible ARIA label when trying to decide if an element should be ignored. That's generally wasteful and the
603 consequence of including more AX elements in the tree is very minimal.
605 * accessibility/AXObjectCache.cpp:
606 (WebCore::rendererNeedsDeferredUpdate):
607 (WebCore::nodeAndRendererAreValid):
608 (WebCore::AXObjectCache::remove):
609 (WebCore::AXObjectCache::handleAriaExpandedChange):
610 (WebCore::AXObjectCache::handleAriaRoleChanged):
611 (WebCore::AXObjectCache::deferAttributeChangeIfNeeded):
612 (WebCore::AXObjectCache::shouldProcessAttributeChange):
613 (WebCore::AXObjectCache::handleAttributeChange):
614 (WebCore::AXObjectCache::prepareForDocumentDestruction):
615 (WebCore::AXObjectCache::performDeferredCacheUpdate):
616 (WebCore::AXObjectCache::deferRecomputeIsIgnoredIfNeeded):
617 (WebCore::AXObjectCache::deferRecomputeIsIgnored):
618 (WebCore::AXObjectCache::deferTextChangedIfNeeded):
619 (WebCore::AXObjectCache::deferSelectedChildrenChangedIfNeeded):
620 (WebCore::AXObjectCache::handleAttributeChanged): Deleted.
621 * accessibility/AXObjectCache.h:
622 (WebCore::AXObjectCache::deferAttributeChangeIfNeeded):
623 (WebCore::AXObjectCache::handleAttributeChanged): Deleted.
624 * accessibility/AccessibilityNodeObject.cpp:
625 (WebCore::AccessibilityNodeObject::hasAttributesRequiredForInclusion const):
626 * accessibility/AccessibleNode.cpp:
627 (WebCore::AccessibleNode::notifyAttributeChanged):
629 (WebCore::Element::attributeChanged):
631 2018-02-08 Chris Dumez <cdumez@apple.com>
633 Unreviewed, tiny partial rollout of r228260 as it caused some worker failures
635 * bindings/js/JSDOMGlobalObject.cpp:
636 (WebCore::toJSDOMGlobalObject):
637 * bindings/js/JSDOMGlobalObject.h:
638 * bindings/js/JSErrorHandler.cpp:
639 (WebCore::JSErrorHandler::handleEvent):
640 * bindings/js/JSEventListener.cpp:
641 (WebCore::toJSDOMGlobalObject): Deleted.
643 2018-02-08 Zalan Bujtas <zalan@apple.com>
645 [RenderTreeBuilder] Move RenderElement::removeAnonymousWrappersForInlinesIfNecessary to RenderTreeBuilder
646 https://bugs.webkit.org/show_bug.cgi?id=182582
647 <rdar://problem/37327890>
649 Reviewed by Antti Koivisto.
651 Tree mutation -> RenderTreeBuilder.
653 No change in functionality
655 * rendering/RenderElement.cpp:
656 (WebCore::RenderElement::styleDidChange):
657 (WebCore::RenderElement::removeAnonymousWrappersForInlinesIfNecessary): Deleted.
658 * rendering/RenderElement.h:
659 * rendering/updating/RenderTreeBuilder.cpp:
660 (WebCore::removeAnonymousWrappersForInlinesIfNecessary):
661 (WebCore::RenderTreeBuilder::childFlowStateChangesAndNoLongerAffectsParentBlock):
662 (WebCore::RenderTreeBuilder::removeFromParentAndDestroyCleaningUpAnonymousWrappers):
663 * rendering/updating/RenderTreeBuilder.h:
665 2018-02-08 Philippe Normand <pnormand@igalia.com>
667 [GStreamer] LayoutTest webaudio/silent-audio-interrupted-in-background.html makes its subsequent test flaky crash
668 https://bugs.webkit.org/show_bug.cgi?id=173916
670 Reviewed by Xabier Rodriguez Calvar.
672 This patch fixes two crashes and a runtime warning:
674 - The provider client configuration should be done from the main
675 thread but the no-more-pads signal of deinterleave was fired from
678 - The deinterleave pad-removed signal can be fired for a not fully
679 configured pipeline if the audio context is interrupted. So the
680 peer quark of the removed pad needs to be checked, it might be a
683 - The provider connects to the deinterleave signals only when a
684 client is provided, so the signal disconnection needs to check
685 that to avoid runtime warnings.
687 * platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:
688 (WebCore::AudioSourceProviderGStreamer::AudioSourceProviderGStreamer):
689 Create a main thread notifier.
690 (WebCore::AudioSourceProviderGStreamer::~AudioSourceProviderGStreamer):
691 Invalidate notifier and check a client was set before
692 disconnecting from deinterleave signals.
693 (WebCore::AudioSourceProviderGStreamer::handleRemovedDeinterleavePad):
694 Check validity of the pad peer.
695 (WebCore::AudioSourceProviderGStreamer::deinterleavePadsConfigured):
696 Set client from main thread.
697 * platform/audio/gstreamer/AudioSourceProviderGStreamer.h:
699 2018-02-08 Philippe Normand <pnormand@igalia.com>
701 [GStreamer][WebAudio] No need for version check in each loop iteration
702 https://bugs.webkit.org/show_bug.cgi?id=182577
704 Reviewed by Xabier Rodriguez Calvar.
706 * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
707 (webkit_web_audio_src_init): Detect version once only, when creating the element.
708 (webKitWebAudioSrcLoop): Use boolean variable instead of checking the version every time.
710 2018-02-08 Frederic Wang <fwang@igalia.com>
712 Add scrolling node types to distinguish main frames and subframes.
713 https://bugs.webkit.org/show_bug.cgi?id=182533
715 Reviewed by Simon Fraser.
717 This patch splits FrameScrollingNode type into two types: MainFrameScrollingNode and
718 SubframeScrollingNode. This is needed because new places in the code are likely to
719 distinguish them e.g. in ScrollingTreeScrollingNodeDelegateIOS::updateChildNodesAfterScroll
720 or when iOS frame scrolling is introduced (see bug 173833).
722 No new tests, behavior unchanged.
724 * page/scrolling/AsyncScrollingCoordinator.cpp:
725 (WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView): This is only called
726 for main frames, so pass MainFrameScrollingNode.
727 * page/scrolling/ScrollingCoordinator.cpp:
728 (WebCore::operator<<): Distinguish subframe and main frame when dumping.
729 * page/scrolling/ScrollingCoordinator.h: Split FrameScrollingNode into two cases.
730 * page/scrolling/ScrollingStateFrameScrollingNode.cpp: Add node type to constructor and
731 ASSERT it remains of type FrameScrollingNode.
732 (WebCore::ScrollingStateFrameScrollingNode::create):
733 (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
734 * page/scrolling/ScrollingStateFrameScrollingNode.h: Add node type to constructor.
735 * page/scrolling/ScrollingStateNode.h:
736 (WebCore::ScrollingStateNode::isFrameScrollingNode const): Includes the two cases.
737 * page/scrolling/ScrollingStateTree.cpp:
738 (WebCore::ScrollingStateTree::createNode): Split FrameScrollingNode into two cases and pass
740 (WebCore::ScrollingStateTree::attachNode): The first case only happens for main frames while
741 the second case only happens with subframes. Use the appriate node type.
742 * page/scrolling/ScrollingTreeFrameScrollingNode.cpp: Add node type to constructor and
743 ASSERT it remains of type FrameScrollingNode.
744 (WebCore::ScrollingTreeFrameScrollingNode::ScrollingTreeFrameScrollingNode):
745 * page/scrolling/ScrollingTreeFrameScrollingNode.h: Add node type to constructor.
746 * page/scrolling/ScrollingTreeNode.h: Includes the two cases.
747 (WebCore::ScrollingTreeNode::isFrameScrollingNode const):
748 * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h: Add node type to constructor.
749 * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm: Ditto.
750 (WebCore::ScrollingTreeFrameScrollingNodeIOS::create):
751 (WebCore::ScrollingTreeFrameScrollingNodeIOS::ScrollingTreeFrameScrollingNodeIOS):
752 * page/scrolling/ios/ScrollingTreeIOS.cpp: Split FrameScrollingNode into two cases.
753 (WebCore::ScrollingTreeIOS::createScrollingTreeNode):
754 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: Add node type to constructor.
755 * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: Ditto.
756 (WebCore::ScrollingTreeFrameScrollingNodeMac::create):
757 (WebCore::ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac):
758 * page/scrolling/mac/ScrollingTreeMac.cpp: Split FrameScrollingNode into two cases.
759 (ScrollingTreeMac::createScrollingTreeNode):
760 * rendering/RenderLayerCompositor.cpp:
761 (WebCore::RenderLayerCompositor::reattachSubframeScrollLayers): Distinguish the cases of
762 main frames and subframes.
763 (WebCore::scrollCoordinationRoleForNodeType): Split FrameScrollingNode into two cases.
764 (WebCore::RenderLayerCompositor::updateScrollCoordinationForThisFrame): Distinguish the cases
765 of main frames and subframes.
766 (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer): Split FrameScrollingNode into
769 2018-02-07 Darin Adler <darin@apple.com>
771 Try to fix ErrorEvent tests seen failing on buildbot after fix for bug 179591.
773 * bindings/js/JSErrorHandler.cpp:
774 (WebCore::JSErrorHandler::handleEvent): Add back line of code accidentally removed.
776 2018-02-05 Carlos Garcia Campos <cgarcia@igalia.com>
778 Add a way to check if a host is an IP address
779 https://bugs.webkit.org/show_bug.cgi?id=182427
781 Reviewed by Alex Christensen.
783 There are several places where this is needed. We currently just assume that any host ending in a digit is an IP
784 address, except in PublicSuffix where platform specific code is used. This patch adds URL::hostIsIPAddress()
785 platform specific implementations, falling back to current assumption if there isn't an implementation for the
788 * page/OriginAccessEntry.cpp:
789 (WebCore::OriginAccessEntry::OriginAccessEntry): Use URL::hostIsIPAddress().
791 (WebCore::URL::hostIsIPAddress): Fallback implementation.
793 * platform/mac/PublicSuffixMac.mm:
794 (WebCore::topPrivatelyControlledDomain): Use URL::hostIsIPAddress().
795 * platform/mac/URLMac.mm:
796 (WebCore::URL::hostIsIPAddress): Move implementation from PublicSuffixMac.mm.
797 * platform/network/curl/CookieUtil.cpp:
798 (WebCore::CookieUtil::isIPAddress): Use URL::hostIsIPAddress().
799 * platform/soup/URLSoup.cpp:
800 (WebCore::URL::hostIsIPAddress): Use g_hostname_is_ip_address().
802 2018-01-13 Darin Adler <darin@apple.com>
805 https://bugs.webkit.org/show_bug.cgi?id=179591
807 Reviewed by Chris Dumez.
809 - removed all use of Deprecated::ScriptValue
811 - fixed uses of JSC::Strong that can lead to reference cycles in CustomEvent,
812 MessageEvent, and PopStateEvent, refactoring to share more code
814 - removed incorrect use of CachedAttribute on attributes that can change values
815 (should have fixed a bug; can we find a way to test this?)
817 - did a more thorough job of clearing state from events, including clearing
818 certain things before dispatching, and clearing more in initKeyboardEvent
819 (may have fixed some obscure low-severity bugs; can we find a way to test this?)
821 - removed "dummy" keyboard events
823 - reworked code that omits details from error events for security reasons;
824 old approach was "sanitizing" the error by removing the details if not
825 allowed, new approach is adding the details only if allowed
827 * Modules/encryptedmedia/NavigatorEME.h: Added forward declaration needed
830 * Modules/indexeddb/IDBCursor.h: Added comment about incorrect use of JSC::Strong.
831 * Modules/indexeddb/IDBRequest.h: Ditto.
832 * Modules/paymentrequest/PaymentResponse.h: Ditto.
834 * WebCore.xcodeproj/project.pbxproj: Added JSValueInWrappedObject.h.
836 * bindings/js/CommonVM.cpp:
837 (WebCore::commonVMSlow): Use VM::create instead of VM::createLeaked. Also use
838 local variable instead of the global.
840 * bindings/js/DOMWrapperWorld.h: Put the inline bodies of the currentWorld and
841 worldForDOMObject functions separate from the declarations; long term goal is
842 that the declarations serve as documentation, and are not interspersed with the
843 implementations. Changed currentWorld to take a reference instead of a pointer
844 to ExecState. Added isWorldCompatible function.
846 * bindings/js/JSCustomElementInterface.cpp:
847 (WebCore::JSCustomElementInterface::upgradeElement): Use toJSDOMWindow instead
848 of toJSDOMGlobalObject and added check for null.
849 (WebCore::JSCustomElementInterface::invokeCallback): Ditto.
851 * bindings/js/JSCustomEventCustom.cpp:
852 (WebCore::JSCustomEvent::detail const): Use cachedPropertyValue.
853 (WebCore::JSCustomEvent::visitAdditionalChildren): Added. Needed now that we are
854 using JSValueInWrappedObject instead of JSC::Strong.
856 * bindings/js/JSDOMConvertEventListener.h:
857 (WebCore::Converter<IDLEventListener<T>>::convert): Pass a reference.
858 * bindings/js/JSDOMGlobalObject.cpp:
859 (WebCore::toJSDOMGlobalObject): Ditto.
861 * bindings/js/JSDOMGlobalObject.cpp:
862 (WebCore::JSDOMGlobalObject::JSDOMGlobalObject): Moved initialization to nullptr
864 (WebCore::toJSDOMGlobalObject): Deleted.
865 * bindings/js/JSDOMGlobalObject.h: Updated for the above.
867 * bindings/js/JSDOMWindowBase.h: Updated includes. Added "DOMWindow.h" but also
868 expanded the deprecated "JSDOMBinding.h" into all the things it includes.
870 * bindings/js/JSDOMWindowProxy.cpp:
871 (WebCore::JSDOMWindowProxy::finishCreation): Tweak argument type to match usage.
872 (WebCore::JSDOMWindowProxy::create): Moved here from header, rolled in the code
873 that creates the structure.
874 (WebCore::JSDOMWindowProxy::setWindow): Take a reference instead of a pointer
876 (WebCore::JSDOMWindowProxy::toWrapped): Use ? : instead of if.
877 (WebCore::toJS): Pass a reference.
878 * bindings/js/JSDOMWindowProxy.h: Updated for abvoe changes.
880 * bindings/js/JSDOMWrapper.cpp:
881 (WebCore::cloneAcrossWorlds): Added.
882 * bindings/js/JSDOMWrapper.h: Ditto.
884 * bindings/js/JSErrorHandler.cpp:
885 (WebCore::JSErrorHandler::JSErrorHandler): Changed to take a reference.
887 (WebCore::JSErrorHandler::create): Moved here from header. No longer inline, but
888 the constructor is now inline, so same number of levels of function calls, and
889 less code compiled at the call site and less to compile in the header.
890 (WebCore::JSErrorHandler::handleEvent): Use toJSDOMWindow instead
891 of toJSDOMGlobalObject.
892 * bindings/js/JSErrorHandler.h: Ditto. Also made createJSErrorHandler take
893 references instead of pointers.
895 * bindings/js/JSEventListener.cpp:
896 (WebCore::JSEventListener::create): Moved here from the header.
897 (WebCore::createEventListenerForEventHandlerAttribute): Updated for change to
899 (WebCore::toJSDOMGlobalObject): Moved here from JSDOMGlobalObject.cpp because
900 this is the only place this function is used now. Also, this was one of four
901 different overrides and so it was good to delete the other three. Also updated
902 to take a reference rather than a "must not be null" pointer.
903 (WebCore::JSEventListener::handleEvent): Coding style tweaks.
904 (WebCore::JSEventListener::virtualisAttribute const): Deleted. Now isAttribute
905 is virtual and uses final as needed to remain inline-able and efficient.
906 (WebCore::JSEventListener::operator== const): Use is<> and downcast<> instead
907 of JSEventListener::cast.
908 (WebCore::eventHandlerAttribute): Updated for change to currentWorld.
909 (WebCore::setEventHandlerAttribute): Ditto.
910 (WebCore::setWindowEventHandlerAttribute): Ditto.
911 (WebCore::setDocumentEventHandlerAttribute): Ditto.
913 * bindings/js/JSEventListener.h: Moved create functions into the cpp file.
914 Removed the cast function, since callers can use is<> and downcast<> instead.
915 Use final rather than override and made isAttribute override the virtual
916 function in the base class, eliminating virtualIsAttribute.
918 * bindings/js/JSExtendableMessageEventCustom.cpp:
919 (WebCore::JSExtendableMessageEvent::data const): Use isWorldCompatible.
920 Still need to return here and fix the reference cycle for this class.
922 * bindings/js/JSLazyEventListener.cpp:
923 (WebCore::eventParameterName): Moved up so it can be used by the constructor.
924 (WebCore::convertZeroToOne): Added, so that the constructor can fix up text
925 positions passed in to it as part of initializing a data member.
926 (WebCore::JSLazyEventListener::JSLazyEventListener): Changed to take
927 a CreationArguments object instead of lots of separate arguments.
928 (WebCore::JSLazyEventListener::initializeJSFunction const): Removed unneeded
929 checks of m_code and m_eventParameterName, both guaranteed not to be null
930 by the constructor. Tweaked coding style a bit.
931 (WebCore::JSLazyEventListener::create): Pass CreationArguments object.
932 * bindings/js/JSLazyEventListener.h: Updated for above changes. Changed the
933 m_eventParameterName to be a reference since it's always a global string
934 that is never destroyed.
936 * bindings/js/JSMessageEventCustom.cpp:
937 (WebCore::JSMessageEvent::data const): Use cachedPropertyValue and also
938 updated for the new version of MessageEvent that uses a Variant instead
939 of a type plus separate functions for each type.
940 (WebCore::JSMessageEvent::visitAdditionalChildren): Added. Needed now that we are
941 using JSValueInWrappedObject instead of JSC::Strong.
943 * bindings/js/JSPopStateEventCustom.cpp:
944 (WebCore::JSPopStateEvent::state const): Use isWorldCompatible and also updated
945 to use JSValueInWrappedObject instead of JSC::Strong. Would be nice to share more
946 code with CustomEvent and MessageEvent, but at the moment they are subtly different.
947 Changed cacheState from a function to a lambda.
948 (WebCore::JSPopStateEvent::visitAdditionalChildren): Added. Needed now that we are
949 using JSValueInWrappedObject instead of JSC::Strong.
951 * bindings/js/JSValueInWrappedObject.h: Added.
953 * bindings/js/ScriptCachedFrameData.cpp:
954 (WebCore::ScriptCachedFrameData::restore): Updated for changes to JSDOMWindowProxy.
955 * bindings/js/ScriptController.cpp:
956 (WebCore::ScriptController::createWindowProxy): Ditto.
957 (WebCore::ScriptController::setDOMWindowForWindowProxy): Ditto.
959 * bindings/js/WorkerScriptController.cpp: Removed include of ScriptValue.h.
960 (WebCore::WorkerScriptController::evaluate): Reworked to use the new
961 canIncludeErrorDetails instead of sanitizeScriptError. Added a FIXME about the
962 strange handling of the error message out argument.
964 * bindings/scripts/CodeGeneratorJS.pm:
965 (GenerateRuntimeEnableConditionalString): Pass a reference to worldForDOMObject.
966 (GenerateImplementation): Removed an incorrect comment about a removed error
967 check that is truly unneeded.
968 (GenerateAttributeGetterBodyDefinition): Pass a reference to worldForDOMObject.
969 (GenerateAttributeSetterBodyDefinition): Pass references to createJSErrorHandler
970 and worldForDOMObject.
971 (GenerateCallWith): Pass a reference to worldForDOMObject.
973 * bindings/scripts/test/JS/JSTestGlobalObject.cpp: Updated for above changes.
974 * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp: Ditto.
975 * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
977 * dom/CustomEvent.cpp:
978 (WebCore::CustomEvent::CustomEvent): Marked inline. Removed now unneeded
980 (WebCore::CustomEvent::create): Moved here from header. No longer inline, but
981 the constructor is now inline, so same number of levels of function calls, and
982 less code compiled at the call site and less to compile in the header.
983 (WebCore::CustomEvent::initCustomEvent): Updated to use JSValueInWrappedObject.
984 (WebCore::CustomEvent::trySerializeDetail): Deleted. Now handled by bindings.
985 * dom/CustomEvent.h: Updated for the above.
986 * dom/CustomEvent.idl: Added JSCustomMarkFunction and removed
987 CallWith=ScriptState.
990 (WebCore::Document::shouldBypassMainWorldContentSecurityPolicy const):
991 Updated to pass reference to currentWorld but also rewrote to be more direct.
994 (WebCore::Element::isKeyboardFocusable const): Take a pointer instead of a
995 reference to the keyboard event. This function can be called with no event;
996 before this patch we were using a "dummy event".
997 * dom/Element.h: Ditto.
999 * dom/ErrorEvent.cpp:
1000 (WebCore::ErrorEvent::error): Use isWorldCompatible.
1003 (WebCore::Event::create): Moved here from header.
1004 (WebCore::Event::createForBindings): Ditto.
1005 (WebCore::Event::initEvent): Updated to use the name m_canceled instead of
1006 the name m_defaultPrevented.
1007 (WebCore::Event::resetBeforeDispatch): Added. Clears m_defaultHandled so
1008 a value left over from a previous dispatch doesn't affect the next dispatch.
1010 * dom/Event.h: Renamed m_defaultPrevented to m_canceled to match specification
1011 terminology and be slightly clearer. Added resetBeforeDispatch. Removed the
1012 setDefaultPrevented function.
1014 * dom/EventDispatcher.cpp:
1015 (WebCore::EventDispatcher::dispatchEvent): Added call to resetBeforeDispatch.
1017 * dom/EventListener.h: Made isAttribute virtual and got rid of virtualIsAttribute,
1018 which was an alternative to using "final" before we had that in the language.
1020 * dom/EventTarget.cpp:
1021 (WebCore::EventTarget::dispatchEvent): Added call to resetBeforeDispatch.
1023 * dom/KeyboardEvent.cpp:
1024 (WebCore::KeyboardEvent::KeyboardEvent): Removed unneeded code that initializes
1025 m_handledByInputMethod to false; we do that in the class definition now.
1026 (WebCore::KeyboardEvent::create): Moved here from header.
1027 (WebCore::KeyboardEvent::createForBindings): Ditto.
1028 (WebCore::KeyboardEvent::initKeyboardEvent): Added code to reset m_charCode,
1029 m_isComposing, m_keyCode, m_repeat, m_underlyingPlatformEvent, m_which, m_code,
1030 and m_key. These are needed now that we can reuse an existing event; we don't
1031 want them getting out of sync with the other data members.
1032 (WebCore::KeyboardEvent::keyCode const): Updated for name change from m_keyEvent
1033 to m_underlyingPlatformEvent.
1034 (WebCore::KeyboardEvent::charCode const): Ditto.
1035 (WebCore::findKeyboardEvent): Deleted. Was unused.
1036 * dom/KeyboardEvent.h: Updated for the above. Removed KeyboardEvent::createForDummy.
1038 * dom/MessageEvent.cpp:
1039 (WebCore::MessageEvent::MessageEvent): Removed unnneded ExecState argument.
1040 Simplified since m_data is now a Variant.
1041 (WebCore::MessageEvent::create): More of the same.
1042 (WebCore::MessageEvent::initMessageEvent): Ditto.
1043 (WebCore::MessageEvent::trySerializeData): Deleted.
1044 (WebCore::MessageEvent::data const): Deleted.
1045 * dom/MessageEvent.h: Use a Variant.
1046 * dom/MessageEvent.idl: Added JSCustomMarkFunction and removed
1047 CallWith=ScriptState and CachedAttribute.
1049 * dom/MouseEvent.h: Removed obsolete comment.
1050 * dom/MouseEvent.idl: Wrap line differently.
1052 * dom/PopStateEvent.cpp:
1053 (WebCore::PopStateEvent::PopStateEvent): Removed unneeded ExecState argument.
1054 Updated to use JSValueInWrappedObject.
1055 (WebCore::PopStateEvent::create): Ditto.
1056 (WebCore::PopStateEvent::trySerializeState): Ditto.
1057 * dom/PopStateEvent.h: Ditto.
1058 * dom/PopStateEvent.idl: Use JSCustomMarkFunction, and don't use
1059 ConstructorCallWith=ScriptState.
1061 * dom/ScriptExecutionContext.cpp:
1062 (WebCore::ScriptExecutionContext::sanitizeScriptError): Deleted.
1063 (WebCore::ScriptExecutionContext::canIncludeErrorDetails): Added.
1064 (WebCore::ScriptExecutionContext::dispatchErrorEvent): Clarify by
1065 using canIncludeErrorDetails instead of sanitizeScriptError.
1066 * dom/ScriptExecutionContext.h: Ditto.
1068 * dom/WheelEvent.cpp:
1069 (WebCore::WheelEvent::WheelEvent): Updated for name change and also to
1070 eliminate m_initializedWithPlatformWheelEvent.
1071 (WebCore::WheelEvent::create): Moved here from header.
1072 (WebCore::WheelEvent::createForBindings): Ditto.
1073 (WebCore::WheelEvent::initWebKitWheelEvent): Renamed from initWheelEvent.
1074 * dom/WheelEvent.h: Renamed initWheelEvent to initWebKitWheelEvent since
1075 there is no standard init function for wheel events and we have this only
1076 for backward compatibility. Got rid of the separate boolean
1077 m_initializedWithPlatformWheelEvent and instead made the renamed
1078 m_wheelEvent, m_underlyingPlatformEvent, optional for when there is no
1079 underlying platform event.
1081 * html/BaseDateAndTimeInputType.cpp:
1082 (WebCore::BaseDateAndTimeInputType::isKeyboardFocusable const): Take a
1083 pointer to the event so we can handle the case where there is no event.
1084 * html/BaseDateAndTimeInputType.h: Ditto.
1085 * html/HTMLAnchorElement.cpp:
1086 (WebCore::HTMLAnchorElement::isKeyboardFocusable const): Ditto.
1087 * html/HTMLAnchorElement.h: Ditto.
1088 * html/HTMLAreaElement.cpp:
1089 (WebCore::HTMLAreaElement::isKeyboardFocusable const): Ditto.
1090 * html/HTMLAreaElement.h: Ditto.
1091 * html/HTMLDocument.cpp: Added include of "DOMWindow.h".
1092 * html/HTMLFormControlElement.cpp:
1093 (WebCore::HTMLFormControlElement::isKeyboardFocusable const): Take
1094 pointer to the event.
1095 * html/HTMLFormControlElement.h: Ditto.
1096 * html/HTMLFrameOwnerElement.cpp:
1097 (WebCore::HTMLFrameOwnerElement::isKeyboardFocusable const): Ditto.
1098 * html/HTMLFrameOwnerElement.h: Ditto.
1099 * html/HTMLIFrameElement.h: Ditto.
1100 * html/HTMLInputElement.cpp:
1101 (WebCore::HTMLInputElement::isKeyboardFocusable const): Ditto.
1102 (WebCore::HTMLInputElement::isTextFormControlKeyboardFocusable const): Ditto.
1103 * html/HTMLInputElement.h: Ditto.
1104 * html/HTMLPlugInElement.cpp:
1105 (WebCore::HTMLPlugInElement::isKeyboardFocusable const): Ditto.
1106 * html/HTMLPlugInElement.h: Ditto.
1107 * html/HTMLSelectElement.cpp:
1108 (WebCore::HTMLSelectElement::isKeyboardFocusable const): Ditto.
1109 * html/HTMLSelectElement.h: Ditto.
1110 * html/HTMLTextAreaElement.cpp:
1111 (WebCore::HTMLTextAreaElement::isKeyboardFocusable const): Ditto.
1112 * html/HTMLTextAreaElement.h: Ditto.
1113 * html/InputType.cpp:
1114 (WebCore::InputType::isKeyboardFocusable const): Ditto.
1115 * html/InputType.h: Ditto.
1116 * html/RadioInputType.cpp:
1117 (WebCore::RadioInputType::isKeyboardFocusable const): Ditto.
1118 * html/RadioInputType.h: Ditto.
1119 * html/TextFieldInputType.cpp:
1120 (WebCore::TextFieldInputType::isKeyboardFocusable const): Ditto.
1121 * html/TextFieldInputType.h: Ditto.
1123 * inspector/CommandLineAPIHost.cpp:
1124 (WebCore::listenerEntriesFromListenerInfo): Pass reference to currentWorld.
1125 Use is<> and downcast<> instead of JSEventListener::cast.
1126 * inspector/PageScriptDebugServer.cpp:
1127 (WebCore::PageScriptDebugServer::isContentScript const): Pass reference to
1129 * inspector/agents/InspectorDOMAgent.cpp:
1130 (WebCore::InspectorDOMAgent::buildObjectForEventListener):
1131 Use is<> and downcast<> instead of JSEventListener::cast.
1133 * mathml/MathMLElement.cpp:
1134 (WebCore::MathMLElement::isKeyboardFocusable const): Take a
1135 pointer to the event so we can handle the case where there is no event.
1136 * mathml/MathMLElement.h: Ditto.
1138 * page/DOMWindow.cpp:
1139 (WebCore::DOMWindow::dispatchEvent): Added call to resetBeforeDispatch.
1140 All event dispatching paths now need to do this; there are 3.
1142 * page/EventHandler.cpp:
1143 (WebCore::handleWheelEventInAppropriateEnclosingBox): Use the new
1144 underlyingPlatformEvent function, less confusing than calling a function
1145 named wheelEvent() on an object of type WheelEvent. Also, it returns
1146 a const& to std::optional instead of a pointer, so updated for that.
1147 (WebCore::EventHandler::defaultWheelEventHandler): Ditto.
1148 (WebCore::EventHandler::internalKeyEvent): Use preventDefault instead
1149 of setDefaultPrevented(true).
1150 (WebCore::EventHandler::tabsToLinks const): Take a pointer.
1151 (WebCore::EventHandler::defaultArrowEventHandler): Pass a pointer.
1152 (WebCore::EventHandler::defaultTabEventHandler): Ditto.
1153 * page/EventHandler.h: Updated for the above.
1155 * page/EventSource.cpp:
1156 (WebCore::EventSource::dispatchMessageEvent): Pass a reference rather
1157 than a pointer when creating a message event.
1159 * page/FocusController.cpp:
1160 (WebCore::isFocusableElementOrScopeOwner): Use a pointer instead of reference
1162 (WebCore::isNonFocusableScopeOwner): Ditto.
1163 (WebCore::isFocusableScopeOwner): Ditto.
1164 (WebCore::shadowAdjustedTabIndex): Ditto.
1165 (WebCore::FocusController::findFocusableElementDescendingIntoSubframes):
1166 Renamed to use simpler terminology than "descending down into frame document".
1167 Changed to take a pointer instead of reference.
1168 (WebCore::FocusController::setInitialFocus): Pass nullptr instead of
1169 using KeyboardEvent::createForDummy.
1170 (WebCore::FocusController::advanceFocus): Pointer instead of reference.
1171 (WebCore::FocusController::advanceFocusInDocumentOrder): Ditto.
1172 (WebCore::FocusController::findFocusableElementAcrossFocusScope): Ditto.
1173 (WebCore::FocusController::findFocusableElementWithinScope): Ditto.
1174 (WebCore::FocusController::nextFocusableElementWithinScope): Ditto.
1175 (WebCore::FocusController::previousFocusableElementWithinScope): Ditto.
1176 (WebCore::FocusController::findFocusableElementOrScopeOwner): Ditto.
1177 (WebCore::FocusController::findElementWithExactTabIndex): Ditto.
1178 (WebCore::nextElementWithGreaterTabIndex): Ditto.
1179 (WebCore::previousElementWithLowerTabIndex): Ditto.
1180 (WebCore::FocusController::nextFocusableElement): Ditto.
1181 (WebCore::FocusController::previousFocusableElement): Ditto.
1182 (WebCore::FocusController::nextFocusableElementOrScopeOwner): Ditto.
1183 (WebCore::FocusController::previousFocusableElementOrScopeOwner): Ditto.
1184 (WebCore::FocusController::findFocusCandidateInContainer): Ditto.
1185 (WebCore::FocusController::advanceFocusDirectionallyInContainer): Ditto.
1186 (WebCore::FocusController::advanceFocusDirectionally): Ditto.
1187 * page/FocusController.h: Updated for the above.
1189 * page/PageConsoleClient.cpp:
1190 (WebCore::objectArgumentAt): Added. Helper to make functions below simpler.
1191 (WebCore::canvasRenderingContext): Factored out logic to get the context
1192 from either a canvas or a canvas rendering context from the functions below.
1193 Also updated to not use ScriptValue and to use auto quite a bit more.
1194 (WebCore::PageConsoleClient::record): Updated to use the functions above.
1195 (WebCore::PageConsoleClient::recordEnd): Ditto.
1197 * page/ios/EventHandlerIOS.mm:
1198 (WebCore::EventHandler::tabsToAllFormControls const): Take a pointer
1199 instead of a reference.
1200 * page/mac/EventHandlerMac.mm:
1201 (WebCore::EventHandler::tabsToAllFormControls const): Ditto.
1202 * page/win/EventHandlerWin.cpp:
1203 (WebCore::EventHandler::tabsToAllFormControls const): Ditto.
1204 * platform/glib/EventHandlerGLib.cpp:
1205 (WebCore::EventHandler::tabsToAllFormControls const): Ditto.
1206 * svg/SVGAElement.cpp:
1207 (WebCore::SVGAElement::isKeyboardFocusable const): Ditto.
1208 * svg/SVGAElement.h: Ditto.
1210 * testing/Internals.cpp:
1211 (WebCore::Internals::isFromCurrentWorld const): Use isWorldCompatible.
1213 2018-02-07 Andy Estes <aestes@apple.com>
1215 ASSERTION FAILED: vm->currentThreadIsHoldingAPILock() seen with http/tests/paymentrequest/payment-request-show-method.https.html
1216 https://bugs.webkit.org/show_bug.cgi?id=182591
1218 Reviewed by Youenn Fablet.
1220 Fixes assertion failures in http/tests/paymentrequest/payment-request-show-method.https.html.
1222 DOMPromise::whenSettled() calls the JSC API without first aquiring the API lock, and
1223 r228195 added a call to whenSettled() where the lock is not guaranteed to be already
1226 Fix this by creating a JSLockHolder in DOMPromise::whenSettled().
1228 * bindings/js/JSDOMPromise.cpp:
1229 (WebCore::DOMPromise::whenSettled):
1231 2018-02-07 Ryan Haddad <ryanhaddad@apple.com>
1233 Unreviewed, rolling out r228243.
1235 Introduced an assertion failure with API test
1236 FullscreenZoomInitialFrame.WebKit
1240 "Assert that NSApp is not running in the WebProcess."
1241 https://bugs.webkit.org/show_bug.cgi?id=182553
1242 https://trac.webkit.org/changeset/228243
1244 2018-02-07 Christopher Reid <chris.reid@sony.com>
1246 [Curl] Cookie Database has some warnings when compiled in clang
1247 https://bugs.webkit.org/show_bug.cgi?id=182583
1249 Reviewed by Alex Christensen.
1251 No new tests, no change in behavior.
1253 Fixing unused-parameter, missing-field-initializers, reorder, and pragma-once-outside-header warnings.
1255 * platform/network/NetworkStorageSession.h:
1256 * platform/network/curl/CookieJarCurlDatabase.cpp:
1257 * platform/network/curl/CookieJarDB.cpp:
1258 * platform/network/curl/NetworkStorageSessionCurl.cpp:
1260 2018-02-07 Ryosuke Niwa <rniwa@webkit.org>
1262 Remove unused CSSParserContext in CSSParser::parseInlineStyleDeclaration
1263 https://bugs.webkit.org/show_bug.cgi?id=182587
1265 Reviewed by Simon Fraser.
1267 Removed the code. There is no need to create an unused CSSParserContext in CSSParser.
1269 * css/parser/CSSParser.cpp:
1270 (WebCore::CSSParser::parseInlineStyleDeclaration):
1271 * css/parser/CSSParser.h:
1272 * css/parser/CSSParserImpl.cpp:
1273 (WebCore::CSSParserImpl::parseInlineStyleDeclaration):
1274 * css/parser/CSSParserImpl.h:
1276 2018-02-07 Ross Kirsling <ross.kirsling@sony.com>
1278 Add missing #if ENABLE(VIDEO_TRACK) after r228201.
1279 https://bugs.webkit.org/show_bug.cgi?id=182585
1281 Reviewed by Chris Dumez.
1283 * loader/LinkPreloadResourceClients.h:
1285 2018-02-07 Per Arne Vollan <pvollan@apple.com>
1287 Assert that NSApp is not running in the WebProcess.
1288 https://bugs.webkit.org/show_bug.cgi?id=182553
1289 <rdar://problem/37316144>
1291 Reviewed by Simon Fraser.
1293 In WebCore, there are a few places where NSApp is referenced. Since the WebContent process
1294 is no longer using the NSApplication run loop, and NSApp is no longer guaranteed to be
1295 valid, we should make sure that the NSApp is not referenced by the WebContent process or
1296 the Network process, by asserting that the NSApplication event loop is running when NSApp
1297 is referenced. It is still ok for the UIProcess to reference NSApp. Adding these assert
1298 will help catch references to NSApp when the NSApplication run loop is not used.
1299 Also, do not post a fake mouse event in PasteBoard::setDragImage when the NSApplication
1300 run loop is not running, since this is only relevant in WK1.
1302 No new tests, covered by existing tests.
1304 * page/mac/EventHandlerMac.mm:
1305 (WebCore::lastEventIsMouseUp):
1306 (WebCore::EventHandler::sendFakeEventsAfterWidgetTracking):
1307 * platform/mac/PasteboardMac.mm:
1308 (WebCore::Pasteboard::setDragImage):
1309 * platform/mac/WebVideoFullscreenController.mm:
1310 (-[WebVideoFullscreenController windowDidLoad]):
1311 (-[WebVideoFullscreenController updateMenuAndDockForFullscreen]):
1312 * platform/mac/WebWindowAnimation.mm:
1313 (WebCore::WebWindowAnimationDurationFromDuration):
1315 2018-02-07 Youenn Fablet <youenn@apple.com>
1317 ASSERTION FAILED: m_timeOrigin in Performance::Performance()
1318 https://bugs.webkit.org/show_bug.cgi?id=182558
1319 <rdar://problem/37297551>
1321 Reviewed by Chris Dumez.
1323 Test: http/wpt/fetch/cors-preflight-star.any.serviceworker.html
1325 * loader/CrossOriginPreflightChecker.cpp:
1326 (WebCore::CrossOriginPreflightChecker::startPreflight):
1328 2018-02-07 Wenson Hsieh <wenson_hsieh@apple.com>
1330 REGRESSION(r226396): File paths are inserted when dropping image files
1331 https://bugs.webkit.org/show_bug.cgi?id=182557
1332 <rdar://problem/37294120>
1334 Reviewed by Ryosuke Niwa.
1336 Reverts unintended changes in <http://trac.webkit.org/r226396>. Before r226396, WebContentReader::readFilenames
1337 (a helper function in macOS-specific code) contained logic to create and insert attachment elements if
1338 ENABLE(ATTACHMENT_ELEMENT); otherwise, it would fall back to inserting the visible URL as a text node. Since we
1339 enable the attachment element on all Cocoa platforms via xcconfig files, this was effectively dead code.
1341 However, when r226396 (which moved this out from macOS to Cocoa platform code) refactored this helper function,
1342 it also moved this chunk of code out of the !ENABLE(ATTACHMENT) conditional and into a PLATFORM(MAC) guard,
1343 which means that we now fall back to inserting file paths as text when attachment elements are disabled. To fix
1344 this, we simply remove the (previously) dead code.
1346 A more subtle difference is that we no longer always return true from WebContentReader::readFilePaths. This
1347 means that when we drop files, we no longer skip over the early return in documentFragmentFromDragData when
1348 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
1349 behavior of initializing the document fragment.
1351 Test: modified editing/pasteboard/drag-files-to-editable-element-as-URLs.html.
1353 * editing/WebContentReader.cpp:
1354 (WebCore::WebContentReader::ensureFragment): Deleted.
1356 Remove this helper, as it was only used in WebContentReader::readFilePaths.
1358 * editing/WebContentReader.h:
1359 * editing/cocoa/WebContentReaderCocoa.mm:
1360 (WebCore::WebContentReader::readFilePaths):
1362 2018-02-07 John Wilander <wilander@apple.com>
1364 Restrict Referer to just the origin for third parties in private mode and third parties ITP blocks cookies for in regular mode
1365 https://bugs.webkit.org/show_bug.cgi?id=182559
1366 <rdar://problem/36990337>
1368 Reviewed by Andy Estes.
1370 Tests: http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-redirects.html
1371 http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-requests.html
1372 http/tests/security/strip-referrer-to-origin-for-third-party-redirects-in-private-mode.html
1373 http/tests/security/strip-referrer-to-origin-for-third-party-requests-in-private-mode.html
1375 * page/SecurityPolicy.cpp:
1376 (WebCore::SecurityPolicy::referrerToOriginString):
1377 Now exposed within WebCore. This is to make sure we create a proper referrer
1378 string in WebCore::ResourceRequestBase::setExistingHTTPReferrerToOriginString().
1379 (WebCore::referrerToOriginString): Deleted.
1380 Used to be internal.
1381 * page/SecurityPolicy.h:
1382 * platform/network/ResourceRequestBase.cpp:
1383 (WebCore::ResourceRequestBase::setExistingHTTPReferrerToOriginString):
1384 New, exported function used in WebKit. Note that this function does not
1385 set the referrer if the request has none since before.
1386 * platform/network/ResourceRequestBase.h:
1389 2018-02-07 Zalan Bujtas <zalan@apple.com>
1391 [RenderTreeBuilder] Remove RenderElement::destroyLeftoverChildren.
1392 https://bugs.webkit.org/show_bug.cgi?id=182518
1393 <rdar://problem/37256035>
1395 Reviewed by Antti Koivisto.
1397 Remove leftover children before we call takeChild() on the parent (as opposed to when
1398 we finally call destroy() on the parent).
1399 This patch also explicitly destroys the top level pagination renderers.
1401 Covered by existing tests.
1403 * rendering/RenderElement.cpp:
1404 (WebCore::RenderElement::removeAndDestroyChild):
1405 (WebCore::RenderElement::destroyLeftoverChildren): Deleted.
1406 * rendering/RenderElement.h:
1407 * rendering/RenderObject.cpp:
1408 (WebCore::RenderObject::destroy):
1409 * rendering/updating/RenderTreeUpdater.cpp:
1410 (WebCore::RenderTreeUpdater::tearDownRenderers):
1411 (WebCore::RenderTreeUpdater::tearDownLeftoverPaginationRenderersIfNeeded):
1412 * rendering/updating/RenderTreeUpdater.h:
1414 2018-02-07 Daniel Bates <dabates@apple.com>
1416 Log error when authentication challenge is blocked due to an insecure request
1417 https://bugs.webkit.org/show_bug.cgi?id=182358
1419 Reviewed by Andy Estes.
1421 Emit an error message to Web Inspector console that explains why an authentication
1422 challenge was blocked so that a developer can fix up their site.
1424 Tests: http/tests/security/mixedContent/insecure-basic-auth-image.https.html
1425 http/tests/security/mixedContent/secure-page-navigates-to-basic-auth-insecure-page.https.html
1426 http/tests/security/mixedContent/secure-page-navigates-to-basic-auth-secure-page-via-insecure-redirect.https.html
1428 * loader/FrameLoader.cpp:
1429 (WebCore::FrameLoader::receivedFirstData): Log to the console an error message
1430 if the document we are loading was forbidden from prompting for credentials.
1431 Also removed duplicate assertion to ensure document is non-null and update
1432 call to LinkLoader::loadLinksFromHeader() to use local variable to access
1433 the document we are loading instead of asking the frame for it, again.
1434 (WebCore::FrameLoader::reportAuthenticationChallengeBlocked): Added.
1435 * loader/FrameLoader.h:
1437 * loader/ResourceLoader.cpp:
1438 (WebCore::ResourceLoader::init):
1439 (WebCore::ResourceLoader::willSendRequestInternal):
1440 Track the decision to forbid asking for credentials due to Fetch spec. requirements (m_canAskClientForCredentials)
1441 independently from the decision to forbid them due to making an insecure request (m_wasInsecureRequestSeen)
1442 so that we know the reason why we blocked asking for credentials when we receive an authentication challenge.
1444 (WebCore::ResourceLoader::didBlockAuthenticationChallenge): Added.
1445 (WebCore::ResourceLoader::isAllowedToAskUserForCredentials const): Modified code now that we track
1446 whether we have seen an insecure request so far independently from decision to forbid prompting for
1447 credentials due to a Fetch spec. requirement.
1449 (WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
1450 Store a bit whether we have seen an insecure request when loading the resource so far. Disallow
1451 asking for credentials if we have seen an insecure request so far. Once we receive a response
1453 * loader/ResourceLoader.h:
1454 (WebCore::ResourceLoader::wasAuthenticationChallengeBlocked const): Added.
1455 (WebCore::ResourceLoader::wasInsecureRequestSeen const): Added.
1457 2018-02-06 Matt Lewis <jlewis3@apple.com>
1459 Removed the assertions from VideoFullscreenInterfaceAVKit.mm temporarily to stop the resulting crashes during debugging.
1460 https://bugs.webkit.org/show_bug.cgi?id=182527
1462 Unreviewed build fix.
1464 * platform/ios/VideoFullscreenInterfaceAVKit.mm:
1465 (VideoFullscreenInterfaceAVKit::exitFullscreen):
1466 (VideoFullscreenInterfaceAVKit::cleanupFullscreen):
1468 2018-02-07 Zalan Bujtas <zalan@apple.com>
1470 [RenderTreeBuilder] Move RenderBlock::removeLeftoverAnonymousBlock to RenderTreeBuilder
1471 https://bugs.webkit.org/show_bug.cgi?id=182510
1472 <rdar://problem/37250037>
1474 Reviewed by Antti Koivisto.
1476 Do not reinvent subtree reparenting.
1478 Covered by existing tests.
1480 * rendering/RenderBlock.cpp:
1481 (WebCore::RenderBlock::removeLeftoverAnonymousBlock): Deleted.
1482 * rendering/RenderBlock.h:
1483 * rendering/RenderBoxModelObject.cpp:
1484 (WebCore::RenderBoxModelObject::moveAllChildrenToInternal):
1485 * rendering/RenderBoxModelObject.h:
1486 * rendering/RenderButton.h:
1487 * rendering/RenderElement.cpp:
1488 (WebCore::RenderElement::detachRendererInternal):
1489 (WebCore::RenderElement::attachRendererInternal):
1490 (WebCore::RenderElement::insertChildInternal):
1491 (WebCore::RenderElement::takeChildInternal):
1492 * rendering/RenderElement.h:
1493 * rendering/RenderRuby.h:
1494 * rendering/RenderRubyRun.h:
1495 * rendering/RenderTextControl.h:
1496 * rendering/updating/RenderTreeBuilderBlock.cpp:
1497 (WebCore::RenderTreeBuilder::Block::insertChildIgnoringContinuation):
1498 (WebCore::RenderTreeBuilder::Block::childBecameNonInline):
1499 (WebCore::RenderTreeBuilder::Block::removeLeftoverAnonymousBlock):
1500 * rendering/updating/RenderTreeBuilderBlock.h:
1502 2018-02-06 Don Olmstead <don.olmstead@sony.com>
1504 Remove WebCore/ForwardingHeaders directory
1505 https://bugs.webkit.org/show_bug.cgi?id=182347
1507 Reviewed by Keith Miller.
1509 No new tests. No change in behavior.
1512 * ForwardingHeaders/bindings/ScriptFunctionCall.h: Removed.
1513 * ForwardingHeaders/bindings/ScriptObject.h: Removed.
1514 * ForwardingHeaders/bindings/ScriptValue.h: Removed.
1515 * ForwardingHeaders/builtins/BuiltinNames.h: Removed.
1516 * ForwardingHeaders/builtins/BuiltinUtils.h: Removed.
1517 * ForwardingHeaders/builtins/JSCBuiltins.h: Removed.
1518 * ForwardingHeaders/bytecode/CodeBlock.h: Removed.
1519 * ForwardingHeaders/bytecode/SpeculatedType.h: Removed.
1520 * ForwardingHeaders/bytecode/UnlinkedFunctionExecutable.h: Removed.
1521 * ForwardingHeaders/debugger/Debugger.h: Removed.
1522 * ForwardingHeaders/domjit/DOMJITAbstractHeap.h: Removed.
1523 * ForwardingHeaders/domjit/DOMJITEffect.h: Removed.
1524 * ForwardingHeaders/domjit/DOMJITGetterSetter.h: Removed.
1525 * ForwardingHeaders/domjit/DOMJITHeapRange.h: Removed.
1526 * ForwardingHeaders/domjit/DOMJITSignature.h: Removed.
1527 * ForwardingHeaders/heap/BlockDirectoryInlines.h: Removed.
1528 * ForwardingHeaders/heap/DeleteAllCodeEffort.h: Removed.
1529 * ForwardingHeaders/heap/FastMallocAlignedMemoryAllocator.h: Removed.
1530 * ForwardingHeaders/heap/GCActivityCallback.h: Removed.
1531 * ForwardingHeaders/heap/GCFinalizationCallback.h: Removed.
1532 * ForwardingHeaders/heap/HandleTypes.h: Removed.
1533 * ForwardingHeaders/heap/Heap.h: Removed.
1534 * ForwardingHeaders/heap/HeapInlines.h: Removed.
1535 * ForwardingHeaders/heap/HeapObserver.h: Removed.
1536 * ForwardingHeaders/heap/IncrementalSweeper.h: Removed.
1537 * ForwardingHeaders/heap/LockDuringMarking.h: Removed.
1538 * ForwardingHeaders/heap/MachineStackMarker.h: Removed.
1539 * ForwardingHeaders/heap/MarkedBlockInlines.h: Removed.
1540 * ForwardingHeaders/heap/MarkingConstraint.h: Removed.
1541 * ForwardingHeaders/heap/RunningScope.h: Removed.
1542 * ForwardingHeaders/heap/SimpleMarkingConstraint.h: Removed.
1543 * ForwardingHeaders/heap/SlotVisitor.h: Removed.
1544 * ForwardingHeaders/heap/SlotVisitorInlines.h: Removed.
1545 * ForwardingHeaders/heap/Strong.h: Removed.
1546 * ForwardingHeaders/heap/StrongInlines.h: Removed.
1547 * ForwardingHeaders/heap/SubspaceInlines.h: Removed.
1548 * ForwardingHeaders/heap/ThreadLocalCache.h: Removed.
1549 * ForwardingHeaders/heap/Weak.h: Removed.
1550 * ForwardingHeaders/heap/WeakInlines.h: Removed.
1551 * ForwardingHeaders/inspector/ConsoleMessage.h: Removed.
1552 * ForwardingHeaders/inspector/ContentSearchUtilities.h: Removed.
1553 * ForwardingHeaders/inspector/IdentifiersFactory.h: Removed.
1554 * ForwardingHeaders/inspector/InjectedScript.h: Removed.
1555 * ForwardingHeaders/inspector/InjectedScriptBase.h: Removed.
1556 * ForwardingHeaders/inspector/InjectedScriptHost.h: Removed.
1557 * ForwardingHeaders/inspector/InjectedScriptManager.h: Removed.
1558 * ForwardingHeaders/inspector/InjectedScriptModule.h: Removed.
1559 * ForwardingHeaders/inspector/InspectorAgentBase.h: Removed.
1560 * ForwardingHeaders/inspector/InspectorAgentRegistry.h: Removed.
1561 * ForwardingHeaders/inspector/InspectorBackendDispatcher.h: Removed.
1562 * ForwardingHeaders/inspector/InspectorBackendDispatchers.h: Removed.
1563 * ForwardingHeaders/inspector/InspectorEnvironment.h: Removed.
1564 * ForwardingHeaders/inspector/InspectorFrontendChannel.h: Removed.
1565 * ForwardingHeaders/inspector/InspectorFrontendDispatchers.h: Removed.
1566 * ForwardingHeaders/inspector/InspectorFrontendRouter.h: Removed.
1567 * ForwardingHeaders/inspector/InspectorProtocolObjects.h: Removed.
1568 * ForwardingHeaders/inspector/InspectorProtocolTypes.h: Removed.
1569 * ForwardingHeaders/inspector/PerGlobalObjectWrapperWorld.h: Removed.
1570 * ForwardingHeaders/inspector/ScriptArguments.h: Removed.
1571 * ForwardingHeaders/inspector/ScriptBreakpoint.h: Removed.
1572 * ForwardingHeaders/inspector/ScriptCallFrame.h: Removed.
1573 * ForwardingHeaders/inspector/ScriptCallStack.h: Removed.
1574 * ForwardingHeaders/inspector/ScriptCallStackFactory.h: Removed.
1575 * ForwardingHeaders/inspector/ScriptDebugListener.h: Removed.
1576 * ForwardingHeaders/inspector/ScriptDebugServer.h: Removed.
1577 * ForwardingHeaders/inspector/agents/InspectorAgent.h: Removed.
1578 * ForwardingHeaders/inspector/agents/InspectorConsoleAgent.h: Removed.
1579 * ForwardingHeaders/inspector/agents/InspectorDebuggerAgent.h: Removed.
1580 * ForwardingHeaders/inspector/agents/InspectorHeapAgent.h: Removed.
1581 * ForwardingHeaders/inspector/agents/InspectorRuntimeAgent.h: Removed.
1582 * ForwardingHeaders/inspector/agents/InspectorScriptProfilerAgent.h: Removed.
1583 * ForwardingHeaders/interpreter/CallFrame.h: Removed.
1584 * ForwardingHeaders/interpreter/FrameTracers.h: Removed.
1585 * ForwardingHeaders/interpreter/ShadowChicken.h: Removed.
1586 * ForwardingHeaders/interpreter/StackVisitor.h: Removed.
1587 * ForwardingHeaders/jit/JITCode.h: Removed.
1588 * ForwardingHeaders/jit/JITMathICForwards.h: Removed.
1589 * ForwardingHeaders/jit/Snippet.h: Removed.
1590 * ForwardingHeaders/jit/SnippetParams.h: Removed.
1591 * ForwardingHeaders/jit/SpillRegistersMode.h: Removed.
1592 * ForwardingHeaders/masm/X86Assembler.h: Removed.
1593 * ForwardingHeaders/parser/ParserError.h: Removed.
1594 * ForwardingHeaders/parser/SourceCode.h: Removed.
1595 * ForwardingHeaders/parser/SourceProvider.h: Removed.
1596 * ForwardingHeaders/parser/SourceProviderCache.h: Removed.
1597 * ForwardingHeaders/profiler/ProfilerDatabase.h: Removed.
1598 * ForwardingHeaders/runtime/ArgList.h: Removed.
1599 * ForwardingHeaders/runtime/ArrayBuffer.h: Removed.
1600 * ForwardingHeaders/runtime/ArrayBufferView.h: Removed.
1601 * ForwardingHeaders/runtime/ArrayPrototype.h: Removed.
1602 * ForwardingHeaders/runtime/AuxiliaryBarrierInlines.h: Removed.
1603 * ForwardingHeaders/runtime/BooleanObject.h: Removed.
1604 * ForwardingHeaders/runtime/CallData.h: Removed.
1605 * ForwardingHeaders/runtime/CatchScope.h: Removed.
1606 * ForwardingHeaders/runtime/CommonIdentifiers.h: Removed.
1607 * ForwardingHeaders/runtime/Completion.h: Removed.
1608 * ForwardingHeaders/runtime/ConfigFile.h: Removed.
1609 * ForwardingHeaders/runtime/ConsoleClient.h: Removed.
1610 * ForwardingHeaders/runtime/ConsoleTypes.h: Removed.
1611 * ForwardingHeaders/runtime/ConstructAbility.h: Removed.
1612 * ForwardingHeaders/runtime/ConstructData.h: Removed.
1613 * ForwardingHeaders/runtime/DataView.h: Removed.
1614 * ForwardingHeaders/runtime/DateInstance.h: Removed.
1615 * ForwardingHeaders/runtime/Error.h: Removed.
1616 * ForwardingHeaders/runtime/ErrorHandlingScope.h: Removed.
1617 * ForwardingHeaders/runtime/ErrorInstance.h: Removed.
1618 * ForwardingHeaders/runtime/ErrorPrototype.h: Removed.
1619 * ForwardingHeaders/runtime/Exception.h: Removed.
1620 * ForwardingHeaders/runtime/ExceptionHelpers.h: Removed.
1621 * ForwardingHeaders/runtime/Float32Array.h: Removed.
1622 * ForwardingHeaders/runtime/Float64Array.h: Removed.
1623 * ForwardingHeaders/runtime/FunctionConstructor.h: Removed.
1624 * ForwardingHeaders/runtime/FunctionExecutable.h: Removed.
1625 * ForwardingHeaders/runtime/FunctionPrototype.h: Removed.
1626 * ForwardingHeaders/runtime/HashMapImpl.h: Removed.
1627 * ForwardingHeaders/runtime/Identifier.h: Removed.
1628 * ForwardingHeaders/runtime/IdentifierInlines.h: Removed.
1629 * ForwardingHeaders/runtime/InitializeThreading.h: Removed.
1630 * ForwardingHeaders/runtime/Int16Array.h: Removed.
1631 * ForwardingHeaders/runtime/Int32Array.h: Removed.
1632 * ForwardingHeaders/runtime/Int8Array.h: Removed.
1633 * ForwardingHeaders/runtime/InternalFunction.h: Removed.
1634 * ForwardingHeaders/runtime/Intrinsic.h: Removed.
1635 * ForwardingHeaders/runtime/IterationKind.h: Removed.
1636 * ForwardingHeaders/runtime/IteratorOperations.h: Removed.
1637 * ForwardingHeaders/runtime/IteratorPrototype.h: Removed.
1638 * ForwardingHeaders/runtime/JSAPIValueWrapper.h: Removed.
1639 * ForwardingHeaders/runtime/JSArray.h: Removed.
1640 * ForwardingHeaders/runtime/JSArrayBuffer.h: Removed.
1641 * ForwardingHeaders/runtime/JSArrayBufferView.h: Removed.
1642 * ForwardingHeaders/runtime/JSCInlines.h: Removed.
1643 * ForwardingHeaders/runtime/JSCJSValue.h: Removed.
1644 * ForwardingHeaders/runtime/JSCJSValueInlines.h: Removed.
1645 * ForwardingHeaders/runtime/JSCallee.h: Removed.
1646 * ForwardingHeaders/runtime/JSCell.h: Removed.
1647 * ForwardingHeaders/runtime/JSCellInlines.h: Removed.
1648 * ForwardingHeaders/runtime/JSDataView.h: Removed.
1649 * ForwardingHeaders/runtime/JSDestructibleObject.h: Removed.
1650 * ForwardingHeaders/runtime/JSDestructibleObjectHeapCellType.h: Removed.
1651 * ForwardingHeaders/runtime/JSExportMacros.h: Removed.
1652 * ForwardingHeaders/runtime/JSFunction.h: Removed.
1653 * ForwardingHeaders/runtime/JSGlobalObject.h: Removed.
1654 * ForwardingHeaders/runtime/JSGlobalObjectInlines.h: Removed.
1655 * ForwardingHeaders/runtime/JSInternalPromise.h: Removed.
1656 * ForwardingHeaders/runtime/JSInternalPromiseDeferred.h: Removed.
1657 * ForwardingHeaders/runtime/JSLock.h: Removed.
1658 * ForwardingHeaders/runtime/JSMap.h: Removed.
1659 * ForwardingHeaders/runtime/JSMapIterator.h: Removed.
1660 * ForwardingHeaders/runtime/JSModuleLoader.h: Removed.
1661 * ForwardingHeaders/runtime/JSModuleRecord.h: Removed.
1662 * ForwardingHeaders/runtime/JSNativeStdFunction.h: Removed.
1663 * ForwardingHeaders/runtime/JSONObject.h: Removed.
1664 * ForwardingHeaders/runtime/JSObject.h: Removed.
1665 * ForwardingHeaders/runtime/JSObjectInlines.h: Removed.
1666 * ForwardingHeaders/runtime/JSPromise.h: Removed.
1667 * ForwardingHeaders/runtime/JSPromiseConstructor.h: Removed.
1668 * ForwardingHeaders/runtime/JSPromiseDeferred.h: Removed.
1669 * ForwardingHeaders/runtime/JSProxy.h: Removed.
1670 * ForwardingHeaders/runtime/JSRunLoopTimer.h: Removed.
1671 * ForwardingHeaders/runtime/JSScriptFetchParameters.h: Removed.
1672 * ForwardingHeaders/runtime/JSScriptFetcher.h: Removed.
1673 * ForwardingHeaders/runtime/JSSegmentedVariableObjectHeapCellType.h: Removed.
1674 * ForwardingHeaders/runtime/JSSet.h: Removed.
1675 * ForwardingHeaders/runtime/JSSetIterator.h: Removed.
1676 * ForwardingHeaders/runtime/JSSourceCode.h: Removed.
1677 * ForwardingHeaders/runtime/JSString.h: Removed.
1678 * ForwardingHeaders/runtime/JSTypedArrays.h: Removed.
1679 * ForwardingHeaders/runtime/JSWithScope.h: Removed.
1680 * ForwardingHeaders/runtime/Lookup.h: Removed.
1681 * ForwardingHeaders/runtime/MapBase.h: Removed.
1682 * ForwardingHeaders/runtime/MapData.h: Removed.
1683 * ForwardingHeaders/runtime/MapDataInlines.h: Removed.
1684 * ForwardingHeaders/runtime/MatchResult.h: Removed.
1685 * ForwardingHeaders/runtime/Microtask.h: Removed.
1686 * ForwardingHeaders/runtime/ObjectConstructor.h: Removed.
1687 * ForwardingHeaders/runtime/ObjectPrototype.h: Removed.
1688 * ForwardingHeaders/runtime/Operations.h: Removed.
1689 * ForwardingHeaders/runtime/PrivateName.h: Removed.
1690 * ForwardingHeaders/runtime/PromiseDeferredTimer.h: Removed.
1691 * ForwardingHeaders/runtime/PropertyNameArray.h: Removed.
1692 * ForwardingHeaders/runtime/Protect.h: Removed.
1693 * ForwardingHeaders/runtime/RegExp.h: Removed.
1694 * ForwardingHeaders/runtime/RegExpObject.h: Removed.
1695 * ForwardingHeaders/runtime/RuntimeFlags.h: Removed.
1696 * ForwardingHeaders/runtime/SamplingProfiler.h: Removed.
1697 * ForwardingHeaders/runtime/ScriptFetchParameters.h: Removed.
1698 * ForwardingHeaders/runtime/ScriptFetcher.h: Removed.
1699 * ForwardingHeaders/runtime/StringObject.h: Removed.
1700 * ForwardingHeaders/runtime/StringPrototype.h: Removed.
1701 * ForwardingHeaders/runtime/Structure.h: Removed.
1702 * ForwardingHeaders/runtime/StructureChain.h: Removed.
1703 * ForwardingHeaders/runtime/StructureInlines.h: Removed.
1704 * ForwardingHeaders/runtime/Symbol.h: Removed.
1705 * ForwardingHeaders/runtime/SymbolTable.h: Removed.
1706 * ForwardingHeaders/runtime/ThrowScope.h: Removed.
1707 * ForwardingHeaders/runtime/TypedArrayController.h: Removed.
1708 * ForwardingHeaders/runtime/TypedArrayInlines.h: Removed.
1709 * ForwardingHeaders/runtime/TypedArrays.h: Removed.
1710 * ForwardingHeaders/runtime/Uint16Array.h: Removed.
1711 * ForwardingHeaders/runtime/Uint32Array.h: Removed.
1712 * ForwardingHeaders/runtime/Uint8Array.h: Removed.
1713 * ForwardingHeaders/runtime/Uint8ClampedArray.h: Removed.
1714 * ForwardingHeaders/runtime/VM.h: Removed.
1715 * ForwardingHeaders/runtime/VMEntryScope.h: Removed.
1716 * ForwardingHeaders/runtime/Watchdog.h: Removed.
1717 * ForwardingHeaders/runtime/WeakGCMap.h: Removed.
1718 * ForwardingHeaders/runtime/WeakGCMapInlines.h: Removed.
1719 * ForwardingHeaders/runtime/WriteBarrier.h: Removed.
1720 * ForwardingHeaders/wasm/WasmModule.h: Removed.
1721 * ForwardingHeaders/wasm/js/JSWebAssemblyModule.h: Removed.
1722 * ForwardingHeaders/yarr/RegularExpression.h: Removed.
1723 * ForwardingHeaders/yarr/Yarr.h: Removed.
1724 * ForwardingHeaders/yarr/YarrInterpreter.h: Removed.
1725 * ForwardingHeaders/yarr/YarrJIT.h: Removed.
1726 * ForwardingHeaders/yarr/YarrPattern.h: Removed.
1727 * Modules/applepay/cocoa/PaymentMerchantSessionCocoa.mm:
1728 * Modules/encryptedmedia/MediaKeyMessageEvent.h:
1729 * Modules/encryptedmedia/MediaKeyMessageEventInit.h:
1730 * Modules/encryptedmedia/MediaKeyStatusMap.h:
1731 * Modules/encryptedmedia/legacy/LegacyCDM.h:
1732 * Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp:
1733 * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.cpp:
1734 * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.cpp:
1735 * Modules/encryptedmedia/legacy/WebKitMediaKeySession.h:
1736 * Modules/encryptedmedia/legacy/WebKitMediaKeys.h:
1737 * Modules/fetch/FetchBody.cpp:
1738 * Modules/fetch/FetchRequestInit.h:
1739 * Modules/fetch/FetchResponse.h:
1740 * Modules/indexeddb/IDBCursor.cpp:
1741 * Modules/indexeddb/IDBCursor.h:
1742 * Modules/indexeddb/IDBCursorWithValue.cpp:
1743 * Modules/indexeddb/IDBDatabase.cpp:
1744 * Modules/indexeddb/IDBIndex.cpp:
1745 * Modules/indexeddb/IDBKey.cpp:
1746 * Modules/indexeddb/IDBKeyRange.cpp:
1747 * Modules/indexeddb/IDBObjectStore.cpp:
1748 * Modules/indexeddb/IDBRequest.cpp:
1749 * Modules/indexeddb/IDBRequest.h:
1750 * Modules/indexeddb/client/TransactionOperation.cpp:
1751 * Modules/indexeddb/server/MemoryObjectStore.cpp:
1752 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1753 * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1754 * Modules/mediacontrols/MediaControlsHost.cpp:
1755 * Modules/mediasource/SourceBuffer.cpp:
1756 * Modules/mediastream/RTCDataChannel.cpp:
1757 * Modules/plugins/QuickTimePluginReplacement.mm:
1758 * Modules/webaudio/AsyncAudioDecoder.cpp:
1759 * Modules/webaudio/AudioBuffer.cpp:
1760 * Modules/webaudio/AudioBuffer.h:
1761 * Modules/webaudio/AudioContext.cpp:
1762 * Modules/webaudio/AudioContext.h:
1763 * Modules/webaudio/AudioParam.h:
1764 * Modules/webaudio/AudioParamTimeline.h:
1765 * Modules/webaudio/PeriodicWave.h:
1766 * Modules/webaudio/RealtimeAnalyser.cpp:
1767 * Modules/webaudio/RealtimeAnalyser.h:
1768 * Modules/webaudio/ScriptProcessorNode.cpp:
1769 * Modules/webaudio/WaveShaperProcessor.h:
1770 * Modules/webauthn/AuthenticatorResponse.h:
1771 * Modules/webauthn/PublicKeyCredential.h:
1772 * Modules/websockets/WebSocket.cpp:
1773 * Modules/websockets/WebSocketChannel.cpp:
1774 * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
1775 * Modules/webvr/VREyeParameters.h:
1776 * Modules/webvr/VRFrameData.h:
1777 * Modules/webvr/VRPose.h:
1778 * Modules/webvr/VRStageParameters.h:
1779 * PlatformWin.cmake:
1780 * bindings/IDLTypes.h:
1781 * bindings/js/BufferSource.h:
1782 * bindings/js/CachedScriptFetcher.h:
1783 * bindings/js/CachedScriptSourceProvider.h:
1784 * bindings/js/CallTracerTypes.h:
1785 * bindings/js/CommonVM.cpp:
1786 * bindings/js/DOMGCOutputConstraint.cpp:
1787 * bindings/js/DOMGCOutputConstraint.h:
1788 * bindings/js/GCController.cpp:
1789 * bindings/js/GCController.h:
1790 * bindings/js/IDBBindingUtilities.cpp:
1791 * bindings/js/JSCallbackData.cpp:
1792 * bindings/js/JSCallbackData.h:
1793 * bindings/js/JSCustomElementInterface.cpp:
1794 * bindings/js/JSCustomElementInterface.h:
1795 * bindings/js/JSCustomEventCustom.cpp:
1796 * bindings/js/JSCustomXPathNSResolver.cpp:
1797 * bindings/js/JSCustomXPathNSResolver.h:
1798 * bindings/js/JSDOMBinding.h:
1799 * bindings/js/JSDOMBuiltinConstructorBase.cpp:
1800 * bindings/js/JSDOMConstructorBase.cpp:
1801 * bindings/js/JSDOMConvertBase.h:
1802 * bindings/js/JSDOMConvertBufferSource.h:
1803 * bindings/js/JSDOMConvertDate.cpp:
1804 * bindings/js/JSDOMConvertInterface.h:
1805 * bindings/js/JSDOMConvertJSON.h:
1806 * bindings/js/JSDOMConvertNumbers.cpp:
1807 * bindings/js/JSDOMConvertNumbers.h:
1808 * bindings/js/JSDOMConvertObject.h:
1809 * bindings/js/JSDOMConvertRecord.h:
1810 * bindings/js/JSDOMConvertSequences.h:
1811 * bindings/js/JSDOMConvertStrings.cpp:
1812 * bindings/js/JSDOMConvertUnion.h:
1813 * bindings/js/JSDOMExceptionHandling.cpp:
1814 * bindings/js/JSDOMExceptionHandling.h:
1815 * bindings/js/JSDOMGlobalObject.cpp:
1816 * bindings/js/JSDOMGlobalObject.h:
1817 * bindings/js/JSDOMGlobalObjectTask.cpp:
1818 * bindings/js/JSDOMGuardedObject.h:
1819 * bindings/js/JSDOMIterator.cpp:
1820 * bindings/js/JSDOMIterator.h:
1821 * bindings/js/JSDOMMapLike.cpp:
1822 * bindings/js/JSDOMMapLike.h:
1823 * bindings/js/JSDOMPromise.cpp:
1824 * bindings/js/JSDOMPromise.h:
1825 * bindings/js/JSDOMPromiseDeferred.cpp:
1826 * bindings/js/JSDOMPromiseDeferred.h:
1827 * bindings/js/JSDOMWindowBase.cpp:
1828 * bindings/js/JSDOMWindowCustom.cpp:
1829 * bindings/js/JSDOMWindowProxy.cpp:
1830 * bindings/js/JSDOMWindowProxy.h:
1831 * bindings/js/JSDOMWrapper.cpp:
1832 * bindings/js/JSDOMWrapper.h:
1833 * bindings/js/JSDOMWrapperCache.cpp:
1834 * bindings/js/JSDOMWrapperCache.h:
1835 * bindings/js/JSDynamicDowncast.h:
1836 * bindings/js/JSErrorHandler.cpp:
1837 * bindings/js/JSEventCustom.cpp:
1838 * bindings/js/JSEventListener.cpp:
1839 * bindings/js/JSEventListener.h:
1840 * bindings/js/JSHTMLElementCustom.cpp:
1841 * bindings/js/JSHistoryCustom.cpp:
1842 * bindings/js/JSIDBCursorWithValueCustom.cpp:
1843 * bindings/js/JSIDBIndexCustom.cpp:
1844 * bindings/js/JSImageDataCustom.cpp:
1845 * bindings/js/JSLazyEventListener.cpp:
1846 * bindings/js/JSLocationCustom.cpp:
1847 * bindings/js/JSMainThreadExecState.h:
1848 * bindings/js/JSMainThreadExecStateInstrumentation.h:
1849 * bindings/js/JSMessageChannelCustom.cpp:
1850 * bindings/js/JSMessageEventCustom.cpp:
1851 * bindings/js/JSNodeIteratorCustom.cpp:
1852 * bindings/js/JSPopStateEventCustom.cpp:
1853 * bindings/js/JSReadableStreamPrivateConstructors.cpp:
1854 * bindings/js/JSTreeWalkerCustom.cpp:
1855 * bindings/js/JSWebGL2RenderingContextCustom.cpp:
1856 * bindings/js/JSWorkerGlobalScopeBase.cpp:
1857 * bindings/js/ReadableStreamDefaultController.cpp:
1858 * bindings/js/ReadableStreamDefaultController.h:
1859 * bindings/js/ScheduledAction.cpp:
1860 * bindings/js/ScheduledAction.h:
1861 * bindings/js/ScriptCachedFrameData.cpp:
1862 * bindings/js/ScriptCachedFrameData.h:
1863 * bindings/js/ScriptController.cpp:
1864 * bindings/js/ScriptController.h:
1865 * bindings/js/ScriptControllerMac.mm:
1866 * bindings/js/ScriptModuleLoader.cpp:
1867 * bindings/js/ScriptModuleLoader.h:
1868 * bindings/js/ScriptSourceCode.h:
1869 * bindings/js/ScriptState.cpp:
1870 * bindings/js/ScriptWrappable.h:
1871 * bindings/js/ScriptWrappableInlines.h:
1872 * bindings/js/SerializedScriptValue.cpp:
1873 * bindings/js/SerializedScriptValue.h:
1874 * bindings/js/StructuredClone.cpp:
1875 * bindings/js/WebCoreBuiltinNames.h:
1876 * bindings/js/WebCoreJSClientData.cpp:
1877 * bindings/js/WebCoreTypedArrayController.cpp:
1878 * bindings/js/WebCoreTypedArrayController.h:
1879 * bindings/js/WorkerScriptController.cpp:
1880 * bindings/js/WorkerScriptController.h:
1881 * bridge/NP_jsobject.cpp:
1882 * bridge/c/CRuntimeObject.cpp:
1883 * bridge/c/c_class.cpp:
1884 * bridge/c/c_instance.cpp:
1885 * bridge/c/c_runtime.cpp:
1886 * bridge/c/c_utility.cpp:
1887 * bridge/c/c_utility.h:
1888 * bridge/jsc/BridgeJSC.cpp:
1889 * bridge/jsc/BridgeJSC.h:
1890 * bridge/npruntime.cpp:
1891 * bridge/objc/ObjCRuntimeObject.mm:
1892 * bridge/objc/WebScriptObject.mm:
1893 * bridge/objc/WebScriptObjectPrivate.h:
1894 * bridge/objc/objc_instance.mm:
1895 * bridge/objc/objc_runtime.h:
1896 * bridge/objc/objc_runtime.mm:
1897 * bridge/objc/objc_utility.h:
1898 * bridge/objc/objc_utility.mm:
1899 * bridge/runtime_array.cpp:
1900 * bridge/runtime_array.h:
1901 * bridge/runtime_method.cpp:
1902 * bridge/runtime_method.h:
1903 * bridge/runtime_object.cpp:
1904 * bridge/runtime_object.h:
1905 * bridge/runtime_root.cpp:
1906 * bridge/runtime_root.h:
1907 * crypto/SubtleCrypto.cpp:
1908 * crypto/SubtleCrypto.h:
1909 * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
1910 * crypto/keys/CryptoRsaKeyAlgorithm.h:
1911 * crypto/mac/CryptoKeyRSAMac.cpp:
1912 * crypto/parameters/CryptoAlgorithmEcdsaParams.h:
1913 * crypto/parameters/CryptoAlgorithmHkdfParams.h:
1914 * crypto/parameters/CryptoAlgorithmHmacKeyParams.h:
1915 * crypto/parameters/CryptoAlgorithmPbkdf2Params.h:
1916 * crypto/parameters/CryptoAlgorithmRsaHashedImportParams.h:
1917 * crypto/parameters/CryptoAlgorithmRsaHashedKeyGenParams.h:
1918 * crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h:
1919 * css/CSSFontFaceSource.h:
1920 * css/DOMMatrixReadOnly.cpp:
1921 * css/DOMMatrixReadOnly.h:
1923 * dom/CustomElementReactionQueue.cpp:
1924 * dom/CustomElementRegistry.cpp:
1925 * dom/CustomEvent.cpp:
1926 * dom/CustomEvent.h:
1929 * dom/ErrorEvent.cpp:
1931 * dom/LoadableScript.h:
1932 * dom/MessageEvent.cpp:
1933 * dom/MessageEvent.h:
1934 * dom/ModuleFetchParameters.h:
1935 * dom/PopStateEvent.cpp:
1936 * dom/PopStateEvent.h:
1937 * dom/PromiseRejectionEvent.cpp:
1938 * dom/PromiseRejectionEvent.h:
1939 * dom/RejectedPromiseTracker.cpp:
1940 * dom/RejectedPromiseTracker.h:
1941 * dom/ScriptExecutionContext.cpp:
1942 * dom/ScriptExecutionContext.h:
1943 * dom/TextEncoder.cpp:
1944 * dom/TextEncoder.h:
1945 * domjit/DOMJITHelpers.h:
1946 * domjit/DOMJITIDLTypeFilter.h:
1947 * domjit/JSDocumentDOMJIT.cpp:
1948 * domjit/JSNodeDOMJIT.cpp:
1949 * fileapi/BlobBuilder.cpp:
1950 * fileapi/FileReader.cpp:
1951 * fileapi/FileReaderLoader.cpp:
1952 * fileapi/FileReaderSync.cpp:
1953 * html/BaseTextInputType.cpp:
1954 * html/EmailInputType.cpp:
1955 * html/HTMLAllCollection.cpp:
1956 * html/HTMLCanvasElement.cpp:
1957 * html/HTMLImageLoader.cpp:
1958 * html/HTMLMediaElement.cpp:
1959 * html/HTMLPlugInImageElement.cpp:
1960 * html/ImageData.cpp:
1962 * html/MediaEncryptedEventInit.h:
1963 * html/WebKitMediaKeyError.h:
1964 * html/canvas/WebGLAny.h:
1965 * html/canvas/WebGLRenderingContext.cpp:
1966 * html/canvas/WebGLRenderingContextBase.cpp:
1967 * html/canvas/WebGLRenderingContextBase.h:
1968 * html/canvas/WebGPUBuffer.cpp:
1969 * html/canvas/WebGPURenderingContext.cpp:
1970 * html/canvas/WebGPURenderingContext.h:
1971 * html/track/DataCue.cpp:
1972 * html/track/DataCue.h:
1973 * inspector/CommandLineAPIHost.cpp:
1974 * inspector/CommandLineAPIHost.h:
1975 * inspector/CommandLineAPIModule.cpp:
1976 * inspector/CommandLineAPIModule.h:
1977 * inspector/InspectorCanvas.cpp:
1978 * inspector/InspectorCanvas.h:
1979 * inspector/InspectorClient.cpp:
1980 * inspector/InspectorController.cpp:
1981 * inspector/InspectorController.h:
1982 * inspector/InspectorDatabaseResource.h:
1983 * inspector/InspectorFrontendClientLocal.cpp:
1984 * inspector/InspectorFrontendHost.cpp:
1985 * inspector/InspectorInstrumentation.cpp:
1986 * inspector/InspectorInstrumentation.h:
1987 * inspector/InspectorOverlay.cpp:
1988 * inspector/InspectorOverlay.h:
1989 * inspector/InspectorShaderProgram.cpp:
1990 * inspector/InspectorShaderProgram.h:
1991 * inspector/InspectorStyleSheet.cpp:
1992 * inspector/InspectorStyleSheet.h:
1993 * inspector/InspectorWebAgentBase.h:
1994 * inspector/InstrumentingAgents.h:
1995 * inspector/PageScriptDebugServer.cpp:
1996 * inspector/PageScriptDebugServer.h:
1997 * inspector/TimelineRecordFactory.cpp:
1998 * inspector/WebInjectedScriptHost.h:
1999 * inspector/WebInjectedScriptManager.h:
2000 * inspector/WorkerInspectorController.cpp:
2001 * inspector/WorkerInspectorController.h:
2002 * inspector/WorkerScriptDebugServer.cpp:
2003 * inspector/WorkerScriptDebugServer.h:
2004 * inspector/WorkerToPageFrontendChannel.h:
2005 * inspector/agents/InspectorApplicationCacheAgent.h:
2006 * inspector/agents/InspectorCSSAgent.cpp:
2007 * inspector/agents/InspectorCSSAgent.h:
2008 * inspector/agents/InspectorCanvasAgent.cpp:
2009 * inspector/agents/InspectorCanvasAgent.h:
2010 * inspector/agents/InspectorDOMAgent.cpp:
2011 * inspector/agents/InspectorDOMAgent.h:
2012 * inspector/agents/InspectorDOMDebuggerAgent.cpp:
2013 * inspector/agents/InspectorDOMDebuggerAgent.h:
2014 * inspector/agents/InspectorDOMStorageAgent.cpp:
2015 * inspector/agents/InspectorDOMStorageAgent.h:
2016 * inspector/agents/InspectorDatabaseAgent.cpp:
2017 * inspector/agents/InspectorDatabaseAgent.h:
2018 * inspector/agents/InspectorIndexedDBAgent.cpp:
2019 * inspector/agents/InspectorIndexedDBAgent.h:
2020 * inspector/agents/InspectorLayerTreeAgent.cpp:
2021 * inspector/agents/InspectorLayerTreeAgent.h:
2022 * inspector/agents/InspectorMemoryAgent.cpp:
2023 * inspector/agents/InspectorMemoryAgent.h:
2024 * inspector/agents/InspectorNetworkAgent.cpp:
2025 * inspector/agents/InspectorNetworkAgent.h:
2026 * inspector/agents/InspectorPageAgent.cpp:
2027 * inspector/agents/InspectorPageAgent.h:
2028 * inspector/agents/InspectorTimelineAgent.cpp:
2029 * inspector/agents/InspectorTimelineAgent.h:
2030 * inspector/agents/InspectorWorkerAgent.h:
2031 * inspector/agents/WebConsoleAgent.cpp:
2032 * inspector/agents/WebConsoleAgent.h:
2033 * inspector/agents/WebDebuggerAgent.h:
2034 * inspector/agents/WebHeapAgent.h:
2035 * inspector/agents/page/PageDebuggerAgent.cpp:
2036 * inspector/agents/page/PageRuntimeAgent.cpp:
2037 * inspector/agents/page/PageRuntimeAgent.h:
2038 * inspector/agents/worker/ServiceWorkerAgent.h:
2039 * inspector/agents/worker/WorkerDebuggerAgent.cpp:
2040 * inspector/agents/worker/WorkerRuntimeAgent.cpp:
2041 * inspector/agents/worker/WorkerRuntimeAgent.h:
2042 * loader/EmptyClients.cpp:
2043 * page/CaptionUserPreferences.cpp:
2045 * page/ChromeClient.h:
2047 * page/DOMWindow.cpp:
2050 * page/OriginThreadLocalCache.h:
2051 * page/PageConsoleClient.cpp:
2052 * page/PageConsoleClient.h:
2053 * page/PageDebuggable.cpp:
2054 * page/PageGroup.cpp:
2055 * page/SettingsBase.h:
2056 * page/UserContentController.cpp:
2057 * page/cocoa/ResourceUsageThreadCocoa.mm:
2058 * page/csp/ContentSecurityPolicy.cpp:
2059 * page/ios/FrameIOS.mm:
2060 * page/linux/ResourceUsageOverlayLinux.cpp:
2061 * page/linux/ResourceUsageThreadLinux.cpp:
2062 * platform/MediaSample.h:
2063 * platform/SerializedPlatformRepresentation.h:
2064 * platform/SharedBuffer.h:
2065 * platform/audio/mac/CARingBuffer.h:
2066 * platform/cocoa/SharedBufferCocoa.mm:
2067 * platform/graphics/ImageBuffer.h:
2068 * platform/graphics/LegacyCDMSession.h:
2069 * platform/graphics/MediaPlayer.h:
2070 * platform/graphics/avfoundation/CDMFairPlayStreaming.cpp:
2071 * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
2072 * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
2073 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2074 * platform/graphics/avfoundation/MediaSampleAVFObjC.h:
2075 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2076 * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
2077 * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
2078 * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
2079 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2080 * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
2081 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2082 * platform/graphics/cairo/ImageBufferCairo.cpp:
2083 * platform/graphics/cg/ImageBufferDataCG.cpp:
2084 * platform/graphics/cg/ImageBufferDataCG.h:
2085 * platform/graphics/cocoa/GPUDeviceMetal.mm:
2086 * platform/graphics/filters/FEBlend.cpp:
2087 * platform/graphics/filters/FEColorMatrix.cpp:
2088 * platform/graphics/filters/FEComponentTransfer.cpp:
2089 * platform/graphics/filters/FEComposite.cpp:
2090 * platform/graphics/filters/FEConvolveMatrix.cpp:
2091 * platform/graphics/filters/FEDisplacementMap.cpp:
2092 * platform/graphics/filters/FEDropShadow.cpp:
2093 * platform/graphics/filters/FEGaussianBlur.cpp:
2094 * platform/graphics/filters/FELighting.h:
2095 * platform/graphics/filters/FEMorphology.cpp:
2096 * platform/graphics/filters/FETurbulence.cpp:
2097 * platform/graphics/filters/FilterEffect.cpp:
2098 * platform/graphics/filters/FilterEffect.h:
2099 * platform/graphics/gpu/GPUBuffer.h:
2100 * platform/graphics/gpu/GPUDevice.h:
2101 * platform/graphics/iso/ISOBox.cpp:
2102 * platform/graphics/iso/ISOOriginalFormatBox.cpp:
2103 * platform/graphics/iso/ISOProtectionSchemeInfoBox.cpp:
2104 * platform/graphics/iso/ISOSchemeInformationBox.cpp:
2105 * platform/graphics/iso/ISOSchemeTypeBox.cpp:
2106 * platform/graphics/iso/ISOTrackEncryptionBox.cpp:
2107 * platform/graphics/iso/ISOVTTCue.cpp:
2108 * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2109 * platform/graphics/win/ImageBufferDataDirect2D.cpp:
2110 * platform/graphics/win/ImageBufferDataDirect2D.h:
2111 * platform/ios/wak/WebCoreThread.mm:
2112 * platform/mac/SerializedPlatformRepresentationMac.mm:
2113 * platform/mac/StringUtilities.mm:
2114 * platform/mock/mediasource/MockBox.cpp:
2115 * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
2116 * svg/graphics/SVGImage.cpp:
2117 * testing/GCObservation.cpp:
2118 * testing/GCObservation.h:
2119 * testing/Internals.cpp:
2120 * testing/Internals.h:
2121 * testing/LegacyMockCDM.cpp:
2122 * testing/MockCDMFactory.cpp:
2123 * testing/js/WebCoreTestSupport.cpp:
2124 * workers/Worker.cpp:
2126 * workers/WorkerConsoleClient.cpp:
2127 * workers/WorkerConsoleClient.h:
2128 * workers/WorkerGlobalScope.cpp:
2129 * workers/WorkerGlobalScope.h:
2130 * workers/WorkerGlobalScopeProxy.h:
2131 * workers/WorkerInspectorProxy.cpp:
2132 * workers/WorkerMessagingProxy.cpp:
2133 * workers/WorkerThread.h:
2134 * workers/service/ExtendableEvent.cpp:
2135 * workers/service/ServiceWorker.cpp:
2136 * workers/service/ServiceWorker.h:
2137 * workers/service/ServiceWorkerClient.h:
2138 * workers/service/context/ServiceWorkerInspectorProxy.cpp:
2139 * workers/service/context/ServiceWorkerThread.cpp:
2140 * xml/XMLHttpRequest.cpp:
2142 2018-02-06 Said Abou-Hallawa <sabouhallawa@apple.com>
2144 Rendering SVG images with same size as WebGL texture doesn't work correctly
2145 https://bugs.webkit.org/show_bug.cgi?id=182367
2147 Reviewed by Dean Jackson.
2149 If am image buffer is created for a webgl texture and then it is reused
2150 for another texture, it has to be cleared before drawing.
2152 Test: webgl/webgl-texture-image-buffer-reuse.html
2154 * html/canvas/WebGLRenderingContextBase.cpp:
2155 (WebCore::WebGLRenderingContextBase::LRUImageBufferCache::imageBuffer):
2157 2018-02-06 Youenn Fablet <youenn@apple.com>
2159 Use downcast in createLinkPreloadResourceClient
2160 https://bugs.webkit.org/show_bug.cgi?id=182488
2162 Reviewed by Antti Koivisto.
2164 No observable change of behavior.
2165 Add a new link preloader client for text track.
2167 * loader/LinkLoader.cpp:
2168 (WebCore::createLinkPreloadResourceClient):
2169 * loader/LinkPreloadResourceClients.h:
2171 2018-02-06 Youenn Fablet <youenn@apple.com>
2173 imported/w3c/web-platform-tests/service-workers/service-worker/fetch-event-respond-with-response-body-with-invalid-chunk.https.html is flaky
2174 https://bugs.webkit.org/show_bug.cgi?id=182541
2176 Reviewed by Chris Dumez.
2178 Covered by test being no longer flaky.
2179 In case of loading error when getting the response body, we were only reporting
2180 the error if there was a callback set or a ReadableStream already created.
2181 Otherwise, we were just stopping loading and if creating a ReadableStream, we were just returning an empty body.
2183 FetchBodyOwner now stores a loading error.
2184 In case a readable stream is created, it will error it if there is a loading error.
2185 If there is not and the loading failed later on, the stream will be errored using the current code path.
2187 * Modules/cache/DOMCache.cpp:
2188 (WebCore::DOMCache::put):
2189 * Modules/fetch/FetchResponse.cpp:
2190 (WebCore::FetchResponse::clone):
2191 (WebCore::FetchResponse::BodyLoader::didFail):
2192 * Modules/fetch/FetchResponse.h:
2193 * workers/service/context/ServiceWorkerFetch.cpp:
2194 (WebCore::ServiceWorkerFetch::processResponse):
2196 2018-02-06 Andy Estes <aestes@apple.com>
2198 [Payment Request] show() should take an optional PaymentDetailsUpdate promise
2199 https://bugs.webkit.org/show_bug.cgi?id=182538
2200 <rdar://problem/36754552>
2202 Reviewed by Tim Horton.
2204 Taught show() to take an optional promise for a PaymentDetailsUpdate.
2206 Added test cases to http/tests/paymentrequest/payment-request-show-method.https.html.
2208 * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
2209 (WebCore::ApplePayPaymentHandler::detailsUpdated):
2211 Changed to take a PaymentRequest::UpdateReason instead of a eventType string.
2213 (WebCore::ApplePayPaymentHandler::shippingAddressUpdated):
2214 (WebCore::ApplePayPaymentHandler::shippingOptionUpdated):
2215 (WebCore::ApplePayPaymentHandler::paymentMethodUpdated):
2216 (WebCore::ApplePayPaymentHandler::didAuthorizePayment):
2217 (WebCore::ApplePayPaymentHandler::didSelectShippingMethod):
2218 (WebCore::ApplePayPaymentHandler::didSelectShippingContact):
2219 (WebCore::ApplePayPaymentHandler::didSelectPaymentMethod):
2221 Asserted that only one of the PaymentSession delegates is executing at a time.
2223 * Modules/applepay/paymentrequest/ApplePayPaymentHandler.h:
2224 * Modules/paymentrequest/PaymentHandler.h:
2226 Changed detailsUpdated to take a PaymentRequest::UpdateReason instead of a eventType string.
2228 * Modules/paymentrequest/PaymentRequest.cpp:
2229 (WebCore::PaymentRequest::show):
2231 If there is a details promise, call updateWith() with UpdateReason::ShowDetailsResolved.
2233 (WebCore::PaymentRequest::shippingAddressChanged):
2234 (WebCore::PaymentRequest::shippingOptionChanged):
2235 (WebCore::PaymentRequest::paymentMethodChanged):
2237 Used whenDetailsSettled() to ensure that update events do not start before the show()
2238 details promise settles.
2240 (WebCore::PaymentRequest::updateWith):
2241 (WebCore::PaymentRequest::settleDetailsPromise):
2243 Changed to use a PaymentRequest::UpdateReason instead of a eventType string.
2245 (WebCore::PaymentRequest::whenDetailsSettled):
2247 If there is a details promise, wait for it to settle before executing the callback.
2249 * Modules/paymentrequest/PaymentRequest.h:
2251 Defined enum class UpdateReason.
2253 * Modules/paymentrequest/PaymentRequest.idl:
2255 Updated show() to take an optional Promise<PaymentDetailsUpdate>.
2257 * Modules/paymentrequest/PaymentRequestUpdateEvent.cpp:
2258 (WebCore::PaymentRequestUpdateEvent::updateWith):
2260 Map the event type to a PaymentRequest::UpdateReason.
2262 2018-02-06 Dean Jackson <dino@apple.com>
2264 REGRESSION: WebGL no longer producing a transparent canvas on iOS
2265 https://bugs.webkit.org/show_bug.cgi?id=182550
2266 <rdar://problem/37234491>
2268 Reviewed by Eric Carlson.
2270 Due to some weirdness GL_RGBA8 is sometimes different between iOS and
2271 other platforms. Only tell the WebGLLayer that it is opaque when it really
2274 Covered by existing test: fast/canvas/webgl/context-attributes-alpha
2276 * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
2277 (WebCore::GraphicsContext3D::setRenderbufferStorageFromDrawable): Look at the context
2278 attributes to decide if we should use an opaque layer.
2279 * platform/graphics/cocoa/WebGLLayer.mm: Ditto.
2280 (-[WebGLLayer initWithGraphicsContext3D:]):
2282 2018-02-06 Andy Estes <aestes@apple.com>
2284 [WebIDL] Support optional Promise arguments
2285 https://bugs.webkit.org/show_bug.cgi?id=182399
2286 <rdar://problem/36754552>
2288 Reviewed by Sam Weinig and Chris Dumez.
2290 Previously, declaring a Promise argument as optional would result in a native type of
2291 std::optional<RefPtr<DOMPromise>>. This is wasteful, since RefPtr can represent an optional
2292 argument by storing nullptr. Further, PassArgumentExpression() assumed Promises were never
2293 optional and tried to pass the argument as a Ref by calling RefPtr::releaseNonNull().
2295 This patch removes the std::optional wrapper around optional Promises and simply passes the
2296 promise as a RefPtr to native code.
2298 * bindings/scripts/CodeGeneratorJS.pm:
2299 (PassArgumentExpression):
2300 (GenerateParametersCheck):
2301 * bindings/scripts/test/JS/JSTestObj.cpp:
2302 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalPromiseBody):
2303 (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalPromise):
2304 * bindings/scripts/test/TestObj.idl:
2306 2018-02-06 Youenn Fablet <youenn@apple.com>
2308 HasServiceWorkerRegistration bit should be sent when creating a new page
2309 https://bugs.webkit.org/show_bug.cgi?id=182410
2311 Reviewed by Chris Dumez.
2313 Covered by new API test.
2315 Changed the default value of service workers being registered to false.
2316 Every page created in the process will be responsible to change the value to true,
2317 at which time the value will be kept to true for the lifetime of the process.
2319 * workers/service/ServiceWorkerProvider.h:
2321 2018-02-06 Ross Kirsling <ross.kirsling@sony.com>
2323 Add missing #if ENABLE(VIDEO) after r228092.
2324 https://bugs.webkit.org/show_bug.cgi?id=182539
2326 Reviewed by Michael Catanzaro.
2328 * html/ImageBitmap.cpp:
2330 2018-02-06 Antoine Quint <graouts@apple.com>
2332 [Modern Media Controls] Test at media/modern-media-controls/tracks-panel/tracks-panel-controls-bar-remains-visible-after-clicking-over-it.html fails
2333 https://bugs.webkit.org/show_bug.cgi?id=182425
2335 Reviewed by Dean Jackson.
2337 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
2338 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
2339 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
2340 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
2341 controls bar rather than the controls bar itself, which can thus still hit test.
2343 * Modules/modern-media-controls/controls/media-controls.css:
2344 (.media-controls.shows-tracks-panel > .controls-bar > *,):
2345 (.media-controls.shows-tracks-panel > .controls-bar,): Deleted.
2347 2018-02-06 Chris Dumez <cdumez@apple.com>
2349 Service workers registrations are saved to disk before the install / activation succeeds
2350 https://bugs.webkit.org/show_bug.cgi?id=182535
2351 <rdar://problem/36591485>
2353 Reviewed by Youenn Fablet.
2355 Service workers registrations are saved to disk before the install / activation succeeds.
2356 This means if the browser exits before the install / activation succeeds, we may restore
2357 from disk a registration with an “active” worker which may have never been installed /
2360 To address the issue, we now delay saving the registration to disk until after the service
2361 worker has been activated.
2363 No new tests, restoration from disk is covered by API tests that still pass.
2365 * workers/service/server/SWServer.cpp:
2366 (WebCore::SWServer::didFinishActivation):
2367 (WebCore::SWServer::installContextData):
2369 2018-02-06 Ms2ger <Ms2ger@igalia.com>
2371 Initialize ImageBitmap::m_bitmapData in the constructor.
2372 https://bugs.webkit.org/show_bug.cgi?id=182487
2374 Reviewed by Sam Weinig.
2376 This removes the span of time where an ImageBitmap object would exist
2377 with a null m_bitmapData during its construction.
2379 No new tests: no behavior changes.
2381 * html/ImageBitmap.cpp:
2382 (WebCore::ImageBitmap::create): update signature
2383 (WebCore::ImageBitmap::createPromise): update callers
2384 (WebCore::ImageBitmap::ImageBitmap): update signature
2385 * html/ImageBitmap.h: update signatures
2387 2018-02-05 Ryosuke Niwa <rniwa@webkit.org>
2389 Release assertion in inlineVideoFrame
2390 https://bugs.webkit.org/show_bug.cgi?id=182513
2391 <rdar://problem/37159363>
2393 Reviewed by Zalan Bujtas.
2395 The bug was caused by the fact it's not always safe to invoke updateLayout even when isSafeToUpdateStyleOrLayout
2396 on a document of a flattened frame on iOS. isSafeToUpdateStyleOrLayout returns true when the frame view is in
2397 the frame-flattening mode to avoid hitting a release asssertion in updateLayout of the frame. However, it's still
2398 not safe to invoke updateLayout on a parent frame in this case.
2400 As a result, inlineVideoFrame (in Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm) invokes updateLayout
2401 even when the top-level document is not safe to update when the video element is in a frame-flattened document.
2403 Fixed this bug by explicitly checking that we still have a live render tree and document hasn't been stopped.
2404 Also replaced other uses of isSafeToUpdateStyleOrLayout by more explicit checks.
2406 * accessibility/AccessibilityObject.cpp:
2407 (WebCore::AccessibilityObject::updateBackingStore): Made the early exit condition added in r227006 more explicit.
2408 Namely, InspectorDOMAgent::pseudoElementCreated is invoked during style recalc.
2410 (WebCore::isSafeToUpdateStyleOrLayout): Made this local to the file.
2411 (WebCore::Document::updateStyleIfNeeded):
2412 (WebCore::Document::updateLayout):
2414 * html/MediaElementSession.cpp:
2415 (WebCore::isMainContentForPurposesOfAutoplay): Made the early exit condition added in r227529 more explicit. Don't
2416 update the layout when the render tree had been destroyed or the active DOM objects had been stopped.
2418 2018-02-05 Youenn Fablet <youenn@apple.com>
2420 Crash in imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-origin.sub.html
2421 https://bugs.webkit.org/show_bug.cgi?id=182422
2422 <rdar://problem/37182665>
2424 Reviewed by Alex Christensen.
2426 Covered by test no longer crashing in Debug mode.
2427 Make sure completionHandler is called on the main thread.
2429 * platform/network/cocoa/WebCoreNSURLSession.mm:
2430 (-[WebCoreNSURLSessionDataTask resource:receivedRedirect:request:completionHandler:]):
2432 2018-02-05 Filip Pizlo <fpizlo@apple.com>
2434 Global objects should be able to use TLCs to allocate from different blocks from each other
2435 https://bugs.webkit.org/show_bug.cgi?id=182227
2437 Reviewed by Daniel Bates and Chris Dumez.
2439 No new tests because no change in behavior.
2441 Adopt JSC TLC API to put distance between objects from different security origins. WebCore has
2442 a subclass of ThreadLocalCache that supports hash-consing based on the relevant origin data
2443 using the existing SecurityOriginHash. It's Document's job to initiate this, but all of the
2444 logic is in WebCore::OriginThreadLocalCache.
2446 Workers don't opt into this. They just get the VM's default TLC all the time.
2448 * ForwardingHeaders/heap/ThreadLocalCache.h: Added.
2450 * WebCore.xcodeproj/project.pbxproj:
2451 * bindings/js/JSDOMGlobalObject.cpp:
2452 (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
2453 * bindings/js/JSDOMGlobalObject.h:
2454 * bindings/js/JSDOMWindowBase.cpp:
2455 (WebCore::JSDOMWindowBase::JSDOMWindowBase):
2457 (WebCore::Document::initSecurityContext):
2458 (WebCore::Document::threadLocalCache):
2460 * page/OriginThreadLocalCache.cpp: Added.
2461 (WebCore::threadLocalCacheMap):
2462 (WebCore::OriginThreadLocalCache::create):
2463 (WebCore::OriginThreadLocalCache::~OriginThreadLocalCache):
2464 (WebCore::OriginThreadLocalCache::OriginThreadLocalCache):
2465 * page/OriginThreadLocalCache.h: Added.
2466 * page/SecurityOrigin.cpp:
2467 (WebCore::SecurityOrigin::passesFileCheck const):
2468 (WebCore::SecurityOrigin::setEnforcesFilePathSeparation):
2469 (WebCore::SecurityOrigin::toString const):
2470 (WebCore::SecurityOrigin::enforceFilePathSeparation): Deleted.
2471 * page/SecurityOrigin.h:
2472 (WebCore::SecurityOrigin::enforcesFilePathSeparation const):
2474 2018-02-05 Per Arne Vollan <pvollan@apple.com>
2476 [Win] Release assert failed under NetworkStateNotifier::singleton.
2477 https://bugs.webkit.org/show_bug.cgi?id=182516
2479 Reviewed by Brent Fulgham.
2481 The callback NetworkStateNotifier::addressChangeCallback will always be called on a
2482 worker thread on Windows. Since the method NetworkStateNotifier::singleton() is
2483 called by NetworkStateNotifier::addressChangeCallback, but has to be called on the
2484 on the main thread, the call has to be moved there.
2486 No new tests. I have not been able to reproduce the crash.
2488 * platform/network/win/NetworkStateNotifierWin.cpp:
2489 (WebCore::NetworkStateNotifier::addressChangeCallback):
2491 2018-02-05 Don Olmstead <don.olmstead@sony.com>
2493 Abstract heap generator should include JavaScriptCore headers directly
2494 https://bugs.webkit.org/show_bug.cgi?id=182501
2496 Reviewed by Alex Christensen.
2498 No new tests. No change in behavior.
2500 * domjit/generate-abstract-heap.rb:
2502 2018-02-05 Wenson Hsieh <wenson_hsieh@apple.com>
2504 [Extra zoom mode] Implement number pad UI when editing `tel` and `number` inputs
2505 https://bugs.webkit.org/show_bug.cgi?id=182472
2506 <rdar://problem/35143057>
2508 Reviewed by Tim Horton.
2510 Adds a localized string for the "Done" button text in extra zoomed form controls.
2512 * English.lproj/Localizable.strings:
2513 * platform/LocalizedStrings.cpp:
2514 (WebCore::formControlDoneButtonTitle):
2515 * platform/LocalizedStrings.h:
2517 2018-02-05 John Wilander <wilander@apple.com>
2519 Build fix for r228115, simple naming issue succeeded —> success.
2520 https://bugs.webkit.org/show_bug.cgi?id=182507
2521 <rdar://problem/37248566>
2523 Reviewed by Eric Carlson.
2525 No new tests. Build fix.
2527 * platform/ios/VideoFullscreenInterfaceAVKit.mm:
2528 (VideoFullscreenInterfaceAVKit::enterFullscreenHandler):
2529 succeeded —> success
2531 2018-02-05 Matt Lewis <jlewis3@apple.com>
2533 Unreviewed, rolling out r228086.
2535 This introduced a failure with API test
2536 URLTest.HostIsIPAddress.
2540 "Add a way to check if a host is an IP address"
2541 https://bugs.webkit.org/show_bug.cgi?id=182427
2542 https://trac.webkit.org/changeset/228086
2544 2018-02-05 Matt Lewis <jlewis3@apple.com>
2546 Unreviewed, rolling out r228103.
2548 This caused multiple tests to crash.
2552 "Use downcast in createLinkPreloadResourceClient"
2553 https://bugs.webkit.org/show_bug.cgi?id=182488
2554 https://trac.webkit.org/changeset/228103
2556 2018-02-05 Eric Carlson <eric.carlson@apple.com>
2558 [iOS] VideoFullscreenInterfaceAVKit should not ignore errors
2559 https://bugs.webkit.org/show_bug.cgi?id=182497
2560 <rdar://problem/36986898>
2562 Reviewed by Jer Noble.
2564 Always call layoutIfNeeded before calling -[AVPlayerViewController enterFullScreenAnimated:completionHandler]
2565 or -[AVPlayerViewController exitFullScreenAnimated:completionHandler] because they both fail
2566 if the view needs layout. Also don't ignore errors returned by those calls.
2568 No new tests, the failure is non deterministic and I was not able to reproduce in a test.
2570 * platform/ios/VideoFullscreenInterfaceAVKit.mm:
2571 (VideoFullscreenInterfaceAVKit::applicationDidBecomeActive):
2572 (VideoFullscreenInterfaceAVKit::enterFullscreenStandard):
2573 (VideoFullscreenInterfaceAVKit::exitFullscreen):
2574 (VideoFullscreenInterfaceAVKit::cleanupFullscreen):
2575 (VideoFullscreenInterfaceAVKit::didStartPictureInPicture):
2576 (VideoFullscreenInterfaceAVKit::prepareForPictureInPictureStopWithCompletionHandler):
2577 (VideoFullscreenInterfaceAVKit::doEnterFullscreen):
2578 (VideoFullscreenInterfaceAVKit::exitFullscreenHandler):
2579 (VideoFullscreenInterfaceAVKit::enterFullscreenHandler):
2581 2018-02-05 Daniel Bates <dabates@apple.com>
2583 REGRESSION (r222795): Nike app "Refused to set unsafe header" when adding and viewing cart
2584 https://bugs.webkit.org/show_bug.cgi?id=182491
2585 <rdar://problem/36533447>
2587 Reviewed by Brent Fulgham.
2589 Exempt Nike from the XHR header restrictions in r222795.
2591 Following r222795 only Dashboard widgets are allowed to set arbitrary XHR headers.
2592 However Nike also depends on such functionality.
2594 * platform/RuntimeApplicationChecks.h:
2595 * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
2596 (WebCore::IOSApplication::isNike):
2598 2018-02-02 Brent Fulgham <bfulgham@apple.com>
2600 Improve NetworkResourceLoader logging so it can be used for 'setCookiesFromDOM'
2601 https://bugs.webkit.org/show_bug.cgi?id=182455
2602 <rdar://problem/36626601>
2604 Reviewed by Chris Dumez.
2606 After this refactoring, a convenience method I added in r227860 is no longer needed.
2607 This patch removes this dead code.
2609 * platform/network/NetworkStorageSession.h: Export 'cookieStoragePartition' so it can
2611 * platform/network/cf/NetworkStorageSessionCFNet.cpp:
2612 (WebCore::NetworkStorageSession::hasStorageAccessForFrame): Deleted unused method.
2614 2018-02-05 Antti Koivisto <antti@apple.com>
2616 Make ASSERT_WITH_SECURITY_IMPLICATION in CachedResourceClientWalker::next a release assert
2617 https://bugs.webkit.org/show_bug.cgi?id=182492
2619 Reviewed by Youenn Fablet.
2621 * loader/cache/CachedResourceClientWalker.h:
2622 (WebCore::CachedResourceClientWalker::next):
2624 2018-02-05 John Wilander <wilander@apple.com>
2626 Storage Access API: Add testRunner.getAllStorageAccessEntries() to make testing easier and more explicit
2627 https://bugs.webkit.org/show_bug.cgi?id=181601
2628 <rdar://problem/36475837>
2630 Reviewed by Alex Christensen.
2632 No new tests. Existing test updated.
2634 http/tests/storageAccess/request-and-grant-access-then-detach-should-not-have-access.html
2635 was found to be flaky. With the testRunner.hasStorageAccessEntry() getter
2636 it's possible to check access even if a frame doesn't respond timely to
2637 postMessage after detach and attach.
2639 * platform/network/NetworkStorageSession.h:
2640 * platform/network/cf/NetworkStorageSessionCFNet.cpp:
2641 (WebCore::NetworkStorageSession::getAllStorageAccessEntries const):
2643 2018-02-05 Youenn Fablet <youenn@apple.com>
2645 Use downcast in createLinkPreloadResourceClient
2646 https://bugs.webkit.org/show_bug.cgi?id=182488
2648 Reviewed by Antti Koivisto.
2650 No observable change of behavior.
2652 * loader/LinkLoader.cpp:
2653 (WebCore::createLinkPreloadResourceClient):
2655 2018-02-05 Chris Dumez <cdumez@apple.com>
2657 Layout Test imported/w3c/web-platform-tests/service-workers/service-worker/register-same-scope-different-script-url.https.html is flaky
2658 https://bugs.webkit.org/show_bug.cgi?id=181166
2659 <rdar://problem/37169508>
2661 Reviewed by Youenn Fablet.
2663 I found out that this test was flakily timing out because our jobQueues would sometimes get stuck
2664 when their current job's connection or service worker (when scheduled by a service worker) would
2665 go away before the job is complete.
2667 This patch makes our job queues operation more robust by:
2668 1. Cancelling all jobs from a given connection when a SWServerConnection goes away
2669 2. Cancelling all jobs from a given service worker when a service worker gets terminated
2671 We also make sure service workers created by a job get properly terminated when a job
2672 is canceled to avoid leaving service workers in limbo.
2674 No new tests, unskipped existing flaky test.
2676 * workers/service/ServiceWorkerContainer.cpp:
2677 (WebCore::ServiceWorkerContainer::addRegistration):
2678 (WebCore::ServiceWorkerContainer::removeRegistration):
2679 (WebCore::ServiceWorkerContainer::updateRegistration):
2680 * workers/service/ServiceWorkerJobData.cpp:
2681 (WebCore::ServiceWorkerJobData::ServiceWorkerJobData):
2682 (WebCore::ServiceWorkerJobData::isolatedCopy const):
2683 * workers/service/ServiceWorkerJobData.h:
2684 (WebCore::ServiceWorkerJobData::encode const):
2685 (WebCore::ServiceWorkerJobData::decode):
2686 * workers/service/server/SWServer.cpp:
2687 (WebCore::SWServer::startScriptFetch):
2688 (WebCore::SWServer::scriptContextFailedToStart):
2689 (WebCore::SWServer::scriptContextStarted):
2690 (WebCore::SWServer::terminatePreinstallationWorker):
2691 (WebCore::SWServer::installContextData):
2692 (WebCore::SWServer::workerContextTerminated):
2693 (WebCore::SWServer::unregisterConnection):
2694 * workers/service/server/SWServer.h:
2695 * workers/service/server/SWServerJobQueue.cpp:
2696 (WebCore::SWServerJobQueue::removeAllJobsMatching):
2697 (WebCore::SWServerJobQueue::cancelJobsFromConnection):
2698 (WebCore::SWServerJobQueue::cancelJobsFromServiceWorker):
2699 * workers/service/server/SWServerJobQueue.h:
2700 * workers/service/server/SWServerRegistration.cpp:
2701 (WebCore::SWServerRegistration::setPreInstallationWorker):
2703 2018-02-05 Antti Koivisto <antti@apple.com>
2705 Crash on sfgate.com because mismatching link preload types
2706 https://bugs.webkit.org/show_bug.cgi?id=182483
2707 <rdar://problem/37065331>
2709 Reviewed by Daniel Bates.
2711 Preloading the same URL with different 'as' types causes some confusion.
2713 Test: http/tests/preload/link-preload-type-mismatch.html
2715 * loader/LinkLoader.cpp:
2716 (WebCore::createLinkPreloadResourceClient):
2718 Ensure we use the actual resource type when creating the client.
2720 (WebCore::LinkLoader::preloadIfNeeded):
2722 Don't construct client if the types don't match. This can happen if there is an existing
2723 preload for the same resource with different type.
2725 2018-02-05 Manuel Rego Casasnovas <rego@igalia.com>
2727 [css-grid] Rename gutter properties to remove "grid-" prefix
2728 https://bugs.webkit.org/show_bug.cgi?id=180290
2730 Reviewed by Javier Fernandez.
2732 This patch applies the resoultion of the CSS WG to unprefix
2733 the CSS Grid Layout gutter properties:
2734 https://github.com/w3c/csswg-drafts/issues/1696
2736 column-gap already existed before, as it's part of Multicol.
2737 The patch adds the new properties row-gap and gap, and keep the legacy ones
2739 - grid-column-gap => column-gap
2740 - grid-row-gap => row-gap
2743 As column-gap was already animatable, this change takes advantage
2744 to make animatable row-gap too.
2746 Tests: imported/w3c/web-platform-tests/css/css-align/gaps/
2748 * css/CSSComputedStyleDeclaration.cpp:
2749 (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
2750 * css/CSSProperties.json:
2751 * css/StyleProperties.cpp:
2752 * css/parser/CSSParserFastPaths.cpp:
2753 (WebCore::isSimpleLengthPropertyID):
2754 * css/parser/CSSPropertyParser.cpp:
2755 (WebCore::CSSPropertyParser::parseSingleValue):
2756 (WebCore::CSSPropertyParser::parseShorthand):
2757 * page/animation/CSSPropertyAnimation.cpp:
2758 (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
2759 * rendering/RenderGrid.cpp:
2760 (WebCore::RenderGrid::availableSpaceForGutters const):
2761 (WebCore::RenderGrid::gridGap const):
2762 * rendering/style/RenderStyle.h:
2763 (WebCore::RenderStyle::gridAutoRows const):
2764 (WebCore::RenderStyle::columnGap const):
2765 (WebCore::RenderStyle::rowGap const):
2766 (WebCore::RenderStyle::setGridItemRowEnd):
2767 (WebCore::RenderStyle::setColumnGap):
2768 (WebCore::RenderStyle::setRowGap):
2769 (WebCore::RenderStyle::initialRowGap):
2770 * rendering/style/StyleGridData.cpp:
2771 (WebCore::StyleGridData::StyleGridData):
2772 * rendering/style/StyleGridData.h:
2773 (WebCore::StyleGridData::operator== const):
2774 * rendering/style/StyleMultiColData.cpp:
2775 (WebCore::StyleMultiColData::StyleMultiColData):
2776 (WebCore::StyleMultiColData::operator== const):
2777 * rendering/style/StyleMultiColData.h:
2778 * rendering/style/StyleRareNonInheritedData.cpp:
2779 (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2780 (WebCore::StyleRareNonInheritedData::operator== const):
2781 * rendering/style/StyleRareNonInheritedData.h:
2783 2018-02-05 Ms2ger <Ms2ger@igalia.com>
2785 Implement createImageBitmap(HTMLVideoElement)
2786 https://bugs.webkit.org/show_bug.cgi?id=182388
2788 Reviewed by Žan Doberšek.
2790 The implementation is inspired by CanvasRenderingContext2DBase::drawImage().
2794 - web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html
2795 - web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args.html
2798 * html/ImageBitmap.cpp:
2799 (WebCore::taintsOrigin): Add function to help with the implementation.
2800 (WebCore::ImageBitmap::createPromise): Fill in implementation.
2802 2018-02-05 Zan Dobersek <zdobersek@igalia.com>
2804 Unreviewed, rolling out r228085.
2806 Pixel data stride is imposed by OpenGL and shouldn't be
2811 "[Cairo] Correctly calculate stride in
2812 GraphicsContext3D::paintToCanvas()"
2813 https://bugs.webkit.org/show_bug.cgi?id=182466
2814 https://trac.webkit.org/changeset/228085
2816 2018-02-05 Carlos Garcia Campos <cgarcia@igalia.com>
2818 [SOUP] WebSockets must use system proxy settings
2819 https://bugs.webkit.org/show_bug.cgi?id=126384
2821 Reviewed by Michael Catanzaro.
2823 Use soup_session_connect_async() when available to create the WebSockets connection instead of GSocketClient
2826 * platform/network/soup/SocketStreamHandleImpl.h:
2827 * platform/network/soup/SocketStreamHandleImplSoup.cpp:
2828 (WebCore::wssSocketClientEventCallback):
2829 (WebCore::SocketStreamHandleImpl::create):
2830 (WebCore::SocketStreamHandleImpl::connected):
2831 (WebCore::SocketStreamHandleImpl::connectedCallback):
2832 (WebCore::SocketStreamHandleImpl::platformClose):
2834 2018-02-05 Carlos Garcia Campos <cgarcia@igalia.com>
2836 Add a way to check if a host is an IP address
2837 https://bugs.webkit.org/show_bug.cgi?id=182427
2839 Reviewed by Alex Christensen.
2841 There are several places where this is needed. We currently just assume that any host ending in a digit is an IP
2842 address, except in PublicSuffix where platform specific code is used. This patch adds URL::hostIsIPAddress()
2843 platform specific implementations, falling back to current assumption if there isn't an implementation for the
2846 * page/OriginAccessEntry.cpp:
2847 (WebCore::OriginAccessEntry::OriginAccessEntry): Use URL::hostIsIPAddress().
2849 (WebCore::URL::hostIsIPAddress): Fallback implementation.
2851 * platform/mac/PublicSuffixMac.mm:
2852 (WebCore::topPrivatelyControlledDomain): Use URL::hostIsIPAddress().
2853 * platform/mac/URLMac.mm:
2854 (WebCore::URL::hostIsIPAddress): Move implementation from PublicSuffixMac.mm.
2855 * platform/network/curl/CookieUtil.cpp:
2856 (WebCore::CookieUtil::isIPAddress): Use URL::hostIsIPAddress().
2857 * platform/soup/URLSoup.cpp:
2858 (WebCore::URL::hostIsIPAddress): Use g_hostname_is_ip_address().
2860 2018-02-04 Zan Dobersek <zdobersek@igalia.com>
2862 [Cairo] Correctly calculate stride in GraphicsContext3D::paintToCanvas()
2863 https://bugs.webkit.org/show_bug.cgi?id=182466
2865 Reviewed by Michael Catanzaro.
2867 * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
2868 (WebCore::GraphicsContext3D::paintToCanvas):
2869 Use cairo_format_stride_for_width() to obtain stride that Cairo thinks
2870 is appropriate for the given width, taking into account internal
2871 alignment requirements.
2873 2018-02-04 Zan Dobersek <zdobersek@igalia.com>
2875 [Cairo] Split TexMap functionality out of GraphicsContext3DCairo
2876 https://bugs.webkit.org/show_bug.cgi?id=182465
2878 Reviewed by Michael Catanzaro.
2880 Take the Non-Cairo GraphicsContext3D functionality that's stashed in
2881 GraphicsContext3DCairo and move it into the GraphicsContext3DTextureMapper
2884 In GraphicsContext3DCairo.cpp, only the Cairo-specific GraphicsContext3D
2885 functionality remains, specifically ImageExtractor and paintToCanvas().
2887 Everything else is moved into GraphicsContext3DTextureMapper.cpp. This
2888 filename and its location under platform/graphics/texmap/ was chosen
2889 since all the ports using this file (GTK, WPE, WinCairo) are also using
2890 the TextureMapper module. Various #if-guards are simplified in the
2891 moved-over code to reflect this.
2893 GraphicsContext3DCairo.cpp now better reflects GraphicsContext3DCG.cpp,
2894 with both implementing functionality specific to a 2D painting library,
2895 whereas GraphicsContext3DTextureMapper.cpp reflects
2896 GraphicsContext3DCocoa.cpp in covering functionality needed to integrate
2897 the GraphicsContext3D output into the platform-specific composition
2900 No new tests -- no change in behavior.
2902 * platform/TextureMapper.cmake:
2903 * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
2904 (WebCore::activeContexts): Deleted.
2905 (WebCore::GraphicsContext3D::create): Deleted.
2906 (WebCore::GraphicsContext3D::GraphicsContext3D): Deleted.
2907 (WebCore::GraphicsContext3D::~GraphicsContext3D): Deleted.
2908 (WebCore::GraphicsContext3D::setContextLostCallback): Deleted.
2909 (WebCore::GraphicsContext3D::setErrorMessageCallback): Deleted.
2910 (WebCore::GraphicsContext3D::makeContextCurrent): Deleted.
2911 (WebCore::GraphicsContext3D::checkGPUStatus): Deleted.
2912 (WebCore::GraphicsContext3D::platformGraphicsContext3D): Deleted.
2913 (WebCore::GraphicsContext3D::platformTexture const): Deleted.
2914 (WebCore::GraphicsContext3D::isGLES2Compliant const): Deleted.
2915 (WebCore::GraphicsContext3D::platformLayer const): Deleted.
2916 (WebCore::GraphicsContext3D::getExtensions): Deleted.
2917 * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp: Copied from Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp.
2918 (WebCore::activeContexts):
2919 (WebCore::GraphicsContext3D::create):
2920 (WebCore::GraphicsContext3D::GraphicsContext3D):
2921 (WebCore::GraphicsContext3D::~GraphicsContext3D):
2922 (WebCore::GraphicsContext3D::setContextLostCallback):
2923 (WebCore::GraphicsContext3D::setErrorMessageCallback):
2924 (WebCore::GraphicsContext3D::makeContextCurrent):
2925 (WebCore::GraphicsContext3D::checkGPUStatus):
2926 (WebCore::GraphicsContext3D::platformGraphicsContext3D):
2927 (WebCore::GraphicsContext3D::platformTexture const):
2928 (WebCore::GraphicsContext3D::isGLES2Compliant const):
2929 (WebCore::GraphicsContext3D::platformLayer const):
2930 (WebCore::GraphicsContext3D::getExtensions):
2932 2018-02-04 Zan Dobersek <zdobersek@igalia.com>
2934 Simplify GraphicsContext3D::paintToCanvas()
2935 https://bugs.webkit.org/show_bug.cgi?id=182459
2937 Reviewed by Michael Catanzaro.
2939 Cairo-specific paintToCanvas() method is dropped in favor of the more
2940 common one that operates on a GraphicsContext object. The platform
2941 context object is then retrieved inside the Cairo-speficic
2942 paintToCanvas() implementation, and not at the call site in
2943 GraphicsContext3D::paintRenderingResultsToCanvas().
2945 GraphicsContext3D::paintToCanvas() is also modified so that the image
2946 and canvas sizes are passed through IntSize objects, and not through
2947 a width-and-height pair of integer values.
2949 No new tests -- no change in behavior.
2951 * platform/graphics/GraphicsContext3D.h:
2952 * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
2953 (WebCore::GraphicsContext3D::paintToCanvas):
2954 * platform/graphics/cg/GraphicsContext3DCG.cpp:
2955 (WebCore::GraphicsContext3D::paintToCanvas):
2956 * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2957 (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
2959 2018-02-03 Alexey Proskuryakov <ap@apple.com>
2961 Tweak availability macros for CAN_DISALLOW_USER_INSTALLED_FONTS
2963 Rubber-stamped by Maciej Stachowiak.
2965 * platform/graphics/cocoa/FontCacheCoreText.cpp:
2967 2018-02-02 Daniel Bates <dabates@apple.com>
2969 Clean up FrameLoader::receivedFirstData()
2970 https://bugs.webkit.org/show_bug.cgi?id=182361
2972 Reviewed by Andy Estes.
2974 * loader/FrameLoader.cpp:
2975 (WebCore::FrameLoader::receivedFirstData):
2977 2018-02-02 Myles C. Maxfield <mmaxfield@apple.com>
2979 Test fix after r227995
2980 https://bugs.webkit.org/show_bug.cgi?id=180951
2984 Webfonts shouldn't be run through CTFontDescriptorCreateMatchingFontDescriptor().
2985 Also, unify macOS's and iOS's implementation of FontCache::lastResortFallbackFont().
2987 Covered by existing tests.
2989 * platform/graphics/cocoa/FontCacheCoreText.cpp:
2990 (WebCore::FontDatabase::collectionForFamily):
2991 (WebCore::FontDatabase::fontForPostScriptName):
2992 (WebCore::addAttributesForInstalledFonts):
2993 (WebCore::addAttributesForWebFonts):
2994 (WebCore::installedFontMandatoryAttributes):
2995 (WebCore::FontCache::lastResortFallbackFont):
2996 (WebCore::addAttributesForUserInstalledFonts): Deleted.
2997 (WebCore::mandatoryAttributesForUserInstalledFonts): Deleted.
2998 * platform/graphics/cocoa/FontCacheCoreText.h:
2999 * platform/graphics/ios/FontCacheIOS.mm:
3000 (WebCore::FontCache::lastResortFallbackFont): Deleted.
3001 * platform/graphics/mac/FontCacheMac.mm:
3002 (WebCore::FontCache::lastResortFallbackFont): Deleted.
3003 * platform/graphics/mac/FontCustomPlatformData.cpp:
3004 (WebCore::FontCustomPlatformData::fontPlatformData):
3006 2018-02-02 Basuke Suzuki <Basuke.Suzuki@sony.com>
3008 Fix build error after r 227457 with VIDEO and WEB_AUDIO disabled
3009 https://bugs.webkit.org/show_bug.cgi?id=182395
3011 Reviewed by Eric Carlson
3013 * platform/audio/PlatformMediaSessionManager.cpp:
3014 (WebCore::PlatformMediaSessionManager::updateNowPlayingInfoIfNecessary):
3016 2018-02-02 Don Olmstead <don.olmstead@sony.com>
3018 Remove WebCore/ForwardingHeaders directory
3019 https://bugs.webkit.org/show_bug.cgi?id=182347
3021 Reviewed by Alex Christensen.
3023 Baseline tests updated.
3025 * bindings/scripts/CodeGeneratorJS.pm:
3026 (AddToIncludesForIDLType):
3027 (GenerateEnumerationImplementationContent):
3028 (GenerateDictionaryImplementationContent):
3030 (GenerateOverloadDispatcher):
3031 (addUnscopableProperties):
3032 (GenerateImplementation):
3033 (GenerateOperationDefinition):
3034 (GenerateSerializerDefinition):
3035 (GenerateConstructorHelperMethods):
3036 * bindings/scripts/test/JS/JSInterfaceName.cpp:
3037 * bindings/scripts/test/JS/JSMapLike.cpp:
3038 * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
3039 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3040 * bindings/scripts/test/JS/JSTestCEReactions.cpp:
3041 * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
3042 * bindings/scripts/test/JS/JSTestCallTracer.cpp:
3043 * bindings/scripts/test/JS/JSTestCallbackFunctionRethrow.cpp:
3044 * bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.cpp:
3045 * bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp:
3046 * bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
3047 * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
3048 * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
3049 * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
3050 * bindings/scripts/test/JS/JSTestDOMJIT.h:
3051 * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
3052 * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3053 * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3054 * bindings/scripts/test/JS/JSTestException.cpp:
3055 * bindings/scripts/test/JS/JSTestException.h:
3056 * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
3057 * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
3058 * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
3059 * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
3060 * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
3061 * bindings/scripts/test/JS/JSTestInterface.cpp:
3062 * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
3063 * bindings/scripts/test/JS/JSTestIterable.cpp:
3064 * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
3065 * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3066 * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
3067 * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
3068 * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
3069 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3070 * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
3071 * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
3072 * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
3073 * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
3074 * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
3075 * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
3076 * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
3077 * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
3078 * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
3079 * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
3080 * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
3081 * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
3082 * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
3083 * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
3084 * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
3085 * bindings/scripts/test/JS/JSTestNode.cpp:
3086 * bindings/scripts/test/JS/JSTestObj.cpp:
3087 * bindings/scripts/test/JS/JSTestObj.h:
3088 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3089 * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
3090 * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
3091 * bindings/scripts/test/JS/JSTestPluginInterface.cpp:
3092 * bindings/scripts/test/JS/JSTestPluginInterface.h:
3093 * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
3094 * bindings/scripts/test/JS/JSTestSerialization.cpp:
3095 * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp:
3096 * bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
3097 * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
3098 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3099 * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
3100 * bindings/scripts/test/JS/JSTestStandaloneEnumeration.cpp:
3101 * bindings/scripts/test/JS/JSTestStringifier.cpp:
3102 * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
3103 * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
3104 * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
3105 * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
3106 * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
3107 * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
3108 * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3109 * dom/make_event_factory.pl:
3110 (generateImplementation):
3112 2018-02-02 David Quesada <david_quesada@apple.com>
3114 WebAppManifest scope should default to the containing directory of start_url if 'scope' is not specified
3115 https://bugs.webkit.org/show_bug.cgi?id=182363
3116 rdar://problem/37093498
3118 Reviewed by Ryosuke Niwa.
3120 If an app manifest doesn't specify a scope, we should default to the "parent directory" of
3121 the start URL, rather than leaving the app unbounded. This is more reasonable than using the
3122 entire internet as the app scope.
3124 No new tests, updates to the existing tests verify the new behavior.
3126 * Modules/applicationmanifest/ApplicationManifestParser.cpp:
3127 (WebCore::ApplicationManifestParser::parseScope):
3129 2018-02-02 Youenn Fablet <youenn@apple.com>
3131 Clearing all service worker registrations should wait for importing service worker registration to finish
3132 https://bugs.webkit.org/show_bug.cgi?id=182407
3133 <rdar://problem/37167523>
3135 Reviewed by Chris Dumez.
3137 * workers/service/server/SWServer.cpp:
3138 (WebCore::SWServer::clear): ensure completion handler is called on early exit case.
3140 2018-02-02 Youenn Fablet <youenn@apple.com>
3142 Clearing all service worker registrations should wait for importing service worker registration to finish
3143 https://bugs.webkit.org/show_bug.cgi?id=182407
3145 Reviewed by Chris Dumez.
3147 Covered by existing tests and the service worker API test being no longer flaky.
3149 * workers/service/server/SWServer.cpp:
3150 (WebCore::SWServer::registrationStoreImportComplete):
3151 (WebCore::SWServer::clearAll):
3152 (WebCore::SWServer::clear):
3153 (WebCore::SWServer::getOriginsWithRegistrations):
3154 * workers/service/server/SWServer.h:
3156 2018-02-02 Chris Dumez <cdumez@apple.com>
3158 Clearing a registration should null out its workers before setting their state to "redundant"
3159 https://bugs.webkit.org/show_bug.cgi?id=182418
3160 <rdar://problem/37142874>
3162 Reviewed by Youenn Fablet.
3164 Clearing a registration should null out its workers before setting their state to "redundant".
3165 This seems to match Firefox and Chrome.
3167 No new tests, rebaselined existing test.
3169 * workers/service/server/SWServerRegistration.cpp:
3170 (WebCore::SWServerRegistration::clear):
3171 (WebCore::clearRegistrationWorker): Deleted.
3173 2018-02-02 Antoine Quint <graouts@apple.com>
3175 [Modern Media Controls] Turn media/modern-media-controls/tracks-panel and media/modern-media-controls/tracks-support back on
3176 https://bugs.webkit.org/show_bug.cgi?id=182426
3178 Reviewed by Dean Jackson.
3180 Ensure that the tracks panel isn't dismissed by updating the layout.
3182 * Modules/modern-media-controls/controls/inline-media-controls.js:
3183 (InlineMediaControls.prototype.layout):
3185 2018-02-02 Commit Queue <commit-queue@webkit.org>
3187 Unreviewed, rolling out r227964.
3188 https://bugs.webkit.org/show_bug.cgi?id=182423
3190 It broke several unit tests (Requested by KaL on #webkit).
3194 "[SOUP] Ensure domain is valid when converting a WebCore
3196 https://bugs.webkit.org/show_bug.cgi?id=182328
3197 https://trac.webkit.org/changeset/227964
3199 2018-02-01 Chris Dumez <cdumez@apple.com>
3201 When SW install fails, null out registration.installing before setting worker state to "redundant"
3202 https://bugs.webkit.org/show_bug.cgi?id=182416
3203 <rdar://problem/37141997>
3205 Reviewed by Youenn Fablet.
3207 When SW install fails, null out registration.installing before setting worker state to "redundant".
3208 This does not match the spec but this is what Firefox and Chrome do. This is also what the
3209 web-platform-tests expect.
3211 Test: http/tests/workers/service/install-fails.html
3213 * workers/service/server/SWServerJobQueue.cpp:
3214 (WebCore::SWServerJobQueue::didFinishInstall):
3216 2018-02-01 Myles C. Maxfield <mmaxfield@apple.com>
3218 Test fix after r227848.
3219 https://bugs.webkit.org/show_bug.cgi?id=180951
3223 Using kCTFontNameAttribute on an in-memory font causes CTFontDescriptorCreateMatchingFontDescriptor()
3224 to return nullptr. Luckily, we weren't using that attribute anyway.
3226 Covered by existing tests.
3228 * platform/graphics/cocoa/FontCacheCoreText.cpp:
3229 (WebCore::mandatoryAttributesForUserInstalledFonts):
3231 2018-02-01 Youenn Fablet <youenn@apple.com>
3233 Delay service worker process creation until actually needed by SWServer
3234 https://bugs.webkit.org/show_bug.cgi?id=182301
3236 Reviewed by Chris Dumez.
3238 Rename SWServer::Connection::scheduleJobInServer to scheduleJob.
3239 Add sessionID getter from an SWServer.
3241 * workers/service/server/SWServer.h:
3242 (WebCore::SWServer::sessionID const):
3244 2018-02-01 Fujii Hironori <Hironori.Fujii@sony.com>
3246 REGRESSION(r227594) [WinCairo] NULL pointer crash in GraphicsContext::getWindowsContext
3247 https://bugs.webkit.org/show_bug.cgi?id=182282
3249 Reviewed by Žan Doberšek.
3251 ImageBufferCairo has been changed to use GraphicsContextImplCairo
3252 in r227594. But, GraphicsContext::getWindowsContext doesn't care
3253 the case of using GraphicsContextImpl and crashes due to null
3254 dereference of GraphicsContext::m_data.
3256 GraphicsContext::getWindowsContext should create a HDC in that case.
3258 Remove the argument mayCreateBitmap because it is always
3261 No new tests (Covered by the existing tests)
3263 * platform/graphics/GraphicsContext.h:
3264 Removed a argument mayCreateBitmap of getWindowsContext and releaseWindowsContext.
3265 * platform/graphics/win/GraphicsContextCGWin.cpp:
3266 (WebCore::GraphicsContext::releaseWindowsContext): Ditto.
3267 * platform/graphics/win/GraphicsContextCairoWin.cpp:
3268 (WebCore::GraphicsContext::releaseWindowsContext): Ditto.
3269 * platform/graphics/win/GraphicsContextDirect2D.cpp:
3270 (WebCore::GraphicsContext::releaseWindowsContext): Ditto.
3271 * platform/graphics/win/GraphicsContextWin.cpp:
3272 (WebCore::GraphicsContext::getWindowsContext):
3273 Create a HDC if m_impl is null. Removed a argument mayCreateBitmap.
3274 * platform/graphics/win/LocalWindowsContext.h:
3275 (WebCore::LocalWindowsContext::LocalWindowsContext):
3276 Removed m_mayCreateBitmap.
3277 (WebCore::LocalWindowsContext::~LocalWindowsContext): Ditto.
3279 2018-02-01 Christopher Reid <chris.reid@sony.com>
3281 [Curl] Use SQLite database in cookie jar implementation for Curl port
3282 https://bugs.webkit.org/show_bug.cgi?id=174942
3284 Reviewed by Alex Christensen.
3286 No new tests, Set-Cookie is already tested in Layout tests.
3288 Adding an initial SQLite CookieJar implementation to the curl network layer.
3289 WebCore will now parse and handle both HTTP and DOM cookies instead of using libcurl.
3290 This currently supports cookie storage and retrieval.
3291 Cookie deletion is not yet implemented.
3293 * platform/Curl.cmake:
3294 * platform/network/NetworkStorageSession.h: Added cookieDB storage in curl.
3295 * platform/network/curl/CookieJarCurl.cpp: Removed the old curl cookie handling.
3296 * platform/network/curl/CookieJarCurl.h:
3297 * platform/network/curl/CookieJarCurlDatabase.cpp: Added.
3298 * platform/network/curl/CookieJarCurlDatabase.h: Added.
3299 * platform/network/curl/CookieJarDB.cpp: Added.
3300 * platform/network/curl/CookieJarDB.h: Added.
3301 * platform/network/curl/CookieUtil.cpp: Added.
3302 * platform/network/curl/CookieUtil.h: Added.
3303 * platform/network/curl/CurlContext.cpp: Removed the old curl cookie handling.
3304 * platform/network/curl/CurlContext.h:
3305 * platform/network/curl/CurlRequest.cpp: Added handlers for HTTP response cookies.
3306 * platform/network/curl/NetworkStorageSessionCurl.cpp:
3307 * platform/network/curl/ResourceHandleCurlDelegate.cpp:
3309 2018-02-01 Chris Dumez <cdumez@apple.com>
3311 Add missing RETURN_IF_EXCEPTION() after object->get() calls in convertDictionary<>()
3312 https://bugs.webkit.org/show_bug.cgi?id=182392
3313 <rdar://problem/37119215>
3315 Reviewed by Geoffrey Garen.
3317 Add missing RETURN_IF_EXCEPTION() after object->get() calls in convertDictionary<>(),
3318 given that getting the property from the object can throw an exception.
3320 No new tests, rebaselined existing test.
3322 * bindings/scripts/CodeGeneratorJS.pm:
3323 (GenerateDictionaryImplementationContent):
3324 * bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
3325 (WebCore::convertDictionary<TestCallbackInterface::Dictionary>):
3326 * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3327 (WebCore::convertDictionary<TestEventConstructor::Init>):
3328 * bindings/scripts/test/JS/JSTestObj.cpp:
3329 (WebCore::convertDictionary<TestObj::Dictionary>):
3330 (WebCore::convertDictionary<TestObj::DictionaryThatShouldNotTolerateNull>):
3331 (WebCore::convertDictionary<TestObj::DictionaryThatShouldTolerateNull>):
3332 (WebCore::convertDictionary<AlternateDictionaryName>):
3333 (WebCore::convertDictionary<TestObj::ParentDictionary>):
3334 (WebCore::convertDictionary<TestObj::ChildDictionary>):
3335 (WebCore::convertDictionary<TestObj::ConditionalDictionaryA>):
3336 (WebCore::convertDictionary<TestObj::ConditionalDictionaryB>):
3337 (WebCore::convertDictionary<TestObj::ConditionalDictionaryC>):
3338 * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
3339 (WebCore::convertDictionary<TestPromiseRejectionEvent::Init>):
3340 * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
3341 (WebCore::convertDictionary<DictionaryImplName>):
3343 2018-02-01 Ryosuke Niwa <rniwa@webkit.org>
3345 Some test cases in accessibility/mac/selection-notification-focus-change.html fail
3346 https://bugs.webkit.org/show_bug.cgi?id=182212
3347 <rdar://problem/36937147>
3349 Reviewed by Antti Koivisto and Wenson Hsieh.
3351 The failure was caused by the async update of the selection appearance not preserving selection reveal intent.
3352 Fixed the bug by storing the intent in a member variable and using it later.
3355 (WebCore::Element::focus): Removed an unnecessary synchronous layout update.
3356 * editing/FrameSelection.cpp:
3357 (WebCore::FrameSelection::setNeedsSelectionUpdate): Use the default intent to preserve the old behavior.
3358 (WebCore::FrameSelection::respondToNodeModification): Ditto.
3359 (WebCore::FrameSelection::setSelection): Save the selection reveal intent.
3360 (WebCore::FrameSelection::updateAppearanceAfterLayoutOrStyleChange): Use the saved intent.
3361 * editing/FrameSelection.h:
3362 * page/FocusController.cpp:
3363 (WebCore::FocusController::advanceFocusDirectionally): Always update the layout before invoking
3364 nodeRectInAbsoluteCoordinates.
3366 2018-02-01 Zalan Bujtas <zalan@apple.com>
3368 [RenderTreeBuilder] Move RenderRubyRun::rubyBaseSafe to RenderTreeBuilder::Ruby
3369 https://bugs.webkit.org/show_bug.cgi?id=182306
3370 <rdar://problem/37041440>
3372 Reviewed by Darin Adler.
3374 Addressing post-review comment.
3376 * rendering/updating/RenderTreeBuilderRuby.cpp:
3377 (WebCore::RenderTreeBuilder::Ruby::insertChild):
3378 (WebCore::RenderTreeBuilder::Ruby::rubyBaseSafe):
3379 * rendering/updating/RenderTreeBuilderRuby.h:
3381 2018-02-01 Zalan Bujtas <zalan@apple.com>
3383 [RenderTreeBuilder] Introduce RenderTreeBuilder to takeChild()
3384 https://bugs.webkit.org/show_bug.cgi?id=182373
3385 <rdar://problem/37101484>
3387 Reviewed by Antti Koivisto.
3389 This is in preparation for moving mutation code out of takeChild.
3391 No change in functionality.
3393 * rendering/RenderBlock.cpp:
3394 (WebCore::RenderBlock::takeChild):
3395 * rendering/RenderBlock.h:
3396 * rendering/RenderBlockFlow.cpp:
3397 (WebCore::RenderBlockFlow::takeChild):
3398 * rendering/RenderBlockFlow.h:
3399 * rendering/RenderButton.cpp:
3400 (WebCore::RenderButton::takeChild):
3401 * rendering/RenderButton.h:
3402 * rendering/RenderElement.cpp:
3403 (WebCore::RenderElement::takeChild):
3404 (WebCore::RenderElement::removeAndDestroyChild):
3405 (WebCore::RenderElement::destroyLeftoverChildren):
3406 * rendering/RenderElement.h:
3407 * rendering/RenderFullScreen.cpp:
3408 (WebCore::RenderFullScreen::wrapExistingRenderer):
3409 (WebCore::RenderFullScreen::unwrapRenderer):
3410 * rendering/RenderGrid.cpp:
3411 (WebCore::RenderGrid::takeChild):
3412 * rendering/RenderGrid.h:
3413 * rendering/RenderMenuList.cpp:
3414 (RenderMenuList::takeChild):
3415 * rendering/RenderMenuList.h:
3416 * rendering/RenderMultiColumnFlow.cpp:
3417 (WebCore::RenderMultiColumnFlow::processPossibleSpannerDescendant):
3418 * rendering/RenderObject.cpp:
3419 (WebCore::RenderObject::removeFromParentAndDestroy):
3420 * rendering/RenderRuby.cpp:
3421 (WebCore::RenderRubyAsInline::takeChild):
3422 (WebCore::RenderRubyAsBlock::takeChild):
3423 * rendering/RenderRuby.h:
3424 * rendering/RenderRubyRun.cpp:
3425 (WebCore::RenderRubyRun::takeChild):
3426 * rendering/RenderRubyRun.h:
3427 * rendering/RenderTableRow.cpp:
3428 (WebCore::RenderTableRow::collapseAndDestroyAnonymousSiblingRows): Deleted.
3429 * rendering/RenderTableRow.h:
3430 * rendering/svg/RenderSVGContainer.cpp:
3431 (WebCore::RenderSVGContainer::takeChild):
3432 * rendering/svg/RenderSVGContainer.h:
3433 * rendering/svg/RenderSVGInline.cpp:
3434 (WebCore::RenderSVGInline::takeChild):
3435 * rendering/svg/RenderSVGInline.h:
3436 * rendering/svg/RenderSVGRoot.cpp:
3437 (WebCore::RenderSVGRoot::takeChild):
3438 * rendering/svg/RenderSVGRoot.h:
3439 * rendering/svg/RenderSVGText.cpp:
3440 (WebCore::RenderSVGText::takeChild):
3441 * rendering/svg/RenderSVGText.h:
3442 * rendering/updating/RenderTreeBuilder.cpp:
3443 (WebCore::RenderTreeBuilder::collapseAndDestroyAnonymousSiblingRows):
3444 (WebCore::RenderTreeBuilder::removeFromParentAndDestroyCleaningUpAnonymousWrappers):
3445 * rendering/updating/RenderTreeBuilder.h:
3446 * rendering/updating/RenderTreeBuilderFirstLetter.cpp:
3447 (WebCore::RenderTreeBuilder::FirstLetter::updateStyle):
3448 (WebCore::RenderTreeBuilder::FirstLetter::createRenderers):
3449 * rendering/updating/RenderTreeBuilderList.cpp:
3450 (WebCore::RenderTreeBuilder::List::updateItemMarker):
3451 * rendering/updating/RenderTreeBuilderMultiColumn.cpp:
3452 (WebCore::RenderTreeBuilder::MultiColumn::createFragmentedFlow):
3453 (WebCore::RenderTreeBuilder::MultiColumn::destroyFragmentedFlow):
3454 * rendering/updating/RenderTreeBuilderRuby.cpp:
3455 (WebCore::RenderTreeBuilder::Ruby::insertChild):
3457 2018-02-01 Dean Jackson <dino@apple.com>
3459 REGRESSION (r219342): Scaled HTML widget is not responding to a clicks outside the body
3460 https://bugs.webkit.org/show_bug.cgi?id=182394
3461 <rdar://problem/34840816>
3463 Reviewed by Simon Fraser.
3465 If a scale < 1 is applied to the page, then the visual viewport will be bigger
3466 than the layout viewport. Our hit testing code would then ignore any hits
3467 that were outside the layout viewport.
3469 The fix is to only apply a hit testing clip if the page is scaling up, not down.
3471 Update the existing fast/dom/elementFromPoint-scaled-scrolled.html test.
3473 * page/FrameView.cpp:
3474 (WebCore::FrameView::layoutViewportToAbsoluteRect const): Deleted. This helper is
3475 no longer used, and it would have probably been more confusing to have it accept
3476 a flag to ignore the scale if it is less than 1.
3478 * rendering/RenderLayer.cpp:
3479 (WebCore::RenderLayer::hitTest): No need to take the layout rect, remove the origin,
3480 and pass it to a helper that added the origin back. The only thing the helper was
3481 doing for us was applying a scale factor, which we only want to do if it was
3484 2018-02-01 Yusuke Suzuki <utatane.tea@gmail.com>
3486 Structured cloning a Symbol should throw
3487 https://bugs.webkit.org/show_bug.cgi?id=182380
3489 Reviewed by Darin Adler.
3491 Test: js/dom/post-message-symbol.html
3493 * bindings/js/SerializedScriptValue.cpp:
3494 (WebCore::CloneSerializer::dumpIfTerminal):
3495 Structured cloning should throw "DataCloneError" DOMException if it finds Symbol.
3496 Remove unused `isNumber()` case. It is done in dumpImmediate.
3497 (WebCore::CloneSerializer::serializeUndefined): Deleted.
3498 (WebCore::CloneSerializer::serializeBoolean): Deleted.
3499 (WebCore::CloneSerializer::serializeNumber): Deleted.
3500 Remove unused functions.
3502 2018-02-01 Chris Dumez <cdumez@apple.com>
3504 We no longer need to queue service worker jobs until the connection to the service worker process has been established
3505 https://bugs.webkit.org/show_bug.cgi?id=182375
3507 Reviewed by Youenn Fablet.
3509 We no longer need to queue service worker jobs until the connection to the service worker process
3510 has been established. We initially did this to work around the fact that registrations restored
3511 from disk would not have an active worker until the service worker process had been established.
3512 However, this issue has been fixed in r227696.
3514 This is basically a revert of r227220, which is no longer needed after r227696.
3516 No new tests, initial fix was covered by an API test that still passes.
3518 * workers/service/server/SWServer.cpp:
3519 (WebCore::SWServer::clearAll):
3520 (WebCore::SWServer::clear):
3521 (WebCore::SWServer::scheduleJob):
3522 (WebCore::SWServer::serverToContextConnectionCreated):
3523 * workers/service/server/SWServer.h:
3525 2018-02-01 Carlos Garcia Campos <cgarcia@igalia.com>
3527 [GTK] Shift + mouse scroll should scroll horizontally
3528 https://bugs.webkit.org/show_bug.cgi?id=181629
3530 Reviewed by Michael Catanzaro.
3532 We currently turn vertical scroll into horizontal when scrolling over the horizontal scrollbar. When Shift key is
3533 pressed, we still want to scroll in the scrollbar direction when scrolling over a scrollbar, so we need to swap
3534 directions in both scrollbars depending on whther the Shift key is pressed or not.
3536 * page/EventHandler.cpp:
3537 (WebCore::EventHandler::shouldSwapScrollDirection const): Renamed.
3538 (WebCore::EventHandler::handleWheelEvent): Use the new name.
3539 (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal const): Deleted.
3540 * page/EventHandler.h:
3541 * platform/PlatformWheelEvent.h:
3542 (WebCore::PlatformWheelEvent::copySwappingDirection const): Swap the direction of the event.
3543 (WebCore::PlatformWheelEvent::copyTurningVerticalTicksIntoHorizontalTicks const): Deleted.
3544 * platform/glib/EventHandlerGLib.cpp:
3545 (WebCore::EventHandler::shouldSwapScrollDirection const): Take into account whether the Shift key is present.
3546 (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal const): Deleted.
3548 2018-02-01 Carlos Garcia Campos <cgarcia@igalia.com>
3550 [GTK] Problem with Washington Post images
3551 https://bugs.webkit.org/show_bug.cgi?id=181421
3553 Reviewed by Carlos Alberto Lopez Perez.
3555 This is because Washington Post is using the user agent to decide the image formats it serves. In the case of
3556 chromium the images are served as webp, for firefox jpeg is used and in our case it's assuming we are safari and
3557 it's providing jp2 images that we don't support. Add a user agent quirk to pretend to be chromium for
3560 * platform/UserAgentQuirks.cpp:
3561 (WebCore::urlRequiresChromeBrowser):
3563 2018-02-01 Carlos Garcia Campos <cgarcia@igalia.com>
3565 [SOUP] Ensure domain is valid when converting a WebCore Cookie to Soup
3566 https://bugs.webkit.org/show_bug.cgi?id=182328
3568 Reviewed by Michael Catanzaro.
3570 soup_cookie_parse() adds the initial '.' to the domain if missing before creating the SoupCookie, but
3571 soup_cookie_new() allows for domain to be a hostname that needs to match exactly. When converting a WebCore
3572 Cookie into a SoupCookie we always want the domain to be considered as such and not as a hostname, so we need to
3573 prepend the '.' if missing.
3575 Fixes: imported/w3c/webdriver/tests/cookies/add_cookie.py::test_add_domain_cookie
3577 * platform/network/soup/CookieSoup.cpp:
3578 (WebCore::Cookie::toSoupCookie const):
3580 2018-02-01 Zalan Bujtas <zalan@apple.com>
3582 [RenderTreeBuilder] Move RenderTableRow::collapseAndDestroyAnonymousSiblingRows to RenderTreeBuilder
3583 https://bugs.webkit.org/show_bug.cgi?id=182374
3584 <rdar://problem/37102005>
3586 Reviewed by Antti Koivisto.
3588 It's only called from RenderTreeBuilder.
3590 No change in functionality.
3592 * rendering/RenderTableRow.cpp:
3593 (WebCore::RenderTableRow::collapseAndDestroyAnonymousSiblingRows): Deleted.
3594 * rendering/RenderTableRow.h:
3595 * rendering/updating/RenderTreeBuilder.cpp:
3596 (WebCore::RenderTreeBuilder::removeFromParentAndDestroyCleaningUpAnonymousWrappers):
3597 * rendering/updating/RenderTreeBuilderTable.cpp:
3598 (WebCore::RenderTreeBuilder::Table::collapseAndDestroyAnonymousSiblingRows):
3599 * rendering/updating/RenderTreeBuilderTable.h:
3601 2018-02-01 Chris Dumez <cdumez@apple.com>
3603 Queue a microtask when a waitUntil() promise is settled
3604 https://bugs.webkit.org/show_bug.cgi?id=182372
3605 <rdar://problem/37101019>
3607 Reviewed by Mark Lam.
3609 Queue a microtask when a waitUntil() promise is settled, as per:
3610 - https://w3c.github.io/ServiceWorker/#dom-extendableevent-waituntil (step 5)
3612 Otherwise, we decrement m_pendingPromiseCount too quickly and it may cause
3613 following calls to waitUntil() to throw when they shouldn't.
3615 No new tests, rebaselined existing test.
3617 * workers/service/ExtendableEvent.cpp:
3618 (WebCore::ExtendableEvent::addExtendLifetimePromise):
3620 2018-02-01 Antti Koivisto <antti@apple.com>
3622 Invalidate style for sibling combinators accurately on class change
3623 https://bugs.webkit.org/show_bug.cgi?id=182336
3625 Reviewed by Zalan Bujtas.
3627 Use Style::Invalidator to invalidate only those elements that may be affected by a class
3628 change for sibling combinators and nth pseudo classes.
3630 * css/RuleFeature.cpp:
3632 Add new AllSiblings MatchElement to use for nth pseudo classes with subselectors.
3634 (WebCore::isSiblingOrSubject):
3638 (WebCore::RuleFeatureSet::computeNextMatchElement):
3639 (WebCore::RuleFeatureSet::computeSubSelectorMatchElement):
3641 Compute and propage MatchElement::AllSiblings.
3643 * css/RuleFeature.h:
3645 (WebCore::Node::updateAncestorsForStyleRecalc):
3647 Don't need to test for childrenAffectedByPropertyBasedBackwardPositionalRules anymore (an oddly named bit for nth pseudo classes).
3649 * style/StyleInvalidator.cpp:
3650 (WebCore::Style::Invalidator::invalidateStyleWithMatchElement):
3652 Invalidate only the potentially affected elements.
3653 The old code would just unconditionally invalidate the current element. This would propagate to descedants of siblings via
3654 affectedByPreviousSibling bits. That mechanism can be removed when everything has been switched to accurate invalidation.
3656 2018-01-31 Simon Fraser <simon.fraser@apple.com>
3658 Use different debug red colors for different contexts
3659 https://bugs.webkit.org/show_bug.cgi?id=182362
3661 Reviewed by Tim Horton.
3663 Pure red is used elsehwere in the system as a debug color indicator, so use different
3664 shades of red for WebKit in the two places where we paint a reddish wash in debug builds,
3665 so they are identifiable.
3667 * page/FrameView.cpp:
3668 (WebCore::FrameView::paintContents):
3670 2018-01-31 Don Olmstead <don.olmstead@sony.com>
3672 [CMake] Make JavaScriptCore headers copies
3673 https://bugs.webkit.org/show_bug.cgi?id=182303
3675 Reviewed by Alex Christensen.
3677 No new tests. No change in behavior.
3680 * PlatformMac.cmake:
3681 * PlatformWPE.cmake:
3682 * PlatformWin.cmake:
3683 * PlatformWinCairo.cmake:
3685 2018-01-31 Per Arne Vollan <pvollan@apple.com>
3687 Layout Test fast/events/beforeunload-dom-manipulation-crash.html is crashing
3688 https://bugs.webkit.org/show_bug.cgi?id=181204
3689 <rdar://problem/36256274>
3691 Reviewed by Ryosuke Niwa.
3693 When a frame element is moved in the DOM tree during the execution of a beforeunload handler,
3694 the frame will be detached when removed from its previous position in the DOM tree. When being
3695 detached, an attempt will also be made to stop the load by calling FrameLoader::stopAllLoaders().
3696 However, this method will return early when executed in a beforeunload handler, since navigation
3697 is not allowed then. The end result is a detached frame which will continue to load, and hitting
3698 asserts in DocumentLoader::dataReceived(), and DocumentLoader::notifyFinished(). It should be
3699 possible to stop a frame load, even when executing a beforeunload handler.
3701 No new tests. Covered by the existing test fast/events/beforeunload-dom-manipulation-crash.html.
3703 * history/PageCache.cpp:
3704 (WebCore::PageCache::addIfCacheable): Fix a failing API test by allowing scripts to be executed
3705 under the PageCache::prune method.
3706 * loader/FrameLoader.cpp:
3707 (WebCore::FrameLoader::isStopLoadingAllowed const):
3708 (WebCore::FrameLoader::stopAllLoaders):
3709 * loader/FrameLoader.h:
3710 * svg/graphics/SVGImage.cpp:
3711 (WebCore::SVGImage::~SVGImage): Disable scripts disallowed assertions in this scope, since it is
3712 safe in this context.
3714 2018-01-31 Javier Fernandez <jfernandez@igalia.com>
3716 inline-block baseline not computed correctly for vertical-lr
3717 https://bugs.webkit.org/show_bug.cgi?id=170176
3719 Reviewed by Manuel Rego Casasnovas.
3721 When computing the baseline position of inline-block elements we use the
3722 InlineFlow logicalTop and the FontMetrics ascent. The issue comes from
3723 the fact that these units are incompatible. The logicalTop of a
3724 vertical-lr element is offset to the left edge, while the ascent is the
3725 distance from the right edge.
3727 We need to either use logical value for the FontMetrics ascent so we can
3728 compute the correctly the baselines of vertical-lr elements, or just using
3729 the logicalBottom for these cases.
3731 The approach based on a logicalAscent API for FontMetrics would require
3732 a lot of work because inline-block logic assumes everything is vertical-rl
3733 and at some point, flips the elements along the block-axis in case of
3736 While it'd be desirable to get rid of this flipping logic, this patch tries
3737 first the simpler approach of using logicalBottom, which aligns with the
3738 currently implemented logic.
3740 Tests: fast/inline-block/baseline-vertical-01.html
3741 fast/inline-block/baseline-vertical-02.html
3742 fast/inline-block/baseline-vertical-03.html
3743 fast/inline-block/baseline-vertical-04.html
3744 fast/inline-block/baseline-vertical-05.html
3745 fast/inline-block/baseline-vertical-06.html
3746 fast/inline-block/baseline-vertical-07.html
3747 fast/inline-block/baseline-vertical-08.html
3749 * rendering/InlineFlowBox.cpp:
3750 (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
3751 * rendering/RenderBlockFlow.cpp:
3752 (WebCore::RenderBlockFlow::inlineBlockBaseline const):
3754 2018-01-31 Said Abou-Hallawa <sabouhallawa@apple.com>
3756 BitmapImage::drawPattern() may not draw a complete frame even after all the data is received
3757 https://bugs.webkit.org/show_bug.cgi?id=182277
3759 Reviewed by Simon Fraser.
3761 BitmapImage::drawPattern() needs to destroy the incomplete decoded frame
3762 before trying to draw it as a pattern.
3764 Test: http/tests/images/draw-pattern-slow-load-large-image.html
3766 * loader/cache/CachedImage.cpp:
3767 (WebCore::CachedImage::updateBufferInternal): We need to disable CachedImage
3768 data buffering for testing. This simulates slow network where intervals
3769 between data chunks can last for seconds.
3770 * loader/cache/CachedImage.h:
3771 * platform/graphics/BitmapImage.cpp:
3772 (WebCore::BitmapImage::drawPattern): Destroy the incomplete decoded frame
3773 before drawing this frame as a pattern. We do not destroy incomplete decoded
3774 frame once new data is received because it may be drawn by async image
3775 drawing while waiting for the newer frame to finish decoding.
3776 * testing/Internals.cpp:
3777 (WebCore::Internals::setForceUpdateImageDataEnabledForTesting):
3778 * testing/Internals.h:
3779 * testing/Internals.idl:
3781 2018-01-31 Ryosuke Niwa <rniwa@webkit.org>
3783 Add a release assertion to ensure timers are deleted in the right thread
3784 https://bugs.webkit.org/show_bug.cgi?id=182351
3786 Reviewed by David Kilzer.
3788 Added a relese assertion in ~TimerBase that the current thread is the one in which the timer was created.
3790 We use canAccessThreadLocalDataForThread for this purpose since the condition is more complicated
3791 when WebThread is being used.
3793 * platform/Timer.cpp:
3794 (WebCore::TimerBase::~TimerBase): Added the assertion.
3796 (WebCore::TimerBase::m_thread): Always store the current thread in a timer.
3798 2018-01-31 Youenn Fablet <youenn@apple.com>
3800 Change SWServer::claim to set the iterator value as soon as possible
3801 https://bugs.webkit.org/show_bug.cgi?id=182337
3803 Reviewed by Chris Dumez.
3805 No change of behavior, this is a "let's go safe way" fix.
3807 * workers/service/server/SWServer.cpp:
3808 (WebCore::SWServer::claim):
3810 2018-01-31 Zalan Bujtas <zalan@apple.com>
3812 [RenderTreeBuilder] Move RenderObject::removeFromParentAndDestroyCleaningUpAnonymousWrappers to RenderTreeBuilder.
3813 https://bugs.webkit.org/show_bug.cgi?id=182348
3814 <rdar://problem/37082837>
3816 Reviewed by Antti Koivisto.
3818 All the callsites are in the RenderTreeUpdater by now.
3820 No change in functionality.
3822 * rendering/RenderObject.cpp:
3823 (WebCore::isAnonymousAndSafeToDelete): Deleted.
3824 (WebCore::findDestroyRootIncludingAnonymous): Deleted.
3825 (WebCore::RenderObject::removeFromParentAndDestroyCleaningUpAnonymousWrappers): Deleted.
3826 * rendering/RenderObject.h:
3827 * rendering/updating/RenderTreeBuilder.cpp:
3828 (WebCore::isAnonymousAndSafeToDelete):
3829 (WebCore::findDestroyRootIncludingAnonymous):
3830 (WebCore::RenderTreeBuilder::removeFromParentAndDestroyCleaningUpAnonymousWrappers):
3831 * rendering/updating/RenderTreeBuilder.h:
3832 * rendering/updating/RenderTreeUpdater.cpp:
3833 (WebCore::RenderTreeUpdater::tearDownRenderers):
3834 (WebCore::RenderTreeUpdater::tearDownTextRenderer):
3836 2018-01-31 Ryosuke Niwa <rniwa@webkit.org>
3838 Release assertion in Performance::resourceTimingBufferFullTimerFired when the resource timing buffer is shrunk
3839 https://bugs.webkit.org/show_bug.cgi?id=182319
3840 <rdar://problem/36904312>
3842 Reviewed by Chris Dumez.
3844 The crash was caused by a wrong release assertion. Handle author scripts shrinking the resource timing buffer
3845 while resourcetimingbufferfull event is being dispatched.
3847 Also fixed a bug that a superflous resourcetimingbufferfull event will be fired when new resource timing entries
3848 are queued while resourcetimingbufferfull event is being dispatched.
3850 Test: http/tests/performance/performance-resource-timing-resourcetimingbufferfull-queue-resource-entry.html
3851 http/tests/performance/performance-resource-timing-resourcetimingbufferfull-shrinking-buffer-crash.html
3853 * page/Performance.cpp:
3854 (WebCore::Performance::resourceTimingBufferFullTimerFired):
3856 2018-01-31 Youenn Fablet <youenn@apple.com>
3858 com.apple.WebKit.Storage crashing at com.apple.WebCore: WebCore::SWServerRegistration::removeClientUsingRegistration
3859 https://bugs.webkit.org/show_bug.cgi?id=182316
3860 <rdar://problem/37025976>
3862 Reviewed by Chris Dumez.
3864 SWServer.m_clientToControllingWorker and SWServerRegistration.m_clientsUsingRegistration might currently get out of sync.
3865 This is a defensive fix to ensure storage process will not crash in Release.
3866 We keep the ASSERT as this probably means there is an abnormal situation that other patches might fix.
3868 * workers/service/server/SWServerRegistration.cpp:
3869 (WebCore::SWServerRegistration::removeClientUsingRegistration):
3871 2018-01-31 Antoine Quint <graouts@apple.com>
3873 [Modern Media Controls] Turn media/modern-media-controls/start-support tests back on
3874 https://bugs.webkit.org/show_bug.cgi?id=182297
3876 Reviewed by Jon Lee and Eric Carlson.
3878 We identified one cause of flakiness when turning those tests back on and fix it in this patch. There would be
3879 cases where the play/pause button would never actually become visible because we would first set it as one of
3880 the buttons in the left container in the bottom controls bar before we would identify that we should show the
3881 prominent play/pause button, and then once we did, we would add it as a child to the InlineMediaControls. But,
3882 because the actual layout of the ButtonsContainer would happen in a rAF due to being a layout() method, we would
3883 remove the play/pause button from the InlineMediaControls and set it as a child of the left container even
3884 though it wasn't visible.
3886 Performing the layout of a ButtonsContainer should really happen immediately when we set the buttons, so in this
3887 patch we remove the "buttons" property and clients of ButtonsContainer can simply add or remove children which
3888 will be laid out in a row. To support this, we've added two notification methods to LayoutNode, one that indicates
3889 when children have changed, didChangeChildren(), which we override in ButtonsContainer to perform a synchronous
3890 layout. The other method is willRemoveChild() which we also override in ButtonsContainer, this time to reset
3891 the "x" and "visible" properties which we set while performing layout.
3893 This fixes flakiness for media/modern-media-controls/start-support/start-support-click-to-start.html, and maybe
3894 other modern-media-controls tests that could have been affected by this unexpected behavior.
3896 * Modules/modern-media-controls/controls/buttons-container.js:
3897 (ButtonsContainer.prototype.willRemoveChild):
3898 (ButtonsContainer.prototype.didChangeChildren):
3899 (ButtonsContainer.prototype.layout):
3900 (ButtonsContainer.prototype.get buttons): Deleted.
3901 (ButtonsContainer.prototype.set buttons): Deleted.
3902 * Modules/modern-media-controls/controls/inline-media-controls.js:
3903 (InlineMediaControls.prototype.layout):
3904 (InlineMediaControls.prototype._updateBottomControlsBarLabel):
3905 (InlineMediaControls.prototype._addTopRightBarWithMuteButtonToChildren):
3906 (InlineMediaControls):
3907 * Modules/modern-media-controls/controls/layout-node.js:
3908 (LayoutNode.prototype.set children):
3909 (LayoutNode.prototype.addChild):
3910 (LayoutNode.prototype.removeChild):
3911 (LayoutNode.prototype.willRemoveChild):
3912 (LayoutNode.prototype.didChangeChildren):
3913 * Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js:
3914 (MacOSFullscreenMediaControls.prototype.layout):
3915 * Modules/modern-media-controls/media/media-controller.js: Drive-by fix to correctly set the value passed as
3916 data-auto-hide-delay on a <video> element.
3918 2018-01-31 Zalan Bujtas <zalan@apple.com>
3920 [RenderTreeBuilder] Move RenderMultiColumnFlow::resolveMovedChild to RenderTreeBuilder.
3921 https://bugs.webkit.org/show_bug.cgi?id=182315
3922 <rdar://problem/37048160>
3924 Reviewed by Antti Koivisto.
3926 resolveMovedChild() is only called from RenderTreeBuilder.
3928 No change in functionality.
3930 * rendering/RenderFragmentedFlow.h:
3931 * rendering/RenderMultiColumnFlow.cpp:
3932 (WebCore::RenderMultiColumnFlow::resolveMovedChild const): Deleted.
3933 * rendering/RenderMultiColumnFlow.h:
3934 * rendering/updating/RenderTreeBuilder.cpp:
3935 (WebCore::RenderTreeBuilder::resolveMovedChildForMultiColumnFlow):
3936 * rendering/updating/RenderTreeBuilder.h:
3937 * rendering/updating/RenderTreeBuilderBlockFlow.cpp:
3938 (WebCore::RenderTreeBuilder::BlockFlow::insertChild):
3939 * rendering/updating/RenderTreeBuilderInline.cpp:
3940 (WebCore::RenderTreeBuilder::Inline::insertChild):
3941 * rendering/updating/RenderTreeBuilderMultiColumn.cpp:
3942 (WebCore::RenderTreeBuilder::MultiColumn::resolveMovedChild):
3943 * rendering/updating/RenderTreeBuilderMultiColumn.h:
3945 2018-01-31 Philippe Normand <pnormand@igalia.com>
3947 [GStreamer] Silent WebAudio buffers support
3948 https://bugs.webkit.org/show_bug.cgi?id=143869
3950 Reviewed by Carlos Garcia Campos.
3952 * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
3953 (webKitWebAudioSrcLoop): Flag silent buffers as GAP buffers. This
3954 enables downstream elements to optimize the buffer processing.
3956 2018-01-31 Xabier Rodriguez Calvar <calvaris@igalia.com>
3958 [EME] Fix NavigatorEME::tryNextSupportedConfiguration typo
3959 https://bugs.webkit.org/show_bug.cgi?id=182324
3961 Reviewed by Žan Doberšek.
3963 * Modules/encryptedmedia/NavigatorEME.cpp:
3964 (WebCore::tryNextSupportedConfiguration): Fix
3965 candidateCofiguration typo.
3967 2018-01-30 Fujii Hironori <Hironori.Fujii@sony.com>