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