REGRESSION(r220515) [GTK][CMake] Build with ENABLE_GEOLOCATION fails on Debian Jessie
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2017-08-10  Michael Catanzaro  <mcatanzaro@igalia.com>
2
3         REGRESSION(r220515) [GTK][CMake] Build with ENABLE_GEOLOCATION fails on Debian Jessie
4         https://bugs.webkit.org/show_bug.cgi?id=175426
5
6         Reviewed by Carlos Alberto Lopez Perez.
7
8         Also stop using GEOCLUE_LIBRARIES and GEOCLUE_INCLUDE_DIRS, since they are empty. Apparently
9         we have not actually been using the client library at all this whole time, only the D-Bus
10         interface.
11
12         * PlatformGTK.cmake:
13
14 2017-08-10  Brady Eidson  <beidson@apple.com>
15
16         Add ServiceWorkerJob.
17         https://bugs.webkit.org/show_bug.cgi?id=175241
18
19         Reviewed by Tim Horton.
20
21         Test: http/tests/workers/service/basic-register.html
22
23         This patch does a few things:
24         - Adds the spec concept of a ServiceWorkerJob (in the WebProcess, at least)
25         - Adds a ServiceWorkerProvider interface for WebKit to implement
26         - Actually creates a job for service worker registration and "schedules" it,
27           though it always immediately errors out the promise.
28
29         Actually queuing jobs and executing asynchronously is coming up soon.
30
31         * CMakeLists.txt:
32         * WebCore.xcodeproj/project.pbxproj:
33
34         * dom/Document.cpp:
35         (WebCore::Document::sessionID const):
36         * dom/Document.h:
37
38         * workers/ServiceWorkerContainer.cpp:
39         (WebCore::ServiceWorkerContainer::~ServiceWorkerContainer):
40         (WebCore::ServiceWorkerContainer::addRegistration):
41         (WebCore::ServiceWorkerContainer::scheduleJob):
42         (WebCore::ServiceWorkerContainer::jobDidFinish):
43         * workers/ServiceWorkerContainer.h:
44
45         * workers/ServiceWorkerJob.cpp: Added.
46         (WebCore::ServiceWorkerJob::ServiceWorkerJob):
47         (WebCore::ServiceWorkerJob::~ServiceWorkerJob):
48         (WebCore::ServiceWorkerJob::failedWithException):
49         * workers/ServiceWorkerJob.h: Copied from Source/WebCore/workers/ServiceWorkerContainer.h.
50         (WebCore::ServiceWorkerJob::createRegisterJob):
51         (WebCore::ServiceWorkerJob::identifier const):
52
53         * workers/ServiceWorkerJobClient.h: Added.
54         (WebCore::ServiceWorkerJobClient::~ServiceWorkerJobClient):
55
56         * workers/ServiceWorkerProvider.cpp: Added.
57         (WebCore::ServiceWorkerProvider::singleton):
58         (WebCore::ServiceWorkerProvider::setSharedProvider):
59         * workers/ServiceWorkerProvider.h: Added.
60         * workers/ServiceWorkerRegistrationOptions.h: Copied from Source/WebCore/workers/ServiceWorkerContainer.h.
61         * workers/ServiceWorkerRegistrationParameters.cpp: Added.
62         * workers/ServiceWorkerRegistrationParameters.h: Added.
63
64 2017-08-10  Tim Horton  <timothy_horton@apple.com>
65
66         Remove some unused lambda captures so that WebKit builds with -Wunused-lambda-capture
67         https://bugs.webkit.org/show_bug.cgi?id=175436
68         <rdar://problem/33667497>
69
70         Reviewed by Simon Fraser.
71
72         * platform/audio/cocoa/MediaSessionManagerCocoa.cpp:
73         (PlatformMediaSessionManager::updateSessionState):
74         * platform/graphics/cocoa/WebCoreDecompressionSession.mm:
75         (WebCore::WebCoreDecompressionSession::handleDecompressionOutput):
76
77 2017-08-10  Commit Queue  <commit-queue@webkit.org>
78
79         Unreviewed, rolling out r220463.
80         https://bugs.webkit.org/show_bug.cgi?id=175435
81
82         unaccepted fix (Requested by n_wang on #webkit).
83
84         Reverted changeset:
85
86         "AX: crash at
87         WebCore::AccessibilityObject::supportsARIALiveRegion() const +
88         24"
89         https://bugs.webkit.org/show_bug.cgi?id=175340
90         http://trac.webkit.org/changeset/220463
91
92 2017-08-10  Michael Catanzaro  <mcatanzaro@igalia.com>
93
94         Remove ENABLE_GAMEPAD_DEPRECATED
95         https://bugs.webkit.org/show_bug.cgi?id=175361
96
97         Reviewed by Carlos Garcia Campos.
98
99         * CMakeLists.txt:
100         * Configurations/FeatureDefines.xcconfig:
101         * PlatformGTK.cmake:
102         * PlatformWPE.cmake:
103         * platform/Linux.cmake: Removed.
104         * platform/gamepad/deprecated/Gamepads.h: Removed.
105         * platform/gamepad/glib/GamepadsGlib.cpp: Removed.
106         * platform/gamepad/linux/GamepadDeviceLinux.cpp: Removed.
107         * platform/gamepad/linux/GamepadDeviceLinux.h: Removed.
108
109 2017-08-10  Myles C. Maxfield  <mmaxfield@apple.com>
110
111         Addressing post-review comments after r219173.
112         https://bugs.webkit.org/show_bug.cgi?id=174149
113
114         Unreviewed.
115
116         * css/CSSFontStyleValue.h:
117         * editing/EditingStyle.cpp:
118         (WebCore::identifierForStyleProperty):
119
120 2017-08-10  Antti Koivisto  <antti@apple.com>
121
122         Try to fix windows build.
123
124         * style/StyleUpdate.h:
125         (WebCore::Style::TextUpdate::TextUpdate):
126
127 2017-08-10  Carlos Garcia Campos  <cgarcia@igalia.com>
128
129         [GTK] Crashes in WebCore::PasteboardHelper::fillSelectionData when source file of drag is unavailable
130         https://bugs.webkit.org/show_bug.cgi?id=174161
131
132         Reviewed by Xabier Rodriguez-Calvar.
133
134         In r219385 we changed the early return in fillSelectionData() to check the selection data length instead of the
135         data pointer. However, the gtk_selection_data_get_length() can return -1, so we need to check also if the value
136         less than 0. The case of setting an empty string could be valid depending on the target type, so it's better to
137         return early only when data lenght is less than 0 and handle the 0 length case in each target.
138
139         * platform/gtk/PasteboardHelper.cpp:
140         (WebCore::PasteboardHelper::fillSelectionData):
141
142 2017-08-10  Antti Koivisto  <antti@apple.com>
143
144         Text renderer updates should be done by RenderTreeUpdater
145         https://bugs.webkit.org/show_bug.cgi?id=175417
146
147         Reviewed by Andreas Kling.
148
149         All render tree mutations should be done by RenderTreeUpdater. Currently
150         Text::updateRendererAfterContentChange calls RenderText::setTextWithOffset directly.
151
152         * dom/Document.cpp:
153         (WebCore::Document::updateTextRenderer):
154
155             Add range argument.
156
157         * dom/Document.h:
158         * dom/Text.cpp:
159         (WebCore::Text::updateRendererAfterContentChange):
160
161             Remove call to setTextWithOffset and pass the range to updateTextRenderer
162
163         * style/RenderTreeUpdater.cpp:
164         (WebCore::RenderTreeUpdater::updateRenderTree):
165         (WebCore::RenderTreeUpdater::updateTextRenderer):
166
167             Call setTextWithOffset here.
168
169         * style/RenderTreeUpdater.h:
170         * style/StyleTreeResolver.cpp:
171         (WebCore::Style::TreeResolver::resolveComposedTree):
172         * style/StyleUpdate.cpp:
173         (WebCore::Style::Update::textUpdate const):
174         (WebCore::Style::Update::addText):
175
176             Add TextUpdate struct similar to ElementUpdate to pass the range to the RenderTreeUpdater.
177
178         * style/StyleUpdate.h:
179
180 2017-08-10  Zan Dobersek  <zdobersek@igalia.com>
181
182         Unreviewed GTK+ build fix for ENABLE_GLES2=ON.
183
184         * platform/graphics/texmap/TextureMapperGLHeaders.h:
185         Define various GL constants that are not provided in GLES2 headers
186         but are only leveraged in OpenGL calls if at runtime the underlying
187         OpenGL is GLES2-capable.
188
189 2017-08-10  Zan Dobersek  <zdobersek@igalia.com>
190
191         [TexMap] Remove GraphicsContext3D usage from BitmapTexturePool
192         https://bugs.webkit.org/show_bug.cgi?id=175319
193
194         Reviewed by Carlos Garcia Campos.
195
196         Drop the GraphicsContext3D reference in BitmapTexturePool now
197         that the BitmapTextureGL doesn't require it anymore.
198
199         No new tests -- no change in behavior.
200
201         * platform/graphics/texmap/BitmapTexturePool.cpp:
202         (WebCore::BitmapTexturePool::BitmapTexturePool):
203         * platform/graphics/texmap/BitmapTexturePool.h:
204         * platform/graphics/texmap/TextureMapperGL.cpp:
205         (WebCore::TextureMapperGL::TextureMapperGL):
206
207 2017-08-10  Zan Dobersek  <zdobersek@igalia.com>
208
209         [TexMap] Drop GraphicsContext3D usage from BitmapTextureGL
210         https://bugs.webkit.org/show_bug.cgi?id=175317
211
212         Reviewed by Carlos Garcia Campos.
213
214         Have BitmapTextureGL use direct OpenGL API entrypoints and constants
215         instead of leveraging the GraphicsContext3D class. Any GraphicsContext3D
216         object passed to BitmapTextureGL would assume rendering to the GL context
217         that's current on that thread, translating method invocations to the
218         OpenGL API. We can do this by ourselves and benefit by avoiding allocating
219         GraphicsContext3D resources like the ANGLE compiler that are by most useful
220         for WebGL.
221
222         BitmapTextureGL::create() call sites are adjusted to stop passing a
223         GraphicsContext3D reference. BitmapTextureGL::bindAsSurface() doesn't need
224         a replacement for the passed-in GraphicsContext3D object since that object
225         originated from the TextureMapperGL instance, whose GraphicsContext3D is by
226         default of the render-to-current-context nature. Other changes are direct
227         translations of GraphicsContext3D methods to OpenGL API calls, or of
228         GraphicsContext3D values to OpenGL API constants.
229
230         No new tests -- no change in behavior.
231
232         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
233         (WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):
234         * platform/graphics/texmap/BitmapTextureGL.cpp:
235         Also remove an unnecessary GraphicsContext.h header inclusion.
236         (WebCore::BitmapTextureGL::BitmapTextureGL):
237         (WebCore::BitmapTextureGL::didReset):
238         (WebCore::BitmapTextureGL::updateContentsNoSwizzle):
239         (WebCore::BitmapTextureGL::updateContents):
240         (WebCore::BitmapTextureGL::initializeStencil):
241         (WebCore::BitmapTextureGL::initializeDepthBuffer):
242         (WebCore::BitmapTextureGL::clearIfNeeded):
243         (WebCore::BitmapTextureGL::createFboIfNeeded):
244         (WebCore::BitmapTextureGL::bindAsSurface):
245         (WebCore::BitmapTextureGL::~BitmapTextureGL):
246         (WebCore::BitmapTextureGL::copyFromExternalTexture):
247         * platform/graphics/texmap/BitmapTextureGL.h:
248         (WebCore::BitmapTextureGL::create):
249         (WebCore::BitmapTextureGL::textureTarget const):
250         (WebCore::BitmapTextureGL::internalFormat const):
251         * platform/graphics/texmap/BitmapTexturePool.cpp:
252         (WebCore::BitmapTexturePool::createTexture):
253         * platform/graphics/texmap/TextureMapperGL.cpp:
254         (WebCore::TextureMapperGL::bindSurface):
255         (WebCore::TextureMapperGL::createTexture):
256
257 2017-08-09  Michael Catanzaro  <mcatanzaro@igalia.com>
258
259         [GTK] Remove support for geoclue1
260         https://bugs.webkit.org/show_bug.cgi?id=164205
261
262         Reviewed by Carlos Garcia Campos.
263
264         * PlatformGTK.cmake:
265         * platform/geoclue/GeolocationProviderGeoclue.h:
266         * platform/geoclue/GeolocationProviderGeoclue1.cpp: Removed.
267         * platform/geoclue/GeolocationProviderGeoclue2.cpp: Removed.
268
269 2017-08-09  Yoshiaki Jitsukawa  <Yoshiaki.Jitsukawa@sony.com>
270
271         [PAL] Move spi/cocoa and spi/cg directories into PAL
272         https://bugs.webkit.org/show_bug.cgi?id=175175
273
274         Reviewed by Myles C. Maxfield.
275
276         * Modules/applepay/cocoa/PaymentCocoa.mm:
277         * Modules/applepay/cocoa/PaymentContactCocoa.mm:
278         * Modules/applepay/cocoa/PaymentMerchantSessionCocoa.mm:
279         * Modules/applepay/cocoa/PaymentMethodCocoa.mm:
280         * PlatformAppleWin.cmake:
281         * WebCore.xcodeproj/project.pbxproj:
282         * editing/cocoa/EditorCocoa.mm:
283         * editing/cocoa/HTMLConverter.mm:
284         * editing/ios/EditorIOS.mm:
285         * page/cocoa/ResourceUsageThreadCocoa.mm:
286         * page/mac/TextIndicatorWindow.mm:
287         * platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:
288         * platform/cocoa/DataDetectorsCoreSoftLink.h:
289         * platform/cocoa/MIMETypeRegistryCocoa.mm:
290         * platform/cocoa/NetworkExtensionContentFilter.mm:
291         * platform/cocoa/ParentalControlsContentFilter.mm:
292         * platform/cocoa/SleepDisablerCocoa.cpp:
293         * platform/graphics/Font.cpp:
294         * platform/graphics/Font.h:
295         * platform/graphics/avfoundation/objc/AVAssetTrackUtilities.mm:
296         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
297         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
298         * platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm:
299         * platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm:
300         * platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:
301         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
302         * platform/graphics/cg/ColorCG.cpp:
303         * platform/graphics/cg/GraphicsContextCG.cpp:
304         * platform/graphics/cg/ImageBufferCG.cpp:
305         * platform/graphics/cg/ImageBufferDataCG.cpp:
306         * platform/graphics/cg/ImageDecoderCG.cpp:
307         * platform/graphics/cg/NativeImageCG.cpp:
308         * platform/graphics/cocoa/FontCacheCoreText.cpp:
309         * platform/graphics/cocoa/FontCascadeCocoa.mm:
310         * platform/graphics/cocoa/FontCocoa.mm:
311         * platform/graphics/cocoa/FontDescriptionCocoa.cpp:
312         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
313         * platform/graphics/cocoa/IOSurface.mm:
314         * platform/graphics/cocoa/TextTrackRepresentationCocoa.mm:
315         * platform/graphics/cocoa/WebActionDisablingCALayerDelegate.h:
316         * platform/graphics/ios/FontAntialiasingStateSaver.h:
317         * platform/graphics/ios/FontCacheIOS.mm:
318         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
319         * platform/graphics/mac/FontCacheMac.mm:
320         * platform/graphics/mac/GlyphPageMac.cpp:
321         * platform/graphics/win/FontCacheWin.cpp:
322         * platform/ios/LegacyTileCache.mm:
323         * platform/ios/LegacyTileGrid.mm:
324         * platform/ios/LegacyTileGridTile.mm:
325         * platform/ios/PlaybackSessionInterfaceAVKit.mm:
326         * platform/ios/QuickLook.mm:
327         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
328         * platform/ios/WebAVPlayerController.h:
329         * platform/ios/WebAVPlayerController.mm:
330         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
331         * platform/ios/wak/WKGraphics.mm:
332         * platform/mac/DragImageMac.mm:
333         * platform/mac/PlatformScreenMac.mm:
334         * platform/mac/PlaybackSessionInterfaceMac.mm:
335         * platform/mac/ThemeMac.mm:
336         * platform/mac/VideoFullscreenInterfaceMac.mm:
337         * platform/mac/WebPlaybackControlsManager.h:
338         * platform/mac/WebVideoFullscreenHUDWindowController.mm:
339         * platform/network/cocoa/CookieStorageObserver.mm:
340         * platform/network/cocoa/NetworkLoadMetrics.mm:
341         * platform/network/mac/AuthenticationMac.mm:
342         * platform/network/mac/ResourceHandleMac.mm:
343         * platform/spi/ios/DataDetectorsUISPI.h:
344         * platform/spi/mac/DataDetectorsSPI.h:
345         * platform/spi/mac/NSViewSPI.h:
346         * rendering/RenderThemeCocoa.mm:
347         * rendering/RenderThemeIOS.mm:
348         * rendering/RenderThemeMac.mm:
349
350 2017-08-09  Don Olmstead  <don.olmstead@sony.com>
351
352         [WTF] Move TextStream into WTF
353         https://bugs.webkit.org/show_bug.cgi?id=175211
354
355         Reviewed by Myles C. Maxfield.
356
357         No new tests. No change in behavior.
358
359         * CMakeLists.txt:
360         * WebCore.xcodeproj/project.pbxproj:
361         * dom/ComposedTreeIterator.cpp:
362         * dom/Position.cpp:
363         * dom/Position.h:
364         * dom/Range.cpp:
365         (WebCore::operator<<):
366         * dom/Range.h:
367         * dom/ViewportArguments.cpp:
368         * dom/ViewportArguments.h:
369         * editing/VisiblePosition.cpp:
370         * editing/VisiblePosition.h:
371         * editing/VisibleSelection.cpp:
372         * editing/VisibleSelection.h:
373         * html/HTMLVideoElement.cpp:
374         * html/canvas/CanvasRenderingContext2D.cpp:
375         * page/FrameView.cpp:
376         * page/ViewportConfiguration.cpp:
377         * page/ViewportConfiguration.h:
378         * page/WheelEventDeltaFilter.cpp:
379         * page/animation/CSSPropertyAnimation.cpp:
380         * page/scrolling/AsyncScrollingCoordinator.cpp:
381         * page/scrolling/ScrollingConstraints.cpp:
382         * page/scrolling/ScrollingConstraints.h:
383         * page/scrolling/ScrollingCoordinator.cpp:
384         * page/scrolling/ScrollingCoordinator.h:
385         * page/scrolling/ScrollingStateFixedNode.cpp:
386         * page/scrolling/ScrollingStateFixedNode.h:
387         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
388         * page/scrolling/ScrollingStateFrameScrollingNode.h:
389         * page/scrolling/ScrollingStateNode.cpp:
390         * page/scrolling/ScrollingStateNode.h:
391         * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
392         * page/scrolling/ScrollingStateOverflowScrollingNode.h:
393         * page/scrolling/ScrollingStateScrollingNode.cpp:
394         * page/scrolling/ScrollingStateScrollingNode.h:
395         * page/scrolling/ScrollingStateStickyNode.cpp:
396         * page/scrolling/ScrollingStateStickyNode.h:
397         * page/scrolling/ScrollingTree.cpp:
398         * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
399         * page/scrolling/ScrollingTreeFrameScrollingNode.h:
400         * page/scrolling/ScrollingTreeNode.cpp:
401         * page/scrolling/ScrollingTreeNode.h:
402         * page/scrolling/ScrollingTreeScrollingNode.cpp:
403         * page/scrolling/ScrollingTreeScrollingNode.h:
404         * page/scrolling/mac/ScrollingTreeFixedNode.h:
405         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
406         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
407         * page/scrolling/mac/ScrollingTreeStickyNode.h:
408         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
409         * platform/CalculationValue.cpp:
410         * platform/CalculationValue.h:
411         * platform/LayoutUnit.cpp:
412         * platform/LayoutUnit.h:
413         * platform/Length.cpp:
414         * platform/Length.h:
415         * platform/LengthBox.cpp:
416         * platform/LengthBox.h:
417         * platform/LengthPoint.cpp:
418         * platform/LengthPoint.h:
419         * platform/LengthSize.cpp:
420         * platform/LengthSize.h:
421         * platform/LogMacros.h:
422         * platform/ScrollView.cpp:
423         * platform/ScrollableArea.cpp:
424         * platform/animation/TimingFunction.cpp:
425         * platform/animation/TimingFunction.h:
426         * platform/graphics/BitmapImage.cpp:
427         * platform/graphics/BitmapImage.h:
428         * platform/graphics/Color.cpp:
429         * platform/graphics/Color.h:
430         * platform/graphics/CrossfadeGeneratedImage.cpp:
431         * platform/graphics/CrossfadeGeneratedImage.h:
432         * platform/graphics/FloatPoint.cpp:
433         * platform/graphics/FloatPoint.h:
434         * platform/graphics/FloatPoint3D.cpp:
435         * platform/graphics/FloatPoint3D.h:
436         * platform/graphics/FloatRect.cpp:
437         * platform/graphics/FloatRect.h:
438         * platform/graphics/FloatRoundedRect.cpp:
439         * platform/graphics/FloatRoundedRect.h:
440         * platform/graphics/FloatSize.cpp:
441         * platform/graphics/FloatSize.h:
442         * platform/graphics/FontTaggedSettings.cpp:
443         * platform/graphics/FontTaggedSettings.h:
444         * platform/graphics/GradientImage.cpp:
445         (WebCore::GradientImage::dump const):
446         * platform/graphics/GradientImage.h:
447         * platform/graphics/GraphicsContext.cpp:
448         * platform/graphics/GraphicsContext.h:
449         * platform/graphics/GraphicsLayer.cpp:
450         * platform/graphics/GraphicsLayer.h:
451         (WebCore::GraphicsLayer::dumpAdditionalProperties const):
452         * platform/graphics/GraphicsTypes.cpp:
453         * platform/graphics/GraphicsTypes.h:
454         * platform/graphics/Image.cpp:
455         * platform/graphics/Image.h:
456         * platform/graphics/ImageSource.h:
457         * platform/graphics/IntPoint.cpp:
458         * platform/graphics/IntPoint.h:
459         * platform/graphics/IntRect.cpp:
460         * platform/graphics/IntRect.h:
461         * platform/graphics/IntSize.cpp:
462         * platform/graphics/IntSize.h:
463         * platform/graphics/LayoutPoint.cpp:
464         * platform/graphics/LayoutPoint.h:
465         * platform/graphics/LayoutRect.cpp:
466         * platform/graphics/LayoutRect.h:
467         * platform/graphics/LayoutSize.cpp:
468         * platform/graphics/LayoutSize.h:
469         * platform/graphics/NamedImageGeneratedImage.cpp:
470         * platform/graphics/NamedImageGeneratedImage.h:
471         * platform/graphics/Path.cpp:
472         * platform/graphics/Path.h:
473         * platform/graphics/ca/GraphicsLayerCA.cpp:
474         * platform/graphics/ca/GraphicsLayerCA.h:
475         * platform/graphics/ca/PlatformCAAnimation.cpp:
476         * platform/graphics/ca/PlatformCAAnimation.h:
477         * platform/graphics/ca/PlatformCALayer.cpp:
478         * platform/graphics/ca/PlatformCALayer.h:
479         * platform/graphics/ca/TileController.cpp:
480         * platform/graphics/ca/TileGrid.cpp:
481         * platform/graphics/cg/GraphicsContextCG.cpp:
482         * platform/graphics/cg/PDFDocumentImage.cpp:
483         * platform/graphics/cg/PDFDocumentImage.h:
484         * platform/graphics/cocoa/IOSurface.h:
485         * platform/graphics/cocoa/IOSurface.mm:
486         * platform/graphics/displaylists/DisplayList.cpp:
487         (WebCore::DisplayList::DisplayList::description const):
488         * platform/graphics/displaylists/DisplayList.h:
489         * platform/graphics/displaylists/DisplayListItems.cpp:
490         * platform/graphics/displaylists/DisplayListItems.h:
491         * platform/graphics/displaylists/DisplayListRecorder.cpp:
492         * platform/graphics/displaylists/DisplayListReplayer.cpp:
493         * platform/graphics/filters/DistantLightSource.cpp:
494         * platform/graphics/filters/DistantLightSource.h:
495         * platform/graphics/filters/FEBlend.cpp:
496         * platform/graphics/filters/FEBlend.h:
497         * platform/graphics/filters/FEColorMatrix.cpp:
498         * platform/graphics/filters/FEColorMatrix.h:
499         * platform/graphics/filters/FEComponentTransfer.cpp:
500         * platform/graphics/filters/FEComponentTransfer.h:
501         * platform/graphics/filters/FEComposite.cpp:
502         * platform/graphics/filters/FEComposite.h:
503         * platform/graphics/filters/FEConvolveMatrix.cpp:
504         * platform/graphics/filters/FEConvolveMatrix.h:
505         * platform/graphics/filters/FEDiffuseLighting.cpp:
506         * platform/graphics/filters/FEDiffuseLighting.h:
507         * platform/graphics/filters/FEDisplacementMap.cpp:
508         * platform/graphics/filters/FEDisplacementMap.h:
509         * platform/graphics/filters/FEDropShadow.cpp:
510         * platform/graphics/filters/FEDropShadow.h:
511         * platform/graphics/filters/FEFlood.cpp:
512         * platform/graphics/filters/FEFlood.h:
513         * platform/graphics/filters/FEGaussianBlur.cpp:
514         * platform/graphics/filters/FEGaussianBlur.h:
515         * platform/graphics/filters/FEMerge.cpp:
516         * platform/graphics/filters/FEMerge.h:
517         * platform/graphics/filters/FEMorphology.cpp:
518         * platform/graphics/filters/FEMorphology.h:
519         * platform/graphics/filters/FEOffset.cpp:
520         * platform/graphics/filters/FEOffset.h:
521         * platform/graphics/filters/FESpecularLighting.cpp:
522         * platform/graphics/filters/FESpecularLighting.h:
523         * platform/graphics/filters/FETile.cpp:
524         * platform/graphics/filters/FETile.h:
525         * platform/graphics/filters/FETurbulence.cpp:
526         * platform/graphics/filters/FETurbulence.h:
527         * platform/graphics/filters/FilterEffect.cpp:
528         * platform/graphics/filters/FilterEffect.h:
529         * platform/graphics/filters/FilterOperation.cpp:
530         * platform/graphics/filters/FilterOperation.h:
531         * platform/graphics/filters/FilterOperations.cpp:
532         * platform/graphics/filters/FilterOperations.h:
533         * platform/graphics/filters/LightSource.h:
534         * platform/graphics/filters/PointLightSource.cpp:
535         * platform/graphics/filters/PointLightSource.h:
536         * platform/graphics/filters/SourceAlpha.cpp:
537         * platform/graphics/filters/SourceAlpha.h:
538         * platform/graphics/filters/SourceGraphic.cpp:
539         * platform/graphics/filters/SourceGraphic.h:
540         * platform/graphics/filters/SpotLightSource.cpp:
541         * platform/graphics/filters/SpotLightSource.h:
542         * platform/graphics/transforms/AffineTransform.cpp:
543         * platform/graphics/transforms/AffineTransform.h:
544         * platform/graphics/transforms/IdentityTransformOperation.h:
545         * platform/graphics/transforms/Matrix3DTransformOperation.cpp:
546         * platform/graphics/transforms/Matrix3DTransformOperation.h:
547         * platform/graphics/transforms/MatrixTransformOperation.cpp:
548         * platform/graphics/transforms/MatrixTransformOperation.h:
549         * platform/graphics/transforms/PerspectiveTransformOperation.cpp:
550         * platform/graphics/transforms/PerspectiveTransformOperation.h:
551         * platform/graphics/transforms/RotateTransformOperation.cpp:
552         * platform/graphics/transforms/RotateTransformOperation.h:
553         * platform/graphics/transforms/ScaleTransformOperation.cpp:
554         * platform/graphics/transforms/ScaleTransformOperation.h:
555         * platform/graphics/transforms/SkewTransformOperation.cpp:
556         * platform/graphics/transforms/SkewTransformOperation.h:
557         * platform/graphics/transforms/TransformOperation.cpp:
558         * platform/graphics/transforms/TransformOperation.h:
559         * platform/graphics/transforms/TransformOperations.cpp:
560         * platform/graphics/transforms/TransformOperations.h:
561         * platform/graphics/transforms/TransformationMatrix.cpp:
562         * platform/graphics/transforms/TransformationMatrix.h:
563         * platform/graphics/transforms/TranslateTransformOperation.cpp:
564         * platform/graphics/transforms/TranslateTransformOperation.h:
565         * platform/ios/SelectionRect.cpp:
566         (WebCore::operator<<):
567         * platform/ios/SelectionRect.h:
568         * platform/mac/ScrollAnimatorMac.mm:
569         * platform/text/TextAllInOne.cpp:
570         * rendering/InlineBox.cpp:
571         * rendering/InlineBox.h:
572         * rendering/InlineFlowBox.cpp:
573         (WebCore::InlineFlowBox::outputLineTreeAndMark const):
574         * rendering/InlineFlowBox.h:
575         * rendering/InlineTextBox.cpp:
576         * rendering/InlineTextBox.h:
577         * rendering/RenderBlockFlow.cpp:
578         (WebCore::RenderBlockFlow::outputLineTreeAndMark const):
579         * rendering/RenderBlockFlow.h:
580         * rendering/RenderLayer.cpp:
581         * rendering/RenderLayerCompositor.cpp:
582         * rendering/RenderObject.cpp:
583         * rendering/RenderObject.h:
584         * rendering/RenderTreeAsText.cpp:
585         * rendering/RenderTreeAsText.h:
586         * rendering/ScrollAlignment.cpp:
587         * rendering/ScrollAlignment.h:
588         * rendering/SimpleLineLayoutCoverage.cpp:
589         * rendering/SimpleLineLayoutFunctions.cpp:
590         * rendering/SimpleLineLayoutFunctions.h:
591         * rendering/style/FillLayer.cpp:
592         * rendering/style/FillLayer.h:
593         * rendering/style/NinePieceImage.cpp:
594         * rendering/style/NinePieceImage.h:
595         * rendering/style/RenderStyleConstants.cpp:
596         * rendering/style/RenderStyleConstants.h:
597         * rendering/svg/SVGRenderTreeAsText.cpp:
598         (WebCore::operator<<):
599         * rendering/svg/SVGRenderTreeAsText.h:
600         (WebCore::operator<<):
601         * svg/SVGLengthValue.cpp:
602         * svg/SVGLengthValue.h:
603         * svg/graphics/SVGImage.cpp:
604         * svg/graphics/SVGImage.h:
605         * svg/graphics/filters/SVGFEImage.cpp:
606         * svg/graphics/filters/SVGFEImage.h:
607
608 2017-08-09  Commit Queue  <commit-queue@webkit.org>
609
610         Unreviewed, rolling out r220466, r220477, and r220487.
611         https://bugs.webkit.org/show_bug.cgi?id=175411
612
613         This change broke existing API tests and follow up fixes did
614         not resolve all the issues. (Requested by ryanhaddad on
615         #webkit).
616
617         Reverted changesets:
618
619         https://bugs.webkit.org/show_bug.cgi?id=175244
620         http://trac.webkit.org/changeset/220466
621
622         "WTF::Function does not allow for reference / non-default
623         constructible return types"
624         https://bugs.webkit.org/show_bug.cgi?id=175244
625         http://trac.webkit.org/changeset/220477
626
627         https://bugs.webkit.org/show_bug.cgi?id=175244
628         http://trac.webkit.org/changeset/220487
629
630 2017-08-09  Chris Dumez  <cdumez@apple.com>
631
632         [Beacon][NetworkSession] Support CORS-preflighting on redirects
633         https://bugs.webkit.org/show_bug.cgi?id=175386
634         <rdar://problem/33801370>
635
636         Reviewed by Youenn Fablet.
637
638         Export a couple of WebCore symbols so I can use them in WebKit2.
639
640         Tests: http/wpt/beacon/cors/cors-preflight-redirect-failure.html
641                http/wpt/beacon/cors/cors-preflight-redirect-from-crossorigin-to-sameorigin.html
642                http/wpt/beacon/cors/cors-preflight-redirect-success.html
643
644         * loader/CrossOriginAccessControl.h:
645         * page/SecurityOrigin.h:
646
647 2017-08-09  Jeremy Jones  <jeremyj@apple.com>
648
649         Use MPAVRoutingController instead of deprecated versions.
650         https://bugs.webkit.org/show_bug.cgi?id=175063
651
652         Reviewed by Tim Horton.
653
654         No new tests because no behavior change. This uses a different platform class to present
655         an interface.
656
657         Remove deprecated MPAudioVideoRoutingPopoverController and MPAVRoutingSheet
658         Add MPMediaControlsViewController.
659
660         * platform/spi/ios/MediaPlayerSPI.h:
661
662 2017-08-09  Myles C. Maxfield  <mmaxfield@apple.com>
663
664         Mark font-display as in development
665         https://bugs.webkit.org/show_bug.cgi?id=175387
666
667         Unreviewed.
668
669         * features.json:
670
671 2017-08-09  Commit Queue  <commit-queue@webkit.org>
672
673         Unreviewed, rolling out r219334.
674         https://bugs.webkit.org/show_bug.cgi?id=175398
675
676         Caused bug 175023 (Requested by ap on #webkit).
677
678         Reverted changeset:
679
680         "[SVG] Leak in SVGAnimatedListPropertyTearOff"
681         https://bugs.webkit.org/show_bug.cgi?id=172545
682         http://trac.webkit.org/changeset/219334
683
684 2017-08-09  Dave Hyatt  <hyatt@apple.com>
685
686         [Repaint from Layout Removal] Move layer repaint rects into a map
687         https://bugs.webkit.org/show_bug.cgi?id=175393
688
689         Reviewed by Zalan Bujtas.
690
691         Move the two repaint rects held by RenderLayer into a RenderLayerModelObject -> RepaintLayoutRects hash map.
692         RepaintLayoutRects is a new struct that holds both rects.
693
694         Eventually more objects than just self painting layers will be caching repaint rects, so this takes a first
695         step towards having a common cache for these repaint rects. In addition this change saves memory, since
696         layers that aren't self-painting no longer have empty repaint rects taking up space in RenderLayer.
697
698         * rendering/RenderBlockLineLayout.cpp:
699         (WebCore::RenderBlockFlow::layoutRunsAndFloats):
700         * rendering/RenderLayer.cpp:
701         (WebCore::RenderLayer::RenderLayer):
702         (WebCore::RenderLayer::updateLayerPositions):
703         (WebCore::RenderLayer::repaintRectIncludingNonCompositingDescendants):
704         (WebCore::RenderLayer::computeRepaintRects):
705         (WebCore::RenderLayer::clearRepaintRects):
706         (WebCore::RenderLayer::updateLayerPositionsAfterScroll):
707         (WebCore::RenderLayer::scrollTo):
708         * rendering/RenderLayer.h:
709         * rendering/RenderLayerModelObject.cpp:
710         (WebCore::RepaintLayoutRects::RepaintLayoutRects):
711         (WebCore::RenderLayerModelObject::willBeDestroyed):
712         (WebCore::RenderLayerModelObject::destroyLayer):
713         (WebCore::RenderLayerModelObject::styleDidChange):
714         (WebCore::RenderLayerModelObject::hasRepaintLayoutRects):
715         (WebCore::RenderLayerModelObject::setRepaintLayoutRects):
716         (WebCore::RenderLayerModelObject::clearRepaintLayoutRects):
717         (WebCore::RenderLayerModelObject::repaintLayoutRects):
718         (WebCore::RenderLayerModelObject::computeRepaintLayoutRects):
719         * rendering/RenderLayerModelObject.h:
720         (WebCore::RepaintLayoutRects::RepaintLayoutRects):
721
722 2017-08-09  Sam Weinig  <sam@webkit.org>
723
724         WTF::Function does not allow for reference / non-default constructible return types
725         https://bugs.webkit.org/show_bug.cgi?id=175244
726
727         Reviewed by Chris Dumez.
728
729         * bindings/js/JSCustomElementInterface.h:
730         (WebCore::JSCustomElementInterface::invokeCallback):
731         Update the default value for the addArguments parameter to be an empty lambda, rather than
732         default initialization, which leads to a null WTF::Function. This allows us to remove support
733         for calling null WTF::Function. No change in behavior.
734
735 2017-08-09  Brady Eidson  <beidson@apple.com>
736
737         Teach ScriptExecutionContexts about their SessionID.
738         https://bugs.webkit.org/show_bug.cgi?id=175391
739
740         Reviewed by Andy Estes.
741
742         No new tests (No current change in behavior).
743
744         Turns out that Workers need to know their SessionID for future feature development.
745         So let's teach it to them.
746
747         * dom/ScriptExecutionContext.h: Expose a pure virtual SessionID accessor.
748
749         * dom/Document.cpp:
750         (WebCore::Document::sessionID const):
751         * dom/Document.h:
752
753         * page/SessionID.cpp:
754         (WebCore::SessionID::isolatedCopy const):
755         * page/SessionID.h:
756
757         * workers/DedicatedWorkerGlobalScope.cpp:
758         (WebCore::DedicatedWorkerGlobalScope::create):
759         (WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope):
760         * workers/DedicatedWorkerGlobalScope.h:
761
762         * workers/DedicatedWorkerThread.cpp:
763         (WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
764         (WebCore::DedicatedWorkerThread::createWorkerGlobalScope):
765         * workers/DedicatedWorkerThread.h:
766
767         * workers/Worker.cpp:
768         (WebCore::Worker::notifyFinished):
769
770         * workers/WorkerGlobalScope.cpp:
771         (WebCore::WorkerGlobalScope::WorkerGlobalScope):
772         * workers/WorkerGlobalScope.h:
773
774         * workers/WorkerGlobalScopeProxy.h:
775
776         * workers/WorkerMessagingProxy.cpp:
777         (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
778         * workers/WorkerMessagingProxy.h:
779
780         * workers/WorkerThread.cpp:
781         (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
782         (WebCore::WorkerThread::WorkerThread):
783         (WebCore::WorkerThread::workerThread):
784         * workers/WorkerThread.h:
785
786 2017-08-09  Wenson Hsieh  <wenson_hsieh@apple.com>
787
788         [iOS DnD] ENABLE_DRAG_SUPPORT should be turned off for iOS 10 and enabled by default
789         https://bugs.webkit.org/show_bug.cgi?id=175392
790         <rdar://problem/33783207>
791
792         Reviewed by Tim Horton and Megan Gardner.
793
794         Tweak FeatureDefines to enable drag and drop by default, and disable only on unsupported platforms (i.e. iOS 10).
795         No change in behavior.
796
797         * Configurations/FeatureDefines.xcconfig:
798
799 2017-08-09  Kirill Ovchinnikov  <kirill.ovchinnikov@lge.com>
800
801         Old subtitle track is not deleted on 'src' attribute change event
802         https://bugs.webkit.org/show_bug.cgi?id=175031
803
804         Reviewed by Eric Carlson.
805
806         Test: media/track/text-track-src-change.html
807
808         * html/HTMLMediaElement.cpp:
809         (WebCore::HTMLMediaElement::textTrackReadyStateChanged):
810         * html/HTMLTrackElement.cpp:
811         (WebCore::HTMLTrackElement::loadTimerFired):
812         * html/shadow/MediaControls.cpp:
813         (WebCore::MediaControls::clearTextDisplayContainer):
814         * html/shadow/MediaControls.h:
815
816 2017-08-09  Ryan Haddad  <ryanhaddad@apple.com>
817
818         Unreviewed, rolling out r220457.
819
820         This change introduced API test failures.
821
822         Reverted changeset:
823
824         "WTF::Function does not allow for reference / non-default
825         constructible return types"
826         https://bugs.webkit.org/show_bug.cgi?id=175244
827         http://trac.webkit.org/changeset/220457
828
829 2017-08-09  Don Olmstead  <don.olmstead@sony.com>
830
831         [WinCairo] Fix build after rev 220399
832         https://bugs.webkit.org/show_bug.cgi?id=175360
833
834         Reviewed by Žan Doberšek.
835
836         No new tests. No change in behavior.
837
838         * platform/graphics/texmap/TextureMapperGLHeaders.h:
839
840 2017-08-09  Nan Wang  <n_wang@apple.com>
841
842         AX: crash at WebCore::AccessibilityObject::supportsARIALiveRegion() const + 24
843         https://bugs.webkit.org/show_bug.cgi?id=175340
844         <rdar://problem/33782159>
845
846         Reviewed by Chris Fleizach.
847
848         When adding a psuedo element child to a RenderBlockFlow element, there might be a chance where
849         the element has already been layed out but we are still holding onto its stale children. Fixed it
850         by notifying AX correctly when inserting/removing children during layout.
851
852         Test: accessibility/add-children-pseudo-element.html
853
854         * rendering/RenderBlockFlow.cpp:
855         (WebCore::RenderBlockFlow::insertFloatingObject):
856         (WebCore::RenderBlockFlow::removeFloatingObject):
857
858 2017-08-09  Charlie Turner  <cturner@igalia.com>
859
860         [GStreamer][MSE] Add missing lock around getStreamByTrackId
861         https://bugs.webkit.org/show_bug.cgi?id=175323
862
863         Reviewed by Xabier Rodriguez-Calvar.
864
865         Covered by existing tests.
866
867         * platform/graphics/gstreamer/mse/PlaybackPipeline.cpp:
868         (WebCore::PlaybackPipeline::enqueueSample): Ensure the media source
869         lock is taken before modifiying the track queues indirectly via the
870         iterator use in getTrackId.
871
872 2017-08-09  Daniel Bates  <dabates@apple.com>
873
874         REGRESSION (r219013): OAuth flows are broken when redirecting back to application after authentication
875         https://bugs.webkit.org/show_bug.cgi?id=175247
876         <rdar://problem/33679804>
877
878         Reviewed by Brady Eidson.
879
880         Add SPI so that Safari can differentiate between a form submission and a redirected form submission
881         and have PolicyCheck notify the frame loader client if the navigation was in response to receiving a
882         redirect response. This is the WebKit portion to fix an issue when a native app makes use of an OAuth
883         OAuth flow that bounces to Safari for user login and then bounce back to the app. Microsoft Graph's
884         OAuth flow is one example.
885
886         Safari was differentiating between a form submission and a redirected form submission based on the
887         nullity of WKNavigationAction.sourceFrame because in both cases the navigation type was WKNavigationTypeFormSubmitted.
888         The navigation type is the same for both navigations because WebKit always used the navigation
889         action from the original request for the redirect request when the original request redirected.
890         Prior to r219013, WKNavigationAction.sourceFrame would be nil for a form submission that redirects.
891         Following r219013, WKNavigationAction.sourceFrame is non-nil unless the navigation was initiated by
892         API. In particular, WKNavigationAction.sourceFrame is non-nil for the redirect navigation corresponding
893         to a form submission that redirects.
894
895         * loader/EmptyClients.cpp:
896         (WebCore::EmptyFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
897         * loader/FrameLoaderClient.h:
898         Have dispatchDecidePolicyForNavigationAction() take a boolean as to whether the navigation was in
899         response to receiving a redirect response.
900         * loader/PolicyChecker.cpp:
901         (WebCore::PolicyChecker::checkNavigationPolicy): Notify the frame loader client whether the navigation
902         is in response to receiving a redirect response.
903
904 2017-08-09  Sam Weinig  <sam@webkit.org>
905
906         WTF::Function does not allow for reference / non-default constructible return types
907         https://bugs.webkit.org/show_bug.cgi?id=175244
908
909         Reviewed by Chris Dumez.
910
911         * bindings/js/JSCustomElementInterface.h:
912         (WebCore::JSCustomElementInterface::invokeCallback):
913         Update the default value for the addArguments parameter to be an empty lambda, rather than
914         default initialization, which leads to a null WTF::Function. This allows us to remove support
915         for calling null WTF::Function. No change in behavior.
916
917 2017-08-09  Andy Estes  <aestes@apple.com>
918
919         [QuickLook] Use case-insensitive comparison of preview MIME types
920         https://bugs.webkit.org/show_bug.cgi?id=175350
921         <rdar://problem/33761159>
922
923         Reviewed by Brady Eidson.
924
925         MIME types are case-insensitive, but PreviewLoader was using a case-sensitive comparison to
926         determine if a MIME type was supported by QLPreviewConverter. As a result we would fail to
927         preview Excel macro-enabled workbooks, since CFNetwork would sniff a MIME type of
928         "application/vnd.ms-excel.sheet.macroEnabled.12" but QuickLook contained
929         "application/vnd.ms-excel.sheet.macroenabled.12" in its set of supported MIME type strings.
930
931         Fix this by copying the QuickLook supported MIME type set into a HashSet using
932         ASCIICaseInsensitiveHash and using that HashSet for MIME type checks.
933
934         Test: quicklook/excel-macro-enabled.html
935
936         * loader/ios/PreviewLoader.mm:
937         (WebCore::PreviewLoader::shouldCreateForMIMEType):
938
939 2017-08-09  Ms2ger  <Ms2ger@igalia.com>
940
941         Remove unnecessary copies of PlatformMediaSessionManager::m_sessions
942         https://bugs.webkit.org/show_bug.cgi?id=175375
943
944         Reviewed by Sam Weinig.
945
946         Remove unnecessary copies of PlatformMediaSessionManager::m_sessions.
947
948         These should have been removed in r207688.
949
950         No new tests: no behavior change.
951
952         * platform/audio/PlatformMediaSessionManager.cpp:
953         (WebCore::PlatformMediaSessionManager::applicationWillBecomeInactive const):
954         (WebCore::PlatformMediaSessionManager::applicationDidBecomeActive const):
955         (WebCore::PlatformMediaSessionManager::applicationDidEnterBackground const):
956         (WebCore::PlatformMediaSessionManager::applicationWillEnterForeground const):
957
958 2017-08-09  Chris Dumez  <cdumez@apple.com>
959
960         Reinstate active flag for iterators
961         https://bugs.webkit.org/show_bug.cgi?id=175312
962
963         Reviewed by Sam Weinig.
964
965         NodeIterator / TreeWalker should no longer allow recursive filters
966         after the following change to the DOM specification:
967         - https://github.com/whatwg/dom/pull/359
968
969         This patch aligns our behavior with the latest specification.
970
971         No new tests, updated existing tests.
972
973         * dom/NodeIterator.cpp:
974         (WebCore::NodeIterator::nextNode):
975         (WebCore::NodeIterator::previousNode):
976         Note that we now also call m_candidateNode.clear() before returning an
977         exception. This was a pre-existing bug that we failed to do so in the
978         exception case but it became more obvious after this change now that
979         we throw. This was causing traversal/moz-bug559526.html to fail
980         otherwise (the filter was called one too many times). The test case
981         is passing in Firefox (The filter is called 4 times and they throw
982         each time).
983
984         * dom/Traversal.cpp:
985         (WebCore::NodeIteratorBase::NodeIteratorBase):
986         (WebCore::NodeIteratorBase::acceptNode):
987         * dom/Traversal.h:
988         * dom/TreeWalker.cpp:
989
990 2017-08-09  Antti Koivisto  <antti@apple.com>
991
992         RenderQuote should not mutate render tree
993         https://bugs.webkit.org/show_bug.cgi?id=175328
994
995         Reviewed by Zalan Bujtas.
996
997         RenderQuote text renderers are currently created and deleted in a quirky fashion using a linked list.
998         This patch moves to a simpler model that guarantees the mutations are always done in controlled fashion
999         during render tree update.
1000
1001         * dom/Document.cpp:
1002         (WebCore::Document::updateTextRenderer):
1003
1004             Move text renderer updating to Document so we can set the inRenderTreeUpdate bit for it too.
1005
1006         * dom/Document.h:
1007         * dom/Text.cpp:
1008         (WebCore::Text::updateRendererAfterContentChange):
1009         * rendering/RenderDescendantIterator.h:
1010         (WebCore::RenderDescendantIteratorAdapter<T>::at):
1011         (WebCore::RenderDescendantConstIteratorAdapter<T>::at const):
1012
1013             Add at() function for starting iteration from a specified renderer.
1014
1015         * rendering/RenderQuote.cpp:
1016         (WebCore::RenderQuote::insertedIntoTree):
1017         (WebCore::RenderQuote::willBeRemovedFromTree):
1018
1019             Register and unregister quotes to RenderView.
1020             Don't do any mutations.
1021
1022         (WebCore::RenderQuote::styleDidChange):
1023
1024             Invalidate the text renderer but don't mutate it.
1025
1026         (WebCore::RenderQuote::updateTextRenderer):
1027         (WebCore::RenderQuote::computeText const):
1028         (WebCore::RenderQuote::updateRenderers):
1029
1030             Compute depth of all render quotes and update the text renderer as needed.
1031
1032         (WebCore::RenderQuote::willBeDestroyed): Deleted.
1033         (WebCore::RenderQuote::attachQuote): Deleted.
1034         (WebCore::RenderQuote::detachQuote): Deleted.
1035         (WebCore::RenderQuote::updateDepth): Deleted.
1036
1037             Get rid of the linked list.
1038
1039         * rendering/RenderQuote.h:
1040         * rendering/RenderView.cpp:
1041         (WebCore::RenderView::registerQuote):
1042         (WebCore::RenderView::unregisterQuote):
1043
1044             Maintain a render tree order ListHashSet of RenderQuotes.
1045
1046         (WebCore::RenderView::updateSpecialRenderers):
1047
1048             Add a function for making additional render tree mutations at the end of a render tree update.
1049             Currently this just invokes RenderQuote::updateRenderers.
1050
1051         * rendering/RenderView.h:
1052         * style/RenderTreeUpdater.cpp:
1053         (WebCore::RenderTreeUpdater::commit):
1054
1055             Call RenderView::updateSpecialRenderers after committing all other changes.
1056
1057 2017-08-09  Zan Dobersek  <zdobersek@igalia.com>
1058
1059         [Soup] Incorrect conversion in msToSoupDate()
1060         https://bugs.webkit.org/show_bug.cgi?id=175320
1061
1062         Reviewed by Carlos Garcia Campos.
1063
1064         Original patch by VaL Doroshchuk.
1065
1066         * platform/network/soup/NetworkStorageSessionSoup.cpp:
1067         (WebCore::msToSoupDate): monthFromDayInYear() returns a value in the [0,11] range,
1068         while soup_date_new() expects a month value in the [1,12] range. The return value
1069         must be thus incremented by one to match that expectation.
1070
1071 2017-08-08  Wenson Hsieh  <wenson_hsieh@apple.com>
1072
1073         Unreviewed, rolling out r220393.
1074
1075         This patch regresses the performance of WebPage::editorState.
1076
1077         Reverted changeset:
1078
1079         "[iOS WK2] WKWebView schedules nonstop layout after pressing
1080         cmb+b,i,u inside a contenteditable div"
1081         https://bugs.webkit.org/show_bug.cgi?id=175116
1082         http://trac.webkit.org/changeset/220393
1083
1084 2017-08-08  Chris Dumez  <cdumez@apple.com>
1085
1086         [Beacon] Add support for CORS-preflighting for WK2 / NETWORK_SESSION
1087         https://bugs.webkit.org/show_bug.cgi?id=175264
1088         <rdar://problem/33547793>
1089
1090         Reviewed by Youenn Fablet.
1091
1092         Pass additional information when creating a PingHandle so that the PingLoad
1093         can deal with CORS-preflighting on Network process side.
1094
1095         Tests: http/wpt/beacon/cors/cors-preflight-arraybufferview-failure.html
1096                http/wpt/beacon/cors/cors-preflight-arraybufferview-success.html
1097                http/wpt/beacon/cors/cors-preflight-blob-failure.html
1098                http/wpt/beacon/cors/cors-preflight-blob-success.html
1099                http/wpt/beacon/cors/cors-preflight-cookie.html
1100
1101         * WebCore.xcodeproj/project.pbxproj:
1102         * loader/CrossOriginAccessControl.cpp:
1103         (WebCore::validatePreflightResponse):
1104         * loader/CrossOriginAccessControl.h:
1105         * loader/CrossOriginPreflightChecker.cpp:
1106         (WebCore::CrossOriginPreflightChecker::validatePreflightResponse):
1107         * loader/CrossOriginPreflightResultCache.h:
1108         * loader/LoaderStrategy.h:
1109         * loader/PingLoader.cpp:
1110         (WebCore::PingLoader::loadImage):
1111         (WebCore::PingLoader::sendPing):
1112         (WebCore::PingLoader::sendViolationReport):
1113         (WebCore::PingLoader::startPingLoad):
1114         * loader/PingLoader.h:
1115         * loader/cache/CachedResource.cpp:
1116         (WebCore::CachedResource::load):
1117         * page/SecurityOrigin.h:
1118
1119 2017-08-08  Sam Weinig  <sam@webkit.org>
1120
1121         Address review feedback from https://bugs.webkit.org/show_bug.cgi?id=175246.
1122
1123         * bindings/js/DOMPromiseProxy.h:
1124         * css/FontFaceSet.cpp:
1125         * css/FontFaceSet.h:
1126
1127 2017-08-08  Devin Rousso  <drousso@apple.com>
1128
1129         Web Inspector: Canvas: support editing WebGL shaders
1130         https://bugs.webkit.org/show_bug.cgi?id=124211
1131         <rdar://problem/15448958>
1132
1133         Reviewed by Matt Baker.
1134
1135         Test: inspector/canvas/updateShader.html
1136
1137         * inspector/InspectorCanvasAgent.h:
1138         * inspector/InspectorCanvasAgent.cpp:
1139         (WebCore::InspectorCanvasAgent::updateShader):
1140
1141         * html/canvas/WebGLRenderingContextBase.h:
1142         * html/canvas/WebGLRenderingContextBase.cpp:
1143         (WebCore::WebGLRenderingContextBase::linkProgram):
1144         (WebCore::WebGLRenderingContextBase::linkProgramWithoutInvalidatingAttribLocations):
1145         Normally, when a program is linked, it invalidates any WebGLUniformLocation associated with
1146         the program by incrementing its `linkCount`. In order to allow live editing of shaders, we
1147         need to be able to compile and link a shader without invalidating these locations. This
1148         patch moves the shader linking logic to its own function that is called by `linkProgram` so
1149         that InspectorCanvasAgent can compile and link without invalidation.
1150
1151 2017-08-08  Sam Weinig  <sam@webkit.org>
1152
1153         [WebIDL] Add support for Promise<> attributes
1154         https://bugs.webkit.org/show_bug.cgi?id=175246
1155
1156         Reviewed by Yusuke Suzuki.
1157
1158         Introduces and adopts DOMPromiseProxy, a new class for binding promises in a more
1159         straightforward and safe (from a wrapper world perspective) way.
1160
1161         * CMakeLists.txt:
1162         * WebCore.xcodeproj/project.pbxproj:
1163         * bindings/js/JSFontFaceCustom.cpp: Removed.
1164         * bindings/js/JSFontFaceSetCustom.cpp: Removed.
1165         * bindings/js/JSMediaKeySessionCustom.cpp: Removed.
1166         * bindings/js/JSServiceWorkerContainerCustom.cpp: Removed.
1167         * bindings/js/JSWebGPUCommandBufferCustom.cpp: Removed.
1168
1169             Remove custom bindings only needed for promise attributes. Add DOMPromiseProxy.h
1170
1171         * Modules/encryptedmedia/MediaKeySession.cpp:
1172         (WebCore::MediaKeySession::sessionClosed):
1173         (WebCore::MediaKeySession::registerClosedPromise): Deleted.
1174         * Modules/encryptedmedia/MediaKeySession.h:
1175         * Modules/encryptedmedia/MediaKeySession.idl:
1176
1177             Replace custom promise code using the registerPromise idiom with DOMPromiseProxy.
1178
1179         * bindings/IDLTypes.h:
1180
1181             Add StorageType type alias to allow specifying a specific form for storage. This allows
1182             use to use Ref<> for interfaces in DOMPromiseProxy.
1183
1184         (WebCore::IDLWrapper::convertToParameterType):
1185             
1186             Also add convertToParameterType, an annoying hack to workaround the fact WTF::Function
1187             can't return references / no
1188
1189         * bindings/js/DOMPromiseProxy.h: Added.
1190         (WebCore::DOMPromiseProxy<IDLType>):
1191         
1192             DOMPromiseProxy is a new class (set of classes) to represent promises that works with the 
1193             standard toJS<> / JSDOMConvert infrastructure used by the bindings generator. From the
1194             implementation perspective, it is similar to DOMPromiseDeferred, but instead of receiving
1195             one as a parameter, you can initialize it directly in your constructor and start using it.
1196
1197             From the bindings perspective, a DOMPromiseProxy can be converted into a JS Promise by calling
1198             its promise function, which will either create a new promise, or return a cached one.
1199
1200             To make this work, DOMPromiseProxy maintains a Vector of DeferredPromises that hold onto those
1201             actualized promises. The reason it has a Vector, is that we need one DeferredPromises per
1202             DOMWrapperWorld, just like we need one wrapper for an interface per DOMWrapperWorld in the 
1203             wrapper cache. In most cases, only the normal world will be in play, so the Vector has an inline
1204             capacity of one.
1205             
1206             In addition, DOMPromiseProxy maintains a Variant of either an Exception or the result value type.
1207             This allows the DOMPromiseProxy to be resolved or rejected at anytime. Then, when the bindings
1208             request the promise, the stored result / exception can be resolved / rejected into the promise.
1209
1210         (WebCore::DOMPromiseProxy<IDLVoid>):
1211
1212             For void promises, we need slightly different semantics (resolve takes no parameters, Value is
1213             a bit indicating resolved state), so it is specialized.
1214
1215         (WebCore::DOMPromiseProxyWithResolveCallback<IDLType>):
1216
1217             In addition to the void specialization, we have DOMPromiseProxyWithResolveCallback. Instead of
1218             storing the value of the resolution directly, this specialization allows the owner to specify
1219             callback to be called when the resolved value is needed. This is needed to avoid reference
1220             cycles when the resolved value is the owner such as is the case with FontFace and FontFaceSet.
1221
1222         * bindings/js/JSDOMConvertPromise.h:
1223         (WebCore::JSConverter<IDLPromise<T>>::convert):
1224         Add converter that calls through to the DOMPromiseProxy function promise.
1225
1226         * bindings/js/JSDOMPromiseDeferred.cpp:
1227         (WebCore::DeferredPromise::callFunction):
1228         (WebCore::DeferredPromise::reject):
1229         * bindings/js/JSDOMPromiseDeferred.h:
1230         (WebCore::DeferredPromise::create):
1231         (WebCore::DeferredPromise::DeferredPromise):
1232
1233             Add a new create function for DeferredPromise that creates the JSPromiseDeferred for you.
1234             Also adds a mode to DeferredPromise to allow keeping the promise after resolution. Maintain
1235             the old behavior as the default.
1236
1237             Change reject to take an Exception as sink rather than an r-value, to allow DOMPromiseProxy
1238             to copy a Exception into multiple DeferredPromises. For callers already moving into reject,
1239             this should be no change.
1240
1241         * bindings/scripts/CodeGeneratorJS.pm:
1242         (AddToIncludesForIDLType):
1243         (GenerateParametersCheck):
1244         (GenerateImplementationFunctionCall):
1245         (NativeToJSValueDOMConvertNeedsState):
1246         (NativeToJSValueDOMConvertNeedsGlobalObject):
1247
1248             Add support DOMPromiseProxy. For now, this means a new extended attribute, [PromiseProxy],
1249             but once I convert all the existing promises over to using DOMPromiseProxy, it will be removed.
1250             
1251             Also specify the right #includes for promises and necessary parameters for conversion.
1252
1253         * bindings/scripts/IDLAttributes.json:
1254         
1255             Add [PromiseProxy], a temporary extended attribute for using DOMPromiseProxy.
1256
1257         * css/FontFace.cpp:
1258         * css/FontFace.h:
1259         * css/FontFace.idl:
1260         * css/FontFaceSet.cpp:
1261         * css/FontFaceSet.h:
1262         * css/FontFaceSet.idl:
1263
1264             Replace custom promise code using the registerPromise idiom with DOMPromiseProxyWithResolveCallback.
1265             The callback is necessary for these two classes since the value the resolve is themselves, and using
1266             a normal resolve would create a cycle.
1267
1268         * html/canvas/WebGPUCommandBuffer.cpp:
1269         * html/canvas/WebGPUCommandBuffer.h:
1270         * html/canvas/WebGPUCommandBuffer.idl:
1271         * platform/graphics/cocoa/GPUCommandBufferMetal.mm:
1272         * platform/graphics/gpu/GPUCommandBuffer.cpp:
1273         * platform/graphics/gpu/GPUCommandBuffer.h:
1274
1275             Replace custom promise code using the registerPromise idiom with DOMPromiseProxy.
1276
1277         * page/NavigatorBase.cpp:
1278         (WebCore::NavigatorBase::NavigatorBase):
1279         * page/NavigatorBase.h:
1280
1281             Forward declare ServiceWorkerContainer and add an explicit constructor to allow
1282             removing #include of ServiceWorkerContainer.h in the header, avoiding an #include cycle.
1283
1284         * workers/ServiceWorkerContainer.cpp:
1285         * workers/ServiceWorkerContainer.h:
1286         * workers/ServiceWorkerContainer.idl:
1287
1288             Replace custom promise code using the registerPromise idiom with DOMPromiseProxy.
1289
1290         * bindings/scripts/test/JS/JSTestObj.cpp:
1291         * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
1292         * bindings/scripts/test/TestObj.idl:
1293
1294             Add / update tests.
1295
1296 2017-08-08  John Wilander  <wilander@apple.com>
1297
1298         Resource Load Statistics: Merge of dataRecordsRemoved should use std::max()
1299         https://bugs.webkit.org/show_bug.cgi?id=175348
1300         <rdar://problem/33785695>
1301
1302         Reviewed by Chris Dumez.
1303
1304         No new tests. Online change of a statistic that doesn't affect logic flow.
1305
1306         * loader/ResourceLoadStatistics.cpp:
1307         (WebCore::ResourceLoadStatistics::merge):
1308             Now uses std::max() instead of addition.
1309
1310 2017-08-08  Brent Fulgham  <bfulgham@apple.com>
1311
1312         Sandbox flags do not support document.domain control
1313         https://bugs.webkit.org/show_bug.cgi?id=175281
1314         <rdar://problem/33778936>
1315
1316         Reviewed by Chris Dumez.
1317
1318         Update the 'setDomain' logic to honor the sandbox properties as defined in the current
1319         HTML5 specification. This brings us in line with how Chrome and other browsers have
1320         worked for some time.
1321
1322         Test: fast/frames/sandboxed-iframe-domain.html
1323
1324         * dom/Document.cpp:
1325         (WebCore::Document::setDomain): Add check for sandbox flag (with appropriate error message)
1326         * dom/SecurityContext.h:
1327
1328 2017-08-08  Jeremy Jones  <jeremyj@apple.com>
1329
1330         Change fast seek logic to prevent ping-ponging.
1331         https://bugs.webkit.org/show_bug.cgi?id=175167
1332         rdar://problem/32936116
1333
1334         Reviewed by Jer Noble.
1335
1336         Updated test: media/video-fast-seek.html
1337
1338         Changed fast seek behavior to always seek early than seek time; and after current time when seeking forward.
1339         This prevents ping-ponging, where a fast seek overshoots the target looking for a keyframe.
1340         A subsequent seek will suddenly be on the other side of current time and
1341         will search in the opposite direction for a key frame; repeat.
1342
1343         * html/HTMLMediaElement.cpp:
1344         (WebCore::HTMLMediaElement::fastSeek):
1345
1346 2017-08-08  Ms2ger  <Ms2ger@igalia.com>
1347
1348         Unreviewed. Correct the function name in a debug message.
1349         https://bugs.webkit.org/show_bug.cgi?id=175262
1350
1351         No new tests: debug logs are not tested.
1352
1353         * platform/audio/PlatformMediaSessionManager.cpp:
1354         (WebCore::PlatformMediaSessionManager::applicationDidBecomeActive const):
1355
1356 2017-08-08  Brent Fulgham  <bfulgham@apple.com>
1357
1358         Unreviewed build fix after r220376.
1359
1360         Don't attempt to use isPublicSuffix when building without that
1361         feature enabled.
1362
1363         * dom/Document.cpp:
1364         (WebCore::Document::domainIsRegisterable const):
1365
1366 2017-08-08  Michael Catanzaro  <mcatanzaro@igalia.com>
1367
1368         [CMake] Properly test if compiler supports compiler flags
1369         https://bugs.webkit.org/show_bug.cgi?id=174490
1370
1371         Reviewed by Konstantin Tokarev.
1372
1373         * CMakeLists.txt:
1374         * PlatformGTK.cmake:
1375         * PlatformWPE.cmake:
1376
1377 2017-08-08  Zan Dobersek  <zdobersek@igalia.com>
1378
1379         [GStreamer] Don't use GraphicsContext3D in VideoTextureCoperGStreamer
1380         https://bugs.webkit.org/show_bug.cgi?id=174774
1381
1382         Reviewed by Carlos Garcia Campos.
1383
1384         VideoTextureCoperGStreamer class creates a new GraphicsContext3D internally
1385         that's used to render to whichever OpenGL context is current. Such usage
1386         doesn't add anything to the user since there's no underlying offscreen-based
1387         OpenGL context created, and instead all GraphicsContext3D calls are directly
1388         translated to usual OpenGL API calls. We should avoid using GraphicsContext3D
1389         in such cases and instead use direct OpenGL API calls.
1390
1391         This patch achieves that for the VideoTextureCoperGStreamer class. A
1392         GraphicsContext3D object is still created because it's needed to construct an
1393         instance of the TextureMapperShaderProgram class, but this will be removed as
1394         soon as TextureMapperShaderProgram drops the GraphicsContext3D dependence.
1395
1396         No new tests -- no change in behavior.
1397
1398         * platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp:
1399         (WebCore::VideoTextureCopierGStreamer::VideoTextureCopierGStreamer):
1400         (WebCore::VideoTextureCopierGStreamer::~VideoTextureCopierGStreamer):
1401         (WebCore::VideoTextureCopierGStreamer::copyVideoTextureToPlatformTexture):
1402         * platform/graphics/gstreamer/VideoTextureCopierGStreamer.h:
1403         (WebCore::VideoTextureCopierGStreamer::resultTexture):
1404
1405 2017-08-08  Zan Dobersek  <zdobersek@igalia.com>
1406
1407         [TexMap] Drop GC3D* type usage from TextureMapperPlatformLayer{Buffer,Proxy}
1408         https://bugs.webkit.org/show_bug.cgi?id=175314
1409
1410         Reviewed by Carlos Garcia Campos.
1411
1412         Switch to using OpenGL types in the TextureMapperPlatformLayerBuffer and
1413         TextureMapperPlatformLayerProxy classes, instead of the equivalent GC3D*
1414         types provided in the GraphicsTypes3D.h header.
1415
1416         No new tests -- no change in behavior.
1417
1418         * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
1419         (WebCore::TextureMapperPlatformLayerBuffer::TextureMapperPlatformLayerBuffer):
1420         (WebCore::TextureMapperPlatformLayerBuffer::canReuseWithoutReset):
1421         * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:
1422         * platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:
1423         (WebCore::TextureMapperPlatformLayerProxy::getAvailableBuffer):
1424         * platform/graphics/texmap/TextureMapperPlatformLayerProxy.h:
1425
1426 2017-08-08  Zan Dobersek  <zdobersek@igalia.com>
1427
1428         [TexMap] Don't use GraphicsContext3D in ClipStack
1429         https://bugs.webkit.org/show_bug.cgi?id=174776
1430
1431         Reviewed by Carlos Garcia Campos.
1432
1433         Any GraphicsContext3D object that's passed to ClipStack methods is of the
1434         render-to-current-context nature, meaning there's no internally owned GL
1435         context that has to be properly handled and all calls are simply passed to
1436         OpenGL APIs. We should drop such (non-)usage of GraphicsContext3D in favor
1437         of direct OpenGL API invocations.
1438
1439         This patch covers TextureMapper's ClipStack. Call sites to the apply() and
1440         applyIfNeeded() are modified to not pass a reference to any
1441         GraphicsContext3D object. Internally, OpenGL API entrypoints and constants
1442         are used instead of GraphicsContext3D invocations.
1443
1444         No new tests -- no change in behavior.
1445
1446         * platform/graphics/texmap/BitmapTextureGL.cpp:
1447         (WebCore::BitmapTextureGL::clearIfNeeded):
1448         (WebCore::BitmapTextureGL::bindAsSurface):
1449         * platform/graphics/texmap/ClipStack.cpp:
1450         (WebCore::ClipStack::apply):
1451         (WebCore::ClipStack::applyIfNeeded):
1452         * platform/graphics/texmap/ClipStack.h:
1453         * platform/graphics/texmap/TextureMapperGL.cpp:
1454         (WebCore::TextureMapperGL::bindDefaultSurface):
1455         (WebCore::TextureMapperGL::beginScissorClip):
1456         (WebCore::TextureMapperGL::beginClip):
1457         (WebCore::TextureMapperGL::endClip):
1458
1459 2017-08-08  Javier Fernandez  <jfernandez@igalia.com>
1460
1461         Not possible to remove the 'li' element inside the table cell
1462         https://bugs.webkit.org/show_bug.cgi?id=173148
1463
1464         Reviewed by Ryosuke Niwa.
1465
1466         We need to add a new case for breaking out empty list items when they are
1467         at the start of an editable area. Since list items can be also inside
1468         table cells, we need to consider this kind of elements as well.
1469
1470         Tests: editing/deleting/delete-list-items-in-table-cell-1.html
1471                editing/deleting/delete-list-items-in-table-cell-2.html
1472                editing/deleting/delete-list-items-in-table-cell-3.html
1473                editing/deleting/delete-list-items-in-table-cell-4.html
1474                editing/deleting/delete-list-items-in-table-cell-5.html
1475                editing/deleting/delete-list-items-in-table-cell-6.html
1476                editing/deleting/delete-list-items-in-table-cell-7.html
1477                editing/deleting/delete-list-items-in-table-cell-8.html
1478
1479         * editing/TypingCommand.cpp:
1480         (WebCore::TypingCommand::deleteKeyPressed):
1481
1482 2017-08-08  Zan Dobersek  <zdobersek@igalia.com>
1483
1484         [TexMap] Isolate the TextureMapperPlatformLayerProxyProvider class
1485         https://bugs.webkit.org/show_bug.cgi?id=175316
1486
1487         Reviewed by Carlos Garcia Campos.
1488
1489         Move the TextureMapperPlatformLayerProxyProvider class (which is the type
1490         aliased to PlatformLayer for threaded CoordGraphics) into its own header
1491         file. This prevents including the TextureMapperPlatformLayerProxy.h header
1492         file in MediaPlayerPrivateGStreamerBase.h, avoiding spilling OpenGL types
1493         and function declarations before the GStreamer GL headers include them
1494         later in the MediaPlayerPrivateGStreamerBase implementation file.
1495
1496         In the MediaPlayerPrivateGStreamerBase.h header file, only the new header
1497         is included, and a forward declaration of the TextureMapperPlatformLayerProxy
1498         class is used. proxy() and swapBuffersIfNeeded() methods are moved into
1499         the implementation file to avoid requiring the full definition of the
1500         TextureMapperPlatformLayerProxy class.
1501
1502         Similar is done for the TextureMapperGC3DPlatformLayer class and the
1503         Cairo-specific implementation of the ImageBufferData class. The
1504         CoordinatedGraphicsLayer implementation file also gains an include of the
1505         TextureMapperPlatformLayerProxyProvider.h header since it requires the full
1506         definition of that class.
1507
1508         No new tests -- no change in behavior.
1509
1510         * platform/graphics/cairo/ImageBufferCairo.cpp:
1511         (WebCore::ImageBufferData::proxy const):
1512         * platform/graphics/cairo/ImageBufferDataCairo.h:
1513         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1514         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture):
1515         (WebCore::MediaPlayerPrivateGStreamerBase::proxy const):
1516         (WebCore::MediaPlayerPrivateGStreamerBase::swapBuffersIfNeeded):
1517         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
1518         * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp:
1519         * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.h:
1520         * platform/graphics/texmap/TextureMapperPlatformLayerProxy.h:
1521         * platform/graphics/texmap/TextureMapperPlatformLayerProxyProvider.h: Added.
1522         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1523
1524 2017-08-08  Zan Dobersek  <zdobersek@igalia.com>
1525
1526         Unreviewed. Follow-up to r220392 that fixes build on configurations
1527         that disable USE(GSTREAMER_GL).
1528
1529         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1530         (WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):
1531         When creating the BitmapTextureGL object, also provide an initialized
1532         TextureMapperContextAttributes object.
1533
1534 2017-08-08  Zan Dobersek  <zdobersek@igalia.com>
1535
1536         [TexMap] Group GL header file inclusions in a single header file
1537         https://bugs.webkit.org/show_bug.cgi?id=175313
1538
1539         Reviewed by Carlos Garcia Campos.
1540
1541         Add a helper header file to the TextureMapper subsystem that includes
1542         the OpenGL headers, properly addressing the build configuration to
1543         include headers as provided by either libepoxy, the OpenGL ES library,
1544         or the OpenGL library.
1545
1546         TextureMapperContextAttributes implementation file is the only one
1547         that can leverage the header at the moment, but more will follow.
1548
1549         * platform/graphics/texmap/TextureMapperContextAttributes.cpp:
1550         * platform/graphics/texmap/TextureMapperGLHeaders.h: Copied from Source/WebCore/platform/graphics/texmap/TextureMapperContextAttributes.cpp.
1551
1552 2017-08-08  Wenson Hsieh  <wenson_hsieh@apple.com>
1553
1554         [iOS WK2] WKWebView schedules nonstop layout after pressing cmb+b,i,u inside a contenteditable div
1555         https://bugs.webkit.org/show_bug.cgi?id=175116
1556         <rdar://problem/28279301>
1557
1558         Reviewed by Darin Adler and Ryosuke Niwa.
1559
1560         WebCore support for WebPage::editorState refactoring. See WebKit ChangeLogs for more detail.
1561
1562         Tests: EditorStateTests.TypingAttributesBold
1563                EditorStateTests.TypingAttributesItalic
1564                EditorStateTests.TypingAttributesUnderline
1565                EditorStateTests.TypingAttributesTextAlignmentAbsoluteAlignmentOptions
1566                EditorStateTests.TypingAttributesTextAlignmentStartEnd
1567                EditorStateTests.TypingAttributesTextAlignmentDirectionalText
1568                EditorStateTests.TypingAttributesTextColor
1569                EditorStateTests.TypingAttributesMixedStyles
1570                EditorStateTests.TypingAttributesLinkColor
1571
1572         * css/StyleProperties.cpp:
1573         (WebCore::StyleProperties::propertyAsColor const):
1574         (WebCore::StyleProperties::propertyAsValueID const):
1575
1576         Introduces some helper functions in StyleProperties to convert CSS property values to Color or a CSSValueID.
1577
1578         * css/StyleProperties.h:
1579         * editing/EditingStyle.cpp:
1580         (WebCore::EditingStyle::hasStyle):
1581
1582         Pull out logic in selectionStartHasStyle that asks for a style TriState into EditingStyle::hasStyle. This is
1583         because WebPage::editorState will now query for multiple styles at the selection start, but
1584         selectionStartHasStyle currently recomputes styleAtSelectionStart every time it is called. To prevent extra work
1585         from being done, we can just call selectionStartHasStyle once and use ask for EditingStyle::hasStyle on the
1586         computed EditingStyle at selection start.
1587
1588         * editing/EditingStyle.h:
1589         * editing/Editor.cpp:
1590         (WebCore::Editor::selectionStartHasStyle const):
1591
1592 2017-08-08  Zan Dobersek  <zdobersek@igalia.com>
1593
1594         [TexMap] Add TextureMapperContextAttributes
1595         https://bugs.webkit.org/show_bug.cgi?id=175311
1596
1597         Reviewed by Carlos Garcia Campos.
1598
1599         Add and use TextureMapperContextAttributes, a slim struct that holds
1600         information about the type and extensions supported by the OpenGL
1601         context that's being used for one specific TextureMapperGL instance.
1602
1603         This struct is initialized in the TextureMapperGL constructor for the
1604         OpenGL context that's been made current on that thread, and that will
1605         be used for that TextureMapperGL instance through its lifetime. The
1606         struct is then also copied into any BitmapTextureGL objects that have
1607         been created through this TextureMapperGL (or its texture pool).
1608
1609         The struct is initialized with information about GLES2 support (which
1610         is at this point done through the USE_OPENGL_ES_2 macro) and about
1611         specific OpenGL extensions that are supported. These are then used in
1612         TextureMapperGL (NPOT textures) and BitmapTextureGL (BGRA support,
1613         sub-image unpacking) to deploy specific optimizations or workarounds.
1614
1615         This ultimately serves as a replacement for clunky static functions
1616         that need to operate on GraphicsContext3D objects to retrieve this
1617         information.
1618
1619         No new tests -- no change in behavior.
1620
1621         * platform/TextureMapper.cmake:
1622         * platform/graphics/texmap/BitmapTextureGL.cpp:
1623         (WebCore::BitmapTextureGL::BitmapTextureGL):
1624         (WebCore::BitmapTextureGL::updateContentsNoSwizzle):
1625         (WebCore::BitmapTextureGL::updateContents):
1626         (WebCore::driverSupportsSubImage): Deleted.
1627         * platform/graphics/texmap/BitmapTextureGL.h:
1628         (WebCore::BitmapTextureGL::create):
1629         * platform/graphics/texmap/BitmapTexturePool.cpp:
1630         (WebCore::BitmapTexturePool::BitmapTexturePool):
1631         (WebCore::BitmapTexturePool::createTexture):
1632         * platform/graphics/texmap/BitmapTexturePool.h:
1633         * platform/graphics/texmap/TextureMapperContextAttributes.cpp: Added.
1634         (WebCore::TextureMapperContextAttributes::initialize):
1635         * platform/graphics/texmap/TextureMapperContextAttributes.h: Added.
1636         * platform/graphics/texmap/TextureMapperGL.cpp:
1637         (WebCore::TextureMapperGL::TextureMapperGL):
1638         (WebCore::TextureMapperGL::drawTexture):
1639         (WebCore::TextureMapperGL::drawTexturedQuadWithProgram):
1640         (WebCore::TextureMapperGL::createTexture):
1641         (WebCore::driverSupportsNPOTTextures): Deleted.
1642         * platform/graphics/texmap/TextureMapperGL.h:
1643
1644 2017-08-08  Zan Dobersek  <zdobersek@igalia.com>
1645
1646         [TexMap] Don't expose GraphicsContext3D object
1647         https://bugs.webkit.org/show_bug.cgi?id=175310
1648
1649         Reviewed by Carlos Garcia Campos.
1650
1651         Remove the GraphicsContext3D getter from the TextureMapperGL class. Instead,
1652         the clearColor() method is added that's to be used by the CoordinatedGraphicsScene
1653         class which was accessing the GraphicsContext3D object for this purpose.
1654
1655         * platform/graphics/texmap/TextureMapper.h:
1656         * platform/graphics/texmap/TextureMapperGL.cpp:
1657         (WebCore::TextureMapperGL::clearColor):
1658         * platform/graphics/texmap/TextureMapperGL.h:
1659         (WebCore::TextureMapperGL::graphicsContext3D const): Deleted.
1660
1661 2017-08-07  Simon Fraser  <simon.fraser@apple.com>
1662
1663         RenderStyle:diff() was inadvertently doing deep compares of StyleRareNonInheritedData etc
1664         https://bugs.webkit.org/show_bug.cgi?id=175304
1665
1666         Reviewed by Tim Horton.
1667
1668         r210758 changed DataRef::get() from returning a pointer to a reference. This caused all the places
1669         in RenderStyle::diff() and related functions, where we intended to do a quick pointer comparison,
1670         to doing deep compares via operator!=. This made the code slightly slower.
1671
1672         Fix by exposing ptr() on DataRef and using it wherever we wish to do pointer comparison.
1673
1674         * rendering/style/DataRef.h:
1675         (WebCore::DataRef::ptr const):
1676         * rendering/style/RenderStyle.cpp:
1677         (WebCore::RenderStyle::inheritedDataShared const):
1678         (WebCore::RenderStyle::changeAffectsVisualOverflow const):
1679         (WebCore::RenderStyle::changeRequiresLayout const):
1680         (WebCore::RenderStyle::changeRequiresRecompositeLayer const):
1681         (WebCore::RenderStyle::listStyleImage const): Expand the function onto multiple lines.
1682
1683 2017-08-07  Simon Fraser  <simon.fraser@apple.com>
1684
1685         Add a fast path for rotate() and rotateZ() transform parsing
1686         https://bugs.webkit.org/show_bug.cgi?id=175308
1687
1688         Reviewed by Zalan Bujtas.
1689
1690         Fast paths only existed for translate-related functions, matrix3d() and scale3d(). Add
1691         rotate() and rotateX(), which gives a small boost to one of the MotionMark tests.
1692
1693         * css/parser/CSSParserFastPaths.cpp:
1694         (WebCore::parseSimpleAngle):
1695         (WebCore::parseTransformAngleArgument):
1696         (WebCore::parseSimpleTransformValue):
1697         (WebCore::transformCanLikelyUseFastPath):
1698
1699 2017-08-07  Simon Fraser  <simon.fraser@apple.com>
1700
1701         Re-order the tests in RenderLayerCompositor::requiresCompositingLayer() for performance
1702         https://bugs.webkit.org/show_bug.cgi?id=175306
1703
1704         Reviewed by Tim Horton.
1705
1706         Re-order the tests for compositing reasons so that reasons more likely to happen are higher in the list.
1707
1708         * rendering/RenderLayerCompositor.cpp:
1709         (WebCore::RenderLayerCompositor::requiresCompositingLayer const):
1710         (WebCore::RenderLayerCompositor::requiresOwnBackingStore const):
1711
1712 2017-08-07  Simon Fraser  <simon.fraser@apple.com>
1713
1714         Avoid a hash lookup in FilterInfo::remove()
1715         https://bugs.webkit.org/show_bug.cgi?id=175301
1716
1717         Reviewed by Sam Weinig.
1718
1719         FilterInfo::remove() always called map().remove(&layer)), even when layer.m_hasFilterInfo
1720         was false (and even asserted that layer.m_hasFilterInfo == map().contains(&layer)).
1721
1722         So we can early return if layer.m_hasFilterInfo is false.
1723
1724         * rendering/RenderLayerFilterInfo.cpp:
1725         (WebCore::RenderLayer::FilterInfo::getIfExists):
1726         (WebCore::RenderLayer::FilterInfo::remove):
1727
1728 2017-08-07  Simon Fraser  <simon.fraser@apple.com>
1729
1730         Make TransformOperation::type() non-virtual
1731         https://bugs.webkit.org/show_bug.cgi?id=175297
1732
1733         Reviewed by Sam Weinig.
1734
1735         Store the OperationType in the base class so that type() and isSameType() can
1736         be non-virtual.
1737
1738         Small perf win on some benchmarks.
1739
1740         * platform/graphics/transforms/IdentityTransformOperation.h:
1741         * platform/graphics/transforms/Matrix3DTransformOperation.h:
1742         * platform/graphics/transforms/MatrixTransformOperation.h:
1743         * platform/graphics/transforms/PerspectiveTransformOperation.h:
1744         * platform/graphics/transforms/RotateTransformOperation.cpp:
1745         (WebCore::RotateTransformOperation::blend):
1746         * platform/graphics/transforms/RotateTransformOperation.h:
1747         * platform/graphics/transforms/ScaleTransformOperation.cpp:
1748         (WebCore::ScaleTransformOperation::blend):
1749         * platform/graphics/transforms/ScaleTransformOperation.h:
1750         * platform/graphics/transforms/SkewTransformOperation.cpp:
1751         (WebCore::SkewTransformOperation::blend):
1752         * platform/graphics/transforms/SkewTransformOperation.h:
1753         * platform/graphics/transforms/TransformOperation.h:
1754         (WebCore::TransformOperation::TransformOperation):
1755         (WebCore::TransformOperation::type const):
1756         (WebCore::TransformOperation::isSameType const):
1757         * platform/graphics/transforms/TranslateTransformOperation.cpp:
1758         (WebCore::TranslateTransformOperation::blend):
1759         * platform/graphics/transforms/TranslateTransformOperation.h:
1760
1761 2017-08-07  Simon Fraser  <simon.fraser@apple.com>
1762
1763         Inline ~Color and Color::isExtended()
1764         https://bugs.webkit.org/show_bug.cgi?id=175293
1765
1766         Reviewed by Zalan Bujtas.
1767
1768         The Color destructor and Color::isExtended() show up on profiles, so inline them.
1769         Before r207265 the destructor was inlined.
1770         
1771         Also make sure that LengthSize::operator== is inlined, which it was not (according
1772         to profiles).
1773
1774         * platform/LengthSize.h:
1775         (WebCore::operator==):
1776         * platform/graphics/Color.cpp:
1777         (WebCore::Color::~Color): Deleted.
1778         (WebCore::Color::isExtended const): Deleted.
1779         * platform/graphics/Color.h:
1780         (WebCore::Color::~Color):
1781         (WebCore::Color::isExtended const):
1782
1783 2017-08-04  Brent Fulgham  <bfulgham@apple.com>
1784
1785         Implement the HTML5 same-origin restriction specification
1786         https://bugs.webkit.org/show_bug.cgi?id=175226
1787         <rdar://problem/11079948>
1788
1789         Reviewed by Chris Dumez.
1790
1791         Follow the algorithms defined in the HTML5 specification for relaxing
1792         the same-origin restriction. We were missing a few steps related to
1793         checking for public suffix and presence of a browsing context.
1794
1795         Tested by new TestWebKitAPI tests.
1796
1797         * dom/Document.cpp:
1798         (WebCore::Document::domainIsRegisterable): Added helper function.
1799         (WebCore::Document::setDomain):
1800
1801 2017-08-07  Devin Rousso  <drousso@apple.com>
1802
1803         Web Inspector: Preview Canvas path when viewing a recording
1804         https://bugs.webkit.org/show_bug.cgi?id=174967
1805
1806         Reviewed by Brian Burg.
1807
1808         Tests: fast/canvas/2d.currentPoint.html
1809                fast/canvas/2d.getPath.modification.html
1810                fast/canvas/2d.getPath.newobject.html
1811                fast/canvas/2d.setPath.html
1812
1813         * html/canvas/CanvasPath.idl:
1814         * html/canvas/CanvasPath.h:
1815         * html/canvas/CanvasPath.cpp:
1816         (WebCore::CanvasPath::currentX const):
1817         (WebCore::CanvasPath::currentY const):
1818
1819         * html/canvas/CanvasRenderingContext2D.idl:
1820         * html/canvas/CanvasRenderingContext2D.h:
1821         * html/canvas/CanvasRenderingContext2D.cpp:
1822         (WebCore::CanvasRenderingContext2D::setPath):
1823         (WebCore::CanvasRenderingContext2D::getPath const):
1824
1825         * page/RuntimeEnabledFeatures.h:
1826         (WebCore::RuntimeEnabledFeatures::setInspectorAdditionsEnabled):
1827         (WebCore::RuntimeEnabledFeatures::inspectorAdditionsEnabled const):
1828         Add runtime flag for added IDL items above so that they are only usable within the inspector
1829         process. The runtime flag is not enabled from anywhere else as of now.
1830
1831         * inspector/InspectorCanvas.cpp:
1832         (WebCore::InspectorCanvas::buildInitialState):
1833         Send current path as part of the InitialState.
1834         Drive-by: deduplicate more string values.
1835
1836 2017-08-07  Chris Dumez  <cdumez@apple.com>
1837
1838         Update sendBeacon() to rely on FetchBody instead of the whole FetchRequest
1839         https://bugs.webkit.org/show_bug.cgi?id=175280
1840
1841         Reviewed by Youenn Fablet.
1842
1843         Update sendBeacon() to rely on FetchBody instead of the whole FetchRequest. FetchBody
1844         for data extraction is really the only thing we need at the moment.
1845         The new code also properly sets the CORS mode, which will be needed for Bug 175264.
1846
1847         * Modules/beacon/NavigatorBeacon.cpp:
1848         (WebCore::NavigatorBeacon::sendBeacon):
1849
1850 2017-08-07  Michael Catanzaro  <mcatanzaro@igalia.com>
1851
1852         -Wimplicit-fallthrough warning in ComputedStyleExtractor::propertyValue
1853         https://bugs.webkit.org/show_bug.cgi?id=174469
1854         <rdar://problem/33311638>
1855
1856         Reviewed by Simon Fraser.
1857
1858         Add a RELEASE_ASSERT_NOT_REACHED to silence this warning.
1859
1860         * css/CSSComputedStyleDeclaration.cpp:
1861         (WebCore::ComputedStyleExtractor::propertyValue):
1862
1863 2017-08-06  Filip Pizlo  <fpizlo@apple.com>
1864
1865         Primitive auxiliaries and JSValue auxiliaries should have separate gigacages
1866         https://bugs.webkit.org/show_bug.cgi?id=174919
1867
1868         Reviewed by Keith Miller.
1869
1870         No new tests because no change in behavior.
1871         
1872         Adapting to API changes - we now specify the AlignedMemoryAllocator differently and we need to be
1873         specific about which Gigacage we're using.
1874
1875         * bindings/js/WebCoreJSClientData.cpp:
1876         (WebCore::JSVMClientData::JSVMClientData):
1877         * platform/graphics/cocoa/GPUBufferMetal.mm:
1878         (WebCore::GPUBuffer::GPUBuffer):
1879
1880 2017-08-07  Basuke Suzuki  <Basuke.Suzuki@sony.com>
1881
1882         [Curl] Add abstraction layer of cookie jar implementation for Curl port
1883         https://bugs.webkit.org/show_bug.cgi?id=174943
1884
1885         Reviewed by Brent Fulgham.
1886
1887         * platform/network/curl/CookieJarCurl.cpp:
1888         (WebCore::CookieJarCurlFileSystem::setCookiesFromDOM):
1889         (WebCore::CookieJarCurlFileSystem::cookiesForDOM):
1890         (WebCore::CookieJarCurlFileSystem::cookieRequestHeaderFieldValue):
1891         (WebCore::CookieJarCurlFileSystem::cookiesEnabled):
1892         (WebCore::CookieJarCurlFileSystem::getRawCookies):
1893         (WebCore::CookieJarCurlFileSystem::deleteCookie):
1894         (WebCore::CookieJarCurlFileSystem::getHostnamesWithCookies):
1895         (WebCore::CookieJarCurlFileSystem::deleteCookiesForHostnames):
1896         (WebCore::CookieJarCurlFileSystem::deleteAllCookies):
1897         (WebCore::CookieJarCurlFileSystem::deleteAllCookiesModifiedSince):
1898         (WebCore::cookiesForDOM):
1899         (WebCore::setCookiesFromDOM):
1900         (WebCore::cookieRequestHeaderFieldValue):
1901         (WebCore::cookiesEnabled):
1902         (WebCore::getRawCookies):
1903         (WebCore::deleteCookie):
1904         (WebCore::getHostnamesWithCookies):
1905         (WebCore::deleteCookiesForHostnames):
1906         (WebCore::deleteAllCookies):
1907         (WebCore::deleteAllCookiesModifiedSince):
1908         * platform/network/curl/CookieJarCurl.h: Added.
1909         * platform/network/curl/CurlContext.cpp:
1910         * platform/network/curl/CurlContext.h:
1911         (WebCore::CurlContext::cookieJar):
1912
1913 2017-08-07  Brady Eidson  <beidson@apple.com>
1914
1915         Implement most of ServiceWorkerContainer::addRegistration.
1916         https://bugs.webkit.org/show_bug.cgi?id=175237
1917
1918         Reviewed by Andy Estes.
1919
1920         No new tests (Covered by changes to existing tests).
1921
1922         There's still so much supporting infrastructure to add with these early patches
1923         that I'm still moving them in baby steps for now, hence not implementing
1924         register() all in one shot.
1925         
1926         Things will start moving very quickly once we no longer need to add lots of new
1927         primitives in each change.
1928         
1929         * CMakeLists.txt:
1930         * DerivedSources.make:
1931         * WebCore.xcodeproj/project.pbxproj:
1932         
1933         * page/DOMWindow.cpp:
1934         (WebCore::DOMWindow::navigator const):
1935         
1936         * page/Navigator.cpp:
1937         (WebCore::Navigator::Navigator): Make the constructor take a ScriptExecutionContext for 
1938           creation of objects where its import (e.g. ServiceWorkerContainer).
1939         * page/Navigator.h:
1940
1941         * page/WorkerNavigator.cpp:
1942         (WebCore::WorkerNavigator::WorkerNavigator): Ditto.
1943         * page/WorkerNavigator.h:
1944
1945         * page/NavigatorBase.cpp:
1946         (WebCore::NavigatorBase::NavigatorBase): Create the ServiceWorkerContainer upfront with
1947           the passed-in ScriptExecutionContext.
1948         (WebCore::NavigatorBase::serviceWorker):
1949         * page/NavigatorBase.h:
1950         
1951         Make ServiceWorkerContainer into an ActiveDOMObject. This will eventually be necessary for
1952         Document suspension reasons, but is also necessary because it also needs to be a
1953         ContextDestructionObserver (which ActiveDOMObject is):
1954         * workers/ServiceWorkerContainer.cpp:
1955         (WebCore::ServiceWorkerContainer::ServiceWorkerContainer):
1956         (WebCore::ServiceWorkerContainer::ready):
1957         (WebCore::ServiceWorkerContainer::addRegistration):
1958         (WebCore::ServiceWorkerContainer::getRegistration):
1959         (WebCore::ServiceWorkerContainer::getRegistrations):
1960         (WebCore::ServiceWorkerContainer::activeDOMObjectName const):
1961         (WebCore::ServiceWorkerContainer::canSuspendForDocumentSuspension const):
1962         (WebCore::rejectLater): Deleted.
1963         (WebCore::ServiceWorkerContainer::eventTargetInterface const): Deleted.
1964         (WebCore::ServiceWorkerContainer::scriptExecutionContext const): Deleted.
1965         * workers/ServiceWorkerContainer.h:
1966         * workers/ServiceWorkerContainer.idl:
1967
1968         Add updateViaCache, etc:
1969         * workers/ServiceWorkerRegistration.cpp:
1970         (WebCore::ServiceWorkerRegistration::updateViaCache const):
1971         (WebCore::ServiceWorkerRegistration::update):
1972         (WebCore::ServiceWorkerRegistration::unregister):
1973         * workers/ServiceWorkerRegistration.h:
1974         * workers/ServiceWorkerRegistration.idl:
1975
1976         * workers/ServiceWorkerUpdateViaCache.h: Copied from Source/WebCore/workers/ServiceWorkerRegistration.idl.
1977         * workers/ServiceWorkerUpdateViaCache.idl: Copied from Source/WebCore/workers/ServiceWorkerRegistration.idl.
1978
1979         * workers/WorkerGlobalScope.cpp:
1980         (WebCore::WorkerGlobalScope::navigator):
1981         (WebCore::WorkerGlobalScope::navigator const): Deleted.
1982         * workers/WorkerGlobalScope.h:
1983
1984         * workers/WorkerType.h: Copied from Source/WebCore/workers/ServiceWorkerRegistration.idl.
1985         * workers/WorkerType.idl: Copied from Source/WebCore/workers/ServiceWorkerRegistration.idl.
1986
1987 2017-08-07  Ryan Haddad  <ryanhaddad@apple.com>
1988
1989         Unreviewed, rolling out r220299.
1990
1991         This change caused LayoutTest inspector/dom-debugger/dom-
1992         breakpoints.html to fail.
1993
1994         Reverted changeset:
1995
1996         "Web Inspector: capture async stack trace when workers/main
1997         context posts a message"
1998         https://bugs.webkit.org/show_bug.cgi?id=167084
1999         http://trac.webkit.org/changeset/220299
2000
2001 2017-08-07  Brian Burg  <bburg@apple.com>
2002
2003         Cleanup: simplify WebSockets code for RuntimeEnabledFeatures
2004         https://bugs.webkit.org/show_bug.cgi?id=175190
2005
2006         Reviewed by Sam Weinig.
2007
2008         This runtime enabled flag is not used by anything. It was added
2009         for V8 in <https://bugs.webkit.org/show_bug.cgi?id=29896>.
2010
2011         * Modules/websockets/WebSocket.cpp:
2012         (WebCore::WebSocket::setIsAvailable): Deleted.
2013         (WebCore::WebSocket::isAvailable): Deleted.
2014         * Modules/websockets/WebSocket.h:
2015         * Modules/websockets/WebSocket.idl:
2016         * page/RuntimeEnabledFeatures.cpp:
2017         (WebCore::RuntimeEnabledFeatures::webSocketEnabled const): Deleted.
2018         * page/RuntimeEnabledFeatures.h:
2019
2020 2017-08-07  Brian Burg  <bburg@apple.com>
2021
2022         Remove CANVAS_PATH compilation guard
2023         https://bugs.webkit.org/show_bug.cgi?id=175207
2024
2025         Reviewed by Sam Weinig.
2026
2027         * Configurations/FeatureDefines.xcconfig:
2028         * html/canvas/DOMPath.h:
2029         * html/canvas/DOMPath.idl:
2030
2031 2017-08-07  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2032
2033         [WPE][CMake] Only pass pkg-config CFLAGS from (E)GL when not using libepoxy.
2034         https://bugs.webkit.org/show_bug.cgi?id=175125
2035
2036         Reviewed by Michael Catanzaro.
2037
2038         No change of behavior, covered by existing tests.
2039
2040         * CMakeLists.txt: Instead of negating 3 times the use of libepoxy
2041         move the logic for (E)GL detection inside an else() block.
2042
2043 2017-08-07  Antti Koivisto  <antti@apple.com>
2044
2045         REGRESSION (r219121): Airmail 3 prints header part only.
2046         https://bugs.webkit.org/show_bug.cgi?id=175258
2047         <rdar://problem/33601173>
2048
2049         Reviewed by Andreas Kling.
2050
2051         When a WK1 WebViw is printed via AppKit view hierarchy it won't explictly set the page width
2052         but uses the existing width. r219121 assumes that all printing code paths set the page width.
2053
2054         No test, there appears to be no good way to test AppKit printing behaviors without adding complicated
2055         new testing infrastructure.
2056
2057         * rendering/RenderView.cpp:
2058         (WebCore::RenderView::layout):
2059
2060             If we are in printing layout and don't have page width set yet then use the current view width.
2061             This matches the behavior prior r219121.
2062
2063 2017-08-05  Youenn Fablet  <youenn@apple.com>
2064
2065         [Fetch API] Response should keep all ResourceResponse information
2066         https://bugs.webkit.org/show_bug.cgi?id=175099
2067
2068         Reviewed by Sam Weinig.
2069
2070         No change of behavior, covered by existing tests.
2071
2072         Disabling filtering of resource response at DocumentThreadableLoader for fetch API and doing the filtering at FetchResponse level.
2073         This requires passing the tainting parameter to FetchResponse. For that purpose, we store the tainting on the ResourceResponse itself.
2074         This allows mimicking the concept of internal response from the fetch spec.
2075         This might be useful for future developments related to caching the responses.
2076
2077         The body is now also stored in FetchResponse so a flag is added to ensure we only expose the body if allowed.
2078
2079         Changing storage of opaque redirect information to keep the redirection information in the response.
2080
2081         * Modules/fetch/FetchBodyOwner.cpp:
2082         (WebCore::FetchBodyOwner::blob):
2083         (WebCore::FetchBodyOwner::consumeNullBody):
2084         * Modules/fetch/FetchBodyOwner.h:
2085         * Modules/fetch/FetchLoader.cpp:
2086         (WebCore::FetchLoader::start):
2087         * Modules/fetch/FetchResponse.cpp:
2088         (WebCore::FetchResponse::BodyLoader::didReceiveResponse):
2089         (WebCore::FetchResponse::consume):
2090         (WebCore::FetchResponse::consumeBodyAsStream):
2091         (WebCore::FetchResponse::createReadableStreamSource):
2092         * Modules/fetch/FetchResponse.h:
2093         * loader/DocumentThreadableLoader.cpp:
2094         (WebCore::DocumentThreadableLoader::responseReceived):
2095         (WebCore::DocumentThreadableLoader::didReceiveResponse):
2096         (WebCore::DocumentThreadableLoader::didFinishLoading):
2097         (WebCore::DocumentThreadableLoader::loadRequest):
2098         * loader/DocumentThreadableLoader.h:
2099         * loader/SubresourceLoader.cpp:
2100         (WebCore::SubresourceLoader::willSendRequestInternal):
2101         * loader/cache/CachedResource.cpp:
2102         (WebCore::CachedResource::setBodyDataFrom):
2103         (WebCore::CachedResource::setResponse):
2104         * platform/network/ResourceResponseBase.cpp:
2105         (WebCore::ResourceResponseBase::crossThreadData const):
2106         (WebCore::ResourceResponseBase::fromCrossThreadData):
2107         (WebCore::ResourceResponseBase::filter):
2108         * platform/network/ResourceResponseBase.h:
2109         (WebCore::ResourceResponseBase::setTainting):
2110         (WebCore::ResourceResponseBase::tainting const):
2111         (WebCore::ResourceResponseBase::encode const):
2112         (WebCore::ResourceResponseBase::decode):
2113
2114 2017-08-05  Carlos Garcia Campos  <cgarcia@igalia.com>
2115
2116         WebDriver: use in-view center point for clicks instead of bounding box center point
2117         https://bugs.webkit.org/show_bug.cgi?id=174863
2118
2119         Reviewed by Simon Fraser.
2120
2121         Make DOMRect, and FloatPoint::narrowPrecision() available to WebKit layer. Also add
2122         FrameView::clientToDocumentPoint().
2123
2124         * WebCore.xcodeproj/project.pbxproj:
2125         * dom/Element.h:
2126         * page/FrameView.h:
2127         * platform/graphics/FloatPoint.h:
2128
2129 2017-08-05  Carlos Garcia Campos  <cgarcia@igalia.com>
2130
2131         getClientRects doesn't work with list box option elements
2132         https://bugs.webkit.org/show_bug.cgi?id=175016
2133
2134         Reviewed by Darin Adler.
2135
2136         Since HTMLOptionElement and HTMLOptGroupElement don't have a renderer, we are always returning an empty list
2137         from getClientRects. This is working fine in both chromium and firefox, option elements return its own bounding
2138         box and group elements return the bounding box of the group label and all its children items.
2139
2140         Test: fast/dom/HTMLSelectElement/listbox-items-client-rects.html
2141
2142         * dom/Element.cpp:
2143         (WebCore::listBoxElementBoundingBox): Helper function to return the bounding box of a HTMLOptionElement or
2144         HTMLOptGroupElement element.
2145         (WebCore::Element::getClientRects): Use listBoxElementBoundingBox() in case of HTMLOptionElement or
2146         HTMLOptGroupElement.
2147         (WebCore::Element::boundingClientRect): Ditto.
2148
2149 2017-08-04  Youenn Fablet  <youenn@apple.com>
2150
2151         [Cache API] Add Cache and CacheStorage IDL definitions
2152         https://bugs.webkit.org/show_bug.cgi?id=175201
2153
2154         Reviewed by Brady Eidson.
2155
2156         Covered by activated tests.
2157         Adding IDLs as per https://www.w3.org/TR/service-workers-1/#idl-index.
2158         Implementation is guarded by a runtime flag which is off by default.
2159         It is off for DRT but on for WTR.
2160
2161         * CMakeLists.txt:
2162         * DerivedSources.make:
2163         * Modules/cache/Cache.cpp: Added.
2164         (WebCore::Cache::match):
2165         (WebCore::Cache::matchAll):
2166         (WebCore::Cache::add):
2167         (WebCore::Cache::addAll):
2168         (WebCore::Cache::put):
2169         (WebCore::Cache::remove):
2170         (WebCore::Cache::keys):
2171         * Modules/cache/Cache.h: Added.
2172         (WebCore::Cache::create):
2173         (WebCore::Cache::Cache):
2174         * Modules/cache/Cache.idl: Added.
2175         * Modules/cache/CacheQueryOptions.h: Added.
2176         * Modules/cache/CacheQueryOptions.idl: Added.
2177         * Modules/cache/CacheStorage.cpp: Added.
2178         (WebCore::CacheStorage::match):
2179         (WebCore::CacheStorage::has):
2180         (WebCore::CacheStorage::open):
2181         (WebCore::CacheStorage::remove):
2182         (WebCore::CacheStorage::keys):
2183         * Modules/cache/CacheStorage.h: Added.
2184         (WebCore::CacheStorage::create):
2185         * Modules/cache/CacheStorage.idl: Added.
2186         * Modules/cache/DOMWindowCaches.cpp: Added.
2187         (WebCore::DOMWindowCaches::DOMWindowCaches):
2188         (WebCore::DOMWindowCaches::supplementName):
2189         (WebCore::DOMWindowCaches::from):
2190         (WebCore::DOMWindowCaches::caches):
2191         (WebCore::DOMWindowCaches::caches const):
2192         * Modules/cache/DOMWindowCaches.h: Added.
2193         * Modules/cache/DOMWindowCaches.idl: Added.
2194         * Modules/cache/WorkerGlobalScopeCaches.cpp: Added.
2195         (WebCore::WorkerGlobalScopeCaches::supplementName):
2196         (WebCore::WorkerGlobalScopeCaches::from):
2197         (WebCore::WorkerGlobalScopeCaches::caches):
2198         (WebCore::WorkerGlobalScopeCaches::caches const):
2199         * Modules/cache/WorkerGlobalScopeCaches.h: Added.
2200         * Modules/cache/WorkerGlobalScopeCaches.idl: Added.
2201         * WebCore.xcodeproj/project.pbxproj:
2202         * page/RuntimeEnabledFeatures.h:
2203         (WebCore::RuntimeEnabledFeatures::setCacheAPIEnabled):
2204         (WebCore::RuntimeEnabledFeatures::cacheAPIEnabled const):
2205
2206 2017-08-04  Brady Eidson  <beidson@apple.com>
2207
2208         Have navigator.serviceWorker() actually return a ServiceWorkerContainer object.
2209         https://bugs.webkit.org/show_bug.cgi?id=175215
2210
2211         Reviewed by Youenn Fablet.
2212
2213         * page/NavigatorBase.cpp:
2214         (WebCore::NavigatorBase::serviceWorker): Actually create and remember an object.
2215         * page/NavigatorBase.h:
2216
2217         * workers/ServiceWorkerContainer.cpp:
2218         (WebCore::rejectLater): Asynchronously reject the given promise with an error message.
2219         (WebCore::ServiceWorkerContainer::ServiceWorkerContainer):
2220         (WebCore::ServiceWorkerContainer::refEventTarget): Ref the underlying Navigator.
2221         (WebCore::ServiceWorkerContainer::derefEventTarget): Deref the underlying Navigator.
2222         (WebCore::ServiceWorkerContainer::ready): rejectLater the promise.
2223         (WebCore::ServiceWorkerContainer::addRegistration): Ditto.
2224         (WebCore::ServiceWorkerContainer::getRegistration): Ditto.
2225         (WebCore::ServiceWorkerContainer::getRegistrations): Ditto.
2226         * workers/ServiceWorkerContainer.h:
2227
2228 2017-08-04  Chris Dumez  <cdumez@apple.com>
2229
2230         [Beacon] Update sendBeacon to use the CachedResourceLoader
2231         https://bugs.webkit.org/show_bug.cgi?id=175192
2232         <rdar://problem/33725923>
2233
2234         Reviewed by Youenn Fablet.
2235
2236         Update sendBeacon to use the FetchRequest / CachedResourceLoader instead of
2237         the PingLoader. This gets us closer to the specification which is based on
2238         Fetch and reduces code duplication. This also fixes an issue where our
2239         Origin header was not properly set on Beacon resquests.
2240
2241         In a follow-up, we will implement in CachedResourceLoader Fetch's quota for
2242         inflight keepalive requests which is needed to fully support sendBeacon().
2243
2244         * Modules/beacon/NavigatorBeacon.cpp:
2245         (WebCore::NavigatorBeacon::sendBeacon):
2246         * Modules/beacon/NavigatorBeacon.h:
2247         * loader/LinkLoader.cpp:
2248         (WebCore::createLinkPreloadResourceClient):
2249         * loader/PingLoader.cpp:
2250         * loader/PingLoader.h:
2251         * loader/ResourceLoadInfo.cpp:
2252         (WebCore::toResourceType):
2253         * loader/SubresourceLoader.cpp:
2254         (WebCore::logResourceLoaded):
2255         * loader/cache/CachedResource.cpp:
2256         (WebCore::CachedResource::defaultPriorityForResourceType):
2257         (WebCore::CachedResource::load):
2258         * loader/cache/CachedResource.h:
2259         * loader/cache/CachedResourceLoader.cpp:
2260         (WebCore::createResource):
2261         (WebCore::CachedResourceLoader::requestBeaconResource):
2262         (WebCore::contentTypeFromResourceType):
2263         (WebCore::CachedResourceLoader::checkInsecureContent const):
2264         (WebCore::CachedResourceLoader::allowedByContentSecurityPolicy const):
2265         (WebCore::isResourceSuitableForDirectReuse):
2266         * loader/cache/CachedResourceLoader.h:
2267
2268 2017-08-04  John Wilander  <wilander@apple.com>
2269
2270         Resource Load Statistics: Report user interaction immediately, but only when needed
2271         https://bugs.webkit.org/show_bug.cgi?id=175090
2272         <rdar://problem/33685546>
2273
2274         Reviewed by Chris Dumez.
2275
2276         Test: http/tests/loading/resourceLoadStatistics/user-interaction-only-reported-once-within-short-period-of-time.html
2277
2278         * loader/ResourceLoadObserver.cpp:
2279         (WebCore::ResourceLoadObserver::ResourceLoadObserver):
2280         (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
2281             Now tells the UI process immediately but also records that it has
2282             done so to avoid doing it when not needed.
2283         (WebCore::ResourceLoadObserver::scheduleNotificationIfNeeded):
2284             Conditional throttling gone, now always throttles.
2285         (WebCore::ResourceLoadObserver::notifyObserver):
2286             Renamed from ResourceLoadObserver::notificationTimerFired().
2287         (WebCore::ResourceLoadObserver::clearState):
2288             New function to allow the test runner to reset the web process'
2289             statistics state now that we keep track of whether or not we've
2290             reported user interaction to the UI process.
2291         (WebCore::ResourceLoadObserver::setShouldThrottleObserverNotifications): Deleted.
2292         (WebCore::ResourceLoadObserver::notificationTimerFired): Deleted.
2293         * loader/ResourceLoadObserver.h:
2294         (): Deleted.
2295         * testing/Internals.cpp:
2296         (WebCore::Internals::resetToConsistentState):
2297         (WebCore::Internals::setResourceLoadStatisticsShouldThrottleObserverNotifications): Deleted.
2298             No longer needed since user interaction is always communicated
2299             immediately.
2300         * testing/Internals.h:
2301         * testing/Internals.idl:
2302
2303 2017-08-04  Matt Baker  <mattbaker@apple.com>
2304
2305         Web Inspector: capture async stack trace when workers/main context posts a message
2306         https://bugs.webkit.org/show_bug.cgi?id=167084
2307         <rdar://problem/30033673>
2308
2309         Reviewed by Brian Burg.
2310
2311         Add instrumentation to DOMWindow to support showing asynchronous
2312         stack traces when the debugger pauses in a MessageEvent handler.
2313
2314         Test: inspector/debugger/async-stack-trace.html
2315
2316         * inspector/InspectorInstrumentation.cpp:
2317         (WebCore::InspectorInstrumentation::didPostMessageImpl):
2318         (WebCore::InspectorInstrumentation::didFailPostMessageImpl):
2319         (WebCore::InspectorInstrumentation::willDispatchPostMessageImpl):
2320         (WebCore::InspectorInstrumentation::didDispatchPostMessageImpl):
2321
2322         * inspector/InspectorInstrumentation.h:
2323         (WebCore::InspectorInstrumentation::didPostMessage):
2324         (WebCore::InspectorInstrumentation::didFailPostMessage):
2325         (WebCore::InspectorInstrumentation::willDispatchPostMessage):
2326         (WebCore::InspectorInstrumentation::didDispatchPostMessage):
2327
2328         * inspector/PageDebuggerAgent.cpp:
2329         (WebCore::PageDebuggerAgent::didClearAsyncStackTraceData):
2330         (WebCore::PageDebuggerAgent::didPostMessage):
2331         (WebCore::PageDebuggerAgent::didFailPostMessage):
2332         (WebCore::PageDebuggerAgent::willDispatchPostMessage):
2333         (WebCore::PageDebuggerAgent::didDispatchPostMessage):
2334         * inspector/PageDebuggerAgent.h:
2335
2336         * page/DOMWindow.cpp:
2337         (WebCore::DOMWindow::postMessage):
2338         (WebCore::DOMWindow::postMessageTimerFired):
2339
2340 2017-08-04  Devin Rousso  <drousso@apple.com>
2341
2342         Web Inspector: add source view for WebGL shader programs
2343         https://bugs.webkit.org/show_bug.cgi?id=138593
2344         <rdar://problem/18936194>
2345
2346         Reviewed by Matt Baker.
2347
2348         Test: inspector/canvas/requestShaderSource.html
2349
2350         * inspector/InspectorCanvasAgent.h:
2351         * inspector/InspectorCanvasAgent.cpp:
2352         (WebCore::InspectorCanvasAgent::requestShaderSource):
2353
2354         * inspector/InspectorShaderProgram.h:
2355         * inspector/InspectorShaderProgram.cpp:
2356         (WebCore::InspectorShaderProgram::shaderForType):
2357
2358 2017-08-04  Matt Lewis  <jlewis3@apple.com>
2359
2360         Unreviewed, rolling out r220288.
2361
2362         This broke multiple builds.
2363
2364         Reverted changeset:
2365
2366         "Use MPAVRoutingController instead of deprecated versions."
2367         https://bugs.webkit.org/show_bug.cgi?id=175063
2368         http://trac.webkit.org/changeset/220288
2369
2370 2017-08-03  Filip Pizlo  <fpizlo@apple.com>
2371
2372         The allocator used to allocate memory for MarkedBlocks and LargeAllocations should not be the Subspace itself
2373         https://bugs.webkit.org/show_bug.cgi?id=175141
2374
2375         Reviewed by Mark Lam.
2376
2377         No new tests because no new behavior.
2378         
2379         Just adapting to an API change.
2380
2381         * ForwardingHeaders/heap/FastMallocAlignedMemoryAllocator.h: Added.
2382         * bindings/js/WebCoreJSClientData.cpp:
2383         (WebCore::JSVMClientData::JSVMClientData):
2384
2385 2017-08-04  Chris Dumez  <cdumez@apple.com>
2386
2387         Match newly-clarified spec on textarea defaultValue/value/child text content
2388         https://bugs.webkit.org/show_bug.cgi?id=173878
2389
2390         Reviewed by Darin Adler.
2391
2392         Update HTMLTextArea.defaultValue to match align with other browsers and match the
2393         latest HTML specification:
2394         - https://html.spec.whatwg.org/#dom-textarea-defaultvalue
2395
2396         The defaultValue getter should return the child text content:
2397         - https://dom.spec.whatwg.org/#concept-child-text-content
2398         Our code was traversing all Text descendants, not just the children.
2399
2400         The defaultValue setter should act as the setter of the Element's textContent
2401         IDL attribute. Previously, we had a custom logic that was only removing the
2402         text children.
2403
2404         Test: imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/value-defaultValue-textContent.html
2405
2406         * dom/ScriptElement.cpp:
2407         (WebCore::ScriptElement::scriptContent const):
2408         * dom/TextNodeTraversal.cpp:
2409         (WebCore::TextNodeTraversal::childTextContent):
2410         * dom/TextNodeTraversal.h:
2411         * html/HTMLTextAreaElement.cpp:
2412         (WebCore::HTMLTextAreaElement::defaultValue const):
2413         (WebCore::HTMLTextAreaElement::setDefaultValue):
2414         * html/HTMLTitleElement.cpp:
2415         (WebCore::HTMLTitleElement::text const):
2416
2417 2017-08-04  Said Abou-Hallawa  <sabouhallawa@apple.com>
2418
2419         RenderImageResourceStyleImage::image() should return the nullImage() if the image is not available
2420         https://bugs.webkit.org/show_bug.cgi?id=174874
2421         <rdar://problem/33530130>
2422
2423         Reviewed by Simon Fraser.
2424
2425         If an <img> element has a non-CachedImage content data, e.g. -webkit-named-image,
2426         RenderImageResourceStyleImage will be created and  attached to the RenderImage.
2427         RenderImageResourceStyleImage::m_cachedImage will be set to null at the 
2428         beginning because the m_styleImage->isCachedImage() is false in this case.
2429         When ImageLoader finishes loading the url of the src attribute,
2430         RenderImageResource::setCachedImage() will be called to set m_cachedImage.
2431
2432         A crash will happen when the RenderImage is destroyed. Destroying the 
2433         RenderImage calls RenderImageResourceStyleImage::shutdown() which checks
2434         m_cachedImage and finds it not null, so it calls RenderImageResourceStyleImage::image()
2435         which ends up calling CSSNamedImageValue::image() which returns a null pointer
2436         because the size is empty. RenderImageResourceStyleImage::shutdown() calls
2437         image()->stopAnimation() without checking the return value of image().
2438
2439         Another crash will happen later when deleting the CachedImage from the memory
2440         cache if CachedImage::canDestroyDecodedData() is called because the client
2441         it gets from m_clients is a freed pointer. This happens because RenderImageResourceStyleImage
2442         has m_styleImage of type StyleGeneratedImage but its m_cachedImage is set
2443         by RenderImageResource::setCachedImage(). When RenderImageResourceStyleImage::shutdown()
2444         is called, it calls  StyleGeneratedImage::removeClient() which does not 
2445         know anything about RenderImageResourceStyleImage::m_cachedImage. So we 
2446         end up having a freed pointer in the m_clients of the CachedImage.
2447
2448         Test: fast/images/image-element-image-content-data.html
2449
2450         * rendering/RenderImageResourceStyleImage.cpp:
2451         (WebCore::RenderImageResourceStyleImage::shutdown):  Revert back the changes
2452         of r208511 in this function. Add a call to image()->stopAnimation() without
2453         checking the return of image() since it will return the nullImage() if
2454         the image not available. There is no need to check m_cachedImage before 
2455         calling image() because image() does not check or access m_cachedImage.
2456
2457         If m_styleImage is not a CachedStyleImage but m_cachedImage is not null,
2458         we need to remove m_renderer from the set of the clients of this m_cachedImage.
2459
2460         (WebCore::RenderImageResourceStyleImage::image const): The base class method
2461         RenderImageResource::image() returns the nullImage() if the image not
2462         available. This is because CachedImage::imageForRenderer() returns
2463         the nullImage() if the image is not available; see CachedImage.h. We should
2464         do the same for the derived class for consistency.
2465
2466 2017-08-04  Jeremy Jones  <jeremyj@apple.com>
2467
2468         Use MPAVRoutingController instead of deprecated versions.
2469         https://bugs.webkit.org/show_bug.cgi?id=175063
2470
2471         Reviewed by Tim Horton.
2472
2473         No new tests because no behavior change. This uses a different platform class to present
2474         an interface.
2475
2476         Remove deprecated MPAudioVideoRoutingPopoverController and MPAVRoutingSheet
2477         Add MPMediaControlsViewController.
2478
2479         * platform/spi/ios/MediaPlayerSPI.h:
2480
2481 2017-08-04  Matt Baker  <mattbaker@apple.com>
2482
2483         Web Inspector: REGRESSION (r220233): Check for null pointer passed to WebGLRenderingContextBase::deleteProgram
2484         https://bugs.webkit.org/show_bug.cgi?id=175196
2485         <rdar://problem/33727603>
2486
2487         Reviewed by Devin Rousso.
2488
2489         * html/canvas/WebGLRenderingContextBase.cpp:
2490         (WebCore::WebGLRenderingContextBase::deleteProgram):
2491
2492 2017-08-04  Matt Lewis  <jlewis3@apple.com>
2493
2494         Unreviewed, rolling out r220271.
2495
2496         Rolling out due to Layout Test failing on iOS Simulator.
2497
2498         Reverted changeset:
2499
2500         "Remove STREAMS_API compilation guard"
2501         https://bugs.webkit.org/show_bug.cgi?id=175165
2502         http://trac.webkit.org/changeset/220271
2503
2504 2017-08-03  Sam Weinig  <sam@webkit.org>
2505
2506         [Cleanup] Remove ScriptGlobalObject
2507         https://bugs.webkit.org/show_bug.cgi?id=175173
2508
2509         Reviewed by Darin Adler.
2510
2511         ScriptGlobalObject's two functions were only being used in
2512         four places. Three of those uses (ScriptGlobalObject::set in 
2513         InspectorFrontendClientLocal, WebInspectorUI, and RemoteWebInspectorUI)
2514         were merged into the new function addSelfToGlobalObjectInWorld on
2515         InspectorFrontendHost. The remaining function (ScriptGlobalObject::get
2516         in InspectorFrontendHost) was easily inlined.
2517
2518         * CMakeLists.txt:
2519         * WebCore.xcodeproj/project.pbxproj:
2520         * bindings/js/JSBindingsAllInOne.cpp:
2521         * bindings/js/ScriptGlobalObject.cpp: Removed.
2522         * bindings/js/ScriptGlobalObject.h: Removed.
2523         Removed ScriptGlobalObject.
2524
2525         * inspector/InspectorFrontendClientLocal.cpp:
2526         (WebCore::InspectorFrontendClientLocal::windowObjectCleared):
2527         Remove call to ScriptGlobalObject::set and use addSelfToGlobalObjectInWorld instead.
2528
2529         * inspector/InspectorFrontendHost.h:
2530         * inspector/InspectorFrontendHost.cpp:
2531         (WebCore::InspectorFrontendHost::showContextMenu):
2532         Inline ScriptGlobalObject::get.
2533
2534         (WebCore::InspectorFrontendHost::addSelfToGlobalObjectInWorld):
2535         Add helper which inlines ScriptGlobalObject::set and works
2536         as a helper for the three inspector frontends.
2537
2538 2017-08-04  Ryan Haddad  <ryanhaddad@apple.com>
2539
2540         Unreviewed, rolling out r220268.
2541
2542         This change caused assertion failures on macOS and iOS Debug
2543         WK2.
2544
2545         Reverted changeset:
2546
2547         "Resource Load Statistics: Report user interaction
2548         immediately, but only when needed"
2549         https://bugs.webkit.org/show_bug.cgi?id=175090
2550         http://trac.webkit.org/changeset/220268
2551
2552 2017-08-04  Youenn Fablet  <youenn@apple.com>
2553
2554         Remove STREAMS_API compilation guard
2555         https://bugs.webkit.org/show_bug.cgi?id=175165
2556
2557         Reviewed by Darin Adler.
2558
2559         No change of behavior.
2560
2561         * Configurations/FeatureDefines.xcconfig:
2562         * Modules/fetch/FetchBody.cpp:
2563         (WebCore::FetchBody::consumeAsStream):
2564         * Modules/fetch/FetchBody.h:
2565         * Modules/fetch/FetchBodyOwner.cpp:
2566         (WebCore::FetchBodyOwner::isDisturbedOrLocked const):
2567         (WebCore::FetchBodyOwner::blobLoadingSucceeded):
2568         (WebCore::FetchBodyOwner::blobLoadingFailed):
2569         (WebCore::FetchBodyOwner::blobChunk):
2570         * Modules/fetch/FetchBodyOwner.h:
2571         * Modules/fetch/FetchResponse.cpp:
2572         (WebCore::FetchResponse::BodyLoader::didSucceed):
2573         (WebCore::FetchResponse::BodyLoader::didFail):
2574         (WebCore::FetchResponse::BodyLoader::didReceiveData):
2575         * Modules/fetch/FetchResponse.h:
2576         * Modules/fetch/FetchResponse.idl:
2577         * Modules/fetch/FetchResponse.js:
2578         (initializeFetchResponse):
2579         * Modules/fetch/FetchResponseSource.cpp:
2580         * Modules/fetch/FetchResponseSource.h:
2581         * Modules/streams/ByteLengthQueuingStrategy.idl:
2582         * Modules/streams/ByteLengthQueuingStrategy.js:
2583         * Modules/streams/CountQueuingStrategy.idl:
2584         * Modules/streams/CountQueuingStrategy.js:
2585         * Modules/streams/ReadableByteStreamController.idl:
2586         * Modules/streams/ReadableByteStreamController.js:
2587         * Modules/streams/ReadableByteStreamInternals.js:
2588         * Modules/streams/ReadableStream.idl:
2589         * Modules/streams/ReadableStream.js:
2590         * Modules/streams/ReadableStreamBYOBReader.idl:
2591         * Modules/streams/ReadableStreamBYOBReader.js:
2592         * Modules/streams/ReadableStreamBYOBRequest.idl:
2593         * Modules/streams/ReadableStreamBYOBRequest.js:
2594         * Modules/streams/ReadableStreamDefaultController.idl:
2595         * Modules/streams/ReadableStreamDefaultController.js:
2596         * Modules/streams/ReadableStreamDefaultReader.idl:
2597         * Modules/streams/ReadableStreamDefaultReader.js:
2598         * Modules/streams/ReadableStreamInternals.js:
2599         * Modules/streams/ReadableStreamSource.h:
2600         * Modules/streams/ReadableStreamSource.idl:
2601         * Modules/streams/StreamInternals.js:
2602         * Modules/streams/WritableStream.idl:
2603         * Modules/streams/WritableStream.js:
2604         * Modules/streams/WritableStreamInternals.js:
2605         * bindings/js/JSDOMGlobalObject.cpp:
2606         (WebCore::isReadableByteStreamAPIEnabled):
2607         (WebCore::JSDOMGlobalObject::addBuiltinGlobals):
2608         * bindings/js/JSReadableStreamPrivateConstructors.cpp:
2609         * bindings/js/JSReadableStreamPrivateConstructors.h:
2610         * bindings/js/JSReadableStreamSourceCustom.cpp:
2611         * bindings/js/ReadableStreamDefaultController.cpp:
2612         * bindings/js/ReadableStreamDefaultController.h:
2613         * page/RuntimeEnabledFeatures.h:
2614         * testing/Internals.cpp:
2615         * testing/Internals.h:
2616         * testing/Internals.idl:
2617
2618 2017-08-04  Zan Dobersek  <zdobersek@igalia.com>
2619
2620         [EME][GStreamer] Register ClearKey CDMFactory
2621         https://bugs.webkit.org/show_bug.cgi?id=175136
2622
2623         Reviewed by Xabier Rodriguez-Calvar.
2624
2625         Register the ClearKey CDM factory in CDMFactoryGStreamer. A CDMFactoryClearKey
2626         singleton object is introduced and used for that registration.
2627
2628         The basic CDMFactoryClearKey and CDMPrivateClearKey methods are implemented,
2629         marking `org.w3.clearkey` as the supported key system and `keyids` as the
2630         supported init data type. Additional logic around key system configurations,
2631         distinctive identifiers, persistent state and related restrictions and
2632         requirements is implemented.
2633
2634         This improves the ClearKey EME tests a bit, now progressing to the point of
2635         failing with a NotAllowedError exception due to the CDMInstance object failing
2636         to properly initialize because of missing implementation.
2637
2638         No new tests -- relevant tests have underlying baselines updated to reflect
2639         changes in behavior.
2640
2641         * platform/encryptedmedia/clearkey/CDMClearKey.cpp:
2642         (WebCore::CDMFactoryClearKey::singleton):
2643         (WebCore::CDMFactoryClearKey::supportsKeySystem):
2644         (WebCore::CDMPrivateClearKey::supportsInitDataType const):
2645         (WebCore::CDMPrivateClearKey::supportsConfiguration const):
2646         (WebCore::CDMPrivateClearKey::supportsConfigurationWithRestrictions const):
2647         (WebCore::CDMPrivateClearKey::supportsSessionTypeWithConfiguration const):
2648         (WebCore::CDMPrivateClearKey::supportsRobustness const):
2649         (WebCore::CDMPrivateClearKey::distinctiveIdentifiersRequirement const):
2650         (WebCore::CDMPrivateClearKey::persistentStateRequirement const):
2651         * platform/encryptedmedia/clearkey/CDMClearKey.h:
2652         * platform/graphics/gstreamer/eme/CDMFactoryGStreamer.cpp:
2653         (WebCore::CDMFactory::platformRegisterFactories):
2654
2655 2017-08-04  John Wilander  <wilander@apple.com>
2656
2657         Resource Load Statistics: Report user interaction immediately, but only when needed
2658         https://bugs.webkit.org/show_bug.cgi?id=175090
2659         <rdar://problem/33685546>
2660
2661         Reviewed by Chris Dumez.
2662
2663         Test: http/tests/loading/resourceLoadStatistics/user-interaction-only-reported-once-within-short-period-of-time.html
2664
2665         * loader/ResourceLoadObserver.cpp:
2666         (WebCore::ResourceLoadObserver::ResourceLoadObserver):
2667         (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
2668             Now tells the UI process immediately but also records that it has
2669             done so to avoid doing it when not needed.
2670         (WebCore::ResourceLoadObserver::scheduleNotificationIfNeeded):
2671             Conditional throttling gone, now always throttles.
2672         (WebCore::ResourceLoadObserver::notifyObserver):
2673             Renamed from ResourceLoadObserver::notificationTimerFired().
2674         (WebCore::ResourceLoadObserver::clearState):
2675             New function to allow the test runner to reset the web process'
2676             statistics state now that we keep track of whether or not we've
2677             reported user interaction to the UI process.
2678         (WebCore::ResourceLoadObserver::setShouldThrottleObserverNotifications): Deleted.
2679         (WebCore::ResourceLoadObserver::notificationTimerFired): Deleted.
2680         * loader/ResourceLoadObserver.h:
2681         (): Deleted.
2682         * testing/Internals.cpp:
2683         (WebCore::Internals::resetToConsistentState):
2684         (WebCore::Internals::setResourceLoadStatisticsShouldThrottleObserverNotifications): Deleted.
2685             No longer needed since user interaction is always communicated
2686             immediately.
2687         * testing/Internals.h:
2688         * testing/Internals.idl:
2689
2690 2017-08-04  Zan Dobersek  <zdobersek@igalia.com>
2691
2692         [EME] Push CDMFactory into the platform layer
2693         https://bugs.webkit.org/show_bug.cgi?id=175129
2694
2695         Reviewed by Xabier Rodriguez-Calvar.
2696
2697         This is a follow-up to r219678 that moved the majority of CDM abstraction
2698         classes into the platform layer, but missed the CDMFactory class.
2699
2700         The CDMFactory abstraction is now also placed in the platform layer. Only
2701         change to the interface is that the createCDM() method can't accept a CDM
2702         object reference anymore since that class is cemented into the WebCore
2703         layer, and no current implementation used it anyway.
2704
2705         Additionally, the static Vector object of registered factories is moved
2706         under the CDMFactory class, along with the register and unregister
2707         functions. The platformRegisterFactories() function is added to allow for
2708         platform-specific factory registrations to occur when the registered
2709         factories are queried for the first time. Empty implementation for this
2710         function is provided for non-GStreamer platforms, while for GStreamer
2711         the implementation is kept in CDMFactoryGStreamer.cpp. It's still empty
2712         for now, but it will register the ClearKey factory there in the near
2713         future.
2714
2715         No new tests -- none affected, only refactoring.
2716
2717         * CMakeLists.txt:
2718         * Modules/encryptedmedia/CDM.cpp:
2719         (WebCore::createCDMPrivateForKeySystem):
2720         (WebCore::CDM::supportsKeySystem):
2721         (WebCore::CDM::CDM):
2722         (): Deleted.
2723         (WebCore::CDM::registerCDMFactory): Deleted.
2724         (WebCore::CDM::unregisterCDMFactory): Deleted.
2725         * Modules/encryptedmedia/CDM.h:
2726         (WebCore::CDMFactory::~CDMFactory): Deleted.
2727         * PlatformWPE.cmake:
2728         * platform/GStreamer.cmake:
2729         * platform/encryptedmedia/CDMFactory.cpp: Added.
2730         (WebCore::CDMFactory::registerFactory):
2731         (WebCore::CDMFactory::unregisterFactory):
2732         (WebCore::CDMFactory::platformRegisterFactories):
2733         * platform/encryptedmedia/CDMFactory.h: Added.
2734         (WebCore::CDMFactory::~CDMFactory):
2735         * platform/encryptedmedia/clearkey/CDMClearKey.cpp:
2736         (WebCore::CDMFactoryClearKey::createCDM):
2737         * platform/encryptedmedia/clearkey/CDMClearKey.h:
2738         * platform/encryptedmedia/gstreamer/CDMFactoryGStreamer.cpp: Added.
2739         (WebCore::CDMFactory::platformRegisterFactories):
2740         * testing/MockCDMFactory.cpp:
2741         (WebCore::m_weakPtrFactory):
2742         (WebCore::MockCDMFactory::unregister):
2743         (WebCore::MockCDMFactory::createCDM):
2744         * testing/MockCDMFactory.h:
2745
2746 2017-08-04  Frederic Wang  <fwang@igalia.com>
2747
2748         ScrollingTreeOverflowScrollingNodeIOS uses the wrong fixed position rectangle
2749         https://bugs.webkit.org/show_bug.cgi?id=175135
2750
2751         Reviewed by Simon Fraser.
2752
2753         This patch modifies ScrollingTreeOverflowScrollingNodeIOS::updateChildNodesAfterScroll so
2754         that it uses the fixed position rectangle relative of the first frame ancestor instead of
2755         the one of the main frame. This makes it consistent with ScrollingTreeFrameScrollingNodeIOS
2756         and RenderLayerCompositor. This fixes some flickering issues on iOS.
2757
2758         Test: fast/scrolling/ios/fixed-inside-overflow-inside-iframe.html
2759
2760         * page/scrolling/ScrollingTreeFrameScrollingNode.h:
2761         (WebCore::ScrollingTreeFrameScrollingNode::fixedPositionRect): Helper function to get the
2762         fixed position rect to use for that frame.
2763         * page/scrolling/ScrollingTreeNode.cpp:
2764         (WebCore::ScrollingTreeNode::enclosingFrameNode const): Helper function to get the enclosing
2765         frame for this scrolling node or null if there is none.
2766         * page/scrolling/ScrollingTreeNode.h: Declare enclosingFrameNode.
2767
2768 2017-08-04  Zan Dobersek  <zdobersek@igalia.com>
2769
2770         Unreviewed. Removing redundant NotImplemented.h header inclusions
2771         and cleaning up whitespace issues in libgcrypt-specific CryptoKeyEC
2772         and CryptoKeyRSA implementation files.
2773
2774         * crypto/gcrypt/CryptoKeyECGCrypt.cpp:
2775         * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
2776
2777 2017-08-04  Jeremy Jones  <jeremyj@apple.com>
2778
2779         Remove unnecesary call to status bar SPI.
2780         https://bugs.webkit.org/show_bug.cgi?id=175176
2781         rdar://problem/20887306
2782
2783         Reviewed by Darin Adler.
2784
2785         No new tests because no behavior change.
2786
2787         This removes an obsolete call to SPI.
2788
2789         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
2790         (VideoFullscreenInterfaceAVKit::cleanupFullscreen):
2791
2792 2017-08-03  Zan Dobersek  <zdobersek@igalia.com>
2793
2794         [GCrypt] Implement CryptoKeyEC PKCS#8 imports
2795         https://bugs.webkit.org/show_bug.cgi?id=173647
2796
2797         Reviewed by Jiewen Tan.
2798
2799         No new tests -- affected tests are now passing and are unskipped.
2800
2801         Implement libgcrypt-based support for PKCS#8 imports of EC keys.
2802
2803         Existing libtasn1 utilities are used to achieve this. First, the provided key data
2804         is decoded against the PrivateKeyInfo ASN.1 definition. First, the version member
2805         of that structure is validated, followed by the algorithm member. The latter is
2806         also properly tested depending on this being an import of an ECDSA or ECDH key.
2807
2808         Data of the parameters member is decoded against the ECParameters ASN.1 definition,
2809         and the namedCurve object identifier is validated, making sure it represents a
2810         valid EC curve and that this curve maches the one specified for the import
2811         operation.
2812
2813         Data of the privateKey member is decoded against the ECPrivateKey ASN.1 definition.
2814         The version member of that structure is properly validated. The optional parameters
2815         member of that structure is already decoded against the ECParameters ASN.1
2816         definition. If present, it is checked to contain a valid EC curve identifier that
2817         matches the specified curve.
2818
2819         The optional publicKey member of the ECPrivateKey structure is validated, testing
2820         that its data matches in size an uncompressed EC point, and that the first byte
2821         of this data is 0x04, as expected for an uncompressed EC point.
2822
2823         What's left is the private key data on the initial ECPrivateKey structure. That
2824         data is retrieved and validated, making sure its size matches the size of the
2825         specified curve. The `private-key` s-expression is then constructed, embedding
2826         the curve name and the validated private key data. This s-expression is then used
2827         to construct an EC context.
2828
2829         If the optional publicKey data was provided, it's used to set the `q` parameter
2830         for this EC context. Otherwise, the value for `q` is computed on-the-fly for the
2831         specified EC and the provided private key. The `q` point is then tested through
2832         the gcry_mpi_ec_curve_point() function, making sure that the derived point is
2833         indeed located on the given EC.
2834
2835         Finally, with the private key properly validated, a new CryptoKeyEC object is
2836         constructed, using the `private-key` s-expression and the parameters that were
2837         specified for this import operation.
2838
2839         * crypto/gcrypt/CryptoKeyECGCrypt.cpp:
2840         (WebCore::CryptoKeyEC::platformImportPkcs8):
2841         * crypto/gcrypt/GCryptUtilities.h:
2842
2843 2017-08-03  Chris Dumez  <cdumez@apple.com>
2844
2845         Fix parsing of <meta http-equiv=refresh> to allow time starting with a '.' without a leading 0
2846         https://bugs.webkit.org/show_bug.cgi?id=175132
2847
2848         Reviewed by Darin Adler.
2849
2850         Fix parsing of <meta http-equiv=refresh> to allow time starting with a '.', without
2851         a leading 0. This is as per https://github.com/whatwg/html/pull/2852.
2852
2853         The latest spec is at:
2854         - https://html.spec.whatwg.org/multipage/semantics.html#attr-meta-http-equiv-refresh
2855
2856         Test: imported/w3c/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/parsing.html
2857
2858         * html/parser/HTMLParserIdioms.cpp:
2859         (WebCore::parseHTTPRefreshInternal):
2860
2861 2017-08-03  Brian Burg  <bburg@apple.com>
2862
2863         Remove ENABLE(WEB_SOCKET) guards
2864         https://bugs.webkit.org/show_bug.cgi?id=167044
2865
2866         Reviewed by Joseph Pecoraro.
2867
2868         * Configurations/FeatureDefines.xcconfig:
2869         * Modules/websockets/ThreadableWebSocketChannel.cpp:
2870         * Modules/websockets/ThreadableWebSocketChannel.h:
2871         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
2872         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
2873         * Modules/websockets/WebSocket.cpp:
2874         * Modules/websockets/WebSocket.h:
2875         * Modules/websockets/WebSocket.idl:
2876         * Modules/websockets/WebSocketChannel.cpp:
2877         * Modules/websockets/WebSocketChannel.h:
2878         * Modules/websockets/WebSocketChannelClient.h:
2879         * Modules/websockets/WebSocketDeflateFramer.cpp:
2880         * Modules/websockets/WebSocketDeflateFramer.h:
2881         * Modules/websockets/WebSocketDeflater.cpp:
2882         * Modules/websockets/WebSocketDeflater.h:
2883         * Modules/websockets/WebSocketExtensionDispatcher.cpp:
2884         * Modules/websockets/WebSocketExtensionDispatcher.h:
2885         * Modules/websockets/WebSocketExtensionParser.cpp:
2886         * Modules/websockets/WebSocketExtensionParser.h:
2887         * Modules/websockets/WebSocketExtensionProcessor.h:
2888         * Modules/websockets/WebSocketFrame.cpp:
2889         * Modules/websockets/WebSocketFrame.h:
2890         * Modules/websockets/WebSocketHandshake.cpp:
2891         * Modules/websockets/WebSocketHandshake.h:
2892         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
2893         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
2894         * dom/Document.cpp:
2895         (WebCore::Document::Document):
2896         (WebCore::Document::idbConnectionProxy):
2897         (WebCore::Document::socketProvider):
2898         * dom/Document.h:
2899         * dom/ScriptExecutionContext.h:
2900         * inspector/InspectorInstrumentation.cpp:
2901         (WebCore::InspectorInstrumentation::didSendWebSocketFrameImpl):
2902         * inspector/InspectorInstrumentation.h:
2903         (WebCore::InspectorInstrumentation::didSendWebSocketFrame):
2904         * inspector/InspectorNetworkAgent.cpp:
2905         * inspector/InspectorNetworkAgent.h:
2906         * page/RuntimeEnabledFeatures.cpp:
2907         (WebCore::RuntimeEnabledFeatures::webSocketEnabled const):
2908         * page/RuntimeEnabledFeatures.h:
2909         * page/SocketProvider.cpp:
2910         * page/SocketProvider.h:
2911         * workers/WorkerGlobalScope.cpp:
2912         (WebCore::WorkerGlobalScope::WorkerGlobalScope):
2913         * workers/WorkerGlobalScope.h:
2914         * workers/WorkerMessagingProxy.cpp:
2915         (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
2916         * workers/WorkerThread.cpp:
2917         (WebCore::WorkerThread::WorkerThread):
2918         (WebCore::WorkerThread::socketProvider):
2919         * workers/WorkerThread.h:
2920
2921 2017-08-03  Don Olmstead  <don.olmstead@sony.com>
2922
2923         Remove LayoutUnit dependency in TextStream
2924         https://bugs.webkit.org/show_bug.cgi?id=175110
2925
2926         Reviewed by Zalan Bujtas.
2927
2928         No new tests. No change in behavior.
2929
2930         * CMakeLists.txt:
2931         * WebCore.xcodeproj/project.pbxproj:
2932         * platform/LayoutUnit.cpp: Added.
2933         (WebCore::operator<<):
2934         * platform/LayoutUnit.h:
2935         * platform/text/TextStream.cpp:
2936         * platform/text/TextStream.h:
2937
2938 2017-08-03  Jeremy Jones  <jeremyj@apple.com>
2939
2940         Improve WebKitLegacy video fullscreen animation begin and end rects.
2941         https://bugs.webkit.org/show_bug.cgi?id=175152
2942         rdar://problem/32840576
2943
2944         Reviewed by Eric Carlson.
2945
2946         No new tests, becuase this change has no effect on the DOM.
2947
2948         This change uses different rects for fullscreen animation to prevent the animation
2949         from failing, and to improve the aesthetics of the animation.
2950
2951         * platform/mac/WebVideoFullscreenController.mm:
2952         (frameExpandedToRatioOfFrame):
2953         (-[WebVideoFullscreenController enterFullscreen:]):
2954         (-[WebVideoFullscreenController exitFullscreen]):
2955         (-[WebVideoFullscreenWindow animateFromRect:toRect:withSubAnimation:controllerAction:]):
2956         (constrainFrameToRatioOfFrame): Deleted.
2957
2958 2017-08-03  Jer Noble  <jer.noble@apple.com>
2959
2960         [EME][Mac] SecureStop left on disk in Private Browsing mode.
2961         https://bugs.webkit.org/show_bug.cgi?id=175162
2962
2963         Reviewed by Eric Carlson.
2964
2965         Return an empty string from mediaKeysStorageDirectory() when the page indicates that storage should
2966         be ephemeral(). Previously, an empty string in this case would be treated as an error. Instead, treat
2967         an empty string as valid, and do not try to store or retrieve session information to disk in that case.
2968
2969         * Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp:
2970         (WebCore::WebKitMediaKeySession::mediaKeysStorageDirectory const):
2971         * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
2972         (WebCore::CDMSessionAVContentKeySession::releaseKeys):
2973         (WebCore::CDMSessionAVContentKeySession::update):
2974         (WebCore::CDMSessionAVContentKeySession::generateKeyReleaseMessage):
2975         (WebCore::CDMSessionAVContentKeySession::contentKeySession):
2976         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
2977         (WebCore::CDMSessionMediaSourceAVFObjC::storagePath const):
2978
2979 2017-08-03  Youenn Fablet  <youenn@apple.com>
2980
2981         [Fetch API] Add support for Request keepalive getter
2982         https://bugs.webkit.org/show_bug.cgi?id=175151
2983
2984         Reviewed by Chris Dumez.
2985
2986         Test: imported/w3c/web-platform-tests/fetch/api/request/request-keepalive.html
2987
2988         Adding keepalive as a fetch option.
2989         Adding initialization and getter of keepalive into FetchRequest.
2990
2991         * Modules/fetch/FetchRequest.cpp:
2992         (WebCore::buildOptions):
2993         * Modules/fetch/FetchRequest.h:
2994         * Modules/fetch/FetchRequest.idl:
2995         * loader/FetchOptions.h:
2996
2997 2017-08-03  Yoshiaki Jitsukawa  <jitsu@rd.scei.sony.co.jp>
2998
2999         [PAL] Move spi/cf directory into PAL
3000         https://bugs.webkit.org/show_bug.cgi?id=175057
3001
3002         Reviewed by Antti Koivisto.
3003
3004         * WebCore.xcodeproj/project.pbxproj:
3005         * loader/cocoa/DiskCacheMonitorCocoa.mm:
3006         * loader/cocoa/SubresourceLoaderCocoa.mm:
3007         * loader/mac/ResourceLoaderMac.mm:
3008         * platform/cf/CoreMediaSoftLink.cpp:
3009         * platform/cf/CoreMediaSoftLink.h:
3010         * platform/mac/PluginBlacklist.mm:
3011         * platform/mac/WebCoreNSStringExtras.mm:
3012         * platform/mac/WebGLBlacklist.mm:
3013         * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
3014         * platform/network/NetworkStorageSession.h:
3015         * platform/network/cf/CookieJarCFNet.cpp:
3016         * platform/network/cf/CredentialStorageCFNet.cpp:
3017         * platform/network/cf/ResourceHandleCFNet.cpp:
3018         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
3019         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
3020         * platform/network/cf/ResourceRequestCFNet.cpp:
3021         * platform/network/cf/ResourceRequestCFNet.h:
3022         * platform/network/cf/ResourceResponse.h:
3023         * platform/network/cf/ResourceResponseCFNet.cpp:
3024         * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
3025         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
3026         * platform/network/cocoa/CookieStorageObserver.h:
3027         * platform/network/cocoa/CredentialCocoa.h:
3028         * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
3029         * platform/network/cocoa/ResourceRequestCocoa.mm:
3030         * platform/network/cocoa/ResourceResponseCocoa.mm:
3031         * platform/network/ios/ResourceRequestIOS.mm:
3032         * platform/network/mac/CookieJarMac.mm:
3033         * platform/network/mac/FormDataStreamMac.mm:
3034         * platform/network/mac/ResourceHandleMac.mm:
3035         * platform/network/mac/ResourceRequestMac.mm:
3036         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
3037         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
3038         * platform/network/mac/WebCoreURLResponse.h:
3039         * testing/cocoa/WebArchiveDumpSupport.mm:
3040
3041 2017-08-03  Youenn Fablet  <youenn@apple.com>
3042
3043         Remove FETCH_API compilation guard
3044         https://bugs.webkit.org/show_bug.cgi?id=175154
3045
3046         Reviewed by Chris Dumez.
3047
3048         No change of behavior.
3049
3050         * Configurations/FeatureDefines.xcconfig:
3051         * Modules/fetch/DOMWindowFetch.cpp:
3052         * Modules/fetch/DOMWindowFetch.h:
3053         * Modules/fetch/DOMWindowFetch.idl:
3054         * Modules/fetch/FetchBody.cpp:
3055         * Modules/fetch/FetchBody.h:
3056         * Modules/fetch/FetchBody.idl:
3057         * Modules/fetch/FetchBodyConsumer.cpp:
3058         * Modules/fetch/FetchBodyConsumer.h:
3059         * Modules/fetch/FetchBodyOwner.cpp:
3060         * Modules/fetch/FetchBodyOwner.h:
3061         * Modules/fetch/FetchHeaders.cpp:
3062         * Modules/fetch/FetchHeaders.h:
3063         * Modules/fetch/FetchHeaders.idl:
3064         * Modules/fetch/FetchInternals.js:
3065         * Modules/fetch/FetchLoader.cpp:
3066         * Modules/fetch/FetchLoader.h:
3067         * Modules/fetch/FetchLoaderClient.h:
3068         * Modules/fetch/FetchRequest.cpp:
3069         * Modules/fetch/FetchRequest.h:
3070         * Modules/fetch/FetchRequest.idl:
3071         * Modules/fetch/FetchResponse.cpp:
3072         * Modules/fetch/FetchResponse.h:
3073         * Modules/fetch/FetchResponse.idl:
3074         * Modules/fetch/FetchResponse.js:
3075         * Modules/fetch/FetchResponseSource.cpp:
3076         * Modules/fetch/FetchResponseSource.h:
3077         * Modules/fetch/WorkerGlobalScopeFetch.cpp:
3078         * Modules/fetch/WorkerGlobalScopeFetch.h:
3079         * Modules/fetch/WorkerGlobalScopeFetch.idl:
3080         * page/RuntimeEnabledFeatures.h:
3081         (WebCore::RuntimeEnabledFeatures::fetchAPIEnabled const):
3082
3083 2017-08-03  Devin Rousso  <drousso@apple.com>
3084
3085         Web Inspector: add button to open Inspector^2
3086         https://bugs.webkit.org/show_bug.cgi?id=175108
3087
3088         Reviewed by Brian Burg.
3089
3090         This patch just exposes a function to the inspector page. No new functionality was added.
3091
3092         * inspector/InspectorFrontendHost.idl:
3093         * inspector/InspectorFrontendHost.h:
3094         * inspector/InspectorFrontendHost.cpp:
3095         (WebCore::InspectorFrontendHost::inspectInspector):
3096
3097 2017-08-03  Matt Baker  <mattbaker@apple.com>
3098
3099         Web Inspector: Instrument WebGLProgram created/deleted
3100         https://bugs.webkit.org/show_bug.cgi?id=175059
3101
3102         Reviewed by Devin Rousso.
3103
3104         Tests: inspector/canvas/shaderProgram-add-remove-webgl.html
3105                inspector/canvas/shaderProgram-add-remove-webgl2.html
3106
3107         This patch adds instrumentation to WebGLRenderingContextBase for tracking
3108         WebGLPrograms. A new helper class, InspectorShaderProgram, is used by
3109         the CanvasAgent to hold related data.
3110
3111         * CMakeLists.txt:
3112         * WebCore.xcodeproj/project.pbxproj:
3113
3114         * html/canvas/WebGLRenderingContextBase.cpp:
3115         (WebCore::WebGLRenderingContextBase::createProgram):
3116         (WebCore::WebGLRenderingContextBase::deleteProgram):
3117
3118         * inspector/InspectorCanvasAgent.cpp:
3119         (WebCore::InspectorCanvasAgent::enable):
3120         (WebCore::InspectorCanvasAgent::frameNavigated):
3121         (WebCore::InspectorCanvasAgent::didCreateProgram):
3122         (WebCore::InspectorCanvasAgent::willDeleteProgram):
3123         (WebCore::InspectorCanvasAgent::clearCanvasData):
3124         (WebCore::InspectorCanvasAgent::unbindCanvas):
3125         (WebCore::InspectorCanvasAgent::unbindProgram):
3126         (WebCore::InspectorCanvasAgent::assertInspectorProgram):
3127         (WebCore::InspectorCanvasAgent::findInspectorProgram):
3128         * inspector/InspectorCanvasAgent.h:
3129
3130         * inspector/InspectorInstrumentation.cpp:
3131         (WebCore::InspectorInstrumentation::didCreateCSSCanvasImpl):
3132         (WebCore::InspectorInstrumentation::didChangeCSSCanvasClientNodesImpl):
3133         (WebCore::InspectorInstrumentation::didCreateCanvasRenderingContextImpl):
3134         (WebCore::InspectorInstrumentation::didChangeCanvasMemoryImpl):
3135         (WebCore::InspectorInstrumentation::recordCanvasActionImpl):
3136         (WebCore::InspectorInstrumentation::didFinishRecordingCanvasFrameImpl):
3137         (WebCore::InspectorInstrumentation::didCreateProgramImpl):
3138         (WebCore::InspectorInstrumentation::willDeleteProgramImpl):
3139
3140         * inspector/InspectorInstrumentation.h:
3141         (WebCore::InspectorInstrumentation::recordCanvasActionImpl):
3142         (WebCore::InspectorInstrumentation::didCreateCSSCanvas):
3143         (WebCore::InspectorInstrumentation::didChangeCSSCanvasClientNodes):
3144         (WebCore::InspectorInstrumentation::didCreateCanvasRenderingContext):
3145         (WebCore::InspectorInstrumentation::didChangeCanvasMemory):
3146         (WebCore::InspectorInstrumentation::recordCanvasAction):
3147         (WebCore::InspectorInstrumentation::didFinishRecordingCanvasFrame):
3148         (WebCore::InspectorInstrumentation::didCreateProgram):
3149         (WebCore::InspectorInstrumentation::willDeleteProgram):
3150
3151         * inspector/InspectorShaderProgram.cpp: Added.
3152         (WebCore::InspectorShaderProgram::create):
3153         (WebCore::InspectorShaderProgram::InspectorShaderProgram):
3154         (WebCore::InspectorShaderProgram::context const):
3155         * inspector/InspectorShaderProgram.h: Added.
3156
3157 2017-08-03  Matt Lewis  <jlewis3@apple.com>
3158
3159         Unreviewed, rolling out r220209.
3160
3161         This caused internal build failures.
3162
3163         Reverted changeset:
3164
3165         "Use MPAVRoutingController instead of deprecated versions."
3166         https://bugs.webkit.org/show_bug.cgi?id=175063
3167         http://trac.webkit.org/changeset/220209
3168
3169 2017-08-03  Brady Eidson  <beidson@apple.com>
3170
3171         Add SW IDLs and stub out basic functionality.
3172         https://bugs.webkit.org/show_bug.cgi?id=175115
3173
3174         Reviewed by Chris Dumez.
3175
3176         No new tests (Currently no behavior change).
3177
3178         Overall note: This feature is EnabledAtRuntime as opposed to EnabledBySetting because
3179         the Settings-based code generation is completely broken for non-Document contexts,
3180         whereas the RuntimeEnabledFeatures-based generation is not.
3181     
3182         * CMakeLists.txt:
3183         * Configurations/FeatureDefines.xcconfig:
3184         * DerivedSources.make:
3185         * WebCore.xcodeproj/project.pbxproj:
3186
3187         * bindings/scripts/preprocess-idls.pl: Handle the new global scope c'tor file.
3188
3189         * bindings/js/JSServiceWorkerContainerCustom.cpp: Added.
3190         (WebCore::JSServiceWorkerContainer::ready const):
3191
3192         * bindings/js/JSWorkerGlobalScopeBase.cpp:
3193         (WebCore::toJSWorkerGlobalScope): Refactor to handle both types of derived workers.
3194         (WebCore::toJSServiceWorkerGlobalScope):
3195         * bindings/js/JSWorkerGlobalScopeBase.h:
3196
3197         * dom/EventNames.h:
3198         * dom/EventTargetFactory.in:
3199
3200         * features.json: Change status of feature.
3201
3202         * page/Navigator.idl:
3203         * page/NavigatorBase.cpp:
3204         (WebCore::NavigatorBase::serviceWorker):
3205         * page/NavigatorBase.h:
3206         * page/NavigatorServiceWorker.idl: Added.
3207
3208         * page/RuntimeEnabledFeatures.h:
3209         (WebCore::RuntimeEnabledFeatures::serviceWorkerEnabled const):
3210         (WebCore::RuntimeEnabledFeatures::setServiceWorkerEnabled):
3211
3212         * workers/ServiceWorker.cpp: Added.
3213         (WebCore::ServiceWorker::postMessage):
3214         (WebCore::ServiceWorker::~ServiceWorker):
3215         (WebCore::ServiceWorker::scriptURL const):
3216         (WebCore::ServiceWorker::state const):
3217         (WebCore::ServiceWorker::eventTargetInterface const):
3218         (WebCore::ServiceWorker::scriptExecutionContext const):
3219         * workers/ServiceWorker.h: Added.
3220         * workers/ServiceWorker.idl: Added.
3221
3222         * workers/ServiceWorkerContainer.cpp: Added.
3223         (WebCore::ServiceWorkerContainer::~ServiceWorkerContainer):
3224         (WebCore::ServiceWorkerContainer::controller const):
3225         (WebCore::ServiceWorkerContainer::ready):
3226         (WebCore::ServiceWorkerContainer::addRegistration):
3227         (WebCore::ServiceWorkerContainer::getRegistration):
3228         (WebCore::ServiceWorkerContainer::getRegistrations):
3229         (WebCore::ServiceWorkerContainer::startMessages):
3230         (WebCore::ServiceWorkerContainer::eventTargetInterface const):
3231         (WebCore::ServiceWorkerContainer::scriptExecutionContext const):
3232         * workers/ServiceWorkerContainer.h: Added.
3233         * workers/ServiceWorkerContainer.idl: Added.
3234
3235         * workers/ServiceWorkerGlobalScope.cpp: Added.
3236         (WebCore::ServiceWorkerGlobalScope::registration):
3237         (WebCore::ServiceWorkerGlobalScope::skipWaiting):
3238         * workers/ServiceWorkerGlobalScope.h: Added.
3239         * workers/ServiceWorkerGlobalScope.idl: Added.
3240
3241         * workers/ServiceWorkerRegistration.cpp: Added.
3242         (WebCore::ServiceWorkerRegistration::~ServiceWorkerRegistration):
3243         (WebCore::ServiceWorkerRegistration::installing):
3244         (WebCore::ServiceWorkerRegistration::waiting):
3245         (WebCore::ServiceWorkerRegistration::active):
3246         (WebCore::ServiceWorkerRegistration::scope const):
3247         (WebCore::ServiceWorkerRegistration::update):
3248         (WebCore::ServiceWorkerRegistration::unregister):
3249         (WebCore::ServiceWorkerRegistration::eventTargetInterface const):
3250         (WebCore::ServiceWorkerRegistration::scriptExecutionContext const):
3251         * workers/ServiceWorkerRegistration.h: Added.
3252         * workers/ServiceWorkerRegistration.idl: Added.
3253
3254 2017-08-03  Yoshiaki Jitsukawa  <jitsu@rd.scei.sony.co.jp>
3255
3256         [WebCore] Sort Xcode project files
3257         https://bugs.webkit.org/show_bug.cgi?id=175121
3258
3259         Reviewed by Antti Koivisto.
3260
3261         * WebCore.xcodeproj/project.pbxproj:
3262
3263 2017-08-02  Sam Weinig  <sam@webkit.org>
3264
3265         [WebIDL] Convert MutationCallback to be a normal generated callback
3266         https://bugs.webkit.org/show_bug.cgi?id=174140
3267
3268         Reviewed by Darin Adler.
3269
3270         To make this work more nicely, I:
3271         - Added the ability to for non-nullable interfaces in sequences to be passed
3272           via a Ref<> rather than a RefPtr<> as a parameter to a callback function.
3273           (e.g. callback MyCallback = void (sequence<Foo> foos) will now have the 
3274           signature, CallbackResult<void> handleEvent(const Vector<Ref<Foo>>&) rather
3275           than CallbackResult<void> handleEvent(const Vector<RefPtr<Foo>>&).
3276         - Added a new extended attribute for callback functions called [CallbackThisObject=Type]
3277           which allows you to specify that the callback needs a this object in addition
3278           to its arguments. When specified, the first argument of the C++ implementation
3279           function will now correspond to the this object, with the remaining arguments
3280           shifted over one.
3281         - Converted callback objects to all inherit directly from ActiveDOMCallback rather
3282           than having the generated JS callback derived class inherit from it. This allows
3283           us to have access to a callback's canInvokeCallback() function anywhere (needed
3284           for MutationCallback) as well as giving a place to put an optional virtual 
3285           visitJSFunction to allow marking weak callbacks (while not an ideal layering, 
3286           this matches what we do in EventListener). This change requires each callback to
3287           have a bit more code to import the ActiveDOMCallback's constructor and requires
3288           non-JS derived callbacks to pass a ScriptExecutionContext (e.g. the Document).
3289
3290         * CMakeLists.txt:
3291         * DerivedSources.make:
3292         * WebCore.xcodeproj/project.pbxproj:
3293         * bindings/js/JSMutationCallback.cpp: Removed.
3294         * bindings/js/JSMutationCallback.h: Removed.
3295         Remove custom JSMutationCallback.h/cpp
3296
3297         * Modules/geolocation/PositionCallback.h:
3298         * Modules/geolocation/PositionErrorCallback.h:
3299         * Modules/notifications/NotificationPermissionCallback.h:
3300         * Modules/webaudio/AudioBufferCallback.h:
3301         * Modules/webdatabase/DatabaseCallback.h:
3302         * Modules/webdatabase/SQLStatementCallback.h:
3303         * Modules/webdatabase/SQLStatementErrorCallback.h:
3304         * Modules/webdatabase/SQLTransactionCallback.h:
3305         * Modules/webdatabase/SQLTransactionErrorCallback.h:
3306         * css/MediaQueryListListener.h:
3307         * dom/NodeFilter.h:
3308         * dom/RequestAnimationFrameCallback.h:
3309         * dom/StringCallback.h:
3310         * fileapi/BlobCallback.h:
3311         * html/VoidCallback.h:
3312         * page/IntersectionObserverCallback.h:
3313         * page/PerformanceObserverCallback.h:
3314         Add ActiveDOMCallback as a base class. Import the ActiveDOMCallback constructor.
3315
3316         * Modules/mediastream/MediaDevicesRequest.cpp:
3317         (WebCore::MediaDevicesRequest::filterDeviceList):
3318         (WebCore::MediaDevicesRequest::start):
3319         * Modules/mediastream/MediaDevicesRequest.h:
3320         Change filterDeviceList to take a Vector of Refs.
3321
3322         * bindings/IDLTypes.h:
3323         Add InnerParameterType and NullableInnerParameterType type hooks
3324         and specialize wrappers to use Ref for InnerParameterType, and RefPtr
3325         for NullableInnerParameterType.
3326
3327         * bindings/js/JSCallbackData.cpp:
3328         * bindings/js/JSCallbackData.h:
3329         Add support for passing a this object and give JSCallbackDataWeak a visitJSFunction
3330         to allow marking the underlying function.
3331
3332         * bindings/js/JSMutationObserverCustom.cpp:
3333         (WebCore::JSMutationObserver::visitAdditionalChildren):
3334         (WebCore::constructJSMutationObserver): Deleted.
3335         Remove the custom constructor and replace it with a custom visitAdditionalChildren
3336         that calls the new ActiveDOMObject's visitJSFunction.
3337
3338         * bindings/scripts/CodeGenerator.pm:
3339         (ParseType):
3340         Add helper to parse a type and cache the result.
3341
3342         * bindings/scripts/CodeGeneratorJS.pm:
3343         (GenerateCallbackHeaderContent):
3344         (GenerateCallbackImplementationContent):
3345         (GetJSCallbackDataType): Deleted.
3346         - Add support for [CallbackThisObject]. When [CallbackThisObject] is not specified, use jsUndefined() 
3347           as the this object as specified by WebIDL.
3348         - Stop inheriting from ActiveDOMCallback now that callbacks need to do this themselves.
3349         - Add a visitJSFunction override for weak callback functions which calls into the callback data.
3350
3351         * bindings/scripts/IDLAttributes.json:
3352         Add [CallbackThisObject].
3353
3354         * bindings/scripts/IDLParser.pm:
3355         (ParseType):
3356         Add entry point to parse a single type.
3357
3358         * css/FontFaceSet.h:
3359         Use Ref rather than RefPtr for the faces sequence.
3360
3361         * dom/ActiveDOMCallback.h:
3362         (WebCore::ActiveDOMCallback::visitJSFunction):
3363         Add an optional visitJSFunction virtual function so that derived classes
3364         have a way of marking underlying function objects.
3365
3366         * dom/MutationCallback.h:
3367         Convert to support generation (return a CallbackResult, inherit from ActiveDOMObject).
3368
3369         * dom/MutationCallback.idl: Added.
3370         Added to generate the callback. Uses the new [CallbackThisObject].
3371
3372         * dom/MutationObserver.cpp:
3373         (WebCore::MutationObserver::deliver):
3374         Switch to call idiomatic handleEvent, and pass *this as the first parameter
3375         which will be translated into the this object.
3376
3377         * dom/MutationObserver.h:
3378         (WebCore::MutationObserver::callback):
3379         Expose the callback so it can marked during GC.
3380
3381         * dom/MutationObserver.idl:
3382         Remove CustomConstructor and replace it with a custom mark function.
3383
3384         * dom/NativeNodeFilter.cpp:
3385         * dom/NativeNodeFilter.h:
3386         * inspector/InspectorDatabaseAgent.cpp:
3387         Pass now needed ScriptExecutionContext to non-js based callbacks.
3388
3389         * bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
3390         * bindings/scripts/test/JS/JSTestCallbackFunctionRethrow.cpp:
3391         * bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.cpp: Added.
3392         * bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.h: Added.
3393         * bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp:
3394         * bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
3395         * bindings/scripts/test/JS/JSTestCallbackInterface.h:
3396         * bindings/scripts/test/JS/JSTestVoidCallbackFunction.cpp:
3397         * bindings/scripts/test/TestCallbackFunctionWithThisObject.idl: Added.
3398         * bindings/scripts/test/TestCallbackInterface.idl:
3399         Add/update tests.
3400
3401 2017-08-03  Jeremy Jones  <jeremyj@apple.com>
3402
3403         Use MPAVRoutingController instead of deprecated versions.
3404         https://bugs.webkit.org/show_bug.cgi?id=175063
3405
3406         Reviewed by Tim Horton.
3407
3408         No new tests because no behavior change. This uses a different platform class to present
3409         an interface.
3410
3411         Remove deprecated MPAudioVideoRoutingPopoverController and MPAVRoutingSheet
3412         Add MPMediaControlsViewController.
3413
3414         * platform/spi/ios/MediaPlayerSPI.h:
3415
3416 2017-08-03  Chris Dumez  <cdumez@apple.com>
3417
3418         Improve our support for referrer policies
3419         https://bugs.webkit.org/show_bug.cgi?id=175069
3420         <rdar://problem/33677313>
3421
3422         Reviewed by Darin Adler.
3423
3424         Improve our support for referrer policies. In particular, we now support the
3425         additional following ones: "same-origin", "origin-when-cross-origin" and
3426         "strict-origin-when-cross-origin".
3427
3428         This is as per the following specification:
3429         - https://www.w3.org/TR/referrer-policy/#referrer-policies
3430
3431         Also refactor the code a bit for clarity: I merged the ReferrerPolicy enum and the
3432         FetchOptions::ReferrerPolicy one.
3433
3434         Tests: http/tests/referrer-policy/origin-when-cross-origin/cross-origin-http-http.html
3435                http/tests/referrer-policy/origin-when-cross-origin/cross-origin-http.https.html
3436                http/tests/referrer-policy/origin-when-cross-origin/same-origin.html
3437                http/tests/referrer-policy/same-origin/cross-origin-http-http.html
3438                http/tests/referrer-policy/same-origin/cross-origin-http.https.html
3439                http/tests/referrer-policy/same-origin/same-origin.html
3440                http/tests/referrer-policy/strict-origin-when-cross-origin/cross-origin-http-http.html
3441                http/tests/referrer-policy/strict-origin-when-cross-origin/cross-origin-http.https.html
3442                http/tests/referrer-policy/strict-origin-when-cross-origin/same-origin.html
3443                http/tests/referrer-policy/strict-origin/cross-origin-http-http.html
3444                http/tests/referrer-policy/strict-origin/cross-origin-http.https.html
3445                http/tests/referrer-policy/strict-origin/same-origin.html
3446
3447         * Modules/fetch/FetchLoader.cpp: