getClientRects doesn't work with list box option elements
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2017-08-05  Carlos Garcia Campos  <cgarcia@igalia.com>
2
3         getClientRects doesn't work with list box option elements
4         https://bugs.webkit.org/show_bug.cgi?id=175016
5
6         Reviewed by Darin Adler.
7
8         Since HTMLOptionElement and HTMLOptGroupElement don't have a renderer, we are always returning an empty list
9         from getClientRects. This is working fine in both chromium and firefox, option elements return its own bounding
10         box and group elements return the bounding box of the group label and all its children items.
11
12         Test: fast/dom/HTMLSelectElement/listbox-items-client-rects.html
13
14         * dom/Element.cpp:
15         (WebCore::listBoxElementBoundingBox): Helper function to return the bounding box of a HTMLOptionElement or
16         HTMLOptGroupElement element.
17         (WebCore::Element::getClientRects): Use listBoxElementBoundingBox() in case of HTMLOptionElement or
18         HTMLOptGroupElement.
19         (WebCore::Element::boundingClientRect): Ditto.
20
21 2017-08-04  Youenn Fablet  <youenn@apple.com>
22
23         [Cache API] Add Cache and CacheStorage IDL definitions
24         https://bugs.webkit.org/show_bug.cgi?id=175201
25
26         Reviewed by Brady Eidson.
27
28         Covered by activated tests.
29         Adding IDLs as per https://www.w3.org/TR/service-workers-1/#idl-index.
30         Implementation is guarded by a runtime flag which is off by default.
31         It is off for DRT but on for WTR.
32
33         * CMakeLists.txt:
34         * DerivedSources.make:
35         * Modules/cache/Cache.cpp: Added.
36         (WebCore::Cache::match):
37         (WebCore::Cache::matchAll):
38         (WebCore::Cache::add):
39         (WebCore::Cache::addAll):
40         (WebCore::Cache::put):
41         (WebCore::Cache::remove):
42         (WebCore::Cache::keys):
43         * Modules/cache/Cache.h: Added.
44         (WebCore::Cache::create):
45         (WebCore::Cache::Cache):
46         * Modules/cache/Cache.idl: Added.
47         * Modules/cache/CacheQueryOptions.h: Added.
48         * Modules/cache/CacheQueryOptions.idl: Added.
49         * Modules/cache/CacheStorage.cpp: Added.
50         (WebCore::CacheStorage::match):
51         (WebCore::CacheStorage::has):
52         (WebCore::CacheStorage::open):
53         (WebCore::CacheStorage::remove):
54         (WebCore::CacheStorage::keys):
55         * Modules/cache/CacheStorage.h: Added.
56         (WebCore::CacheStorage::create):
57         * Modules/cache/CacheStorage.idl: Added.
58         * Modules/cache/DOMWindowCaches.cpp: Added.
59         (WebCore::DOMWindowCaches::DOMWindowCaches):
60         (WebCore::DOMWindowCaches::supplementName):
61         (WebCore::DOMWindowCaches::from):
62         (WebCore::DOMWindowCaches::caches):
63         (WebCore::DOMWindowCaches::caches const):
64         * Modules/cache/DOMWindowCaches.h: Added.
65         * Modules/cache/DOMWindowCaches.idl: Added.
66         * Modules/cache/WorkerGlobalScopeCaches.cpp: Added.
67         (WebCore::WorkerGlobalScopeCaches::supplementName):
68         (WebCore::WorkerGlobalScopeCaches::from):
69         (WebCore::WorkerGlobalScopeCaches::caches):
70         (WebCore::WorkerGlobalScopeCaches::caches const):
71         * Modules/cache/WorkerGlobalScopeCaches.h: Added.
72         * Modules/cache/WorkerGlobalScopeCaches.idl: Added.
73         * WebCore.xcodeproj/project.pbxproj:
74         * page/RuntimeEnabledFeatures.h:
75         (WebCore::RuntimeEnabledFeatures::setCacheAPIEnabled):
76         (WebCore::RuntimeEnabledFeatures::cacheAPIEnabled const):
77
78 2017-08-04  Brady Eidson  <beidson@apple.com>
79
80         Have navigator.serviceWorker() actually return a ServiceWorkerContainer object.
81         https://bugs.webkit.org/show_bug.cgi?id=175215
82
83         Reviewed by Youenn Fablet.
84
85         * page/NavigatorBase.cpp:
86         (WebCore::NavigatorBase::serviceWorker): Actually create and remember an object.
87         * page/NavigatorBase.h:
88
89         * workers/ServiceWorkerContainer.cpp:
90         (WebCore::rejectLater): Asynchronously reject the given promise with an error message.
91         (WebCore::ServiceWorkerContainer::ServiceWorkerContainer):
92         (WebCore::ServiceWorkerContainer::refEventTarget): Ref the underlying Navigator.
93         (WebCore::ServiceWorkerContainer::derefEventTarget): Deref the underlying Navigator.
94         (WebCore::ServiceWorkerContainer::ready): rejectLater the promise.
95         (WebCore::ServiceWorkerContainer::addRegistration): Ditto.
96         (WebCore::ServiceWorkerContainer::getRegistration): Ditto.
97         (WebCore::ServiceWorkerContainer::getRegistrations): Ditto.
98         * workers/ServiceWorkerContainer.h:
99
100 2017-08-04  Chris Dumez  <cdumez@apple.com>
101
102         [Beacon] Update sendBeacon to use the CachedResourceLoader
103         https://bugs.webkit.org/show_bug.cgi?id=175192
104         <rdar://problem/33725923>
105
106         Reviewed by Youenn Fablet.
107
108         Update sendBeacon to use the FetchRequest / CachedResourceLoader instead of
109         the PingLoader. This gets us closer to the specification which is based on
110         Fetch and reduces code duplication. This also fixes an issue where our
111         Origin header was not properly set on Beacon resquests.
112
113         In a follow-up, we will implement in CachedResourceLoader Fetch's quota for
114         inflight keepalive requests which is needed to fully support sendBeacon().
115
116         * Modules/beacon/NavigatorBeacon.cpp:
117         (WebCore::NavigatorBeacon::sendBeacon):
118         * Modules/beacon/NavigatorBeacon.h:
119         * loader/LinkLoader.cpp:
120         (WebCore::createLinkPreloadResourceClient):
121         * loader/PingLoader.cpp:
122         * loader/PingLoader.h:
123         * loader/ResourceLoadInfo.cpp:
124         (WebCore::toResourceType):
125         * loader/SubresourceLoader.cpp:
126         (WebCore::logResourceLoaded):
127         * loader/cache/CachedResource.cpp:
128         (WebCore::CachedResource::defaultPriorityForResourceType):
129         (WebCore::CachedResource::load):
130         * loader/cache/CachedResource.h:
131         * loader/cache/CachedResourceLoader.cpp:
132         (WebCore::createResource):
133         (WebCore::CachedResourceLoader::requestBeaconResource):
134         (WebCore::contentTypeFromResourceType):
135         (WebCore::CachedResourceLoader::checkInsecureContent const):
136         (WebCore::CachedResourceLoader::allowedByContentSecurityPolicy const):
137         (WebCore::isResourceSuitableForDirectReuse):
138         * loader/cache/CachedResourceLoader.h:
139
140 2017-08-04  John Wilander  <wilander@apple.com>
141
142         Resource Load Statistics: Report user interaction immediately, but only when needed
143         https://bugs.webkit.org/show_bug.cgi?id=175090
144         <rdar://problem/33685546>
145
146         Reviewed by Chris Dumez.
147
148         Test: http/tests/loading/resourceLoadStatistics/user-interaction-only-reported-once-within-short-period-of-time.html
149
150         * loader/ResourceLoadObserver.cpp:
151         (WebCore::ResourceLoadObserver::ResourceLoadObserver):
152         (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
153             Now tells the UI process immediately but also records that it has
154             done so to avoid doing it when not needed.
155         (WebCore::ResourceLoadObserver::scheduleNotificationIfNeeded):
156             Conditional throttling gone, now always throttles.
157         (WebCore::ResourceLoadObserver::notifyObserver):
158             Renamed from ResourceLoadObserver::notificationTimerFired().
159         (WebCore::ResourceLoadObserver::clearState):
160             New function to allow the test runner to reset the web process'
161             statistics state now that we keep track of whether or not we've
162             reported user interaction to the UI process.
163         (WebCore::ResourceLoadObserver::setShouldThrottleObserverNotifications): Deleted.
164         (WebCore::ResourceLoadObserver::notificationTimerFired): Deleted.
165         * loader/ResourceLoadObserver.h:
166         (): Deleted.
167         * testing/Internals.cpp:
168         (WebCore::Internals::resetToConsistentState):
169         (WebCore::Internals::setResourceLoadStatisticsShouldThrottleObserverNotifications): Deleted.
170             No longer needed since user interaction is always communicated
171             immediately.
172         * testing/Internals.h:
173         * testing/Internals.idl:
174
175 2017-08-04  Matt Baker  <mattbaker@apple.com>
176
177         Web Inspector: capture async stack trace when workers/main context posts a message
178         https://bugs.webkit.org/show_bug.cgi?id=167084
179         <rdar://problem/30033673>
180
181         Reviewed by Brian Burg.
182
183         Add instrumentation to DOMWindow to support showing asynchronous
184         stack traces when the debugger pauses in a MessageEvent handler.
185
186         Test: inspector/debugger/async-stack-trace.html
187
188         * inspector/InspectorInstrumentation.cpp:
189         (WebCore::InspectorInstrumentation::didPostMessageImpl):
190         (WebCore::InspectorInstrumentation::didFailPostMessageImpl):
191         (WebCore::InspectorInstrumentation::willDispatchPostMessageImpl):
192         (WebCore::InspectorInstrumentation::didDispatchPostMessageImpl):
193
194         * inspector/InspectorInstrumentation.h:
195         (WebCore::InspectorInstrumentation::didPostMessage):
196         (WebCore::InspectorInstrumentation::didFailPostMessage):
197         (WebCore::InspectorInstrumentation::willDispatchPostMessage):
198         (WebCore::InspectorInstrumentation::didDispatchPostMessage):
199
200         * inspector/PageDebuggerAgent.cpp:
201         (WebCore::PageDebuggerAgent::didClearAsyncStackTraceData):
202         (WebCore::PageDebuggerAgent::didPostMessage):
203         (WebCore::PageDebuggerAgent::didFailPostMessage):
204         (WebCore::PageDebuggerAgent::willDispatchPostMessage):
205         (WebCore::PageDebuggerAgent::didDispatchPostMessage):
206         * inspector/PageDebuggerAgent.h:
207
208         * page/DOMWindow.cpp:
209         (WebCore::DOMWindow::postMessage):
210         (WebCore::DOMWindow::postMessageTimerFired):
211
212 2017-08-04  Devin Rousso  <drousso@apple.com>
213
214         Web Inspector: add source view for WebGL shader programs
215         https://bugs.webkit.org/show_bug.cgi?id=138593
216         <rdar://problem/18936194>
217
218         Reviewed by Matt Baker.
219
220         Test: inspector/canvas/requestShaderSource.html
221
222         * inspector/InspectorCanvasAgent.h:
223         * inspector/InspectorCanvasAgent.cpp:
224         (WebCore::InspectorCanvasAgent::requestShaderSource):
225
226         * inspector/InspectorShaderProgram.h:
227         * inspector/InspectorShaderProgram.cpp:
228         (WebCore::InspectorShaderProgram::shaderForType):
229
230 2017-08-04  Matt Lewis  <jlewis3@apple.com>
231
232         Unreviewed, rolling out r220288.
233
234         This broke multiple builds.
235
236         Reverted changeset:
237
238         "Use MPAVRoutingController instead of deprecated versions."
239         https://bugs.webkit.org/show_bug.cgi?id=175063
240         http://trac.webkit.org/changeset/220288
241
242 2017-08-03  Filip Pizlo  <fpizlo@apple.com>
243
244         The allocator used to allocate memory for MarkedBlocks and LargeAllocations should not be the Subspace itself
245         https://bugs.webkit.org/show_bug.cgi?id=175141
246
247         Reviewed by Mark Lam.
248
249         No new tests because no new behavior.
250         
251         Just adapting to an API change.
252
253         * ForwardingHeaders/heap/FastMallocAlignedMemoryAllocator.h: Added.
254         * bindings/js/WebCoreJSClientData.cpp:
255         (WebCore::JSVMClientData::JSVMClientData):
256
257 2017-08-04  Chris Dumez  <cdumez@apple.com>
258
259         Match newly-clarified spec on textarea defaultValue/value/child text content
260         https://bugs.webkit.org/show_bug.cgi?id=173878
261
262         Reviewed by Darin Adler.
263
264         Update HTMLTextArea.defaultValue to match align with other browsers and match the
265         latest HTML specification:
266         - https://html.spec.whatwg.org/#dom-textarea-defaultvalue
267
268         The defaultValue getter should return the child text content:
269         - https://dom.spec.whatwg.org/#concept-child-text-content
270         Our code was traversing all Text descendants, not just the children.
271
272         The defaultValue setter should act as the setter of the Element's textContent
273         IDL attribute. Previously, we had a custom logic that was only removing the
274         text children.
275
276         Test: imported/w3c/web-platform-tests/html/semantics/forms/the-textarea-element/value-defaultValue-textContent.html
277
278         * dom/ScriptElement.cpp:
279         (WebCore::ScriptElement::scriptContent const):
280         * dom/TextNodeTraversal.cpp:
281         (WebCore::TextNodeTraversal::childTextContent):
282         * dom/TextNodeTraversal.h:
283         * html/HTMLTextAreaElement.cpp:
284         (WebCore::HTMLTextAreaElement::defaultValue const):
285         (WebCore::HTMLTextAreaElement::setDefaultValue):
286         * html/HTMLTitleElement.cpp:
287         (WebCore::HTMLTitleElement::text const):
288
289 2017-08-04  Said Abou-Hallawa  <sabouhallawa@apple.com>
290
291         RenderImageResourceStyleImage::image() should return the nullImage() if the image is not available
292         https://bugs.webkit.org/show_bug.cgi?id=174874
293         <rdar://problem/33530130>
294
295         Reviewed by Simon Fraser.
296
297         If an <img> element has a non-CachedImage content data, e.g. -webkit-named-image,
298         RenderImageResourceStyleImage will be created and  attached to the RenderImage.
299         RenderImageResourceStyleImage::m_cachedImage will be set to null at the 
300         beginning because the m_styleImage->isCachedImage() is false in this case.
301         When ImageLoader finishes loading the url of the src attribute,
302         RenderImageResource::setCachedImage() will be called to set m_cachedImage.
303
304         A crash will happen when the RenderImage is destroyed. Destroying the 
305         RenderImage calls RenderImageResourceStyleImage::shutdown() which checks
306         m_cachedImage and finds it not null, so it calls RenderImageResourceStyleImage::image()
307         which ends up calling CSSNamedImageValue::image() which returns a null pointer
308         because the size is empty. RenderImageResourceStyleImage::shutdown() calls
309         image()->stopAnimation() without checking the return value of image().
310
311         Another crash will happen later when deleting the CachedImage from the memory
312         cache if CachedImage::canDestroyDecodedData() is called because the client
313         it gets from m_clients is a freed pointer. This happens because RenderImageResourceStyleImage
314         has m_styleImage of type StyleGeneratedImage but its m_cachedImage is set
315         by RenderImageResource::setCachedImage(). When RenderImageResourceStyleImage::shutdown()
316         is called, it calls  StyleGeneratedImage::removeClient() which does not 
317         know anything about RenderImageResourceStyleImage::m_cachedImage. So we 
318         end up having a freed pointer in the m_clients of the CachedImage.
319
320         Test: fast/images/image-element-image-content-data.html
321
322         * rendering/RenderImageResourceStyleImage.cpp:
323         (WebCore::RenderImageResourceStyleImage::shutdown):  Revert back the changes
324         of r208511 in this function. Add a call to image()->stopAnimation() without
325         checking the return of image() since it will return the nullImage() if
326         the image not available. There is no need to check m_cachedImage before 
327         calling image() because image() does not check or access m_cachedImage.
328
329         If m_styleImage is not a CachedStyleImage but m_cachedImage is not null,
330         we need to remove m_renderer from the set of the clients of this m_cachedImage.
331
332         (WebCore::RenderImageResourceStyleImage::image const): The base class method
333         RenderImageResource::image() returns the nullImage() if the image not
334         available. This is because CachedImage::imageForRenderer() returns
335         the nullImage() if the image is not available; see CachedImage.h. We should
336         do the same for the derived class for consistency.
337
338 2017-08-04  Jeremy Jones  <jeremyj@apple.com>
339
340         Use MPAVRoutingController instead of deprecated versions.
341         https://bugs.webkit.org/show_bug.cgi?id=175063
342
343         Reviewed by Tim Horton.
344
345         No new tests because no behavior change. This uses a different platform class to present
346         an interface.
347
348         Remove deprecated MPAudioVideoRoutingPopoverController and MPAVRoutingSheet
349         Add MPMediaControlsViewController.
350
351         * platform/spi/ios/MediaPlayerSPI.h:
352
353 2017-08-04  Matt Baker  <mattbaker@apple.com>
354
355         Web Inspector: REGRESSION (r220233): Check for null pointer passed to WebGLRenderingContextBase::deleteProgram
356         https://bugs.webkit.org/show_bug.cgi?id=175196
357         <rdar://problem/33727603>
358
359         Reviewed by Devin Rousso.
360
361         * html/canvas/WebGLRenderingContextBase.cpp:
362         (WebCore::WebGLRenderingContextBase::deleteProgram):
363
364 2017-08-04  Matt Lewis  <jlewis3@apple.com>
365
366         Unreviewed, rolling out r220271.
367
368         Rolling out due to Layout Test failing on iOS Simulator.
369
370         Reverted changeset:
371
372         "Remove STREAMS_API compilation guard"
373         https://bugs.webkit.org/show_bug.cgi?id=175165
374         http://trac.webkit.org/changeset/220271
375
376 2017-08-03  Sam Weinig  <sam@webkit.org>
377
378         [Cleanup] Remove ScriptGlobalObject
379         https://bugs.webkit.org/show_bug.cgi?id=175173
380
381         Reviewed by Darin Adler.
382
383         ScriptGlobalObject's two functions were only being used in
384         four places. Three of those uses (ScriptGlobalObject::set in 
385         InspectorFrontendClientLocal, WebInspectorUI, and RemoteWebInspectorUI)
386         were merged into the new function addSelfToGlobalObjectInWorld on
387         InspectorFrontendHost. The remaining function (ScriptGlobalObject::get
388         in InspectorFrontendHost) was easily inlined.
389
390         * CMakeLists.txt:
391         * WebCore.xcodeproj/project.pbxproj:
392         * bindings/js/JSBindingsAllInOne.cpp:
393         * bindings/js/ScriptGlobalObject.cpp: Removed.
394         * bindings/js/ScriptGlobalObject.h: Removed.
395         Removed ScriptGlobalObject.
396
397         * inspector/InspectorFrontendClientLocal.cpp:
398         (WebCore::InspectorFrontendClientLocal::windowObjectCleared):
399         Remove call to ScriptGlobalObject::set and use addSelfToGlobalObjectInWorld instead.
400
401         * inspector/InspectorFrontendHost.h:
402         * inspector/InspectorFrontendHost.cpp:
403         (WebCore::InspectorFrontendHost::showContextMenu):
404         Inline ScriptGlobalObject::get.
405
406         (WebCore::InspectorFrontendHost::addSelfToGlobalObjectInWorld):
407         Add helper which inlines ScriptGlobalObject::set and works
408         as a helper for the three inspector frontends.
409
410 2017-08-04  Ryan Haddad  <ryanhaddad@apple.com>
411
412         Unreviewed, rolling out r220268.
413
414         This change caused assertion failures on macOS and iOS Debug
415         WK2.
416
417         Reverted changeset:
418
419         "Resource Load Statistics: Report user interaction
420         immediately, but only when needed"
421         https://bugs.webkit.org/show_bug.cgi?id=175090
422         http://trac.webkit.org/changeset/220268
423
424 2017-08-04  Youenn Fablet  <youenn@apple.com>
425
426         Remove STREAMS_API compilation guard
427         https://bugs.webkit.org/show_bug.cgi?id=175165
428
429         Reviewed by Darin Adler.
430
431         No change of behavior.
432
433         * Configurations/FeatureDefines.xcconfig:
434         * Modules/fetch/FetchBody.cpp:
435         (WebCore::FetchBody::consumeAsStream):
436         * Modules/fetch/FetchBody.h:
437         * Modules/fetch/FetchBodyOwner.cpp:
438         (WebCore::FetchBodyOwner::isDisturbedOrLocked const):
439         (WebCore::FetchBodyOwner::blobLoadingSucceeded):
440         (WebCore::FetchBodyOwner::blobLoadingFailed):
441         (WebCore::FetchBodyOwner::blobChunk):
442         * Modules/fetch/FetchBodyOwner.h:
443         * Modules/fetch/FetchResponse.cpp:
444         (WebCore::FetchResponse::BodyLoader::didSucceed):
445         (WebCore::FetchResponse::BodyLoader::didFail):
446         (WebCore::FetchResponse::BodyLoader::didReceiveData):
447         * Modules/fetch/FetchResponse.h:
448         * Modules/fetch/FetchResponse.idl:
449         * Modules/fetch/FetchResponse.js:
450         (initializeFetchResponse):
451         * Modules/fetch/FetchResponseSource.cpp:
452         * Modules/fetch/FetchResponseSource.h:
453         * Modules/streams/ByteLengthQueuingStrategy.idl:
454         * Modules/streams/ByteLengthQueuingStrategy.js:
455         * Modules/streams/CountQueuingStrategy.idl:
456         * Modules/streams/CountQueuingStrategy.js:
457         * Modules/streams/ReadableByteStreamController.idl:
458         * Modules/streams/ReadableByteStreamController.js:
459         * Modules/streams/ReadableByteStreamInternals.js:
460         * Modules/streams/ReadableStream.idl:
461         * Modules/streams/ReadableStream.js:
462         * Modules/streams/ReadableStreamBYOBReader.idl:
463         * Modules/streams/ReadableStreamBYOBReader.js:
464         * Modules/streams/ReadableStreamBYOBRequest.idl:
465         * Modules/streams/ReadableStreamBYOBRequest.js:
466         * Modules/streams/ReadableStreamDefaultController.idl:
467         * Modules/streams/ReadableStreamDefaultController.js:
468         * Modules/streams/ReadableStreamDefaultReader.idl:
469         * Modules/streams/ReadableStreamDefaultReader.js:
470         * Modules/streams/ReadableStreamInternals.js:
471         * Modules/streams/ReadableStreamSource.h:
472         * Modules/streams/ReadableStreamSource.idl:
473         * Modules/streams/StreamInternals.js:
474         * Modules/streams/WritableStream.idl:
475         * Modules/streams/WritableStream.js:
476         * Modules/streams/WritableStreamInternals.js:
477         * bindings/js/JSDOMGlobalObject.cpp:
478         (WebCore::isReadableByteStreamAPIEnabled):
479         (WebCore::JSDOMGlobalObject::addBuiltinGlobals):
480         * bindings/js/JSReadableStreamPrivateConstructors.cpp:
481         * bindings/js/JSReadableStreamPrivateConstructors.h:
482         * bindings/js/JSReadableStreamSourceCustom.cpp:
483         * bindings/js/ReadableStreamDefaultController.cpp:
484         * bindings/js/ReadableStreamDefaultController.h:
485         * page/RuntimeEnabledFeatures.h:
486         * testing/Internals.cpp:
487         * testing/Internals.h:
488         * testing/Internals.idl:
489
490 2017-08-04  Zan Dobersek  <zdobersek@igalia.com>
491
492         [EME][GStreamer] Register ClearKey CDMFactory
493         https://bugs.webkit.org/show_bug.cgi?id=175136
494
495         Reviewed by Xabier Rodriguez-Calvar.
496
497         Register the ClearKey CDM factory in CDMFactoryGStreamer. A CDMFactoryClearKey
498         singleton object is introduced and used for that registration.
499
500         The basic CDMFactoryClearKey and CDMPrivateClearKey methods are implemented,
501         marking `org.w3.clearkey` as the supported key system and `keyids` as the
502         supported init data type. Additional logic around key system configurations,
503         distinctive identifiers, persistent state and related restrictions and
504         requirements is implemented.
505
506         This improves the ClearKey EME tests a bit, now progressing to the point of
507         failing with a NotAllowedError exception due to the CDMInstance object failing
508         to properly initialize because of missing implementation.
509
510         No new tests -- relevant tests have underlying baselines updated to reflect
511         changes in behavior.
512
513         * platform/encryptedmedia/clearkey/CDMClearKey.cpp:
514         (WebCore::CDMFactoryClearKey::singleton):
515         (WebCore::CDMFactoryClearKey::supportsKeySystem):
516         (WebCore::CDMPrivateClearKey::supportsInitDataType const):
517         (WebCore::CDMPrivateClearKey::supportsConfiguration const):
518         (WebCore::CDMPrivateClearKey::supportsConfigurationWithRestrictions const):
519         (WebCore::CDMPrivateClearKey::supportsSessionTypeWithConfiguration const):
520         (WebCore::CDMPrivateClearKey::supportsRobustness const):
521         (WebCore::CDMPrivateClearKey::distinctiveIdentifiersRequirement const):
522         (WebCore::CDMPrivateClearKey::persistentStateRequirement const):
523         * platform/encryptedmedia/clearkey/CDMClearKey.h:
524         * platform/graphics/gstreamer/eme/CDMFactoryGStreamer.cpp:
525         (WebCore::CDMFactory::platformRegisterFactories):
526
527 2017-08-04  John Wilander  <wilander@apple.com>
528
529         Resource Load Statistics: Report user interaction immediately, but only when needed
530         https://bugs.webkit.org/show_bug.cgi?id=175090
531         <rdar://problem/33685546>
532
533         Reviewed by Chris Dumez.
534
535         Test: http/tests/loading/resourceLoadStatistics/user-interaction-only-reported-once-within-short-period-of-time.html
536
537         * loader/ResourceLoadObserver.cpp:
538         (WebCore::ResourceLoadObserver::ResourceLoadObserver):
539         (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
540             Now tells the UI process immediately but also records that it has
541             done so to avoid doing it when not needed.
542         (WebCore::ResourceLoadObserver::scheduleNotificationIfNeeded):
543             Conditional throttling gone, now always throttles.
544         (WebCore::ResourceLoadObserver::notifyObserver):
545             Renamed from ResourceLoadObserver::notificationTimerFired().
546         (WebCore::ResourceLoadObserver::clearState):
547             New function to allow the test runner to reset the web process'
548             statistics state now that we keep track of whether or not we've
549             reported user interaction to the UI process.
550         (WebCore::ResourceLoadObserver::setShouldThrottleObserverNotifications): Deleted.
551         (WebCore::ResourceLoadObserver::notificationTimerFired): Deleted.
552         * loader/ResourceLoadObserver.h:
553         (): Deleted.
554         * testing/Internals.cpp:
555         (WebCore::Internals::resetToConsistentState):
556         (WebCore::Internals::setResourceLoadStatisticsShouldThrottleObserverNotifications): Deleted.
557             No longer needed since user interaction is always communicated
558             immediately.
559         * testing/Internals.h:
560         * testing/Internals.idl:
561
562 2017-08-04  Zan Dobersek  <zdobersek@igalia.com>
563
564         [EME] Push CDMFactory into the platform layer
565         https://bugs.webkit.org/show_bug.cgi?id=175129
566
567         Reviewed by Xabier Rodriguez-Calvar.
568
569         This is a follow-up to r219678 that moved the majority of CDM abstraction
570         classes into the platform layer, but missed the CDMFactory class.
571
572         The CDMFactory abstraction is now also placed in the platform layer. Only
573         change to the interface is that the createCDM() method can't accept a CDM
574         object reference anymore since that class is cemented into the WebCore
575         layer, and no current implementation used it anyway.
576
577         Additionally, the static Vector object of registered factories is moved
578         under the CDMFactory class, along with the register and unregister
579         functions. The platformRegisterFactories() function is added to allow for
580         platform-specific factory registrations to occur when the registered
581         factories are queried for the first time. Empty implementation for this
582         function is provided for non-GStreamer platforms, while for GStreamer
583         the implementation is kept in CDMFactoryGStreamer.cpp. It's still empty
584         for now, but it will register the ClearKey factory there in the near
585         future.
586
587         No new tests -- none affected, only refactoring.
588
589         * CMakeLists.txt:
590         * Modules/encryptedmedia/CDM.cpp:
591         (WebCore::createCDMPrivateForKeySystem):
592         (WebCore::CDM::supportsKeySystem):
593         (WebCore::CDM::CDM):
594         (): Deleted.
595         (WebCore::CDM::registerCDMFactory): Deleted.
596         (WebCore::CDM::unregisterCDMFactory): Deleted.
597         * Modules/encryptedmedia/CDM.h:
598         (WebCore::CDMFactory::~CDMFactory): Deleted.
599         * PlatformWPE.cmake:
600         * platform/GStreamer.cmake:
601         * platform/encryptedmedia/CDMFactory.cpp: Added.
602         (WebCore::CDMFactory::registerFactory):
603         (WebCore::CDMFactory::unregisterFactory):
604         (WebCore::CDMFactory::platformRegisterFactories):
605         * platform/encryptedmedia/CDMFactory.h: Added.
606         (WebCore::CDMFactory::~CDMFactory):
607         * platform/encryptedmedia/clearkey/CDMClearKey.cpp:
608         (WebCore::CDMFactoryClearKey::createCDM):
609         * platform/encryptedmedia/clearkey/CDMClearKey.h:
610         * platform/encryptedmedia/gstreamer/CDMFactoryGStreamer.cpp: Added.
611         (WebCore::CDMFactory::platformRegisterFactories):
612         * testing/MockCDMFactory.cpp:
613         (WebCore::m_weakPtrFactory):
614         (WebCore::MockCDMFactory::unregister):
615         (WebCore::MockCDMFactory::createCDM):
616         * testing/MockCDMFactory.h:
617
618 2017-08-04  Frederic Wang  <fwang@igalia.com>
619
620         ScrollingTreeOverflowScrollingNodeIOS uses the wrong fixed position rectangle
621         https://bugs.webkit.org/show_bug.cgi?id=175135
622
623         Reviewed by Simon Fraser.
624
625         This patch modifies ScrollingTreeOverflowScrollingNodeIOS::updateChildNodesAfterScroll so
626         that it uses the fixed position rectangle relative of the first frame ancestor instead of
627         the one of the main frame. This makes it consistent with ScrollingTreeFrameScrollingNodeIOS
628         and RenderLayerCompositor. This fixes some flickering issues on iOS.
629
630         Test: fast/scrolling/ios/fixed-inside-overflow-inside-iframe.html
631
632         * page/scrolling/ScrollingTreeFrameScrollingNode.h:
633         (WebCore::ScrollingTreeFrameScrollingNode::fixedPositionRect): Helper function to get the
634         fixed position rect to use for that frame.
635         * page/scrolling/ScrollingTreeNode.cpp:
636         (WebCore::ScrollingTreeNode::enclosingFrameNode const): Helper function to get the enclosing
637         frame for this scrolling node or null if there is none.
638         * page/scrolling/ScrollingTreeNode.h: Declare enclosingFrameNode.
639
640 2017-08-04  Zan Dobersek  <zdobersek@igalia.com>
641
642         Unreviewed. Removing redundant NotImplemented.h header inclusions
643         and cleaning up whitespace issues in libgcrypt-specific CryptoKeyEC
644         and CryptoKeyRSA implementation files.
645
646         * crypto/gcrypt/CryptoKeyECGCrypt.cpp:
647         * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
648
649 2017-08-04  Jeremy Jones  <jeremyj@apple.com>
650
651         Remove unnecesary call to status bar SPI.
652         https://bugs.webkit.org/show_bug.cgi?id=175176
653         rdar://problem/20887306
654
655         Reviewed by Darin Adler.
656
657         No new tests because no behavior change.
658
659         This removes an obsolete call to SPI.
660
661         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
662         (VideoFullscreenInterfaceAVKit::cleanupFullscreen):
663
664 2017-08-03  Zan Dobersek  <zdobersek@igalia.com>
665
666         [GCrypt] Implement CryptoKeyEC PKCS#8 imports
667         https://bugs.webkit.org/show_bug.cgi?id=173647
668
669         Reviewed by Jiewen Tan.
670
671         No new tests -- affected tests are now passing and are unskipped.
672
673         Implement libgcrypt-based support for PKCS#8 imports of EC keys.
674
675         Existing libtasn1 utilities are used to achieve this. First, the provided key data
676         is decoded against the PrivateKeyInfo ASN.1 definition. First, the version member
677         of that structure is validated, followed by the algorithm member. The latter is
678         also properly tested depending on this being an import of an ECDSA or ECDH key.
679
680         Data of the parameters member is decoded against the ECParameters ASN.1 definition,
681         and the namedCurve object identifier is validated, making sure it represents a
682         valid EC curve and that this curve maches the one specified for the import
683         operation.
684
685         Data of the privateKey member is decoded against the ECPrivateKey ASN.1 definition.
686         The version member of that structure is properly validated. The optional parameters
687         member of that structure is already decoded against the ECParameters ASN.1
688         definition. If present, it is checked to contain a valid EC curve identifier that
689         matches the specified curve.
690
691         The optional publicKey member of the ECPrivateKey structure is validated, testing
692         that its data matches in size an uncompressed EC point, and that the first byte
693         of this data is 0x04, as expected for an uncompressed EC point.
694
695         What's left is the private key data on the initial ECPrivateKey structure. That
696         data is retrieved and validated, making sure its size matches the size of the
697         specified curve. The `private-key` s-expression is then constructed, embedding
698         the curve name and the validated private key data. This s-expression is then used
699         to construct an EC context.
700
701         If the optional publicKey data was provided, it's used to set the `q` parameter
702         for this EC context. Otherwise, the value for `q` is computed on-the-fly for the
703         specified EC and the provided private key. The `q` point is then tested through
704         the gcry_mpi_ec_curve_point() function, making sure that the derived point is
705         indeed located on the given EC.
706
707         Finally, with the private key properly validated, a new CryptoKeyEC object is
708         constructed, using the `private-key` s-expression and the parameters that were
709         specified for this import operation.
710
711         * crypto/gcrypt/CryptoKeyECGCrypt.cpp:
712         (WebCore::CryptoKeyEC::platformImportPkcs8):
713         * crypto/gcrypt/GCryptUtilities.h:
714
715 2017-08-03  Chris Dumez  <cdumez@apple.com>
716
717         Fix parsing of <meta http-equiv=refresh> to allow time starting with a '.' without a leading 0
718         https://bugs.webkit.org/show_bug.cgi?id=175132
719
720         Reviewed by Darin Adler.
721
722         Fix parsing of <meta http-equiv=refresh> to allow time starting with a '.', without
723         a leading 0. This is as per https://github.com/whatwg/html/pull/2852.
724
725         The latest spec is at:
726         - https://html.spec.whatwg.org/multipage/semantics.html#attr-meta-http-equiv-refresh
727
728         Test: imported/w3c/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/parsing.html
729
730         * html/parser/HTMLParserIdioms.cpp:
731         (WebCore::parseHTTPRefreshInternal):
732
733 2017-08-03  Brian Burg  <bburg@apple.com>
734
735         Remove ENABLE(WEB_SOCKET) guards
736         https://bugs.webkit.org/show_bug.cgi?id=167044
737
738         Reviewed by Joseph Pecoraro.
739
740         * Configurations/FeatureDefines.xcconfig:
741         * Modules/websockets/ThreadableWebSocketChannel.cpp:
742         * Modules/websockets/ThreadableWebSocketChannel.h:
743         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
744         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
745         * Modules/websockets/WebSocket.cpp:
746         * Modules/websockets/WebSocket.h:
747         * Modules/websockets/WebSocket.idl:
748         * Modules/websockets/WebSocketChannel.cpp:
749         * Modules/websockets/WebSocketChannel.h:
750         * Modules/websockets/WebSocketChannelClient.h:
751         * Modules/websockets/WebSocketDeflateFramer.cpp:
752         * Modules/websockets/WebSocketDeflateFramer.h:
753         * Modules/websockets/WebSocketDeflater.cpp:
754         * Modules/websockets/WebSocketDeflater.h:
755         * Modules/websockets/WebSocketExtensionDispatcher.cpp:
756         * Modules/websockets/WebSocketExtensionDispatcher.h:
757         * Modules/websockets/WebSocketExtensionParser.cpp:
758         * Modules/websockets/WebSocketExtensionParser.h:
759         * Modules/websockets/WebSocketExtensionProcessor.h:
760         * Modules/websockets/WebSocketFrame.cpp:
761         * Modules/websockets/WebSocketFrame.h:
762         * Modules/websockets/WebSocketHandshake.cpp:
763         * Modules/websockets/WebSocketHandshake.h:
764         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
765         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
766         * dom/Document.cpp:
767         (WebCore::Document::Document):
768         (WebCore::Document::idbConnectionProxy):
769         (WebCore::Document::socketProvider):
770         * dom/Document.h:
771         * dom/ScriptExecutionContext.h:
772         * inspector/InspectorInstrumentation.cpp:
773         (WebCore::InspectorInstrumentation::didSendWebSocketFrameImpl):
774         * inspector/InspectorInstrumentation.h:
775         (WebCore::InspectorInstrumentation::didSendWebSocketFrame):
776         * inspector/InspectorNetworkAgent.cpp:
777         * inspector/InspectorNetworkAgent.h:
778         * page/RuntimeEnabledFeatures.cpp:
779         (WebCore::RuntimeEnabledFeatures::webSocketEnabled const):
780         * page/RuntimeEnabledFeatures.h:
781         * page/SocketProvider.cpp:
782         * page/SocketProvider.h:
783         * workers/WorkerGlobalScope.cpp:
784         (WebCore::WorkerGlobalScope::WorkerGlobalScope):
785         * workers/WorkerGlobalScope.h:
786         * workers/WorkerMessagingProxy.cpp:
787         (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
788         * workers/WorkerThread.cpp:
789         (WebCore::WorkerThread::WorkerThread):
790         (WebCore::WorkerThread::socketProvider):
791         * workers/WorkerThread.h:
792
793 2017-08-03  Don Olmstead  <don.olmstead@sony.com>
794
795         Remove LayoutUnit dependency in TextStream
796         https://bugs.webkit.org/show_bug.cgi?id=175110
797
798         Reviewed by Zalan Bujtas.
799
800         No new tests. No change in behavior.
801
802         * CMakeLists.txt:
803         * WebCore.xcodeproj/project.pbxproj:
804         * platform/LayoutUnit.cpp: Added.
805         (WebCore::operator<<):
806         * platform/LayoutUnit.h:
807         * platform/text/TextStream.cpp:
808         * platform/text/TextStream.h:
809
810 2017-08-03  Jeremy Jones  <jeremyj@apple.com>
811
812         Improve WebKitLegacy video fullscreen animation begin and end rects.
813         https://bugs.webkit.org/show_bug.cgi?id=175152
814         rdar://problem/32840576
815
816         Reviewed by Eric Carlson.
817
818         No new tests, becuase this change has no effect on the DOM.
819
820         This change uses different rects for fullscreen animation to prevent the animation
821         from failing, and to improve the aesthetics of the animation.
822
823         * platform/mac/WebVideoFullscreenController.mm:
824         (frameExpandedToRatioOfFrame):
825         (-[WebVideoFullscreenController enterFullscreen:]):
826         (-[WebVideoFullscreenController exitFullscreen]):
827         (-[WebVideoFullscreenWindow animateFromRect:toRect:withSubAnimation:controllerAction:]):
828         (constrainFrameToRatioOfFrame): Deleted.
829
830 2017-08-03  Jer Noble  <jer.noble@apple.com>
831
832         [EME][Mac] SecureStop left on disk in Private Browsing mode.
833         https://bugs.webkit.org/show_bug.cgi?id=175162
834
835         Reviewed by Eric Carlson.
836
837         Return an empty string from mediaKeysStorageDirectory() when the page indicates that storage should
838         be ephemeral(). Previously, an empty string in this case would be treated as an error. Instead, treat
839         an empty string as valid, and do not try to store or retrieve session information to disk in that case.
840
841         * Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp:
842         (WebCore::WebKitMediaKeySession::mediaKeysStorageDirectory const):
843         * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
844         (WebCore::CDMSessionAVContentKeySession::releaseKeys):
845         (WebCore::CDMSessionAVContentKeySession::update):
846         (WebCore::CDMSessionAVContentKeySession::generateKeyReleaseMessage):
847         (WebCore::CDMSessionAVContentKeySession::contentKeySession):
848         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
849         (WebCore::CDMSessionMediaSourceAVFObjC::storagePath const):
850
851 2017-08-03  Youenn Fablet  <youenn@apple.com>
852
853         [Fetch API] Add support for Request keepalive getter
854         https://bugs.webkit.org/show_bug.cgi?id=175151
855
856         Reviewed by Chris Dumez.
857
858         Test: imported/w3c/web-platform-tests/fetch/api/request/request-keepalive.html
859
860         Adding keepalive as a fetch option.
861         Adding initialization and getter of keepalive into FetchRequest.
862
863         * Modules/fetch/FetchRequest.cpp:
864         (WebCore::buildOptions):
865         * Modules/fetch/FetchRequest.h:
866         * Modules/fetch/FetchRequest.idl:
867         * loader/FetchOptions.h:
868
869 2017-08-03  Yoshiaki Jitsukawa  <jitsu@rd.scei.sony.co.jp>
870
871         [PAL] Move spi/cf directory into PAL
872         https://bugs.webkit.org/show_bug.cgi?id=175057
873
874         Reviewed by Antti Koivisto.
875
876         * WebCore.xcodeproj/project.pbxproj:
877         * loader/cocoa/DiskCacheMonitorCocoa.mm:
878         * loader/cocoa/SubresourceLoaderCocoa.mm:
879         * loader/mac/ResourceLoaderMac.mm:
880         * platform/cf/CoreMediaSoftLink.cpp:
881         * platform/cf/CoreMediaSoftLink.h:
882         * platform/mac/PluginBlacklist.mm:
883         * platform/mac/WebCoreNSStringExtras.mm:
884         * platform/mac/WebGLBlacklist.mm:
885         * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
886         * platform/network/NetworkStorageSession.h:
887         * platform/network/cf/CookieJarCFNet.cpp:
888         * platform/network/cf/CredentialStorageCFNet.cpp:
889         * platform/network/cf/ResourceHandleCFNet.cpp:
890         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
891         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
892         * platform/network/cf/ResourceRequestCFNet.cpp:
893         * platform/network/cf/ResourceRequestCFNet.h:
894         * platform/network/cf/ResourceResponse.h:
895         * platform/network/cf/ResourceResponseCFNet.cpp:
896         * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
897         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
898         * platform/network/cocoa/CookieStorageObserver.h:
899         * platform/network/cocoa/CredentialCocoa.h:
900         * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
901         * platform/network/cocoa/ResourceRequestCocoa.mm:
902         * platform/network/cocoa/ResourceResponseCocoa.mm:
903         * platform/network/ios/ResourceRequestIOS.mm:
904         * platform/network/mac/CookieJarMac.mm:
905         * platform/network/mac/FormDataStreamMac.mm:
906         * platform/network/mac/ResourceHandleMac.mm:
907         * platform/network/mac/ResourceRequestMac.mm:
908         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
909         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
910         * platform/network/mac/WebCoreURLResponse.h:
911         * testing/cocoa/WebArchiveDumpSupport.mm:
912
913 2017-08-03  Youenn Fablet  <youenn@apple.com>
914
915         Remove FETCH_API compilation guard
916         https://bugs.webkit.org/show_bug.cgi?id=175154
917
918         Reviewed by Chris Dumez.
919
920         No change of behavior.
921
922         * Configurations/FeatureDefines.xcconfig:
923         * Modules/fetch/DOMWindowFetch.cpp:
924         * Modules/fetch/DOMWindowFetch.h:
925         * Modules/fetch/DOMWindowFetch.idl:
926         * Modules/fetch/FetchBody.cpp:
927         * Modules/fetch/FetchBody.h:
928         * Modules/fetch/FetchBody.idl:
929         * Modules/fetch/FetchBodyConsumer.cpp:
930         * Modules/fetch/FetchBodyConsumer.h:
931         * Modules/fetch/FetchBodyOwner.cpp:
932         * Modules/fetch/FetchBodyOwner.h:
933         * Modules/fetch/FetchHeaders.cpp:
934         * Modules/fetch/FetchHeaders.h:
935         * Modules/fetch/FetchHeaders.idl:
936         * Modules/fetch/FetchInternals.js:
937         * Modules/fetch/FetchLoader.cpp:
938         * Modules/fetch/FetchLoader.h:
939         * Modules/fetch/FetchLoaderClient.h:
940         * Modules/fetch/FetchRequest.cpp:
941         * Modules/fetch/FetchRequest.h:
942         * Modules/fetch/FetchRequest.idl:
943         * Modules/fetch/FetchResponse.cpp:
944         * Modules/fetch/FetchResponse.h:
945         * Modules/fetch/FetchResponse.idl:
946         * Modules/fetch/FetchResponse.js:
947         * Modules/fetch/FetchResponseSource.cpp:
948         * Modules/fetch/FetchResponseSource.h:
949         * Modules/fetch/WorkerGlobalScopeFetch.cpp:
950         * Modules/fetch/WorkerGlobalScopeFetch.h:
951         * Modules/fetch/WorkerGlobalScopeFetch.idl:
952         * page/RuntimeEnabledFeatures.h:
953         (WebCore::RuntimeEnabledFeatures::fetchAPIEnabled const):
954
955 2017-08-03  Devin Rousso  <drousso@apple.com>
956
957         Web Inspector: add button to open Inspector^2
958         https://bugs.webkit.org/show_bug.cgi?id=175108
959
960         Reviewed by Brian Burg.
961
962         This patch just exposes a function to the inspector page. No new functionality was added.
963
964         * inspector/InspectorFrontendHost.idl:
965         * inspector/InspectorFrontendHost.h:
966         * inspector/InspectorFrontendHost.cpp:
967         (WebCore::InspectorFrontendHost::inspectInspector):
968
969 2017-08-03  Matt Baker  <mattbaker@apple.com>
970
971         Web Inspector: Instrument WebGLProgram created/deleted
972         https://bugs.webkit.org/show_bug.cgi?id=175059
973
974         Reviewed by Devin Rousso.
975
976         Tests: inspector/canvas/shaderProgram-add-remove-webgl.html
977                inspector/canvas/shaderProgram-add-remove-webgl2.html
978
979         This patch adds instrumentation to WebGLRenderingContextBase for tracking
980         WebGLPrograms. A new helper class, InspectorShaderProgram, is used by
981         the CanvasAgent to hold related data.
982
983         * CMakeLists.txt:
984         * WebCore.xcodeproj/project.pbxproj:
985
986         * html/canvas/WebGLRenderingContextBase.cpp:
987         (WebCore::WebGLRenderingContextBase::createProgram):
988         (WebCore::WebGLRenderingContextBase::deleteProgram):
989
990         * inspector/InspectorCanvasAgent.cpp:
991         (WebCore::InspectorCanvasAgent::enable):
992         (WebCore::InspectorCanvasAgent::frameNavigated):
993         (WebCore::InspectorCanvasAgent::didCreateProgram):
994         (WebCore::InspectorCanvasAgent::willDeleteProgram):
995         (WebCore::InspectorCanvasAgent::clearCanvasData):
996         (WebCore::InspectorCanvasAgent::unbindCanvas):
997         (WebCore::InspectorCanvasAgent::unbindProgram):
998         (WebCore::InspectorCanvasAgent::assertInspectorProgram):
999         (WebCore::InspectorCanvasAgent::findInspectorProgram):
1000         * inspector/InspectorCanvasAgent.h:
1001
1002         * inspector/InspectorInstrumentation.cpp:
1003         (WebCore::InspectorInstrumentation::didCreateCSSCanvasImpl):
1004         (WebCore::InspectorInstrumentation::didChangeCSSCanvasClientNodesImpl):
1005         (WebCore::InspectorInstrumentation::didCreateCanvasRenderingContextImpl):
1006         (WebCore::InspectorInstrumentation::didChangeCanvasMemoryImpl):
1007         (WebCore::InspectorInstrumentation::recordCanvasActionImpl):
1008         (WebCore::InspectorInstrumentation::didFinishRecordingCanvasFrameImpl):
1009         (WebCore::InspectorInstrumentation::didCreateProgramImpl):
1010         (WebCore::InspectorInstrumentation::willDeleteProgramImpl):
1011
1012         * inspector/InspectorInstrumentation.h:
1013         (WebCore::InspectorInstrumentation::recordCanvasActionImpl):
1014         (WebCore::InspectorInstrumentation::didCreateCSSCanvas):
1015         (WebCore::InspectorInstrumentation::didChangeCSSCanvasClientNodes):
1016         (WebCore::InspectorInstrumentation::didCreateCanvasRenderingContext):
1017         (WebCore::InspectorInstrumentation::didChangeCanvasMemory):
1018         (WebCore::InspectorInstrumentation::recordCanvasAction):
1019         (WebCore::InspectorInstrumentation::didFinishRecordingCanvasFrame):
1020         (WebCore::InspectorInstrumentation::didCreateProgram):
1021         (WebCore::InspectorInstrumentation::willDeleteProgram):
1022
1023         * inspector/InspectorShaderProgram.cpp: Added.
1024         (WebCore::InspectorShaderProgram::create):
1025         (WebCore::InspectorShaderProgram::InspectorShaderProgram):
1026         (WebCore::InspectorShaderProgram::context const):
1027         * inspector/InspectorShaderProgram.h: Added.
1028
1029 2017-08-03  Matt Lewis  <jlewis3@apple.com>
1030
1031         Unreviewed, rolling out r220209.
1032
1033         This caused internal build failures.
1034
1035         Reverted changeset:
1036
1037         "Use MPAVRoutingController instead of deprecated versions."
1038         https://bugs.webkit.org/show_bug.cgi?id=175063
1039         http://trac.webkit.org/changeset/220209
1040
1041 2017-08-03  Brady Eidson  <beidson@apple.com>
1042
1043         Add SW IDLs and stub out basic functionality.
1044         https://bugs.webkit.org/show_bug.cgi?id=175115
1045
1046         Reviewed by Chris Dumez.
1047
1048         No new tests (Currently no behavior change).
1049
1050         Overall note: This feature is EnabledAtRuntime as opposed to EnabledBySetting because
1051         the Settings-based code generation is completely broken for non-Document contexts,
1052         whereas the RuntimeEnabledFeatures-based generation is not.
1053     
1054         * CMakeLists.txt:
1055         * Configurations/FeatureDefines.xcconfig:
1056         * DerivedSources.make:
1057         * WebCore.xcodeproj/project.pbxproj:
1058
1059         * bindings/scripts/preprocess-idls.pl: Handle the new global scope c'tor file.
1060
1061         * bindings/js/JSServiceWorkerContainerCustom.cpp: Added.
1062         (WebCore::JSServiceWorkerContainer::ready const):
1063
1064         * bindings/js/JSWorkerGlobalScopeBase.cpp:
1065         (WebCore::toJSWorkerGlobalScope): Refactor to handle both types of derived workers.
1066         (WebCore::toJSServiceWorkerGlobalScope):
1067         * bindings/js/JSWorkerGlobalScopeBase.h:
1068
1069         * dom/EventNames.h:
1070         * dom/EventTargetFactory.in:
1071
1072         * features.json: Change status of feature.
1073
1074         * page/Navigator.idl:
1075         * page/NavigatorBase.cpp:
1076         (WebCore::NavigatorBase::serviceWorker):
1077         * page/NavigatorBase.h:
1078         * page/NavigatorServiceWorker.idl: Added.
1079
1080         * page/RuntimeEnabledFeatures.h:
1081         (WebCore::RuntimeEnabledFeatures::serviceWorkerEnabled const):
1082         (WebCore::RuntimeEnabledFeatures::setServiceWorkerEnabled):
1083
1084         * workers/ServiceWorker.cpp: Added.
1085         (WebCore::ServiceWorker::postMessage):
1086         (WebCore::ServiceWorker::~ServiceWorker):
1087         (WebCore::ServiceWorker::scriptURL const):
1088         (WebCore::ServiceWorker::state const):
1089         (WebCore::ServiceWorker::eventTargetInterface const):
1090         (WebCore::ServiceWorker::scriptExecutionContext const):
1091         * workers/ServiceWorker.h: Added.
1092         * workers/ServiceWorker.idl: Added.
1093
1094         * workers/ServiceWorkerContainer.cpp: Added.
1095         (WebCore::ServiceWorkerContainer::~ServiceWorkerContainer):
1096         (WebCore::ServiceWorkerContainer::controller const):
1097         (WebCore::ServiceWorkerContainer::ready):
1098         (WebCore::ServiceWorkerContainer::addRegistration):
1099         (WebCore::ServiceWorkerContainer::getRegistration):
1100         (WebCore::ServiceWorkerContainer::getRegistrations):
1101         (WebCore::ServiceWorkerContainer::startMessages):
1102         (WebCore::ServiceWorkerContainer::eventTargetInterface const):
1103         (WebCore::ServiceWorkerContainer::scriptExecutionContext const):
1104         * workers/ServiceWorkerContainer.h: Added.
1105         * workers/ServiceWorkerContainer.idl: Added.
1106
1107         * workers/ServiceWorkerGlobalScope.cpp: Added.
1108         (WebCore::ServiceWorkerGlobalScope::registration):
1109         (WebCore::ServiceWorkerGlobalScope::skipWaiting):
1110         * workers/ServiceWorkerGlobalScope.h: Added.
1111         * workers/ServiceWorkerGlobalScope.idl: Added.
1112
1113         * workers/ServiceWorkerRegistration.cpp: Added.
1114         (WebCore::ServiceWorkerRegistration::~ServiceWorkerRegistration):
1115         (WebCore::ServiceWorkerRegistration::installing):
1116         (WebCore::ServiceWorkerRegistration::waiting):
1117         (WebCore::ServiceWorkerRegistration::active):
1118         (WebCore::ServiceWorkerRegistration::scope const):
1119         (WebCore::ServiceWorkerRegistration::update):
1120         (WebCore::ServiceWorkerRegistration::unregister):
1121         (WebCore::ServiceWorkerRegistration::eventTargetInterface const):
1122         (WebCore::ServiceWorkerRegistration::scriptExecutionContext const):
1123         * workers/ServiceWorkerRegistration.h: Added.
1124         * workers/ServiceWorkerRegistration.idl: Added.
1125
1126 2017-08-03  Yoshiaki Jitsukawa  <jitsu@rd.scei.sony.co.jp>
1127
1128         [WebCore] Sort Xcode project files
1129         https://bugs.webkit.org/show_bug.cgi?id=175121
1130
1131         Reviewed by Antti Koivisto.
1132
1133         * WebCore.xcodeproj/project.pbxproj:
1134
1135 2017-08-02  Sam Weinig  <sam@webkit.org>
1136
1137         [WebIDL] Convert MutationCallback to be a normal generated callback
1138         https://bugs.webkit.org/show_bug.cgi?id=174140
1139
1140         Reviewed by Darin Adler.
1141
1142         To make this work more nicely, I:
1143         - Added the ability to for non-nullable interfaces in sequences to be passed
1144           via a Ref<> rather than a RefPtr<> as a parameter to a callback function.
1145           (e.g. callback MyCallback = void (sequence<Foo> foos) will now have the 
1146           signature, CallbackResult<void> handleEvent(const Vector<Ref<Foo>>&) rather
1147           than CallbackResult<void> handleEvent(const Vector<RefPtr<Foo>>&).
1148         - Added a new extended attribute for callback functions called [CallbackThisObject=Type]
1149           which allows you to specify that the callback needs a this object in addition
1150           to its arguments. When specified, the first argument of the C++ implementation
1151           function will now correspond to the this object, with the remaining arguments
1152           shifted over one.
1153         - Converted callback objects to all inherit directly from ActiveDOMCallback rather
1154           than having the generated JS callback derived class inherit from it. This allows
1155           us to have access to a callback's canInvokeCallback() function anywhere (needed
1156           for MutationCallback) as well as giving a place to put an optional virtual 
1157           visitJSFunction to allow marking weak callbacks (while not an ideal layering, 
1158           this matches what we do in EventListener). This change requires each callback to
1159           have a bit more code to import the ActiveDOMCallback's constructor and requires
1160           non-JS derived callbacks to pass a ScriptExecutionContext (e.g. the Document).
1161
1162         * CMakeLists.txt:
1163         * DerivedSources.make:
1164         * WebCore.xcodeproj/project.pbxproj:
1165         * bindings/js/JSMutationCallback.cpp: Removed.
1166         * bindings/js/JSMutationCallback.h: Removed.
1167         Remove custom JSMutationCallback.h/cpp
1168
1169         * Modules/geolocation/PositionCallback.h:
1170         * Modules/geolocation/PositionErrorCallback.h:
1171         * Modules/notifications/NotificationPermissionCallback.h:
1172         * Modules/webaudio/AudioBufferCallback.h:
1173         * Modules/webdatabase/DatabaseCallback.h:
1174         * Modules/webdatabase/SQLStatementCallback.h:
1175         * Modules/webdatabase/SQLStatementErrorCallback.h:
1176         * Modules/webdatabase/SQLTransactionCallback.h:
1177         * Modules/webdatabase/SQLTransactionErrorCallback.h:
1178         * css/MediaQueryListListener.h:
1179         * dom/NodeFilter.h:
1180         * dom/RequestAnimationFrameCallback.h:
1181         * dom/StringCallback.h:
1182         * fileapi/BlobCallback.h:
1183         * html/VoidCallback.h:
1184         * page/IntersectionObserverCallback.h:
1185         * page/PerformanceObserverCallback.h:
1186         Add ActiveDOMCallback as a base class. Import the ActiveDOMCallback constructor.
1187
1188         * Modules/mediastream/MediaDevicesRequest.cpp:
1189         (WebCore::MediaDevicesRequest::filterDeviceList):
1190         (WebCore::MediaDevicesRequest::start):
1191         * Modules/mediastream/MediaDevicesRequest.h:
1192         Change filterDeviceList to take a Vector of Refs.
1193
1194         * bindings/IDLTypes.h:
1195         Add InnerParameterType and NullableInnerParameterType type hooks
1196         and specialize wrappers to use Ref for InnerParameterType, and RefPtr
1197         for NullableInnerParameterType.
1198
1199         * bindings/js/JSCallbackData.cpp:
1200         * bindings/js/JSCallbackData.h:
1201         Add support for passing a this object and give JSCallbackDataWeak a visitJSFunction
1202         to allow marking the underlying function.
1203
1204         * bindings/js/JSMutationObserverCustom.cpp:
1205         (WebCore::JSMutationObserver::visitAdditionalChildren):
1206         (WebCore::constructJSMutationObserver): Deleted.
1207         Remove the custom constructor and replace it with a custom visitAdditionalChildren
1208         that calls the new ActiveDOMObject's visitJSFunction.
1209
1210         * bindings/scripts/CodeGenerator.pm:
1211         (ParseType):
1212         Add helper to parse a type and cache the result.
1213
1214         * bindings/scripts/CodeGeneratorJS.pm:
1215         (GenerateCallbackHeaderContent):
1216         (GenerateCallbackImplementationContent):
1217         (GetJSCallbackDataType): Deleted.
1218         - Add support for [CallbackThisObject]. When [CallbackThisObject] is not specified, use jsUndefined() 
1219           as the this object as specified by WebIDL.
1220         - Stop inheriting from ActiveDOMCallback now that callbacks need to do this themselves.
1221         - Add a visitJSFunction override for weak callback functions which calls into the callback data.
1222
1223         * bindings/scripts/IDLAttributes.json:
1224         Add [CallbackThisObject].
1225
1226         * bindings/scripts/IDLParser.pm:
1227         (ParseType):
1228         Add entry point to parse a single type.
1229
1230         * css/FontFaceSet.h:
1231         Use Ref rather than RefPtr for the faces sequence.
1232
1233         * dom/ActiveDOMCallback.h:
1234         (WebCore::ActiveDOMCallback::visitJSFunction):
1235         Add an optional visitJSFunction virtual function so that derived classes
1236         have a way of marking underlying function objects.
1237
1238         * dom/MutationCallback.h:
1239         Convert to support generation (return a CallbackResult, inherit from ActiveDOMObject).
1240
1241         * dom/MutationCallback.idl: Added.
1242         Added to generate the callback. Uses the new [CallbackThisObject].
1243
1244         * dom/MutationObserver.cpp:
1245         (WebCore::MutationObserver::deliver):
1246         Switch to call idiomatic handleEvent, and pass *this as the first parameter
1247         which will be translated into the this object.
1248
1249         * dom/MutationObserver.h:
1250         (WebCore::MutationObserver::callback):
1251         Expose the callback so it can marked during GC.
1252
1253         * dom/MutationObserver.idl:
1254         Remove CustomConstructor and replace it with a custom mark function.
1255
1256         * dom/NativeNodeFilter.cpp:
1257         * dom/NativeNodeFilter.h:
1258         * inspector/InspectorDatabaseAgent.cpp:
1259         Pass now needed ScriptExecutionContext to non-js based callbacks.
1260
1261         * bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
1262         * bindings/scripts/test/JS/JSTestCallbackFunctionRethrow.cpp:
1263         * bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.cpp: Added.
1264         * bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.h: Added.
1265         * bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp:
1266         * bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
1267         * bindings/scripts/test/JS/JSTestCallbackInterface.h:
1268         * bindings/scripts/test/JS/JSTestVoidCallbackFunction.cpp:
1269         * bindings/scripts/test/TestCallbackFunctionWithThisObject.idl: Added.
1270         * bindings/scripts/test/TestCallbackInterface.idl:
1271         Add/update tests.
1272
1273 2017-08-03  Jeremy Jones  <jeremyj@apple.com>
1274
1275         Use MPAVRoutingController instead of deprecated versions.
1276         https://bugs.webkit.org/show_bug.cgi?id=175063
1277
1278         Reviewed by Tim Horton.
1279
1280         No new tests because no behavior change. This uses a different platform class to present
1281         an interface.
1282
1283         Remove deprecated MPAudioVideoRoutingPopoverController and MPAVRoutingSheet
1284         Add MPMediaControlsViewController.
1285
1286         * platform/spi/ios/MediaPlayerSPI.h:
1287
1288 2017-08-03  Chris Dumez  <cdumez@apple.com>
1289
1290         Improve our support for referrer policies
1291         https://bugs.webkit.org/show_bug.cgi?id=175069
1292         <rdar://problem/33677313>
1293
1294         Reviewed by Darin Adler.
1295
1296         Improve our support for referrer policies. In particular, we now support the
1297         additional following ones: "same-origin", "origin-when-cross-origin" and
1298         "strict-origin-when-cross-origin".
1299
1300         This is as per the following specification:
1301         - https://www.w3.org/TR/referrer-policy/#referrer-policies
1302
1303         Also refactor the code a bit for clarity: I merged the ReferrerPolicy enum and the
1304         FetchOptions::ReferrerPolicy one.
1305
1306         Tests: http/tests/referrer-policy/origin-when-cross-origin/cross-origin-http-http.html
1307                http/tests/referrer-policy/origin-when-cross-origin/cross-origin-http.https.html
1308                http/tests/referrer-policy/origin-when-cross-origin/same-origin.html
1309                http/tests/referrer-policy/same-origin/cross-origin-http-http.html
1310                http/tests/referrer-policy/same-origin/cross-origin-http.https.html
1311                http/tests/referrer-policy/same-origin/same-origin.html
1312                http/tests/referrer-policy/strict-origin-when-cross-origin/cross-origin-http-http.html
1313                http/tests/referrer-policy/strict-origin-when-cross-origin/cross-origin-http.https.html
1314                http/tests/referrer-policy/strict-origin-when-cross-origin/same-origin.html
1315                http/tests/referrer-policy/strict-origin/cross-origin-http-http.html
1316                http/tests/referrer-policy/strict-origin/cross-origin-http.https.html
1317                http/tests/referrer-policy/strict-origin/same-origin.html
1318
1319         * Modules/fetch/FetchLoader.cpp:
1320         (WebCore::FetchLoader::start):
1321         * Modules/fetch/FetchReferrerPolicy.h:
1322         * Modules/fetch/FetchReferrerPolicy.idl:
1323         * Modules/fetch/FetchRequest.h:
1324         * Modules/fetch/FetchRequestInit.h:
1325         * dom/Document.cpp:
1326         (WebCore::Document::processReferrerPolicy):
1327         (WebCore::Document::applyQuickLookSandbox):
1328         (WebCore::Document::applyContentDispositionAttachmentSandbox):
1329         * dom/Document.h:
1330         * loader/FetchOptions.h:
1331         * loader/FrameNetworkingContext.h:
1332         * loader/PingLoader.cpp:
1333         (WebCore::PingLoader::sendBeacon):
1334         Drop explicit call to SecurityPolicy::shouldHideReferrer(). This is already called inside
1335         SecurityPolicy::generateReferrerHeader() and used only when needed, depending on the
1336         actual referrer policy.
1337
1338         * loader/cache/CachedResourceLoader.cpp:
1339         (WebCore::CachedResourceLoader::updateHTTPRequestHeaders):
1340         * loader/cache/CachedResourceRequest.cpp:
1341         (WebCore::CachedResourceRequest::updateReferrerOriginAndUserAgentHeaders):
1342         * page/SecurityPolicy.cpp:
1343         (WebCore::referrerToOriginString):
1344         (WebCore::SecurityPolicy::generateReferrerHeader):
1345         * page/SecurityPolicy.h:
1346         * platform/ReferrerPolicy.h:
1347
1348 2017-08-03  Daniel Bates  <dabates@apple.com>
1349
1350         Support ::marker pseudo-element
1351         https://bugs.webkit.org/show_bug.cgi?id=141477
1352
1353         Reviewed by David Hyatt.
1354
1355         Implements the ::marker pseudo element as per the CSS Pseudo-Element Module Level 4
1356         spec., <https://drafts.csswg.org/css-pseudo-4> (Editor's Draft, 24 July 2017).
1357
1358         The ::marker pseudo element is a convenience pseudo element that allows a person to
1359         style the appearance of a list item marker. For example, to render all list item
1360         markers in bolded, blue text you would define a stylesheet with the following content:
1361
1362         li::marker {
1363             color: blue;
1364             font-weight: bold;
1365         }
1366
1367         and this could be applied to a page that contains markup of the form:
1368
1369         <ol>
1370             <li>Item 1</li>
1371             <li>Item 2</li>
1372             ...
1373             <li>Item N-1</li>
1374             <li>Item N</li>
1375         </ol>
1376
1377         Formerly to the achieve the same effect you would need to use a stylesheet of the form:
1378
1379         li {
1380             color: blue;
1381             font-weight: bold;
1382         }
1383
1384         .list-item-content {
1385             all: initial;
1386         }
1387
1388         and then write your markup to have the form:
1389
1390         <ol>
1391             <li><span class="list-item-content">Item 1</span></li>
1392             <li><span class="list-item-content">Item 2</span></li>
1393             ...
1394             <li><span class="list-item-content">Item N-1</span></li>
1395             <li><span class="list-item-content">Item N</span></li>
1396         </ol>
1397
1398         The ::marker pseudo element only supports stylizing all font properties and the color property
1399         of a list item marker.
1400
1401         Tests: fast/lists/list-marker-with-display.html
1402                http/wpt/css/css-pseudo-4/marker-and-other-pseudo-elements.html
1403                http/wpt/css/css-pseudo-4/marker-color.html
1404                http/wpt/css/css-pseudo-4/marker-font-properties.html
1405                http/wpt/css/css-pseudo-4/marker-inherit-values.html
1406
1407         * css/CSSSelector.cpp:
1408         (WebCore::CSSSelector::pseudoId): Return the pseudo id for the ::marker pseudo element.
1409         * css/CSSSelector.h: Add enumerator PseudoElementMarker to the pseudo element enum.
1410         * css/RuleSet.cpp:
1411         (WebCore::determinePropertyWhitelistType): Return whitelist type PropertyWhitelistMarker for ::marker
1412         so that we match rules against the acceptable rules for ::marker.
1413         * css/RuleSet.h: Add enumerator PropertyWhitelistMarker to the property whitelist type enum.
1414         * css/SelectorPseudoElementTypeMap.in: Add "marker" to the list of pseudo element types.
1415         * css/StyleResolver.cpp:
1416         (WebCore::isValidMarkerStyleProperty): Determines if the specified CSS property is valid inside ::marker.
1417         (WebCore::StyleResolver::CascadedProperties::addMatch): Only recognize CSS properties in the content block
1418         of ::marker that match the ::marker whitelist policy.
1419         * rendering/RenderListItem.cpp:
1420         (WebCore::RenderListItem::computeMarkerStyle): Computes the style object for the list item marker. We
1421         apply the user-agent style to the marker here as opposed to defining ::marker in the UA sheet as per
1422         the spec. as an optimization to avoid having the style resolver apply the pseudo element to all elements.
1423         For now, we always inherit style from the originating element (list item). Added FIXME to selectively
1424         inherit styles.
1425         (WebCore::RenderListItem::styleDidChange): Always apply the list marker style to the list marker renderer.
1426         * rendering/RenderListItem.h:
1427         * rendering/style/RenderStyleConstants.h: Add pseudo ID for the ::marker pseudo element.
1428
1429 2017-08-03  Antti Koivisto  <antti@apple.com>
1430
1431         Factor common code in Style::*ChangeInvalidation into helper functions
1432         https://bugs.webkit.org/show_bug.cgi?id=174312
1433
1434         Reviewed by Andreas Kling.
1435
1436         There is a lot of copy code here.
1437
1438         * Style/StyleInvalidationFunctions.h: Added.
1439         (WebCore::Style::traverseRuleFeaturesInShadowTree):
1440         (WebCore::Style::traverseRuleFeaturesForSlotted):
1441         (WebCore::Style::traverseRuleFeatures):
1442
1443             Add functions for traversing rule features that may affect style of an element.
1444             Use lambdas to implement client-specific behavior.
1445
1446         * WebCore.xcodeproj/project.pbxproj:
1447         * style/AttributeChangeInvalidation.cpp:
1448         (WebCore::Style::mayBeAffectedByAttributeChange):
1449         (WebCore::Style::AttributeChangeInvalidation::invalidateStyle):
1450         (WebCore::Style::mayBeAffectedByHostRules): Deleted.
1451         (WebCore::Style::mayBeAffectedBySlottedRules): Deleted.
1452         * style/ClassChangeInvalidation.cpp:
1453         (WebCore::Style::ClassChangeInvalidation::invalidateStyle):
1454         (WebCore::Style::mayBeAffectedByHostRules): Deleted.
1455         (WebCore::Style::mayBeAffectedBySlottedRules): Deleted.
1456         * style/IdChangeInvalidation.cpp:
1457         (WebCore::Style::IdChangeInvalidation::invalidateStyle):
1458         (WebCore::Style::mayBeAffectedByHostRules): Deleted.
1459         (WebCore::Style::mayBeAffectedBySlottedRules): Deleted.
1460
1461 2017-08-03  Zan Dobersek  <zdobersek@igalia.com>
1462
1463         [EME] CDM constructor assigns CDMPrivate member multiple times
1464         https://bugs.webkit.org/show_bug.cgi?id=175128
1465
1466         Reviewed by Xabier Rodriguez-Calvar.
1467
1468         In the CDM class constructor, iterate over the registered CDM
1469         factories, finding one that supports the specified key system.
1470         A CDMPrivate object is created through that factory, and the
1471         iteration is now stopped at that point, while previously it
1472         contined to potentially create CDMPrivate objects through
1473         other factories.
1474
1475         Helper createCDMPrivateForKeySystem() function is removed.
1476
1477         * Modules/encryptedmedia/CDM.cpp:
1478         (WebCore::CDM::CDM):
1479         (WebCore::createCDMPrivateForKeySystem): Deleted.
1480
1481 2017-08-03  Emilio Cobos Álvarez  <ecobos@igalia.com>
1482
1483         Don't always recalc the style of display: contents elements.
1484         https://bugs.webkit.org/show_bug.cgi?id=172753
1485
1486         Reviewed by Antti Koivisto.
1487
1488         No new tests (no functionality change). This only removes an
1489         inefficiency.
1490
1491         * dom/Element.cpp:
1492         (WebCore::Element::existingComputedStyle):
1493         * dom/Element.h:
1494         * style/RenderTreeUpdater.cpp:
1495         (WebCore::RenderTreeUpdater::updateRenderTree):
1496         (WebCore::RenderTreeUpdater::updateElementRenderer):
1497         * style/StyleTreeResolver.cpp:
1498         (WebCore::Style::renderOrDisplayContentsStyle):
1499         (WebCore::Style::TreeResolver::resolveElement):
1500         (WebCore::Style::TreeResolver::createAnimatedElementUpdate):
1501         (WebCore::Style::shouldResolveElement):
1502         (WebCore::Style::TreeResolver::resolveComposedTree):
1503
1504 2017-08-02  Devin Rousso  <drousso@apple.com>
1505
1506         Web Inspector: add stack trace information for each RecordingAction
1507         https://bugs.webkit.org/show_bug.cgi?id=174663
1508
1509         Reviewed by Joseph Pecoraro.
1510
1511         Tests: inspector/canvas/recording-2d.html
1512                inspector/model/recording.html
1513
1514         * inspector/InspectorCanvas.h:
1515         * inspector/InspectorCanvas.cpp:
1516         (WebCore::InspectorCanvas::indexForData):
1517         (WebCore::InspectorCanvas::buildAction):
1518
1519 2017-08-02  Yusuke Suzuki  <utatane.tea@gmail.com>
1520
1521         Merge WTFThreadData to Thread::current
1522         https://bugs.webkit.org/show_bug.cgi?id=174716
1523
1524         Reviewed by Mark Lam.
1525
1526         Use Thread::current() instead.
1527
1528         * fileapi/AsyncFileStream.cpp:
1529         * platform/ThreadGlobalData.cpp:
1530         (WebCore::ThreadGlobalData::ThreadGlobalData):
1531         * platform/graphics/cocoa/WebCoreDecompressionSession.h:
1532         * platform/ios/wak/WebCoreThread.mm:
1533         (StartWebThread):
1534         * workers/WorkerThread.cpp:
1535         (WebCore::WorkerThread::workerThread):
1536
1537 2017-08-02  Sam Weinig  <sam@webkit.org>
1538
1539         Fix crashes in GC creating a document fragment on a background thread
1540         https://bugs.webkit.org/show_bug.cgi?id=175111
1541
1542         Reviewed by Chris Dumez.
1543
1544         r220095 (https://webkit.org/b/175006) change JSHTMLTemplateElement from using a
1545         private name + property to manager the lifetime of the reference DocumentFragment
1546         to using the idiomatic visitAdditionalChildren. Unfortunately, the function to access
1547         the DocumentFragment lazily creates it. If this lazy creation happens on a GC thread,
1548         badness ensues. This introduces an accessor that returns the DocumentFragment if it
1549         has been created or null if it has not.
1550
1551         * bindings/js/JSHTMLTemplateElementCustom.cpp:
1552         (WebCore::JSHTMLTemplateElement::visitAdditionalChildren):
1553         * html/HTMLTemplateElement.cpp:
1554         (WebCore::HTMLTemplateElement::contentIfAvailable):
1555         * html/HTMLTemplateElement.h:
1556
1557 2017-08-02  Sam Weinig  <sam@webkit.org>
1558
1559         [WebIDL] Simplify [EnabledBySettings] extended attribute code to not require passing a global object to finishCreation
1560         https://bugs.webkit.org/show_bug.cgi?id=175087
1561
1562         Reviewed by Chris Dumez.
1563
1564         * bindings/scripts/CodeGeneratorJS.pm:
1565         (GenerateImplementation):
1566         (GeneratePrototypeDeclaration):
1567         Remove unnecessary passing of the global object to finishCreation for [EnabledBySettings].
1568
1569         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1570         * bindings/scripts/test/JS/JSTestNode.cpp:
1571         * bindings/scripts/test/JS/JSTestObj.cpp:
1572         Update tests.
1573
1574 2017-08-02  Andy Estes  <aestes@apple.com>
1575
1576         REGRESSION (r207155): Unable to switch sheets when previewing Numbers '09 spreadsheets
1577         https://bugs.webkit.org/show_bug.cgi?id=175098
1578         <rdar://problem/31416763>
1579
1580         Reviewed by Daniel Bates.
1581
1582         r207155 enabled sandboxing on the frame displaying a QuickLook preview. This restricted
1583         frames within the sandbox from navigating their sandboxed siblings or ancestors, which
1584         breaks the functionality of multi-sheet Numbers '09 spreadsheet previews. These previews
1585         contain a frameset with a table of contents frame and a content frame, and the table of
1586         contents frame needs to be able to navigate the content frame when the sheet selection
1587         changes.
1588
1589         Fix this by disabling the SandboxNavigation flag in the QuickLook sandbox. Frames within the
1590         sandbox will be able to navigate each other, but will not be able to navigate the top frame
1591         (due to SandboxTopNavigation still being enabled), nor will they be able to navigate any
1592         other ancestor frame outside the sandbox (due to QuickLook previews being in a different
1593         origin than the hosting frame). These two cases are covered by existing tests.
1594
1595         Test: quicklook/multi-sheet-numbers-09.html
1596
1597         * dom/Document.cpp:
1598         (WebCore::Document::applyQuickLookSandbox): Added a call to
1599         disableSandboxFlags(SandboxNavigation) after applying the content security policy.
1600         * dom/SecurityContext.h:
1601         (WebCore::SecurityContext::disableSandboxFlags): Defined disableSandboxFlags().
1602
1603 2017-08-02  Jer Noble  <jer.noble@apple.com>
1604
1605         [MSE] Removing samples when presentation order does not match decode order can cause bad behavior.
1606         https://bugs.webkit.org/show_bug.cgi?id=175091
1607
1608         Reviewed by Eric Carlson.
1609
1610         Address follow-up comments to r219519.
1611
1612         * Modules/mediasource/SourceBuffer.cpp:
1613         (WebCore::SourceBuffer::removeCodedFrames):
1614
1615 2017-08-02  Jeremy Jones  <jeremyj@apple.com>
1616
1617         Remove unused and obsolete setting mediaDocumentEntersFullscreenAutomatically
1618         https://bugs.webkit.org/show_bug.cgi?id=175080
1619
1620         Reviewed by Jon Lee.
1621
1622         No new tests because this only removes unused code.
1623
1624         This is obsolete because of the alternate solution in
1625         https://bugs.webkit.org/show_bug.cgi?id=174850
1626
1627         * page/Settings.in:
1628
1629 2017-08-02  Filip Pizlo  <fpizlo@apple.com>
1630
1631         GPUBuffer::length() should return the size of the array buffer backing the GPU buffer, not the rounded-up GPU buffer length
1632         https://bugs.webkit.org/show_bug.cgi?id=175079
1633
1634         Reviewed by Simon Fraser.
1635
1636         This fixes a failure in the GPU.BufferCreate unit test.
1637         
1638         The problem is that in order to have a Metal buffer wrap memory we allocated, we have to tell Metal
1639         that the memory is page-aligned. This means that the Metal buffer reports back a page-aligned size,
1640         which is different than what the test expected.
1641         
1642         It seems that it's most convenient for our GPUBuffer class to return the unaligned length, rather
1643         than the aligned length. This is just a simple matter of returning the length from the ArrayBuffer
1644         rather than the Metal buffer.
1645         
1646         This fixes the unit test and is probably more sensible for actual users of this class, since the page
1647         alignment of the length is a goofy implementation detail.
1648
1649         * platform/graphics/cocoa/GPUBufferMetal.mm:
1650         (WebCore::GPUBuffer::length const):
1651
1652 2017-08-01  Brian Burg  <bburg@apple.com>
1653
1654         HTML file input elements do not support file extensions in the "accept" attribute
1655         https://bugs.webkit.org/show_bug.cgi?id=95698
1656         <rdar://problem/12231850>
1657
1658         Reviewed by Darin Adler.
1659
1660         Serialize the accepted file extensions so they can be accessed in the UI process.
1661
1662         * platform/FileChooser.h:
1663         * platform/FileChooser.cpp:
1664         (WebCore::FileChooser::invalidate): Modernize.
1665         (WebCore::FileChooserSettings::acceptTypes const): Deleted.
1666         This is dead code, it was only used by Chromium.
1667
1668 2017-08-02  Fujii Hironori  <Hironori.Fujii@sony.com>
1669
1670         Use LazyNeverDestroyed instead of DEFINE_GLOBAL for QualifiedName
1671         https://bugs.webkit.org/show_bug.cgi?id=175010
1672         <rdar://problem/33647818>
1673
1674         Reviewed by Alex Christensen.
1675
1676         No new tests because no behavior change.
1677
1678         Stop using DEFINE_GLOBAL hack in favor of LazyNeverDestroyed.
1679
1680         * contentextensions/ContentExtensionParser.cpp:
1681         (WebCore::ContentExtensions::isValidCSSSelector):
1682         Call QualifiedName::init().
1683         * dom/DOMAllInOne.cpp: Remove the warning. Include QualifiedName.cpp.
1684         * dom/QualifiedName.cpp:
1685         (WebCore::QualifiedName::init): Call LazyNeverDestroyed::construct
1686         instead of placement new.
1687         * dom/QualifiedName.h: Use LazyNeverDestroyed.
1688
1689 2017-08-01  Joseph Pecoraro  <pecoraro@apple.com>
1690
1691         CFString leak dragging an image - allocation under PlatformPasteboard::writeObjectRepresentations
1692         https://bugs.webkit.org/show_bug.cgi?id=175064
1693
1694         Reviewed by Tim Horton.
1695
1696         * platform/ios/PlatformPasteboardIOS.mm:
1697         (WebCore::PlatformPasteboard::writeObjectRepresentations):
1698         Adopt a created string into the RetainPtr.
1699
1700         * platform/ios/WebItemProviderPasteboard.h:
1701         * platform/ios/WebItemProviderPasteboard.mm:
1702         (-[WebItemProviderRegistrationInfoList dealloc]):
1703         Release suggestedName and switch from -strong to -copy.
1704
1705 2017-08-01  Chris Dumez  <cdumez@apple.com>
1706
1707         Unreviewed, update Beacon API status to "In Development".
1708
1709         * features.json:
1710
1711 2017-08-01  Chris Dumez  <cdumez@apple.com>
1712
1713         Add initial support for navigator.sendBeacon
1714         https://bugs.webkit.org/show_bug.cgi?id=175007
1715         <rdar://problem/33547728>
1716
1717         Reviewed by Sam Weinig.
1718
1719         Add initial support for navigator.sendBeacon behind an experimental
1720         feature runtime flag. The specification is available at:
1721         - https://w3c.github.io/beacon/
1722
1723         The current implementation supports sending beacons with all types of
1724         payloads except for ReadableStream. Some functionality is incomplete
1725         and will be taken care of in follow-up patches:
1726         - Support for CORS preflight for the cases where it is required. We currently
1727           return false and do not send the beacon in such cases.
1728         - Better support for redirects.
1729         - Use a more power-friendly network priority for beacon requests.
1730
1731         Tests: http/tests/blink/sendbeacon/*
1732                http/tests/security/mixedContent/beacon/insecure-beacon-in-iframe.html
1733                http/wpt/beacon/*
1734                imported/blink/fast/beacon/*
1735                imported/w3c/web-platform-tests/beacon/*
1736
1737         * CMakeLists.txt:
1738         * DerivedSources.make:
1739         * Modules/beacon/NavigatorBeacon.cpp: Added.
1740         (WebCore::NavigatorBeacon::sendBeacon):
1741         * Modules/beacon/NavigatorBeacon.h: Added.
1742         * Modules/beacon/NavigatorBeacon.idl: Added.
1743         * WebCore.xcodeproj/project.pbxproj:
1744         * loader/PingLoader.cpp:
1745         (WebCore::PingLoader::sendBeacon):
1746         * loader/PingLoader.h:
1747
1748 2017-08-01  Filip Pizlo  <fpizlo@apple.com>
1749
1750         Bmalloc and GC should put auxiliaries (butterflies, typed array backing stores) in a gigacage (separate multi-GB VM region)
1751         https://bugs.webkit.org/show_bug.cgi?id=174727
1752
1753         Reviewed by Mark Lam.
1754
1755         No new tests because no change in behavior.
1756         
1757         Needed to teach Metal how to allocate in the Gigacage.
1758
1759         * platform/graphics/cocoa/GPUBufferMetal.mm:
1760         (WebCore::GPUBuffer::GPUBuffer):
1761         (WebCore::GPUBuffer::contents):
1762
1763 2017-08-01  Fujii Hironori  <Hironori.Fujii@sony.com>
1764
1765         [WinCairo] Implement Font::platformBoundsForGlyph
1766         https://bugs.webkit.org/show_bug.cgi?id=174813
1767
1768         Reviewed by Alex Christensen.
1769
1770         Test: fast/text/emphasis.html
1771
1772         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
1773         (WebCore::Font::platformBoundsForGlyph): Implemented by copying
1774         the code from Font::boundsForGDIGlyph().
1775
1776 2017-08-01  Zalan Bujtas  <zalan@apple.com>
1777
1778         REGRESSION (r217197): New Yorker website hangs for a long time on load, lots of blank tiles
1779         https://bugs.webkit.org/show_bug.cgi?id=175009
1780         <rdar://problem/33505791>
1781
1782         Reviewed by Simon Fraser.
1783
1784         This patch ensures that we report the desktop, non-frame-flattened frame size for media queries in subframes.
1785         Some websites don't expect the iframes to be expanded to the size of the content and when the media query
1786         callback mutates the content (triggering frame resize), they might end up getting into a never ending layout.
1787
1788         Test: fast/frames/flattening/media-query-growing-content.html
1789
1790         * css/MediaQueryEvaluator.cpp:
1791         (WebCore::orientationEvaluate):
1792         (WebCore::aspectRatioEvaluate):
1793         (WebCore::heightEvaluate):
1794         (WebCore::widthEvaluate):
1795         * page/FrameView.cpp:
1796         (WebCore::FrameView::layout):
1797         (WebCore::FrameView::layoutSizeForMediaQuery const):
1798         (WebCore::FrameView::evaluateMediaQueryList):
1799         * page/FrameView.h:
1800
1801 2017-07-26  Jiewen Tan  <jiewen_tan@apple.com>
1802
1803         Add tests to detect mistakes in backward compatibility when the structured clone algorithm is changed in the future
1804         https://bugs.webkit.org/show_bug.cgi?id=173998
1805
1806         Reviewed by Darin Adler.
1807
1808         * bindings/js/SerializedScriptValue.cpp:
1809         Add a comment.
1810
1811 2017-08-01  Matt Lewis  <jlewis3@apple.com>
1812
1813         Unreviewed, rolling out r220089.
1814
1815         This caused multiple crashes on macOS Debug testers.
1816
1817         Reverted changeset:
1818
1819         "Use LazyNeverDestroyed instead of DEFINE_GLOBAL for
1820         QualifiedName"
1821         https://bugs.webkit.org/show_bug.cgi?id=175010
1822         http://trac.webkit.org/changeset/220089
1823
1824 2017-08-01  Sam Weinig  <sam@webkit.org>
1825
1826         [WebIDL] Swap a custom attribute for a custom mark function for HTMLTemplateElement
1827         https://bugs.webkit.org/show_bug.cgi?id=175006
1828
1829         Reviewed by Chris Dumez.
1830
1831         Use the standard way of augmenting GC, visitAdditionalChildren, rather
1832         than using a private name to create ownership.
1833
1834         * bindings/js/JSHTMLTemplateElementCustom.cpp:
1835         (WebCore::JSHTMLTemplateElement::visitAdditionalChildren):
1836         (WebCore::JSHTMLTemplateElement::content const): Deleted.
1837         * html/HTMLTemplateElement.idl:
1838
1839 2017-08-01  Zan Dobersek  <zdobersek@igalia.com>
1840
1841         [GCrypt] Gather crypto constants in a single location
1842         https://bugs.webkit.org/show_bug.cgi?id=174091
1843
1844         Reviewed by Jiewen Tan.
1845
1846         Gather common constants used across the libgcrypt-specific Web Crypto
1847         implementations in a single place -- in the GCryptUtilities.h header,
1848         inside the CryptoConstants namespace. The various ASN.1 object identifiers
1849         and other helper values are placed inside, in the std::array<uint8_t, N>
1850         container.
1851
1852         Additionally, CryptoConstants::matches() helper function is provided. It
1853         compares the provided data-and-size pair with the given std::array
1854         container and returns true if the std::memcmp() call returns 0.
1855
1856         Changes in CryptoKeyEC and CryptoKeyRSA consist mostly of switching to the
1857         use of CryptoConstants::matches() and the CryptoConstants data arrays, as
1858         well as some whitespace cleanup.
1859
1860         Additionallity in CryptoKeyEC, the helper functions covering various curve
1861         attributes are reordered, renamed and reorganized for simplicity.
1862
1863         No new tests -- no changes in behavior.
1864
1865         * crypto/gcrypt/CryptoKeyECGCrypt.cpp:
1866         (WebCore::curveIdentifier):
1867         (WebCore::curveSize):
1868         (WebCore::curveUncompressedFieldElementSize):
1869         (WebCore::curveUncompressedPointSize):
1870         (WebCore::CryptoKeyEC::platformImportRaw):
1871         (WebCore::CryptoKeyEC::platformImportJWKPublic):
1872         (WebCore::CryptoKeyEC::platformImportJWKPrivate):
1873         (WebCore::supportedAlgorithmIdentifier):
1874         (WebCore::curveForIdentifier):
1875         (WebCore::CryptoKeyEC::platformImportSpki):
1876         (WebCore::CryptoKeyEC::platformExportRaw):
1877         (WebCore::CryptoKeyEC::platformAddFieldElements):
1878         (WebCore::CryptoKeyEC::platformExportSpki):
1879         (WebCore::CryptoKeyEC::platformExportPkcs8):
1880         (WebCore::uncompressedPointSizeForCurve): Deleted.
1881         (WebCore::uncompressedFieldElementSizeForCurve): Deleted.
1882         * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
1883         (WebCore::supportedAlgorithmIdentifier):
1884         (WebCore::CryptoKeyRSA::importPkcs8):
1885         (WebCore::CryptoKeyRSA::exportSpki):
1886         (WebCore::CryptoKeyRSA::exportPkcs8):
1887         * crypto/gcrypt/GCryptUtilities.h:
1888         (WebCore::CryptoConstants::matches):
1889
1890 2017-07-31  Fujii Hironori  <Hironori.Fujii@sony.com>
1891
1892         Use LazyNeverDestroyed instead of DEFINE_GLOBAL for MediaFeatureNames
1893         https://bugs.webkit.org/show_bug.cgi?id=175008
1894
1895         Reviewed by Alex Christensen.
1896
1897         No new tests because no behavior change.
1898
1899         Stop using DEFINE_GLOBAL hack in favor of LazyNeverDestroyed.
1900
1901         * css/MediaFeatureNames.cpp:
1902         (WebCore::MediaFeatureNames::init): Do not include
1903         <wtf/StaticConstructors.h>. Use LazyNeverDestroyed instead of
1904         DEFINE_GLOBAL. Call LazyNeverDestroyed::construct instead of
1905         placement new.
1906         * css/MediaFeatureNames.h: Use LazyNeverDestroyed.
1907         * css/MediaQueryEvaluator.cpp:
1908         (WebCore::MediaQueryEvaluator::evaluate const): Dereference with ->.
1909
1910 2017-07-31  Fujii Hironori  <Hironori.Fujii@sony.com>
1911
1912         Use LazyNeverDestroyed instead of DEFINE_GLOBAL for QualifiedName
1913         https://bugs.webkit.org/show_bug.cgi?id=175010
1914
1915         Reviewed by Alex Christensen.
1916
1917         No new tests because no behavior change.
1918
1919         Stop using DEFINE_GLOBAL hack in favor of LazyNeverDestroyed.
1920
1921         * dom/DOMAllInOne.cpp: Remove the warning. Include QualifiedName.cpp.
1922         * dom/QualifiedName.cpp:
1923         (WebCore::QualifiedName::init): Call LazyNeverDestroyed::construct
1924         instead of placement new.
1925         * dom/QualifiedName.h: Use LazyNeverDestroyed.
1926
1927 2017-07-31  Matt Rajca  <mrajca@apple.com>
1928
1929         Support quirk for letting media autoplay if the user interacted with at least one media element.
1930         https://bugs.webkit.org/show_bug.cgi?id=175005
1931         <rdar://problem/33476038>
1932
1933         Reviewed by Eric Carlson.
1934
1935         If the user has interacted with at least one media element, let other media elements auto-play
1936         as a quirk.
1937
1938         * dom/Document.cpp:
1939         (WebCore::Document::updateIsPlayingMedia):
1940         * dom/Document.h:
1941         (WebCore::Document::noteUserInteractionWithMediaElement):
1942         * html/HTMLMediaElement.cpp:
1943         (WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture):
1944         * html/MediaElementSession.cpp:
1945         (WebCore::needsDocumentLevelMediaUserGestureQuirk):
1946         (WebCore::MediaElementSession::playbackPermitted const):
1947         * page/MediaProducer.h:
1948
1949 2017-07-31  Nan Wang  <n_wang@apple.com>
1950
1951         AX: CFEqual is failing on text markers with exact same data
1952         https://bugs.webkit.org/show_bug.cgi?id=175002
1953         <rdar://problem/33636985>
1954
1955         Reviewed by Chris Fleizach.
1956
1957         We should zero the memory of the TextMarkerData instance so that it
1958         can be tested for byte-equivalence.
1959
1960         Made sure this change won't break any of the existing tests.
1961
1962         * accessibility/AXObjectCache.cpp:
1963         (WebCore::AXObjectCache::textMarkerDataForVisiblePosition):
1964         (WebCore::AXObjectCache::textMarkerDataForFirstPositionInTextControl):
1965
1966 2017-07-28  Matt Rajca  <mrajca@apple.com>
1967
1968         Propagate user gesture tokens when script elements are loaded.
1969         https://bugs.webkit.org/show_bug.cgi?id=174959
1970
1971         Reviewed by Eric Carlson.
1972
1973         Propagate user gesture tokens when script elements are loaded (i.e. between the time an
1974         element is created and its onload handler is invoked).
1975
1976         * dom/ScriptElement.cpp:
1977         (WebCore::ScriptElement::ScriptElement):
1978         (WebCore::ScriptElement::dispatchLoadEventRespectingUserGestureIndicator):
1979         (WebCore::ScriptElement::executeScriptAndDispatchEvent):
1980         (WebCore::ScriptElement::executePendingScript):
1981         * dom/ScriptElement.h:
1982
1983 2017-07-31  Matt Lewis  <jlewis3@apple.com>
1984
1985         Unreviewed, rolling out r220048.
1986
1987         This revision caused multiple crashes in fast/images. See
1988         webkit.org/b/174990
1989
1990         Reverted changeset:
1991
1992         "RenderImageResourceStyleImage::image() should return the
1993         nullImage() if the image is not available"
1994         https://bugs.webkit.org/show_bug.cgi?id=174874
1995         http://trac.webkit.org/changeset/220048
1996
1997 2017-07-31  Sam Weinig  <sam@webkit.org>
1998
1999         Remove unnecessary exceptions from storage code
2000         https://bugs.webkit.org/show_bug.cgi?id=174572
2001
2002         Reviewed by Chris Dumez.
2003
2004         Remove checks for canAccessStorage() and the exceptions they would cause.
2005         These were used for Storage in ephemeral sessions, but they are now supported.
2006         Add checks for a null frame to functions that can mutate the storage, as the
2007         frame is needed for that, and it retains our existing behavior for disconnected
2008         frames. By removing these checks / exceptions, we can fully generate Storage.idl.
2009
2010         * CMakeLists.txt:
2011         * WebCore.xcodeproj/project.pbxproj:
2012         * bindings/js/JSBindingsAllInOne.cpp:
2013         * bindings/js/JSStorageCustom.cpp: Removed.
2014         Remove JSStorageCustom.cpp
2015
2016         * loader/EmptyClients.cpp:
2017         * page/DOMWindow.cpp:
2018         (WebCore::DOMWindow::sessionStorage):
2019         (WebCore::DOMWindow::localStorage):
2020         * storage/StorageArea.h:
2021         Remove canAccessStorage.
2022
2023         * storage/Storage.cpp:
2024         (WebCore::Storage::length):
2025         (WebCore::Storage::key):
2026         (WebCore::Storage::getItem):
2027         (WebCore::Storage::setItem):
2028         (WebCore::Storage::removeItem):
2029         (WebCore::Storage::clear):
2030         (WebCore::Storage::contains):
2031         (WebCore::Storage::isSupportedPropertyName):
2032         (WebCore::Storage::supportedPropertyNames):
2033         * storage/Storage.h:
2034         * storage/Storage.idl:
2035         Remove canAccessStorage checks and corresponding exceptions. Add supportedPropertyNames
2036         to allow the removal of the [CustomGetOwnPropertyNames].
2037
2038 2017-07-31  Matt Lewis  <jlewis3@apple.com>
2039
2040         Unreviewed, rolling out r220060.
2041
2042         This broke our internal builds. Contact reviewer of patch for
2043         more information.
2044
2045         Reverted changeset:
2046
2047         "Merge WTFThreadData to Thread::current"
2048         https://bugs.webkit.org/show_bug.cgi?id=174716
2049         http://trac.webkit.org/changeset/220060
2050
2051 2017-07-31  Yusuke Suzuki  <utatane.tea@gmail.com>
2052
2053         Merge WTFThreadData to Thread::current
2054         https://bugs.webkit.org/show_bug.cgi?id=174716
2055
2056         Reviewed by Sam Weinig.
2057
2058         Use Thread::current() instead.
2059
2060         * fileapi/AsyncFileStream.cpp:
2061         * platform/ThreadGlobalData.cpp:
2062         (WebCore::ThreadGlobalData::ThreadGlobalData):
2063         * platform/graphics/cocoa/WebCoreDecompressionSession.h:
2064         * platform/ios/wak/WebCoreThread.mm:
2065         (StartWebThread):
2066         * workers/WorkerThread.cpp:
2067         (WebCore::WorkerThread::workerThread):
2068
2069 2017-07-31  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2070
2071         Created a bool pretty printer at WTF for debugging purposes
2072         https://bugs.webkit.org/show_bug.cgi?id=174893
2073
2074         Reviewed by Darin Adler.
2075
2076         Use WTF::boolPrettyPrinter in debugging messages.
2077
2078         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2079         (WebCore::MediaPlayerPrivateGStreamerBase::supportsKeySystem):
2080         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
2081         (WebCore::MediaPlayerPrivateGStreamerMSE::seek):
2082
2083 2017-07-30  Zan Dobersek  <zdobersek@igalia.com>
2084
2085         Unreviewed. Suppress the -Wextra compiler warning when building with GCC 6.3.0,
2086         explicitly initializing the RefCounted<> base class in the
2087         FetchHeaders(const FetchHeaders&) constructor.
2088
2089         Note that while that's the signature of the copy constructor for the FetchHeaders
2090         class, the base RefCounted<> class is not copyable, so the default RefCounted<>
2091         constructor is used, but the FetchHeaders resources are normally copied into the
2092         new object from the one that's passed in.
2093
2094         * Modules/fetch/FetchHeaders.h:
2095         (WebCore::FetchHeaders::FetchHeaders):
2096
2097 2017-07-30  Darin Adler  <darin@apple.com>
2098
2099         Remove code in HTMLObjectElement attribute parsing that forces style resolution and layout
2100         https://bugs.webkit.org/show_bug.cgi?id=130653
2101
2102         Reviewed by Antti Koivisto.
2103
2104         Also fixes a bug where load events are delivered prematurely in some cases
2105         when an object, embed, frame, or iframe element is still loading.
2106
2107         * dom/Document.cpp:
2108         (WebCore::Document::loadEventDelayTimerFired): Added a call to
2109         FrameLoader::checkLoadComplete. Goes along with the change to
2110         FrameLoader::checkLoadCompleteForThisFrame, which now respects the
2111         isDelayingLoadEvent flag.
2112
2113         * html/HTMLAppletElement.cpp:
2114         (WebCore::HTMLAppletElement::HTMLAppletElement): Removed the createdByParser argument,
2115         no longer needed by the base class.
2116         (WebCore::HTMLAppletElement::create): Added call to finishCreating, which is now part of
2117         the process of creating any object in a class derived from HTMLPlugInImageElement.
2118         (WebCore::HTMLAppletElement::updateWidget): Rearranged logic so setNeedsWidgetUpdate
2119         is only called when it's becoming false; avoids a false/true/false round trip that can
2120         cause trouble.
2121         * html/HTMLAppletElement.h: Updated for the above.
2122
2123         * html/HTMLEmbedElement.cpp:
2124         (WebCore::HTMLEmbedElement::HTMLEmbedElement): Removed the createdByParser argument,
2125         no longer needed by the base class.
2126         (WebCore::HTMLEmbedElement::create): Added call to finishCreating, which is now part of
2127         the process of creating any object in a class derived from HTMLPlugInImageElement.
2128         (WebCore::HTMLEmbedElement::parseAttribute): Changed srcAttr to call
2129         updateImageLoaderWithNewURLSoon to do the image loading logic.
2130         (WebCore::HTMLEmbedElement::updateWidget): Rearranged logic so setNeedsWidgetUpdate
2131         is only called when it's becoming false; avoids a false/true/false round trip that can
2132         cause trouble.
2133         * html/HTMLEmbedElement.h: Updated for the above.
2134
2135         * html/HTMLMediaElement.cpp:
2136         (WebCore::HTMLMediaElement::setReadyState): Call setShouldDelayLoadEvent(false) when
2137         transitioning to HAVE_CURRENT_DATA (or beyond), even if we have already fired a loadeddata
2138         event in the past. This matches what the HTML specification calls for, but only if you
2139         read it carefully. Without this change, and with the more complete implementation of
2140         load event delay below, one of the regression tests hangs because are permanently stuck
2141         dealying load events. Also added a FIXME about other code that likely has a similar
2142         problem; the symptom is likely to be subtle and minor, though.
2143
2144         * html/HTMLObjectElement.cpp:
2145         (WebCore::HTMLObjectElement::HTMLObjectElement): Removed the createdByParser argument,
2146         no longer needed by the base class.
2147         (WebCore::HTMLObjectElement::create): Added call to finishCreating, which is now part of
2148         the process of creating any object in a class derived from HTMLPlugInImageElement.
2149         (WebCore::HTMLObjectElement::parseAttribute): Changed dataAttr to use
2150         updateImageLoaderWithNewURLSoon. Explicitly call scheduleUpdateForAfterStyleResolution
2151         since just calling invalidateStyleAndRenderersForSubtree alone is no longer sufficient.
2152         (WebCore::HTMLObjectElement::updateWidget): Rearranged logic so setNeedsWidgetUpdate
2153         is only called when it's becoming false; avoids a false/true/false round trip that can
2154         cause trouble.
2155         (WebCore::HTMLObjectElement::childrenChanged): Added calls to the new
2156         scheduleUpdateForAfterStyleResolution since invalidating style is no longer sufficient.
2157         (WebCore::HTMLObjectElement::renderFallbackContent): Remove the call to
2158         updateStyleIfNeeded. This is the main change that the title of this bug refers to.
2159         * html/HTMLObjectElement.h: Updated for the above. Also removed the
2160         clearUseFallbackContent function because it's clearer to set the data member in
2161         line at the single call site in HTMLObjectElement::parseAttribute.
2162
2163         * html/HTMLPlugInImageElement.cpp:
2164         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): Removed the createdByParser
2165         argument; no need to set an m_needsWidgetUpdate flag differently for parser cases now.
2166         (WebCore::HTMLPlugInImageElement::finshCreating): Added. To be called after creating
2167         an element to do work that can't be done in a constructor.
2168         (WebCore::HTMLPlugInImageElement::didRecalcStyle): Added. Calls the new
2169         scheduleUpdateForAfterStyleResolution function.
2170         (WebCore::HTMLPlugInImageElement::didAttachRenderers): Moved all the logic from this
2171         function into scheduleUpdateForAfterStyleResolution. Also added a call through to the base
2172         class; cleans things up, even though it's just an assertion.
2173         (WebCore::HTMLPlugInImageElement::willDetachRenderers): Removed the call to
2174         setNeedsWidgetUpdate(true) here; no longer needed because the new logic already
2175         does the right thing in this case.
2176         (WebCore::HTMLPlugInImageElement::updateWidgetIfNecessary): Deleted. Now handled by
2177         updateAfterStyleResolution instead.
2178         (WebCore::HTMLPlugInImageElement::finishParsingChildren): Deleted. Handling updates
2179         after parsing all the children now comes naturally out of the new implementation.
2180         (WebCore::HTMLPlugInImageElement::scheduleUpdateForAfterStyleResolution): Added.
2181         Schedules a call to updateAfterStyleResolution when needed, and equally importantly,
2182         increments the load event delay count to make sure that loads that are part of that
2183         update can participate in decision about whether it's time for the load event.
2184         (WebCore::HTMLPlugInImageElement::updateAfterStyleResolution): Added.
2185         Combines updateWidgetIfNecessary and startLoadingImage, and also deals with the new
2186         m_needsImageReload boolean in cases where no actual loading is done.
2187         (WebCore::HTMLPlugInImageElement::didMoveToNewDocument): Update load event delay
2188         count when moving an element that is in the middle of loading. This lets the
2189         updateAfterStyleResolution function do the right thing even when the element is
2190         moved without leaving anything stuck in a strange state.
2191         (WebCore::HTMLPlugInImageElement::prepareForDocumentSuspension): Call the new
2192         scheduleUpdateForAfterStyleResolution since invalidating style is no longer sufficient.
2193         (WebCore::HTMLPlugInImageElement::startLoadingImage): Deleted. Now handled by
2194         updateAfterStyleResolution instead.
2195         (WebCore::HTMLPlugInImageElement::updateImageLoaderWithNewURLSoon): Added. Does all
2196         the right things for when an image URL is changed; for use by the concrete derived classes.
2197         * html/HTMLPlugInImageElement.h: Updated for above changes. Also made m_imageLoader
2198         private rather than protected, and added the two new boolean data members.
2199
2200         * html/HTMLTagNames.in: Removed unneeded constructorNeedsCreatedByParser flags for
2201         applet, embed, and object.
2202
2203         * loader/DocumentLoader.cpp:
2204         (WebCore::DocumentLoader::isLoadingInAPISense): Return true if the document is
2205         delaying a load event.
2206
2207         * loader/FrameLoader.cpp:
2208         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Don't do any work if
2209         isDelayingLoadEvent is true; otherwise this function can have a side effect of
2210         triggering the load event.
2211         (WebCore::FrameLoader::detachFromParent): Schedule a checkLoadComplete here, too, not
2212         just a checkCompleted. This is relevant if the frame we are detaching was delaying
2213         a load event because it no longer will be and so the load might be complete.
2214
2215 2017-07-30  Sam Weinig  <sam@webkit.org>
2216
2217         [WebIDL] Remove JS builtin bindings for FetchRequest, DOMWindowFetch and WorkerGlobalScopeFetch
2218         https://bugs.webkit.org/show_bug.cgi?id=174974
2219
2220         Reviewed by Darin Adler.
2221
2222         * CMakeLists.txt:
2223         * DerivedSources.make:
2224         * WebCore.xcodeproj/project.pbxproj:
2225         * Modules/fetch/DOMWindowFetch.js: Removed.
2226         * Modules/fetch/FetchRequest.js: Removed.
2227         * Modules/fetch/WorkerGlobalScopeFetch.js: Removed.
2228         Remove builtin files.
2229
2230         * Modules/fetch/DOMWindowFetch.cpp:
2231         (WebCore::DOMWindowFetch::fetch):
2232         * Modules/fetch/DOMWindowFetch.h:
2233         * Modules/fetch/DOMWindowFetch.idl:
2234         * Modules/fetch/WorkerGlobalScopeFetch.cpp:
2235         (WebCore::WorkerGlobalScopeFetch::fetch):
2236         * Modules/fetch/WorkerGlobalScopeFetch.h:
2237         * Modules/fetch/WorkerGlobalScopeFetch.idl:
2238         Remove builtin and instead create FetchRequest in the implementation.
2239
2240         * Modules/fetch/FetchBody.cpp:
2241         (WebCore::FetchBody::extract):
2242         * Modules/fetch/FetchBody.h:
2243         * Modules/fetch/FetchBodyOwner.cpp:
2244         (WebCore::FetchBodyOwner::extractBody):
2245         * Modules/fetch/FetchBodyOwner.h:
2246         * Modules/fetch/FetchResponse.cpp:
2247         * Modules/fetch/FetchResponse.h:
2248         Rename FetchBody::BindingDataType to FetchBody::Init to match its IDL naming.
2249
2250         * Modules/fetch/FetchHeaders.cpp:
2251         (WebCore::appendToHeaderMap):
2252         (WebCore::fillHeaderMap):
2253         (WebCore::FetchHeaders::create):
2254         (WebCore::FetchHeaders::fill):
2255         * Modules/fetch/FetchHeaders.h:
2256         Add helpers to implement the fill algorithm for various input types.
2257         Leave the existing fill for now, as it is still used by the FetchResponse
2258         builtin, but will eventually be removed.
2259
2260         * Modules/fetch/FetchRequest.cpp:
2261         (WebCore::FetchRequest::initializeOptions):
2262         (WebCore::FetchRequest::initializeWith):
2263         (WebCore::FetchRequest::setBody):
2264         (WebCore::FetchRequest::create):
2265         (WebCore::FetchRequest::setBodyFromInputRequest): Deleted.
2266         * Modules/fetch/FetchRequest.h:
2267         Migrate builtin code to the implementation. This is 1-to-1 re-implementation,
2268         so I did not attempt to fix any conformance issues. That will come in follow up.
2269
2270         * Modules/fetch/FetchRequest.idl:
2271         Replace builtins with an IDL constructor.
2272
2273         * Modules/fetch/FetchRequestInit.h:
2274         * Modules/fetch/FetchRequestInit.idl:
2275         Add missing headers and body to FetchRequestInit.
2276
2277 2017-07-30  Said Abou-Hallawa  <sabouhallawa@apple.com>
2278
2279         RenderImageResourceStyleImage::image() should return the nullImage() if the image is not available
2280         https://bugs.webkit.org/show_bug.cgi?id=174874
2281         <rdar://problem/33530130>
2282
2283         Reviewed by Darin Adler.
2284
2285         If an <img> element has image content data for a none cached image, e.g.
2286         -webkit-named-image, RenderImageResourceStyleImage will be created and 
2287         attached to the RenderImage. RenderImageResourceStyleImage::m_cachedImage
2288         will be set to null because the m_styleImage->isCachedImage() is false in
2289         this case. When ImageLoader finishes loading the url of the src attribute, 
2290         RenderImageResource::setCachedImage() will be called to set m_cachedImage.
2291
2292         A crash will happen when the RenderImage is destroyed. Destroying the 
2293         RenderImage calls RenderImageResourceStyleImage::shutdown() which checks
2294         m_cachedImage and finds it not null, so it calls RenderImageResourceStyleImage::image()
2295         which ends up calling CSSNamedImageValue::image() which returns a null pointer
2296         because the size is empty. RenderImageResourceStyleImage::shutdown() calls
2297         image()->stopAnimation() without checking the return value of image().
2298
2299         Like the base class virtual method RenderImageResource::image(), 
2300         RenderImageResourceStyleImage::image() should return the nullImage() if
2301         the image is not available.
2302
2303         Test: fast/images/image-element-image-content-data.html
2304
2305         * css/CSSCrossfadeValue.cpp:
2306         * css/CSSFilterImageValue.cpp:
2307         * page/EventHandler.cpp:
2308         * page/PageSerializer.cpp:
2309         * rendering/RenderElement.cpp:
2310         * rendering/RenderImageResource.cpp:
2311         * rendering/RenderImageResourceStyleImage.cpp:
2312         (WebCore::RenderImageResourceStyleImage::initialize):
2313
2314         (WebCore::RenderImageResourceStyleImage::shutdown): Revert back the changes
2315         of r208511 in this function. Add a call to image()->stopAnimation() without
2316         checking the return of image() since it will return the nullImage() if
2317         the image not available. There is no need to check m_cachedImage before 
2318         calling image() because image() does not check or access m_cachedImage.
2319
2320         (WebCore::RenderImageResourceStyleImage::image): The base class method
2321         RenderImageResource::image() returns the nullImage() if the image not
2322         available. This is because CachedImage::imageForRenderer() returns
2323         the nullImage() if the image is not available; see CachedImage.h. We should
2324         do the same for the derived class for consistency.
2325
2326         * rendering/style/ContentData.cpp:
2327         * rendering/style/StyleCachedImage.cpp:
2328         * style/StylePendingResources.cpp:
2329
2330 2017-07-29  Filip Pizlo  <fpizlo@apple.com>
2331
2332         Unreviewed, rollout r220044 because it set the bots on fire.
2333         
2334         It seems that the "-Wunguarded-availability-new" pragma is not widely supported. So, a bunch of the
2335         Mac bots are now unable to build and that includes EWS.
2336         
2337         Fixing by rolling it out.
2338
2339         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
2340         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
2341         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2342         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setHasAvailableAudioSample):
2343         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer):
2344         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeAudioRenderer):
2345         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
2346         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2347         (-[WebAVSampleBufferErrorListener beginObservingRenderer:]):
2348         (-[WebAVSampleBufferErrorListener stopObservingRenderer:]):
2349         (-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):
2350         (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
2351         (WebCore::SourceBufferPrivateAVFObjC::rendererDidReceiveError):
2352         (WebCore::SourceBufferPrivateAVFObjC::flush):
2353
2354 2017-07-29  Dan Bernstein  <mitz@apple.com>
2355
2356         Fixed building for macOS 10.12 with the macOS 10.13 SDK.
2357
2358         Suppressed the unguarded-availability-new warning around uses of AVSampleBufferAudioRenderer
2359         and AVSampleBufferRenderSynchronizer. Even though the 10.13 SDK declares them as available
2360         starting in that release, they have been available as SPI earlier.
2361
2362         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
2363         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
2364         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2365         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setHasAvailableAudioSample):
2366         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer):
2367         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeAudioRenderer):
2368         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
2369         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2370         (-[WebAVSampleBufferErrorListener beginObservingRenderer:]):
2371         (-[WebAVSampleBufferErrorListener stopObservingRenderer:]):
2372         (-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):
2373         (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
2374         (WebCore::SourceBufferPrivateAVFObjC::rendererDidReceiveError):
2375         (WebCore::SourceBufferPrivateAVFObjC::flush):
2376
2377 2017-07-29  Nan Wang  <n_wang@apple.com>
2378
2379         AX: findMatchingObjects doesn't work when the startObject is ignored
2380         https://bugs.webkit.org/show_bug.cgi?id=174965
2381
2382         Reviewed by Chris Fleizach.
2383
2384         findMatchingObjects would return a wrong element if we pass in an ignored
2385         start object. To fix this, we should use the closest accessible sibling as 
2386         the start object.
2387
2388         Test: accessibility/mac/search-predicate-from-ignored-element.html
2389
2390         * accessibility/AccessibilityObject.cpp:
2391         (WebCore::appendChildrenToArray):
2392
2393 2017-07-29  Aaron Chu  <aaron_chu@apple.com>
2394
2395         AX: FKA: Buttons need a visible focus indicator
2396         https://bugs.webkit.org/show_bug.cgi?id=171040
2397         <rdar://problem/30922548>
2398
2399         Reviewed by Antoine Quint.
2400
2401         Added a background color for the focus state of the icon buttons in modern media controls.
2402
2403         Test: media/modern-media-controls/button/button-focus-state.html
2404
2405         * Modules/modern-media-controls/controls/button.css:
2406         (button:focus):
2407         (button:focus > picture):
2408         * Modules/modern-media-controls/controls/slider.css:
2409         (.slider > input):
2410
2411 2017-07-28  Sam Weinig  <sam@webkit.org>
2412
2413         [WebIDL] Remove JS builtin bindings for FetchHeaders
2414         https://bugs.webkit.org/show_bug.cgi?id=174905
2415
2416         Reviewed by Alex Christensen.
2417
2418         * CMakeLists.txt:
2419         * DerivedSources.make:
2420         * WebCore.xcodeproj/project.pbxproj:
2421         * Modules/fetch/FetchHeaders.js: Removed.
2422         Remove FetchHeaders.js
2423
2424         * Modules/fetch/FetchHeaders.cpp:
2425         (WebCore::appendToHeaderMap):
2426         (WebCore::FetchHeaders::create):
2427         (WebCore::FetchHeaders::append):
2428         * Modules/fetch/FetchHeaders.h:
2429         (WebCore::FetchHeaders::FetchHeaders):
2430         Add create function for generated constructor.
2431         Add appendToHeaderMap static function which takes the functionality
2432         from the existing append function, and makes it useable in create.
2433
2434         * Modules/fetch/FetchHeaders.idl:
2435         Replace [JSBuiltinConstructor] with real constructor. Keep other builtin
2436         attributes as they are still used by other Fetch code.
2437
2438         * bindings/js/JSDOMConvertRecord.h:
2439         Fix record conversion to work with proxies by changing to use the method table
2440         for getOwnPropertyNames, and undefined values by not excluding undefined values. 
2441
2442 2017-07-28  Matt Baker  <mattbaker@apple.com>
2443
2444         Web Inspector: capture an async stack trace when web content calls addEventListener
2445         https://bugs.webkit.org/show_bug.cgi?id=174739
2446         <rdar://problem/33468197>
2447
2448         Reviewed by Brian Burg.
2449
2450         Test: inspector/debugger/async-stack-trace.html
2451
2452         Add instrumentation to EventTarget to support showing asynchronous
2453         stack traces when the debugger breaks in a script event listener.
2454
2455         * dom/EventTarget.cpp:
2456         (WebCore::EventTarget::addEventListener):
2457         (WebCore::EventTarget::removeEventListener):
2458         (WebCore::EventTarget::fireEventListeners):
2459         * inspector/InspectorInstrumentation.cpp:
2460         (WebCore::InspectorInstrumentation::didAddEventListenerImpl):
2461         (WebCore::InspectorInstrumentation::willRemoveEventListenerImpl):
2462         (WebCore::InspectorInstrumentation::willHandleEventImpl):
2463         (WebCore::InspectorInstrumentation::didHandleEventImpl):
2464         * inspector/InspectorInstrumentation.h:
2465         (WebCore::InspectorInstrumentation::didAddEventListener):
2466         (WebCore::InspectorInstrumentation::willRemoveEventListener):
2467         (WebCore::InspectorInstrumentation::willHandleEvent):
2468         (WebCore::InspectorInstrumentation::didHandleEvent):
2469         * inspector/PageDebuggerAgent.cpp:
2470         (WebCore::PageDebuggerAgent::didClearAsyncStackTraceData):
2471         (WebCore::PageDebuggerAgent::didAddEventListener):
2472         (WebCore::PageDebuggerAgent::willRemoveEventListener):
2473         (WebCore::PageDebuggerAgent::willHandleEvent):
2474         * inspector/PageDebuggerAgent.h:
2475
2476 2017-07-28  Matt Rajca  <mrajca@apple.com>
2477
2478         Don't add autoplay restrictions to media elements created in response to user gestures.
2479         https://bugs.webkit.org/show_bug.cgi?id=174947
2480
2481         Reviewed by Eric Carlson.
2482
2483         Test: media/video-create-with-user-gesture.html
2484
2485         * html/HTMLMediaElement.cpp:
2486         (WebCore::HTMLMediaElement::HTMLMediaElement):
2487
2488 2017-07-28  Jeremy Jones  <jeremyj@apple.com>
2489
2490         WebMediaSessionHelper calls -[UIApplication beginReceivingRemoteControlEvents] from WebThread
2491         https://bugs.webkit.org/show_bug.cgi?id=174934
2492         rdar://problem/33586772
2493
2494         Reviewed by Eric Carlson.
2495
2496         No new tests because no effect on DOM.
2497
2498         This dispatches a UIKit call to the main thread since it might happen on WebThread in WK1.
2499
2500         * platform/audio/ios/MediaSessionManagerIOS.mm:
2501         (-[WebMediaSessionHelper initWithCallback:]):
2502
2503 2017-07-28  Myles C. Maxfield  <mmaxfield@apple.com>
2504
2505         [macOS] Reeder's defaults font is Times instead of San Francisco
2506         https://bugs.webkit.org/show_bug.cgi?id=174885
2507         <rdar://problem/33462483>
2508
2509         Reviewed by Simon Fraser.
2510
2511         Reeder uses explicit dot-prefixed names in its source code. Within Core Text,
2512         dot-prefixed names cannot be matched case insensitively. The solution is to
2513         not case-fold these family names, and to make our caches case sensitive for
2514         these special names.
2515
2516         Tests: fast/text/font-lookup-dot-prefix-case-sensitive-2.html
2517                fast/text/font-lookup-dot-prefix-case-sensitive.html
2518
2519         * platform/graphics/FontCache.cpp:
2520         (WebCore::FontPlatformDataCacheKey::operator==):
2521         (WebCore::FontPlatformDataCacheKeyHash::hash):
2522         * platform/graphics/FontCascade.cpp:
2523         (WebCore::keysMatch):
2524         (WebCore::computeFontCascadeCacheHash):
2525         * platform/graphics/FontDescription.cpp:
2526         (WebCore::FontCascadeDescription::familyNamesAreEqual):
2527         (WebCore::FontCascadeDescription::familyNameHash):
2528         (WebCore::FontCascadeDescription::foldedFamilyName):
2529         * platform/graphics/FontDescription.h:
2530         * platform/graphics/cocoa/FontCacheCoreText.cpp:
2531         (WebCore::FontDatabase::fontForPostScriptName):
2532
2533 2017-07-28  Devin Rousso  <drousso@apple.com>
2534
2535         Web Inspector: Record actions performed on CanvasRenderingContext2D
2536         https://bugs.webkit.org/show_bug.cgi?id=174482
2537
2538         Reviewed by Joseph Pecoraro.
2539
2540         Tests: inspector/canvas/recording-2d.html
2541                inspector/canvas/recording.html
2542
2543         * html/canvas/CanvasRenderingContext2D.idl:
2544         Add CallTracingCallback to interface to record all API calls.
2545
2546         * html/HTMLCanvasElement.cpp:
2547         (WebCore::HTMLCanvasElement::paint):
2548         If a recording is active, mark the current frame as completed.
2549
2550         * bindings/scripts/CodeGeneratorJS.pm:
2551         (GenerateAttributeGetterBodyDefinition):
2552         (GenerateAttributeSetterBodyDefinition):
2553         (GenerateImplementationFunctionCall):
2554         (GenerateCallTracerParameter):
2555         (GenerateCallTracer):
2556         * bindings/scripts/test/TestCallTracer.idl:
2557         * bindings/scripts/test/JS/JSTestCallTracer.cpp:
2558         (WebCore::setJSTestCallTracerTestAttributeInterfaceSetter):
2559         (WebCore::setJSTestCallTracerTestAttributeSpecifiedSetter):
2560         (WebCore::jsTestCallTracerTestAttributeWithVariantGetter):
2561         (WebCore::jsTestCallTracerTestAttributeWithVariant):
2562         (WebCore::setJSTestCallTracerTestAttributeWithVariantSetter):
2563         (WebCore::setJSTestCallTracerTestAttributeWithVariant):
2564         (WebCore::jsTestCallTracerPrototypeFunctionTestOperationInterfaceBody):
2565         (WebCore::jsTestCallTracerPrototypeFunctionTestOperationSpecifiedBody):
2566         (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithArgumentsBody):
2567         (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithNullableArgumentBody):
2568         (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithVariantArgumentBody):
2569         (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithVariantArgument):
2570         * inspector/InspectorCanvas.h:
2571         * inspector/InspectorCanvas.cpp:
2572         (WebCore::InspectorCanvas::recordAction):
2573         (WebCore::InspectorCanvas::buildAction):
2574         Change CallTracer IDL generation to flatten any variants so that all types for the
2575         parameters of an action are able to be listed in a single variant. This prevents possible
2576         ambiguity when constructing the variant, as they require that exactly one type be
2577         constructible and a sub-variant might not satisfy that condition. This was only an issue for
2578         older mac SDKs.
2579
2580         * bindings/js/CallTracer.h:
2581         * bindings/js/CallTracer.cpp:
2582         (WebCore::CallTracer::recordCanvasAction):
2583         * bindings/js/CallTracerTypes.h:
2584         * inspector/InspectorCanvasAgent.h:
2585         * inspector/InspectorCanvasAgent.cpp:
2586         (WebCore::InspectorCanvasAgent::recordCanvasAction):
2587         * inspector/InspectorInstrumentation.h:
2588         * inspector/InspectorInstrumentation.cpp:
2589         (WebCore::InspectorInstrumentation::recordCanvasAction):
2590         (WebCore::InspectorInstrumentation::recordCanvasActionImpl):
2591         Rename CanvasActionParameterVariant to RecordCanvasActionVariant to match what is expected by
2592         the IDL generator. Also remove unnecessary includes now that they are in CallTracerTypes.h.
2593
2594         * CMakeLists.txt:
2595         * bindings/js/JSBindingsAllInOne.cpp:
2596         Add CallTracer for CMake builds.
2597
2598 2017-07-28  Sam Weinig  <sam@webkit.org>
2599
2600         [WebIDL] Split-up and cleanup Fetch IDL files in preparation for removing unnecessary js builtins
2601         https://bugs.webkit.org/show_bug.cgi?id=174915
2602
2603         Reviewed by Alex Christensen.
2604
2605         - Split FetchRequest enums and Init dictionary out of FetchRequest so they
2606           can be used from other files like WorkerGlobalScopeFetch and DOMWindowFetch.
2607         - Add missing FetchResponseInit. Currently unused but will be in a subsequent patch.
2608         - Add and update comments about missing properties and functions.
2609
2610         * CMakeLists.txt:
2611         * DerivedSources.make:
2612         * WebCore.xcodeproj/project.pbxproj:
2613         * Modules/fetch/DOMWindowFetch.idl:
2614         * Modules/fetch/FetchBody.idl:
2615         * Modules/fetch/FetchBodyOwner.h:
2616         * Modules/fetch/FetchHeaders.h:
2617         * Modules/fetch/FetchHeaders.idl:
2618         * Modules/fetch/FetchReferrerPolicy.h: Added.
2619         * Modules/fetch/FetchReferrerPolicy.idl: Added.
2620         * Modules/fetch/FetchRequest.h:
2621         * Modules/fetch/FetchRequest.idl:
2622         * Modules/fetch/FetchRequestCache.h: Added.
2623         * Modules/fetch/FetchRequestCache.idl: Added.
2624         * Modules/fetch/FetchRequestCredentials.h: Added.
2625         * Modules/fetch/FetchRequestCredentials.idl: Added.
2626         * Modules/fetch/FetchRequestInit.h: Added.
2627         * Modules/fetch/FetchRequestInit.idl: Added.
2628         * Modules/fetch/FetchRequestMode.h: Added.
2629         * Modules/fetch/FetchRequestMode.idl: Added.
2630         * Modules/fetch/FetchRequestRedirect.h: Added.
2631         * Modules/fetch/FetchRequestRedirect.idl: Added.
2632         * Modules/fetch/FetchResponse.h:
2633         * Modules/fetch/FetchResponse.idl:
2634         * Modules/fetch/WorkerGlobalScopeFetch.idl:
2635
2636 2017-07-28  Myles C. Maxfield  <mmaxfield@apple.com>
2637
2638         REGRESSION(r216944): Fallback fonts erroneously visible when the primary font is loading
2639         https://bugs.webkit.org/show_bug.cgi?id=174772
2640         <rdar://problem/33267643>
2641
2642         Reviewed by Simon Fraser.
2643
2644         During a font load, we try pretty hard to find a font to use that isn't the
2645         last resort font (which happens to be Times). We do this by iterating through
2646         all the fonts in the font-family list, as well as through all the relevant
2647         @font-face blocks which share the requested font family name. 
2648
2649         Unfortunately, if we find one of these fallback fonts, we were simply using it
2650         directly, which means that it was being drawn as visible (because the
2651         visibility setting lives inside the Font object). Instead, we should carry the
2652         invisibility setting from the interstitial font to this used fallback font.
2653
2654         This patch is an extension of r219221, which fixed the problem only for system
2655         fallback fonts. This patch adopts the same methodology to all fallback fonts.
2656
2657         Test: http/tests/webfont/font-loading-system-fallback-visibility-FontRanges.html
2658
2659         * platform/graphics/FontCascadeFonts.cpp:
2660         (WebCore::FontCascadeFonts::glyphDataForVariant):
2661         (WebCore::glyphPageFromFontRanges):
2662         * platform/graphics/FontRanges.cpp:
2663         (WebCore::FontRanges::glyphDataForCharacter):
2664
2665 2017-07-28  Frederic Wang  <fwang@igalia.cpm>
2666
2667         Fix typo in scrollPositionChangedViaDelegatedScrolling
2668         https://bugs.webkit.org/show_bug.cgi?id=174937
2669
2670         Reviewed by Wenson Hsieh.
2671
2672         No new tests, fix typo in the inUserInteraction parameter.
2673
2674         * page/scrolling/ScrollingTree.cpp:
2675         (WebCore::ScrollingTree::scrollPositionChangedViaDelegatedScrolling):
2676         * page/scrolling/ScrollingTree.h:
2677
2678 2017-07-28  Wenson Hsieh  <wenson_hsieh@apple.com>
2679
2680         [iOS DnD] [WK1] Snapshots generated using -[DOMRange renderImageForcingBlackText:] are upside down
2681         https://bugs.webkit.org/show_bug.cgi?id=174928
2682         <rdar://problem/33584280>
2683
2684         Reviewed by Tim Horton.
2685
2686         Pulls the implementation of createDragImageForRange out into DragImageIOS, and use TextIndicator to generate a
2687         snapshot instead of FrameSelection's snapshotting utilities. This makes snapshotting a DOMRange behave the same
2688         way as snapshotting a dragged selection.
2689
2690         No way of testing TextIndicator-based snapshotting yet.
2691
2692         * platform/DragImage.cpp:
2693
2694         Guard createDragImageForRange for !PLATFORM(IOS).
2695
2696         * platform/ios/DragImageIOS.mm:
2697         (WebCore::createDragImageForSelection):
2698
2699         Add a FIXME to point out that having an additional context flip inside the UIGraphicsImageRenderer block results
2700         in an upside-down drag image being returned from createDragImageFromImage. This image is being flipped elsewhere
2701         in drag initiation code, which eventually results in the correct orientation; we'll need further investigation
2702         to remove this extraneous flip.
2703
2704         (WebCore::createDragImageForRange):
2705
2706 2017-07-28  Jeremy Jones  <jeremyj@apple.com>
2707
2708         Remove Web prefix from WebVideoFullscreen and WebPlaybackSession classes.
2709         https://bugs.webkit.org/show_bug.cgi?id=174437
2710
2711         Reviewed by Darin Adler.
2712
2713         No new tests because no behavior change.
2714
2715         Remove redundant Web- prefix from classes in WebCore namespace.
2716
2717         * WebCore.xcodeproj/project.pbxproj:
2718         * html/HTMLMediaElement.cpp:
2719         * html/HTMLVideoElement.cpp:
2720         * platform/cocoa/PlaybackSessionInterface.h: Renamed from Source/WebCore/platform/cocoa/WebPlaybackSessionInterface.h.
2721         (WebCore::PlaybackSessionInterface::~PlaybackSessionInterface):
2722         * platform/cocoa/PlaybackSessionModel.h: Renamed from Source/WebCore/platform/cocoa/WebPlaybackSessionModel.h.
2723         (WebCore::PlaybackSessionModel::~PlaybackSessionModel):
2724         (WebCore::PlaybackSessionModelClient::~PlaybackSessionModelClient):
2725         (WebCore::PlaybackSessionModelClient::externalPlaybackChanged):
2726         * platform/cocoa/PlaybackSessionModelMediaElement.h: Renamed from Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.h.
2727         * platform/cocoa/PlaybackSessionModelMediaElement.mm: Renamed from Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.mm.
2728         * platform/cocoa/VideoFullscreenChangeObserver.h: Renamed from Source/WebCore/platform/cocoa/WebVideoFullscreenChangeObserver.h.
2729         (WebCore::VideoFullscreenChangeObserver::~VideoFullscreenChangeObserver):
2730         * platform/cocoa/VideoFullscreenModel.h: Renamed from Source/WebCore/platform/cocoa/WebVideoFullscreenModel.h.
2731         (WebCore::VideoFullscreenModel::~VideoFullscreenModel):
2732         (WebCore::VideoFullscreenModelClient::~VideoFullscreenModelClient):
2733         * platform/cocoa/VideoFullscreenModelVideoElement.h: Renamed from Source/WebCore/platform/cocoa/WebVideoFullscreenModelVideoElement.h.
2734         (WebCore::VideoFullscreenModelVideoElement::create):
2735         * platform/cocoa/VideoFullscreenModelVideoElement.mm: Renamed from Source/WebCore/platform/cocoa/WebVideoFullscreenModelVideoElement.mm.
2736         * platform/ios/PlaybackSessionInterfaceAVKit.h: Renamed from Source/WebCore/platform/ios/WebPlaybackSessionInterfaceAVKit.h.
2737         * platform/ios/PlaybackSessionInterfaceAVKit.mm: Renamed from Source/WebCore/platform/ios/WebPlaybackSessionInterfaceAVKit.mm.
2738         * platform/ios/VideoFullscreenInterfaceAVKit.h: Renamed from Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.h.
2739         * platform/ios/VideoFullscreenInterfaceAVKit.mm: Renamed from Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm.
2740         * platform/ios/WebAVPlayerController.h:
2741         * platform/ios/WebAVPlayerController.mm:
2742         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2743         * platform/mac/PlaybackSessionInterfaceMac.h: Renamed from Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.h.
2744         * platform/mac/PlaybackSessionInterfaceMac.mm: Renamed from Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.mm.
2745         * platform/mac/VideoFullscreenInterfaceMac.h: Renamed from Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.h.
2746         * platform/mac/VideoFullscreenInterfaceMac.mm: Renamed from Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.mm.
2747         * platform/mac/WebPlaybackControlsManager.h:
2748         * platform/mac/WebPlaybackControlsManager.mm:
2749
2750 2017-07-27  Jeremy Jones  <jeremyj@apple.com>
2751
2752         Don't override _allowsMediaDocumentInlinePlayback in MediaDocument with playsinlineAttr.
2753         https://bugs.webkit.org/show_bug.cgi?id=174850
2754         rdar://problem/33449903
2755
2756         Reviewed by Jon Lee.
2757
2758         This change removes playsinlineAttr from MediaDocument so that it doesn't override the setting
2759         from _allowsMediaDocumentInlinePlayback. In its place is an update to requiresFullscreenForVideoPlayback
2760         that implements the details of exactly which media documents are still allowed to play inlne.
2761
2762         Media documents always use a video element; but when there are no video tracks, it has behavior like 
2763         an audio element. See media-controller.js isAudio().
2764
2765         This change preserves this behavior with respect to fullscreen requirements for media document by
2766         mirroring the isAudio() check in requiresFullscreenForVideoPlayback.
2767
2768         * html/MediaDocument.cpp:
2769         (WebCore::MediaDocumentParser::createDocumentStructure):
2770         * html/MediaElementSession.cpp:
2771         (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback):
2772
2773 2017-07-27  Jeremy Jones  <jeremyj@apple.com>
2774
2775         MediaDocument fullscreen pinch gesture should trigger navigate back.
2776         https://bugs.webkit.org/show_bug.cgi?id=174914
2777
2778         Reviewed by Jon Lee.
2779
2780         No new tests because only effect is from interaction with platform.
2781
2782         For media documents, pressing the "done" button on fullscreen video navigates back
2783         to the previous page. The same should happen for other gestures that pause playback
2784         when returning to inline. This allows the gesture to have the same behavior as the
2785         button.
2786
2787         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2788         (WebVideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason):
2789
2790 2017-07-27  Aaron Chu  <aaron_chu@apple.com>
2791
2792         AX: VoiceOver silent or skipping over time values on media player.
2793         https://bugs.webkit.org/show_bug.cgi?id=174324
2794         <rdar://problem/32021784>
2795
2796         Reviewed by Antoine Quint.
2797
2798         Added role attribute to modern media controls time lable class so that VoiceOver can access the time label when the media is playing.
2799
2800         Test Updated: media/modern-media-controls/time-label/time-label.html
2801         Test Added: media/modern-media-controls/time-label/ios-time-label.html
2802         
2803         * Modules/modern-media-controls/controls/time-label.js:
2804
2805 2017-07-27  Yusuke Suzuki  <utatane.tea@gmail.com>
2806
2807         Hoist DOM binding attribute getter prologue into JavaScriptCore taking advantage of DOMJIT / CheckSubClass
2808         https://bugs.webkit.org/show_bug.cgi?id=171637
2809
2810         Reviewed by Darin Adler.
2811
2812         We use DOMAttribute. When DOMAttribute is specified, ClassInfo check is performed by JSC side.
2813         So, we can drop ClassInfo check from the actual function.
2814
2815         We also simplify DOMJIT::GetterSetter to make it smaller size.
2816
2817         WebCore size comparison
2818             Before: 48443292
2819             After:  48087800 (0.7% reduction)
2820
2821         Speedometer Scores show 0.8% improvement.
2822             Before: 158.9 +- 0.46
2823             After:  160.2 +- 0.36
2824
2825         Dromaeo DOM core Scores show 5.8% improvement.
2826                                         Before                   After
2827             Total Score:         8424.12runs/s ±1.38%     8911.60runs/s ±1.47%
2828               DOM Attributes    12627.27runs/s ±1.87%    14023.17runs/s ±1.87%
2829               DOM Modification   1207.82runs/s ±2.48%     1204.21runs/s ±3.05%
2830               DOM Query         68068.82runs/s ±0.63%    74273.38runs/s ±0.69%
2831               DOM Traversal      1240.07runs/s ±1.96%     1256.64runs/s ±1.77%
2832
2833         Performance improvement can be explained by the following optimizations.
2834
2835         1. Type checks are typically eliminated in all the JIT tiers. IC / DFG / FTL can
2836            drop type checks since get_by_id operation already performs a structure check
2837            which subsumes this type check.
2838         2. Direct getter call by CallDOMGetter without creating IC in DFG and FTL.
2839
2840         * bindings/js/JSDOMAttribute.h:
2841         (WebCore::IDLAttribute::get):
2842         Add CastedThisErrorBehavior::Assert case. When this is specified, we perform casting without using jsDynamicCast.
2843
2844         * bindings/scripts/CodeGeneratorJS.pm:
2845         (IsAcceleratedDOMAttribute):
2846         (GetJSCAttributesForAttribute):
2847         (GenerateHeader):
2848         (GeneratePropertiesHashTable):
2849         (GenerateImplementation):
2850         (GenerateAttributeGetterTrampolineDefinition):
2851         (GenerateAttributeGetterDefinition):
2852         (GenerateCallbackImplementationContent):
2853         (GenerateHashTableValueArray):
2854         (GenerateHashTable):
2855         (GenerateConstructorHelperMethods):
2856         Update CodeGeneratorJS to emit DOMAttribute. And DOMJIT::GetterSetter becomes changed to be smaller size.
2857
2858         * bindings/scripts/test/JS/JSInterfaceName.cpp:
2859         (WebCore::JSInterfaceNamePrototype::finishCreation):
2860         * bindings/scripts/test/JS/JSMapLike.cpp:
2861         (WebCore::JSMapLikePrototype::finishCreation):
2862         * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
2863         (WebCore::JSReadOnlyMapLikePrototype::finishCreation):
2864         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2865         (WebCore::JSTestActiveDOMObjectPrototype::finishCreation):
2866         (WebCore::jsTestActiveDOMObjectExcitingAttr):
2867         * bindings/scripts/test/JS/JSTestCEReactions.cpp:
2868         (WebCore::JSTestCEReactionsPrototype::finishCreation):
2869         (WebCore::jsTestCEReactionsAttributeWithCEReactions):
2870         (WebCore::jsTestCEReactionsReflectAttributeWithCEReactions):
2871         (WebCore::jsTestCEReactionsStringifierAttribute):
2872         * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
2873         (WebCore::JSTestCEReactionsStringifierPrototype::finishCreation):
2874         (WebCore::jsTestCEReactionsStringifierValue):
2875         * bindings/scripts/test/JS/JSTestCallTracer.cpp:
2876         (WebCore::JSTestCallTracerPrototype::finishCreation):
2877         (WebCore::jsTestCallTracerTestAttributeInterface):
2878         (WebCore::jsTestCallTracerTestAttributeSpecified):
2879         * bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
2880         (WebCore::JSTestCallbackInterfaceConstructor::initializeProperties):
2881         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
2882         (WebCore::JSTestClassWithJSBuiltinConstructorPrototype::finishCreation):
2883         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
2884         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::finishCreation):
2885         * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
2886         (WebCore::JSTestDOMJITPrototype::finishCreation):
2887         (WebCore::TestDOMJITAnyAttrDOMJIT::TestDOMJITAnyAttrDOMJIT): Deleted.
2888         (WebCore::domJITGetterSetterForTestDOMJITAnyAttr): Deleted.
2889         (WebCore::TestDOMJITBooleanAttrDOMJIT::TestDOMJITBooleanAttrDOMJIT): Deleted.
2890         (WebCore::domJITGetterSetterForTestDOMJITBooleanAttr): Deleted.
2891         (WebCore::TestDOMJITByteAttrDOMJIT::TestDOMJITByteAttrDOMJIT): Deleted.
2892         (WebCore::domJITGetterSetterForTestDOMJITByteAttr): Deleted.
2893         (WebCore::TestDOMJITOctetAttrDOMJIT::TestDOMJITOctetAttrDOMJIT): Deleted.
2894         (WebCore::domJITGetterSetterForTestDOMJITOctetAttr): Deleted.
2895         (WebCore::TestDOMJITShortAttrDOMJIT::TestDOMJITShortAttrDOMJIT): Deleted.
2896         (WebCore::domJITGetterSetterForTestDOMJITShortAttr): Deleted.
2897         (WebCore::TestDOMJITUnsignedShortAttrDOMJIT::TestDOMJITUnsignedShortAttrDOMJIT): Deleted.
2898         (WebCore::domJITGetterSetterForTestDOMJITUnsignedShortAttr): Deleted.
2899         (WebCore::TestDOMJITLongAttrDOMJIT::TestDOMJITLongAttrDOMJIT): Deleted.
2900         (WebCore::domJITGetterSetterForTestDOMJITLongAttr): Deleted.
2901         (WebCore::TestDOMJITUnsignedLongAttrDOMJIT::TestDOMJITUnsignedLongAttrDOMJIT): Deleted.
2902         (WebCore::domJITGetterSetterForTestDOMJITUnsignedLongAttr): Deleted.
2903         (WebCore::TestDOMJITLongLongAttrDOMJIT::TestDOMJITLongLongAttrDOMJIT): Deleted.
2904         (WebCore::domJITGetterSetterForTestDOMJITLongLongAttr): Deleted.
2905         (WebCore::TestDOMJITUnsignedLongLongAttrDOMJIT::TestDOMJITUnsignedLongLongAttrDOMJIT): Deleted.
2906         (WebCore::domJITGetterSetterForTestDOMJITUnsignedLongLongAttr): Deleted.
2907         (WebCore::TestDOMJITFloatAttrDOMJIT::TestDOMJITFloatAttrDOMJIT): Deleted.
2908         (WebCore::domJITGetterSetterForTestDOMJITFloatAttr): Deleted.
2909         (WebCore::TestDOMJITUnrestrictedFloatAttrDOMJIT::TestDOMJITUnrestrictedFloatAttrDOMJIT): Deleted.
2910         (WebCore::domJITGetterSetterForTestDOMJITUnrestrictedFloatAttr): Deleted.
2911         (WebCore::TestDOMJITDoubleAttrDOMJIT::TestDOMJITDoubleAttrDOMJIT): Deleted.
2912         (WebCore::domJITGetterSetterForTestDOMJITDoubleAttr): Deleted.
2913         (WebCore::TestDOMJITUnrestrictedDoubleAttrDOMJIT::TestDOMJITUnrestrictedDoubleAttrDOMJIT): Deleted.
2914         (WebCore::domJITGetterSetterForTestDOMJITUnrestrictedDoubleAttr): Deleted.
2915         (WebCore::TestDOMJITDomStringAttrDOMJIT::TestDOMJITDomStringAttrDOMJIT): Deleted.
2916         (WebCore::domJITGetterSetterForTestDOMJITDomStringAttr): Deleted.
2917         (WebCore::TestDOMJITByteStringAttrDOMJIT::TestDOMJITByteStringAttrDOMJIT): Deleted.
2918         (WebCore::domJITGetterSetterForTestDOMJITByteStringAttr): Deleted.
2919         (WebCore::TestDOMJITUsvStringAttrDOMJIT::TestDOMJITUsvStringAttrDOMJIT): Deleted.
2920         (WebCore::domJITGetterSetterForTestDOMJITUsvStringAttr): Deleted.
2921         (WebCore::TestDOMJITNodeAttrDOMJIT::TestDOMJITNodeAttrDOMJIT): Deleted.
2922         (WebCore::domJITGetterSetterForTestDOMJITNodeAttr): Deleted.
2923         (WebCore::TestDOMJITBooleanNullableAttrDOMJIT::TestDOMJITBooleanNullableAttrDOMJIT): Deleted.
2924         (WebCore::domJITGetterSetterForTestDOMJITBooleanNullableAttr): Deleted.
2925         (WebCore::TestDOMJITByteNullableAttrDOMJIT::TestDOMJITByteNullableAttrDOMJIT): Deleted.
2926         (WebCore::domJITGetterSetterForTestDOMJITByteNullableAttr): Deleted.
2927         (WebCore::TestDOMJITOctetNullableAttrDOMJIT::TestDOMJITOctetNullableAttrDOMJIT): Deleted.
2928         (WebCore::domJITGetterSetterForTestDOMJITOctetNullableAttr): Deleted.
2929         (WebCore::TestDOMJITShortNullableAttrDOMJIT::TestDOMJITShortNullableAttrDOMJIT): Deleted.
2930         (WebCore::domJITGetterSetterForTestDOMJITShortNullableAttr): Deleted.
2931         (WebCore::TestDOMJITUnsignedShortNullableAttrDOMJIT::TestDOMJITUnsignedShortNullableAttrDOMJIT): Deleted.
2932         (WebCore::domJITGetterSetterForTestDOMJITUnsignedShortNullableAttr): Deleted.
2933         (WebCore::TestDOMJITLongNullableAttrDOMJIT::TestDOMJITLongNullableAttrDOMJIT): Deleted.
2934         (WebCore::domJITGetterSetterForTestDOMJITLongNullableAttr): Deleted.
2935         (WebCore::TestDOMJITUnsignedLongNullableAttrDOMJIT::TestDOMJITUnsignedLongNullableAttrDOMJIT): Deleted.
2936         (WebCore::domJITGetterSetterForTestDOMJITUnsignedLongNullableAttr): Deleted.
2937         (WebCore::TestDOMJITLongLongNullableAttrDOMJIT::TestDOMJITLongLongNullableAttrDOMJIT): Deleted.
2938         (WebCore::domJITGetterSetterForTestDOMJITLongLongNullableAttr): Deleted.
2939         (WebCore::TestDOMJITUnsignedLongLongNullableAttrDOMJIT::TestDOMJITUnsignedLongLongNullableAttrDOMJIT): Deleted.
2940         (WebCore::domJITGetterSetterForTestDOMJITUnsignedLongLongNullableAttr): Deleted.
2941         (WebCore::TestDOMJITFloatNullableAttrDOMJIT::TestDOMJITFloatNullableAttrDOMJIT): Deleted.
2942         (WebCore::domJITGetterSetterForTestDOMJITFloatNullableAttr): Deleted.
2943         (WebCore::TestDOMJITUnrestrictedFloatNullableAttrDOMJIT::TestDOMJITUnrestrictedFloatNullableAttrDOMJIT): Deleted.
2944         (WebCore::domJITGetterSetterForTestDOMJITUnrestrictedFloatNullableAttr): Deleted.
2945         (WebCore::TestDOMJITDoubleNullableAttrDOMJIT::TestDOMJITDoubleNullableAttrDOMJIT): Deleted.
2946         (WebCore::domJITGetterSetterForTestDOMJITDoubleNullableAttr): Deleted.
2947         (WebCore::TestDOMJITUnrestrictedDoubleNullableAttrDOMJIT::TestDOMJITUnrestrictedDoubleNullableAttrDOMJIT): Deleted.
2948         (WebCore::domJITGetterSetterForTestDOMJITUnrestrictedDoubleNullableAttr): Deleted.
2949         (WebCore::TestDOMJITDomStringNullableAttrDOMJIT::TestDOMJITDomStringNullableAttrDOMJIT): Deleted.
2950         (WebCore::domJITGetterSetterForTestDOMJITDomStringNullableAttr): Deleted.
2951         (WebCore::TestDOMJITByteStringNullableAttrDOMJIT::TestDOMJITByteStringNullableAttrDOMJIT): Deleted.
2952         (WebCore::domJITGetterSetterForTestDOMJITByteStringNullableAttr): Deleted.
2953         (WebCore::TestDOMJITUsvStringNullableAttrDOMJIT::TestDOMJITUsvStringNullableAttrDOMJIT): Deleted.
2954         (WebCore::domJITGetterSetterForTestDOMJITUsvStringNullableAttr): Deleted.
2955         (WebCore::TestDOMJITNodeNullableAttrDOMJIT::TestDOMJITNodeNullableAttrDOMJIT): Deleted.
2956         (WebCore::domJITGetterSetterForTestDOMJITNodeNullableAttr): Deleted.
2957         * bindings/scripts/test/JS/JSTestDOMJIT.h:
2958         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2959         (WebCore::JSTestEventConstructorPrototype::finishCreation):
2960         (WebCore::jsTestEventConstructorAttr1):
2961         (WebCore::jsTestEventConstructorAttr2):
2962         (WebCore::jsTestEventConstructorAttr3):
2963         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2964         (WebCore::JSTestEventTargetPrototype::finishCreation):
2965         * bindings/scripts/test/JS/JSTestException.cpp:
2966         (WebCore::JSTestExceptionPrototype::finishCreation):
2967         (WebCore::jsTestExceptionName):
2968         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2969         (WebCore::JSTestGenerateIsReachablePrototype::finishCreation):
2970         (WebCore::jsTestGenerateIsReachableASecretAttribute):
2971         * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
2972         (WebCore::jsTestGlobalObjectRegularAttribute):
2973         * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
2974         (WebCore::JSTestIndexedSetterNoIdentifierPrototype::finishCreation):
2975         * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
2976         (WebCore::JSTestIndexedSetterThrowingExceptionPrototype::finishCreation):
2977         * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
2978         (WebCore::JSTestIndexedSetterWithIdentifierPrototype::finishCreation):
2979         * bindings/scripts/test/JS/JSTestInterface.cpp:
2980         (WebCore::JSTestInterfaceConstructor::initializeProperties):
2981         (WebCore::JSTestInterfacePrototype::finishCreation):
2982         (WebCore::jsTestInterfaceImplementsStr1):
2983         (WebCore::jsTestInterfaceImplementsStr2):
2984         (WebCore::jsTestInterfaceImplementsStr3):
2985         (WebCore::jsTestInterfaceImplementsNode):
2986         (WebCore::jsTestInterfaceSupplementalStr1):
2987         (WebCore::jsTestInterfaceSupplementalStr2):
2988         (WebCore::jsTestInterfaceSupplementalStr3):
2989         (WebCore::jsTestInterfaceSupplementalNode):
2990         * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
2991         (WebCore::JSTestInterfaceLeadingUnderscorePrototype::finishCreation):
2992         (WebCore::jsTestInterfaceLeadingUnderscoreReadonly):
2993         * bindings/scripts/test/JS/JSTestIterable.cpp:
2994         (WebCore::JSTestIterablePrototype::finishCreation):
2995         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
2996         (WebCore::JSTestJSBuiltinConstructorPrototype::finishCreation):
2997         (WebCore::jsTestJSBuiltinConstructorTestAttributeCustom):
2998         (WebCore::jsTestJSBuiltinConstructorTestAttributeRWCustom):
2999         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3000         (WebCore::JSTestMediaQueryListListenerPrototype::finishCreation):
3001         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
3002         (WebCore::JSTestNamedAndIndexedSetterNoIdentifierPrototype::finishCreation):
3003         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
3004         (WebCore::JSTestNamedAndIndexedSetterThrowingExceptionPrototype::finishCreation):
3005         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
3006         (WebCore::JSTestNamedAndIndexedSetterWithIdentifierPrototype::finishCreation):
3007         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3008         (WebCore::JSTestNamedConstructorPrototype::finishCreation):
3009         * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
3010         (WebCore::JSTestNamedDeleterNoIdentifierPrototype::finishCreation):
3011         * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
3012         (WebCore::JSTestNamedDeleterThrowingExceptionPrototype::finishCreation):
3013         * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
3014         (WebCore::JSTestNamedDeleterWithIdentifierPrototype::finishCreation):
3015         * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
3016         (WebCore::JSTestNamedDeleterWithIndexedGetterPrototype::finishCreation):
3017         * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
3018         (WebCore::JSTestNamedGetterCallWithPrototype::finishCreation):
3019         * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
3020         (WebCore::JSTestNamedGetterNoIdentifierPrototype::finishCreation):
3021         * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
3022         (WebCore::JSTestNamedGetterWithIdentifierPrototype::finishCreation):
3023         * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
3024         (WebCore::JSTestNamedSetterNoIdentifierPrototype::finishCreation):
3025         * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
3026         (WebCore::JSTestNamedSetterThrowingExceptionPrototype::finishCreation):
3027         * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
3028         (WebCore::JSTestNamedSetterWithIdentifierPrototype::finishCreation):
3029         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
3030         (WebCore::JSTestNamedSetterWithIndexedGetterPrototype::finishCreation):
3031         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
3032         (WebCore::JSTestNamedSetterWithIndexedGetterAndSetterPrototype::finishCreation):
3033         * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
3034         (WebCore::JSTestNamedSetterWithOverrideBuiltinsPrototype::finishCreation):
3035         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
3036         (WebCore::JSTestNamedSetterWithUnforgablePropertiesPrototype::finishCreation):
3037         (WebCore::jsTestNamedSetterWithUnforgablePropertiesUnforgeableAttribute):
3038         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
3039         (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype::finishCreation):
3040         (WebCore::jsTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsUnforgeableAttribute):
3041         * bindings/scripts/test/JS/JSTestNode.cpp:
3042         (WebCore::JSTestNodePrototype::finishCreation):
3043         (WebCore::jsTestNodeName):
3044         * bindings/scripts/test/JS/JSTestObj.cpp:
3045         (WebCore::JSTestObjConstructor::initializeProperties):
3046         (WebCore::JSTestObjPrototype::finishCreation):
3047         (WebCore::jsTestObjReadOnlyLongAttr):
3048         (WebCore::jsTestObjReadOnlyStringAttr):
3049         (WebCore::jsTestObjReadOnlyTestObjAttr):
3050         (WebCore::jsTestObjEnumAttr):
3051         (WebCore::jsTestObjByteAttr):
3052         (WebCore::jsTestObjOctetAttr):
3053         (WebCore::jsTestObjShortAttr):
3054         (WebCore::jsTestObjClampedShortAttr):
3055         (WebCore::jsTestObjEnforceRangeShortAttr):
3056         (WebCore::jsTestObjUnsignedShortAttr):
3057         (WebCore::jsTestObjLongAttr):
3058         (WebCore::jsTestObjLongLongAttr):
3059         (WebCore::jsTestObjUnsignedLongLongAttr):
3060         (WebCore::jsTestObjStringAttr):
3061         (WebCore::jsTestObjUsvstringAttr):
3062         (WebCore::jsTestObjTestObjAttr):
3063         (WebCore::jsTestObjTestNullableObjAttr):
3064         (WebCore::jsTestObjUnforgeableAttr):
3065         (WebCore::jsTestObjStringAttrTreatingNullAsEmptyString):
3066         (WebCore::jsTestObjUsvstringAttrTreatingNullAsEmptyString):
3067         (WebCore::jsTestObjByteStringAttrTreatingNullAsEmptyString):
3068         (WebCore::jsTestObjStringLongRecordAttr):
3069         (WebCore::jsTestObjUsvstringLongRecordAttr):
3070         (WebCore::jsTestObjStringObjRecordAttr):
3071         (WebCore::jsTestObjStringNullableObjRecordAttr):
3072         (WebCore::jsTestObjDictionaryAttr):
3073         (WebCore::jsTestObjNullableDictionaryAttr):
3074         (WebCore::jsTestObjAnnotatedTypeInUnionAttr):
3075         (WebCore::jsTestObjAnnotatedTypeInSequenceAttr):
3076         (WebCore::jsTestObjImplementationEnumAttr):
3077         (WebCore::jsTestObjXMLObjAttr):
3078         (WebCore::jsTestObjCreate):
3079         (WebCore::jsTestObjReflectedStringAttr):
3080         (WebCore::jsTestObjReflectedUSVStringAttr):
3081         (WebCore::jsTestObjReflectedIntegralAttr):
3082         (WebCore::jsTestObjReflectedUnsignedIntegralAttr):
3083         (WebCore::jsTestObjReflectedBooleanAttr):
3084         (WebCore::jsTestObjReflectedURLAttr):
3085         (WebCore::jsTestObjReflectedUSVURLAttr):
3086         (WebCore::jsTestObjReflectedCustomIntegralAttr):
3087         (WebCore::jsTestObjReflectedCustomBooleanAttr):
3088         (WebCore::jsTestObjReflectedCustomURLAttr):
3089         (WebCore::jsTestObjEnabledAtRuntimeAttribute):
3090         (WebCore::jsTestObjEnabledBySettingAttribute):
3091         (WebCore::jsTestObjTypedArrayAttr):
3092         (WebCore::jsTestObjAttributeWithGetterException):
3093         (WebCore::jsTestObjAttributeWithSetterException):
3094         (WebCore::jsTestObjStringAttrWithGetterException):
3095         (WebCore::jsTestObjStringAttrWithSetterException):
3096         (WebCore::jsTestObjCustomAttr):
3097         (WebCore::jsTestObjOnfoo):
3098         (WebCore::jsTestObjOnwebkitfoo):
3099         (WebCore::jsTestObjWithScriptStateAttribute):
3100         (WebCore::jsTestObjWithCallWithAndSetterCallWithAttribute):
3101         (WebCore::jsTestObjWithScriptExecutionContextAttribute):
3102         (WebCore::jsTestObjWithScriptStateAttributeRaises):
3103         (WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
3104         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttribute):
3105         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
3106         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
3107         (WebCore::jsTestObjConditionalAttr1):
3108         (WebCore::jsTestObjConditionalAttr2):
3109         (WebCore::jsTestObjConditionalAttr3):
3110         (WebCore::jsTestObjCachedAttribute1):
3111         (WebCore::jsTestObjCachedAttribute2):
3112         (WebCore::jsTestObjAnyAttribute):
3113         (WebCore::jsTestObjObjectAttribute):
3114         (WebCore::jsTestObjContentDocument):
3115         (WebCore::jsTestObjMutablePoint):
3116         (WebCore::jsTestObjStrawberry):
3117         (WebCore::jsTestObjDescription):
3118         (WebCore::jsTestObjId):
3119         (WebCore::jsTestObjHash):
3120         (WebCore::jsTestObjReplaceableAttribute):
3121         (WebCore::jsTestObjNullableDoubleAttribute):
3122         (WebCore::jsTestObjNullableLongAttribute):
3123         (WebCore::jsTestObjNullableBooleanAttribute):
3124         (WebCore::jsTestObjNullableStringAttribute):
3125         (WebCore::jsTestObjNullableLongSettableAttribute):
3126         (WebCore::jsTestObjNullableStringSettableAttribute):
3127         (WebCore::jsTestObjNullableUSVStringSettableAttribute):
3128         (WebCore::jsTestObjNullableByteStringSettableAttribute):
3129         (WebCore::jsTestObjNullableStringValue):
3130         (WebCore::jsTestObjAttribute):
3131         (WebCore::jsTestObjAttributeWithReservedEnumType):
3132         (WebCore::jsTestObjPutForwardsAttribute):
3133         (WebCore::jsTestObjPutForwardsNullableAttribute):
3134         (WebCore::jsTestObjStringifierAttribute):
3135         (WebCore::jsTestObjConditionallyReadWriteAttribute):
3136         (WebCore::jsTestObjConditionalAndConditionallyReadWriteAttribute):
3137         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3138         (WebCore::JSTestOverloadedConstructorsPrototype::finishCreation):
3139         * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
3140         (WebCore::JSTestOverloadedConstructorsWithSequencePrototype::finishCreation):
3141         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
3142         (WebCore::JSTestOverrideBuiltinsPrototype::finishCreation):
3143         * bindings/scripts/test/JS/JSTestPluginInterface.cpp:
3144         (WebCore::JSTestPluginInterfacePrototype::finishCreation):
3145         * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
3146         (WebCore::JSTestPromiseRejectionEventPrototype::finishCreation):
3147         (WebCore::jsTestPromiseRejectionEventReason):
3148         * bindings/scripts/test/JS/JSTestSerialization.cpp:
3149         (WebCore::JSTestSerializationPrototype::finishCreation):
3150         (WebCore::jsTestSerializationFirstStringAttribute):
3151         (WebCore::jsTestSerializationSecondLongAttribute):
3152         (WebCore::jsTestSerializationThirdUnserializableAttribute):
3153         (WebCore::jsTestSerializationFourthUnrestrictedDoubleAttribute):
3154         (WebCore::jsTestSerializationFifthLongAttribute):
3155         (WebCore::jsTestSerializationSixthTypedefAttribute):
3156         (WebCore::jsTestSerializationSeventhDirectlySerializableAttribute):
3157         (WebCore::jsTestSerializationEighthIndirectlyAttribute):
3158         * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp:
3159         (WebCore::JSTestSerializationIndirectInheritancePrototype::finishCreation):
3160         * bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
3161         (WebCore::JSTestSerializationInheritPrototype::finishCreation):
3162         (WebCore::jsTestSerializationInheritInheritLongAttribute):
3163         * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
3164         (WebCore::JSTestSerializationInheritFinalPrototype::finishCreation):
3165         (WebCore::jsTestSerializationInheritFinalFinalLongAttributeFoo):
3166         (WebCore::jsTestSerializationInheritFinalFinalLongAttributeBar):
3167         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3168         (WebCore::JSTestSerializedScriptValueInterfacePrototype::finishCreation):
3169         (WebCore::jsTestSerializedScriptValueInterfaceValue):
3170         (WebCore::jsTestSerializedScriptValueInterfaceReadonlyValue):
3171         (WebCore::jsTestSerializedScriptValueInterfaceCachedValue):
3172         (WebCore::jsTestSerializedScriptValueInterfacePorts):
3173         (WebCore::jsTestSerializedScriptValueInterfaceCachedReadonlyValue):
3174         * bindings/scripts/test/JS/JSTestStringifier.cpp:
3175         (WebCore::JSTestStringifierPrototype::finishCreation):
3176         * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
3177         (WebCore::JSTestStringifierAnonymousOperationPrototype::finishCreation):
3178         * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
3179         (WebCore::JSTestStringifierNamedOperationPrototype::finishCreation):
3180         * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
3181         (WebCore::JSTestStringifierOperationImplementedAsPrototype::finishCreation):
3182         * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
3183         (WebCore::JSTestStringifierOperationNamedToStringPrototype::finishCreation):
3184         * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
3185         (WebCore::JSTestStringifierReadOnlyAttributePrototype::finishCreation):
3186         (WebCore::jsTestStringifierReadOnlyAttributeIdentifier):
3187         * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
3188         (WebCore::JSTestStringifierReadWriteAttributePrototype::finishCreation):
3189         (WebCore::jsTestStringifierReadWriteAttributeIdentifier):
3190         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3191         (WebCore::JSTestTypedefsConstructor::initializeProperties):
3192         (WebCore::JSTestTypedefsPrototype::finishCreation):
3193         (WebCore::jsTestTypedefsUnsignedLongLongAttr):
3194         (WebCore::jsTestTypedefsSerializedScriptValue):
3195         (WebCore::jsTestTypedefsAttributeWithClamp):
3196         (WebCore::jsTestTypedefsAttributeWithClampInTypedef):
3197         (WebCore::jsTestTypedefsAttrWithGetterException):
3198         (WebCore::jsTestTypedefsAttrWithSetterException):
3199         (WebCore::jsTestTypedefsStringAttrWithGetterException):
3200         (WebCore::jsTestTypedefsStringAttrWithSetterException):
3201         (WebCore::jsTestTypedefsBufferSourceAttr):
3202         (WebCore::jsTestTypedefsDomTimeStampAttr):
3203         They are binding test rebaselines.
3204
3205         * domjit/DOMJITIDLTypeFilter.h:
3206         * domjit/JSDocumentDOMJIT.cpp:
3207         (WebCore::compileDocumentDocumentElementAttribute):
3208         (WebCore::compileDocumentBodyAttribute):
3209         (WebCore::DocumentDocumentElementDOMJIT::callDOMGetter): Deleted.
3210         (WebCore::DocumentBodyDOMJIT::callDOMGetter): Deleted.
3211         * domjit/JSNodeDOMJIT.cpp:
3212         (WebCore::compileNodeFirstChildAttribute):
3213         (WebCore::compileNodeLastChildAttribute):
3214         (WebCore::compileNodeNextSiblingAttribute):
3215         (WebCore::compileNodePreviousSiblingAttribute):
3216         (WebCore::compileNodeParentNodeAttribute):
3217         (WebCore::compileNodeNodeTypeAttribute):
3218         (WebCore::compileNodeOwnerDocumentAttribute):
3219         (WebCore::NodeFirstChildDOMJIT::callDOMGetter): Deleted.
3220         (WebCore::NodeLastChildDOMJIT::callDOMGetter): Deleted.
3221         (WebCore::NodeNextSiblingDOMJIT::callDOMGetter): Deleted.
3222         (WebCore::NodePreviousSiblingDOMJIT::callDOMGetter): Deleted.
3223         (WebCore::NodeParentNodeDOMJIT::callDOMGetter): Deleted.
3224         (WebCore::NodeNodeTypeDOMJIT::callDOMGetter): Deleted.
3225         (WebCore::NodeOwnerDocumentDOMJIT::callDOMGetter): Deleted.
3226         DOMJIT::GetterSetter becomes smaller constexpr data.
3227
3228 2017-07-27  Xabier Rodriguez Calvar  <calvaris@igalia.com>
3229
3230         [GStreamer][EME] Not having a key id buffer should not always error
3231         https://bugs.webkit.org/show_bug.cgi?id=174889
3232
3233         Reviewed by Žan Doberšek.
3234
3235         In r219946 we introduced a hard requirement for a key id buffer
3236         that does not happen for all CDMs.
3237
3238         * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
3239         (webKitMediaClearKeyDecryptorSetupCipher): Check for key id buffer
3240         and error if we didn't get it.
3241         * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
3242         (webkitMediaCommonEncryptionDecryptTransformInPlace): Soften the
3243         requirement for key id buffer.
3244
3245 2017-07-27  Xabier Rodriguez Calvar  <calvaris@igalia.com>
3246
3247         [GStreamer][EME] Fix phony debug output in player base for supported key system
3248         https://bugs.webkit.org/show_bug.cgi?id=174888
3249
3250         Reviewed by Žan Doberšek.
3251
3252         The debug output was returning always false because that method
3253         was not checking anything before. Now it is and should reflect it.
3254
3255         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3256         (WebCore::MediaPlayerPrivateGStreamerBase::supportsKeySystem):
3257
3258 2017-07-27  Zan Dobersek  <zdobersek@igalia.com>
3259
3260         [EME][GStreamer] Add barebones CDM interface implementations for ClearKey
3261         https://bugs.webkit.org/show_bug.cgi?id=174887
3262
3263         Reviewed by Xabier Rodriguez-Calvar.
3264
3265         Add empty ClearKey derivations of CDMFactory, CDMPrivate and CDMInstance
3266         classes. These will be enhanced as the implementation progresses.
3267
3268         ClearKey is added to CDMInstance::ImplementationType, and the
3269         CDMInstanceClearKey::implementationType() override returns that value.
3270         Type traits specialization for the CDMInstanceClearKey class is also
3271         added, utilizing the CDMInstance::ImplementationType::ClearKey value.
3272
3273         The implementation file is added to the WPE build, along with the
3274         necessary inclusion directory.
3275
3276         * PlatformWPE.cmake:
3277         * platform/encryptedmedia/CDMInstance.h:
3278         * platform/encryptedmedia/clearkey/CDMClearKey.cpp: Added.
3279         (WebCore::CDMFactoryClearKey::createCDM):
3280         (WebCore::CDMFactoryClearKey::supportsKeySystem):
3281         (WebCore::CDMPrivateClearKey::supportsInitDataType):
3282         (WebCore::CDMPrivateClearKey::supportsConfiguration):
3283         (WebCore::CDMPrivateClearKey::supportsConfigurationWithRestrictions):
3284         (WebCore::CDMPrivateClearKey::supportsSessionTypeWithConfiguration):
3285         (WebCore::CDMPrivateClearKey::supportsRobustness):
3286         (WebCore::CDMPrivateClearKey::distinctiveIdentifiersRequirement):
3287         (WebCore::CDMPrivateClearKey::persistentStateRequirement):
3288         (WebCore::CDMPrivateClearKey::distinctiveIdentifiersAreUniquePerOriginAndClearable):
3289         (WebCore::CDMPrivateClearKey::createInstance):
3290         (WebCore::CDMPrivateClearKey::loadAndInitialize):
3291         (WebCore::CDMPrivateClearKey::supportsServerCertificates):
3292         (WebCore::CDMPrivateClearKey::supportsSessions):
3293         (WebCore::CDMPrivateClearKey::supportsInitData):
3294         (WebCore::CDMPrivateClearKey::sanitizeResponse):
3295         (WebCore::CDMPrivateClearKey::sanitizeSessionId):
3296         (WebCore::CDMInstanceClearKey::initializeWithConfiguration):
3297         (WebCore::CDMInstanceClearKey::setDistinctiveIdentifiersAllowed):
3298         (WebCore::CDMInstanceClearKey::setPersistentStateAllowed):
3299         (WebCore::CDMInstanceClearKey::setServerCertificate):
3300         (WebCore::CDMInstanceClearKey::requestLicense):
3301         (WebCore::CDMInstanceClearKey::updateLicense):
3302         (WebCore::CDMInstanceClearKey::loadSession):
3303         (WebCore::CDMInstanceClearKey::closeSession):
3304         (WebCore::CDMInstanceClearKey::removeSessionData):
3305         (WebCore::CDMInstanceClearKey::storeRecordOfKeyUsage):
3306         * platform/encryptedmedia/clearkey/CDMClearKey.h: Added.
3307
3308 2017-07-27  Zan Dobersek  <zdobersek@igalia.com>
3309
3310         [EME] Allow CDMInstance type traits specialization
3311         https://bugs.webkit.org/show_bug.cgi?id=174886
3312
3313         Reviewed by Xabier Rodriguez-Calvar.
3314
3315         Allow using the trait-based type casting for the CDMInstance class and its
3316         derivatives. ImplementationType enumeration values are to be used and
3317         returned from the new implementationType() virtual method. This method is
3318         leveraged in the type trait specialization that enables using is<>() and
3319         downcast<>() helpers for CDMInstance objects.
3320
3321         This will allow differentiating between CDMInstance implementations once
3322         the media playback pipeline has to retrieve any key information that's
3323         necessary for playback of encrypted content.
3324
3325         MockCDMInstance class overrides the implementationType() method, returning
3326         the ImplementationType::Mock value. Type trait specializations for this
3327         class aren't added since they're not needed anywhere at this point.
3328
3329         * platform/encryptedmedia/CDMInstance.h:
3330         * testing/MockCDMFactory.h:
3331
3332 2017-07-27  Zan Dobersek  <zdobersek@igalia.com>
3333
3334         [GCrypt] Key serialization support
3335         https://bugs.webkit.org/show_bug.cgi?id=173883
3336
3337         Reviewed by Jiewen Tan.
3338
3339         Implement crypto key serialization for platforms that use libgcrypt.
3340
3341         Despite the function names and the existing implementation for the Mac port,
3342         we don't perform the KEK wrapping and unwrapping due to the review feedback
3343         advising against it.
3344
3345         Instead the passed-in key data is simply copied and returned as the result of
3346         the 'wrapping' operation, and similarly the passed-in serialized data is simply
3347         copied and returned as the result of the 'unwrapping' operation.
3348
3349         No new tests -- related tests are now passing and are unskipped.
3350
3351         * crypto/gcrypt/SerializedCryptoKeyWrapGCrypt.cpp:
3352         (WebCore::getDefaultWebCryptoMasterKey):
3353         (WebCore::wrapSerializedCryptoKey):
3354         (WebCore::unwrapSerializedCryptoKey):
3355
3356 2017-07-26  Arnaud Renevier  <a.renevier@sisa.samsung.com> and Fujii Hironori  <Hironori.Fujii@sony.com>
3357
3358         Implement new TextMetrics, returned by canvas measureText()
3359         https://bugs.webkit.org/show_bug.cgi?id=82798
3360         <rdar://problem/11159332>
3361
3362         Reviewed by Dean Jackson.
3363
3364         The specification: https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-measuretext
3365
3366         Add new attributes to TextMetrics.
3367
3368         Add a new method textOffset() of CanvasRenderingContext2D by
3369         extracting from drawTextInternal() to use the same horizontal and
3370         vertical offsets of a text in both drawTextInternal() and
3371         measureText().
3372
3373         Test: fast/canvas/canvas-measureText-2.html
3374
3375         * html/TextMetrics.h:
3376         (WebCore::TextMetrics::actualBoundingBoxLeft):
3377         (WebCore::TextMetrics::setActualBoundingBoxLeft):
3378         (WebCore::TextMetrics::actualBoundingBoxRight):
3379         (WebCore::TextMetrics::setActualBoundingBoxRight):
3380         (WebCore::TextMetrics::fontBoundingBoxAscent):
3381         (WebCore::TextMetrics::setFontBoundingBoxAscent):
3382         (WebCore::TextMetrics::fontBoundingBoxDescent):
3383         (WebCore::TextMetrics::setFontBoundingBoxDescent):
3384         (WebCore::TextMetrics::actualBoundingBoxAscent):
3385         (WebCore::TextMetrics::setActualBoundingBoxAscent):
3386         (WebCore::TextMetrics::actualBoundingBoxDescent):
3387         (WebCore::TextMetrics::setActualBoundingBoxDescent):
3388         (WebCore::TextMetrics::emHeightAscent):
3389         (WebCore::TextMetrics::setEmHeightAscent):
3390         (WebCore::TextMetrics::emHeightDescent):
3391         (WebCore::TextMetrics::setEmHeightDescent):
3392         (WebCore::TextMetrics::hangingBaseline):
3393         (WebCore::TextMetrics::setHangingBaseline):
3394         (WebCore::TextMetrics::alphabeticBaseline):