[MediaStream] 'devicechange' event should not fire in frames that can't access captur...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2018-12-07  Eric Carlson  <eric.carlson@apple.com>
2
3         [MediaStream] 'devicechange' event should not fire in frames that can't access capture devices
4         https://bugs.webkit.org/show_bug.cgi?id=192511
5         <rdar://problem/46562063>
6
7         Reviewed by Youenn Fablet.
8
9         Test: http/tests/media/media-stream/device-change-event-in-iframe.html
10
11         * Modules/mediastream/MediaDevices.cpp:
12         (WebCore::MediaDevices::addEventListener): Don't fire the event unless the document can
13         access a camera or microphone.
14
15 2018-12-07  Eric Carlson  <eric.carlson@apple.com>
16
17         [MediaStream] Address post-review comments after r238904
18         https://bugs.webkit.org/show_bug.cgi?id=192514
19         <rdar://problem/46564302>
20
21         Reviewed by Youenn Fablet.
22
23         No new tests, no functional change.
24
25         * platform/graphics/cv/ImageTransferSessionVT.mm:
26         (WebCore::ImageTransferSessionVT::setSize):
27         * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:
28         (WebCore::ScreenDisplayCaptureSourceMac::createDisplayStream):
29
30 2018-12-07  Antti Koivisto  <antti@apple.com>
31
32         [LFC] Rename LayoutFormattingState files to LayoutState
33         https://bugs.webkit.org/show_bug.cgi?id=192520
34
35         Reviewed by Zalan Bujtas.
36
37         Match the class name.
38
39         * layout/FormattingContext.cpp:
40         * layout/FormattingContextQuirks.cpp:
41         * layout/FormattingState.h:
42         * layout/LayoutFormattingState.cpp: Removed.
43         * layout/LayoutFormattingState.h: Removed.
44         * layout/LayoutState.cpp: Copied from Source/WebCore/layout/LayoutFormattingState.cpp.
45         * layout/LayoutState.h: Copied from Source/WebCore/layout/LayoutFormattingState.h.
46         * layout/Verification.cpp:
47         * layout/blockformatting/BlockFormattingContext.cpp:
48         * layout/blockformatting/BlockFormattingContextQuirks.cpp:
49         * layout/blockformatting/BlockInvalidation.cpp:
50         * layout/floats/FloatAvoider.cpp:
51         * layout/floats/FloatingContext.cpp:
52         * layout/floats/FloatingState.cpp:
53         * layout/inlineformatting/InlineFormattingContext.cpp:
54         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
55         * layout/inlineformatting/InlineInvalidation.cpp:
56         * layout/layouttree/LayoutTreeBuilder.cpp:
57         * page/FrameViewLayoutContext.cpp:
58
59 2018-12-07  Justin Michaud  <justin_michaud@apple.com>
60
61         CSS Painting API code cleanup
62         https://bugs.webkit.org/show_bug.cgi?id=192480
63
64         Reviewed by Dean Jackson.
65
66         No new tests, since the existing tests should cover it.
67
68         * bindings/js/JSDOMWrapper.cpp:
69         (WebCore::outputConstraintSubspaceFor):
70         (WebCore::globalObjectOutputConstraintSubspaceFor):
71         * bindings/js/JSWorkletGlobalScopeBase.cpp:
72         (WebCore::toJS):
73         * css/CSSPaintCallback.h:
74         * platform/graphics/CustomPaintImage.cpp:
75         (WebCore::CustomPaintImage::doCustomPaint):
76         * platform/graphics/CustomPaintImage.h:
77         * rendering/style/RenderStyle.cpp:
78         (WebCore::RenderStyle::addCustomPaintWatchProperty):
79         (WebCore::changedCustomPaintWatchedProperty):
80         (WebCore::RenderStyle::changeRequiresRepaint const):
81         * worklets/PaintWorkletGlobalScope.cpp:
82         (WebCore::PaintWorkletGlobalScope::registerPaint):
83         * worklets/PaintWorkletGlobalScope.h:
84
85 2018-12-07  Youenn Fablet  <youenn@apple.com>
86
87         Update libwebrtc up to 0d007d7c4f
88         https://bugs.webkit.org/show_bug.cgi?id=192316
89
90         Reviewed by Eric Carlson.
91
92         Update include according new libwebrtc.
93
94         * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
95
96 2018-12-07  Dean Jackson  <dino@apple.com>
97
98         [iOS] Make WebGPU work with remote layer hosting
99         https://bugs.webkit.org/show_bug.cgi?id=192508
100         <rdar://problem/46560649>
101
102         Reviewed by Tim Horton.
103
104         WebGPU wasn't working on iOS because we were not correctly
105         identifying the CALayers for remote hosting. Fix this by
106         adding a new CALayer type, WebGPULayer. This will also
107         eventually hold the code to render WebGPU into a canvas.
108
109         Covered by the existing reference tests (on device).
110
111         * SourcesCocoa.txt: Add new files.
112         * WebCore.xcodeproj/project.pbxproj: Ditto.
113
114         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: Recognise the WebGPULayer
115         class for remote hosting.
116         (WebCore::PlatformCALayerCocoa::layerTypeForPlatformLayer):
117         (WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
118
119         * platform/graphics/cocoa/WebGPULayer.h: Added. Very simple inheritance
120         from CAMetalLayer.
121         * platform/graphics/cocoa/WebGPULayer.mm: Added.
122         (-[WebGPULayer init]):
123         (-[WebGPULayer copyImageSnapshotWithColorSpace:]):
124
125         * platform/graphics/gpu/GPUSwapChain.h: Reference WebGPULayer rather
126         than CALayer.
127
128         * platform/graphics/gpu/cocoa/GPUSwapChainMetal.mm: Ensure that
129         the WebGPULayer has a reference back to this object, which it
130         will use in the future.
131         (WebCore::GPUSwapChain::create):
132         (WebCore::GPUSwapChain::GPUSwapChain):
133
134 2018-12-07  Antti Koivisto  <antti@apple.com>
135
136         Rename LayoutState to RenderLayoutState
137         https://bugs.webkit.org/show_bug.cgi?id=192504
138
139         Reviewed by Zalan Bujtas.
140
141         The name is better used in LFC.
142
143         * Sources.txt:
144         * WebCore.xcodeproj/project.pbxproj:
145         * page/FrameViewLayoutContext.cpp:
146         (WebCore::FrameViewLayoutContext::layoutState const):
147         (WebCore::FrameViewLayoutContext::pushLayoutState):
148         (WebCore::FrameViewLayoutContext::pushLayoutStateForPaginationIfNeeded):
149         * page/FrameViewLayoutContext.h:
150         * rendering/LayoutState.cpp: Removed.
151         * rendering/LayoutState.h: Removed.
152         * rendering/RenderBlock.cpp:
153         * rendering/RenderBlock.h:
154         * rendering/RenderBlockFlow.cpp:
155         (WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
156         * rendering/RenderBlockLineLayout.cpp:
157         * rendering/RenderBox.cpp:
158         * rendering/RenderEmbeddedObject.cpp:
159         * rendering/RenderFragmentedFlow.cpp:
160         * rendering/RenderGrid.cpp:
161         * rendering/RenderImage.cpp:
162         * rendering/RenderInline.cpp:
163         * rendering/RenderLayoutState.cpp: Copied from Source/WebCore/rendering/LayoutState.cpp.
164         (WebCore::RenderLayoutState::RenderLayoutState):
165         (WebCore::RenderLayoutState::computeOffsets):
166         (WebCore::RenderLayoutState::computeClipRect):
167         (WebCore::RenderLayoutState::computePaginationInformation):
168         (WebCore::RenderLayoutState::pageLogicalOffset const):
169         (WebCore::RenderLayoutState::computeLineGridPaginationOrigin):
170         (WebCore::RenderLayoutState::propagateLineGridInfo):
171         (WebCore::RenderLayoutState::establishLineGrid):
172         (WebCore::RenderLayoutState::addLayoutDelta):
173         (WebCore::RenderLayoutState::layoutDeltaMatches const):
174         (WebCore::LayoutState::LayoutState): Deleted.
175         (WebCore::LayoutState::computeOffsets): Deleted.
176         (WebCore::LayoutState::computeClipRect): Deleted.
177         (WebCore::LayoutState::computePaginationInformation): Deleted.
178         (WebCore::LayoutState::pageLogicalOffset const): Deleted.
179         (WebCore::LayoutState::computeLineGridPaginationOrigin): Deleted.
180         (WebCore::LayoutState::propagateLineGridInfo): Deleted.
181         (WebCore::LayoutState::establishLineGrid): Deleted.
182         (WebCore::LayoutState::addLayoutDelta): Deleted.
183         (WebCore::LayoutState::layoutDeltaMatches const): Deleted.
184         * rendering/RenderLayoutState.h: Copied from Source/WebCore/rendering/LayoutState.h.
185         (WebCore::RenderLayoutState::RenderLayoutState):
186         (WebCore::LayoutState::LayoutState): Deleted.
187         (WebCore::LayoutState::isPaginated const): Deleted.
188         (WebCore::LayoutState::pageLogicalHeight const): Deleted.
189         (WebCore::LayoutState::pageLogicalHeightChanged const): Deleted.
190         (WebCore::LayoutState::lineGrid const): Deleted.
191         (WebCore::LayoutState::lineGridOffset const): Deleted.
192         (WebCore::LayoutState::lineGridPaginationOrigin const): Deleted.
193         (WebCore::LayoutState::paintOffset const): Deleted.
194         (WebCore::LayoutState::layoutOffset const): Deleted.
195         (WebCore::LayoutState::pageOffset const): Deleted.
196         (WebCore::LayoutState::needsBlockDirectionLocationSetBeforeLayout const): Deleted.
197         (WebCore::LayoutState::renderer const): Deleted.
198         (WebCore::LayoutState::clipRect const): Deleted.
199         (WebCore::LayoutState::isClipped const): Deleted.
200         (WebCore::LayoutState::layoutDelta const): Deleted.
201         * rendering/RenderListBox.cpp:
202         * rendering/RenderMediaControlElements.cpp:
203         * rendering/RenderMultiColumnFlow.cpp:
204         * rendering/RenderTable.cpp:
205         * rendering/RenderTableRow.cpp:
206         * rendering/RenderTableSection.cpp:
207         * rendering/RenderVTTCue.cpp:
208         * rendering/RenderView.cpp:
209         * rendering/RenderView.h:
210         * rendering/RootInlineBox.cpp:
211         * rendering/svg/RenderSVGRoot.cpp:
212         (WebCore::RenderSVGRoot::layout):
213
214 2018-12-07  Antti Koivisto  <antti@apple.com>
215
216         [LFC] Rename formattingContext() to createFormattingContext()
217         https://bugs.webkit.org/show_bug.cgi?id=192500
218
219         Reviewed by Zalan Bujtas.
220
221         * layout/FormattingContext.cpp:
222         (WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const):
223         * layout/FormattingState.h:
224         * layout/LayoutFormattingState.cpp:
225         (WebCore::Layout::LayoutState::layoutFormattingContextSubtree):
226         * layout/blockformatting/BlockFormattingState.cpp:
227         (WebCore::Layout::BlockFormattingState::createFormattingContext):
228         (WebCore::Layout::BlockFormattingState::formattingContext): Deleted.
229         * layout/blockformatting/BlockFormattingState.h:
230         * layout/inlineformatting/InlineFormattingContext.cpp:
231         (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot const):
232         * layout/inlineformatting/InlineFormattingState.h:
233
234 2018-12-07  Truitt Savell  <tsavell@apple.com>
235
236         Unreviewed, rolling out r238947.
237
238         Revision caused fast/visual-viewport/tiled-drawing/zoomed-
239         fixed-scrolling-layers-state.html to constantly fail
240
241         Reverted changeset:
242
243         "Allow control over child order when adding nodes to the
244         scrolling tree"
245         https://bugs.webkit.org/show_bug.cgi?id=176914
246         https://trac.webkit.org/changeset/238947
247
248 2018-12-07  Wenson Hsieh  <wenson_hsieh@apple.com>
249
250         [Attachment Support] Cloned attachment elements lose their unique identifiers
251         https://bugs.webkit.org/show_bug.cgi?id=192483
252
253         Reviewed by Tim Horton.
254
255         This patch adds logic to ensure that the unique identifier of a cloned attachment element is the same as the
256         unique identifier of the original attachment element. If the cloned attachment is inserted into the same
257         document as the original attachment, then we will exercise the same codepath for copied-and-pasted attachments,
258         and assign a new unique identifier to the attachment element, while creating a new `_WKAttachment` in the client
259         that's backed by the same `NSFileWrapper`.
260
261         Test: WKAttachmentTests.AttachmentIdentifierOfClonedAttachment
262
263         * html/HTMLAttachmentElement.cpp:
264         (WebCore::HTMLAttachmentElement::copyNonAttributePropertiesFromElement):
265         * html/HTMLAttachmentElement.h:
266
267 2018-12-07  Rob Buis  <rbuis@igalia.com>
268
269         Merge parseAccessControlExposeHeadersAllowList into parseAccessControlAllowList
270         https://bugs.webkit.org/show_bug.cgi?id=192288
271
272         Reviewed by Frédéric Wang.
273
274         Merge parseAccessControlExposeHeadersAllowList into parseAccessControlAllowList
275         as they do the same thing. Also remove std::optional from parseAccessControlAllowList
276         since the function can't fail.
277
278         * WebCore.order:
279         * loader/CrossOriginAccessControl.cpp:
280         (WebCore::validatePreflightResponse):
281         * loader/CrossOriginPreflightResultCache.cpp:
282         (WebCore::CrossOriginPreflightResultCacheItem::parse):
283         * loader/CrossOriginPreflightResultCache.h:
284         * platform/network/HTTPParsers.cpp:
285         (WebCore::parseAccessControlExposeHeadersAllowList): Deleted.
286         * platform/network/HTTPParsers.h:
287         (WebCore::parseAccessControlAllowList):
288         * platform/network/ResourceResponseBase.cpp:
289         (WebCore::ResourceResponseBase::filter):
290         (WebCore::ResourceResponseBase::sanitizeHTTPHeaderFieldsAccordingToTainting):
291
292 2018-12-07  Eric Carlson  <eric.carlson@apple.com>
293
294         [iOS] Don't update AVPlayerViewController currentTime while scrubbing
295         https://bugs.webkit.org/show_bug.cgi?id=192438
296         <rdar://problem/42977046>
297
298         Reviewed by Jer Noble.
299
300         No new tests, tested manually.
301
302         * platform/ios/PlaybackSessionInterfaceAVKit.mm:
303         (WebCore::PlaybackSessionInterfaceAVKit::currentTimeChanged): Don't report change during scrubbing.
304
305         * platform/ios/WebAVPlayerController.h:
306         * platform/ios/WebAVPlayerController.mm:
307         (-[WebAVPlayerController beginScrubbing:]): Set _isScrubbing.
308         (-[WebAVPlayerController endScrubbing:]): Ditto.
309         (-[WebAVPlayerController isScrubbing]): Return _isScrubbing.
310
311 2018-12-07  Thibault Saunier  <tsaunier@igalia.com>
312
313         [WPE][GTK] Implement WebAudioSourceProviderGStreamer to allow bridging MediaStream and the WebAudio APIs
314         https://bugs.webkit.org/show_bug.cgi?id=186933
315
316         Reusing the AudioSourceProviderGStreamer itself as it was doing almost everything we needed,
317         just added a constructor to be able to create it from a MediaStreamTrackPrivate and made it a
318         WebAudioSourceProvider which only means it is now a ThreadSafeRefCounted.
319
320         Sensibily refactored GStreamerMediaStreamSource so that we could reuse it to track a single
321         MediaStreamTrack.
322
323         Reviewed by Philippe Normand.
324
325         Enabled all tests depending on that feature.
326
327         * platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:
328         (WebCore::AudioSourceProviderGStreamer::AudioSourceProviderGStreamer):
329         (WebCore::AudioSourceProviderGStreamer::~AudioSourceProviderGStreamer):
330         (WebCore::AudioSourceProviderGStreamer::setClient):
331         * platform/audio/gstreamer/AudioSourceProviderGStreamer.h:
332         * platform/mediastream/MediaStreamTrackPrivate.cpp:
333         (WebCore::MediaStreamTrackPrivate::audioSourceProvider):
334         * platform/mediastream/gstreamer/GStreamerAudioCapturer.cpp:
335         (WebCore::GStreamerAudioCapturer::GStreamerAudioCapturer):
336         * platform/mediastream/gstreamer/GStreamerAudioStreamDescription.h:
337         * platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
338         (WebCore::webkitMediaStreamSrcSetupSrc):
339         (WebCore::webkitMediaStreamSrcSetupAppSrc):
340         (WebCore::webkitMediaStreamSrcAddTrack):
341         (WebCore::webkitMediaStreamSrcSetStream):
342         (WebCore::webkitMediaStreamSrcNew):
343         * platform/mediastream/gstreamer/GStreamerMediaStreamSource.h:
344         * platform/mediastream/gstreamer/MockGStreamerAudioCaptureSource.cpp:
345         (WebCore::WrappedMockRealtimeAudioSource::WrappedMockRealtimeAudioSource):
346         (WebCore::WrappedMockRealtimeAudioSource::start):
347         (WebCore::WrappedMockRealtimeAudioSource::addHum):
348         (WebCore::WrappedMockRealtimeAudioSource::render):
349         (WebCore::WrappedMockRealtimeAudioSource::settingsDidChange):
350         (WebCore::MockGStreamerAudioCaptureSource::startProducingData):
351         * platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceLibWebRTC.cpp:
352         (WebCore::RealtimeOutgoingAudioSourceLibWebRTC::pullAudioData): Handle the case where input buffers
353           are "big" and process all the data we can for each runs of the method.
354
355 2018-12-06  Alexey Proskuryakov  <ap@apple.com>
356
357         Move USE_NEW_THEME out of WebCore's config.h
358         https://bugs.webkit.org/show_bug.cgi?id=192426
359
360         Reviewed by Tim Horton.
361
362         * config.h:
363
364 2018-12-06  Frederic Wang  <fwang@igalia.com>
365
366         Allow control over child order when adding nodes to the scrolling tree
367         https://bugs.webkit.org/show_bug.cgi?id=176914
368
369         Reviewed by Simon Fraser.
370
371         Based on an earlier patch by Simon Fraser.
372
373         Previously ScrollingCoordinator just allowed nodes to be "attached" with a given parent,
374         but with no control over sibling order. To allow for correct hit-testing overflow and
375         frame scrolling nodes, we have to build the scrolling tree in z-order.
376
377         This patch adds a 'childIndex' parameter to attachNode() which gives control over
378         sibling order. For now, RenderLayerCompositor always uses the default 'notFound' value
379         for childIndex so the current behavior (appending new nodes at the end of child list) is
380         preserved.
381
382         No new tests, behavior unchanged and already covered by existing tests.
383
384         * page/scrolling/AsyncScrollingCoordinator.cpp:
385         (WebCore::AsyncScrollingCoordinator::attachToStateTree):
386         (WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView):
387         * page/scrolling/AsyncScrollingCoordinator.h:
388         * page/scrolling/ScrollingCoordinator.h:
389         (WebCore::ScrollingCoordinator::attachToStateTree):
390         * page/scrolling/ScrollingStateNode.cpp:
391         (WebCore::ScrollingStateNode::insertChild):
392         (WebCore::ScrollingStateNode::indexOfChild const):
393         * page/scrolling/ScrollingStateNode.h:
394         * page/scrolling/ScrollingStateTree.cpp:
395         (WebCore::ScrollingStateTree::nodeTypeAndParentMatch const):
396         (WebCore::ScrollingStateTree::attachNode):
397         * page/scrolling/ScrollingStateTree.h:
398
399 2018-12-06  Yongjun Zhang  <yongjun_zhang@apple.com>
400
401         We should ignore minimumEffectiveDeviceWidth if the page specifies device-width in viewport meta-tag.
402         https://bugs.webkit.org/show_bug.cgi?id=192377
403         <rdar://problem/46364206>
404
405         Reviewed by Tim Horton.
406
407         If the page specifies width=device-width or initial-scale=1 in the viewport meta tag, we should use the
408         native device width and ignore the minimum effective device width in ViewportConfiguration. The patch
409         also introduces scalableNativeWebpageParameters() which uses the device width as default and also allows the page
410         to shrink-to-fit. If a page doesn't have viewport meta tag, or if the width argument isn't device-width
411         and the initial scale isn't 1, we will use scalableNativeWebpageParameters() as the default configuration.
412
413         Tests: fast/viewport/ios/ignore-minimum-device-width-for-page-with-viewport-device-width.html
414                fast/viewport/ios/use-minimum-device-width-for-page-without-viewport-meta.html
415
416         * page/ViewportConfiguration.cpp:
417         (WebCore::ViewportConfiguration::updateDefaultConfiguration): pick the default configuration based on
418             the page's viewport arguments. Also, we will always fall back to scalableNativeWebpageParameters() if we
419             can ignore scaling constraints.
420         (WebCore::ViewportConfiguration::setViewportArguments): When page sends us new ViewportArguments, pick
421             up the correponsding default configuration before updating the configuration.
422         (WebCore::ViewportConfiguration::setCanIgnoreScalingConstraints): When m_canIgnoreScalingConstraints is
423             changed, try to pick up the correponsding default configuration.
424         (WebCore::ViewportConfiguration::scalableNativeWebpageParameters): Add a new default set of viewport Parameters
425             this is very close to nativeWebpageParameters() excpet that it allows shrink to fit and its minimum scale
426             is 0.25. We will use this Parameters for pages that doesn't have viewport meta tag; or the width is
427             not device-width and initial scale is not 1.
428         (WebCore::ViewportConfiguration::updateConfiguration): If the page's viewport argument doesn't override
429             the default width, use the m_minimumLayoutSize.width().
430         * page/ViewportConfiguration.h:
431         (WebCore::ViewportConfiguration::shouldIgnoreMinimumEffectiveDeviceWidth const): A helper method to tell
432             if we should avoid using minimum effective device width.
433         (WebCore::ViewportConfiguration::canOverrideConfigurationParameters const): If we are using a default
434             configuration that is neither nativeWebpageParameters() nor scalableNativeWebpageParameters(), don't override
435             it.
436         (WebCore::ViewportConfiguration::minimumEffectiveDeviceWidth const): Add a helper method to return minimum
437             effective device width based on shouldIgnoreMinimumEffectiveDeviceWidth().
438         (WebCore::ViewportConfiguration::effectiveLayoutSizeScaleFactor const): Use minimumEffectiveDeviceWidth().
439
440 2018-12-06  Adrian Perez de Castro  <aperez@igalia.com>
441
442         Content Extensions: Misc fixes to debugging / perf testing code
443         https://bugs.webkit.org/show_bug.cgi?id=192474
444
445         Reviewed by Mark Lam.
446
447         This make it possible to build the content extensions support with the
448         debugging features enabled. In particular, building with
449         CONTENT_EXTENSIONS_PERFORMANCE_REPORTING enabled was broken.
450
451         No new tests needed.
452
453         * contentextensions/ContentExtensionCompiler.cpp:
454         (WebCore::ContentExtensions::compileRuleList): Remove usage of removed
455         variables machinesWihthoutConditionsCount,
456         totalBytecodeSizeForMachinesWithoutConditions,
457         machinesWithConditionsCount, and
458         totalBytecodeSizeForMachinesWithConditions.
459         * contentextensions/DFA.cpp:
460         (WebCore::ContentExtensions::DFA::debugPrintDot const):
461         Use "%" PRIu64 instead of "%llu" to format uint64_t values.
462         * contentextensions/NFA.cpp:
463         (WebCore::ContentExtensions::NFA::debugPrintDot const):
464         Use "%" PRIu64 instead of "%llu" to format uint64_t values.
465
466 2018-12-06  Alex Christensen  <achristensen@webkit.org>
467
468         Remove unused LoaderStrategy::storeDerivedDataToCache and associated dead code
469         https://bugs.webkit.org/show_bug.cgi?id=192452
470
471         Reviewed by Anders Carlsson.
472
473         * loader/LoaderStrategy.h:
474         * loader/ResourceLoader.cpp:
475         (WebCore::ResourceLoader::didRetrieveDerivedDataFromCache): Deleted.
476         * loader/ResourceLoader.h:
477         * loader/ResourceLoaderOptions.h:
478         * loader/SubresourceLoader.cpp:
479         (WebCore::SubresourceLoader::didRetrieveDerivedDataFromCache): Deleted.
480         * loader/SubresourceLoader.h:
481         * loader/ThreadableLoader.cpp:
482         (WebCore::ThreadableLoaderOptions::isolatedCopy const):
483         * loader/cache/CachedResource.h:
484         (WebCore::CachedResource::didRetrieveDerivedDataFromCache): Deleted.
485
486 2018-12-06  Zalan Bujtas  <zalan@apple.com>
487
488         [LFC][BFC][MarginCollapsing] HeightAndMargin::margin is always the non-collapsed margin value.
489         https://bugs.webkit.org/show_bug.cgi?id=192345
490
491         Reviewed by Antti Koivisto.
492
493         Rename HeightAndMargin::margin to HeightAndMargin::nonCollapsedMargin.
494
495         * layout/FormattingContext.cpp:
496         (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry const):
497         * layout/LayoutUnits.h:
498         (WebCore::Layout::HeightAndMargin::usedMarginValues const):
499         * layout/blockformatting/BlockFormattingContext.cpp:
500         (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin const):
501         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
502         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
503         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
504         * layout/blockformatting/BlockFormattingContextQuirks.cpp:
505         (WebCore::Layout::BlockFormattingContext::Quirks::stretchedHeight):
506         * layout/inlineformatting/InlineFormattingContext.cpp:
507         (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin const):
508
509 2018-12-06  Zalan Bujtas  <zalan@apple.com>
510
511         [LFC][BFC][MarginCollapsing] Add MarginCollapse::establishesBlockFormattingContext
512         https://bugs.webkit.org/show_bug.cgi?id=192297
513
514         Reviewed by Antti Koivisto.
515
516         WebKit treats the document element renderer as a block formatting context root.
517
518         * layout/blockformatting/BlockMarginCollapse.cpp:
519         (WebCore::Layout::establishesBlockFormattingContext):
520         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::isMarginTopCollapsedWithParent):
521         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::isMarginBottomCollapsedWithParent):
522
523 2018-12-06  Carlos Eduardo Ramalho  <cadubentzen@gmail.com>
524
525         [GStreamer] -DENABLE_VIDEO=ON -DENABLE_OPENGL=OFF still tries to build GstreamerGL
526         https://bugs.webkit.org/show_bug.cgi?id=191998
527
528         Reviewed by Philippe Normand.
529
530         Fix compilation with -DENABLE_VIDEO=ON and -DENABLE_OPENGL=OFF due to GStreamerGL.
531
532         No new tests required. Only fixing the build with certain flags.
533
534         * Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:
535         (WebCore::CanvasCaptureMediaStreamTrack::Source::canvasChanged): add required #if ENABLE(WEBGL).
536
537 2018-12-06  Carlos Eduardo Ramalho  <cadubentzen@gmail.com>
538
539         REGRESSION(r231043): [GTK] Undefined references to WebCore::LayerRepresentation::* with -DENABLE_OPENGL=OFF builds
540         https://bugs.webkit.org/show_bug.cgi?id=191997
541
542         Reviewed by Philippe Normand.
543
544         Fix build with -DENABLE_OPENGL=OFF and -DENABLE_VIDEO=OFF.
545
546         No new tests required. Only fixing build.
547
548         * platform/gtk/PlatformWheelEventGtk.cpp:
549         (WebCore::PlatformWheelEvent::PlatformWheelEvent): add required #if ENABLE(ASYNC_SCROLLING)
550
551 2018-12-05  Don Olmstead  <don.olmstead@sony.com>
552
553         [PlayStation] Enable WebCore
554         https://bugs.webkit.org/show_bug.cgi?id=192384
555
556         Reviewed by Brent Fulgham.
557
558         Implements WebCore for the PlayStation platform.
559
560         * PlatformPlayStation.cmake: Added.
561         * loader/cache/CachedResourceLoader.cpp:
562         * platform/generic/KeyedDecoderGeneric.cpp: Added.
563         (WebCore::KeyedDecoder::decoder):
564         (WebCore::KeyedDecoderGeneric::KeyedDecoderGeneric):
565         (WebCore::KeyedDecoderGeneric::~KeyedDecoderGeneric):
566         (WebCore::KeyedDecoderGeneric::decodeBytes):
567         (WebCore::KeyedDecoderGeneric::decodeBool):
568         (WebCore::KeyedDecoderGeneric::decodeUInt32):
569         (WebCore::KeyedDecoderGeneric::decodeUInt64):
570         (WebCore::KeyedDecoderGeneric::decodeInt32):
571         (WebCore::KeyedDecoderGeneric::decodeInt64):
572         (WebCore::KeyedDecoderGeneric::decodeFloat):
573         (WebCore::KeyedDecoderGeneric::decodeDouble):
574         (WebCore::KeyedDecoderGeneric::decodeString):
575         (WebCore::KeyedDecoderGeneric::beginObject):
576         (WebCore::KeyedDecoderGeneric::endObject):
577         (WebCore::KeyedDecoderGeneric::beginArray):
578         (WebCore::KeyedDecoderGeneric::beginArrayElement):
579         (WebCore::KeyedDecoderGeneric::endArrayElement):
580         (WebCore::KeyedDecoderGeneric::endArray):
581         * platform/generic/KeyedDecoderGeneric.h: Added.
582         * platform/generic/KeyedEncoderGeneric.cpp: Added.
583         (WebCore::KeyedEncoder::encoder):
584         (WebCore::KeyedEncoderGeneric::KeyedEncoderGeneric):
585         (WebCore::KeyedEncoderGeneric::~KeyedEncoderGeneric):
586         (WebCore::KeyedEncoderGeneric::encodeBytes):
587         (WebCore::KeyedEncoderGeneric::encodeBool):
588         (WebCore::KeyedEncoderGeneric::encodeUInt32):
589         (WebCore::KeyedEncoderGeneric::encodeUInt64):
590         (WebCore::KeyedEncoderGeneric::encodeInt32):
591         (WebCore::KeyedEncoderGeneric::encodeInt64):
592         (WebCore::KeyedEncoderGeneric::encodeFloat):
593         (WebCore::KeyedEncoderGeneric::encodeDouble):
594         (WebCore::KeyedEncoderGeneric::encodeString):
595         (WebCore::KeyedEncoderGeneric::beginObject):
596         (WebCore::KeyedEncoderGeneric::endObject):
597         (WebCore::KeyedEncoderGeneric::beginArray):
598         (WebCore::KeyedEncoderGeneric::beginArrayElement):
599         (WebCore::KeyedEncoderGeneric::endArrayElement):
600         (WebCore::KeyedEncoderGeneric::endArray):
601         (WebCore::KeyedEncoderGeneric::finishEncoding):
602         * platform/generic/KeyedEncoderGeneric.h: Added.
603         * platform/network/curl/NetworkStorageSessionCurl.cpp:
604         (WebCore::defaultCookieJarPath):
605         * platform/network/playstation/CurlSSLHandlePlayStation.cpp: Added.
606         (WebCore::getCACertPathEnv):
607         (WebCore::CurlSSLHandle::platformInitialize):
608         * platform/network/playstation/NetworkStateNotifierPlayStation.cpp: Added.
609         (WebCore::NetworkStateNotifier::updateStateWithoutNotifying):
610         (WebCore::NetworkStateNotifier::startObserving):
611         * platform/playstation/EventLoopPlayStation.cpp: Added.
612         (WebCore::EventLoop::cycle):
613         * platform/playstation/MIMETypeRegistryPlayStation.cpp: Added.
614         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
615         (WebCore::MIMETypeRegistry::isApplicationPluginMIMEType):
616         (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
617         * platform/playstation/PlatformScreenPlayStation.cpp: Added.
618         (WebCore::screenDepth):
619         (WebCore::screenDepthPerComponent):
620         (WebCore::screenIsMonochrome):
621         (WebCore::screenHasInvertedColors):
622         (WebCore::screenRect):
623         (WebCore::screenAvailableRect):
624         (WebCore::screenSupportsExtendedColor):
625         * platform/playstation/ScrollbarThemePlayStation.cpp: Added.
626         (WebCore::ScrollbarTheme::nativeTheme):
627         (WebCore::ScrollbarThemePlayStation::scrollbarThickness):
628         (WebCore::ScrollbarThemePlayStation::hasButtons):
629         (WebCore::ScrollbarThemePlayStation::hasThumb):
630         (WebCore::ScrollbarThemePlayStation::backButtonRect):
631         (WebCore::ScrollbarThemePlayStation::forwardButtonRect):
632         (WebCore::ScrollbarThemePlayStation::trackRect):
633         (WebCore::ScrollbarThemePlayStation::paintTrackBackground):
634         (WebCore::ScrollbarThemePlayStation::paintThumb):
635         * platform/playstation/ScrollbarThemePlayStation.h: Added.
636         * platform/playstation/UserAgentPlayStation.cpp: Added.
637         (WebCore::standardUserAgent):
638         (WebCore::standardUserAgentForURL):
639         * rendering/RenderThemePlayStation.cpp: Added.
640         (WebCore::RenderTheme::singleton):
641         (WebCore::RenderThemePlayStation::updateCachedSystemFontDescription const):
642         * rendering/RenderThemePlayStation.h: Added.
643
644 2018-12-05  Ryosuke Niwa  <rniwa@webkit.org>
645
646         Null pointer crash in DocumentOrderedMap::getElementById via FormAssociatedElement::findAssociatedForm
647         https://bugs.webkit.org/show_bug.cgi?id=192392
648
649         Reviewed by Dean Jackson.
650
651         The crash was caused by FormAssociatedElement::findAssociatedForm invoking DocumentOrderedMap::getElementById
652         and de-referencing nullptr Attribute* via IdTargetObserver before Element::attributeChanged had updated
653         ElementData::m_idForStyleResolution.
654
655         Fixed it by updating m_idForStyleResolution before invoking IdTargetObservers.
656
657         Test: fast/dom/remove-id-form-associated-elemet-id-observer-crash.html
658
659         * dom/Element.cpp:
660         (WebCore::Element::attributeChanged): Fixed the bug.
661
662 2018-12-05  Youenn Fablet  <youenn@apple.com>
663
664         Enable the possibility to do video capture in UIProcess
665         https://bugs.webkit.org/show_bug.cgi?id=192394
666
667         Reviewed by Eric Carlson.
668
669         Create IOSurface-backed sample buffers so that we can easily send them through IPC.
670         Manually tested.
671
672         * platform/mediastream/mac/AVVideoCaptureSource.mm:
673         (WebCore::AVVideoCaptureSource::setSizeAndFrameRateWithPreset):
674
675 2018-12-05  Youenn Fablet  <youenn@apple.com>
676
677         Update ServiceWorkerContainer::getRegistration lambdas
678         https://bugs.webkit.org/show_bug.cgi?id=192376
679
680         Reviewed by Chris Dumez.
681
682         There is no need to pass 'this' in lambdas as the last lambda
683         takes a ScriptExecutionContext&.
684         No change of behavior.
685
686         * workers/service/ServiceWorkerContainer.cpp:
687         (WebCore::ServiceWorkerContainer::getRegistration):
688         (WebCore::ServiceWorkerContainer::getRegistrations):
689
690 2018-12-05  Chris Dumez  <cdumez@apple.com>
691
692         Crash under WebCore::cachedDocumentWrapper()
693         https://bugs.webkit.org/show_bug.cgi?id=192421
694         <rdar://problem/37114163>
695
696         Reviewed by Alex Christensen.
697
698         Fix potential null defererence of the value returned by toJSDOMWindow(). For example,
699         if the window is frameless, it would return null.
700
701         * bindings/js/JSDocumentCustom.cpp:
702         (WebCore::cachedDocumentWrapper):
703
704 2018-12-05  Eric Carlson  <eric.carlson@apple.com>
705
706         [MediaStream] Cleanup up Mac screen capture class
707         https://bugs.webkit.org/show_bug.cgi?id=192379
708         <rdar://problem/46465458>
709
710         Reviewed by Youenn Fablet.
711
712         No new tests, tested manually.
713
714         * platform/mediastream/mac/DisplayCaptureManagerCocoa.cpp:
715         (WebCore::DisplayCaptureManagerCocoa::captureDevices): Initialize Screen devices first so
716         they are first in the list of devices.
717
718         * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.h:
719         * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:
720         (WebCore::ScreenDisplayCaptureSourceMac::createDisplayStream): Cleanup. Always capture at the
721         native screen size to work around a bug.
722         (WebCore::ScreenDisplayCaptureSourceMac::settingsDidChange): Deleted.
723
724 2018-12-05  Commit Queue  <commit-queue@webkit.org>
725
726         Unreviewed, rolling out r238844, r238846, and r238874.
727         https://bugs.webkit.org/show_bug.cgi?id=192414
728
729         The layout tests added with this change are flaky. (Requested
730         by ryanhaddad on #webkit).
731
732         Reverted changesets:
733
734         "Implement non-timeslice mode encoding for MediaRecorder"
735         https://bugs.webkit.org/show_bug.cgi?id=192069
736         https://trac.webkit.org/changeset/238844
737
738         "Fix the build"
739         https://trac.webkit.org/changeset/238846
740
741         "Fix MediaRecorder flaky tests"
742         https://bugs.webkit.org/show_bug.cgi?id=192371
743         https://trac.webkit.org/changeset/238874
744
745 2018-12-05  Frederic Wang  <fwang@igalia.com>
746
747         Minor refactoring of the scrolling code
748         https://bugs.webkit.org/show_bug.cgi?id=192398
749
750         Reviewed by Simon Fraser.
751
752         Based on an earlier patch by Simon Fraser.
753
754         This patch performs some minor refactoring of the scrolling code:
755         - Rename ScrollingCoordinator::uniqueScrollLayerID() to uniqueScrollingNodeID() since it
756           is really a node id.
757         - Inline ScrollingStateTree::setRootStateNode() so we only need to forward declare
758           ScrollingStateFrameScrollingNode in headers.
759         - Pass argument to ScrollingStateTree::addNode() as a reference rather than a pointer.
760         - Initialize ScrollingStateTree::m_changedProperties and ScrollingStateTree::m_parent in
761           the header file.
762         - Remove obsolete comment about ScrollingCoordinatorMac.
763
764         No new tests, behavior unchanged.
765
766         * page/scrolling/ScrollingCoordinator.cpp:
767         (WebCore::ScrollingCoordinator::uniqueScrollingNodeID):
768         (WebCore::ScrollingCoordinator::uniqueScrollLayerID): Deleted.
769         * page/scrolling/ScrollingCoordinator.h:
770         * page/scrolling/ScrollingStateNode.cpp:
771         (WebCore::ScrollingStateNode::ScrollingStateNode):
772         * page/scrolling/ScrollingStateNode.h:
773         * page/scrolling/ScrollingStateTree.cpp:
774         (WebCore::ScrollingStateTree::attachNode):
775         (WebCore::ScrollingStateTree::setRootStateNode):
776         (WebCore::ScrollingStateTree::addNode):
777         * page/scrolling/ScrollingStateTree.h:
778         (WebCore::ScrollingStateTree::setRootStateNode): Deleted.
779         * page/scrolling/ScrollingTree.cpp:
780         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
781         * rendering/RenderLayerCompositor.cpp:
782         (WebCore::RenderLayerCompositor::attachScrollingNode):
783
784 2018-12-05  Wenson Hsieh  <wenson_hsieh@apple.com>
785
786         Turn WritingDirection into an enum class
787         https://bugs.webkit.org/show_bug.cgi?id=192401
788         Work towards <rdar://problem/42075638>
789
790         Reviewed by Dan Bernstein.
791
792         Change WritingDirection from an enum to an enum class. No change in behavior.
793
794         * editing/ApplyStyleCommand.cpp:
795         (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
796         (WebCore::ApplyStyleCommand::applyInlineStyle):
797         * editing/EditingStyle.cpp:
798         (WebCore::EditingStyle::textDirection const):
799         (WebCore::EditingStyle::textDirectionForSelection):
800         * editing/Editor.cpp:
801         (WebCore::Editor::setBaseWritingDirection):
802         (WebCore::Editor::baseWritingDirectionForSelectionStart const):
803         * editing/EditorCommand.cpp:
804         (WebCore::stateTextWritingDirectionLeftToRight):
805         (WebCore::stateTextWritingDirectionNatural):
806         (WebCore::stateTextWritingDirectionRightToLeft):
807         * editing/WritingDirection.h:
808
809         Additionally wrap this enum in `namespace WebCore`, and update the copyright year.
810
811         * editing/ios/EditorIOS.mm:
812         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
813         * page/ContextMenuController.cpp:
814         (WebCore::ContextMenuController::contextMenuItemSelected):
815         * testing/Internals.cpp:
816         (WebCore::Internals::setBaseWritingDirection):
817
818 2018-12-05  Alicia Boya García  <aboya@igalia.com>
819
820         [MSE][GStreamer] Remove the AppendPipeline state machine
821         https://bugs.webkit.org/show_bug.cgi?id=192204
822
823         Reviewed by Xabier Rodriguez-Calvar.
824
825         This patch tries to reduce the complexity of the AppendPipeline by
826         removing the appendState state machine and cleaning all the
827         conditional code around it that is not necessary anymore.
828
829         For the most part the behavior is the same, but some edge cases have
830         been improved in the process:
831
832         Demuxing errors now result in the append being flagged as
833         ParsingFailed and the error being propagated to the application. This
834         fixes media/media-source/media-source-error-crash.html (or at least
835         gets it up to date with cross platform expectations).
836
837         AbortableTaskQueue now allows the task handler to perform an abort
838         safely. This is used in the GstBus error message sync handler, since
839         it needs to ask the MainThread to raise a parse error, which will in
840         turn abort. An API test has been added for this new functionality.
841         Also, code has been added to the API tests to ensure the correct
842         destruction of the response object, especially in this case.
843
844         The code handling invalid track codecs has been made clearer by also
845         explicitly raising a parse error, but it should not expose behavior
846         differences for the application. A test has been added for this
847         behavior: web-platform-tests/media-source/mediasource-invalid-codec.html
848
849         The reporting of EOS events have been made more rigorous. EOS is only
850         expected after a demuxing error, otherwise it's a g_critical.
851
852         AppendPipeline::abort() has been renamed to
853         AppendPipeline::resetParserState() to honor the fact that it's not
854         only called when the user calls abort() and match better the names
855         used in the spec.
856
857         Test: imported/w3c/web-platform-tests/media-source/mediasource-invalid-codec.html
858
859         * platform/AbortableTaskQueue.h:
860         * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
861         (WebCore::assertedElementSetState):
862         (WebCore::AppendPipeline::AppendPipeline):
863         (WebCore::AppendPipeline::~AppendPipeline):
864         (WebCore::AppendPipeline::handleErrorSyncMessage):
865         (WebCore::AppendPipeline::appsrcEndOfAppendCheckerProbe):
866         (WebCore::AppendPipeline::handleNeedContextSyncMessage):
867         (WebCore::AppendPipeline::appsinkCapsChanged):
868         (WebCore::AppendPipeline::handleEndOfAppend):
869         (WebCore::AppendPipeline::appsinkNewSample):
870         (WebCore::AppendPipeline::didReceiveInitializationSegment):
871         (WebCore::AppendPipeline::resetParserState):
872         (WebCore::AppendPipeline::pushNewBuffer):
873         (WebCore::AppendPipeline::handleAppsinkNewSampleFromStreamingThread):
874         (WebCore::AppendPipeline::connectDemuxerSrcPadToAppsinkFromStreamingThread):
875         (WebCore::AppendPipeline::connectDemuxerSrcPadToAppsink):
876         (WebCore::AppendPipeline::disconnectDemuxerSrcPadFromAppsinkFromAnyThread):
877         (WebCore::AppendPipeline::dumpAppendState): Deleted.
878         (WebCore::AppendPipeline::demuxerNoMorePads): Deleted.
879         (WebCore::AppendPipeline::setAppendState): Deleted.
880         (WebCore::AppendPipeline::appsinkEOS): Deleted.
881         (WebCore::AppendPipeline::resetPipeline): Deleted.
882         (WebCore::AppendPipeline::abort): Deleted.
883         * platform/graphics/gstreamer/mse/AppendPipeline.h:
884         (WebCore::AppendPipeline::appendState): Deleted.
885         * platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp:
886         (WebCore::MediaSourceClientGStreamerMSE::abort):
887         (WebCore::MediaSourceClientGStreamerMSE::resetParserState):
888         * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:
889         (WebCore::SourceBufferPrivateGStreamer::appendParsingFailed):
890         * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h:
891
892 2018-12-05  Rob Buis  <rbuis@igalia.com>
893
894         [Mac] HEAD requests changed to GET after 301, 302, and 303 redirections (http/tests/xmlhttprequest/head-redirection.html)
895         https://bugs.webkit.org/show_bug.cgi?id=114965
896
897         Reviewed by Frédéric Wang.
898
899         HEAD requests should not be changed to GET after 303 redirects, see [1].
900         This was fixed earlier for GTK [2].
901
902         Behavior matches Firefox and Chrome.
903
904         [1] http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-21#section-7.4
905         [2] https://bugs.webkit.org/show_bug.cgi?id=110127
906
907         Tests: web-platform-tests/fetch/api/redirect/redirect-method.html
908                web-platform-tests/fetch/api/redirect/redirect-method-worker.html
909                http/tests/xmlhttprequest/head-redirection.html
910
911         * platform/network/mac/ResourceHandleMac.mm:
912         (WebCore::ResourceHandle::willSendRequest):
913
914 2018-12-05  Rob Buis  <rbuis@igalia.com>
915
916         Align with Fetch on data: URLs
917         https://bugs.webkit.org/show_bug.cgi?id=182325
918
919         Reviewed by Alex Christensen.
920
921         Do not accept data URLs that do not contain a comma
922         character, as specified in the relevant specs [1, 2].
923
924         Behavior matches Firefox and Chrome.
925
926         Test: web-platform-tests/fetch/api/basic/scheme-data.any.html
927
928         [1] https://tools.ietf.org/html/rfc2397
929         [2] https://fetch.spec.whatwg.org/#data-url-processor
930
931         * platform/network/DataURLDecoder.cpp:
932         (WebCore::DataURLDecoder::parseMediaType):
933         (WebCore::DataURLDecoder::DecodeTask::DecodeTask):
934         (WebCore::DataURLDecoder::DecodeTask::process):
935         (WebCore::DataURLDecoder::createDecodeTask):
936         (WebCore::DataURLDecoder::decode):
937
938 2018-12-05  Frederic Wang  <fwang@igalia.com>
939
940         Unreviewed build fix.
941
942         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm: Add missing header.
943
944 2018-12-05  Javier Fernandez  <jfernandez@igalia.com>
945
946         [css-grid] Crash on debug changing the style of a positioned element
947         https://bugs.webkit.org/show_bug.cgi?id=191473
948
949         Reviewed by Dean Jackson and Zalan Bujtas.
950
951         When an box becomes {out-of,in}-flow, it may be re-parented and it may become a grid
952         item. In that case, we must mark the RenderGrid as dirty, so that the grid items
953         placement logic is executed again.
954
955         Test: fast/css-grid-layout/grid-crash-out-of-flow-positioned-element.html
956
957         * rendering/updating/RenderTreeBuilder.cpp:
958         (WebCore::childFlowStateChangesAndAffectsParentBlock): Consider the case of a box's new parent being a grid container.
959
960 2018-12-04  Frederic Wang  <fwang@igalia.com>
961
962         Always pass scrollingGeometry to update*ScrollingNode functions
963         https://bugs.webkit.org/show_bug.cgi?id=192358
964
965         Reviewed by Simon Fraser.
966
967         Currently, the scrollingGeometry parameter of updateOverflowScrollingNode is always used
968         while the one of updateFrameScrollingNode is never used. Both of them are passed as possibly
969         null pointers. This commit makes things more consistent by making the parameter a reference
970         and explicitly setting the scrollingGeometry of updateFrameScrollingNode. This will help
971         other efforts (such as support for macOS/iOS asynchronous scrolling of overflow nodes /
972         subframes or for CSS overscroll-behavior) for which new data members have to be passed to the
973         scrolling nodes.
974
975         No new tests, no behavior changes.
976
977         * page/scrolling/AsyncScrollingCoordinator.cpp:
978         (WebCore::AsyncScrollingCoordinator::updateFrameScrollingNode):
979         (WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode):
980         * page/scrolling/AsyncScrollingCoordinator.h:
981         * page/scrolling/ScrollingCoordinator.h:
982         (WebCore::ScrollingCoordinator::updateFrameScrollingNode):
983         (WebCore::ScrollingCoordinator::updateOverflowScrollingNode):
984         * rendering/RenderLayerCompositor.cpp:
985         (WebCore::RenderLayerCompositor::updateScrollCoordinationForThisFrame):
986         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
987
988 2018-12-04  Ryosuke Niwa  <rniwa@webkit.org>
989
990         Crash in HTMLCollection::updateNamedElementCache
991         https://bugs.webkit.org/show_bug.cgi?id=192347
992
993         Reviewed by Darin Adler.
994
995         The bug was caused by CollectionIndexCache's nodeAt caching the length of 1
996         when there are no matching elements in the subtree when the index is non-zero.
997
998         A related bug was fixed in r182125 but we were not considering the possibility
999         that the index given to this function might be non-zero even when there were
1000         no matching elements.
1001
1002         Test: fast/dom/options-collection-zero-length-crash.html
1003
1004         * dom/CollectionIndexCache.h:
1005         (WebCore::CollectionIndexCache<Collection, Iterator>::nodeAt):
1006
1007 2018-11-30  Jiewen Tan  <jiewen_tan@apple.com>
1008
1009         Don't report resource timing to parent frame for history items
1010         https://bugs.webkit.org/show_bug.cgi?id=192273
1011         <rdar://problem/45163764>
1012
1013         Reviewed by Youenn Fablet.
1014
1015         We should not report history items to its parent frame as those are less
1016         interested to its parent and might not be the first navigation in the iframes.
1017
1018         This change aligns the behavior when a cached document is not available for the
1019         history item with the available case as we don't report resource timing for any
1020         cached main document.
1021
1022         Test: http/tests/misc/resource-timing-navigation-in-restored-iframe-2.html
1023
1024         * loader/FrameLoader.cpp:
1025         (WebCore::FrameLoader::loadDifferentDocumentItem):
1026
1027 2018-12-04  Simon Fraser  <simon.fraser@apple.com>
1028
1029         REGRESSION (r238090): position:fixed sidebar on https://www.w3.org/TR/SVG2/coords.html does not stay fixed
1030         https://bugs.webkit.org/show_bug.cgi?id=192320
1031         <rdar://problem/46429833>
1032
1033         Reviewed by Zalan Bujtas.
1034         
1035         Re-land r238840 with a more reliable test.
1036         
1037         When we fall into slow scrolling mode (for example, because of background-attachment: fixed),
1038         RenderLayerCompositor::updateCompositingLayers() needs to set the geometry dirty bit on layers
1039         for viewport-constrained objects so we update them.
1040         
1041         This is only necessary for page scrolling; for overflow scrolls, updateLayerPositions() already
1042         does enough dirtying that fixed layers nested inside scrollers get updated.
1043
1044         Test: compositing/fixed-with-main-thread-scrolling.html
1045
1046         * rendering/RenderLayerCompositor.cpp:
1047         (WebCore::RenderLayerCompositor::updateCompositingLayers):
1048
1049 2018-12-04  Youenn Fablet  <youenn@apple.com>
1050
1051         Fix MediaRecorder flaky tests
1052         https://bugs.webkit.org/show_bug.cgi?id=192371
1053
1054         Reviewed by Eric Carlson.
1055
1056         No change of behavior.
1057
1058         * testing/Internals.cpp:
1059         (WebCore::Internals::resetToConsistentState):
1060         Reset to use real MediaRecorder by default.
1061
1062 2018-12-04  Justin Michaud  <justin_michaud@apple.com>
1063
1064         CSS Painting API should allow image values in inputProperties
1065         https://bugs.webkit.org/show_bug.cgi?id=192200
1066
1067         Reviewed by Dean Jackson.
1068
1069         Adds new TypedOMCSSImageValue wrapper. We rename all the existing ones so that the naming is consistent (CSSImageValue is already a thing).
1070         Finally, we let CanvasRenderingContext2DBase render these.
1071
1072         Tests: fast/css-custom-paint/arguments.html
1073                fast/css-custom-paint/image.html
1074
1075         * CMakeLists.txt:
1076         * DerivedSources.make:
1077         * Sources.txt:
1078         * WebCore.xcodeproj/project.pbxproj:
1079         * bindings/js/CallTracerTypes.h:
1080         * bindings/js/JSTypedOMCSSStyleValueCustom.cpp: Renamed from Source/WebCore/bindings/js/JSCSSStyleValueCustom.cpp.
1081         (WebCore::toJSNewlyCreated):
1082         (WebCore::toJS):
1083         * bindings/js/WebCoreBuiltinNames.h:
1084         * css/CSSComputedStyleDeclaration.cpp:
1085         (WebCore::ComputedStyleExtractor::customPropertyValue):
1086         * css/CSSCustomPropertyValue.cpp:
1087         (WebCore::CSSCustomPropertyValue::equals const):
1088         (WebCore::CSSCustomPropertyValue::customCSSText const):
1089         (WebCore::CSSCustomPropertyValue::tokens const):
1090         * css/CSSCustomPropertyValue.h:
1091         * css/CSSPaintImageValue.cpp:
1092         (WebCore::CSSPaintImageValue::image):
1093         * css/typedom/StylePropertyMapReadOnly.h:
1094         (WebCore::StylePropertyMapReadOnly::create):
1095         (WebCore::StylePropertyMapReadOnly::get const):
1096         (WebCore::StylePropertyMapReadOnly::StylePropertyMapReadOnly):
1097         * css/typedom/StylePropertyMapReadOnly.idl:
1098         * css/typedom/TypedOMCSSImageValue.h: Copied from Source/WebCore/css/typedom/CSSUnitValue.h.
1099         * css/typedom/TypedOMCSSImageValue.idl: Copied from Source/WebCore/css/typedom/CSSStyleValue.idl.
1100         * css/typedom/TypedOMCSSNumericValue.h: Renamed from Source/WebCore/css/typedom/CSSNumericValue.h.
1101         * css/typedom/TypedOMCSSNumericValue.idl: Renamed from Source/WebCore/css/typedom/CSSNumericValue.idl.
1102         * css/typedom/TypedOMCSSStyleValue.h: Renamed from Source/WebCore/css/typedom/CSSStyleValue.h.
1103         (WebCore::TypedOMCSSStyleValue::isImageValue):
1104         * css/typedom/TypedOMCSSStyleValue.idl: Renamed from Source/WebCore/css/typedom/CSSStyleValue.idl.
1105         * css/typedom/TypedOMCSSUnitValue.h: Renamed from Source/WebCore/css/typedom/CSSUnitValue.h.
1106         * css/typedom/TypedOMCSSUnitValue.idl: Renamed from Source/WebCore/css/typedom/CSSUnitValue.idl.
1107         * css/typedom/TypedOMCSSUnparsedValue.h: Renamed from Source/WebCore/css/typedom/CSSUnparsedValue.h.
1108         * css/typedom/TypedOMCSSUnparsedValue.idl: Renamed from Source/WebCore/css/typedom/CSSUnparsedValue.idl.
1109         * html/ImageBitmap.cpp:
1110         (WebCore::ImageBitmap::createPromise):
1111         * html/ImageBitmap.h:
1112         * html/canvas/CanvasDrawImage.idl:
1113         * html/canvas/CanvasFillStrokeStyles.idl:
1114         * html/canvas/CanvasRenderingContext.cpp:
1115         (WebCore::CanvasRenderingContext::checkOrigin):
1116         * html/canvas/CanvasRenderingContext.h:
1117         * html/canvas/CanvasRenderingContext2DBase.cpp:
1118         (WebCore::size):
1119         (WebCore::CanvasRenderingContext2DBase::drawImage):
1120         (WebCore::CanvasRenderingContext2DBase::createPattern):
1121         * html/canvas/CanvasRenderingContext2DBase.h:
1122         * inspector/InspectorCanvas.cpp:
1123         (WebCore::InspectorCanvas::buildAction):
1124         * page/WindowOrWorkerGlobalScope.idl:
1125         * platform/graphics/CustomPaintImage.cpp:
1126         (WebCore::CustomPaintImage::doCustomPaint):
1127
1128 2018-12-04  Chris Dumez  <cdumez@apple.com>
1129
1130         Regression(r238817) PSON Page Cache API tests are failing
1131         https://bugs.webkit.org/show_bug.cgi?id=192348
1132
1133         Reviewed by Alex Christensen.
1134
1135         * page/MemoryRelease.cpp:
1136         (WebCore::releaseCriticalMemory):
1137         (WebCore::releaseMemory):
1138         * page/MemoryRelease.h:
1139
1140 2018-12-04  Ryan Haddad  <ryanhaddad@apple.com>
1141
1142         Unreviewed, rolling out r238838.
1143
1144         The layout test added with this change is failing on iOS.
1145
1146         Reverted changeset:
1147
1148         "Thick overlines and line-throughs grow in the wrong
1149         direction"
1150         https://bugs.webkit.org/show_bug.cgi?id=192264
1151         https://trac.webkit.org/changeset/238838
1152
1153 2018-12-04  Ryan Haddad  <ryanhaddad@apple.com>
1154
1155         Unreviewed, rolling out r238840.
1156
1157         The layout test added with this change is frequently failing.
1158
1159         Reverted changeset:
1160
1161         "REGRESSION (r238090): position:fixed sidebar on
1162         https://www.w3.org/TR/SVG2/coords.html does not stay fixed"
1163         https://bugs.webkit.org/show_bug.cgi?id=192320
1164         https://trac.webkit.org/changeset/238840
1165
1166 2018-12-04  Carlos Garcia Campos  <cgarcia@igalia.com>
1167
1168         [SOUP] Move URLSoup back to WebCore after r238771
1169         https://bugs.webkit.org/show_bug.cgi?id=192306
1170
1171         Reviewed by Michael Catanzaro.
1172
1173         Add soupURIToURL() and urlToSoupURI() to replace the URL contructor taking a Soup URI and
1174         URL::createSoupURI(). Fix several build failures that showed up after removing the soup includes from URL
1175         header.
1176
1177         * platform/Cookie.h:
1178         * platform/SharedBuffer.h:
1179         * platform/SourcesSoup.txt:
1180         * platform/network/soup/CookieSoup.cpp:
1181         * platform/network/soup/GUniquePtrSoup.h: Renamed from Source/WTF/wtf/glib/GUniquePtrSoup.h.
1182         * platform/network/soup/NetworkStorageSessionSoup.cpp:
1183         (WebCore::NetworkStorageSession::setCookiesFromDOM const):
1184         (WebCore::NetworkStorageSession::deleteCookie const):
1185         (WebCore::NetworkStorageSession::getCookies):
1186         (WebCore::NetworkStorageSession::getRawCookies const):
1187         (WebCore::cookiesForSession):
1188         * platform/network/soup/ResourceErrorSoup.cpp:
1189         (WebCore::failingURI):
1190         * platform/network/soup/ResourceHandleSoup.cpp:
1191         * platform/network/soup/ResourceRequest.h:
1192         (WebCore::ResourceRequest::ResourceRequest):
1193         * platform/network/soup/ResourceRequestSoup.cpp:
1194         (WebCore::ResourceRequest::updateSoupMessageMembers const):
1195         (WebCore::ResourceRequest::updateFromSoupMessage):
1196         (WebCore::ResourceRequest::createSoupURI const):
1197         * platform/network/soup/ResourceResponseSoup.cpp:
1198         (WebCore::ResourceResponse::updateFromSoupMessage):
1199         * platform/network/soup/SocketStreamHandleImpl.h:
1200         * platform/network/soup/SocketStreamHandleImplSoup.cpp:
1201         (WebCore::SocketStreamHandleImpl::create):
1202         * platform/network/soup/SoupNetworkSession.cpp:
1203         * platform/network/soup/URLSoup.cpp: Copied from Source/WTF/wtf/glib/URLSoup.cpp.
1204         (WebCore::soupURIToURL):
1205         (WebCore::urlToSoupURI):
1206         * platform/network/soup/URLSoup.h: Renamed from Source/WTF/wtf/glib/URLSoup.cpp.
1207
1208 2018-12-04  Devin Rousso  <drousso@apple.com>
1209
1210         Web Inspector: Audit: tests should support async operations
1211         https://bugs.webkit.org/show_bug.cgi?id=192171
1212         <rdar://problem/46423562>
1213
1214         Reviewed by Joseph Pecoraro.
1215
1216         * page/Settings.yaml:
1217         * dom/ScriptExecutionContext.cpp:
1218         (ScriptExecutionContext::reportUnhandledPromiseRejection):
1219         Add setting for muting the "Unhandled Promise Rejection" console message.
1220
1221 2018-12-03  Tim Horton  <timothy_horton@apple.com>
1222
1223         Fix the build
1224
1225         * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
1226         Unified sources, of course.
1227
1228 2018-12-03  Youenn Fablet  <youenn@apple.com>
1229
1230         A sender created through addTransceiver and populated using addTrack should have its source set
1231         https://bugs.webkit.org/show_bug.cgi?id=192136
1232
1233         Reviewed by Eric Carlson.
1234
1235         In case libwebrtc backend is already created, we need to make sure to
1236         set the track source to the libwebrtc sender backend that is actually
1237         tied to the sender.
1238
1239         Covered by updated test.
1240
1241         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
1242         (WebCore::LibWebRTCPeerConnectionBackend::removeTrack):
1243         * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
1244         (WebCore::LibWebRTCPeerConnectionBackend::addTrack):
1245         * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h:
1246
1247 2018-12-03  YUHAN WU  <yuhan_wu@apple.com>
1248
1249         Implement non-timeslice mode encoding for MediaRecorder
1250         https://bugs.webkit.org/show_bug.cgi?id=192069
1251
1252         Reviewed by Youenn Fablet.
1253
1254         Implement the encoding for non-timeslice mode of MediaRecorder.
1255         It only supports to record MP4 file through H264 and AAC encoding, we will need to support more MIME types and encoding methods.
1256         Add a API in internals to allow testings to turn on the mock source.
1257
1258         Tests: http/wpt/mediarecorder/MediaRecorder-AV-audio-only-dataavailable.html
1259                http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable.html
1260                http/wpt/mediarecorder/MediaRecorder-AV-video-only-dataavailable.html
1261
1262         * Modules/mediarecorder/MediaRecorder.cpp:
1263         (WebCore::MediaRecorder::create):
1264         (WebCore::MediaRecorder::setCustomPrivateRecorderCreator):
1265         (WebCore::MediaRecorder::getPrivateImpl):
1266         (WebCore::MediaRecorder::MediaRecorder):
1267         (WebCore::MediaRecorder::stopRecording):
1268         (WebCore::MediaRecorder::stopRecordingInternal):
1269         (WebCore::MediaRecorder::createRecordingDataBlob):
1270         (WebCore::MediaRecorder::scheduleDeferredTask):
1271         * Modules/mediarecorder/MediaRecorder.h:
1272         * Modules/mediarecorder/MediaRecorder.idl:
1273         * SourcesCocoa.txt:
1274         * WebCore.xcodeproj/project.pbxproj:
1275         * platform/mediarecorder/MediaRecorderPrivate.h:
1276         (WebCore::MediaRecorderPrivate::stopRecording):
1277         * platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp: Added.
1278         (WebCore::MediaRecorderPrivateAVFImpl::create):
1279         (WebCore::MediaRecorderPrivateAVFImpl::MediaRecorderPrivateAVImpl):
1280         (WebCore::MediaRecorderPrivateAVFImpl::sampleBufferUpdated):
1281         (WebCore::MediaRecorderPrivateAVFImpl::audioSamplesAvailable):
1282         (WebCore::MediaRecorderPrivateAVFImpl::stopRecording):
1283         (WebCore::MediaRecorderPrivateAVFImpl::fetchData):
1284         (WebCore::MediaRecorderPrivateAVFImpl::mimeType):
1285         * platform/mediarecorder/MediaRecorderPrivateAVFImpl.h: Added.
1286         * platform/mediarecorder/MediaRecorderPrivateMock.cpp:
1287         (WebCore::MediaRecorderPrivateMock::fetchData):
1288         (WebCore::MediaRecorderPrivateMock::mimeType):
1289         * platform/mediarecorder/MediaRecorderPrivateMock.h:
1290         * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h: Added.
1291         * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm: Added.
1292         (WebCore::MediaRecorderPrivateWriter::setupWriter):
1293         (WebCore::MediaRecorderPrivateWriter::setVideoInput):
1294         (WebCore::MediaRecorderPrivateWriter::setAudioInput):
1295         (WebCore::copySampleBufferWithCurrentTimeStamp):
1296         (WebCore::MediaRecorderPrivateWriter::appendVideoSampleBuffer):
1297         (WebCore::MediaRecorderPrivateWriter::appendAudioSampleBuffer):
1298         (WebCore::MediaRecorderPrivateWriter::stopRecording):
1299         (WebCore::MediaRecorderPrivateWriter::fetchData):
1300         * testing/Internals.cpp:
1301         (WebCore::createRecorderMockSource):
1302         (WebCore::Internals::setCustomPrivateRecorderCreator):
1303         * testing/Internals.h:
1304         * testing/Internals.idl:
1305
1306 2018-12-03  Simon Fraser  <simon.fraser@apple.com>
1307
1308         REGRESSION (r238090): position:fixed sidebar on https://www.w3.org/TR/SVG2/coords.html does not stay fixed
1309         https://bugs.webkit.org/show_bug.cgi?id=192320
1310         <rdar://problem/46429833>
1311
1312         Reviewed by Zalan Bujtas.
1313         
1314         When we fall into slow scrolling mode (for example, because of background-attachment: fixed),
1315         RenderLayerCompositor::updateCompositingLayers() needs to set the geometry dirty bit on layers
1316         for viewport-constrained objects so we update them.
1317         
1318         This is only necessary for page scrolling; for overflow scrolls, updateLayerPositions() already
1319         does enough dirtying that fixed layers nested inside scrollers get updated.
1320
1321         Test: compositing/fixed-with-main-thread-scrolling.html
1322
1323         * rendering/RenderLayerCompositor.cpp:
1324         (WebCore::RenderLayerCompositor::updateCompositingLayers):
1325
1326 2018-12-03  Justin Michaud  <justin_michaud@apple.com>
1327
1328         CSS Painting API should scale display list when drawing
1329         https://bugs.webkit.org/show_bug.cgi?id=192217
1330
1331         Reviewed by Simon Fraser.
1332
1333         When we replay the display list, fix the scaling. The separate buffer is needed to make sure that globalCompositeOperation functions correctly.
1334
1335         * html/CustomPaintCanvas.cpp:
1336         (WebCore::CustomPaintCanvas::replayDisplayList const):
1337         * html/CustomPaintCanvas.h:
1338         * platform/graphics/CustomPaintImage.cpp:
1339         (WebCore::CustomPaintImage::doCustomPaint):
1340
1341 2018-12-03  Myles C. Maxfield  <mmaxfield@apple.com>
1342
1343         Thick overlines and line-throughs grow in the wrong direction
1344         https://bugs.webkit.org/show_bug.cgi?id=192264
1345
1346         Reviewed by Dean Jackson.
1347
1348         Overlines should grow upward, and line-throughs should stay centered.
1349
1350         Test: fast/css3-text/css3-text-decoration/text-decoration-thicknes-overline-grow-direction.html
1351
1352         * rendering/TextDecorationPainter.cpp:
1353         (WebCore::TextDecorationPainter::paintTextDecoration):
1354         * style/InlineTextBoxStyle.cpp:
1355         (WebCore::visualOverflowForDecorations):
1356
1357 2018-12-03  Simon Fraser  <simon.fraser@apple.com>
1358
1359         Viewport-constrained renderers are always RenderLayerModelObjects
1360         https://bugs.webkit.org/show_bug.cgi?id=192342
1361
1362         Reviewed by Myles C. Maxfield.
1363
1364         addViewportConstrainedObject/removeViewportConstrainedObject can take RenderLayerModelObjects,
1365         since all viewport-constrained renderers have layers.
1366
1367         * page/FrameView.cpp:
1368         (WebCore::FrameView::addViewportConstrainedObject):
1369         (WebCore::FrameView::removeViewportConstrainedObject):
1370         * page/FrameView.h:
1371         * rendering/RenderLayerModelObject.cpp:
1372         (WebCore::RenderLayerModelObject::styleDidChange): The 0 argument is actually a nullptr RenderGeometryMap,
1373         which has a default value, and the comment was obsolete.
1374
1375 2018-12-03  Don Olmstead  <don.olmstead@sony.com>
1376
1377         Fix some unused parameter warnings
1378         https://bugs.webkit.org/show_bug.cgi?id=192336
1379
1380         Reviewed by Fujii Hironori.
1381
1382         * Modules/indexeddb/server/IDBSerialization.cpp:
1383         (WebCore::isLegacySerializedIDBKeyData):
1384         * platform/FileSystem.cpp:
1385         (WebCore::FileSystem::openAndLockFile):
1386         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1387         (WebCore::GraphicsContext3D::bindVertexArray):
1388         * platform/network/curl/CertificateInfo.h:
1389         (WTF::Persistence::Coder<WebCore::CertificateInfo>::encode):
1390         (WTF::Persistence::Coder<WebCore::CertificateInfo>::decode):
1391
1392 2018-12-03  Keith Rollin  <krollin@apple.com>
1393
1394         Add .xcfilelist files
1395         https://bugs.webkit.org/show_bug.cgi?id=192082
1396         <rdar://problem/46312533>
1397
1398         Reviewed by Brent Fulgham.
1399
1400         Add .xcfilelist files for Generate Derived Sources and Generate
1401         Unified Sources build phases in Xcode. These are just being staged for
1402         now; they'll be added to the Xcode projects later.
1403
1404         No new tests -- no changed functionality.
1405
1406         * DerivedSources-input.xcfilelist: Added.
1407         * DerivedSources-output.xcfilelist: Added.
1408         * UnifiedSources-input.xcfilelist: Added.
1409         * UnifiedSources-output.xcfilelist: Added.
1410
1411 2018-12-03  Alex Christensen  <achristensen@webkit.org>
1412
1413         Add WKWebProcessPlugInLoadDelegate SPI willStartProvisionalLoadForFrame with a completion handler
1414         https://bugs.webkit.org/show_bug.cgi?id=192272
1415
1416         Reviewed by Brady Eidson.
1417
1418         This is needed for rdar://problem/45910057
1419         Covered by an API test.
1420
1421         * loader/EmptyFrameLoaderClient.h:
1422         * loader/FrameLoader.cpp:
1423         (WebCore::FrameLoader::prepareForLoadStart):
1424         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
1425         (WebCore::FrameLoader::loadProvisionalItemFromCachedPage):
1426         * loader/FrameLoader.h:
1427         * loader/FrameLoaderClient.h:
1428
1429 2018-12-03  Zalan Bujtas  <zalan@apple.com>
1430
1431         [iOS] Unreviewed build fix.
1432
1433         * page/DOMTimer.cpp:
1434         (WebCore::DOMTimer::fired):
1435
1436 2018-12-03  Jer Noble  <jer.noble@apple.com>
1437
1438         Get rid of old, dead Mac video fullscreen code.
1439         https://bugs.webkit.org/show_bug.cgi?id=192315
1440
1441         Reviewed by Eric Carlson.
1442
1443         * PlatformMac.cmake:
1444         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1445         (WebCore::MediaPlayerPrivateAVFoundation::supportsFullscreen const):
1446
1447 2018-12-03  Ryosuke Niwa  <rniwa@webkit.org>
1448
1449         title attribute on style & link elements should be ignored inside a shadow tree
1450         https://bugs.webkit.org/show_bug.cgi?id=191297
1451
1452         Reviewed by Antti Koivisto.
1453
1454         Fixed the by not setting the stylesheet's title even when the title content attribute is present
1455         or set on SVG/HTML style and link elements inside a shadow tree.
1456
1457         Test: fast/shadow-dom/stylesheet-title-in-shadow-tree.html
1458
1459         * dom/InlineStyleSheetOwner.cpp:
1460         (WebCore::InlineStyleSheetOwner::createSheet):
1461         * html/HTMLLinkElement.cpp:
1462         (WebCore::HTMLLinkElement::parseAttribute):
1463         (WebCore::HTMLLinkElement::initializeStyleSheet):
1464         * html/HTMLStyleElement.cpp:
1465         (WebCore::HTMLStyleElement::parseAttribute):
1466         * style/StyleScope.cpp:
1467         (WebCore::Style::Scope::collectActiveStyleSheets):
1468         * svg/SVGStyleElement.cpp:
1469         (WebCore::SVGStyleElement::parseAttribute):
1470
1471 2018-12-03  Zalan Bujtas  <zalan@apple.com>
1472
1473         [iOS] Add logging channel for hover related content observation
1474         https://bugs.webkit.org/show_bug.cgi?id=192312
1475
1476         Reviewed by Simon Fraser.
1477
1478         * dom/Document.cpp:
1479         (WebCore::Document::scheduleStyleRecalc):
1480         (WebCore::Document::updateStyleIfNeeded):
1481         (WebCore::Document::platformSuspendOrStopActiveDOMObjects):
1482         * page/DOMTimer.cpp:
1483         (WebCore::DOMTimer::install):
1484         (WebCore::DOMTimer::fired):
1485         * page/DOMWindow.cpp:
1486         (WebCore::DOMWindow::clearTimeout):
1487         * page/Frame.cpp:
1488         (WebCore::Frame::willDetachPage):
1489         * platform/Logging.h:
1490
1491 2018-12-03  Michael Catanzaro  <mcatanzaro@igalia.com>
1492
1493         [SOUP] Use SoupSession instead of SoupSessionAsync
1494         https://bugs.webkit.org/show_bug.cgi?id=107451
1495
1496         Reviewed by Carlos Garcia Campos.
1497
1498         With glib-networking 2.57.1, WebKit is no longer able to load TLS error pages. The problem
1499         is a network process deadlock caused by a change in how glib-networking performs certificate
1500         verification. Previously it verified certificates *after* the TLS handshake had completed,
1501         which was weirdly late, but previously not problematic. But now that TLS 1.3 exists,
1502         application data can be sent before certificate verification occurs, which is no good. So I
1503         moved verification to occur during the handshake. I needed to do this regardless because I
1504         need to add a new callback in GnuTLS for another feature. This introduced a deadlock in
1505         WebKit:
1506
1507          - glib-networking detects an unacceptable certificate, emits accept-certificate signal
1508          - NetworkDataTaskSoup::tlsConnectionAcceptCertificate calls
1509            NetworkDataTaskSoup::invalidateAndCancel calls NetworkDataTaskSoup::clearRequest
1510          - NetworkDataTaskSoup::clearRequest calls soup_session_cancel_message
1511
1512         The problem is that, in the deprecated SoupSessionAsync used by WebKit, cancellation is
1513         always *synchronous* despite the name of the class. So soup_session_cancel_message winds up
1514         doing its thing to close everything out, and that eventually ends up in a synchronous call
1515         to g_tls_connection_gnutls_close. The close operation can't proceed until the TLS handshake
1516         is finished, and the handshake is blocked waiting for WebKit to return from its
1517         accept-certificate handler. So the close operation winds up polling forever waiting for the
1518         handshake to finish. Deadlock.
1519
1520         The only changes required in WebKit to use the modern SoupSession are adjustments for the
1521         new default property values. Most of the properties we used to set explicitly are now
1522         defaults and should be removed. Additionally, SoupSession has default timeouts, which we
1523         want to override to allow NetworkDataTaskSoup to implement its own timeouts.
1524
1525         No new tests because this is covered by TestSSL (which would be failing if run with the
1526         newer glib-networking).
1527
1528         * platform/network/soup/SoupNetworkSession.cpp:
1529         (WebCore::SoupNetworkSession::SoupNetworkSession):
1530
1531 2018-12-03  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
1532
1533         Use WallTime for file time
1534         https://bugs.webkit.org/show_bug.cgi?id=192287
1535
1536         Reviewed by Darin Adler.
1537
1538         This patch changes a type of file time from double to WallTime to use strongly typed file time.
1539
1540         No behavior change.
1541
1542         * Modules/webdatabase/Database.cpp:
1543         (WebCore::Database::details const):
1544         * Modules/webdatabase/DatabaseDetails.h:
1545         (WebCore::DatabaseDetails::DatabaseDetails):
1546         (WebCore::DatabaseDetails::creationTime const):
1547         (WebCore::DatabaseDetails::modificationTime const):
1548         * Modules/webdatabase/DatabaseManager.cpp:
1549         (WebCore::DatabaseManager::ProposedDatabase::ProposedDatabase):
1550         * Modules/webdatabase/DatabaseTracker.cpp:
1551         (WebCore::DatabaseTracker::detailsForNameAndOrigin):
1552         * fileapi/AsyncFileStream.cpp:
1553         (WebCore::AsyncFileStream::getSize):
1554         * fileapi/AsyncFileStream.h:
1555         * fileapi/File.cpp:
1556         (WebCore::File::lastModified const):
1557         * page/Page.cpp:
1558         (WebCore::Page::userStyleSheetLocationChanged):
1559         (WebCore::Page::userStyleSheet const):
1560         * page/Page.h:
1561         * platform/FileMetadata.h:
1562         * platform/FileStream.cpp:
1563         (WebCore::FileStream::getSize):
1564         * platform/FileStream.h:
1565         * platform/FileSystem.cpp:
1566         (WebCore::FileSystem::getFileModificationTime): Deleted.
1567         * platform/FileSystem.h:
1568         (WebCore::FileSystem::invalidFileTime): Deleted.
1569         (WebCore::FileSystem::isValidFileTime): Deleted.
1570         * platform/glib/FileSystemGlib.cpp:
1571         (WebCore::FileSystem::getFileCreationTime):
1572         (WebCore::FileSystem::getFileModificationTime):
1573         (WebCore::FileSystem::fileMetadataUsingFunction):
1574         * platform/network/BlobDataFileReference.cpp:
1575         (WebCore::BlobDataFileReference::BlobDataFileReference):
1576         (WebCore::BlobDataFileReference::expectedModificationTime):
1577         * platform/network/BlobDataFileReference.h:
1578         * platform/network/FormData.cpp:
1579         (WebCore::FormData::appendFile):
1580         (WebCore::FormData::appendFileRange):
1581         * platform/network/FormData.h:
1582         (WebCore::FormDataElement::FormDataElement):
1583         (WebCore::FormDataElement::EncodedFileData::decode):
1584         * platform/network/cf/FormDataStreamCFNet.cpp:
1585         (WebCore::advanceCurrentStream):
1586         * platform/network/soup/ResourceRequestSoup.cpp:
1587         (WebCore::appendEncodedBlobItemToSoupMessageBody):
1588         * platform/posix/FileSystemPOSIX.cpp:
1589         (WebCore::FileSystem::getFileCreationTime):
1590         (WebCore::FileSystem::getFileModificationTime):
1591         * platform/sql/SQLiteFileSystem.cpp:
1592         (WebCore::SQLiteFileSystem::databaseCreationTime):
1593         (WebCore::SQLiteFileSystem::databaseModificationTime):
1594         * platform/sql/SQLiteFileSystem.h:
1595         * platform/win/FileSystemWin.cpp:
1596         (WebCore::FileSystem::getFileModificationTime):
1597         (WebCore::FileSystem::getFileCreationTime):
1598         (WebCore::FileSystem::findDataToFileMetadata):
1599
1600 2018-12-03  Dean Jackson  <dino@apple.com>
1601
1602         Fix iOS Simulator Release test crashes.
1603
1604         * platform/network/ios/WebCoreURLResponseIOS.mm:
1605         (WebCore::adjustMIMETypeIfNecessary): Check for null before using the
1606         new MIME type.
1607
1608 2018-12-03  Eric Carlson  <eric.carlson@apple.com>
1609
1610         [MediaStream] 'devicechange' event when more capture device information are revealed.
1611         https://bugs.webkit.org/show_bug.cgi?id=192268
1612
1613         Reviewed by Youenn Fablet.
1614
1615         Test: fast/mediastream/enumerate-devices-change-event.html
1616
1617         * Modules/mediastream/MediaDevicesRequest.cpp:
1618         (WebCore::MediaDevicesRequest::start): Remove code to modify device based on access, that is
1619         now done in the UI process.
1620         (WebCore::MediaDevicesRequest::filterDeviceList): Deleted.
1621         * Modules/mediastream/MediaDevicesRequest.h:
1622         * platform/mediastream/RealtimeMediaSourceCenter.h:
1623
1624 2018-12-03  Wenson Hsieh  <wenson_hsieh@apple.com>
1625
1626         [iOSMac] Unable to upload non-image files using drag and drop in WKWebView
1627         https://bugs.webkit.org/show_bug.cgi?id=192283
1628         <rdar://problem/46399461>
1629
1630         Reviewed by Ryosuke Niwa.
1631
1632         Currently on iOS, file URLs aren't generally written to the pasteboard during drag and drop unless the
1633         application providing the data explicitly registers "public.file-url" to item providers. As such, our current
1634         logic on iOS for handling drops does not attempt to prevent "public.file-url" from being advertised as the
1635         "text/uri-list" MIME type in DataTransfer, though we do currently succeed in suppressing access to the file URL.
1636
1637         However, on iOSMac, the scenario in which file URLs are registered to item providers becomes pertinent when
1638         uploading files from other macOS apps (e.g. Finder) into a WKWebView running in iOSMac. Furthermore, the
1639         `preferredPresentationStyle` flag on `NSItemProvider` is unavailable in iOSMac; currently, this flag is our
1640         primary cue on iOS that an item should be treated as an attachment rather than inline data. In order to support
1641         file uploads in iOSMac, we make several adjustments to drop handling logic in iOS to handle the case where the
1642         "public.file-url" type is registered. See below for more details.
1643
1644         Tests:  DragAndDropTests.DataTransferExposePlainTextWithFileURLAsFile
1645                 DragAndDropTests.DataTransferGetDataWhenDroppingImageWithFileURL
1646
1647         * platform/PasteboardItemInfo.h:
1648         (WebCore::PasteboardItemInfo::encode const):
1649         (WebCore::PasteboardItemInfo::decode):
1650
1651         Add a new flag that is set if and only if the item provider contains the "public.file-url" type, and also
1652         contains some non-URL data type that conforms to one of the file types supported for file uploads (i.e.
1653         "public.content", zip archives, and folders).
1654
1655         * platform/cocoa/PasteboardCocoa.mm:
1656         (WebCore::Pasteboard::fileContentState):
1657
1658         Consider the pasteboard to contain files in the case where one or more of the items contains a file URL, along
1659         with some other pasteboard data that can be represented as a file upload.
1660
1661         * platform/ios/PlatformPasteboardIOS.mm:
1662         (WebCore::PlatformPasteboard::informationForItemAtIndex):
1663         (WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
1664
1665         If the pasteboard contains "public.file-url", don't consider "text/uri-list" to be one of the data types that's
1666         safe to expose to the page. Our current behavior in this case is that we will advertise "text/uri-list" as a
1667         pasteboard type in the DataTransfer, but if the page attempts to request this information, we simply return the
1668         empty string. Instead, we shouldn't expose "text/uri-list" as a type in the first place.
1669
1670         * platform/ios/WebItemProviderPasteboard.h:
1671         * platform/ios/WebItemProviderPasteboard.mm:
1672
1673         Add a few more `__bridge`-ing casts where appropriate.
1674
1675         (typeConformsToTypes):
1676
1677         Move this further up the file so that it can be used in `NSItemProvider (WebCoreExtras)`.
1678
1679         (-[NSItemProvider web_containsFileURLAndFileUploadContent]):
1680
1681         Add a helper method on NSItemProvider to determine whether an item provider has a file URL, as well as a content
1682         type suitable for file uploads.
1683
1684         (-[WebItemProviderLoadResult canBeRepresentedAsFileUpload]):
1685
1686         This currently always returns `NO` in iOSMac; instead, return `YES` on both iOS and iOSMac in the case where the
1687         item provider contains a file URL and content which may be uploaded.
1688
1689         (-[WebItemProviderPasteboard preferredFileUploadURLAtIndex:fileType:]):
1690         (-[WebItemProviderPasteboard typeIdentifiersToLoad:]):
1691
1692         Refactor this to take an `NSItemProvider` instead of a list of type identifiers, and bail out of loading data
1693         for "public.url" if the item provider contains a file URL.
1694
1695         (-[WebItemProviderPasteboard doAfterLoadingProvidedContentIntoFileURLs:synchronousTimeout:]):
1696         (-[WebItemProviderPasteboard typeIdentifiersToLoadForRegisteredTypeIdentifiers:]): Deleted.
1697
1698 2018-12-02  Zalan Bujtas  <zalan@apple.com>
1699
1700         Add a runtime feature flag for LayoutFormattingContext.
1701         https://bugs.webkit.org/show_bug.cgi?id=192280
1702
1703         Reviewed by Simon Fraser.
1704
1705         * Configurations/FeatureDefines.xcconfig:
1706         * page/FrameViewLayoutContext.cpp:
1707         (WebCore::layoutUsingFormattingContext):
1708         * page/RuntimeEnabledFeatures.h:
1709         (WebCore::RuntimeEnabledFeatures::setLayoutFormattingContextEnabled):
1710         (WebCore::RuntimeEnabledFeatures::layoutFormattingContextEnabled const):
1711
1712 2018-12-01  Brent Fulgham  <bfulgham@apple.com>
1713
1714         Lifetime of HTMLMediaElement is not properly handled in asynchronous actions
1715         https://bugs.webkit.org/show_bug.cgi?id=192087
1716         <rdar://problem/45975230>
1717
1718         Reviewed by Dean Jackson.
1719
1720         The HTMLMediaElement performs operations that allow arbitrary JavaScript to run. We need to make
1721         sure the active media element is protected until those calls complete.
1722
1723         * html/HTMLMediaElement.cpp:
1724         (WebCore::HTMLMediaElement::didFinishInsertingNode):
1725         (WebCore::HTMLMediaElement::exitFullscreen):
1726         (WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured):
1727         (WebCore::HTMLMediaElement::scheduleConfigureTextTracks):
1728         (WebCore::HTMLMediaElement::scheduleMediaEngineWasUpdated):
1729         (WebCore::HTMLMediaElement::scheduleUpdatePlayState):
1730         (WebCore::HTMLMediaElement::scheduleUpdateMediaState):
1731
1732 2018-12-01  Chris Dumez  <cdumez@apple.com>
1733
1734         [PSON] process-swapping may occur even though opener has handle to openee
1735         https://bugs.webkit.org/show_bug.cgi?id=192277
1736
1737         Reviewed by Antti Koivisto.
1738
1739         Process-swapping may occur even though opener has handle to openee, which is not Web-compatible. The reason
1740         is that we rely on the window not having an opener to process-swap. However, the opener can be disowned,
1741         which does not mean that the opener doesn't still have a handle to its openee.
1742
1743         To address the issue:
1744         - Renamed openedViaWindowOpenWithOpener flag to openedByDOMWithOpener
1745         - Make sure this flag gets set if an opener have ever been set for the browsing context
1746         - Do not process-swap if this flag is set
1747         - Drop opener from NavigationAction since it does not provide meaningful information to decide whether
1748           to process-swap or not.
1749
1750         * loader/FrameLoader.cpp:
1751         (WebCore::FrameLoader::setOpener):
1752         * loader/NavigationAction.h:
1753         (WebCore::NavigationAction::openedByDOMWithOpener const):
1754         (WebCore::NavigationAction::setOpenedByDOMWithOpener):
1755         (WebCore::NavigationAction::setOpener): Deleted.
1756         (WebCore::NavigationAction::opener const): Deleted.
1757         (WebCore::NavigationAction::openedViaWindowOpenWithOpener const): Deleted.
1758         (WebCore::NavigationAction::setOpenedViaWindowOpenWithOpener): Deleted.
1759         * loader/PolicyChecker.cpp:
1760         (WebCore::PolicyChecker::checkNavigationPolicy):
1761         * page/DOMWindow.cpp:
1762         (WebCore::DOMWindow::createWindow):
1763         * page/Page.h:
1764         (WebCore::Page::openedByDOMWithOpener const):
1765         (WebCore::Page::setOpenedByDOMWithOpener):
1766         (WebCore::Page::openedViaWindowOpenWithOpener const): Deleted.
1767         (WebCore::Page::setOpenedViaWindowOpenWithOpener): Deleted.
1768
1769 2018-12-01  Christopher Reid  <chris.reid@sony.com>
1770
1771         Add generic implementations to FileSystemPOSIX.cpp
1772         https://bugs.webkit.org/show_bug.cgi?id=192263
1773
1774         Reviewed by Yusuke Suzuki.
1775
1776         No new tests, no change in behavior.
1777
1778         Add generic FileSystemPOSIX implementations for:
1779             - stringFromFileSystemRepresentation
1780             - fileSystemRepresentation
1781             - moveFile
1782             - getVolumeFreeSpace
1783
1784         Also removing an unneeded PLATFORM(GTK) check since GTK is only using FileSystemGlib
1785
1786         * platform/posix/FileSystemPOSIX.cpp:
1787
1788 2018-12-01  Zalan Bujtas  <zalan@apple.com>
1789
1790         [LFC][BFC] Call instrinsicWidthConstraints on the correct formatting state.
1791         https://bugs.webkit.org/show_bug.cgi?id=192274
1792
1793         Reviewed by Antti Koivisto.
1794
1795         When we call intrinsic width on a formatting context root, we need to use the formatting state
1796         that this root constructs and not the one it lives in.
1797
1798         * layout/blockformatting/BlockFormattingContext.cpp:
1799         (WebCore::Layout::BlockFormattingContext::instrinsicWidthConstraints const):
1800         * layout/inlineformatting/InlineFormattingContext.cpp:
1801         (WebCore::Layout::InlineFormattingContext::instrinsicWidthConstraints const): it's the caller's responsiblitiy to store the intrinsic values.
1802
1803 2018-11-30  Alex Christensen  <achristensen@webkit.org>
1804
1805         Fix Windows build.
1806
1807         * platform/network/curl/CookieJarCurl.cpp:
1808         * platform/network/curl/PublicSuffixCurl.cpp:
1809
1810 2018-11-30  Alex Christensen  <achristensen@webkit.org>
1811
1812         Fix Windows build.
1813
1814         * platform/network/curl/CookieJarCurl.h:
1815
1816 2018-11-30  Alex Christensen  <achristensen@webkit.org>
1817
1818         Move URL from WebCore to WTF
1819         https://bugs.webkit.org/show_bug.cgi?id=190234
1820
1821         Reviewed by Keith Miller.
1822
1823         A URL is a low-level concept that does not depend on other classes in WebCore.
1824         We are starting to use URLs in JavaScriptCore for modules.
1825         I need URL and URLParser in a place with fewer dependencies for rdar://problem/44119696
1826
1827         * Modules/applepay/ApplePaySession.h:
1828         * Modules/applepay/ApplePayValidateMerchantEvent.h:
1829         * Modules/applepay/PaymentCoordinator.cpp:
1830         * Modules/applepay/PaymentCoordinator.h:
1831         * Modules/applepay/PaymentCoordinatorClient.h:
1832         * Modules/applepay/PaymentSession.h:
1833         * Modules/applicationmanifest/ApplicationManifest.h:
1834         * Modules/beacon/NavigatorBeacon.cpp:
1835         * Modules/cache/DOMCache.cpp:
1836         * Modules/fetch/FetchLoader.h:
1837         * Modules/mediasession/MediaSessionMetadata.h:
1838         * Modules/mediasource/MediaSourceRegistry.cpp:
1839         * Modules/mediasource/MediaSourceRegistry.h:
1840         * Modules/mediastream/MediaStream.cpp:
1841         * Modules/mediastream/MediaStreamRegistry.cpp:
1842         * Modules/mediastream/MediaStreamRegistry.h:
1843         * Modules/navigatorcontentutils/NavigatorContentUtilsClient.h:
1844         * Modules/notifications/Notification.h:
1845         * Modules/paymentrequest/MerchantValidationEvent.h:
1846         * Modules/paymentrequest/PaymentRequest.h:
1847         * Modules/plugins/PluginReplacement.h:
1848         * Modules/webaudio/AudioContext.h:
1849         * Modules/websockets/ThreadableWebSocketChannel.h:
1850         * Modules/websockets/WebSocket.h:
1851         * Modules/websockets/WebSocketHandshake.cpp:
1852         * Modules/websockets/WebSocketHandshake.h:
1853         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
1854         * PlatformMac.cmake:
1855         * PlatformWin.cmake:
1856         * Sources.txt:
1857         * SourcesCocoa.txt:
1858         * WebCore.xcodeproj/project.pbxproj:
1859         * bindings/js/CachedModuleScriptLoader.h:
1860         * bindings/js/CachedScriptFetcher.h:
1861         * bindings/js/ScriptController.cpp:
1862         (WebCore::ScriptController::executeIfJavaScriptURL):
1863         * bindings/js/ScriptController.h:
1864         * bindings/js/ScriptModuleLoader.h:
1865         * bindings/js/ScriptSourceCode.h:
1866         * bindings/scripts/CodeGeneratorJS.pm:
1867         (GenerateImplementation):
1868         * bindings/scripts/test/JS/JSInterfaceName.cpp:
1869         * bindings/scripts/test/JS/JSMapLike.cpp:
1870         * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
1871         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1872         * bindings/scripts/test/JS/JSTestCEReactions.cpp:
1873         * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
1874         * bindings/scripts/test/JS/JSTestCallTracer.cpp:
1875         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
1876         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
1877         * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
1878         * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
1879         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1880         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1881         * bindings/scripts/test/JS/JSTestException.cpp:
1882         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1883         * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
1884         * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
1885         * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
1886         * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
1887         * bindings/scripts/test/JS/JSTestInterface.cpp:
1888         * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
1889         * bindings/scripts/test/JS/JSTestIterable.cpp:
1890         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1891         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
1892         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
1893         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
1894         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1895         * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
1896         * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
1897         * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
1898         * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
1899         * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
1900         * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
1901         * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
1902         * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
1903         * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
1904         * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
1905         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
1906         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
1907         * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
1908         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
1909         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
1910         * bindings/scripts/test/JS/JSTestNode.cpp:
1911         * bindings/scripts/test/JS/JSTestObj.cpp:
1912         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1913         * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
1914         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
1915         * bindings/scripts/test/JS/JSTestPluginInterface.cpp:
1916         * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
1917         * bindings/scripts/test/JS/JSTestSerialization.cpp:
1918         * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp:
1919         * bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
1920         * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
1921         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1922         * bindings/scripts/test/JS/JSTestStringifier.cpp:
1923         * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
1924         * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
1925         * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
1926         * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
1927         * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
1928         * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
1929         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1930         * contentextensions/ContentExtensionsBackend.cpp:
1931         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
1932         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForPingLoad):
1933         (WebCore::ContentExtensions::applyBlockedStatusToRequest):
1934         * contentextensions/ContentExtensionsBackend.h:
1935         * css/CSSValue.h:
1936         * css/StyleProperties.h:
1937         * css/StyleResolver.h:
1938         * css/StyleSheet.h:
1939         * css/StyleSheetContents.h:
1940         * css/parser/CSSParserContext.h:
1941         (WebCore::CSSParserContextHash::hash):
1942         (WTF::HashTraits<WebCore::CSSParserContext>::constructDeletedValue):
1943         * css/parser/CSSParserIdioms.h:
1944         * dom/DataTransfer.cpp:
1945         (WebCore::DataTransfer::setDataFromItemList):
1946         * dom/Document.cpp:
1947         (WebCore::Document::setURL):
1948         (WebCore::Document::processHttpEquiv):
1949         (WebCore::Document::completeURL const):
1950         (WebCore::Document::ensureTemplateDocument):
1951         * dom/Document.h:
1952         (WebCore::Document::urlForBindings const):
1953         * dom/Element.cpp:
1954         (WebCore::Element::isJavaScriptURLAttribute const):
1955         * dom/InlineStyleSheetOwner.cpp:
1956         (WebCore::parserContextForElement):
1957         * dom/Node.cpp:
1958         (WebCore::Node::baseURI const):
1959         * dom/Node.h:
1960         * dom/ScriptElement.h:
1961         * dom/ScriptExecutionContext.h:
1962         * dom/SecurityContext.h:
1963         * editing/Editor.cpp:
1964         (WebCore::Editor::pasteboardWriterURL):
1965         * editing/Editor.h:
1966         * editing/MarkupAccumulator.cpp:
1967         (WebCore::MarkupAccumulator::appendQuotedURLAttributeValue):
1968         * editing/cocoa/DataDetection.h:
1969         * editing/cocoa/EditorCocoa.mm:
1970         (WebCore::Editor::userVisibleString):
1971         * editing/cocoa/WebContentReaderCocoa.mm:
1972         (WebCore::replaceRichContentWithAttachments):
1973         (WebCore::WebContentReader::readWebArchive):
1974         * editing/mac/EditorMac.mm:
1975         (WebCore::Editor::plainTextFromPasteboard):
1976         (WebCore::Editor::writeImageToPasteboard):
1977         * editing/markup.cpp:
1978         (WebCore::removeSubresourceURLAttributes):
1979         (WebCore::createFragmentFromMarkup):
1980         * editing/markup.h:
1981         * fileapi/AsyncFileStream.cpp:
1982         * fileapi/AsyncFileStream.h:
1983         * fileapi/Blob.h:
1984         * fileapi/BlobURL.cpp:
1985         * fileapi/BlobURL.h:
1986         * fileapi/File.h:
1987         * fileapi/FileReaderLoader.h:
1988         * fileapi/ThreadableBlobRegistry.h:
1989         * history/CachedFrame.h:
1990         * history/HistoryItem.h:
1991         * html/DOMURL.cpp:
1992         (WebCore::DOMURL::create):
1993         * html/DOMURL.h:
1994         * html/HTMLAttachmentElement.cpp:
1995         (WebCore::HTMLAttachmentElement::archiveResourceURL):
1996         * html/HTMLFrameElementBase.cpp:
1997         (WebCore::HTMLFrameElementBase::isURLAllowed const):
1998         (WebCore::HTMLFrameElementBase::openURL):
1999         (WebCore::HTMLFrameElementBase::setLocation):
2000         * html/HTMLInputElement.h:
2001         * html/HTMLLinkElement.h:
2002         * html/HTMLMediaElement.cpp:
2003         (WTF::LogArgument<URL>::toString):
2004         (WTF::LogArgument<WebCore::URL>::toString): Deleted.
2005         * html/HTMLPlugInImageElement.cpp:
2006         (WebCore::HTMLPlugInImageElement::allowedToLoadFrameURL):
2007         * html/ImageBitmap.h:
2008         * html/MediaFragmentURIParser.h:
2009         * html/PublicURLManager.cpp:
2010         * html/PublicURLManager.h:
2011         * html/URLInputType.cpp:
2012         * html/URLRegistry.h:
2013         * html/URLSearchParams.cpp:
2014         (WebCore::URLSearchParams::URLSearchParams):
2015         (WebCore::URLSearchParams::toString const):
2016         (WebCore::URLSearchParams::updateURL):
2017         (WebCore::URLSearchParams::updateFromAssociatedURL):
2018         * html/URLUtils.h:
2019         (WebCore::URLUtils<T>::setHost):
2020         (WebCore::URLUtils<T>::setPort):
2021         * html/canvas/CanvasRenderingContext.cpp:
2022         * html/canvas/CanvasRenderingContext.h:
2023         * html/parser/HTMLParserIdioms.cpp:
2024         * html/parser/XSSAuditor.cpp:
2025         (WebCore::semicolonSeparatedValueContainsJavaScriptURL):
2026         (WebCore::XSSAuditor::filterScriptToken):
2027         (WebCore::XSSAuditor::filterObjectToken):
2028         (WebCore::XSSAuditor::filterParamToken):
2029         (WebCore::XSSAuditor::filterEmbedToken):
2030         (WebCore::XSSAuditor::filterFormToken):
2031         (WebCore::XSSAuditor::filterInputToken):
2032         (WebCore::XSSAuditor::filterButtonToken):
2033         (WebCore::XSSAuditor::eraseDangerousAttributesIfInjected):
2034         (WebCore::XSSAuditor::isLikelySafeResource):
2035         * html/parser/XSSAuditor.h:
2036         * html/parser/XSSAuditorDelegate.h:
2037         * inspector/InspectorFrontendHost.cpp:
2038         (WebCore::InspectorFrontendHost::openInNewTab):
2039         * inspector/InspectorInstrumentation.h:
2040         * inspector/agents/InspectorNetworkAgent.cpp:
2041         * inspector/agents/InspectorNetworkAgent.h:
2042         * inspector/agents/InspectorPageAgent.h:
2043         * inspector/agents/InspectorWorkerAgent.h:
2044         * loader/ApplicationManifestLoader.h:
2045         * loader/CookieJar.h:
2046         * loader/CrossOriginAccessControl.h:
2047         * loader/CrossOriginPreflightResultCache.h:
2048         * loader/DocumentLoader.cpp:
2049         (WebCore::DocumentLoader::willSendRequest):
2050         (WebCore::DocumentLoader::maybeLoadEmpty):
2051         * loader/DocumentLoader.h:
2052         (WebCore::DocumentLoader::serverRedirectSourceForHistory const):
2053         * loader/DocumentWriter.h:
2054         * loader/FormSubmission.h:
2055         * loader/FrameLoader.cpp:
2056         (WebCore::FrameLoader::submitForm):
2057         (WebCore::FrameLoader::receivedFirstData):
2058         (WebCore::FrameLoader::loadWithDocumentLoader):
2059         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
2060         (WebCore::createWindow):
2061         * loader/FrameLoaderClient.h:
2062         * loader/HistoryController.cpp:
2063         (WebCore::HistoryController::currentItemShouldBeReplaced const):
2064         (WebCore::HistoryController::initializeItem):
2065         * loader/LinkLoader.h:
2066         * loader/LoadTiming.h:
2067         * loader/LoaderStrategy.h:
2068         * loader/MixedContentChecker.cpp:
2069         (WebCore::MixedContentChecker::checkFormForMixedContent const):
2070         * loader/MixedContentChecker.h:
2071         * loader/NavigationScheduler.cpp:
2072         (WebCore::NavigationScheduler::shouldScheduleNavigation const):
2073         * loader/NavigationScheduler.h:
2074         * loader/PingLoader.h:
2075         * loader/PolicyChecker.cpp:
2076         (WebCore::PolicyChecker::checkNavigationPolicy):
2077         * loader/ResourceLoadInfo.h:
2078         * loader/ResourceLoadObserver.cpp:
2079         (WebCore::ResourceLoadObserver::requestStorageAccessUnderOpener):
2080         * loader/ResourceLoadObserver.h:
2081         * loader/ResourceLoadStatistics.h:
2082         * loader/ResourceLoader.h:
2083         * loader/ResourceTiming.h:
2084         * loader/SubframeLoader.cpp:
2085         (WebCore::SubframeLoader::requestFrame):
2086         * loader/SubframeLoader.h:
2087         * loader/SubstituteData.h:
2088         * loader/appcache/ApplicationCache.h:
2089         * loader/appcache/ApplicationCacheGroup.h:
2090         * loader/appcache/ApplicationCacheHost.h:
2091         * loader/appcache/ApplicationCacheStorage.cpp:
2092         * loader/appcache/ApplicationCacheStorage.h:
2093         * loader/appcache/ManifestParser.cpp:
2094         * loader/appcache/ManifestParser.h:
2095         * loader/archive/ArchiveResourceCollection.h:
2096         * loader/archive/cf/LegacyWebArchive.cpp:
2097         (WebCore::LegacyWebArchive::createFromSelection):
2098         * loader/cache/CachedResource.cpp:
2099         * loader/cache/CachedResourceLoader.h:
2100         * loader/cache/CachedStyleSheetClient.h:
2101         * loader/cache/MemoryCache.h:
2102         * loader/icon/IconLoader.h:
2103         * loader/mac/LoaderNSURLExtras.mm:
2104         * page/CaptionUserPreferencesMediaAF.cpp:
2105         * page/ChromeClient.h:
2106         * page/ClientOrigin.h:
2107         * page/ContextMenuClient.h:
2108         * page/ContextMenuController.cpp:
2109         (WebCore::ContextMenuController::checkOrEnableIfNeeded const):
2110         * page/DOMWindow.cpp:
2111         (WebCore::DOMWindow::isInsecureScriptAccess):
2112         * page/DragController.cpp:
2113         (WebCore::DragController::startDrag):
2114         * page/DragController.h:
2115         * page/EventSource.h:
2116         * page/Frame.h:
2117         * page/FrameView.h:
2118         * page/History.h:
2119         * page/Location.cpp:
2120         (WebCore::Location::url const):
2121         (WebCore::Location::reload):
2122         * page/Location.h:
2123         * page/Page.h:
2124         * page/PageSerializer.h:
2125         * page/Performance.h:
2126         * page/PerformanceResourceTiming.cpp:
2127         * page/SecurityOrigin.cpp:
2128         (WebCore::SecurityOrigin::SecurityOrigin):
2129         (WebCore::SecurityOrigin::create):
2130         * page/SecurityOrigin.h:
2131         * page/SecurityOriginData.h:
2132         * page/SecurityOriginHash.h:
2133         * page/SecurityPolicy.cpp:
2134         (WebCore::SecurityPolicy::shouldInheritSecurityOriginFromOwner):
2135         * page/SecurityPolicy.h:
2136         * page/SettingsBase.h:
2137         * page/ShareData.h:
2138         * page/SocketProvider.h:
2139         * page/UserContentProvider.h:
2140         * page/UserContentURLPattern.cpp:
2141         * page/UserContentURLPattern.h:
2142         * page/UserScript.h:
2143         * page/UserStyleSheet.h:
2144         * page/VisitedLinkStore.h:
2145         * page/csp/ContentSecurityPolicy.h:
2146         * page/csp/ContentSecurityPolicyClient.h:
2147         * page/csp/ContentSecurityPolicyDirectiveList.h:
2148         * page/csp/ContentSecurityPolicySource.cpp:
2149         (WebCore::ContentSecurityPolicySource::portMatches const):
2150         * page/csp/ContentSecurityPolicySource.h:
2151         * page/csp/ContentSecurityPolicySourceList.cpp:
2152         * page/csp/ContentSecurityPolicySourceList.h:
2153         * page/csp/ContentSecurityPolicySourceListDirective.cpp:
2154         * platform/ContentFilterUnblockHandler.h:
2155         * platform/ContextMenuItem.h:
2156         * platform/Cookie.h:
2157         * platform/CookiesStrategy.h:
2158         * platform/DragData.h:
2159         * platform/DragImage.h:
2160         * platform/FileStream.h:
2161         * platform/LinkIcon.h:
2162         * platform/Pasteboard.cpp:
2163         (WebCore::Pasteboard::canExposeURLToDOMWhenPasteboardContainsFiles):
2164         * platform/Pasteboard.h:
2165         * platform/PasteboardStrategy.h:
2166         * platform/PasteboardWriterData.cpp:
2167         (WebCore::PasteboardWriterData::setURLData):
2168         (WebCore::PasteboardWriterData::setURL): Deleted.
2169         * platform/PasteboardWriterData.h:
2170         * platform/PlatformPasteboard.h:
2171         * platform/PromisedAttachmentInfo.h:
2172         * platform/SSLKeyGenerator.h:
2173         * platform/SchemeRegistry.cpp:
2174         (WebCore::SchemeRegistry::isBuiltinScheme):
2175         * platform/SharedBuffer.h:
2176         * platform/SharedStringHash.cpp:
2177         * platform/SharedStringHash.h:
2178         * platform/SourcesSoup.txt:
2179         * platform/UserAgent.h:
2180         * platform/UserAgentQuirks.cpp:
2181         * platform/UserAgentQuirks.h:
2182         * platform/cocoa/NetworkExtensionContentFilter.h:
2183         * platform/cocoa/NetworkExtensionContentFilter.mm:
2184         (WebCore::NetworkExtensionContentFilter::willSendRequest):
2185         * platform/glib/SSLKeyGeneratorGLib.cpp: Copied from Source/WebCore/page/ShareData.h.
2186         (WebCore::getSupportedKeySizes):
2187         (WebCore::signedPublicKeyAndChallengeString):
2188         * platform/glib/UserAgentGLib.cpp:
2189         * platform/graphics/GraphicsContext.h:
2190         * platform/graphics/Image.cpp:
2191         * platform/graphics/Image.h:
2192         * platform/graphics/ImageObserver.h:
2193         * platform/graphics/ImageSource.cpp:
2194         * platform/graphics/ImageSource.h:
2195         * platform/graphics/MediaPlayer.h:
2196         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2197         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2198         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2199         * platform/graphics/cg/GraphicsContextCG.cpp:
2200         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2201         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
2202         * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
2203         (webKitMediaSrcSetUri):
2204         * platform/graphics/iso/ISOVTTCue.cpp:
2205         * platform/graphics/win/GraphicsContextDirect2D.cpp:
2206         * platform/gtk/DragImageGtk.cpp:
2207         * platform/gtk/PasteboardGtk.cpp:
2208         * platform/gtk/PlatformPasteboardGtk.cpp:
2209         * platform/gtk/SelectionData.h:
2210         * platform/ios/PasteboardIOS.mm:
2211         * platform/ios/PlatformPasteboardIOS.mm:
2212         (WebCore::PlatformPasteboard::write):
2213         * platform/ios/QuickLook.h:
2214         * platform/mac/DragDataMac.mm:
2215         (WebCore::DragData::asPlainText const):
2216         * platform/mac/DragImageMac.mm:
2217         * platform/mac/FileSystemMac.mm:
2218         (WebCore::FileSystem::setMetadataURL):
2219         * platform/mac/PasteboardMac.mm:
2220         * platform/mac/PasteboardWriter.mm:
2221         (WebCore::createPasteboardWriter):
2222         * platform/mac/PlatformPasteboardMac.mm:
2223         * platform/mac/PublicSuffixMac.mm:
2224         (WebCore::decodeHostName):
2225         * platform/mac/SSLKeyGeneratorMac.mm:
2226         * platform/mac/WebCoreNSURLExtras.h:
2227         * platform/mac/WebCoreNSURLExtras.mm:
2228         (WebCore::isArmenianLookalikeCharacter): Deleted.
2229         (WebCore::isArmenianScriptCharacter): Deleted.
2230         (WebCore::isASCIIDigitOrValidHostCharacter): Deleted.
2231         (WebCore::isLookalikeCharacter): Deleted.
2232         (WebCore::whiteListIDNScript): Deleted.
2233         (WebCore::readIDNScriptWhiteListFile): Deleted.
2234         (WebCore::allCharactersInIDNScriptWhiteList): Deleted.
2235         (WebCore::isSecondLevelDomainNameAllowedByTLDRules): Deleted.
2236         (WebCore::isRussianDomainNameCharacter): Deleted.
2237         (WebCore::allCharactersAllowedByTLDRules): Deleted.
2238         (WebCore::mapHostNameWithRange): Deleted.
2239         (WebCore::hostNameNeedsDecodingWithRange): Deleted.
2240         (WebCore::hostNameNeedsEncodingWithRange): Deleted.
2241         (WebCore::decodeHostNameWithRange): Deleted.
2242         (WebCore::encodeHostNameWithRange): Deleted.
2243         (WebCore::decodeHostName): Deleted.
2244         (WebCore::encodeHostName): Deleted.
2245         (WebCore::collectRangesThatNeedMapping): Deleted.
2246         (WebCore::collectRangesThatNeedEncoding): Deleted.
2247         (WebCore::collectRangesThatNeedDecoding): Deleted.
2248         (WebCore::applyHostNameFunctionToMailToURLString): Deleted.
2249         (WebCore::applyHostNameFunctionToURLString): Deleted.
2250         (WebCore::mapHostNames): Deleted.
2251         (WebCore::stringByTrimmingWhitespace): Deleted.
2252         (WebCore::URLByTruncatingOneCharacterBeforeComponent): Deleted.
2253         (WebCore::URLByRemovingResourceSpecifier): Deleted.
2254         (WebCore::URLWithData): Deleted.
2255         (WebCore::dataWithUserTypedString): Deleted.
2256         (WebCore::URLWithUserTypedString): Deleted.
2257         (WebCore::URLWithUserTypedStringDeprecated): Deleted.
2258         (WebCore::hasQuestionMarkOnlyQueryString): Deleted.
2259         (WebCore::dataForURLComponentType): Deleted.
2260         (WebCore::URLByRemovingComponentAndSubsequentCharacter): Deleted.
2261         (WebCore::URLByRemovingUserInfo): Deleted.
2262         (WebCore::originalURLData): Deleted.
2263         (WebCore::createStringWithEscapedUnsafeCharacters): Deleted.
2264         (WebCore::userVisibleString): Deleted.
2265         (WebCore::isUserVisibleURL): Deleted.
2266         (WebCore::rangeOfURLScheme): Deleted.
2267         (WebCore::looksLikeAbsoluteURL): Deleted.
2268         * platform/mediastream/MediaEndpointConfiguration.h:
2269         * platform/network/BlobPart.h:
2270         * platform/network/BlobRegistry.h:
2271         * platform/network/BlobRegistryImpl.h:
2272         * platform/network/BlobResourceHandle.cpp:
2273         * platform/network/CookieRequestHeaderFieldProxy.h:
2274         * platform/network/CredentialStorage.cpp:
2275         * platform/network/CredentialStorage.h:
2276         * platform/network/DataURLDecoder.cpp:
2277         * platform/network/DataURLDecoder.h:
2278         * platform/network/FormData.h:
2279         * platform/network/ProxyServer.h:
2280         * platform/network/ResourceErrorBase.h:
2281         * platform/network/ResourceHandle.cpp:
2282         (WebCore::ResourceHandle::didReceiveResponse):
2283         * platform/network/ResourceHandle.h:
2284         * platform/network/ResourceHandleClient.h:
2285         * platform/network/ResourceRequestBase.cpp:
2286         (WebCore::ResourceRequestBase::redirectedRequest const):
2287         * platform/network/ResourceRequestBase.h:
2288         * platform/network/ResourceResponseBase.h:
2289         * platform/network/SocketStreamHandle.h:
2290         * platform/network/cf/DNSResolveQueueCFNet.cpp:
2291         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
2292         * platform/network/cf/ProxyServerCFNet.cpp:
2293         * platform/network/cf/ResourceErrorCF.cpp:
2294         * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
2295         * platform/network/curl/CookieJarCurlDatabase.cpp: Added.
2296         (WebCore::cookiesForSession):
2297         (WebCore::CookieJarCurlDatabase::setCookiesFromDOM const):
2298         (WebCore::CookieJarCurlDatabase::setCookiesFromHTTPResponse const):
2299         (WebCore::CookieJarCurlDatabase::cookiesForDOM const):
2300         (WebCore::CookieJarCurlDatabase::cookieRequestHeaderFieldValue const):
2301         (WebCore::CookieJarCurlDatabase::cookiesEnabled const):
2302         (WebCore::CookieJarCurlDatabase::getRawCookies const):
2303         (WebCore::CookieJarCurlDatabase::deleteCookie const):
2304         (WebCore::CookieJarCurlDatabase::getHostnamesWithCookies const):
2305         (WebCore::CookieJarCurlDatabase::deleteCookiesForHostnames const):
2306         (WebCore::CookieJarCurlDatabase::deleteAllCookies const):
2307         (WebCore::CookieJarCurlDatabase::deleteAllCookiesModifiedSince const):
2308         * platform/network/curl/CookieJarDB.cpp:
2309         * platform/network/curl/CookieUtil.h:
2310         * platform/network/curl/CurlContext.h:
2311         * platform/network/curl/CurlProxySettings.h:
2312         * platform/network/curl/CurlResponse.h:
2313         * platform/network/curl/NetworkStorageSessionCurl.cpp:
2314         * platform/network/curl/ProxyServerCurl.cpp:
2315         * platform/network/curl/SocketStreamHandleImplCurl.cpp:
2316         * platform/network/mac/ResourceErrorMac.mm:
2317         * platform/network/soup/NetworkStorageSessionSoup.cpp:
2318         * platform/network/soup/ProxyServerSoup.cpp:
2319         * platform/network/soup/ResourceHandleSoup.cpp:
2320         * platform/network/soup/ResourceRequest.h:
2321         * platform/network/soup/ResourceRequestSoup.cpp:
2322         * platform/network/soup/SocketStreamHandleImplSoup.cpp:
2323         * platform/network/soup/SoupNetworkSession.cpp:
2324         * platform/network/soup/SoupNetworkSession.h:
2325         * platform/text/TextEncoding.h:
2326         * platform/win/BString.cpp:
2327         * platform/win/BString.h:
2328         * platform/win/ClipboardUtilitiesWin.cpp:
2329         (WebCore::markupToCFHTML):
2330         * platform/win/ClipboardUtilitiesWin.h:
2331         * platform/win/DragImageWin.cpp:
2332         * platform/win/PasteboardWin.cpp:
2333         * plugins/PluginData.h:
2334         * rendering/HitTestResult.h:
2335         * rendering/RenderAttachment.cpp:
2336         * svg/SVGImageLoader.cpp:
2337         (WebCore::SVGImageLoader::sourceURI const):
2338         * svg/SVGURIReference.cpp:
2339         * svg/graphics/SVGImage.h:
2340         * svg/graphics/SVGImageCache.h:
2341         * svg/graphics/SVGImageForContainer.h:
2342         * testing/Internals.cpp:
2343         (WebCore::Internals::resetToConsistentState):
2344         * testing/Internals.mm:
2345         (WebCore::Internals::userVisibleString):
2346         * testing/MockContentFilter.cpp:
2347         (WebCore::MockContentFilter::willSendRequest):
2348         * testing/MockPaymentCoordinator.cpp:
2349         * testing/js/WebCoreTestSupport.cpp:
2350         * workers/AbstractWorker.h:
2351         * workers/WorkerGlobalScope.h:
2352         * workers/WorkerGlobalScopeProxy.h:
2353         * workers/WorkerInspectorProxy.h:
2354         * workers/WorkerLocation.h:
2355         * workers/WorkerScriptLoader.h:
2356         * workers/WorkerThread.cpp:
2357         * workers/WorkerThread.h:
2358         * workers/service/ServiceWorker.h:
2359         * workers/service/ServiceWorkerClientData.h:
2360         * workers/service/ServiceWorkerContainer.cpp:
2361         * workers/service/ServiceWorkerContextData.h:
2362         * workers/service/ServiceWorkerData.h:
2363         * workers/service/ServiceWorkerJobData.h:
2364         * workers/service/ServiceWorkerRegistrationKey.cpp:
2365         * workers/service/ServiceWorkerRegistrationKey.h:
2366         (WTF::HashTraits<WebCore::ServiceWorkerRegistrationKey>::constructDeletedValue):
2367         * worklets/WorkletGlobalScope.h:
2368         * xml/XMLHttpRequest.h:
2369
2370 2018-11-30  Chris Dumez  <cdumez@apple.com>
2371
2372         Drop unused Cross-Origin-Window-Policy from HTTPHeaderNames.in
2373         https://bugs.webkit.org/show_bug.cgi?id=192253
2374
2375         Reviewed by Geoffrey Garen.
2376
2377         * platform/network/HTTPHeaderNames.in:
2378
2379 2018-11-30  Justin Fan  <justin_fan@apple.com>
2380
2381         [WebGPU] WebGPUQueue::submit and WebGPURenderingContext::present() implementation
2382         https://bugs.webkit.org/show_bug.cgi?id=192254
2383
2384         Reviewed by Dean Jackson.
2385
2386         Final plumbing to render onto an HTMLCanvasElement with WebGPU. Also added ref-test that draws 
2387         a green square onto a canvas using WebGPU; reference uses 2D canvas.
2388
2389         Test: webgpu/simple-triangle-strip.html
2390
2391         * Modules/webgpu/WebGPUCommandBuffer.h:
2392         * Modules/webgpu/WebGPUSwapChain.h: Needs to override platformLayer() for CanvasBasedRenderingContext.
2393         * platform/graphics/gpu/GPUQueue.h:
2394         * platform/graphics/gpu/GPUSwapChain.h:
2395         (WebCore::GPUSwapChain::metalLayer const): Renamed from platformLayer. 
2396         (WebCore::GPUSwapChain::platformLayer const): Deleted.
2397         * platform/graphics/gpu/cocoa/GPUQueueMetal.mm:
2398         (WebCore::GPUQueue::submit):
2399         * platform/graphics/gpu/cocoa/GPUSwapChainMetal.mm:
2400         (WebCore::GPUSwapChain::getNextTexture): Returns the texture of the swap layer's next drawable. 
2401         (WebCore::GPUSwapChain::present): Presents the last-returned drawable from getNextTexture, and frees it.
2402         (WebCore::GPUSwapChain::platformLayer const):
2403
2404 2018-11-30  Zalan Bujtas  <zalan@apple.com>
2405
2406         Can’t use RalphLauren.com on iPad because hover menus don’t stay up
2407         https://bugs.webkit.org/show_bug.cgi?id=192236
2408         <rdar://problem/45792118>
2409
2410         Reviewed by Geoffrey Garen.
2411
2412         This patch introduces asynchronous content change observation.
2413         1. Start observing synchronous content change and timer install as the result of dispatching mouseMoved event.
2414         2. Start observing synchronous content change and style recalc schedule as the result of a timer callback (installed at #1).
2415         3. Start observing synchronous content change as the result of a style recalc (scheduled at #2).
2416
2417         This patch also extends the timeout value from 100ms to 250ms. Certain content prefer longer timeouts (see http://briancherne.github.io/jquery-hoverIntent/ for details).  
2418
2419         Test: fast/events/touch/ios/hover-when-style-change-is-async.html
2420
2421         * dom/Document.cpp:
2422         (WebCore::Document::scheduleStyleRecalc):
2423         (WebCore::Document::updateStyleIfNeeded):
2424         * page/DOMTimer.cpp:
2425         (WebCore::DOMTimer::install):
2426         (WebCore::DOMTimer::fired):
2427         * platform/ios/wak/WKContentObservation.cpp:
2428         (WKStartObservingStyleRecalcScheduling):
2429         (WKStopObservingStyleRecalcScheduling):
2430         (WKIsObservingStyleRecalcScheduling):
2431         (WKSetShouldObserveNextStyleRecalc):
2432         (WKShouldObserveNextStyleRecalc):
2433         (WKSetObservedContentChange):
2434         * platform/ios/wak/WKContentObservation.h:
2435
2436 2018-11-30  Ryosuke Niwa  <rniwa@webkit.org>
2437
2438         ShadowRoot should have styleSheets property
2439         https://bugs.webkit.org/show_bug.cgi?id=191311
2440
2441         Reviewed by Antti Koivisto.
2442
2443         Added the support for ShadowRoot.prototype.styleSheets by making StyleSheetList refer to either
2444         a document or a shadow root. We don't support the named getter in shadow root since that's not
2445         a standard feature: https://drafts.csswg.org/cssom/#the-stylesheetlist-interface
2446
2447         Tests: fast/shadow-dom/shadowroot-stylesheets-wrapper-gc.html
2448                imported/w3c/web-platform-tests/shadow-dom/ShadowRoot-interface.html
2449
2450         * css/StyleSheetList.cpp:
2451         (WebCore::StyleSheetList::StyleSheetList): Added a variant which takes ShadowRoot.
2452         (WebCore::StyleSheetList::styleSheets const):
2453         (WebCore::StyleSheetList::ownerNode): Added. The replacement for document() since now the opaque
2454         root could be either a Document or a ShadowRoot.
2455         (WebCore::StyleSheetList::detach): Renamed from detachFromDocument.
2456         (WebCore::StyleSheetList::namedItem const): Added a comment that the named getter is only supported
2457         for Document since it's not in the standard.
2458         * css/StyleSheetList.h:
2459         (WebCore::StyleSheetList::create): Added a variant which takes ShadowRoot.
2460         (WebCore::StyleSheetList::document): Deleted. Replaced by StyleSheetList::ownerNode in .cpp file.
2461         * css/StyleSheetList.idl:
2462         * dom/Document.cpp:
2463         (WebCore::Document::~Document):
2464         (WebCore::Document::styleSheets):
2465         * dom/Document.idl:
2466         * dom/DocumentOrShadowRoot.idl: Moved the declaration of styleSheets here from Document.idl.
2467         * dom/ShadowRoot.cpp:
2468         (WebCore::ShadowRoot::~ShadowRoot): Call detach.
2469         (WebCore::ShadowRoot::styleSheets):
2470         * dom/ShadowRoot.h:
2471
2472 2018-11-30  Chris Dumez  <cdumez@apple.com>
2473
2474         [PSON] We are sometimes swapping processes even though there is an opened window with an opener link to us
2475         https://bugs.webkit.org/show_bug.cgi?id=192242
2476
2477         Reviewed by Geoffrey Garen.
2478
2479         Move the setting of the openedViaWindowOpenWithOpener & hasOpenedFrames flags on the
2480         NavigationAction from FrameLoader::loadURL(), to PolicyChecker::checkNavigationPolicy()
2481         to make sure those are always accurate and so that the UIProcess can make correct process
2482         swapping decisions.
2483
2484         NavigationAction objects are created in other places than FrameLoader::loadURL() as well.
2485         Even PolicyChecker::checkNavigationPolicy() will create a NavigationAction object if
2486         there is not already one.
2487
2488         * loader/FrameLoader.cpp:
2489         (WebCore::FrameLoader::loadURL):
2490         * loader/FrameLoader.h:
2491         (WebCore::FrameLoader::hasOpenedFrames const):
2492         * loader/PolicyChecker.cpp:
2493         (WebCore::PolicyChecker::checkNavigationPolicy):
2494
2495 2018-11-30  Don Olmstead  <don.olmstead@sony.com>
2496
2497         Rename ENABLE_SUBTLE_CRYPTO to ENABLE_WEB_CRYPTO
2498         https://bugs.webkit.org/show_bug.cgi?id=192197
2499
2500         Reviewed by Jiewen Tan.
2501
2502         No new tests. No change in behavior.
2503
2504         * Configurations/FeatureDefines.xcconfig:
2505         * bindings/js/SerializedScriptValue.cpp:
2506         (WebCore::CloneSerializer::dumpIfTerminal):
2507         (WebCore::CloneDeserializer::readTerminal):
2508         * crypto/CommonCryptoUtilities.cpp:
2509         * crypto/CommonCryptoUtilities.h:
2510         * crypto/CryptoAlgorithm.cpp:
2511         * crypto/CryptoAlgorithm.h:
2512         * crypto/CryptoAlgorithmIdentifier.h:
2513         * crypto/CryptoAlgorithmParameters.h:
2514         * crypto/CryptoAlgorithmParameters.idl:
2515         * crypto/CryptoAlgorithmRegistry.cpp:
2516         * crypto/CryptoAlgorithmRegistry.h:
2517         * crypto/CryptoKey.cpp:
2518         * crypto/CryptoKey.h:
2519         * crypto/CryptoKey.idl:
2520         * crypto/CryptoKeyFormat.h:
2521         * crypto/CryptoKeyPair.h:
2522         * crypto/CryptoKeyPair.idl:
2523         * crypto/CryptoKeyType.h:
2524         * crypto/CryptoKeyUsage.h:
2525         * crypto/CryptoKeyUsage.idl:
2526         * crypto/JsonWebKey.h:
2527         * crypto/JsonWebKey.idl:
2528         * crypto/RsaOtherPrimesInfo.h:
2529         * crypto/RsaOtherPrimesInfo.idl:
2530         * crypto/SerializedCryptoKeyWrap.h:
2531         * crypto/SubtleCrypto.cpp:
2532         * crypto/SubtleCrypto.h:
2533         * crypto/SubtleCrypto.idl:
2534         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
2535         * crypto/algorithms/CryptoAlgorithmAES_CBC.h:
2536         * crypto/algorithms/CryptoAlgorithmAES_CFB.cpp:
2537         * crypto/algorithms/CryptoAlgorithmAES_CFB.h:
2538         * crypto/algorithms/CryptoAlgorithmAES_CTR.cpp:
2539         * crypto/algorithms/CryptoAlgorithmAES_CTR.h:
2540         * crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:
2541         * crypto/algorithms/CryptoAlgorithmAES_GCM.h:
2542         * crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
2543         * crypto/algorithms/CryptoAlgorithmAES_KW.h:
2544         * crypto/algorithms/CryptoAlgorithmECDH.cpp:
2545         * crypto/algorithms/CryptoAlgorithmECDH.h:
2546         * crypto/algorithms/CryptoAlgorithmECDSA.cpp:
2547         * crypto/algorithms/CryptoAlgorithmECDSA.h:
2548         * crypto/algorithms/CryptoAlgorithmHKDF.cpp:
2549         * crypto/algorithms/CryptoAlgorithmHKDF.h:
2550         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
2551         * crypto/algorithms/CryptoAlgorithmHMAC.h:
2552         * crypto/algorithms/CryptoAlgorithmPBKDF2.cpp:
2553         * crypto/algorithms/CryptoAlgorithmPBKDF2.h:
2554         * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
2555         * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h:
2556         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
2557         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
2558         * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
2559         * crypto/algorithms/CryptoAlgorithmRSA_OAEP.h:
2560         * crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:
2561         * crypto/algorithms/CryptoAlgorithmRSA_PSS.h:
2562         * crypto/algorithms/CryptoAlgorithmSHA1.cpp:
2563         * crypto/algorithms/CryptoAlgorithmSHA1.h:
2564         * crypto/algorithms/CryptoAlgorithmSHA224.cpp:
2565         * crypto/algorithms/CryptoAlgorithmSHA224.h:
2566         * crypto/algorithms/CryptoAlgorithmSHA256.cpp:
2567         * crypto/algorithms/CryptoAlgorithmSHA256.h:
2568         * crypto/algorithms/CryptoAlgorithmSHA384.cpp:
2569         * crypto/algorithms/CryptoAlgorithmSHA384.h:
2570         * crypto/algorithms/CryptoAlgorithmSHA512.cpp:
2571         * crypto/algorithms/CryptoAlgorithmSHA512.h:
2572         * crypto/gcrypt/CryptoAlgorithmAES_CBCGCrypt.cpp:
2573         * crypto/gcrypt/CryptoAlgorithmAES_CFBGCrypt.cpp:
2574         * crypto/gcrypt/CryptoAlgorithmAES_CTRGCrypt.cpp:
2575         * crypto/gcrypt/CryptoAlgorithmAES_GCMGCrypt.cpp:
2576         * crypto/gcrypt/CryptoAlgorithmAES_KWGCrypt.cpp:
2577         * crypto/gcrypt/CryptoAlgorithmECDHGCrypt.cpp:
2578         * crypto/gcrypt/CryptoAlgorithmECDSAGCrypt.cpp:
2579         * crypto/gcrypt/CryptoAlgorithmHKDFGCrypt.cpp:
2580         * crypto/gcrypt/CryptoAlgorithmHMACGCrypt.cpp:
2581         * crypto/gcrypt/CryptoAlgorithmPBKDF2GCrypt.cpp:
2582         * crypto/gcrypt/CryptoAlgorithmRSAES_PKCS1_v1_5GCrypt.cpp:
2583         * crypto/gcrypt/CryptoAlgorithmRSASSA_PKCS1_v1_5GCrypt.cpp:
2584         * crypto/gcrypt/CryptoAlgorithmRSA_OAEPGCrypt.cpp:
2585         * crypto/gcrypt/CryptoAlgorithmRSA_PSSGCrypt.cpp:
2586         * crypto/gcrypt/CryptoAlgorithmRegistryGCrypt.cpp:
2587         * crypto/gcrypt/CryptoKeyECGCrypt.cpp:
2588         * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
2589         * crypto/gcrypt/SerializedCryptoKeyWrapGCrypt.cpp:
2590         * crypto/keys/CryptoAesKeyAlgorithm.idl:
2591         * crypto/keys/CryptoEcKeyAlgorithm.idl:
2592         * crypto/keys/CryptoHmacKeyAlgorithm.idl:
2593         * crypto/keys/CryptoKeyAES.cpp:
2594         * crypto/keys/CryptoKeyAES.h:
2595         * crypto/keys/CryptoKeyAlgorithm.idl:
2596         * crypto/keys/CryptoKeyEC.cpp:
2597         * crypto/keys/CryptoKeyEC.h:
2598         * crypto/keys/CryptoKeyHMAC.cpp:
2599         * crypto/keys/CryptoKeyHMAC.h:
2600         * crypto/keys/CryptoKeyRSA.cpp:
2601         * crypto/keys/CryptoKeyRSA.h:
2602         * crypto/keys/CryptoKeyRSAComponents.cpp:
2603         * crypto/keys/CryptoKeyRSAComponents.h:
2604         * crypto/keys/CryptoKeyRaw.cpp:
2605         * crypto/keys/CryptoKeyRaw.h:
2606         * crypto/keys/CryptoRsaHashedKeyAlgorithm.idl:
2607         * crypto/keys/CryptoRsaKeyAlgorithm.idl:
2608         * crypto/mac/CommonCryptoDERUtilities.cpp:
2609         * crypto/mac/CommonCryptoDERUtilities.h:
2610         * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
2611         * crypto/mac/CryptoAlgorithmAES_CFBMac.cpp:
2612         * crypto/mac/CryptoAlgorithmAES_CTRMac.cpp:
2613         * crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:
2614         * crypto/mac/CryptoAlgorithmAES_KWMac.cpp:
2615         * crypto/mac/CryptoAlgorithmECDHMac.cpp:
2616         * crypto/mac/CryptoAlgorithmECDSAMac.cpp:
2617         * crypto/mac/CryptoAlgorithmHKDFMac.cpp:
2618         * crypto/mac/CryptoAlgorithmHMACMac.cpp:
2619         * crypto/mac/CryptoAlgorithmPBKDF2Mac.cpp:
2620         * crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:
2621         * crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
2622         * crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:
2623         * crypto/mac/CryptoAlgorithmRSA_PSSMac.cpp:
2624         * crypto/mac/CryptoAlgorithmRegistryMac.cpp:
2625         * crypto/mac/CryptoDigestAlgorithm.h:
2626         * crypto/mac/CryptoKeyECMac.cpp:
2627         * crypto/mac/CryptoKeyMac.cpp:
2628         * crypto/mac/CryptoKeyRSAMac.cpp:
2629         * crypto/mac/SerializedCryptoKeyWrapMac.mm:
2630         * crypto/parameters/AesCbcCfbParams.idl:
2631         * crypto/parameters/AesCtrParams.idl:
2632         * crypto/parameters/AesGcmParams.idl:
2633         * crypto/parameters/AesKeyParams.idl:
2634         * crypto/parameters/CryptoAlgorithmAesCbcCfbParams.h:
2635         * crypto/parameters/CryptoAlgorithmAesCtrParams.h:
2636         * crypto/parameters/CryptoAlgorithmAesGcmParams.h:
2637         * crypto/parameters/CryptoAlgorithmAesKeyParams.h:
2638         * crypto/parameters/CryptoAlgorithmEcKeyParams.h:
2639         * crypto/parameters/CryptoAlgorithmEcdhKeyDeriveParams.h:
2640         * crypto/parameters/CryptoAlgorithmEcdsaParams.h:
2641         * crypto/parameters/CryptoAlgorithmHkdfParams.h:
2642         * crypto/parameters/CryptoAlgorithmHmacKeyParams.h:
2643         * crypto/parameters/CryptoAlgorithmPbkdf2Params.h:
2644         * crypto/parameters/CryptoAlgorithmRsaHashedImportParams.h:
2645         * crypto/parameters/CryptoAlgorithmRsaHashedKeyGenParams.h:
2646         * crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h:
2647         * crypto/parameters/CryptoAlgorithmRsaOaepParams.h:
2648         * crypto/parameters/CryptoAlgorithmRsaPssParams.h:
2649         * crypto/parameters/EcKeyParams.idl:
2650         * crypto/parameters/EcdhKeyDeriveParams.idl:
2651         * crypto/parameters/EcdsaParams.idl:
2652         * crypto/parameters/HkdfParams.idl:
2653         * crypto/parameters/HmacKeyParams.idl:
2654         * crypto/parameters/Pbkdf2Params.idl:
2655         * crypto/parameters/RsaHashedImportParams.idl:
2656         * crypto/parameters/RsaHashedKeyGenParams.idl:
2657         * crypto/parameters/RsaKeyGenParams.idl:
2658         * crypto/parameters/RsaOaepParams.idl:
2659         * crypto/parameters/RsaPssParams.idl:
2660         * dom/Document.cpp:
2661         * dom/Document.h:
2662         * dom/ScriptExecutionContext.h:
2663         * page/ChromeClient.h:
2664         * page/Crypto.cpp:
2665         (WebCore::Crypto::Crypto):
2666         * page/Crypto.h:
2667         * page/Crypto.idl:
2668         * platform/GCrypt.cmake:
2669         * platform/LocalizedStrings.cpp:
2670         * platform/LocalizedStrings.h:
2671         * workers/WorkerGlobalScope.cpp:
2672         * workers/WorkerGlobalScope.h:
2673         * worklets/WorkletGlobalScope.h:
2674
2675 2018-11-30  Wenson Hsieh  <wenson_hsieh@apple.com>
2676
2677         Replace "auto fill" with "AutoFill" in some localizable strings
2678         https://bugs.webkit.org/show_bug.cgi?id=192233
2679         <rdar://problem/46311614>
2680
2681         Reviewed by Chris Fleizach.
2682
2683         Replace "autofill" with "AutoFill".
2684
2685         * en.lproj/Localizable.strings:
2686         * platform/LocalizedStrings.cpp:
2687         (WebCore::AXAutoFillCredentialsLabel):
2688         (WebCore::AXAutoFillContactsLabel):
2689         (WebCore::AXAutoFillStrongPasswordLabel):
2690         (WebCore::AXAutoFillCreditCardLabel):
2691
2692 2018-11-29  Ryosuke Niwa  <rniwa@webkit.org>
2693
2694         Add CEReactions=NotNeeded on all the relevant IDL files
2695         https://bugs.webkit.org/show_bug.cgi?id=188368
2696         <rdar://problem/42987753>
2697
2698         Rubber-stamped by Antti Koivisto.
2699
2700         Based on a patch written by Frederic Wang. Added CEReactions=NotNeeded to all the places
2701         we don't need CEReactions because we don't implement customized builtins but are marked with
2702         CEReactions in the HTML specification.
2703
2704         * html/HTMLAnchorElement.idl:
2705         * html/HTMLAreaElement.idl:
2706         * html/HTMLBRElement.idl:
2707         * html/HTMLBaseElement.idl:
2708         * html/HTMLBodyElement.idl:
2709         * html/HTMLButtonElement.idl:
2710         * html/HTMLCanvasElement.idl:
2711         * html/HTMLDListElement.idl:
2712         * html/HTMLDataElement.idl:
2713         * html/HTMLDetailsElement.idl:
2714         * html/HTMLDirectoryElement.idl:
2715         * html/HTMLDivElement.idl:
2716         * html/HTMLEmbedElement.idl:
2717         * html/HTMLFieldSetElement.idl:
2718         * html/HTMLFontElement.idl:
2719         * html/HTMLFormElement.idl:
2720         * html/HTMLFrameElement.idl:
2721         * html/HTMLFrameSetElement.idl:
2722         * html/HTMLHRElement.idl:
2723         * html/HTMLHeadingElement.idl:
2724         * html/HTMLHtmlElement.idl:
2725         * html/HTMLHyperlinkElementUtils.idl:
2726         * html/HTMLImageElement.idl:
2727         * html/HTMLInputElement.idl:
2728         * html/HTMLLIElement.idl:
2729         * html/HTMLLabelElement.idl:
2730         * html/HTMLLegendElement.idl:
2731         * html/HTMLLinkElement.idl:
2732         * html/HTMLMapElement.idl:
2733         * html/HTMLMarqueeElement.idl:
2734         * html/HTMLMediaElement.idl:
2735         * html/HTMLMenuElement.idl:
2736         * html/HTMLMetaElement.idl:
2737         * html/HTMLMeterElement.idl:
2738         * html/HTMLModElement.idl:
2739         * html/HTMLOListElement.idl:
2740         * html/HTMLObjectElement.idl:
2741         * html/HTMLOptGroupElement.idl:
2742         * html/HTMLOptionElement.idl:
2743         * html/HTMLOutputElement.idl:
2744         * html/HTMLParagraphElement.idl:
2745         * html/HTMLParamElement.idl:
2746         * html/HTMLPreElement.idl:
2747         * html/HTMLProgressElement.idl:
2748         * html/HTMLQuoteElement.idl:
2749         * html/HTMLScriptElement.idl:
2750         * html/HTMLSlotElement.idl:
2751         * html/HTMLSourceElement.idl:
2752         * html/HTMLStyleElement.idl:
2753         * html/HTMLTableCaptionElement.idl:
2754         * html/HTMLTableCellElement.idl:
2755         * html/HTMLTableColElement.idl:
2756         * html/HTMLTableElement.idl:
2757         * html/HTMLTableRowElement.idl:
2758         * html/HTMLTableSectionElement.idl:
2759         * html/HTMLTextAreaElement.idl:
2760         * html/HTMLTimeElement.idl:
2761         * html/HTMLTrackElement.idl:
2762         * html/HTMLUListElement.idl:
2763         * html/HTMLVideoElement.idl:
2764
2765 2018-11-30  Alexey Proskuryakov  <ap@apple.com>
2766
2767         Move USE_CFNETWORK_IGNORE_HSTS to its proper place
2768         https://bugs.webkit.org/show_bug.cgi?id=192173
2769
2770         Reviewed by Tim Horton.
2771
2772         * platform/network/mac/WebCoreURLResponse.mm:
2773         (WebCore::schemeWasUpgradedDueToDynamicHSTS):
2774
2775 2018-11-30  Basuke Suzuki  <basuke.suzuki@sony.com>
2776
2777         [Curl] Add API for ProtectionSpace.
2778         https://bugs.webkit.org/show_bug.cgi?id=191648
2779
2780         Reviewed by Alex Christensen.
2781
2782         Create a platform dependent header and implementation files for ProtectionSpace.
2783
2784         No new tests because there's no behavior change.
2785
2786         * platform/Curl.cmake:
2787         * platform/network/ProtectionSpace.h:
2788         * platform/network/curl/ProtectionSpaceCurl.cpp: Added.
2789         (WebCore::ProtectionSpace::certificateInfo const):
2790         * platform/network/curl/ProtectionSpaceCurl.h: Added.
2791         (WebCore::ProtectionSpace::ProtectionSpace):
2792         (WebCore::ProtectionSpace::encodingRequiresPlatformData const):
2793         (WebCore::ProtectionSpace::platformCompare):
2794
2795 2018-11-30  Justin Fan  <justin_fan@apple.com>
2796
2797         [WebGPU] Flesh out WebGPURenderPassDescriptor to match the WebGPU IDL
2798         https://bugs.webkit.org/show_bug.cgi?id=192213
2799
2800         Reviewed by Dean Jackson.
2801
2802         WebGPU prototype now uses WebGPURenderPassColorAttachmentDescriptor in WebGPURenderPassDescriptor to match the WebGPU Sketch.
2803         WebGPU developer can now also set the clearColor in WebGPURenderPassDescriptor.
2804
2805         No new tests. Older WebGPURenderPass* tests updated. 
2806
2807         * CMakeLists.txt:
2808         * DerivedSources.make:
2809         * Modules/webgpu/WebGPUColor.h: Added. Typedef'd to GPUColor.h.
2810         * Modules/webgpu/WebGPUColor.idl: Added.
2811         * Modules/webgpu/WebGPUCommandBuffer.cpp:
2812         (WebCore::WebGPUCommandBuffer::beginRenderPass): Updated to error check and support the new structure of WebGPURenderPassDescriptor.
2813         * Modules/webgpu/WebGPURenderPassColorAttachmentDescriptor.h: Added.
2814         * Modules/webgpu/WebGPURenderPassColorAttachmentDescriptor.idl: Added.
2815         * Modules/webgpu/WebGPURenderPassDescriptor.h: 
2816         * Modules/webgpu/WebGPURenderPassDescriptor.idl: Updated to match the sketch IDL.
2817         * Sources.txt:
2818         * WebCore.xcodeproj/project.pbxproj:
2819         * platform/graphics/gpu/GPUColor.h: Added.
2820         * platform/graphics/gpu/GPURenderPassColorAttachmentDescriptor.h: Added. Backing struct for WebGPU__.
2821         * platform/graphics/gpu/GPURenderPassDescriptor.h: Updated to match new WebGPURenderPassDescriptor.
2822         * platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
2823         (WebCore::GPURenderPassEncoder::create): Now also uses clearColor set by developer.
2824
2825 2018-11-30  Andy Estes  <aestes@apple.com>
2826
2827         [Cocoa] Add some WKA extension points
2828         https://bugs.webkit.org/show_bug.cgi?id=192131
2829         <rdar://problem/46330293>
2830
2831         Reviewed by Tim Horton.
2832
2833         * DerivedSources.make: Added an extension point for derived sources.
2834         * Modules/applepay/PaymentCoordinatorClient.h: Added an extension point for
2835         PaymentCoordinatorClient.
2836         * SourcesCocoa.txt: Added WebCoreAdditions.mm as a non-unified source.
2837         * WebCore.xcodeproj/project.pbxproj: Added WebCoreAdditions.mm.
2838         * bindings/js/WebCoreBuiltinNames.h: Added an extension point for built-in names.
2839         * page/SettingsBase.h: Added an extension point for settings.
2840         * platform/cocoa/WebCoreAdditions.mm: Added.
2841
2842 2018-11-30  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2843
2844         [GStreamer][EME] CDMInstance should be shipped as a GstContext to the decryptors
2845         https://bugs.webkit.org/show_bug.cgi?id=192075
2846
2847         Reviewed by Philippe Normand.
2848
2849         So far, we were shipping the CDMInstance in an event to the
2850         decryptors and they were requesting it with bus messages when it
2851         was not found. Now we ship it with a GstContext that is set to the
2852         pipeline and read from the decryptors, which is now always
2853         available.
2854
2855         As a consequence of changing this flow, the attemptToDecrypt one
2856         was affected as well because it was tied to CDMInstance
2857         shipment. A workaround was added: when the decryptors send the
2858         waitingForKey, an attemptToDecrypt will be performed. A FIXME was
2859         added for this. A subconsequence is that
2860         attemptToDecryptWithInstance is reworked to rely always in
2861         attemptToDecryptWithLocal instance, the former becomes final and
2862         the latter virtual.
2863
2864         This is a rework, no new tests needed.
2865
2866         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2867         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
2868         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2869         (WebCore::MediaPlayerPrivateGStreamerBase::cdmInstanceAttached):
2870         (WebCore::MediaPlayerPrivateGStreamerBase::cdmInstanceDetached):
2871         (WebCore::MediaPlayerPrivateGStreamerBase::attemptToDecryptWithLocalInstance):
2872         (WebCore::MediaPlayerPrivateGStreamerBase::dispatchCDMInstance): Deleted.
2873         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2874         * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
2875         (webkit_media_common_encryption_decrypt_class_init):
2876         (webkitMediaCommonEncryptionDecryptTransformInPlace):
2877         (webkitMediaCommonEncryptionDecryptIsCDMInstanceAvailable):
2878         (webkitMediaCommonEncryptionDecryptSinkEventHandler):
2879         (webKitMediaCommonEncryptionDecryptorSetContext):
2880         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
2881         (WebCore::MediaPlayerPrivateGStreamerMSE::attemptToDecryptWithLocalInstance):
2882         (WebCore::MediaPlayerPrivateGStreamerMSE::attemptToDecryptWithInstance): Deleted.
2883         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:
2884
2885 2018-11-30  Zalan Bujtas  <zalan@apple.com>
2886
2887         [LFC][BFC] Compute min/maxHeight margins only when they are needed.
2888         https://bugs.webkit.org/show_bug.cgi?id=192223
2889
2890         Reviewed by Antti Koivisto.
2891
2892         Test: fast/block/block-only/collapsed-margin-with-min-height.html
2893
2894         * layout/blockformatting/BlockFormattingContext.cpp:
2895         (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin const):
2896
2897 2018-11-30  Zalan Bujtas  <zalan@apple.com>
2898
2899         [LFC][BFC] Geometry::inFlowNonReplacedHeightAndMargin should check for empty inline formatting context.
2900         https://bugs.webkit.org/show_bug.cgi?id=192215
2901
2902         Reviewed by Antti Koivisto.
2903
2904         Check if the inline formatting context actually has any lines.
2905
2906         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
2907         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
2908
2909 2018-11-30  Zalan Bujtas  <zalan@apple.com>
2910
2911         [LFC][BFC][MarginCollapsing] Do not use computed display box values for border and padding
2912         https://bugs.webkit.org/show_bug.cgi?id=192214
2913
2914         Reviewed by Antti Koivisto.
2915
2916         Border and padding values are not necessarily computed yet when we try to estimate the margin top value. Estimating margin top is required
2917         to be able to place floats (vertically) sooner than we would compute the final vertical position for a regular block box.
2918
2919         <body><div style="float: left"></div><div><div style="margin: 10px;"></div></div>
2920
2921         In the above example, to estimate a final vertical position of the floating box, we need to know whether the nested div's margin is collapsed
2922         all the way up to the body. However in order to find it out we need to check for borders and paddings (they stop margin collapsing).
2923         At the time when the floating box is being laied out, those <div> block boxes are still far down in the layout queue.
2924
2925         * layout/blockformatting/BlockFormattingContext.h:
2926         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
2927         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
2928         * layout/blockformatting/BlockMarginCollapse.cpp:
2929         (WebCore::Layout::hasBorder):
2930         (WebCore::Layout::hasPadding):
2931         (WebCore::Layout::hasBorderBefore):
2932         (WebCore::Layout::hasBorderAfter):
2933         (WebCore::Layout::hasPaddingBefore):
2934         (WebCore::Layout::hasPaddingAfter):
2935         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::isMarginTopCollapsedWithParent):
2936         (WebCore::Layout::isMarginBottomCollapsedThrough):
2937         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginTop):
2938         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBottom):
2939         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::isMarginBottomCollapsedWithParent):
2940         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::collapsedMarginBottomFromLastChild):
2941
2942 2018-11-29  Frederic Wang  <fwang@igalia.com>
2943
2944         Separate paint and scroll offsets for RenderLayerBacking::m_scrollingContentsLayer
2945         https://bugs.webkit.org/show_bug.cgi?id=183040
2946
2947         Currently, scroll offset of RenderLayerBacking::m_scrollingContentsLayer is stored in the
2948         GraphicsLayer::m_offsetFromRenderer member used for paint offset. This patch separates these
2949         two concept by introducing a new GraphicsLayer::m_scrollOffset for the scroll offset. This
2950         makes the API a little bit cleaner, the code easier to understand and might avoid unnecessary
2951         repaints in composited scroll.
2952
2953         Reviewed by Simon Fraser.
2954
2955         No new tests, already covered by existing tests.
2956
2957         * platform/graphics/GraphicsLayer.cpp:
2958         (WebCore::GraphicsLayer::setScrollOffset): Setter function to update the scroll offset
2959         of the content layer inside its scrolling parent layer. Ask a repaint if it has changed and
2960         is requested by the caller.
2961         (WebCore::GraphicsLayer::paintGraphicsLayerContents): Take into account the scroll offset
2962         when painting.
2963         (WebCore::GraphicsLayer::dumpProperties const): Dump the scroll offset property.
2964         * platform/graphics/GraphicsLayer.h: Include ScrollableArea for the ScrollOffset typedef.
2965         Add member for the scroll offset of the content layer inside its scrolling parent layer.
2966         (WebCore::GraphicsLayer::scrollOffset const): Getter function.
2967         * rendering/RenderLayerBacking.cpp:
2968         (WebCore::RenderLayerBacking::updateGeometry): Do not include the scroll offset in the
2969         paint offset of m_scrollingContentsLayer since it is now taken into account in
2970         paintGraphicsLayerContents. Update the scroll offset of m_scrollingContentsLayer separately.
2971         Leave the paint offset of m_foregroundLayer unchanged.
2972         (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect): Take into account the scroll
2973         offset of m_scrollingContentsLayer when calculating the dirty rect.
2974
2975 2018-11-29  Simon Fraser  <simon.fraser@apple.com>
2976
2977         Overflow scrolling layers need to be self-painting
2978         https://bugs.webkit.org/show_bug.cgi?id=192201
2979
2980         Reviewed by Dean Jackson.
2981         
2982         Overflow scrolling layers paint their contents, so need to be self-painting in the RenderLayer sense.
2983         
2984         Without this change, the overflow in the testcase doesn't get any compositing layers.
2985
2986         Test: compositing/scrolling/overflow-scrolling-layers-are-self-painting.html
2987
2988         * rendering/RenderLayer.cpp:
2989         (WebCore::RenderLayer::calculateClipRects const):
2990
2991 2018-11-29  Christopher Reid  <chris.reid@sony.com>
2992
2993         [Win] listDirectory in FileSystemWin.cpp should not skip all directories
2994         https://bugs.webkit.org/show_bug.cgi?id=192042
2995
2996         Reviewed by Fujii Hironori.
2997
2998         Covered by existing tests.
2999
3000         listDirectory is not returning any child directories which is causing
3001         ASSERT(diskUsage >= databaseFileSize) in SQLiteIDBBackingStore.cpp to fail.
3002
3003         Change listDirectory in FileSystemWin to match FileSystemPOSIX's behavior.
3004         listDirectory should only skip the current and previous directories.
3005
3006         * platform/win/FileSystemWin.cpp:
3007
3008 2018-11-29  Ryan Haddad  <ryanhaddad@apple.com>
3009
3010         Unreviewed, rolling out r238713.
3011
3012         Breaks internal builds.
3013
3014         Reverted changeset:
3015
3016         "[Cocoa] Add some WKA extension points"
3017         https://bugs.webkit.org/show_bug.cgi?id=192131
3018         https://trac.webkit.org/changeset/238713
3019
3020 2018-11-29  Ryan Haddad  <ryanhaddad@apple.com>
3021
3022         Unreviewed, rolling out r238680.
3023
3024         Caused existing webrtc layout tests to fail an assertion.
3025
3026         Reverted changeset:
3027
3028         "A sender created through addTransceiver and populated using
3029         addTrack should have its source set"
3030         https://bugs.webkit.org/show_bug.cgi?id=192136
3031         https://trac.webkit.org/changeset/238680
3032
3033 2018-11-29  Justin Fan  <justin_fan@apple.com>
3034
3035         Remove dangling WebGPU file references from WebCore project
3036         https://bugs.webkit.org/show_bug.cgi?id=192185
3037
3038         Unreviewed project file gardening.
3039
3040         No new tests.
3041
3042         * WebCore.xcodeproj/project.pbxproj:
3043
3044 2018-11-29  Keith Rollin  <krollin@apple.com>
3045
3046         Unreviewed build fix.
3047
3048         r238637 introduced some DerivedSources.make changes that could produce
3049         some invalid .idl files, leading to IDLParser.pm error messages.
3050
3051         * DerivedSources.make:
3052
3053 2018-11-29  Simon Fraser  <simon.fraser@apple.com>
3054
3055         Add an internal feature flag to enable async overflow scrolling
3056         https://bugs.webkit.org/show_bug.cgi?id=192184
3057
3058         Reviewed by Tim Horton.
3059
3060         Add a new internal feature flag that will enable async overflow-scrolling for
3061         most overflow:scroll elements. Defaults to off.
3062         
3063         Make the "UseAcceleratedTouchScrolling" terminology in RenderLayer etc be more generic,
3064         and refer to async overflow scrolling.
3065
3066         * page/Settings.yaml:
3067         * rendering/RenderLayer.cpp:
3068         (WebCore::canCreateStackingContext): Remove a line which is not necessary, since -webkit-overflow-scrolling: touch
3069         already triggers non-auto z-index via code in StyleResolver::adjustRenderStyle().
3070         (WebCore::RenderLayer::canUseCompositedScrolling const):
3071         (WebCore::RenderLayer::hasCompositedScrollableOverflow const):
3072         (WebCore::RenderLayer::handleTouchEvent):
3073         (WebCore::RenderLayer::usesAsyncScrolling const):
3074         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
3075         (WebCore::RenderLayer::showsOverflowControls const):
3076         (WebCore::RenderLayer::calculateClipRects const):
3077         (WebCore::RenderLayer::canUseAcceleratedTouchScrolling const): Deleted.
3078         (WebCore::RenderLayer::hasTouchScrollableOverflow const): Deleted.
3079         * rendering/RenderLayer.h:
3080         * rendering/RenderLayerBacking.cpp:
3081         (WebCore::layerOrAncestorIsTransformedOrUsingCompositedScrolling):
3082         (WebCore::RenderLayerBacking::updateConfiguration):
3083         (WebCore::RenderLayerBacking::computeParentGraphicsLayerRect const):
3084         * rendering/RenderLayerCompositor.cpp:
3085         (WebCore::RenderLayerCompositor::requiresCompositingForOverflowScrolling const):
3086         (WebCore::RenderLayerCompositor::isAsyncScrollableStickyLayer const):
3087         (WebCore::RenderLayerCompositor::useCoordinatedScrollingForLayer const):
3088
3089 2018-11-29  Andy Estes  <aestes@apple.com>
3090
3091         [Cocoa] Add some WKA extension points
3092         https://bugs.webkit.org/show_bug.cgi?id=192131
3093         <rdar://problem/46330293>
3094
3095         Reviewed by Tim Horton.
3096
3097         * DerivedSources.make: Added an extension point for derived sources.
3098         * Modules/applepay/PaymentCoordinatorClient.h: Added an extension point for
3099         PaymentCoordinatorClient.
3100         * SourcesCocoa.txt: Added WebCoreAdditions.mm as a non-unified source.
3101         * WebCore.xcodeproj/project.pbxproj: Added WebCoreAdditions.mm.
3102         * bindings/js/WebCoreBuiltinNames.h: Added an extension point for built-in names.
3103         * page/SettingsBase.h: Added an extension point for settings.
3104         * platform/cocoa/WebCoreAdditions.mm: Added.
3105
3106 2018-11-29  Tim Horton  <timothy_horton@apple.com>
3107
3108         Make drawing tools available when an editable image is focused
3109         https://bugs.webkit.org/show_bug.cgi?id=192172
3110         <rdar://problem/30337960>
3111
3112         Reviewed by Dean Jackson.
3113
3114         * editing/Editor.cpp:
3115         (WebCore::Editor::insertEditableImage):
3116         * editing/Editor.h:
3117         * editing/InsertEditableImageCommand.cpp:
3118         (WebCore::InsertEditableImageCommand::insertEditableImage):
3119         (WebCore::InsertEditableImageCommand::doApply):
3120         * editing/InsertEditableImageCommand.h:
3121         Add InsertEditableImageCommand::insertEditableImage, which returns the
3122         inserted image element.
3123
3124         * html/HTMLImageElement.h:
3125         Make HTMLImageElement focusable if it is editable.
3126
3127 2018-11-29  Zalan Bujtas  <zalan@apple.com>
3128
3129         [LFC][BFC][Quirk] Body and html height stretching.
3130         https://bugs.webkit.org/show_bug.cgi?id=192154
3131
3132         Reviewed by Antti Koivisto.
3133
3134         This patch takes the document box's margin/border/padding into account when stretching html/body to the height of the initial containing block.
3135
3136         Tests: fast/block/block-only/body-height-with-auto-html-height-quirk.html
3137                fast/block/block-only/body-height-with-auto-html-height-quirk2.html
3138                fast/block/block-only/body-height-with-non-auto-html-height-quirk.html
3139                fast/block/block-only/body-height-with-non-auto-html-height-quirk2.html
3140
3141         * layout/blockformatting/BlockFormattingContext.h:
3142         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
3143         (WebCore::Layout::BlockFormattingContext::Geometry::estimatedMarginBottom):
3144         * layout/blockformatting/BlockFormattingContextQuirks.cpp:
3145         (WebCore::Layout::BlockFormattingContext::Quirks::stretchedHeight):
3146
3147 2018-11-29  Justin Fan  <justin_fan@apple.com>
3148
3149         [WebGPU] Replace forward declare of WebGPUCommandBuffer with include
3150         https://bugs.webkit.org/show_bug.cgi?id=192179
3151
3152         Unreviewed build fix.
3153
3154         No new tests. No behavior change.
3155
3156         * Modules/webgpu/WebGPUProgrammablePassEncoder.cpp:
3157         * Modules/webgpu/WebGPUProgrammablePassEncoder.h:
3158
3159 2018-11-29  Zalan Bujtas  <zalan@apple.com>
3160
3161         [ContentObservation] Make WKSetObservedContentChange logic more explicit.
3162         https://bugs.webkit.org/show_bug.cgi?id=192183
3163
3164         Reviewed by Simon Fraser.
3165
3166         * platform/ios/wak/WKContentObservation.cpp:
3167         (WKSetObservedContentChange):
3168         (WebThreadRemoveObservedDOMTimer):
3169
3170 2018-11-29  Youenn Fablet  <youenn@apple.com>
3171
3172         CSS subresource loads should not be observable from resource timing if the stylesheet is opaque
3173         https://bugs.webkit.org/show_bug.cgi?id=192132
3174
3175         Reviewed by Ryosuke Niwa.
3176
3177         Introduce a new ResourceLoaderOptions to determine whether a load is made from a resource that is opaque.
3178         Make use of that option to disable exposing such loads to the web page through resource timing.
3179         The same option might later be used to bypass service workers.
3180
3181         Make use of this option for CSS subresource loads.
3182         When the CSS stylesheet is opaque for the page, set this option.
3183
3184         Test: http/tests/security/clean-origin-exposed-resource-timing.html
3185               http/tests/security/cross-origin-resource-timing.html
3186
3187         * css/CSSCursorImageValue.cpp:
3188         (WebCore::CSSCursorImageValue::CSSCursorImageValue):
3189         (WebCore::CSSCursorImageValue::loadImage):
3190         * css/CSSCursorImageValue.h:
3191         * css/CSSFontFaceSrcValue.cpp:
3192         (WebCore::CSSFontFaceSrcValue::cachedFont):
3193         * css/CSSFontFaceSrcValue.h:
3194         * css/CSSImageSetValue.cpp:
3195         (WebCore::CSSImageSetValue::CSSImageSetValue):
3196         (WebCore::CSSImageSetValue::loadBestFitImage):
3197         * css/CSSImageSetValue.h:
3198         * css/CSSImageValue.cpp:
3199         (WebCore::CSSImageValue::CSSImageValue):
3200         (WebCore::CSSImageValue::loadImage):
3201         * css/CSSImageValue.h:
3202         * css/CSSStyleSheet.h:
3203         * css/StyleRuleImport.cpp:
3204         (WebCore::StyleRuleImport::setCSSStyleSheet):
3205         (WebCore::StyleRuleImport::requestStyleSheet):
3206         * css/StyleSheetContents.h:
3207         * css/parser/CSSParserContext.h:
3208         * css/parser/CSSPropertyParser.cpp:
3209         (WebCore::consumeCursor):
3210         (WebCore::consumeFontFaceSrcURI):
3211         * css/parser/CSSPropertyParserHelpers.cpp:
3212         (WebCore::CSSPropertyParserHelpers::consumeImageSet):
3213         (WebCore::CSSPropertyParserHelpers::consumeImage):
3214         * html/HTMLBodyElement.cpp:
3215         (WebCore::HTMLBodyElement::collectStyleForPresentationAttribute):
3216         * html/HTMLLinkElement.cpp:
3217         (WebCore::HTMLLinkElement::initializeStyleSheet):
3218         (WebCore::HTMLLinkElement::setCSSStyleSheet):
3219         * html/HTMLTableElement.cpp:
3220         (WebCore::HTMLTableElement::collectStyleForPresentationAttribute):
3221         * html/HTMLTablePartElement.cpp:
3222         (WebCore::HTMLTablePartElement::collectStyleForPresentationAttribute):
3223         * loader/ResourceLoaderOptions.h:
3224         * loader/ResourceTimingInformation.cpp:
3225         (WebCore::ResourceTimingInformation::shouldAddResourceTiming):
3226         * svg/SVGFontFaceUriElement.cpp:
3227         (WebCore::SVGFontFaceUriElement::srcValue const):
3228
3229 2018-11-29  Megan Gardner  <megan_gardner@apple.com>
3230
3231         Move Lookup Code for better cross platform usage
3232         https://bugs.webkit.org/show_bug.cgi?id=191732
3233
3234         Reviewed by Alex Christensen.
3235
3236         Not currenlty testable
3237
3238         DictionaryLookup uses Reveal now, which is slated to be cross-platform.
3239         That patch gates the parts of DictionaryLookup that currently do not have
3240         an available implementation on iOS. Once Reveal is ready, this code will be
3241         replaced or expanded upon, as appropriate.
3242
3243         * editing/mac/DictionaryLookup.h:
3244         * editing/mac/DictionaryLookup.mm:
3245         (WebCore::showPopupOrCreateAnimationController):
3246         (WebCore::DictionaryLookup::showPopup):
3247         (WebCore::DictionaryLookup::hidePopup):
3248         (WebCore::DictionaryLookup::animationControllerForPopup):
3249
3250 2018-11-29  Joseph Pecoraro  <pecoraro@apple.com>
3251
3252         [Cocoa] Move ServerTimingParser.* into a better group in the Xcode project
3253         https://bugs.webkit.org/show_bug.cgi?id=192180
3254
3255         Reviewed by Simon Fraser.
3256
3257         * WebCore.xcodeproj/project.pbxproj:
3258
3259 2018-11-29  Zalan Bujtas  <zalan@apple.com>
3260
3261         [ContentObservation] DOMTimer::install should explicitly check if timer observation is on
3262         https://bugs.webkit.org/show_bug.cgi?id=192181
3263
3264         Reviewed by Simon Fraser.
3265
3266         * page/DOMTimer.cpp:
3267         (WebCore::DOMTimer::install):
3268         * platform/ios/wak/WKContentObservation.cpp:
3269         (WKIsObservingDOMTimerScheduling):
3270         * platform/ios/wak/WKContentObservation.h:
3271
3272 2018-11-29  Ryosuke Niwa  <rniwa@webkit.org>
3273
3274         Executing "insertunorderedlist" while selecting a contenteditable element inside a shadow dom hangs the browser
3275         https://bugs.webkit.org/show_bug.cgi?id=184049
3276         <rdar://problem/38931033>
3277
3278         Reviewed by Antti Koivisto.
3279
3280         The primary hung was caused by TextIterator::advance traversing the next node in the tree order using
3281         NodeTraversal::next which doesn't take the composed tree into account. Fixed the bug by traversing
3282         the composed tree while sharing code with StylizedMarkupAccumulator.
3283
3284         This revealed a second hang in InsertListCommand::doApply() caused by endingSelection() being null,
3285         which was caused by CompositeEditCommand::moveParagraphs failing to restore the ending selection properly
3286         because it was computing the text indices difference from the beginning of the document until the destination.
3287
3288         Fixed this second bug by computing the indices against the beginning of the root editable element.
3289         Note that editability never crosses a shadow boundary.
3290
3291         Test: editing/execCommand/insert-unordered-list-in-shadow-tree.html
3292
3293         * dom/ComposedTreeIterator.h:
3294         (WebCore::nextSkippingChildrenInComposedTreeIgnoringUserAgentShadow): Extracted out of nextSkippingChildren
3295         in markup.cpp.
3296         (WebCore::nextInComposedTreeIgnoringUserAgentShadow): Added.
3297         * editing/CompositeEditCommand.cpp:
3298         (WebCore::CompositeEditCommand::moveParagraphs): Compute the index from the beginning of the root editable
3299         element as opposed to the beginning of the document.
3300         * editing/TextIterator.cpp:
3301         (WebCore::nextNode): Added.
3302         (WebCore::isDescendantOf): Added.
3303         (WebCore::TextIterator::advance): Use the newly added functions to traverse the composed tree when the options
3304         contains TextIteratorTraversesFlatTree.
3305         * editing/markup.cpp:
3306
3307 2018-11-29  Zalan Bujtas  <zalan@apple.com>
3308
3309         [ContentObservation] Decouple content change and DOM timer scheduling observation
3310         https://bugs.webkit.org/show_bug.cgi?id=192170
3311
3312         Reviewed by Simon Fraser.
3313
3314         This is in preparation for adding style recalc scheduling observation (the main goal here is to simplify the indeterminate change logic).
3315
3316         * page/DOMTimer.cpp:
3317         (WebCore::DOMTimer::fired):
3318         * page/ios/EventHandlerIOS.mm:
3319         (WebCore::EventHandler::mouseMoved):
3320         * platform/ios/wak/WKContentObservation.cpp:
3321         (WKStartObservingContentChanges):
3322         (WKStopObservingContentChanges):
3323         (WKStartObservingDOMTimerSchedules):
3324         (WKStopObservingDOMTimerSchedules):
3325         (WKSetObservedContentChange):
3326         (WebThreadAddObservedDOMTimer):
3327         (WKBeginObservingContentChanges): Deleted.
3328         * platform/ios/wak/WKContentObservation.h:
3329
3330 2018-11-29  Frederic Wang  <fwang@igalia.com>
3331
3332         Make reconcileViewportConstrainedLayerPositions start from a specified scrolling node
3333         https://bugs.webkit.org/show_bug.cgi?id=180002
3334
3335         Reviewed by Simon Fraser.
3336
3337         For non-programmatic scrolling of frames, AsyncScrollingCoordinator::reconcileScrollingState
3338         currently always call reconcileViewportConstrainedLayerPositions for the main frame
3339         since async subframe scrolling is not supported yet (bug 171667 and bug 149264). This
3340         function in turn calls reconcileLayerPositionForViewportRect on the whole scrolling tree to
3341         readjust position of fixed/sticky descendants. This patch refactors a bit the code so that
3342         the operation is actually only applied to the descendants of the frame's scrolling node,
3343         which would mean a small optimization when subframe are asynchronously scrollable. The code
3344         is already covered by reconcile-layer-position-recursive.html.
3345
3346         No new tests, behavior unchanged and already covered by existing tests.
3347
3348         * page/scrolling/AsyncScrollingCoordinator.cpp:
3349         (WebCore::AsyncScrollingCoordinator::reconcileScrollingState): Pass the frame's scrolling
3350         node id.
3351         (WebCore::AsyncScrollingCoordinator::reconcileViewportConstrainedLayerPositions): Start
3352         reconciliation from the specified scrolling node and log its ID.
3353         * page/scrolling/AsyncScrollingCoordinator.h: Add ScrollingNodeID parameter.
3354         * page/scrolling/ScrollingCoordinator.h:
3355         (WebCore::ScrollingCoordinator::reconcileViewportConstrainedLayerPositions): Ditto.
3356
3357 2018-11-29  Zalan Bujtas  <zalan@apple.com>
3358
3359         Rename *ObservedContentModifier(s) to *ObservedDOMTimer(s)
3360         https://bugs.webkit.org/show_bug.cgi?id=192168
3361
3362         Reviewed by Simon Fraser.
3363
3364         * dom/Document.cpp:
3365         (WebCore::Document::platformSuspendOrStopActiveDOMObjects):
3366         * page/DOMTimer.cpp:
3367         (WebCore::DOMTimer::install):
3368         (WebCore::DOMTimer::fired):
3369         * page/DOMWindow.cpp:
3370         (WebCore::DOMWindow::clearTimeout):
3371         * page/Frame.cpp:
3372         (WebCore::Frame::willDetachPage):
3373         * platform/ios/wak/WKContentObservation.cpp:
3374         (WKBeginObservingContentChanges):
3375         (WKSetObservedContentChange):
3376         (WebThreadGetObservedDOMTimers):
3377         (WebThreadCountOfObservedDOMTimers):
3378         (WebThreadClearObservedDOMTimers):
3379         (WebThreadContainsObservedDOMTimer):
3380         (WebThreadAddObservedDOMTimer):
3381         (WebThreadRemoveObservedDOMTimer):
3382         (WebThreadCountOfObservedContentModifiers): Deleted.
3383         (WebThreadClearObservedContentModifiers): Deleted.
3384         (WebThreadContainsObservedContentModifier): Deleted.
3385         (WebThreadAddObservedContentModifier): Deleted.
3386         (WebThreadRemoveObservedContentModifier): Deleted.
3387         * platform/ios/wak/WKContentObservation.h:
3388         * platform/ios/wak/WKContentObservationInternal.h:
3389
3390 2018-11-29  Justin Fan  <justin_fan@apple.com>
3391
3392         [WebGPU] WebGPURenderPassEncoder::setPipeline, draw, and endPass prototypes
3393         https://bugs.webkit.org/show_bug.cgi?id=192134
3394
3395         Reviewed by Dean Jackson.
3396
3397         Wrap up prototype features for WebGPURenderPassEncoder. 
3398
3399         Test: webgpu/render-command-encoding.html
3400
3401         * Modules/webgpu/WebGPUCommandBuffer.cpp: 
3402         (WebCore::WebGPUCommandBuffer::beginRenderPass):
3403         * Modules/webgpu/WebGPUDevice.cpp:
3404         (WebCore::WebGPUDevice::createRenderPipeline const):
3405         * Modules/webgpu/WebGPUProgrammablePassEncoder.cpp:
3406         (WebCore::WebGPUProgrammablePassEncoder::WebGPUProgrammablePassEncoder):
3407         (WebCore::WebGPUProgrammablePassEncoder::endPass): Returns a reference to the WebGPUCommandBuffer that created this encoder.
3408         (WebCore::WebGPUProgrammablePassEncoder::setPipeline):
3409         * Modules/webgpu/WebGPUProgrammablePassEncoder.h: Updated to support endPass and setPipeline.
3410         * Modules/webgpu/WebGPUProgrammablePassEncoder.idl:
3411         * Modules/webgpu/WebGPURenderPassEncoder.cpp:
3412         (WebCore::WebGPURenderPassEncoder::create): Must be provided with the WebGPUCommandBuffer.
3413         (WebCore::WebGPURenderPassEncoder::WebGPURenderPassEncoder):
3414         (WebCore::WebGPURenderPassEncoder::draw):
3415         * Modules/webgpu/WebGPURenderPassEncoder.h: Updated to cache a reference to the WebGPUCommandBuffer, and for draw.
3416         * Modules/webgpu/WebGPURenderPassEncoder.idl:
3417         * Modules/webgpu/WebGPURenderPipeline.cpp:
3418         (WebCore::WebGPURenderPipeline::create):
3419         (WebCore::WebGPURenderPipeline::WebGPURenderPipeline):
3420         * Modules/webgpu/WebGPURenderPipeline.h:
3421         (WebCore::WebGPURenderPipeline::renderPipeline):
3422         * Modules/webgpu/WebGPUTexture.cpp:
3423         * Modules/webgpu/WebGPUTexture.h: Replaced include with forward declaration.
3424         * platform/graphics/gpu/GPUProgrammablePassEncoder.h: Updated to support new WebGPU_PassEncoder functionality.
3425         * platform/graphics/gpu/GPURenderPassEncoder.h:
3426         (WebCore::GPURenderPassEncoder::~GPURenderPassEncoder): Now ends encoding on the MTLCommandEncoder, if not already ended, before freeing it.
3427         * platform/graphics/gpu/GPURenderPipeline.h: Now remembers the GPUPrimitiveTopology that it was created with.