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