6e19e838860983e2c554c994fd850d3f5beaf98d
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2018-01-05  Fujii Hironori  <Hironori.Fujii@sony.com>
2
3         [Cairo] Canvas: Path::clear should clear its transform
4         https://bugs.webkit.org/show_bug.cgi?id=181320
5
6         Reviewed by Carlos Garcia Campos.
7
8         Path of Cairo port has its cairo context. Path::clear() didn't
9         clear the transform matrix of the context.
10
11         Test: fast/canvas/reset-scaling-by-height-change.html
12
13         * platform/graphics/cairo/PathCairo.cpp:
14         (WebCore::Path::clear): Reset the transform matrix of Path.
15
16 2018-01-04  Devin Rousso  <webkit@devinrousso.com>
17
18         Web Inspector: replace HTMLCanvasElement with CanvasRenderingContext for instrumentation logic
19         https://bugs.webkit.org/show_bug.cgi?id=180770
20
21         Reviewed by Joseph Pecoraro.
22
23         No change in functionality.
24
25         * html/HTMLCanvasElement.h:
26         * html/HTMLCanvasElement.cpp:
27         (WebCore::HTMLCanvasElement::createContext2d):
28         (WebCore::HTMLCanvasElement::createContextWebGL):
29         (WebCore::HTMLCanvasElement::createContextWebGPU):
30         (WebCore::HTMLCanvasElement::createContextBitmapRenderer):
31         (WebCore::HTMLCanvasElement::reset):
32         (WebCore::HTMLCanvasElement::paint):
33         (WebCore::HTMLCanvasElement::setImageBuffer const):
34         (WebCore::HTMLCanvasElement::addObserver): Deleted.
35         (WebCore::HTMLCanvasElement::removeObserver): Deleted.
36         (WebCore::HTMLCanvasElement::cssCanvasClients): Deleted.
37         (WebCore::HTMLCanvasElement::notifyObserversCanvasChanged): Deleted.
38         * html/OffscreenCanvas.h:
39         * html/canvas/CanvasRenderingContext.h:
40         * html/canvas/CanvasRenderingContext.cpp:
41         * html/canvas/CanvasRenderingContext2D.h:
42         * html/canvas/CanvasRenderingContext2D.cpp:
43         (WebCore::CanvasRenderingContext2D::create):
44         * html/canvas/CanvasRenderingContext2DBase.h:
45         * html/canvas/ImageBitmapRenderingContext.h:
46         * html/canvas/ImageBitmapRenderingContext.cpp:
47         (WebCore::ImageBitmapRenderingContext::create):
48         * html/canvas/WebGL2RenderingContext.h:
49         * html/canvas/WebGL2RenderingContext.cpp:
50         (WebCore::WebGL2RenderingContext::create):
51         * html/canvas/WebGLRenderingContext.h:
52         * html/canvas/WebGLRenderingContext.cpp:
53         (WebCore::WebGLRenderingContext::create):
54         * html/canvas/WebGLRenderingContextBase.h:
55         * html/canvas/WebGLRenderingContextBase.cpp:
56         (WebCore::WebGLRenderingContextBase::create):
57         * html/canvas/WebGPURenderingContext.cpp:
58         (WebCore::WebGPURenderingContext::create):
59         Instead of adding didCreateCanvasRenderingContext calls at the construction sites of each
60         context, we can make the constructors private and force the usage of static `create` functions.
61         This way, we have access to the fully constructed object and have a guaranteed path for creation.
62
63         * html/CanvasBase.h:
64         * html/CanvasBase.cpp:
65         (WebCore::CanvasBase::~CanvasBase):
66         (WebCore::CanvasBase::renderingContext const):
67         (WebCore::CanvasBase::addObserver):
68         (WebCore::CanvasBase::removeObserver):
69         (WebCore::CanvasBase::notifyObserversCanvasChanged):
70         (WebCore::CanvasBase::notifyObserversCanvasResized):
71         (WebCore::CanvasBase::notifyObserversCanvasDestroyed):
72         (WebCore::CanvasBase::cssCanvasClients const):
73         * Modules/mediastream/CanvasCaptureMediaStreamTrack.h:
74         * Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:
75         (WebCore::CanvasCaptureMediaStreamTrack::Source::canvasDestroyed):
76         (WebCore::CanvasCaptureMediaStreamTrack::Source::canvasResized):
77         (WebCore::CanvasCaptureMediaStreamTrack::Source::canvasChanged):
78         * css/CSSCanvasValue.h:
79         Move the CanvasObserver class to CanvasBase so that it can also be used for OffscreenCanvas.
80
81         * inspector/InspectorInstrumentation.h:
82         (WebCore::InspectorInstrumentation::didChangeCSSCanvasClientNodes):
83         (WebCore::InspectorInstrumentation::didCreateCanvasRenderingContext):
84         (WebCore::InspectorInstrumentation::didChangeCanvasMemory):
85         (WebCore::InspectorInstrumentation::recordCanvasAction):
86         (WebCore::InspectorInstrumentation::didFinishRecordingCanvasFrame):
87         (WebCore::InspectorInstrumentation::didEnableExtension):
88         (WebCore::InspectorInstrumentation::didCreateProgram):
89         (WebCore::InspectorInstrumentation::willDeleteProgram):
90         (WebCore::InspectorInstrumentation::isShaderProgramDisabled):
91         (WebCore::InspectorInstrumentation::consoleStartRecordingCanvas):
92         (WebCore::InspectorInstrumentation::didCreateCSSCanvas): Deleted.
93         * inspector/InspectorInstrumentation.cpp:
94         (WebCore::InspectorInstrumentation::consoleStartRecordingCanvasImpl):
95         (WebCore::InspectorInstrumentation::didChangeCSSCanvasClientNodesImpl):
96         (WebCore::InspectorInstrumentation::didCreateCanvasRenderingContextImpl):
97         (WebCore::InspectorInstrumentation::didChangeCanvasMemoryImpl):
98         (WebCore::InspectorInstrumentation::didFinishRecordingCanvasFrameImpl):
99         (WebCore::InspectorInstrumentation::didEnableExtensionImpl):
100         (WebCore::InspectorInstrumentation::didCreateProgramImpl):
101         (WebCore::InspectorInstrumentation::didCreateCSSCanvasImpl): Deleted.
102
103         * inspector/agents/InspectorCanvasAgent.h:
104         * inspector/agents/InspectorCanvasAgent.cpp:
105         (WebCore::InspectorCanvasAgent::enable):
106         (WebCore::InspectorCanvasAgent::requestNode):
107         (WebCore::InspectorCanvasAgent::requestContent):
108         (WebCore::InspectorCanvasAgent::requestCSSCanvasClientNodes):
109         (WebCore::contextAsScriptValue):
110         (WebCore::InspectorCanvasAgent::resolveCanvasContext):
111         (WebCore::InspectorCanvasAgent::startRecording):
112         (WebCore::InspectorCanvasAgent::stopRecording):
113         (WebCore::InspectorCanvasAgent::updateShader):
114         (WebCore::InspectorCanvasAgent::frameNavigated):
115         (WebCore::InspectorCanvasAgent::didChangeCSSCanvasClientNodes):
116         (WebCore::InspectorCanvasAgent::didCreateCanvasRenderingContext):
117         (WebCore::InspectorCanvasAgent::didChangeCanvasMemory):
118         (WebCore::InspectorCanvasAgent::recordCanvasAction):
119         (WebCore::InspectorCanvasAgent::canvasDestroyed):
120         (WebCore::InspectorCanvasAgent::didFinishRecordingCanvasFrame):
121         (WebCore::InspectorCanvasAgent::consoleStartRecordingCanvas):
122         (WebCore::InspectorCanvasAgent::didEnableExtension):
123         (WebCore::InspectorCanvasAgent::didCreateProgram):
124         (WebCore::InspectorCanvasAgent::canvasRecordingTimerFired):
125         (WebCore::InspectorCanvasAgent::clearCanvasData):
126         (WebCore::InspectorCanvasAgent::unbindCanvas):
127         (WebCore::InspectorCanvasAgent::findInspectorCanvas):
128         (WebCore::InspectorCanvasAgent::unbindProgram):
129         (WebCore::InspectorCanvasAgent::didCreateCSSCanvas): Deleted.
130
131         * inspector/InspectorCanvas.h:
132         * inspector/InspectorCanvas.cpp:
133         (WebCore::InspectorCanvas::create):
134         (WebCore::InspectorCanvas::InspectorCanvas):
135         (WebCore::InspectorCanvas::canvasElement):
136         (WebCore::InspectorCanvas::resetRecordingData):
137         (WebCore::InspectorCanvas::recordAction):
138         (WebCore::InspectorCanvas::buildObjectForCanvas):
139         (WebCore::InspectorCanvas::getCanvasContentAsDataURL):
140         (WebCore::InspectorCanvas::buildInitialState):
141         (WebCore::InspectorCanvas::~InspectorCanvas): Deleted.
142
143         * inspector/InspectorShaderProgram.h:
144         * inspector/InspectorShaderProgram.cpp:
145         (WebCore::InspectorShaderProgram::context const):
146
147         * page/PageConsoleClient.cpp:
148         (WebCore::PageConsoleClient::record):
149         (WebCore::PageConsoleClient::recordEnd):
150
151         * dom/Document.h:
152         * dom/Document.cpp:
153         (WebCore::Document::getCSSCanvasElement):
154         (WebCore::Document::nameForCSSCanvasElement const):
155         We have no reason to save the CSS canvas name for each InspectorCanvas object, so instead we
156         can just query for the name based on the CanvasRenderingContext's HTMLCanvasElement (assuming
157         it is not an OffscreenCanvas) when we need it.
158
159 2018-01-04  Chris Fleizach  <cfleizach@apple.com>
160
161         AX: Implement updated CSS3 Speech for 'speak' and 'speak-as' properties
162         https://bugs.webkit.org/show_bug.cgi?id=180361
163
164         Reviewed by Zalan Bujtas.
165
166         Change speak -> speakAs, and allow a combination of properties.
167
168         Tests: Updated accessibility/mac/css-speech-speak.html
169
170         * accessibility/AccessibilityObject.h:
171         (WebCore::AccessibilityObject::speakAsProperty const):
172         (WebCore::AccessibilityObject::speakProperty const): Deleted.
173         * accessibility/AccessibilityRenderObject.cpp:
174         (WebCore::AccessibilityRenderObject::speakAsProperty const):
175         (WebCore::AccessibilityRenderObject::speakProperty const): Deleted.
176         * accessibility/AccessibilityRenderObject.h:
177         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
178         (-[WebAccessibilityObjectWrapper accessibilitySpeechHint]):
179         * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
180         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
181         (-[WebAccessibilityObjectWrapperBase baseAccessibilitySpeechHint]):
182         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
183         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
184         * css/CSSComputedStyleDeclaration.cpp:
185         (WebCore::speakAsToCSSValue):
186         (WebCore::ComputedStyleExtractor::propertyValue):
187         * css/CSSPrimitiveValueMappings.h:
188         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
189         (WebCore::CSSPrimitiveValue::operator ESpeakAs const):
190         (WebCore::CSSPrimitiveValue::operator ESpeak const): Deleted.
191         * css/CSSProperties.json:
192         * css/StyleBuilderConverter.h:
193         (WebCore::StyleBuilderConverter::convertSpeakAs):
194         * css/parser/CSSParserFastPaths.cpp:
195         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
196         (WebCore::CSSParserFastPaths::isKeywordPropertyID):
197         * css/parser/CSSPropertyParser.cpp:
198         (WebCore::consumeSpeakAs):
199         (WebCore::CSSPropertyParser::parseSingleValue):
200         * rendering/style/RenderStyle.h:
201         (WebCore::RenderStyle::speakAs const):
202         (WebCore::RenderStyle::setSpeakAs):
203         (WebCore::RenderStyle::initialSpeakAs):
204         (WebCore::RenderStyle::speak const): Deleted.
205         (WebCore::RenderStyle::setSpeak): Deleted.
206         (WebCore::RenderStyle::initialSpeak): Deleted.
207         * rendering/style/RenderStyleConstants.h:
208         (WebCore::operator| ):
209         (WebCore::operator|= ):
210         * rendering/style/StyleRareInheritedData.cpp:
211         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
212         (WebCore::StyleRareInheritedData::operator== const):
213         * rendering/style/StyleRareInheritedData.h:
214
215 2018-01-04  Brian Burg  <bburg@apple.com>
216
217         Web Inspector: Capture Element Screenshot looks fuzzy
218         https://bugs.webkit.org/show_bug.cgi?id=175734
219         <rdar://problem/33803377>
220
221         Reviewed by Joseph Pecoraro and Simon Fraser.
222
223         Screenshots taken by Web Inspector were being downscaled from the
224         internal size to the logical size, causing them to be blurry when
225         later upscaled to the internal size.
226
227         Replace ScaleBehavior { Scaled, Unscaled } with PreserveResolution { No, Yes }.
228         This is a lot less confusing to read both inside ImageBuffer and at its use sites.
229
230         Remove unused CoordinateSystem argument for ImageBuffer::toDataURL,
231         and replace it with PreserveResolution. Plumb PreserveResolution into toCFData
232         so that PreserveResolution::Yes will preserve the internal size of
233         the image buffer, just as it does in other methods that take PreserveResolution.
234
235         At the use site in InspectorPageAgent, always request PreserveResolution::Yes snapshots
236         when taking an element screenshot. For now, keep using downscaled (smaller)
237         snapshots when capturing canvas previews, as the previews are not full-size.
238
239         Test: inspector/page/hidpi-snapshot-size.html
240
241         * html/HTMLCanvasElement.cpp:
242         (WebCore::HTMLCanvasElement::makePresentationCopy):
243         (WebCore::HTMLCanvasElement::copiedImage const):
244         * html/canvas/CanvasRenderingContext2DBase.cpp:
245         (WebCore::CanvasRenderingContext2DBase::createPattern):
246         * inspector/agents/InspectorPageAgent.cpp:
247         (WebCore::InspectorPageAgent::snapshotNode):
248         (WebCore::InspectorPageAgent::snapshotRect):
249         * page/TextIndicator.cpp:
250         (WebCore::takeSnapshot):
251         * platform/DragImage.cpp:
252         (WebCore::createDragImageFromSnapshot):
253         * platform/graphics/BitmapImage.cpp:
254         (WebCore::BitmapImage::drawPattern):
255         * platform/graphics/ImageBuffer.h:
256         * platform/graphics/cairo/ImageBufferCairo.cpp:
257         (WebCore::ImageBuffer::sinkIntoImage):
258         (WebCore::ImageBuffer::copyImage const):
259         (WebCore::ImageBuffer::toDataURL const):
260         * platform/graphics/cg/ImageBufferCG.cpp:
261         (WebCore::createBitmapImageAfterScalingIfNeeded):
262         (WebCore::ImageBuffer::copyImage const):
263         (WebCore::ImageBuffer::sinkIntoImage):
264         (WebCore::ImageBuffer::toDataURL const):
265         (WebCore::ImageBuffer::toData const):
266         (WebCore::ImageBuffer::toCFData const):
267         * platform/graphics/gtk/ImageBufferGtk.cpp:
268         (WebCore::ImageBuffer::toDataURL const):
269         * platform/graphics/win/ImageBufferDirect2D.cpp:
270         (WebCore::ImageBuffer::copyImage const):
271         (WebCore::ImageBuffer::sinkIntoImage):
272         (WebCore::ImageBuffer::toDataURL const):
273         * svg/graphics/SVGImage.cpp:
274         (WebCore::SVGImage::drawPatternForContainer):
275
276 2018-01-04  John Wilander  <wilander@apple.com>
277
278         Storage Access API: Turn feature on by default in Settings.yaml
279         https://bugs.webkit.org/show_bug.cgi?id=181298
280         <rdar://problem/36302506>
281
282         Reviewed by Brent Fulgham.
283
284         No new tests. This is just a feature settings change.
285
286         * page/Settings.yaml:
287
288 2018-01-04  Zalan Bujtas  <zalan@apple.com>
289
290         WebContent process crashes while loading https://www.classicspecs.com
291         https://bugs.webkit.org/show_bug.cgi?id=181290
292         <rdar://problem/36225906>
293
294         Reviewed by Simon Fraser.
295
296         Floats can overhang multiple blocks (they are called intruding floats).
297         Each block keeps track of such intruding floats. When an overhanging float box is destroyed,
298         we need to deregister it from all those blocks. We do it by walking up the ancestor block chain
299         and check if the parent (grandparent etc) block still contains this float. Once we find the topmost block, 
300         we start deregistering it by traversing back on the descendant blocks.
301         Normally we do it in RenderElement::takeChildInternal right before the box is getting detached.
302         However in certain cases (like when the float's parent happens to be an anonymous wrapper)
303         by the time we get to ::takeChildInternal the subtree is already detached and we can't access all the
304         ancestors.
305         This patch ensure that the floating box is still attached during de-registration. 
306
307         Test: fast/block/float/crash-when-intruding-float-has-anonymous-parent-and-detach.html
308
309         * rendering/RenderObject.cpp:
310         (WebCore::RenderObject::removeFromParentAndDestroyCleaningUpAnonymousWrappers):
311
312 2018-01-04  Eric Carlson  <eric.carlson@apple.com>
313
314         [MediaStream] Add Mock screen capture source
315         https://bugs.webkit.org/show_bug.cgi?id=181291
316         <rdar://problem/36298164>
317
318         Reviewed by Dean Jackson.
319
320         Tests:  http/tests/media/media-stream/get-display-media-prompt.html
321                 GetDisplayMediaTest.BasicPrompt
322                 GetDisplayMediaTest.Constraints
323
324         * Modules/mediastream/MediaDevices.cpp:
325         (WebCore::MediaDevices::MediaDevices): Add static_assert to ensure MediaDevices::DisplayCaptureSurfaceType
326         and RealtimeMediaSourceSettings::DisplaySurfaceType values are equivalent.
327         (WebCore::MediaDevices::getSupportedConstraints): Remove bogus code.
328         * Modules/mediastream/MediaDevices.h: Add DisplayCaptureSurfaceType.
329         * Modules/mediastream/MediaDevices.idl: Ditto.
330
331         * Modules/mediastream/MediaStreamTrack.cpp:
332         (WebCore::MediaStreamTrack::getSettings const): Add a FIXME.
333         * Modules/mediastream/MediaStreamTrack.h: Add displaySurface and logicalSurface.
334
335         * Modules/mediastream/MediaTrackSupportedConstraints.h: Remove displaySurface and logicalSurface.
336         * Modules/mediastream/MediaTrackSupportedConstraints.idl:
337
338         * SourcesCocoa.txt: Add DisplayCaptureManagerCocoa.cpp and DisplayCaptureSourceCocoa.cpp.
339
340         * WebCore.xcodeproj/project.pbxproj: Ditto.
341
342         * platform/mediastream/CaptureDevice.h:
343         (WebCore::CaptureDevice::encode const): Add.
344         (WebCore::CaptureDevice::decode):
345
346         * platform/mediastream/RealtimeMediaSourceCenter.cpp:
347         (WebCore::RealtimeMediaSourceCenter::getMediaStreamDevices): Include display capture "devices".
348         (WebCore::RealtimeMediaSourceCenter::validateRequestConstraints): Deal with display capture devices.
349         (WebCore::RealtimeMediaSourceCenter::captureDeviceWithPersistentID): Ditto.
350         * platform/mediastream/RealtimeMediaSourceCenter.h:
351
352         * platform/mediastream/RealtimeMediaSourceSettings.h:
353         (WebCore::RealtimeMediaSourceSettings::displaySurface const): Return a DisplaySurfaceType.
354         (WebCore::RealtimeMediaSourceSettings::setDisplaySurface): Take a DisplaySurfaceType.
355
356         * platform/mediastream/mac/DisplayCaptureManagerCocoa.cpp:
357         (WebCore::DisplayCaptureManagerCocoa::singleton):
358         (WebCore::DisplayCaptureManagerCocoa::~DisplayCaptureManagerCocoa):
359         (WebCore::DisplayCaptureManagerCocoa::captureDevices):
360         (WebCore::DisplayCaptureManagerCocoa::screenCaptureDeviceWithPersistentID):
361         (WebCore::DisplayCaptureManagerCocoa::captureDeviceWithPersistentID):
362         * platform/mediastream/mac/DisplayCaptureManagerCocoa.h:
363
364         * platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp: Added.
365         (WebCore::DisplayCaptureSourceCocoa::DisplayCaptureSourceCocoa):
366         (WebCore::DisplayCaptureSourceCocoa::~DisplayCaptureSourceCocoa):
367         (WebCore::DisplayCaptureSourceCocoa::capabilities const):
368         (WebCore::DisplayCaptureSourceCocoa::settings const):
369         (WebCore::DisplayCaptureSourceCocoa::settingsDidChange):
370         (WebCore::DisplayCaptureSourceCocoa::startProducingData):
371         (WebCore::DisplayCaptureSourceCocoa::stopProducingData):
372         (WebCore::DisplayCaptureSourceCocoa::elapsedTime):
373         (WebCore::DisplayCaptureSourceCocoa::applyFrameRate):
374         (WebCore::DisplayCaptureSourceCocoa::emitFrame):
375         * platform/mediastream/mac/DisplayCaptureSourceCocoa.h:
376
377         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
378         (WebCore::RealtimeMediaSourceCenterMac::displayCaptureDeviceManager): New.
379         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.h:
380
381         * platform/mock/MockRealtimeMediaSource.cpp:
382         (WebCore::deviceMap): Add screen capture "devices".
383         (WebCore::MockRealtimeMediaSource::displayDevices): New.
384         * platform/mock/MockRealtimeMediaSource.h:
385
386         * platform/mock/MockRealtimeMediaSourceCenter.cpp: Clean up includes.
387         * platform/mock/MockRealtimeMediaSourceCenter.h:
388
389         * platform/mock/MockRealtimeVideoSource.cpp:
390         (WebCore::MockRealtimeVideoSource::MockRealtimeVideoSource): Mock two screen devices.
391         (WebCore::MockRealtimeVideoSource::updateSettings): Deal with mock screens.
392         (WebCore::MockRealtimeVideoSource::initializeCapabilities): Ditto.
393         (WebCore::MockRealtimeVideoSource::initializeSupportedConstraints): Ditto.
394         (WebCore::MockRealtimeVideoSource::drawText): Ditto.
395         (WebCore::MockRealtimeVideoSource::generateFrame): Ditto.
396         * platform/mock/MockRealtimeVideoSource.h:
397         (WebCore::MockRealtimeVideoSource::mockCamera const):
398         (WebCore::MockRealtimeVideoSource::mockScreen const):
399
400 2018-01-04  Youenn Fablet  <youenn@apple.com>
401
402         FetchResponse should set its internal response text encoding name
403         https://bugs.webkit.org/show_bug.cgi?id=181284
404
405         Reviewed by Alex Christensen.
406
407         Covered by rebased test.
408
409         * Modules/fetch/FetchResponse.cpp:
410         (WebCore::FetchResponse::create): Set response text encoding based on content type charset.
411
412 2018-01-04  John Wilander  <wilander@apple.com>
413
414         Storage Access API: Remove JavaScript confirm() prompt from Document::requestStorageAccess()
415         https://bugs.webkit.org/show_bug.cgi?id=181276
416         <rdar://problem/36290463>
417
418         Reviewed by Alex Christensen.
419
420         No new tests. Existing test expectations updated.
421
422         * dom/Document.cpp:
423         (WebCore::Document::requestStorageAccess):
424
425 2018-01-04  Carlos Garcia Campos  <cgarcia@igalia.com>
426
427         [GTK] Issues with Ahem's ex / x-height
428         https://bugs.webkit.org/show_bug.cgi?id=180581
429
430         Reviewed by Michael Catanzaro.
431
432         Get the x-height value from the TT_OS2 table if available.
433
434         Fixes: fast/text/break-word-pre-wrap.html
435                imported/w3c/web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-shape-arguments-000.html
436
437         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
438         (WebCore::Font::platformInit):
439
440 2018-01-04  Philippe Normand  <pnormand@igalia.com>
441
442         Unreviewed, GTK build fix attempt after r226357
443
444         * platform/graphics/gstreamer/GStreamerUtilities.h: The
445         GST_BUFFER_DTS_OR_PTS macro was added in GStreamer 1.8 but old
446         versions of Debian might not have this release yet.
447
448 2018-01-04  Youenn Fablet  <youenn@apple.com>
449
450         Implement Cache API partitioning based on ClientOrigin
451         https://bugs.webkit.org/show_bug.cgi?id=181240
452
453         Reviewed by Alex Christensen.
454
455         Covered by updated tests.
456
457         Previously, cache storage was partitioned according the origin of the client, represented as a String.
458         We now partition according both client and top origins, represented as a ClientOrigin
459
460         Minor refactoring to use more makePendingActivity.
461         Added support for IPC serialization of ClientOrigin.
462         Added SecurityOriginData::toString which is used by WebKit2 Cache Storage implementation.
463
464         * Modules/cache/CacheStorageConnection.cpp:
465         (WebCore::CacheStorageConnection::open):
466         (WebCore::CacheStorageConnection::retrieveCaches):
467         * Modules/cache/CacheStorageConnection.h:
468         (WebCore::CacheStorageConnection::clearMemoryRepresentation):
469         (WebCore::CacheStorageConnection::doOpen):
470         (WebCore::CacheStorageConnection::doRetrieveCaches):
471         * Modules/cache/DOMCacheStorage.cpp:
472         (WebCore::DOMCacheStorage::origin const):
473         (WebCore::DOMCacheStorage::retrieveCaches):
474         (WebCore::DOMCacheStorage::open):
475         (WebCore::DOMCacheStorage::remove):
476         * Modules/cache/DOMCacheStorage.h:
477         * Modules/cache/WorkerCacheStorageConnection.cpp:
478         (WebCore::WorkerCacheStorageConnection::doOpen):
479         (WebCore::WorkerCacheStorageConnection::doRetrieveCaches):
480         * Modules/cache/WorkerCacheStorageConnection.h:
481         * page/ClientOrigin.h:
482         (WebCore::ClientOrigin::isolatedCopy const):
483         (WebCore::ClientOrigin::encode const):
484         (WebCore::ClientOrigin::decode):
485         * page/SecurityOriginData.cpp:
486         (WebCore::SecurityOriginData::toString const):
487         (WebCore::SecurityOriginData::debugString const): Deleted.
488         * page/SecurityOriginData.h:
489         (WebCore::SecurityOriginData::debugString const):
490         * testing/Internals.cpp:
491         (WebCore::Internals::clearCacheStorageMemoryRepresentation):
492
493 2018-01-04  Youenn Fablet  <youenn@apple.com>
494
495         Service Worker should expose redirect mode for navigation loads as manual
496         https://bugs.webkit.org/show_bug.cgi?id=181067
497
498         Reviewed by Alex Christensen.
499
500         Covered by rebased tests.
501
502         * loader/CrossOriginAccessControl.cpp: Removing ContentType header only if affecting CORS checks.
503         This allows extending header filtering in service worker to all modes, including Navigate.
504         * workers/service/context/ServiceWorkerFetch.cpp:
505         (WebCore::ServiceWorkerFetch::dispatchFetchEvent): Ideally, document loading code should set redirect to manual.
506         Since it is not the case yet and that would require changes to various places, manual is set before exposing the corresponding fetch event.
507
508 2018-01-04  Youenn Fablet  <youenn@apple.com>
509
510         ServiceWorkerThreadProxy::postTaskForModeToWorkerGlobalScope should be a no-op if worker is being terminated
511         https://bugs.webkit.org/show_bug.cgi?id=181245
512
513         Reviewed by Alex Christensen.
514
515         Stop appending tasks to a terminating worker and returning false in that case.
516         This mirrors what is done for regular workers.
517
518         * workers/service/context/SWContextManager.cpp:
519         (WebCore::SWContextManager::terminateWorker):
520         * workers/service/context/ServiceWorkerThreadProxy.cpp:
521         (WebCore::ServiceWorkerThreadProxy::postTaskForModeToWorkerGlobalScope):
522         * workers/service/context/ServiceWorkerThreadProxy.h:
523
524 2018-01-04  Youenn Fablet  <youenn@apple.com>
525
526         Cancel pending script loads when service worker is being terminated
527         https://bugs.webkit.org/show_bug.cgi?id=181250
528
529         Reviewed by Alex Christensen.
530
531         Covered by service worker tests no longer crashing in ASAN builds.
532
533         * workers/WorkerScriptLoader.cpp:
534         (WebCore::WorkerScriptLoader::notifyFinished): Clearing loader when finished.
535         (WebCore::WorkerScriptLoader::cancel): Implementing cancel of a script loader by cancelling the underlying threadable loader.
536         * workers/WorkerScriptLoader.h:
537         * workers/service/ServiceWorkerContainer.cpp: Canceling loads of all pending jobs.
538         (WebCore::ServiceWorkerContainer::stop):
539         * workers/service/ServiceWorkerJob.cpp:
540         (WebCore::ServiceWorkerJob::cancelPendingLoad):
541         * workers/service/ServiceWorkerJob.h:
542
543 2018-01-04  Youenn Fablet  <youenn@apple.com>
544
545         Implement  https://fetch.spec.whatwg.org/#main-fetch default referrer policy setting
546         https://bugs.webkit.org/show_bug.cgi?id=181239
547
548         Reviewed by Alex Christensen.
549
550         Covered by updated and rebased test.
551
552         Setting the request referrer policy to the Document referrer policy if no one is set.
553         If Document has no referrer policy, use no-referrer-when-downgrade as per the spec.
554
555         * loader/cache/CachedResourceLoader.cpp:
556         (WebCore::CachedResourceLoader::updateHTTPRequestHeaders):
557         (WebCore::CachedResourceLoader::requestResource):
558         * loader/cache/CachedResourceLoader.h:
559         * loader/cache/CachedResourceRequest.cpp:
560         (WebCore::CachedResourceRequest::updateReferrerPolicy):
561         (WebCore::CachedResourceRequest::updateReferrerOriginAndUserAgentHeaders):
562         * loader/cache/CachedResourceRequest.h:
563
564 2018-01-03  Wenson Hsieh  <wenson_hsieh@apple.com>
565
566         [Attachment Support] Create attachment elements when dropping files on iOS
567         https://bugs.webkit.org/show_bug.cgi?id=181192
568         <rdar://problem/36280945>
569
570         Reviewed by Tim Horton.
571
572         Implements support for dropping data as attachment elements on iOS. See comments below for more detail.
573
574         Tests:  WKAttachmentTests.InsertDroppedRichAndPlainTextFilesAsAttachments
575                 WKAttachmentTests.InsertDroppedZipArchiveAsAttachment
576                 WKAttachmentTests.InsertDroppedItemProvidersInOrder
577
578         * WebCore.xcodeproj/project.pbxproj:
579         * editing/WebContentReader.cpp:
580         (WebCore::WebContentReader::ensureFragment):
581
582         Add a new helper to create the WebContentReader's fragment, if it hasn't already been created.
583
584         * editing/WebContentReader.h:
585         * editing/cocoa/WebContentReaderCocoa.mm:
586         (WebCore::WebContentReader::readFilePaths):
587
588         Rename readFilenames to readFilePaths (which better reflects its parameters, which are file paths). Also, move
589         the implementation of readFilePaths to shared iOS/macOS code in WebContentReaderCocoa, and remove the stub
590         implementation on iOS.
591
592         There's a bit of code here that I kept macOS-only which deals with inserting file paths as plain text in
593         editable areas, but it's unclear to me why and if WebKit clients currently find this useful, so I left a FIXME
594         to investigate removing this altogether. Code for handling this plain text insertion of file paths on Mac was
595         introduced in r67403.
596
597         * editing/ios/WebContentReaderIOS.mm:
598         (WebCore::WebContentReader::readFilenames): Deleted.
599         * editing/mac/WebContentReaderMac.mm:
600         (WebCore::WebContentReader::readFilenames): Deleted.
601         * page/mac/DragControllerMac.mm:
602         (WebCore::DragController::updateSupportedTypeIdentifiersForDragHandlingMethod const):
603
604         Teach DragController to accept all types conforming to "public.item" and "public.content" on iOS, only when
605         attachment elements are enabled. This allows us to load content from item providers that we otherwise would not
606         have loaded, since we now have the ability to fall back to attachment element insertion if the type is not have
607         a default representation using standard web content.
608
609         * platform/Pasteboard.h:
610         * platform/PasteboardItemInfo.h: Added.
611         (WebCore::PasteboardItemInfo::encode const):
612         (WebCore::PasteboardItemInfo::decode):
613
614         Add PasteboardItemInfo, a struct that describes an item on the pasteboard. Also, implement encoding and decoding
615         support for PasteboardItemInfo. So far, the item info only describes file information about the pasteboard item,
616         and flags indicating whether the item prefers attachment or inline presentation.
617
618         * platform/PasteboardStrategy.h:
619
620         Replace getFilenamesForDataInteraction with informationForItemAtIndex. Instead of returning all of the file
621         paths associated with any item on the pasteboard, fetch a PasteboardItemInfo at a given item index, which
622         includes information about the file path as well as some other metadata we'll need when deciding how to read
623         pasteboard contents as a document fragment.
624
625         * platform/PlatformPasteboard.h:
626         * platform/cocoa/PasteboardCocoa.mm:
627         (WebCore::Pasteboard::read):
628         * platform/ios/AbstractPasteboard.h:
629         * platform/ios/PasteboardIOS.mm:
630         (WebCore::Pasteboard::read):
631         (WebCore::Pasteboard::readRespectingUTIFidelities):
632
633         Teach the iOS Pasteboard to read web content using attachment elements, if enabled. There are two scenarios in
634         which we would want to insert an attachment element:
635         (1) The item provider uses a preferred presentation style of attachment, in which case we bail out of trying to
636             handle the drop using the default mechanisms, and simply insert it as an attachment. We need this to deal
637             with the case where we drop text or HTML files from the Files app, so that we don't try and insert the
638             contents of the text or HTML as inline web content.
639         (2) The item provider doesn't have a preferred attachment presentation style, but there's nothing WebKit would
640             otherwise do with the dropped content, so insert an attachment element as a fallback. Examples where this is
641             relevant are dropping a PDF or ZIP archive without attachment presentation style explicitly set.
642         We first check if we fall into case (1). If so, we can bail early by inserting an attachment; otherwise, we
643         proceed normally and see if we can read the contents of the drop as web content. If, at the end of default drop
644         handling, we don't still have a way to represent the dropped content, enter case (2).
645
646         (WebCore::Pasteboard::readFilePaths):
647         (WebCore::Pasteboard::readFilenames): Deleted.
648
649         Rename readFilenames to readFilePaths, and reimplement it using informationForItemAtIndex.
650
651         * platform/ios/PlatformPasteboardIOS.mm:
652         (WebCore::pasteboardItemPresentationStyle):
653         (WebCore::PlatformPasteboard::informationForItemAtIndex):
654         (WebCore::PlatformPasteboard::filenamesForDataInteraction): Deleted.
655
656         Implement informationForItemAtIndex and remove filenamesForDataInteraction. As before, we ask the pasteboard
657         (i.e. WebItemProviderPasteboard) for information about dropped file URLs. This time, we limit this to a single
658         file, so we don't end up creating multiple attachment elements for each representation of a single item
659         provider. See below for -preferredFileUploadURLAtIndex:fileType: for more detail.
660
661         * platform/ios/WebItemProviderPasteboard.h:
662         * platform/ios/WebItemProviderPasteboard.mm:
663         (-[WebItemProviderLoadResult initWithItemProvider:typesToLoad:]):
664         (-[WebItemProviderLoadResult canBeRepresentedAsFileUpload]):
665
666         Remove this synthesized instance variable and instead just check the item provider's preferredPresentationStyle.
667
668         (-[WebItemProviderLoadResult description]):
669
670         Add a verbose -description to the load result object. Useful for debugging what was content was loaded from an
671         item provider on drop.
672
673         (-[WebItemProviderPasteboard preferredFileUploadURLAtIndex:fileType:]):
674
675         Return the highest fidelity loaded type identifier for a given item.
676
677         (-[WebItemProviderPasteboard allDroppedFileURLs]):
678         (-[WebItemProviderPasteboard typeIdentifiersToLoadForRegisteredTypeIdentfiers:]):
679
680         Prefer flat RTFD to RTFD. In the case where attachments are enabled and we're accepting all types of content
681         using attachment elements as a fallback representation, if the source writes attributed strings to the
682         pasteboard with com.apple.rtfd at a higher fidelity than com.apple.flat-rtfd, we'll end up loading only
683         com.apple.rtfd and dropping the text as an attachment element because we cannot convert the dropped content to
684         markup. Instead, if flat RTFD is present in the item provider, always prefer that over RTFD so that dropping as
685         regular web content isn't overridden when attachment elements are enabled.
686
687         (-[WebItemProviderPasteboard doAfterLoadingProvidedContentIntoFileURLs:synchronousTimeout:]):
688         (-[WebItemProviderPasteboard droppedFileURLs]): Deleted.
689         * platform/mac/DragDataMac.mm:
690         (WebCore::DragData::containsCompatibleContent const):
691
692         DragData::containsCompatibleContent should be true when attachment elements are enabled, and there are files we
693         can drop as attachment elements.
694
695         * platform/mac/PasteboardMac.mm:
696         (WebCore::Pasteboard::read):
697         (WebCore::Pasteboard::readFilePaths):
698         (WebCore::Pasteboard::readFilenames): Deleted.
699
700 2018-01-03  Ting-Wei Lan  <lantw44@gmail.com>
701
702         Replace hard-coded paths in shebangs with #!/usr/bin/env
703         https://bugs.webkit.org/show_bug.cgi?id=181040
704
705         Reviewed by Alex Christensen.
706
707         * bindings/scripts/InFilesCompiler.pm:
708         * bindings/scripts/InFilesParser.pm:
709         * bindings/scripts/generate-bindings-all.pl:
710         * bindings/scripts/generate-bindings.pl:
711         * bindings/scripts/preprocess-idls.pl:
712         * css/make-css-file-arrays.pl:
713         * css/makeprop.pl:
714         * css/makevalues.pl:
715         * dom/make_event_factory.pl:
716         * dom/make_names.pl:
717         * extract-localizable-strings.pl:
718         * make-hash-tools.pl:
719
720 2018-01-03  Wenson Hsieh  <wenson_hsieh@apple.com>
721
722         [Attachment Support] Add plumbing for starting a drag with promised blob data
723         https://bugs.webkit.org/show_bug.cgi?id=181201
724
725         Reviewed by Tim Horton.
726
727         Adds logic to allow dragging an attachment element as a file by sending promised blob information to the UI
728         process. See comments below for more detail.
729
730         The only change in behavior is that dragging an attachment element will no longer write web content and injected
731         bundle data to the pasteboard if the attachment element's file attribute is nonnull. This will cause one
732         existing WK1 layout test to fail, but will otherwise not affect any attachment editing clients. On iOS,
733         attachment elements in the Mail viewer can be dragged, but each attachment's file is null, so we fall back to
734         current behavior; on macOS, Mail currently overrides the drag completely, beginning at -mouseDown:, so this
735         doesn't make a difference to macOS Mail either.
736
737         * editing/Editor.h:
738         * editing/cocoa/EditorCocoa.mm:
739         (WebCore::Editor::getPasteboardTypesAndDataForAttachment):
740
741         Add a helper method to retrieve an attachment element as web archive data, for moving attachments within the
742         same document. Also gives the injected editor bundle a chance to supply custom pasteboard types.
743
744         * loader/EmptyClients.cpp:
745         * page/DragClient.h:
746         (WebCore::DragClient::prepareToDragPromisedBlob):
747
748         Add new DragClient methods to send information about a promised blob to the UI process.
749
750         * page/DragController.cpp:
751         (WebCore::DragController::startDrag):
752
753         Call dragAttachmentElement when starting a drag on an attachment element.
754
755         (WebCore::DragController::dragAttachmentElement):
756
757         Try to begin dragging a given attachment element, propagating promised blob information to the client layers.
758         Returns true iff the attachment is backed by blob data (i.e. the file is nonnull).
759
760         * platform/PromisedBlobInfo.h:
761
762         Add a list of additional types and data to PromisedBlobInfo. In addition to the promised blob info, this would
763         allow injected bundle data and other private types alongside the main attachment data on the pasteboard.
764
765 2018-01-03  Simon Fraser  <simon.fraser@apple.com>
766
767         Remove the 'resolutionScale' parameter from ImageBufferDataCG get/putBytes
768         https://bugs.webkit.org/show_bug.cgi?id=181268
769
770         Reviewed by Alex Christensen.
771
772         These functions were always called with resolutionScale=1.
773
774         * platform/graphics/cg/ImageBufferCG.cpp:
775         (WebCore::ImageBuffer::getUnmultipliedImageData const):
776         (WebCore::ImageBuffer::getPremultipliedImageData const):
777         (WebCore::ImageBuffer::putByteArray):
778         * platform/graphics/cg/ImageBufferDataCG.cpp:
779         (WebCore::ImageBufferData::getData const):
780         (WebCore::ImageBufferData::putData):
781         (WebCore::affineWarpBufferData): Deleted.
782         * platform/graphics/cg/ImageBufferDataCG.h:
783
784 2018-01-03  John Wilander  <wilander@apple.com>
785
786         Storage Access API: Refactor XPC for access removal to go straight from the web process to the network process
787         https://bugs.webkit.org/show_bug.cgi?id=181270
788         <rdar://problem/36289544>
789
790         Reviewed by Alex Christensen.
791
792         No new tests. Existing test re-enabled.
793
794         This change refactors how the web process tells the network process
795         to remove storage access. Previously, this was done over the UI process
796         just like requests for storage access. But since no further reasoning
797         is needed, the message should go straight from the web process to the
798         network process for performance reasons and to minimize the risk of a
799         race.
800
801         As a consequence, the XPC code for storage access removal in the UI
802         process is deleted.
803
804         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
805         (WebCore::NetworkStorageSession::cookieStoragePartition const):
806             Removes the storageAccessAPIEnabled check since the flag
807             doesn't get propagated when the network process is created.
808             Figuring this out will take some work which is unnecessary
809             when we already gate access to the feature in Document.idl.
810
811 2018-01-03  James Craig  <jcraig@apple.com>
812
813         AX: when invert colors is on, double-invert certain media elements in UserAgentStyleSheet
814         https://bugs.webkit.org/show_bug.cgi?id=168447
815         <rdar://problem/30559874>
816
817         Reviewed by Simon Fraser.
818
819         Double-invert video when platform 'invert colors' setting is enabled. Behavior matches 
820         current 'Smart Invert' feature of Safari Reader on macOS/iOS and other iOS native apps.
821
822         Tests: accessibility/smart-invert-reference.html
823                accessibility/smart-invert.html
824
825         * Modules/modern-media-controls/controls/media-controls.css:
826         (@media (inverted-colors)):
827         (:host):
828         (picture):
829         * css/html.css:
830         (@media (inverted-colors)):
831         (video):
832
833 2018-01-03  Youenn Fablet  <youenn@apple.com>
834
835         LayoutTest http/tests/media/media-stream/disconnected-frame.html to consistently fail an assertion: !m_adoptionIsRequired
836         https://bugs.webkit.org/show_bug.cgi?id=181264
837
838         Reviewed by Eric Carlson.
839
840         Covered by http/tests/media/media-stream/disconnected-frame.html not crashing anymore in Debug builds.
841         Calling suspendIfNeeded in create method instead of constructor.
842
843         * Modules/mediastream/UserMediaRequest.cpp:
844         (WebCore::UserMediaRequest::create):
845         (WebCore::UserMediaRequest::UserMediaRequest):
846
847 2018-01-03  Antti Koivisto  <antti@apple.com>
848
849         Remove DeprecatedCSSOMValue::equals
850         https://bugs.webkit.org/show_bug.cgi?id=181241
851
852         Reviewed by Zalan Bujtas.
853
854         This is dead code.
855
856         * css/DeprecatedCSSOMValue.cpp:
857         (WebCore::compareCSSOMValues): Deleted.
858         (WebCore::DeprecatedCSSOMValue::equals const): Deleted.
859         * css/DeprecatedCSSOMValue.h:
860         (WebCore::DeprecatedCSSOMValue::operator== const): Deleted.
861         (WebCore::DeprecatedCSSOMComplexValue::equals const): Deleted.
862         * css/DeprecatedCSSOMValueList.cpp:
863         (WebCore::DeprecatedCSSOMValueList::equals const): Deleted.
864         * css/DeprecatedCSSOMValueList.h:
865
866 2018-01-03  Simon Fraser  <simon.fraser@apple.com>
867
868         feLighting is broken with primitiveUnits="objectBoundingBox"
869         https://bugs.webkit.org/show_bug.cgi?id=181197
870
871         Reviewed by Tim Horton.
872
873         With <filter primitiveUnits="objectBoundingBox"> we need to convert the coordinates
874         of fePointLights and feSpotLights into user space coordinates. Following
875         https://www.w3.org/TR/SVG/filters.html#FilterElementPrimitiveUnitsAttribute
876         this is done by treating them as fractions of the bounding box on the referencing
877         element, with treatment for z following https://www.w3.org/TR/SVG/coords.html#Units_viewport_percentage
878         
879         To do this, store the bounds of the referencing elemenet on SVGFilterBuilder as
880         targetBoundingBox, and store the primitiveUnits type. Then do the conversion of lighting
881         coordinates in SVGFESpecularLightingElement::build() and SVGFEDiffuseLightingElement::build().
882
883         Remove SVGFELightElement::findLightSource(), since we need to be able to pass the SVGFilterBuilder
884         to the lightSource() function so hoist the code up.
885
886         Tests: svg/filters/feDiffuseLighting-fePointLight-primitiveUnits-objectBoundingBox-expected.svg
887                svg/filters/feDiffuseLighting-fePointLight-primitiveUnits-objectBoundingBox.svg
888                svg/filters/feDiffuseLighting-feSpotLight-primitiveUnits-objectBoundingBox-expected.svg
889                svg/filters/feDiffuseLighting-feSpotLight-primitiveUnits-objectBoundingBox.svg
890                svg/filters/feSpecularLighting-fePointLight-primitiveUnits-objectBoundingBox-expected.svg
891                svg/filters/feSpecularLighting-fePointLight-primitiveUnits-objectBoundingBox.svg
892
893         * rendering/svg/RenderSVGResourceFilter.cpp:
894         (WebCore::RenderSVGResourceFilter::buildPrimitives const):
895         * svg/SVGFEDiffuseLightingElement.cpp:
896         (WebCore::SVGFEDiffuseLightingElement::build):
897         * svg/SVGFEDistantLightElement.cpp:
898         (WebCore::SVGFEDistantLightElement::lightSource const):
899         * svg/SVGFEDistantLightElement.h:
900         * svg/SVGFELightElement.cpp:
901         (WebCore::SVGFELightElement::findLightSource): Deleted.
902         * svg/SVGFELightElement.h:
903         * svg/SVGFEPointLightElement.cpp:
904         (WebCore::SVGFEPointLightElement::lightSource const):
905         * svg/SVGFEPointLightElement.h:
906         * svg/SVGFESpecularLightingElement.cpp:
907         (WebCore::SVGFESpecularLightingElement::build):
908         * svg/SVGFESpotLightElement.cpp:
909         (WebCore::SVGFESpotLightElement::lightSource const):
910         * svg/SVGFESpotLightElement.h:
911         * svg/graphics/filters/SVGFilterBuilder.h:
912         (WebCore::SVGFilterBuilder::setTargetBoundingBox):
913         (WebCore::SVGFilterBuilder::targetBoundingBox const):
914         (WebCore::SVGFilterBuilder::primitiveUnits const):
915         (WebCore::SVGFilterBuilder::setPrimitiveUnits):
916
917 2018-01-03  Antti Koivisto  <antti@apple.com>
918
919         Crash beneath CSSValue::equals @ csas.cz
920         https://bugs.webkit.org/show_bug.cgi?id=181243
921         <rdar://problem/35990826>
922
923         Reviewed by Alex Christensen.
924
925         Test: fast/text/oblique-degree-equals-crash.html
926
927         * css/CSSFontStyleValue.cpp:
928         (WebCore::CSSFontStyleValue::equals const):
929
930         Null check both oblique pointers.
931
932 2018-01-03  Joseph Pecoraro  <pecoraro@apple.com>
933
934         Web Inspector: Slow open time enumerating system fonts (FontCache::systemFontFamilies)
935         https://bugs.webkit.org/show_bug.cgi?id=180979
936         <rdar://problem/36146670>
937
938         Reviewed by Matt Baker.
939
940         * platform/graphics/cocoa/FontCacheCoreText.cpp:
941         (fontNameIsSystemFont):
942         (WebCore::FontCache::systemFontFamilies):
943         Switch to the original Mac algorithm before r180979 that uses
944         CTFontManagerCopyAvailableFontFamilyNames. Previously this wasn't
945         available on iOS but now it is. This is a performance improvement on
946         both platforms, but significantly so on macOS. It also finds more,
947         valid, family names.
948
949 2018-01-03  Michael Catanzaro  <mcatanzaro@igalia.com>
950
951         ASSERTION FAILED: !source || is<Target>(*source) in CoordinatedGraphicsLayer::removeFromParent
952         https://bugs.webkit.org/show_bug.cgi?id=166568
953
954         Reviewed by Simon Fraser.
955
956         When a GraphicsLayer has a mask layer, it fails to properly unparent the mask layer before
957         it is destroyed. This leaves the mask layer with a dangling parent pointer. Fix it, while
958         taking care not to introduce yet another virtual function call during the execution of the
959         destructor.
960
961         * platform/graphics/GraphicsLayer.cpp:
962         (WebCore::GraphicsLayer::willBeDestroyed):
963
964 2018-01-03  Simon Fraser  <simon.fraser@apple.com>
965
966         SVG lighting filter lights are in the wrong coordinate system
967         https://bugs.webkit.org/show_bug.cgi?id=181147
968
969         Reviewed by Zalan Bujtas.
970
971         Point and spot light coordinates weren't being converted into buffer-relative
972         coordinates before being fed into the lighting math, resulting in incorrect light
973         rendering on Retina devices, and when the filter primitive region was clipped.
974
975         Fix by storing absoluteUnclippedSubregion on FilterEffect, which allows us to map
976         lighting points from user space coordinates into the coordinates of the buffer being
977         used for rendering. Also scale the light z coordinate by doing a dummy point mapping in x.
978
979         Rename members of PointLightSource and SpotLightSource to make it clear which coordinate
980         system they are in.
981
982         Tests include HiDPI tests.
983
984         Tests: svg/filters/fePointLight-coordinates-expected.svg
985                svg/filters/fePointLight-coordinates.svg
986                svg/filters/feSpotLight-coordinates-expected.svg
987                svg/filters/feSpotLight-coordinates.svg
988                svg/filters/hidpi/fePointLight-coordinates-expected.svg
989                svg/filters/hidpi/fePointLight-coordinates.svg
990                svg/filters/hidpi/feSpotLight-coordinates-expected.svg
991                svg/filters/hidpi/feSpotLight-coordinates.svg
992
993         * platform/graphics/FloatPoint3D.h: Make it easy to get and set the X and Y coords as a FloatPoint.
994         (WebCore::FloatPoint3D::xy const):
995         (WebCore::FloatPoint3D::setXY):
996         * platform/graphics/GeometryUtilities.cpp:
997         (WebCore::mapPoint):
998         (WebCore::mapRect):
999         * platform/graphics/GeometryUtilities.h: Helper to make a point between rects.
1000         * platform/graphics/filters/DistantLightSource.cpp:
1001         (WebCore::DistantLightSource::initPaintingData):
1002         * platform/graphics/filters/DistantLightSource.h:
1003         * platform/graphics/filters/FELighting.cpp:
1004         (WebCore::FELighting::drawLighting):
1005         * platform/graphics/filters/FilterEffect.cpp:
1006         (WebCore::FilterEffect::mapPointFromUserSpaceToBuffer const):
1007         * platform/graphics/filters/FilterEffect.h:
1008         (WebCore::FilterEffect::setUnclippedAbsoluteSubregion):
1009         * platform/graphics/filters/LightSource.h:
1010         * platform/graphics/filters/PointLightSource.cpp:
1011         (WebCore::PointLightSource::initPaintingData):
1012         (WebCore::PointLightSource::computePixelLightingData const):
1013         (WebCore::PointLightSource::setX):
1014         (WebCore::PointLightSource::setY):
1015         (WebCore::PointLightSource::setZ):
1016         * platform/graphics/filters/PointLightSource.h:
1017         (WebCore::PointLightSource::position const):
1018         (WebCore::PointLightSource::PointLightSource):
1019         * platform/graphics/filters/SpotLightSource.cpp:
1020         (WebCore::SpotLightSource::initPaintingData):
1021         (WebCore::SpotLightSource::computePixelLightingData const):
1022         (WebCore::SpotLightSource::setX):
1023         (WebCore::SpotLightSource::setY):
1024         (WebCore::SpotLightSource::setZ):
1025         (WebCore::SpotLightSource::setPointsAtX):
1026         (WebCore::SpotLightSource::setPointsAtY):
1027         (WebCore::SpotLightSource::setPointsAtZ):
1028         * platform/graphics/filters/SpotLightSource.h:
1029         (WebCore::SpotLightSource::position const):
1030         (WebCore::SpotLightSource::direction const):
1031         (WebCore::SpotLightSource::SpotLightSource):
1032         * rendering/svg/RenderSVGResourceFilter.cpp:
1033         (WebCore::RenderSVGResourceFilter::buildPrimitives const):
1034         * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
1035         (WebCore::RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion):
1036
1037 2018-01-03  Youenn Fablet  <youenn@apple.com>
1038
1039         Select service worker for documents with data/blob URLS
1040         https://bugs.webkit.org/show_bug.cgi?id=181213
1041
1042         Reviewed by Alex Christensen.
1043
1044         Covered by updated test.
1045
1046         Reusing the service worker of the parent for blob/data URL documents.
1047
1048         * loader/DocumentLoader.cpp:
1049         (WebCore::isLocalURL):
1050         (WebCore::DocumentLoader::commitData):
1051
1052 2018-01-03  Ryan Haddad  <ryanhaddad@apple.com>
1053
1054         Unreviewed, rolling out r226352.
1055
1056         Breaks Sierra and El Capitan builds.
1057
1058         Reverted changeset:
1059
1060         "Web Inspector: Slow open time enumerating system fonts
1061         (FontCache::systemFontFamilies)"
1062         https://bugs.webkit.org/show_bug.cgi?id=180979
1063         https://trac.webkit.org/changeset/226352
1064
1065 2018-01-03  Philippe Normand  <pnormand@igalia.com>
1066
1067         [GStreamer] The bus synchronous handler should be in the base player class
1068         https://bugs.webkit.org/show_bug.cgi?id=181237
1069
1070         Reviewed by Carlos Garcia Campos.
1071
1072         Because this is where video rendering is handled.
1073
1074         No new tests, this is only a refactoring.
1075
1076         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1077         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
1078         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1079         (WebCore::MediaPlayerPrivateGStreamerBase::setPipeline):
1080
1081 2018-01-03  Philippe Normand  <pnormand@igalia.com>
1082
1083         [GStreamer] move MediaSample implementation out of mse/
1084         https://bugs.webkit.org/show_bug.cgi?id=179165
1085
1086         Reviewed by Carlos Garcia Campos.
1087
1088         This module isn't specific to MSE and can potentially be reused
1089         elsewhere, for WebRTC for instance. Additionally the
1090         ::platformSample() method was implemented and the code was cleaned up.
1091
1092         * platform/GStreamer.cmake:
1093         * platform/MediaSample.h:
1094         * platform/graphics/gstreamer/GStreamerMediaSample.cpp: Renamed from Source/WebCore/platform/graphics/gstreamer/mse/GStreamerMediaSample.cpp.
1095         (WebCore::GStreamerMediaSample::platformSample):
1096         * platform/graphics/gstreamer/GStreamerMediaSample.h: Renamed from Source/WebCore/platform/graphics/gstreamer/mse/GStreamerMediaSample.h.
1097         * platform/graphics/gstreamer/mse/PlaybackPipeline.cpp:
1098         (WebCore::PlaybackPipeline::enqueueSample):
1099
1100 2018-01-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1101
1102         Unreviewed. Fix resource load stats tests on GLib based ports after r226355.
1103
1104         The monitor can be created in the work queue thread too.
1105
1106         * platform/glib/FileMonitorGLib.cpp:
1107         (WebCore::FileMonitor::FileMonitor):
1108
1109 2018-01-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1110
1111         [GTK] Crash destroying WebCore::FileMonitor
1112         https://bugs.webkit.org/show_bug.cgi?id=181138
1113
1114         Reviewed by Michael Catanzaro.
1115
1116         Ensure that platform file monitor is always created and destroyed in the work queue thread synchronously.
1117
1118         * platform/FileMonitor.h:
1119         * platform/glib/FileMonitorGLib.cpp:
1120         (WebCore::FileMonitor::FileMonitor):
1121         (WebCore::FileMonitor::~FileMonitor):
1122         (WebCore::FileMonitor::didChange):
1123
1124 2018-01-02  Joseph Pecoraro  <pecoraro@apple.com>
1125
1126         Web Inspector: Slow open time enumerating system fonts (FontCache::systemFontFamilies)
1127         https://bugs.webkit.org/show_bug.cgi?id=180979
1128         <rdar://problem/36146670>
1129
1130         Reviewed by Matt Baker.
1131
1132         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1133         (WebCore::FontCache::systemFontFamilies):
1134         Switch to the original Mac algorithm before r180979 that uses
1135         CTFontManagerCopyAvailableFontFamilyNames. Previously this wasn't
1136         available on iOS but now it is. This is a performance improvement on
1137         both platforms, but significantly so on macOS. It also finds more,
1138         valid, family names.
1139
1140 2018-01-02  Yusuke Suzuki  <utatane.tea@gmail.com>
1141
1142         Unreviewed, fix GCC warning by using #include
1143         https://bugs.webkit.org/show_bug.cgi?id=181189
1144
1145         This file is included in C++ files. Use #include instead of #import to suppress warning in GCC.
1146
1147         * platform/PromisedBlobInfo.h:
1148
1149 2017-12-28  Yusuke Suzuki  <utatane.tea@gmail.com>
1150
1151         Remove std::chrono completely
1152         https://bugs.webkit.org/show_bug.cgi?id=181186
1153
1154         Reviewed by Alex Christensen.
1155
1156         Use MonotonicTime, WallTime, and Seconds instead.
1157         Changes are mechanical ones. But persistent network cache data is changed.
1158         So we bump the version number of the cache storage.
1159
1160         * Modules/indexeddb/server/IDBServer.cpp:
1161         (WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesModifiedSince):
1162         (WebCore::IDBServer::removeAllDatabasesForOriginPath):
1163         (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesModifiedSince):
1164         (WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesForOrigins):
1165         * Modules/indexeddb/server/IDBServer.h:
1166         * Modules/webdatabase/DatabaseTracker.cpp:
1167         (WebCore::DatabaseTracker::deleteDatabasesModifiedSince):
1168         * Modules/webdatabase/DatabaseTracker.h:
1169         * dom/Document.cpp:
1170         (WebCore::Document::lastModified):
1171         * html/HTMLMediaElement.cpp:
1172         (WebCore::HTMLMediaElement::clearMediaCache):
1173         * html/HTMLMediaElement.h:
1174         (WebCore::HTMLMediaElement::clearMediaCache):
1175         * loader/CrossOriginPreflightResultCache.cpp:
1176         (WebCore::parseAccessControlMaxAge):
1177         (WebCore::CrossOriginPreflightResultCacheItem::parse):
1178         (WebCore::CrossOriginPreflightResultCacheItem::allowsRequest const):
1179         * loader/CrossOriginPreflightResultCache.h:
1180         * loader/cache/CachedResource.cpp:
1181         (WebCore::CachedResource::CachedResource):
1182         (WebCore::CachedResource::freshnessLifetime const):
1183         (WebCore::CachedResource::responseReceived):
1184         (WebCore::CachedResource::updateResponseAfterRevalidation):
1185         * loader/cache/CachedResource.h:
1186         * platform/FileSystem.cpp:
1187         (WebCore::FileSystem::getFileModificationTime):
1188         * platform/FileSystem.h:
1189         * platform/SearchPopupMenu.h:
1190         * platform/cocoa/SearchPopupMenuCocoa.h:
1191         * platform/cocoa/SearchPopupMenuCocoa.mm:
1192         (WebCore::toSystemClockTime):
1193         (WebCore::toNSDateFromSystemClock):
1194         (WebCore::removeRecentlyModifiedRecentSearches):
1195         * platform/graphics/MediaPlayer.cpp:
1196         (WebCore::MediaPlayer::clearMediaCache):
1197         * platform/graphics/MediaPlayer.h:
1198         * platform/graphics/MediaPlayerPrivate.h:
1199         (WebCore::MediaPlayerPrivateInterface::clearMediaCache):
1200         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1201         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1202         (WebCore::toSystemClockTime):
1203         (WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCache):
1204         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1205         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1206         (WebCore::MediaPlayerPrivateQTKit::clearMediaCache):
1207         * platform/network/CacheValidation.cpp:
1208         (WebCore::computeCurrentAge):
1209         (WebCore::computeFreshnessLifetimeForHTTPFamily):
1210         (WebCore::updateRedirectChainStatus):
1211         (WebCore::redirectChainAllowsReuse):
1212         (WebCore::parseCacheControlDirectives):
1213         * platform/network/CacheValidation.h:
1214         (WebCore::RedirectChainCacheStatus::RedirectChainCacheStatus):
1215         * platform/network/HTTPParsers.cpp:
1216         (WebCore::parseHTTPDate):
1217         * platform/network/HTTPParsers.h:
1218         * platform/network/PlatformCookieJar.h:
1219         * platform/network/ResourceResponseBase.cpp:
1220         (WebCore::ResourceResponseBase::cacheControlMaxAge const):
1221         (WebCore::parseDateValueInHeader):
1222         (WebCore::ResourceResponseBase::date const):
1223         (WebCore::ResourceResponseBase::age const):
1224         (WebCore::ResourceResponseBase::expires const):
1225         (WebCore::ResourceResponseBase::lastModified const):
1226         * platform/network/ResourceResponseBase.h:
1227         * platform/network/cf/CookieJarCFNet.cpp:
1228         (WebCore::deleteAllCookiesModifiedSince):
1229         * platform/network/curl/CookieJarCurl.cpp:
1230         (WebCore::CookieJarCurlFileSystem::deleteAllCookiesModifiedSince):
1231         (WebCore::deleteAllCookiesModifiedSince):
1232         * platform/network/curl/CookieJarCurl.h:
1233         * platform/network/curl/CurlCacheEntry.cpp:
1234         (WebCore::CurlCacheEntry::CurlCacheEntry):
1235         (WebCore::CurlCacheEntry::isCached):
1236         (WebCore::CurlCacheEntry::parseResponseHeaders):
1237         * platform/network/curl/CurlCacheEntry.h:
1238         * platform/network/mac/CookieJarMac.mm:
1239         (WebCore::deleteAllCookiesModifiedSince):
1240         * platform/network/soup/CookieJarSoup.cpp:
1241         (WebCore::deleteAllCookiesModifiedSince):
1242         * platform/win/SearchPopupMenuWin.cpp:
1243         (WebCore::SearchPopupMenuWin::loadRecentSearches):
1244         * rendering/RenderSearchField.cpp:
1245         (WebCore::RenderSearchField::addSearchResult):
1246
1247 2018-01-02  Wenson Hsieh  <wenson_hsieh@apple.com>
1248
1249         [Attachment Support] Introduce data structures and IPC support for writing promised blobs
1250         https://bugs.webkit.org/show_bug.cgi?id=181189
1251
1252         Reviewed by Tim Horton.
1253
1254         Introduces a new header containing structs to be used for writing blob data when dragging. PromisedBlobInfo
1255         represents information needed to declare data on the pasteboard that will eventually be provided via a Blob.
1256         This includes the type and filename of the Blob-backed content. PromisedBlobData represents information needed
1257         to actually deliver the Blob's content to the platform, and is sent some time after its corresponding
1258         PromisedBlobInfo. The content may either be in the form of a file path (as is the case using the previous
1259         declareAndWriteAttachment codepath) or a data buffer (which we would use if the Blob is not already backed by a
1260         file on disk).
1261
1262         No new tests, since there is no observable change in functionality yet.
1263
1264         * WebCore.xcodeproj/project.pbxproj:
1265         * platform/PromisedBlobInfo.h: Added.
1266         (WebCore::PromisedBlobInfo::operator bool const):
1267         (WebCore::PromisedBlobData::hasData const):
1268         (WebCore::PromisedBlobData::hasFile const):
1269         (WebCore::PromisedBlobData::operator bool const):
1270         (WebCore::PromisedBlobData::fulfills const):
1271
1272 2018-01-02  Brady Eidson  <beidson@apple.com>
1273
1274         Make MessagePortChannel::takeAllMessagesFromRemote asynchronous.
1275         https://bugs.webkit.org/show_bug.cgi?id=181205
1276
1277         Reviewed by Alex Christensen.
1278
1279         No new tests (No behavior change)
1280
1281         This is needed for the ongoing WK2 MessagePort work.
1282
1283         For WK1 in-process MessagePorts it is still synchronous; no behavior change.
1284
1285         * dom/InProcessMessagePortChannel.cpp:
1286         (WebCore::InProcessMessagePortChannel::takeAllMessagesFromRemote):
1287         * dom/InProcessMessagePortChannel.h:
1288
1289         * dom/MessagePort.cpp:
1290         (WebCore::MessagePort::dispatchMessages):
1291         * dom/MessagePortChannel.h:
1292
1293 2018-01-02  Jiewen Tan  <jiewen_tan@apple.com>
1294
1295         Add a WebAuthentication runtime feature flag
1296         https://bugs.webkit.org/show_bug.cgi?id=181220
1297         <rdar://problem/36055305>
1298
1299         Reviewed by Brent Fulgham.
1300
1301         This patch basically renames the CredentialManagement runtime feature flag into
1302         WebAuthentication runtime feature flag.
1303
1304         No tests.
1305
1306         * Modules/credentialmanagement/BasicCredential.idl:
1307         * Modules/credentialmanagement/CredentialsContainer.idl:
1308         * Modules/credentialmanagement/NavigatorCredentials.idl:
1309         * Modules/webauthn/PublicKeyCredential.idl:
1310         * page/RuntimeEnabledFeatures.h:
1311         (WebCore::RuntimeEnabledFeatures::setWebAuthenticationEnabled):
1312         (WebCore::RuntimeEnabledFeatures::webAuthenticationEnabled const):
1313         (WebCore::RuntimeEnabledFeatures::setCredentialManagementEnabled): Deleted.
1314         (WebCore::RuntimeEnabledFeatures::credentialManagementEnabled const): Deleted.
1315
1316 2018-01-02  Wenson Hsieh  <wenson_hsieh@apple.com>
1317
1318         [Attachment Support] Don't Blob-convert images and attachments with https:, http: or data: urls
1319         https://bugs.webkit.org/show_bug.cgi?id=181143
1320         <rdar://problem/36200381>
1321
1322         Reviewed by Tim Horton.
1323
1324         Clients such as Mail would expect pasting or dropping an image with src="https://..." to result in the source
1325         URL being preserved (i.e. staying as remote images) instead of creating image attachments out of them. This
1326         patch hooks into the shouldConvertToBlob() check added in r226272 so that it applies to attachment element
1327         replacement as well.
1328
1329         Test: WKAttachmentTests.DoNotInsertDataURLImagesAsAttachments
1330
1331         * editing/cocoa/WebContentReaderCocoa.mm:
1332         (WebCore::shouldConvertToBlob):
1333         (WebCore::replaceRichContentWithAttachments):
1334
1335 2018-01-02  Brady Eidson  <beidson@apple.com>
1336
1337         Identify MessagePorts by a globally unique MessagePortIdentifier.
1338         https://bugs.webkit.org/show_bug.cgi?id=181172
1339
1340         Reviewed by Alex Christensen.
1341
1342         No new tests (Behavior change covered by all existing tests).
1343
1344         This cleans up the abstract MessagePortChannel interface to be in terms of identifiers
1345         instead of actual MessagePort objects.
1346         
1347         The identifiers are compounded with the current ProcessIdentifier meaning they are global
1348         across all processes for the running UI process, enabling easy cross-process communication.
1349         
1350         (Actual cross-process communication comes in a followup)
1351         
1352         * WebCore.xcodeproj/project.pbxproj:
1353         
1354         * dom/InProcessMessagePortChannel.cpp:
1355         (WebCore::InProcessMessagePortChannel::createChannelBetweenPorts):
1356         (WebCore::InProcessMessagePortChannel::isConnectedTo):
1357         (WebCore::InProcessMessagePortChannel::entangleWithRemoteIfOpen):
1358         (WebCore::InProcessMessagePortChannel::entangleIfOpen): Deleted.
1359         * dom/InProcessMessagePortChannel.h:
1360         
1361         * dom/MessageChannel.cpp:
1362         (WebCore::MessageChannel::MessageChannel):
1363         (WebCore::m_port2):
1364         
1365         * dom/MessagePort.cpp:
1366         (WebCore::allMessagePortsLock):
1367         (WebCore::MessagePort::ref const):
1368         (WebCore::MessagePort::deref const):
1369         (WebCore::MessagePort::existingMessagePortForIdentifier):
1370         (WebCore::MessagePort::MessagePort):
1371         (WebCore::MessagePort::~MessagePort):
1372         (WebCore::MessagePort::postMessage):
1373         (WebCore::MessagePort::entangleWithRemote):
1374         (WebCore::MessagePort::entanglePorts):
1375         (WebCore::MessagePort::entangle): Deleted.
1376         * dom/MessagePort.h:
1377         
1378         * dom/MessagePortChannel.h:
1379         
1380         * dom/MessagePortIdentifier.h: Added.
1381         (WebCore::operator==):
1382         (WebCore::MessagePortIdentifier::encode const):
1383         (WebCore::MessagePortIdentifier::decode):
1384         (WebCore::MessagePortIdentifier::hash const):
1385         (WTF::MessagePortIdentifierHash::hash):
1386         (WTF::MessagePortIdentifierHash::equal):
1387         (WTF::HashTraits<WebCore::MessagePortIdentifier>::emptyValue):
1388         (WTF::HashTraits<WebCore::MessagePortIdentifier>::constructDeletedValue):
1389         (WTF::HashTraits<WebCore::MessagePortIdentifier>::isDeletedValue):
1390
1391 2018-01-02  Youenn Fablet  <youenn@apple.com>
1392
1393         Memory cache should not reuse resources with different credential fetch option
1394         https://bugs.webkit.org/show_bug.cgi?id=181212
1395
1396         Reviewed by Alex Christensen.
1397
1398         Covered by rebased test.
1399
1400         * loader/cache/CachedResourceLoader.cpp:
1401         (WebCore::CachedResourceLoader::determineRevalidationPolicy const):
1402
1403 2018-01-02  Jiewen Tan  <jiewen_tan@apple.com>
1404
1405         Update Credential Management API for WebAuthentication
1406         https://bugs.webkit.org/show_bug.cgi?id=181082
1407         <rdar://problem/36055239>
1408
1409         Reviewed by Brent Fulgham.
1410
1411         Part 2/2
1412
1413         This patch implements Core API from Credential Management API: https://www.w3.org/TR/credential-management-1/#core.
1414         which is required by WebAuthN. It also sets the CredentialManagement runtime flag to enable testing. Note that it
1415         introduces a dummy PublicKeyCredential interface for testing functionalities of the Credential interface, which
1416         cannot be instantiated.
1417
1418         Tests: http/wpt/credential-management/credentialscontainer-create-basics.https.html
1419                http/wpt/credential-management/credentialscontainer-get-basics.https.html
1420                http/wpt/credential-management/credentialscontainer-preventSilentAccess-basics.https.html
1421                http/wpt/credential-management/idl.https.html
1422
1423         * CMakeLists.txt:
1424         * DerivedSources.make:
1425         * Modules/credentialmanagement/BasicCredential.cpp:
1426         (WebCore::BasicCredential::BasicCredential):
1427         (WebCore::BasicCredential::type const):
1428         * Modules/credentialmanagement/BasicCredential.h:
1429         (WebCore::BasicCredential::discovery const):
1430         * Modules/credentialmanagement/BasicCredential.idl:
1431         * Modules/credentialmanagement/CredentialCreationOptions.h:
1432         * Modules/credentialmanagement/CredentialCreationOptions.idl:
1433         * Modules/credentialmanagement/CredentialRequestOptions.h:
1434         * Modules/credentialmanagement/CredentialRequestOptions.idl:
1435         * Modules/credentialmanagement/CredentialsContainer.cpp:
1436         (WebCore::CredentialsContainer::CredentialsContainer):
1437         (WebCore::CredentialsContainer::isSameOriginWithItsAncestors):
1438         (WebCore::CredentialsContainer::dispatchTask):
1439         (WebCore::CredentialsContainer::get):
1440         (WebCore::CredentialsContainer::store):
1441         (WebCore::CredentialsContainer::isCreate):
1442         (WebCore::CredentialsContainer::preventSilentAccess):
1443         * Modules/credentialmanagement/CredentialsContainer.h:
1444         (WebCore::CredentialsContainer::create):
1445         (WebCore::CredentialsContainer::CredentialsContainer): Deleted.
1446         * Modules/credentialmanagement/CredentialsContainer.idl:
1447         * Modules/credentialmanagement/NavigatorCredentials.cpp:
1448         (WebCore::NavigatorCredentials::credentials):
1449         * Modules/credentialmanagement/NavigatorCredentials.h:
1450         * Modules/credentialmanagement/NavigatorCredentials.idl:
1451         * Modules/webauthn/PublicKeyCredential.cpp: Copied from Source/WebCore/Modules/credentialmanagement/BasicCredential.cpp.
1452         (WebCore::PublicKeyCredential::PublicKeyCredential):
1453         (WebCore::PublicKeyCredential::collectFromCredentialStore):
1454         (WebCore::PublicKeyCredential::discoverFromExternalSource):
1455         (WebCore::PublicKeyCredential::store):
1456         (WebCore::PublicKeyCredential::create):
1457         * Modules/webauthn/PublicKeyCredential.h: Copied from Source/WebCore/Modules/credentialmanagement/BasicCredential.cpp.
1458         * Modules/webauthn/PublicKeyCredential.idl: Copied from Source/WebCore/Modules/credentialmanagement/BasicCredential.idl.
1459         * Sources.txt:
1460         * WebCore.xcodeproj/project.pbxproj:
1461         * bindings/js/WebCoreBuiltinNames.h:
1462         * page/RuntimeEnabledFeatures.h:
1463
1464 2018-01-02  Oleksandr Skachkov  <gskachkov@gmail.com>
1465
1466         WebAssembly: sending module to iframe fails
1467         https://bugs.webkit.org/show_bug.cgi?id=179263
1468
1469         Reviewed by JF Bastien.
1470
1471         Allow use WebAssembly.Module as input parameters for postMessage 
1472         in window and iframe object. To prevent sending message to iframe
1473         that is not ready, in iframe-* test we are waiting message from
1474         iframe only after that we send message to it.   
1475
1476         Tests: wasm/iframe-parent-postmessage.html
1477                wasm/iframe-postmessage.html
1478                wasm/window-postmessage.html
1479
1480         * bindings/js/SerializedScriptValue.cpp:
1481         (WebCore::CloneSerializer::dumpIfTerminal):
1482         * bindings/js/SerializedScriptValue.h:
1483         * page/DOMWindow.cpp:
1484         (WebCore::DOMWindow::postMessage):
1485
1486 == Rolled over to ChangeLog-2018-01-01 ==