Break pluginReplacementEnabled into youTubeFlashPluginReplacementEnabled and quickTim...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2016-08-31  Ricky Mondello  <rmondello@apple.com>
2
3         Break pluginReplacementEnabled into youTubeFlashPluginReplacementEnabled and quickTimePluginReplacementEnabled
4         https://bugs.webkit.org/show_bug.cgi?id=161424
5         <rdar://problem/28050847>
6
7         Reviewed by Dean Jackson.
8
9         Replace the single pluginReplacementEnabled setting with individual settings for the YouTube Flash plug-in
10         behavior and the QuickTime plug-in behavior. Unless otherwise noted, this change copies the existing plumbing
11         for pluginReplacementEnabled and renames it twice. The default values for these settings remain the same.
12
13         * Modules/plugins/PluginReplacement.h:
14         (WebCore::ReplacementPlugin::ReplacementPlugin): Augment the constructor.
15         (WebCore::ReplacementPlugin::isEnabledBySettings): Added.
16         * Modules/plugins/QuickTimePluginReplacement.h: Declare a static member function.
17         * Modules/plugins/QuickTimePluginReplacement.mm:
18         (WebCore::QuickTimePluginReplacement::registerPluginReplacement): Properly create a ReplacementPlugin instance.
19         (WebCore::QuickTimePluginReplacement::isEnabledBySettings): Added.
20         * Modules/plugins/YouTubePluginReplacement.cpp:
21         (WebCore::YouTubePluginReplacement::registerPluginReplacement): Properly create a ReplacementPlugin instance.
22         (WebCore::YouTubePluginReplacement::isEnabledBySettings): Added.
23         * Modules/plugins/YouTubePluginReplacement.h: Declare a static member function.
24         * html/HTMLPlugInElement.cpp:
25         (WebCore::HTMLPlugInElement::requestObject): Ask the ReplacementPlugin whether it's enabled, rather than assume
26             all plug-in replacement is guarded by a single run-time setting.
27         * page/Settings.cpp: Declare values for defaults for both settings.
28         * page/Settings.in: Declare two settings.
29         * testing/InternalSettings.cpp:
30         (WebCore::InternalSettings::Backup::Backup): Handle both settings.
31         (WebCore::InternalSettings::Backup::restoreTo): Ditto.
32         (WebCore::InternalSettings::setQuickTimePluginReplacementEnabled): Added.
33         (WebCore::InternalSettings::setYouTubeFlashPluginReplacementEnabled): Added.
34         (WebCore::InternalSettings::setPluginReplacementEnabled): Deleted.
35         * testing/InternalSettings.h: Duplicate and rename.
36         * testing/InternalSettings.idl: Ditto.
37
38 2016-08-31  Yoav Weiss  <yoav@yoav.ws>
39
40         Add event support for link preload.
41         https://bugs.webkit.org/show_bug.cgi?id=158466
42
43         Reviewed by Alex Christensen.
44
45         Add onload/onerror support for link rel preload to align it with the spec
46         and enable various resource loading use-cases.
47         This patch also fixes XHR matching issues by replacing LinkPreload with RawResource.
48
49         Tests: http/tests/misc/script_onload_delays_window_onload.html
50                http/tests/preload/delaying_onload_link_preload_after_discovery.html
51                http/tests/preload/delaying_onload_link_preload_after_discovery_image.html
52                http/tests/preload/not_delaying_window_onload_before_discovery.html
53                http/tests/preload/onerror_event.html
54                http/tests/preload/onload_event.html
55
56         * CMakeLists.txt: Add LinkPreloadResourceClients.{h,cpp}
57         * WebCore.xcodeproj/project.pbxproj: Add LinkPreloadResourceClients.{h,cpp}.
58         * html/HTMlLinkElement.cpp:
59         (WebCore::linkErrorEventSender): Add an eventSender for the error event.
60         (WebCore::HTMLLinkElement::HTMLLinkElement): s/m_loadedSheet/m_loadedResource/
61         (WebCore::HTMLLinkElement::~HTMLLinkElement): Cancel the error event when the element gets destructed.
62         (WebCore::HTMLLinkElement::linkLoaded): dispatch the event in an async manner.
63         (WebCore::HTMLLinkElement::linkLoadingErrored): dispatch the event in an async manner.
64         (WebCore::HTMLLinkElement::dispatchPendingEvent): Call dispatchEvent directly.
65         (WebCore::HTMLLinkElement::notifyLoadedSheetAndAllCriticalSubresources): s/m_loadedSheet/m_loadedResource/
66         * html/HTMLLinkElement.h: s/m_loadedSheet/m_loadedResource/
67         * html/parser/HTMLResourcePreloader.cpp:
68         (WebCore::HTMLResourcePreloader::preload): Call preload as ImplicitPreload, to distinguish it from declarative preload.
69         * loader/LinkLoader.cpp:
70         (WebCore::LinkLoader::LinkLoader): Get rid of unnecessary event timers and add a weakPtrFactory.
71         (WebCore::LinkLoader::triggerEvents): Add a triggerEvents function that can be called from notifyFinished as well as the
72         LinkPreloadResourceClients.
73         (WebCore::LinkLoader::notifyFinished): Call the triggerEvents function.
74         (WebCore::LinkLoader::resourceTypeFromAsAttribute): Replace LinkPreload with RawResource to avoid XHR resource matching issues.
75         (WebCore::createLinkPreloadResourceClient): Create a resource client for link preload.
76         (WebCore::LinkLoader::preloadIfNeeded): Trigger an error when `as` is unknown. Make sure that preload resources don't delay window.onload
77         before discovery. Get the resource back from calling preload and create a client for that resource.
78         (WebCore::LinkLoader::linkLoadTimerFired): Deleted.
79         (WebCore::LinkLoader::linkLoadingErrorTimerFired): Deleted.
80         (WebCore::preloadIfNeeded): Deleted.
81         * loader/LinkLoader.h:
82         (WebCore::LinkLoader::createWeakPtr):
83         * loader/LinkPreloadResourceClients.cpp: Added.
84         (WebCore::LinkPreloadResourceClient::LinkPreloadResourceClient): Create a LinkPreloadResourceClient and assign with with a weakPtr of
85         LinkLoader.
86         (WebCore::LinkPreloadResourceClient::triggerEvents): Call LinkLoader's triggerEvents.
87         * loader/LinkPreloadResourceClients.h: Added.
88         (WebCore::LinkPreloadResourceClient::~LinkPreloadResourceClient):
89         (WebCore::LinkPreloadResourceClient::addResource): Add as resource's client.
90         (WebCore::LinkPreloadResourceClient::clearResource): Remove as resource's client and clear ref to resource.
91         (WebCore::LinkPreloadResourceClient::ownedResource): Return ref to resource.
92         * loader/ResourceLoadInfo.cpp:
93         (WebCore::toResourceType): Removed LinkPreload.
94         * loader/SubresourceLoader.cpp:
95         (WebCore::logResourceLoaded): Removed LinkPreload.
96         * loader/cache/CachedResource.cpp:
97         (WebCore::CachedResource::defaultPriorityForResourceType): Removed LinkPreload.
98         * loader/cache/CachedResource.h: Removed LinkPreload.
99         (WebCore::CachedResource::ignoreForRequestCount): Don't delay window.onload for requests that opted out of that.
100         * loader/cache/CachedResourceLoader.cpp:
101         (WebCore::CachedResourceLoader::checkInsecureContent): Removed LinkPreload.
102         (WebCore::CachedResourceLoader::requestResource): Make sure that discovered preload resources do block window.onload.
103         (WebCore::CachedResourceLoader::preload): Make sure that explicitly preloaded subresources can be fetched even if there are parser
104         blocking resources still in flight. Return the preloaded resource.
105         (WebCore::CachedResourceLoader::requestPreload): Make sure that preloaded fonts get requested. Return preloaded resource.
106         (WebCore::createResource): Removed LinkPreload.
107         (WebCore::contentTypeFromResourceType): Removed LinkPreload.
108         (WebCore::CachedResourceLoader::canRequest): Removed LinkPreload.
109         * loader/cache/CachedResourceLoader.h:
110         * platform/network/ResourceRequestBase.h:
111         (WebCore::ResourceRequestBase::ignoreForRequestCount): Get the flag saying if a resource should block window.onload.
112         (WebCore::ResourceRequestBase::setIgnoreForRequestCount): Set the flag saying if a resource should block window.onload.
113
114 2016-08-31  Joseph Pecoraro  <pecoraro@apple.com>
115
116         Web Inspector: XHR with text but responseType = "blob" shows blank content
117         https://bugs.webkit.org/show_bug.cgi?id=161422
118         <rdar://problem/28066869>
119
120         Reviewed by Brian Burg.
121
122         Test: inspector/network/xhr-json-blob-has-content.html
123
124         When an XMLHttpRequest finished loading it was always setting the Inspector's
125         content for that load at the end. However, if the XHR was loading binary data
126         then it was passing an empty string to the inspector and overwriting the
127         data the inspector already had for the resource. Avoid this overwriting.
128
129         * xml/XMLHttpRequest.cpp:
130         (WebCore::XMLHttpRequest::didFinishLoading):
131         When loading binary content we have no decoded text to send to the inspector.
132
133         * inspector/InspectorInstrumentation.cpp:
134         (WebCore::InspectorInstrumentation::didFinishXHRLoadingImpl):
135         * inspector/InspectorInstrumentation.h:
136         (WebCore::InspectorInstrumentation::didFinishXHRLoading):
137         Switch to an Optional string, and if it is not available don't
138         call through to the NetworkAgent expecting decoded text.
139
140         * inspector/InspectorNetworkAgent.cpp:
141         (WebCore::InspectorNetworkAgent::didFinishXHRLoading):
142         * inspector/InspectorNetworkAgent.h:
143         Improve variable name.
144
145 2016-08-31  Alex Christensen  <achristensen@webkit.org>
146
147         Add runtime flag for using URLParser
148         https://bugs.webkit.org/show_bug.cgi?id=161363
149
150         Reviewed by Sam Weinig.
151
152         No new tests.  No change in default behavior.
153
154         * PlatformMac.cmake:
155         * platform/URL.cpp:
156         (WebCore::URL::URL):
157         (WebCore::URL::init):
158         (WebCore::URL::setProtocol):
159         (WebCore::URL::setHost):
160         (WebCore::URL::removePort):
161         (WebCore::URL::setPort):
162         (WebCore::URL::setHostAndPort):
163         (WebCore::URL::setUser):
164         (WebCore::URL::setPass):
165         (WebCore::URL::setFragmentIdentifier):
166         (WebCore::URL::removeFragmentIdentifier):
167         (WebCore::URL::setQuery):
168         (WebCore::URL::setPath):
169         (WebCore::URL::parse):
170         * platform/URLParser.cpp:
171         (WebCore::URLParser::parse):
172         (WebCore::URLParser::setEnabled):
173         (WebCore::URLParser::enabled):
174         * platform/URLParser.h:
175         * platform/cf/URLCF.cpp:
176         (WebCore::URL::URL):
177         * platform/cocoa/URLParserCocoa.mm: Added.
178         (WebCore::URLParser::URLParserEnabled):
179         * platform/mac/URLMac.mm:
180         (WebCore::URL::URL):
181
182 2016-08-31  Youenn Fablet  <youenn@apple.com>
183
184         [Fetch API] Fetch API should be able to load data URL in Same Origin mode
185         https://bugs.webkit.org/show_bug.cgi?id=161434
186
187         Reviewed by Sam Weinig.
188
189         Tests: imported/w3c/web-platform-tests/fetch/api/redirect/redirect-to-dataurl-worker.html
190                imported/w3c/web-platform-tests/fetch/api/redirect/redirect-to-dataurl.html
191         Covered also by added sub-test.
192
193         Moving SameDataURLOrigin option from ThreadableLoaderOptions to ResourceLoaderOptions.
194         This allows doing some of the checks in CachedResourceLoader/CachedResource.
195         This also allows setting this options in CachedResourceLoader clients, ImageLoader in that case.
196
197         * Modules/fetch/FetchLoader.cpp:
198         (WebCore::FetchLoader::start): Setting sameOriginDataURL as ResourceLoader option.
199         * loader/ImageLoader.cpp:
200         (WebCore::ImageLoader::updateFromElement): Setting sameOriginDataURL as specificied in
201         https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element.
202         * loader/ResourceLoaderOptions.h: Adding sameOriginDataURL as ResourceLoader option.
203         * loader/ThreadableLoader.cpp:
204         (WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions): Removing sameOriginDataURL option.
205         * loader/ThreadableLoader.h:
206         * loader/WorkerThreadableLoader.cpp: Setting sameOriginDataURL as ResourceLoader option.
207         (WebCore::LoaderTaskOptions::LoaderTaskOptions):
208         * loader/cache/CachedResource.cpp:
209         (WebCore::CachedResource::load): If resource URL is a data url, we previously marked the resource as same origin.
210         We only do that now if the sameOriginDataURL flag is set as per fetch specification.
211         See https://fetch.spec.whatwg.org/#main-fetch.
212         * loader/cache/CachedResourceLoader.cpp:
213         (WebCore::isSameOriginDataURL): Helper function.
214         (WebCore::CachedResourceLoader::canRequest): Allowing same origin loads of data URLs if flag is set and no redirection happens.
215         See https://fetch.spec.whatwg.org/#http-redirect-fetch for why we check redirection.
216
217 2016-08-31  Ryosuke Niwa  <rniwa@webkit.org>
218
219         HTML constructor must throw when newTarget is itself
220         https://bugs.webkit.org/show_bug.cgi?id=161430
221
222         Reviewed by Antti Koivisto.
223
224         Per https://github.com/w3c/webcomponents/issues/541, we must throw a TypeError when the HTMLElement constructor
225         is called with new.target set to itself (i.e. new HTMLElement after registering it with a custom element).
226
227         Note that we can't check this at the time of customElements.define because it could be a Proxy object.
228
229         Also see: https://html.spec.whatwg.org/#html-element-constructors
230
231         Tests: fast/custom-elements/CustomElementRegistry.html
232                fast/custom-elements/HTMLElement-constructor.html
233
234         * bindings/js/JSHTMLElementCustom.cpp:
235         (WebCore::constructJSHTMLElement): Throw a TypeError when NewTarget is HTMLElement constructor itself.
236
237 2016-08-31  Ryosuke Niwa  <rniwa@webkit.org>
238
239         Rebaseline binding tests after r205257.
240
241         * bindings/scripts/test/JS/JSTestObj.cpp:
242         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionPromise):
243         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise):
244         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionPromise):
245         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentPromise):
246         (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1Promise):
247         (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Promise):
248         (WebCore::jsTestObjConstructorFunctionTestStaticPromiseFunctionPromise):
249         (WebCore::jsTestObjConstructorFunctionTestStaticPromiseFunctionWithExceptionPromise):
250
251 2016-08-31  Ryosuke Niwa  <rniwa@webkit.org>
252
253         Add the check for reentrancy to CustomElementRegistry
254         https://bugs.webkit.org/show_bug.cgi?id=161423
255
256         Reviewed by Antti Koivisto.
257
258         Added the "element definition is running" flag to JSCustomElementRegistry:
259         https://html.spec.whatwg.org/multipage/scripting.html#element-definition-is-running
260
261         And added an exception for when this flag is set during JSCustomElementRegistry::define:
262         https://html.spec.whatwg.org/multipage/scripting.html#dom-customelementregistry-define
263
264         Tests: fast/custom-elements/CustomElementRegistry.html
265
266         * bindings/js/JSCustomElementRegistryCustom.cpp:
267         (WebCore::JSCustomElementRegistry::define): Throw NotSupportedError when m_elementDefinitionIsRunning is true.
268         * dom/CustomElementRegistry.h:
269         (WebCore::CustomElementRegistry::elementDefinitionIsRunning): Added.
270
271 2016-08-30  Ryosuke Niwa  <rniwa@webkit.org>
272
273         Avoid using strong reference in JSDOMPromiseā€™s DeferredWrapper
274         https://bugs.webkit.org/show_bug.cgi?id=161426
275         <rdar://problem/28091123>
276
277         Reviewed by Geoffrey Garen.
278
279         Replace JSC::Strong in DeferredWrapper by JSC::Weak, and make the global object own JSPromiseDeferred.
280
281         DeferredWrapper adds itself to JSDOMGlobalObject's newly added HashSet when it's created and clears itself
282         from the HashSet inside its destructor as well as when the promise is resolved or rejected.
283         This is so that JSDOMGlobalObject's visitChildren can visit every live DeferredWrapper.
284
285         Because this operation is rather expense, this patch turns DeferredWrapper into a RefCounted object to avoid
286         HashMap churns. Most of code changes in this patch is due to this type change, and the fact lambda cannot
287         capture Ref<DeferredWrapper> since its copy constructor doesn't exist.
288
289         We also create a write barrier from the global object to JSPromiseDeferred so that they won't be collected
290         during an eden collection when it happens before JSDOMGlobalObject's visitChildren is invoked.
291
292         Note that it's possible for the entire DOM wrapper world of the promise to go away before the promise is
293         resolved or rejected by a ref-counted C++ object. In this case, m_deferred and m_globalObject become dead.
294         Various member resolve* and reject functions of DeferredWrapper have been modified to check this condition.
295
296         Because JSDOMGlobalObject can be finalized before DeferredWrapper is finalized. DeferredWrapper's destructor,
297         which calls DeferredWrapper::clear, should only remove itself from m_globalObject when m_globalObject is alive.
298
299         Finally, this patch makes DeferredWrapper inherit from ActiveDOMCallback so that it won't try to execute scripts
300         when the active DOM objects have been suspended; e.g. after a page navigation.
301
302         No new tests since there should be no author/user visible behavioral change.
303
304         * Modules/applepay/ApplePaySession.cpp:
305         (WebCore::ApplePaySession::canMakePaymentsWithActiveCard):
306         * Modules/applepay/ApplePaySession.h:
307         * Modules/fetch/DOMWindowFetch.cpp:
308         (WebCore::DOMWindowFetch::fetch):
309         * Modules/fetch/DOMWindowFetch.h:
310         * Modules/fetch/FetchBody.cpp:
311         (WebCore::FetchBody::arrayBuffer):
312         (WebCore::FetchBody::blob):
313         (WebCore::FetchBody::json):
314         (WebCore::FetchBody::text):
315         (WebCore::FetchBody::consume):
316         (WebCore::FetchBody::consumeArrayBuffer):
317         (WebCore::FetchBody::consumeArrayBufferView):
318         (WebCore::FetchBody::consumeText):
319         (WebCore::FetchBody::consumeBlob):
320         (WebCore::FetchBody::loadingFailed):
321         (WebCore::FetchBody::loadingSucceeded):
322         * Modules/fetch/FetchBody.h:
323         (WebCore::FetchBody::formData):
324         (WebCore::FetchBody::cleanConsumePromise):
325         (WebCore::FetchBody): Use RefPtr<DeferredWrapper> instead of Optional<DeferredWrapper> now that DeferredWrapper
326         is ref counted. Perhaps we could use Optional<Ref<DeferredWrapper>> here but that seemed rather verbose.
327         * Modules/fetch/FetchBodyConsumer.cpp:
328         (WebCore::FetchBodyConsumer::resolveWithData):
329         (WebCore::FetchBodyConsumer::resolve):
330         * Modules/fetch/FetchBodyConsumer.h:
331         * Modules/fetch/FetchBodyOwner.cpp:
332         (WebCore::FetchBodyOwner::arrayBuffer):
333         (WebCore::FetchBodyOwner::blob):
334         (WebCore::FetchBodyOwner::formData):
335         (WebCore::FetchBodyOwner::json):
336         (WebCore::FetchBodyOwner::text):
337         * Modules/fetch/FetchBodyOwner.h:
338         * Modules/fetch/FetchResponse.cpp:
339         (WebCore::FetchResponse::consume):
340         (WebCore::FetchResponse::finishConsumingStream):
341         * Modules/fetch/FetchResponse.h:
342         * Modules/fetch/WorkerGlobalScopeFetch.cpp:
343         (WebCore::WorkerGlobalScopeFetch::fetch):
344         * Modules/fetch/WorkerGlobalScopeFetch.h:
345         * Modules/mediastream/UserMediaPermissionCheck.h:
346         * WebCore.xcodeproj/project.pbxproj:
347         * bindings/js/JSDOMGlobalObject.cpp:
348         (WebCore::JSDOMGlobalObject::~JSDOMGlobalObject): Added.
349         (WebCore::JSDOMGlobalObject::visitChildren): Added visits to each JSPromiseDeferred owned by this global object.
350         * bindings/js/JSDOMGlobalObject.h:
351         (WebCore::JSDOMGlobalObject::deferredWrappers): Added. This map is only used by JSDOMGlobalObject's visitChildren.
352         * bindings/js/JSDOMPromise.cpp:
353         (WebCore::DeferredWrapper::DeferredWrapper):
354         (WebCore::DeferredWrapper::~DeferredWrapper): Calls clear. When the global object has already been finalized,
355         m_globalObject is dead. In that case, there is no need to remove itself from the global object. When m_deferred
356         has been cleared, either clear() has already been called (1) or the callback is dead (2). Since (2) happens only
357         when the global object itself is dead (as its visitChildren would have visited m_deferred otherwise), again, there
358         is no need to remove itself from global object.
359         (WebCore::DeferredWrapper::clear): Added. Clears m_deferred and removes itself from JSDOMGlobalObject.
360         (WebCore::DeferredWrapper::contextDestroyed): ScriptExecutionContext has been destroyed. We must call clear().
361         (WebCore::DeferredWrapper::callFunction): Check canInvokeCallback in ActiveDOMCallback.
362         (WebCore::DeferredWrapper::reject): Exit early when isSuspended() is true. See below.
363         (WebCore::rejectPromiseWithExceptionIfAny):
364         (WebCore::fulfillPromiseWithJSON):
365         (WebCore::fulfillPromiseWithArrayBuffer):
366         * bindings/js/JSDOMPromise.h:
367         (WebCore::DeferredWrapper::create): Added.
368         (WebCore::DeferredWrapper::isSuspended): Added. Returns true iff the DOM wrapper world has gone away or active DOM
369         objects have been suspended.
370         (WebCore::DeferredWrapper::globalObject): Made this inline.
371         (WebCore::DeferredWrapper::visitAggregate): Added. Called by JSDOMGlobalObject::visitChildren.
372         (WebCore::DOMPromise::resolve):
373         (WebCore::DOMPromise::reject):
374         (WebCore::DeferredWrapper::resolveWithValue): Exit early when isSuspended() is true.
375         (WebCore::DeferredWrapper::resolveWithNewlyCreated): Ditto.
376         (WebCore::DeferredWrapper::rejectWithValue): Ditto.
377         (WebCore::DeferredWrapper::resolve): Ditto.
378         (WebCore::DeferredWrapper::reject): Ditto.
379         * bindings/js/JSFontFaceCustom.cpp:
380         (WebCore::JSFontFace::loaded):
381         * bindings/js/JSFontFaceSetCustom.cpp:
382         (WebCore::JSFontFaceSet::ready):
383         * bindings/js/JSMediaDevicesCustom.cpp:
384         (WebCore::JSMediaDevices::getUserMedia):
385         * bindings/js/JSReadableStreamSourceCustom.cpp:
386         (WebCore::JSReadableStreamSource::start):
387         * bindings/js/JSWebKitSubtleCryptoCustom.cpp:
388         (WebCore::JSWebKitSubtleCrypto::encrypt):
389         (WebCore::JSWebKitSubtleCrypto::decrypt):
390         (WebCore::JSWebKitSubtleCrypto::sign):
391         (WebCore::JSWebKitSubtleCrypto::verify):
392         (WebCore::JSWebKitSubtleCrypto::digest):
393         (WebCore::JSWebKitSubtleCrypto::generateKey):
394         (WebCore::JSWebKitSubtleCrypto::importKey):
395         (WebCore::JSWebKitSubtleCrypto::exportKey):
396         (WebCore::JSWebKitSubtleCrypto::wrapKey):
397         (WebCore::JSWebKitSubtleCrypto::unwrapKey):
398         * bindings/scripts/CodeGeneratorJS.pm:
399         (GenerateReturnParameters):
400
401 2016-08-31  Youenn Fablet  <youenn@apple.com>
402
403         [Fetch API] Request construction failure should not set "bodyUsed"
404         https://bugs.webkit.org/show_bug.cgi?id=161432
405
406         Reviewed by Alex Christensen.
407
408         Covered by added sub-test coming from chromium fetch test suite.
409
410         * Modules/fetch/FetchRequest.cpp:
411         (WebCore::methodCanHaveBody):
412         (WebCore::FetchRequest::setBody): Check whether request can have a body before disturbing the passed request.
413         (WebCore::validateBodyAndMethod): Deleted.
414
415 2016-08-31  Youenn Fablet  <youenn@apple.com>
416
417         [Fetch API] Response bodyUsed should check for its body disturbed state
418         https://bugs.webkit.org/show_bug.cgi?id=161429
419
420         Reviewed by Alex Christensen.
421
422         Test: http/tests/fetch/bodyUsed-worker.html
423
424         Implementing bodyUsed as a JS Builtin.
425         This allows using directly @isReadableStreamDisturbed if response has a body.
426
427         Renaming isDisturbed to isDisturbedOrLocked to better match fetch spec terminology.
428
429         * Modules/fetch/FetchBodyOwner.cpp:
430         (WebCore::FetchBodyOwner::isDisturbedOrLocked): Renaming isDisturbed to isDisturbedOrLocked.
431         (WebCore::FetchBodyOwner::arrayBuffer): Ditto.
432         (WebCore::FetchBodyOwner::blob): Ditto.
433         (WebCore::FetchBodyOwner::formData): Ditto.
434         (WebCore::FetchBodyOwner::json): Ditto.
435         (WebCore::FetchBodyOwner::text): Ditto.
436         (WebCore::FetchBodyOwner::isDisturbed): Ditto.
437         * Modules/fetch/FetchBodyOwner.h:
438         (WebCore::FetchBodyOwner::isDisturbed): Ditto.
439         * Modules/fetch/FetchRequest.cpp:
440         (WebCore::FetchRequest::initializeWith): Ditto.
441         (WebCore::FetchRequest::clone): Ditto.
442         * Modules/fetch/FetchResponse.cpp:
443         (WebCore::FetchResponse::cloneForJS): Ditto.
444         (WebCore::FetchResponse::createReadableStreamSource): Only asserting for isDisturbed.
445         * Modules/fetch/FetchResponse.idl: Marking bodyUsed as JS builtin.
446         * Modules/fetch/FetchResponse.js: Adding bodyUsed.
447         (bodyUsed):
448         (clone):
449
450 2016-08-31  Youenn Fablet  <youenn@apple.com>
451
452         [Fetch API] Blob type should be correctly set in case of empty body
453         https://bugs.webkit.org/show_bug.cgi?id=161431
454
455         Reviewed by Alex Christensen.
456
457         Tests: http/tests/fetch/fetch-as-blob-worker.html
458                http/tests/fetch/fetch-as-blob.html
459
460         * Modules/fetch/FetchBodyConsumer.cpp:
461         (WebCore::FetchBodyConsumer::takeAsBlob): Set blob type with contentType even if blob has no data.
462         * Modules/fetch/FetchBodyOwner.cpp:
463         (WebCore::FetchBodyOwner::blob): Ditto for empty bodies.
464
465 2016-08-31  Andreas Kling  <akling@apple.com>
466
467         DOM event handling should pass Event around by reference.
468         <https://webkit.org/b/161398>
469
470         Reviewed by Chris Dumez.
471
472         Start with making Node::defaultEventHandler() take an Event& instead of an Event*,
473         and then spread out from there, propagating the referenceness.
474
475         * dom/Element.cpp:
476         (WebCore::Element::isKeyboardFocusable):
477         * dom/Element.h:
478         * dom/EventDispatcher.cpp:
479         (WebCore::callDefaultEventHandlersInTheBubblingOrder):
480         * dom/Node.cpp:
481         (WebCore::Node::dispatchDOMActivateEvent):
482         (WebCore::Node::defaultEventHandler):
483         * dom/Node.h:
484         * editing/Editor.cpp:
485         (WebCore::Editor::handleKeyboardEvent):
486         (WebCore::Editor::handleInputMethodKeydown):
487         (WebCore::Editor::handleTextEvent):
488         * editing/Editor.h:
489         * html/BaseCheckableInputType.cpp:
490         (WebCore::BaseCheckableInputType::handleKeydownEvent):
491         (WebCore::BaseCheckableInputType::handleKeypressEvent):
492         * html/BaseCheckableInputType.h:
493         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
494         (WebCore::BaseChooserOnlyDateAndTimeInputType::handleDOMActivateEvent):
495         (WebCore::BaseChooserOnlyDateAndTimeInputType::handleKeydownEvent):
496         (WebCore::BaseChooserOnlyDateAndTimeInputType::handleKeypressEvent):
497         (WebCore::BaseChooserOnlyDateAndTimeInputType::handleKeyupEvent):
498         * html/BaseChooserOnlyDateAndTimeInputType.h:
499         * html/BaseClickableWithKeyInputType.cpp:
500         (WebCore::BaseClickableWithKeyInputType::handleKeydownEvent):
501         (WebCore::BaseClickableWithKeyInputType::handleKeypressEvent):
502         (WebCore::BaseClickableWithKeyInputType::handleKeyupEvent):
503         * html/BaseClickableWithKeyInputType.h:
504         * html/BaseDateAndTimeInputType.cpp:
505         (WebCore::BaseDateAndTimeInputType::isKeyboardFocusable):
506         * html/BaseDateAndTimeInputType.h:
507         * html/CheckboxInputType.cpp:
508         (WebCore::CheckboxInputType::handleKeyupEvent):
509         * html/CheckboxInputType.h:
510         * html/ColorInputType.cpp:
511         (WebCore::ColorInputType::handleDOMActivateEvent):
512         * html/ColorInputType.h:
513         * html/FileInputType.cpp:
514         (WebCore::FileInputType::handleDOMActivateEvent):
515         * html/FileInputType.h:
516         * html/HTMLAnchorElement.cpp:
517         (WebCore::HTMLAnchorElement::isKeyboardFocusable):
518         (WebCore::HTMLAnchorElement::defaultEventHandler):
519         (WebCore::HTMLAnchorElement::handleClick):
520         (WebCore::HTMLAnchorElement::eventType):
521         (WebCore::isEnterKeyKeydownEvent):
522         * html/HTMLAnchorElement.h:
523         * html/HTMLAreaElement.cpp:
524         (WebCore::HTMLAreaElement::isKeyboardFocusable):
525         * html/HTMLAreaElement.h:
526         * html/HTMLButtonElement.cpp:
527         (WebCore::HTMLButtonElement::defaultEventHandler):
528         * html/HTMLButtonElement.h:
529         * html/HTMLFormControlElement.cpp:
530         (WebCore::HTMLFormControlElement::isKeyboardFocusable):
531         * html/HTMLFormControlElement.h:
532         * html/HTMLFormElement.cpp:
533         (WebCore::HTMLFormElement::submitImplicitly):
534         (WebCore::submitElementFromEvent):
535         (WebCore::HTMLFormElement::validateInteractively):
536         (WebCore::HTMLFormElement::prepareForSubmission):
537         * html/HTMLFormElement.h:
538         * html/HTMLFrameOwnerElement.cpp:
539         (WebCore::HTMLFrameOwnerElement::isKeyboardFocusable):
540         * html/HTMLFrameOwnerElement.h:
541         * html/HTMLFrameSetElement.cpp:
542         (WebCore::HTMLFrameSetElement::defaultEventHandler):
543         * html/HTMLFrameSetElement.h:
544         * html/HTMLIFrameElement.h:
545         * html/HTMLInputElement.cpp:
546         (WebCore::HTMLInputElement::isKeyboardFocusable):
547         (WebCore::HTMLInputElement::isTextFormControlKeyboardFocusable):
548         (WebCore::HTMLInputElement::willDispatchEvent):
549         (WebCore::HTMLInputElement::defaultEventHandler):
550         * html/HTMLInputElement.h:
551         * html/HTMLLabelElement.cpp:
552         (WebCore::HTMLLabelElement::defaultEventHandler):
553         * html/HTMLLabelElement.h:
554         * html/HTMLLinkElement.cpp:
555         (WebCore::HTMLLinkElement::defaultEventHandler):
556         * html/HTMLLinkElement.h:
557         * html/HTMLPlugInElement.cpp:
558         (WebCore::HTMLPlugInElement::defaultEventHandler):
559         (WebCore::HTMLPlugInElement::isKeyboardFocusable):
560         * html/HTMLPlugInElement.h:
561         * html/HTMLPlugInImageElement.cpp:
562         (WebCore::HTMLPlugInImageElement::defaultEventHandler):
563         * html/HTMLPlugInImageElement.h:
564         * html/HTMLSelectElement.cpp:
565         (WebCore::HTMLSelectElement::isKeyboardFocusable):
566         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
567         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
568         (WebCore::HTMLSelectElement::defaultEventHandler):
569         * html/HTMLSelectElement.h:
570         * html/HTMLSummaryElement.cpp:
571         (WebCore::HTMLSummaryElement::defaultEventHandler):
572         * html/HTMLSummaryElement.h:
573         * html/HTMLTextAreaElement.cpp:
574         (WebCore::HTMLTextAreaElement::isKeyboardFocusable):
575         (WebCore::HTMLTextAreaElement::defaultEventHandler):
576         (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
577         * html/HTMLTextAreaElement.h:
578         * html/HTMLTextFormControlElement.cpp:
579         (WebCore::HTMLTextFormControlElement::forwardEvent):
580         * html/HTMLTextFormControlElement.h:
581         * html/ImageInputType.cpp:
582         (WebCore::ImageInputType::handleDOMActivateEvent):
583         * html/ImageInputType.h:
584         * html/InputType.cpp:
585         (WebCore::InputType::handleClickEvent):
586         (WebCore::InputType::handleMouseDownEvent):
587         (WebCore::InputType::handleDOMActivateEvent):
588         (WebCore::InputType::handleKeydownEvent):
589         (WebCore::InputType::handleKeypressEvent):
590         (WebCore::InputType::handleKeyupEvent):
591         (WebCore::InputType::handleBeforeTextInsertedEvent):
592         (WebCore::InputType::handleTouchEvent):
593         (WebCore::InputType::forwardEvent):
594         (WebCore::InputType::shouldSubmitImplicitly):
595         (WebCore::InputType::dispatchSimulatedClickIfActive):
596         (WebCore::InputType::isKeyboardFocusable):
597         * html/InputType.h:
598         * html/MediaDocument.cpp:
599         (WebCore::MediaDocument::defaultEventHandler):
600         * html/MediaDocument.h:
601         * html/NumberInputType.cpp:
602         (WebCore::NumberInputType::handleKeydownEvent):
603         * html/NumberInputType.h:
604         * html/RadioInputType.cpp:
605         (WebCore::RadioInputType::handleClickEvent):
606         (WebCore::RadioInputType::handleKeydownEvent):
607         (WebCore::RadioInputType::handleKeyupEvent):
608         (WebCore::RadioInputType::isKeyboardFocusable):
609         * html/RadioInputType.h:
610         * html/RangeInputType.cpp:
611         (WebCore::RangeInputType::handleMouseDownEvent):
612         (WebCore::RangeInputType::handleTouchEvent):
613         (WebCore::RangeInputType::handleKeydownEvent):
614         * html/RangeInputType.h:
615         * html/ResetInputType.cpp:
616         (WebCore::ResetInputType::handleDOMActivateEvent):
617         * html/ResetInputType.h:
618         * html/SearchInputType.cpp:
619         (WebCore::SearchInputType::handleKeydownEvent):
620         * html/SearchInputType.h:
621         * html/SubmitInputType.cpp:
622         (WebCore::SubmitInputType::handleDOMActivateEvent):
623         * html/SubmitInputType.h:
624         * html/TextFieldInputType.cpp:
625         (WebCore::TextFieldInputType::isKeyboardFocusable):
626         (WebCore::TextFieldInputType::handleKeydownEvent):
627         (WebCore::TextFieldInputType::handleKeydownEventForSpinButton):
628         (WebCore::TextFieldInputType::forwardEvent):
629         (WebCore::TextFieldInputType::shouldSubmitImplicitly):
630         (WebCore::TextFieldInputType::handleBeforeTextInsertedEvent):
631         * html/TextFieldInputType.h:
632         * html/shadow/AutoFillButtonElement.cpp:
633         (WebCore::AutoFillButtonElement::defaultEventHandler):
634         * html/shadow/AutoFillButtonElement.h:
635         * html/shadow/MediaControlElementTypes.cpp:
636         (WebCore::MediaControlMuteButtonElement::defaultEventHandler):
637         (WebCore::MediaControlSeekButtonElement::defaultEventHandler):
638         (WebCore::MediaControlVolumeSliderElement::defaultEventHandler):
639         * html/shadow/MediaControlElementTypes.h:
640         * html/shadow/MediaControlElements.cpp:
641         (WebCore::MediaControlPanelElement::defaultEventHandler):
642         (WebCore::MediaControlVolumeSliderContainerElement::defaultEventHandler):
643         (WebCore::MediaControlPanelMuteButtonElement::defaultEventHandler):
644         (WebCore::MediaControlPlayButtonElement::defaultEventHandler):
645         (WebCore::MediaControlOverlayPlayButtonElement::defaultEventHandler):
646         (WebCore::MediaControlRewindButtonElement::defaultEventHandler):
647         (WebCore::MediaControlReturnToRealtimeButtonElement::defaultEventHandler):
648         (WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler):
649         (WebCore::MediaControlClosedCaptionsTrackListElement::defaultEventHandler):
650         (WebCore::MediaControlTimelineElement::defaultEventHandler):
651         (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler):
652         (WebCore::MediaControlFullscreenVolumeMinButtonElement::defaultEventHandler):
653         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::defaultEventHandler):
654         * html/shadow/MediaControlElements.h:
655         * html/shadow/MediaControls.cpp:
656         (WebCore::MediaControls::defaultEventHandler):
657         (WebCore::MediaControls::containsRelatedTarget):
658         * html/shadow/MediaControls.h:
659         * html/shadow/MediaControlsApple.cpp:
660         (WebCore::MediaControlsApple::defaultEventHandler):
661         (WebCore::MediaControlsApple::handleClickEvent):
662         (WebCore::MediaControlsAppleEventListener::handleEvent):
663         * html/shadow/MediaControlsApple.h:
664         * html/shadow/SliderThumbElement.cpp:
665         (WebCore::SliderThumbElement::defaultEventHandler):
666         (WebCore::SliderThumbElement::handleTouchStart):
667         (WebCore::SliderThumbElement::handleTouchMove):
668         (WebCore::SliderThumbElement::handleTouchEndAndCancel):
669         (WebCore::SliderThumbElement::handleTouchEvent):
670         * html/shadow/SliderThumbElement.h:
671         * html/shadow/SpinButtonElement.cpp:
672         (WebCore::SpinButtonElement::defaultEventHandler):
673         (WebCore::SpinButtonElement::forwardEvent):
674         * html/shadow/SpinButtonElement.h:
675         * html/shadow/TextControlInnerElements.cpp:
676         (WebCore::TextControlInnerTextElement::defaultEventHandler):
677         (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
678         (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
679         * html/shadow/TextControlInnerElements.h:
680         * html/shadow/mac/ImageControlsButtonElementMac.cpp:
681         (WebCore::ImageControlsButtonElementMac::defaultEventHandler):
682         * html/shadow/mac/ImageControlsButtonElementMac.h:
683         * loader/FrameLoader.cpp:
684         (WebCore::FrameLoader::dispatchBeforeUnloadEvent):
685         * mathml/MathMLElement.cpp:
686         (WebCore::MathMLElement::defaultEventHandler):
687         (WebCore::MathMLElement::isKeyboardFocusable):
688         * mathml/MathMLElement.h:
689         * mathml/MathMLSelectElement.cpp:
690         (WebCore::MathMLSelectElement::defaultEventHandler):
691         * mathml/MathMLSelectElement.h:
692         * page/EventHandler.cpp:
693         (WebCore::didScrollInScrollableArea):
694         (WebCore::handleWheelEventInAppropriateEnclosingBox):
695         (WebCore::EventHandler::defaultWheelEventHandler):
696         (WebCore::EventHandler::keyEvent):
697         (WebCore::handleKeyboardSelectionMovement):
698         (WebCore::EventHandler::handleKeyboardSelectionMovementForAccessibility):
699         (WebCore::EventHandler::defaultKeyboardEventHandler):
700         (WebCore::EventHandler::defaultTextInputEventHandler):
701         (WebCore::EventHandler::defaultSpaceEventHandler):
702         (WebCore::EventHandler::defaultBackspaceEventHandler):
703         (WebCore::EventHandler::defaultArrowEventHandler):
704         (WebCore::EventHandler::defaultTabEventHandler):
705         * page/EventHandler.h:
706         * page/FocusController.cpp:
707         (WebCore::isFocusableElementOrScopeOwner):
708         (WebCore::isNonFocusableScopeOwner):
709         (WebCore::isFocusableScopeOwner):
710         (WebCore::FocusController::advanceFocusInDocumentOrder):
711         (WebCore::FocusController::findFocusCandidateInContainer):
712         * rendering/RenderFrameSet.cpp:
713         (WebCore::RenderFrameSet::userResize):
714         * rendering/RenderFrameSet.h:
715         * svg/SVGAElement.cpp:
716         (WebCore::SVGAElement::defaultEventHandler):
717         (WebCore::SVGAElement::isKeyboardFocusable):
718         * svg/SVGAElement.h:
719
720 2016-08-31  Romain Bellessort  <romain.bellessort@crf.canon.fr>
721
722         [Streams API] Align getReader() with spec
723         https://bugs.webkit.org/show_bug.cgi?id=160508
724
725         Reviewed by Xabier Rodriguez-Calvar.
726
727         Aligned getReader() with spec following replacement of ReadableStreamReader by
728         ReadableStreamDefaultReader.
729
730         Test: streams/readable-stream-getReader.html
731
732         * Modules/streams/ReadableStream.js:
733         (getReader):
734
735 2016-08-31  Brady Eidson  <beidson@apple.com>
736
737         WK2 Gamepad provider on iOS.
738         https://bugs.webkit.org/show_bug.cgi?id=161412
739
740         Reviewed by Tim Horton.
741
742         No new tests (Native framework backends not directly testable)
743
744         * Configurations/FeatureDefines.xcconfig:
745
746 2016-08-31  Antti Koivisto  <antti@apple.com>
747
748         REGRESSION (r201701): Unable to copy from CodeMirror editor version used in Jenkins install website
749         https://bugs.webkit.org/show_bug.cgi?id=161386
750         <rdar://problem/27590077>
751
752         Reviewed by Dan Bernstein.
753
754         This CodeMirror version uses a hidden <textarea> to implement copy/paste. The textarea has width:1px; border-width:1px.
755         Jenkins page has also has a stylesheet that contains * { box-sizing:border-box } and as a result the textarea content
756         width gets computed as 0. With r201701 we use content size instead of box size for clipping and the textarea content is
757         (correctly) considered invisible.
758
759         Add a quirk that allows this to continue working.
760
761         Test: editing/text-iterator/hidden-textarea-selection-quirk.html
762
763         * editing/TextIterator.cpp:
764         (WebCore::fullyClipsContents):
765
766 2016-08-31  Joseph Pecoraro  <pecoraro@apple.com>
767
768         Remove unused member variable in WebCore::File
769         https://bugs.webkit.org/show_bug.cgi?id=161420
770
771         Reviewed by Alex Christensen.
772
773         * fileapi/File.h:
774
775 2016-08-30  Ryosuke Niwa  <rniwa@webkit.org>
776
777         Add "get" to CustomElementsRegistry
778         https://bugs.webkit.org/show_bug.cgi?id=161421
779
780         Reviewed by Yusuke Suzuki.
781
782         Add the support for "get" method on CustomElementsRegistry, which returns the constructor
783         of the custom element with the given name:
784         https://html.spec.whatwg.org/multipage/scripting.html#dom-customelementregistry-get
785
786         Tests: fast/custom-elements/CustomElementRegistry.html
787
788         * dom/CustomElementRegistry.cpp:
789         (WebCore::CustomElementRegistry::get): Added.
790         * dom/CustomElementRegistry.h:
791         * dom/CustomElementRegistry.idl:
792
793 2016-08-30  Yusuke Suzuki  <utatane.tea@gmail.com>
794
795         Make PendingScript as ref-counted
796         https://bugs.webkit.org/show_bug.cgi?id=161350
797
798         Reviewed by Ryosuke Niwa.
799
800         Currently, while PendingScript is copyable, PendingScript is also CachedResourceClient.
801         So when copying this, the client registration is done in PendingScript's operator= etc.
802         However, this copying functionality is not effectively used.
803         In this patch, we change this PendingScript to ref-counted class and make it noncopyable.
804         This change makes things simple (dropping this copying functionality), and drops unnecessary
805         addClient / removeClient calls. And we also simplify PendingScript class. Since we can offer
806         all the members at the construction time, we do not need any setters like setCachedScript,
807         setElement etc. This prevents us from accidentally generating the half-baked pending script.
808
809         Furthermore, by changing PendingScript noncopyable & ref-counted, we easily make it
810         observable. In this patch, we add PendingScriptClient to receive the notification from
811         PendingScript. Previously, we directly used CachedScript in PendingScript to receive the
812         notification. When introducing ScriptModuleGraph and making this PendingScript the container
813         of the both CachedScript and ScriptModuleGraph, hiding the raw CachedScript operations is
814         useful.
815
816         No behavior changes.
817
818         * WebCore.xcodeproj/project.pbxproj:
819         * dom/PendingScript.cpp:
820         (WebCore::PendingScript::create): These factory functions take all the information needed
821         to construct the PendingScript. So the setters of PendingScript are dropped. This is better
822         since we now do not expose any half-baked pending script accidentally.
823         (WebCore::PendingScript::PendingScript):
824         (WebCore::PendingScript::~PendingScript):
825         (WebCore::PendingScript::notifyClientFinished):
826         (WebCore::PendingScript::notifyFinished):
827         (WebCore::PendingScript::isLoaded): When introducing ScriptModuleGraph, this will query to
828         either CachedScript or ScriptModuleGraph. PendingScript will become the container for the
829         both types.
830         (WebCore::PendingScript::setClient):
831         (WebCore::PendingScript::clearClient): PendingScript is now observable by PendingScriptClient.
832         This avoids touching CachedScript in PendingScript directly. That is good when we introduce
833         ScriptModuleGraph and make PendingScript the container of the both CachedScript and ScriptModuleGraph.
834         (WebCore::PendingScript::releaseElementAndClear): Deleted. Previously, PendingScript is not ref-counted.
835         So when we would like to say "this pending script is empty", we used the pending script with
836         `m_element = nullptr`. This releaseElementAndClear cleared this m_element and made the pending
837         script empty. Now, we use RefPtr<PendingScript> and empty one is just represented by the nullptr.
838         This function is no longer necessary. Dropped.
839         (WebCore::PendingScript::setCachedScript): Deleted. The fields are set in the constructor.
840         So this setter is no longer necessary. Dropped.
841         * dom/PendingScript.h:
842         * dom/PendingScriptClient.h: Copied from Source/WebCore/html/parser/HTMLScriptRunnerHost.h.
843         (WebCore::PendingScriptClient::~PendingScriptClient):
844         * dom/ScriptRunner.cpp:
845         (WebCore::ScriptRunner::queueScriptForExecution):
846         (WebCore::ScriptRunner::notifyScriptReady):
847         (WebCore::ScriptRunner::timerFired): We use `std::exchange` to retrieve the RefPtr<PendingScript>
848         and make the original vector element nullptr. Without this, all the PendingScript is held until
849         the iteration finishes. We keep the original semantics here that the pending script can be
850         released per iteration.
851         * dom/ScriptRunner.h:
852         * html/parser/HTMLDocumentParser.cpp:
853         (WebCore::HTMLDocumentParser::watchForLoad):
854         (WebCore::HTMLDocumentParser::stopWatchingForLoad): Use PendingScript instead of touching
855         CachedScript directly.
856         (WebCore::HTMLDocumentParser::notifyFinished):
857         * html/parser/HTMLDocumentParser.h:
858         * html/parser/HTMLScriptRunner.cpp:
859         (WebCore::HTMLScriptRunner::~HTMLScriptRunner):
860         (WebCore::HTMLScriptRunner::sourceFromPendingScript):
861         (WebCore::HTMLScriptRunner::isPendingScriptReady):
862         (WebCore::HTMLScriptRunner::executeParsingBlockingScript):
863         (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent): As the previous comment describes,
864         we used releaseElementAndClear to make the current pending script empty. Instead of doing so, we now
865         explicitly clear executeParsingBlockingScript (by assigning nullptr to m_parserBlockingScript).
866         (WebCore::HTMLScriptRunner::watchForLoad):
867         (WebCore::HTMLScriptRunner::stopWatchingForLoad): Previously, we used CachedScript::addClient directly
868         in the m_host.watchForLoad. This means that we did not have a quick way to query whether the pending
869         script is watched. In the old implementation, we have the `m_watchingForLoad : bool` flag in PendingScript
870         to hold the watching status for the given pending script. This `pendingScript.setWatchingForLoad(true)`
871         just made this flag `true`. But now, we do not use CachedScript::addClient directly. Instead, we have
872         the PendingScriptClient and PendingScript::{setClient,clearClient}. We can know whether this pending
873         script is watched by checking `m_client != nullptr`. This makes `m_watchingForLoad` unnecessary.
874         So this patch drops `m_watchingForLoad` and `pendingScript.setWatchingForLoad(true)` call.
875         (WebCore::HTMLScriptRunner::hasParserBlockingScript):
876         (WebCore::HTMLScriptRunner::executeParsingBlockingScripts): We clear the m_parserBlockingScript here
877         instead of the middle of the executePendingScriptAndDispatchEvent.
878         (WebCore::HTMLScriptRunner::executeScriptsWaitingForLoad):
879         (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
880         (WebCore::requestPendingScript):
881         (WebCore::HTMLScriptRunner::requestParsingBlockingScript): Setting m_parsingBlockingScript is now done
882         in this caller side.
883         (WebCore::HTMLScriptRunner::requestDeferredScript):
884         (WebCore::HTMLScriptRunner::runScript):
885         (WebCore::HTMLScriptRunner::requestPendingScript): Instead of configuring the passed PendingScript&,
886         we return the pending script and the caller sets it to m_parserBlockingScript or holds it. And we now
887         change this function to static location one and drop the member function. Previously, we always make
888         PendingScript& valid by always calling `setElement(...)`. I think this is the bug since we accidentally
889         exposed the half-baked pending script. But this bug is not shown since `!cachedScript` path is dead code!
890         This requestPendingScript is called from two places, requestDeferredScript and requestParsingBlockingScript.
891         And these functions are called if the script has `willBeParserExecuted` flag. In the case of the script
892         tag having "src" attribute, this flag is only set if `cachedScript` is correctly instantiated. So when
893         these functions are called, we can ensure that `cachedScript` is correctly instantiated for the given script.
894         In the case of the script tag not having "src" attribute, these functions are won't be called. This is
895         because if such a script tag has `willBeParserExecuted` flag, it also has `m_readyToBeParserExecuted`
896         and it does not have `m_willExecuteWhenDocumentFinishedParsing` flag, and in that case the both
897         functions are never called. So we drop that path and insert the assertion to ensure the above conditions.
898         * html/parser/HTMLScriptRunner.h:
899         * html/parser/HTMLScriptRunnerHost.h:
900
901 2016-08-30  Ricky Mondello  <rmondello@apple.com>
902
903         "pluginReplacementEnabled" should be a Setting, not a RuntimeEnabledFeature
904         https://bugs.webkit.org/show_bug.cgi?id=161416
905         <rdar://problem/28050847>
906
907         Reviewed by Simon Fraser.
908
909         Mostly mechanical. Tested by running LayoutTests/plugins/quicktime-plugin-replacement.html and manually toggling
910         defaultPluginReplacementEnabled and observing a behavior change.
911
912         * bindings/generic/RuntimeEnabledFeatures.cpp:
913         (WebCore::RuntimeEnabledFeatures::reset): Purged of the pluginReplacementEnabled setting.
914         * bindings/generic/RuntimeEnabledFeatures.h:
915         (WebCore::RuntimeEnabledFeatures::setPluginReplacementEnabled): Deleted.
916         (WebCore::RuntimeEnabledFeatures::pluginReplacementEnabled): Deleted.
917         * html/HTMLPlugInElement.cpp:
918         (WebCore::HTMLPlugInElement::requestObject): Use the setting.
919         * page/Settings.cpp: Supply different values for iOS and other platforms, matching the RuntimeEnabledFeature values,
920             enabled for iOS and disabled otherwise.
921         * page/Settings.in: Declare the setting.
922         * testing/InternalSettings.cpp:
923         (WebCore::InternalSettings::Backup::Backup): Use the setting.
924         (WebCore::InternalSettings::Backup::restoreTo): Ditto.
925         (WebCore::InternalSettings::setPluginReplacementEnabled): Ditto.
926         * testing/InternalSettings.h: Can now throw an exception, like other Settings-backed members.
927         * testing/InternalSettings.idl: Declare this as possibly throwing an exception.
928
929 2016-08-30  Ricky Mondello  <rmondello@apple.com>
930
931         YouTubePluginReplacementTest's URL transformation logic should have tests
932         https://bugs.webkit.org/show_bug.cgi?id=161406
933         <rdar://problem/28050847>
934
935         Reviewed by Eric Carlson.
936
937         Refactor most of YouTubePluginReplacement::youTubeURL into a static method that can be used by TestWebKitAPI.
938
939         * Modules/plugins/YouTubePluginReplacement.cpp:
940         (WebCore::YouTubePluginReplacement::youTubeURL): Now implemented in terms of youTubeURLFromAbsoluteURL.
941         (WebCore::YouTubePluginReplacement::youTubeURLFromAbsoluteURL): Absorbs most of youTubeURL.
942         * Modules/plugins/YouTubePluginReplacement.h: Declare a public method, for the benefit of testing.
943         * WebCore.xcodeproj/project.pbxproj: Make some heads private for TestWebKitAPI's benefit.
944
945 2016-08-30  Frederic Wang  <fwang@igalia.com>
946
947         Move some code from MathMLElement to MathMLPresentationElement
948         https://bugs.webkit.org/show_bug.cgi?id=161377
949
950         Reviewed by Darin Adler.
951
952         The following code is only used in presentation MathML classes. We then move it from
953         MathMLElement to MathMLPresentationElement:
954         - testing whether a child is a phrasing/flow element.
955         - parsing of length attributes.
956         - parsing of boolean attributes.
957         - parsing of mathvariant attributes.
958
959         No new tests, already covered by existing tests.
960
961         * mathml/MathMLElement.cpp:
962         (WebCore::MathMLElement::isPhrasingContent): Deleted.
963         (WebCore::MathMLElement::isFlowContent): Deleted.
964         (WebCore::MathMLElement::parseNumberAndUnit): Deleted.
965         (WebCore::MathMLElement::parseNamedSpace): Deleted.
966         (WebCore::MathMLElement::parseMathMLLength): Deleted.
967         (WebCore::MathMLElement::cachedMathMLLength): Deleted.
968         (WebCore::MathMLElement::cachedBooleanAttribute): Deleted.
969         (WebCore::MathMLElement::parseMathVariantAttribute): Deleted.
970         (WebCore::MathMLElement::specifiedDisplayStyle): Deleted.
971         (WebCore::MathMLElement::specifiedMathVariant): Deleted.
972         * mathml/MathMLElement.h:
973         (WebCore::MathMLElement::specifiedDisplayStyle):
974         (WebCore::MathMLElement::specifiedMathVariant):
975         (WebCore::MathMLElement::acceptsDisplayStyleAttribute): Deleted.
976         (WebCore::MathMLElement::acceptsMathVariantAttribute): Deleted.
977         (WebCore::MathMLElement::toOptionalBool): Deleted.
978         * mathml/MathMLPresentationElement.cpp:
979         (WebCore::MathMLPresentationElement::isPhrasingContent):
980         (WebCore::MathMLPresentationElement::isFlowContent):
981         (WebCore::MathMLPresentationElement::cachedBooleanAttribute):
982         (WebCore::MathMLPresentationElement::parseNumberAndUnit):
983         (WebCore::MathMLPresentationElement::parseNamedSpace):
984         (WebCore::MathMLPresentationElement::parseMathMLLength):
985         (WebCore::MathMLPresentationElement::cachedMathMLLength):
986         (WebCore::MathMLPresentationElement::specifiedDisplayStyle):
987         (WebCore::MathMLPresentationElement::parseMathVariantAttribute):
988         (WebCore::MathMLPresentationElement::specifiedMathVariant):
989         * mathml/MathMLPresentationElement.h:
990         (WebCore::MathMLPresentationElement::toOptionalBool):
991         (WebCore::MathMLPresentationElement::acceptsMathVariantAttribute):
992
993 2016-08-30  Frederic Wang  <fwang@igalia.com>
994
995         Introduce a MathMLUnknownElement class
996         https://bugs.webkit.org/show_bug.cgi?id=161298
997
998         Reviewed by Darin Adler.
999
1000         For consistency with SVG and HTML, we make MathML elements use a
1001         fallback MathMLUnknownElement class. Like SVG, we ensure that unknown
1002         MathML elements do not create any renderer.
1003
1004         Test: mathml/mathml-unknown.xhtml
1005
1006         * mathml/MathMLUnknownElement.h: Added. This is a simple class for
1007         unknown MathML elements, preventing the creation of renderers.
1008         * mathml/mathtags.in: Map fallbackInterfaceName to MathMLUnknownElement.
1009
1010 2016-08-30  Chris Dumez  <cdumez@apple.com>
1011
1012         [[Delete]] should throw for cross-origin Window / Location objects
1013         https://bugs.webkit.org/show_bug.cgi?id=161397
1014
1015         Reviewed by Ryosuke Niwa.
1016
1017         [[Delete]] should throw for cross-origin Window / Location objects:
1018         - https://github.com/whatwg/html/pull/1728
1019
1020         Firefox and Chrome already throw. Previously, WebKit was merely
1021         ignoring the call and logging an error message.
1022
1023         No new tests, updated existing test.
1024
1025         * bindings/js/JSDOMWindowCustom.cpp:
1026         (WebCore::JSDOMWindow::deleteProperty):
1027         (WebCore::JSDOMWindow::deletePropertyByIndex):
1028         * bindings/js/JSLocationCustom.cpp:
1029         (WebCore::JSLocation::deleteProperty):
1030         (WebCore::JSLocation::deletePropertyByIndex):
1031
1032 2016-08-30  Brady Eidson  <beidson@apple.com>
1033
1034         GameController.framework backend for gamepad API.
1035         https://bugs.webkit.org/show_bug.cgi?id=161086
1036
1037         Reviewed by Alex Christensen.
1038
1039         No new tests (Native framework backends not directly testable)
1040
1041         * WebCore.xcodeproj/project.pbxproj:
1042         
1043         * platform/gamepad/cocoa/GameControllerGamepad.h: Copied from Source/WebKit2/UIProcess/Gamepad/mac/UIGamepadProviderHID.cpp.
1044         * platform/gamepad/cocoa/GameControllerGamepad.mm: Added.
1045         (WebCore::GameControllerGamepad::GameControllerGamepad):
1046         (WebCore::GameControllerGamepad::setupAsExtendedGamepad):
1047         (WebCore::GameControllerGamepad::setupAsGamepad):
1048         
1049         * platform/gamepad/cocoa/GameControllerGamepadProvider.h: Added.
1050         * platform/gamepad/cocoa/GameControllerGamepadProvider.mm: Added.
1051         (WebCore::GameControllerGamepadProvider::singleton):
1052         (WebCore::GameControllerGamepadProvider::GameControllerGamepadProvider):
1053         (WebCore::GameControllerGamepadProvider::controllerDidConnect):
1054         (WebCore::GameControllerGamepadProvider::controllerDidDisconnect):
1055         (WebCore::GameControllerGamepadProvider::startMonitoringGamepads):
1056         (WebCore::GameControllerGamepadProvider::stopMonitoringGamepads):
1057         (WebCore::GameControllerGamepadProvider::indexForNewlyConnectedDevice):
1058         (WebCore::GameControllerGamepadProvider::gamepadHadInput):
1059         (WebCore::GameControllerGamepadProvider::makeInvisibileGamepadsVisible):
1060         (WebCore::GameControllerGamepadProvider::inputNotificationTimerFired):
1061
1062 2016-08-30  Mark Lam  <mark.lam@apple.com>
1063
1064         Introduce the ThrowScope and force every throw site to instantiate a ThrowScope.
1065         https://bugs.webkit.org/show_bug.cgi?id=161171
1066
1067         Reviewed by Filip Pizlo and Geoffrey Garen.
1068
1069         No new tests because this is only an internal API change. If it builds, it should be good.
1070
1071         * bindings/js/JSApplePaySessionCustom.cpp:
1072         (WebCore::JSApplePaySession::completeShippingMethodSelection):
1073         (WebCore::JSApplePaySession::completeShippingContactSelection):
1074         (WebCore::JSApplePaySession::completePaymentMethodSelection):
1075         * bindings/js/JSBlobCustom.cpp:
1076         (WebCore::constructJSBlob):
1077         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1078         (WebCore::JSCSSStyleDeclaration::getPropertyCSSValue):
1079         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
1080         (WebCore::JSCryptoAlgorithmDictionary::getAlgorithmIdentifier):
1081         (WebCore::createAesCbcParams):
1082         (WebCore::createAesKeyGenParams):
1083         (WebCore::createHmacParams):
1084         (WebCore::createHmacKeyParams):
1085         (WebCore::createRsaKeyGenParams):
1086         (WebCore::createRsaOaepParams):
1087         (WebCore::createRsaSsaParams):
1088         * bindings/js/JSCryptoCustom.cpp:
1089         (WebCore::JSCrypto::getRandomValues):
1090         * bindings/js/JSCryptoKeySerializationJWK.cpp:
1091         (WebCore::getJSArrayFromJSON):
1092         (WebCore::getStringFromJSON):
1093         (WebCore::getBooleanFromJSON):
1094         (WebCore::getBigIntegerVectorFromJSON):
1095         (WebCore::JSCryptoKeySerializationJWK::JSCryptoKeySerializationJWK):
1096         (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm):
1097         (WebCore::tryJWKKeyOpsValue):
1098         (WebCore::JSCryptoKeySerializationJWK::reconcileUsages):
1099         (WebCore::JSCryptoKeySerializationJWK::keyDataOctetSequence):
1100         (WebCore::JSCryptoKeySerializationJWK::keyDataRSAComponents):
1101         (WebCore::JSCryptoKeySerializationJWK::keyData):
1102         (WebCore::addJWKAlgorithmToJSON):
1103         (WebCore::JSCryptoKeySerializationJWK::serialize):
1104         * bindings/js/JSCryptoOperationData.cpp:
1105         (WebCore::cryptoOperationDataFromJSValue):
1106         * bindings/js/JSCustomElementInterface.cpp:
1107         (WebCore::JSCustomElementInterface::upgradeElement):
1108         * bindings/js/JSCustomElementRegistryCustom.cpp:
1109         (WebCore::getCustomElementCallback):
1110         (WebCore::JSCustomElementRegistry::define):
1111         * bindings/js/JSDOMBinding.cpp:
1112         (WebCore::setDOMException):
1113         (WebCore::enforceRange):
1114         (WebCore::toSmallerInt):
1115         (WebCore::toSmallerUInt):
1116         (WebCore::canAccessDocument):
1117         (WebCore::throwTypeError):
1118         (WebCore::throwNotSupportedError):
1119         (WebCore::throwInvalidStateError):
1120         (WebCore::throwSecurityError):
1121         (WebCore::throwArgumentMustBeEnumError):
1122         (WebCore::throwArgumentMustBeFunctionError):
1123         (WebCore::throwArgumentTypeError):
1124         (WebCore::throwArrayElementTypeError):
1125         (WebCore::throwAttributeTypeError):
1126         (WebCore::throwConstructorScriptExecutionContextUnavailableError):
1127         (WebCore::throwSequenceTypeError):
1128         (WebCore::throwNonFiniteTypeError):
1129         (WebCore::throwGetterTypeError):
1130         (WebCore::throwSetterTypeError):
1131         (WebCore::throwThisTypeError):
1132         (WebCore::callThrowTypeError):
1133         * bindings/js/JSDOMBinding.h:
1134         (WebCore::toJSSequence):
1135         (WebCore::toRefPtrNativeArray):
1136         (WebCore::toNativeArray):
1137         * bindings/js/JSDOMConstructor.h:
1138         (WebCore::JSDOMConstructorNotConstructable::callThrowTypeError):
1139         (WebCore::JSBuiltinConstructor<JSClass>::callConstructor):
1140         * bindings/js/JSDOMConvert.h:
1141         (WebCore::convertWrapperType):
1142         * bindings/js/JSDOMIterator.h:
1143         (WebCore::iteratorCreate):
1144         (WebCore::iteratorForEach):
1145         (WebCore::JSDOMIteratorPrototype<JSWrapper>::next):
1146         * bindings/js/JSDOMWindowCustom.cpp:
1147         (WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess):
1148         (WebCore::JSDOMWindow::put):
1149         (WebCore::JSDOMWindow::showModalDialog):
1150         (WebCore::handlePostMessage):
1151         (WebCore::JSDOMWindow::setTimeout):
1152         (WebCore::JSDOMWindow::setInterval):
1153         * bindings/js/JSDataCueCustom.cpp:
1154         (WebCore::constructJSDataCue):
1155         * bindings/js/JSDictionary.cpp:
1156         (WebCore::JSDictionary::convertValue):
1157         * bindings/js/JSDocumentCustom.cpp:
1158         (WebCore::JSDocument::createTouchList):
1159         (WebCore::JSDocument::getCSSCanvasContext):
1160         * bindings/js/JSFileCustom.cpp:
1161         (WebCore::constructJSFile):
1162         * bindings/js/JSHTMLAllCollectionCustom.cpp:
1163         (WebCore::JSHTMLAllCollection::item):
1164         * bindings/js/JSHTMLCanvasElementCustom.cpp:
1165         (WebCore::JSHTMLCanvasElement::getContext):
1166         (WebCore::JSHTMLCanvasElement::probablySupportsContext):
1167         * bindings/js/JSHTMLDocumentCustom.cpp:
1168         (WebCore::JSHTMLDocument::open):
1169         * bindings/js/JSHTMLElementCustom.cpp:
1170         (WebCore::constructJSHTMLElement):
1171         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
1172         (WebCore::JSHTMLFormControlsCollection::namedItem):
1173         * bindings/js/JSHTMLInputElementCustom.cpp:
1174         (WebCore::JSHTMLInputElement::selectionStart):
1175         (WebCore::JSHTMLInputElement::setSelectionStart):
1176         (WebCore::JSHTMLInputElement::selectionEnd):
1177         (WebCore::JSHTMLInputElement::setSelectionEnd):
1178         (WebCore::JSHTMLInputElement::selectionDirection):
1179         (WebCore::JSHTMLInputElement::setSelectionDirection):
1180         (WebCore::JSHTMLInputElement::setSelectionRange):
1181         * bindings/js/JSHistoryCustom.cpp:
1182         (WebCore::JSHistory::pushState):
1183         (WebCore::JSHistory::replaceState):
1184         * bindings/js/JSIDBDatabaseCustom.cpp:
1185         (WebCore::JSIDBDatabase::createObjectStore):
1186         * bindings/js/JSImageConstructor.cpp:
1187         (WebCore::JSImageConstructor::construct):
1188         * bindings/js/JSLocationCustom.cpp:
1189         (WebCore::JSLocation::getOwnPropertySlotDelegate):
1190         * bindings/js/JSMediaDevicesCustom.cpp:
1191         (WebCore::JSMediaDevices::getUserMedia):
1192         * bindings/js/JSMediaStreamTrackCustom.cpp:
1193         (WebCore::JSMediaStreamTrack::getSettings):
1194         (WebCore::JSMediaStreamTrack::getCapabilities):
1195         * bindings/js/JSMessagePortCustom.cpp:
1196         (WebCore::fillMessagePortArray):
1197         * bindings/js/JSMessagePortCustom.h:
1198         (WebCore::handlePostMessage):
1199         * bindings/js/JSMockContentFilterSettingsCustom.cpp:
1200         (WebCore::JSMockContentFilterSettings::setDecisionPoint):
1201         (WebCore::toDecision):
1202         * bindings/js/JSModuleLoader.cpp:
1203         (WebCore::JSModuleLoader::evaluate):
1204         * bindings/js/JSMutationObserverCustom.cpp:
1205         (WebCore::constructJSMutationObserver):
1206         * bindings/js/JSNodeCustom.cpp:
1207         (WebCore::JSNode::insertBefore):
1208         (WebCore::JSNode::replaceChild):
1209         (WebCore::JSNode::removeChild):
1210         (WebCore::JSNode::appendChild):
1211         * bindings/js/JSNodeFilterCustom.cpp:
1212         (WebCore::JSNodeFilter::acceptNode):
1213         * bindings/js/JSPluginElementFunctions.cpp:
1214         (WebCore::pluginElementPropertyGetter):
1215         * bindings/js/JSReadableStreamPrivateConstructors.cpp:
1216         (WebCore::constructJSReadableStreamDefaultController):
1217         (WebCore::constructJSReadableStreamDefaultReader):
1218         * bindings/js/JSSVGLengthCustom.cpp:
1219         (WebCore::JSSVGLength::setValue):
1220         (WebCore::JSSVGLength::convertToSpecifiedUnits):
1221         * bindings/js/JSWebGL2RenderingContextCustom.cpp:
1222         (WebCore::JSWebGL2RenderingContext::getIndexedParameter):
1223         * bindings/js/JSWebGLRenderingContextBaseCustom.cpp:
1224         (WebCore::getObjectParameter):
1225         (WebCore::JSWebGLRenderingContextBase::getAttachedShaders):
1226         (WebCore::JSWebGLRenderingContextBase::getExtension):
1227         (WebCore::JSWebGLRenderingContextBase::getFramebufferAttachmentParameter):
1228         (WebCore::JSWebGLRenderingContextBase::getParameter):
1229         (WebCore::JSWebGLRenderingContextBase::getProgramParameter):
1230         (WebCore::JSWebGLRenderingContextBase::getShaderParameter):
1231         (WebCore::JSWebGLRenderingContextBase::getUniform):
1232         (WebCore::dataFunctionf):
1233         (WebCore::dataFunctioni):
1234         (WebCore::dataFunctionMatrix):
1235         * bindings/js/JSWebKitSubtleCryptoCustom.cpp:
1236         (WebCore::cryptoKeyFormatFromJSValue):
1237         (WebCore::cryptoKeyUsagesFromJSValue):
1238         (WebCore::JSWebKitSubtleCrypto::encrypt):
1239         (WebCore::JSWebKitSubtleCrypto::decrypt):
1240         (WebCore::JSWebKitSubtleCrypto::sign):
1241         (WebCore::JSWebKitSubtleCrypto::verify):
1242         (WebCore::JSWebKitSubtleCrypto::digest):
1243         (WebCore::JSWebKitSubtleCrypto::generateKey):
1244         (WebCore::importKey):
1245         (WebCore::JSWebKitSubtleCrypto::importKey):
1246         (WebCore::exportKey):
1247         (WebCore::JSWebKitSubtleCrypto::exportKey):
1248         (WebCore::JSWebKitSubtleCrypto::wrapKey):
1249         (WebCore::JSWebKitSubtleCrypto::unwrapKey):
1250         * bindings/js/JSWorkerCustom.cpp:
1251         (WebCore::constructJSWorker):
1252         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
1253         (WebCore::JSWorkerGlobalScope::setTimeout):
1254         (WebCore::JSWorkerGlobalScope::setInterval):
1255         * bindings/js/ReadableStreamDefaultController.cpp:
1256         (WebCore::ReadableStreamDefaultController::invoke):
1257         * bindings/js/SerializedScriptValue.cpp:
1258         (WebCore::CloneBase::throwStackOverflow):
1259         (WebCore::CloneDeserializer::throwValidationError):
1260         (WebCore::SerializedScriptValue::maybeThrowExceptionIfSerializationFailed):
1261         * bindings/js/WorkerScriptController.cpp:
1262         (WebCore::WorkerScriptController::evaluate):
1263         (WebCore::WorkerScriptController::setException):
1264         * bindings/scripts/CodeGeneratorJS.pm:
1265         (GenerateEnumerationImplementationContent):
1266         (GenerateDictionaryImplementationContent):
1267         (GenerateOverloadedFunctionOrConstructor):
1268         (GenerateImplementation):
1269         (GenerateFunctionCastedThis):
1270         (GenerateArgumentsCountCheck):
1271         (GenerateParametersCheck):
1272         (GenerateConstructorDefinition):
1273         * bindings/scripts/test/JS/JSInterfaceName.cpp:
1274         (WebCore::jsInterfaceNameConstructor):
1275         (WebCore::setJSInterfaceNameConstructor):
1276         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1277         (WebCore::jsTestActiveDOMObjectExcitingAttr):
1278         (WebCore::jsTestActiveDOMObjectConstructor):
1279         (WebCore::setJSTestActiveDOMObjectConstructor):
1280         (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
1281         (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
1282         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
1283         (WebCore::jsTestClassWithJSBuiltinConstructorConstructor):
1284         (WebCore::setJSTestClassWithJSBuiltinConstructorConstructor):
1285         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
1286         (WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor):
1287         (WebCore::setJSTestCustomConstructorWithNoInterfaceObjectConstructor):
1288         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1289         (WebCore::jsTestCustomNamedGetterConstructor):
1290         (WebCore::setJSTestCustomNamedGetterConstructor):
1291         (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
1292         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1293         (WebCore::JSTestEventConstructorConstructor::construct):
1294         (WebCore::jsTestEventConstructorAttr1):
1295         (WebCore::jsTestEventConstructorAttr2):
1296         (WebCore::jsTestEventConstructorAttr3):
1297         (WebCore::jsTestEventConstructorConstructor):
1298         (WebCore::setJSTestEventConstructorConstructor):
1299         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1300         (WebCore::jsTestEventTargetConstructor):
1301         (WebCore::setJSTestEventTargetConstructor):
1302         (WebCore::jsTestEventTargetPrototypeFunctionItem):
1303         * bindings/scripts/test/JS/JSTestException.cpp:
1304         (WebCore::jsTestExceptionName):
1305         (WebCore::jsTestExceptionConstructor):
1306         (WebCore::setJSTestExceptionConstructor):
1307         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1308         (WebCore::jsTestGenerateIsReachableConstructor):
1309         (WebCore::setJSTestGenerateIsReachableConstructor):
1310         * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
1311         (WebCore::jsTestGlobalObjectRegularAttribute):
1312         (WebCore::jsTestGlobalObjectPublicAndPrivateAttribute):
1313         (WebCore::jsTestGlobalObjectPublicAndPrivateConditionalAttribute):
1314         (WebCore::jsTestGlobalObjectEnabledAtRuntimeAttribute):
1315         (WebCore::jsTestGlobalObjectConstructor):
1316         (WebCore::setJSTestGlobalObjectConstructor):
1317         (WebCore::setJSTestGlobalObjectRegularAttribute):
1318         (WebCore::setJSTestGlobalObjectPublicAndPrivateAttribute):
1319         (WebCore::setJSTestGlobalObjectPublicAndPrivateConditionalAttribute):
1320         (WebCore::setJSTestGlobalObjectEnabledAtRuntimeAttribute):
1321         (WebCore::jsTestGlobalObjectInstanceFunctionRegularOperation):
1322         (WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation1):
1323         (WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation2):
1324         (WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation):
1325         (WebCore::jsTestGlobalObjectInstanceFunctionTestPrivateFunction):
1326         * bindings/scripts/test/JS/JSTestInterface.cpp:
1327         (WebCore::JSTestInterfaceConstructor::construct):
1328         (WebCore::jsTestInterfaceConstructorImplementsStaticReadOnlyAttr):
1329         (WebCore::jsTestInterfaceConstructorImplementsStaticAttr):
1330         (WebCore::jsTestInterfaceImplementsStr1):
1331         (WebCore::jsTestInterfaceImplementsStr2):
1332         (WebCore::jsTestInterfaceImplementsStr3):
1333         (WebCore::jsTestInterfaceImplementsNode):
1334         (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
1335         (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
1336         (WebCore::jsTestInterfaceSupplementalStr1):
1337         (WebCore::jsTestInterfaceSupplementalStr2):
1338         (WebCore::jsTestInterfaceSupplementalStr3):
1339         (WebCore::jsTestInterfaceSupplementalNode):
1340         (WebCore::jsTestInterfaceConstructor):
1341         (WebCore::setJSTestInterfaceConstructor):
1342         (WebCore::setJSTestInterfaceConstructorImplementsStaticAttr):
1343         (WebCore::setJSTestInterfaceImplementsStr2):
1344         (WebCore::setJSTestInterfaceImplementsStr3):
1345         (WebCore::setJSTestInterfaceImplementsNode):
1346         (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
1347         (WebCore::setJSTestInterfaceSupplementalStr2):
1348         (WebCore::setJSTestInterfaceSupplementalStr3):
1349         (WebCore::setJSTestInterfaceSupplementalNode):
1350         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod1):
1351         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
1352         (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod3):
1353         (WebCore::jsTestInterfaceConstructorFunctionImplementsMethod4):
1354         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod1):
1355         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
1356         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod3):
1357         (WebCore::jsTestInterfaceConstructorFunctionSupplementalMethod4):
1358         * bindings/scripts/test/JS/JSTestIterable.cpp:
1359         (WebCore::jsTestIterableConstructor):
1360         (WebCore::setJSTestIterableConstructor):
1361         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
1362         (WebCore::jsTestJSBuiltinConstructorTestAttributeCustom):
1363         (WebCore::jsTestJSBuiltinConstructorTestAttributeRWCustom):
1364         (WebCore::jsTestJSBuiltinConstructorConstructor):
1365         (WebCore::setJSTestJSBuiltinConstructorConstructor):
1366         (WebCore::setJSTestJSBuiltinConstructorTestAttributeRWCustom):
1367         (WebCore::jsTestJSBuiltinConstructorPrototypeFunctionTestCustomFunction):
1368         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1369         (WebCore::jsTestMediaQueryListListenerConstructor):
1370         (WebCore::setJSTestMediaQueryListListenerConstructor):
1371         (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
1372         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1373         (WebCore::JSTestNamedConstructorNamedConstructor::construct):
1374         (WebCore::jsTestNamedConstructorConstructor):
1375         (WebCore::setJSTestNamedConstructorConstructor):
1376         * bindings/scripts/test/JS/JSTestNode.cpp:
1377         (WebCore::JSTestNodeConstructor::construct):
1378         (WebCore::jsTestNodeName):
1379         (WebCore::jsTestNodeConstructor):
1380         (WebCore::setJSTestNodeConstructor):
1381         (WebCore::setJSTestNodeName):
1382         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1383         (WebCore::jsTestNondeterministicNondeterministicReadonlyAttr):
1384         (WebCore::jsTestNondeterministicNondeterministicWriteableAttr):
1385         (WebCore::jsTestNondeterministicNondeterministicExceptionAttr):
1386         (WebCore::jsTestNondeterministicNondeterministicGetterExceptionAttr):
1387         (WebCore::jsTestNondeterministicNondeterministicSetterExceptionAttr):
1388         (WebCore::jsTestNondeterministicConstructor):
1389         (WebCore::setJSTestNondeterministicConstructor):
1390         (WebCore::setJSTestNondeterministicNondeterministicWriteableAttr):
1391         (WebCore::setJSTestNondeterministicNondeterministicExceptionAttr):
1392         (WebCore::setJSTestNondeterministicNondeterministicGetterExceptionAttr):
1393         (WebCore::setJSTestNondeterministicNondeterministicSetterExceptionAttr):
1394         (WebCore::jsTestNondeterministicPrototypeFunctionNondeterministicZeroArgFunction):
1395         * bindings/scripts/test/JS/JSTestObj.cpp:
1396         (WebCore::convert<TestObj::EnumType>):
1397         (WebCore::convert<TestObj::Optional>):
1398         (WebCore::convert<AlternateEnumName>):
1399         (WebCore::convert<TestObj::EnumA>):
1400         (WebCore::convert<TestObj::EnumB>):
1401         (WebCore::convert<TestObj::EnumC>):
1402         (WebCore::convert<TestObj::Kind>):
1403         (WebCore::convert<TestObj::Size>):
1404         (WebCore::convert<TestObj::Confidence>):
1405         (WebCore::convertDictionary<TestObj::Dictionary>):
1406         (WebCore::convertDictionary<TestObj::DictionaryThatShouldNotTolerateNull>):
1407         (WebCore::convertDictionary<TestObj::DictionaryThatShouldTolerateNull>):
1408         (WebCore::convertDictionary<AlternateDictionaryName>):
1409         (WebCore::JSTestObjConstructor::construct):
1410         (WebCore::jsTestObjReadOnlyLongAttr):
1411         (WebCore::jsTestObjReadOnlyStringAttr):
1412         (WebCore::jsTestObjReadOnlyTestObjAttr):
1413         (WebCore::jsTestObjConstructorStaticReadOnlyLongAttr):
1414         (WebCore::jsTestObjConstructorStaticStringAttr):
1415         (WebCore::jsTestObjConstructorTestSubObj):
1416         (WebCore::jsTestObjTestSubObjEnabledBySettingConstructor):
1417         (WebCore::jsTestObjEnumAttr):
1418         (WebCore::jsTestObjByteAttr):
1419         (WebCore::jsTestObjOctetAttr):
1420         (WebCore::jsTestObjShortAttr):
1421         (WebCore::jsTestObjClampedShortAttr):
1422         (WebCore::jsTestObjEnforceRangeShortAttr):
1423         (WebCore::jsTestObjUnsignedShortAttr):
1424         (WebCore::jsTestObjLongAttr):
1425         (WebCore::jsTestObjLongLongAttr):
1426         (WebCore::jsTestObjUnsignedLongLongAttr):
1427         (WebCore::jsTestObjStringAttr):
1428         (WebCore::jsTestObjUsvstringAttr):
1429         (WebCore::jsTestObjTestObjAttr):
1430         (WebCore::jsTestObjTestNullableObjAttr):
1431         (WebCore::jsTestObjLenientTestObjAttr):
1432         (WebCore::jsTestObjUnforgeableAttr):
1433         (WebCore::jsTestObjStringAttrTreatingNullAsEmptyString):
1434         (WebCore::jsTestObjUsvstringAttrTreatingNullAsEmptyString):
1435         (WebCore::jsTestObjImplementationEnumAttr):
1436         (WebCore::jsTestObjXMLObjAttr):
1437         (WebCore::jsTestObjCreate):
1438         (WebCore::jsTestObjReflectedStringAttr):
1439         (WebCore::jsTestObjReflectedUSVStringAttr):
1440         (WebCore::jsTestObjReflectedIntegralAttr):
1441         (WebCore::jsTestObjReflectedUnsignedIntegralAttr):
1442         (WebCore::jsTestObjReflectedBooleanAttr):
1443         (WebCore::jsTestObjReflectedURLAttr):
1444         (WebCore::jsTestObjReflectedUSVURLAttr):
1445         (WebCore::jsTestObjReflectedCustomIntegralAttr):
1446         (WebCore::jsTestObjReflectedCustomBooleanAttr):
1447         (WebCore::jsTestObjReflectedCustomURLAttr):
1448         (WebCore::jsTestObjEnabledAtRuntimeAttribute):
1449         (WebCore::jsTestObjTypedArrayAttr):
1450         (WebCore::jsTestObjAttrWithGetterException):
1451         (WebCore::jsTestObjAttrWithGetterExceptionWithMessage):
1452         (WebCore::jsTestObjAttrWithSetterException):
1453         (WebCore::jsTestObjAttrWithSetterExceptionWithMessage):
1454         (WebCore::jsTestObjStringAttrWithGetterException):
1455         (WebCore::jsTestObjStringAttrWithSetterException):
1456         (WebCore::jsTestObjCustomAttr):
1457         (WebCore::jsTestObjOnfoo):
1458         (WebCore::jsTestObjOnwebkitfoo):
1459         (WebCore::jsTestObjWithScriptStateAttribute):
1460         (WebCore::jsTestObjWithCallWithAndSetterCallWithAttribute):
1461         (WebCore::jsTestObjWithScriptExecutionContextAttribute):
1462         (WebCore::jsTestObjWithScriptStateAttributeRaises):
1463         (WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
1464         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttribute):
1465         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
1466         (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
1467         (WebCore::jsTestObjWithScriptArgumentsAndCallStackAttribute):
1468         (WebCore::jsTestObjConditionalAttr1):
1469         (WebCore::jsTestObjConditionalAttr2):
1470         (WebCore::jsTestObjConditionalAttr3):
1471         (WebCore::jsTestObjConditionalAttr4Constructor):
1472         (WebCore::jsTestObjConditionalAttr5Constructor):
1473         (WebCore::jsTestObjConditionalAttr6Constructor):
1474         (WebCore::jsTestObjCachedAttribute1):
1475         (WebCore::jsTestObjCachedAttribute2):
1476         (WebCore::jsTestObjAnyAttribute):
1477         (WebCore::jsTestObjContentDocument):
1478         (WebCore::jsTestObjMutablePoint):
1479         (WebCore::jsTestObjImmutablePoint):
1480         (WebCore::jsTestObjStrawberry):
1481         (WebCore::jsTestObjDescription):
1482         (WebCore::jsTestObjId):
1483         (WebCore::jsTestObjHash):
1484         (WebCore::jsTestObjReplaceableAttribute):
1485         (WebCore::jsTestObjNullableDoubleAttribute):
1486         (WebCore::jsTestObjNullableLongAttribute):
1487         (WebCore::jsTestObjNullableBooleanAttribute):
1488         (WebCore::jsTestObjNullableStringAttribute):
1489         (WebCore::jsTestObjNullableLongSettableAttribute):
1490         (WebCore::jsTestObjNullableStringSettableAttribute):
1491         (WebCore::jsTestObjNullableUSVStringSettableAttribute):
1492         (WebCore::jsTestObjNullableStringValue):
1493         (WebCore::jsTestObjAttribute):
1494         (WebCore::jsTestObjAttributeWithReservedEnumType):
1495         (WebCore::jsTestObjPutForwardsAttribute):
1496         (WebCore::jsTestObjPutForwardsNullableAttribute):
1497         (WebCore::jsTestObjStringifierAttribute):
1498         (WebCore::jsTestObjConstructor):
1499         (WebCore::setJSTestObjConstructor):
1500         (WebCore::setJSTestObjConstructorStaticStringAttr):
1501         (WebCore::setJSTestObjTestSubObjEnabledBySettingConstructor):
1502         (WebCore::setJSTestObjEnumAttr):
1503         (WebCore::setJSTestObjByteAttr):
1504         (WebCore::setJSTestObjOctetAttr):
1505         (WebCore::setJSTestObjShortAttr):
1506         (WebCore::setJSTestObjClampedShortAttr):
1507         (WebCore::setJSTestObjEnforceRangeShortAttr):
1508         (WebCore::setJSTestObjUnsignedShortAttr):
1509         (WebCore::setJSTestObjLongAttr):
1510         (WebCore::setJSTestObjLongLongAttr):
1511         (WebCore::setJSTestObjUnsignedLongLongAttr):
1512         (WebCore::setJSTestObjStringAttr):
1513         (WebCore::setJSTestObjUsvstringAttr):
1514         (WebCore::setJSTestObjTestObjAttr):
1515         (WebCore::setJSTestObjTestNullableObjAttr):
1516         (WebCore::setJSTestObjLenientTestObjAttr):
1517         (WebCore::setJSTestObjStringAttrTreatingNullAsEmptyString):
1518         (WebCore::setJSTestObjUsvstringAttrTreatingNullAsEmptyString):
1519         (WebCore::setJSTestObjImplementationEnumAttr):
1520         (WebCore::setJSTestObjXMLObjAttr):
1521         (WebCore::setJSTestObjCreate):
1522         (WebCore::setJSTestObjReflectedStringAttr):
1523         (WebCore::setJSTestObjReflectedUSVStringAttr):
1524         (WebCore::setJSTestObjReflectedIntegralAttr):
1525         (WebCore::setJSTestObjReflectedUnsignedIntegralAttr):
1526         (WebCore::setJSTestObjReflectedBooleanAttr):
1527         (WebCore::setJSTestObjReflectedURLAttr):
1528         (WebCore::setJSTestObjReflectedUSVURLAttr):
1529         (WebCore::setJSTestObjReflectedCustomIntegralAttr):
1530         (WebCore::setJSTestObjReflectedCustomBooleanAttr):
1531         (WebCore::setJSTestObjReflectedCustomURLAttr):
1532         (WebCore::setJSTestObjEnabledAtRuntimeAttribute):
1533         (WebCore::setJSTestObjTypedArrayAttr):
1534         (WebCore::setJSTestObjAttrWithGetterException):
1535         (WebCore::setJSTestObjAttrWithGetterExceptionWithMessage):
1536         (WebCore::setJSTestObjAttrWithSetterException):
1537         (WebCore::setJSTestObjAttrWithSetterExceptionWithMessage):
1538         (WebCore::setJSTestObjStringAttrWithGetterException):
1539         (WebCore::setJSTestObjStringAttrWithSetterException):
1540         (WebCore::setJSTestObjCustomAttr):
1541         (WebCore::setJSTestObjOnfoo):
1542         (WebCore::setJSTestObjOnwebkitfoo):
1543         (WebCore::setJSTestObjWithScriptStateAttribute):
1544         (WebCore::setJSTestObjWithCallWithAndSetterCallWithAttribute):
1545         (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
1546         (WebCore::setJSTestObjWithScriptStateAttributeRaises):
1547         (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
1548         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
1549         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
1550         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
1551         (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
1552         (WebCore::setJSTestObjConditionalAttr1):
1553         (WebCore::setJSTestObjConditionalAttr2):
1554         (WebCore::setJSTestObjConditionalAttr3):
1555         (WebCore::setJSTestObjConditionalAttr4Constructor):
1556         (WebCore::setJSTestObjConditionalAttr5Constructor):
1557         (WebCore::setJSTestObjConditionalAttr6Constructor):
1558         (WebCore::setJSTestObjAnyAttribute):
1559         (WebCore::setJSTestObjMutablePoint):
1560         (WebCore::setJSTestObjImmutablePoint):
1561         (WebCore::setJSTestObjStrawberry):
1562         (WebCore::setJSTestObjId):
1563         (WebCore::setJSTestObjReplaceableAttribute):
1564         (WebCore::setJSTestObjNullableLongSettableAttribute):
1565         (WebCore::setJSTestObjNullableStringSettableAttribute):
1566         (WebCore::setJSTestObjNullableUSVStringSettableAttribute):
1567         (WebCore::setJSTestObjNullableStringValue):
1568         (WebCore::setJSTestObjAttributeWithReservedEnumType):
1569         (WebCore::setJSTestObjPutForwardsAttribute):
1570         (WebCore::setJSTestObjPutForwardsNullableAttribute):
1571         (WebCore::setJSTestObjStringifierAttribute):
1572         (WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperation1):
1573         (WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperation2):
1574         (WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperation):
1575         (WebCore::jsTestObjPrototypeFunctionVoidMethod):
1576         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
1577         (WebCore::jsTestObjPrototypeFunctionByteMethod):
1578         (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
1579         (WebCore::jsTestObjPrototypeFunctionOctetMethod):
1580         (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
1581         (WebCore::jsTestObjPrototypeFunctionLongMethod):
1582         (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
1583         (WebCore::jsTestObjPrototypeFunctionObjMethod):
1584         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
1585         (WebCore::jsTestObjInstanceFunctionUnforgeableMethod):
1586         (WebCore::jsTestObjPrototypeFunctionMethodWithArgTreatingNullAsEmptyString):
1587         (WebCore::jsTestObjPrototypeFunctionMethodWithXPathNSResolverParameter):
1588         (WebCore::jsTestObjPrototypeFunctionNullableStringMethod):
1589         (WebCore::jsTestObjConstructorFunctionNullableStringStaticMethod):
1590         (WebCore::jsTestObjPrototypeFunctionNullableStringSpecialMethod):
1591         (WebCore::jsTestObjPrototypeFunctionMethodWithEnumArg):
1592         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalEnumArg):
1593         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalEnumArgAndDefaultValue):
1594         (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
1595         (WebCore::jsTestObjPrototypeFunctionMethodWithUSVStringArg):
1596         (WebCore::jsTestObjPrototypeFunctionMethodWithNullableUSVStringArg):
1597         (WebCore::jsTestObjPrototypeFunctionMethodWithUSVStringArgTreatingNullAsEmptyString):
1598         (WebCore::jsTestObjPrototypeFunctionSerializedValue):
1599         (WebCore::jsTestObjPrototypeFunctionOptionsObject):
1600         (WebCore::jsTestObjPrototypeFunctionMethodWithException):
1601         (WebCore::jsTestObjPrototypeFunctionMethodWithExceptionWithMessage):
1602         (WebCore::jsTestObjPrototypeFunctionCustomMethod):
1603         (WebCore::jsTestObjPrototypeFunctionCustomMethodWithArgs):
1604         (WebCore::jsTestObjPrototypeFunctionPrivateMethod):
1605         (WebCore::jsTestObjPrototypeFunctionPublicAndPrivateMethod):
1606         (WebCore::jsTestObjPrototypeFunctionAddEventListener):
1607         (WebCore::jsTestObjPrototypeFunctionRemoveEventListener):
1608         (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoid):
1609         (WebCore::jsTestObjPrototypeFunctionWithScriptStateObj):
1610         (WebCore::jsTestObjPrototypeFunctionWithScriptStateVoidException):
1611         (WebCore::jsTestObjPrototypeFunctionWithScriptStateObjException):
1612         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContext):
1613         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptState):
1614         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException):
1615         (WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces):
1616         (WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack):
1617         (WebCore::jsTestObjPrototypeFunctionWithDocumentArgument):
1618         (WebCore::jsTestObjPrototypeFunctionWithCallerDocumentArgument):
1619         (WebCore::jsTestObjPrototypeFunctionWithCallerWindowArgument):
1620         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
1621         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArgAndDefaultValue):
1622         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
1623         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
1624         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString):
1625         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUSVString):
1626         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomicString):
1627         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValue):
1628         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringAndDefaultValue):
1629         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNull):
1630         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined):
1631         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsNull):
1632         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsEmptyString):
1633         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUSVStringIsEmptyString):
1634         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsEmptyString):
1635         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalDoubleIsNaN):
1636         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalFloatIsNaN):
1637         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalLongLong):
1638         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalLongLongIsZero):
1639         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLong):
1640         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongIsZero):
1641         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequence):
1642         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalSequenceIsEmpty):
1643         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalBoolean):
1644         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalBooleanIsFalse):
1645         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAny):
1646         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapper):
1647         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperIsNull):
1648         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalXPathNSResolver):
1649         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
1650         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
1651         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
1652         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionArg):
1653         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArg):
1654         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArg):
1655         (WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackAndOptionalArg):
1656         (WebCore::jsTestObjConstructorFunctionStaticMethodWithCallbackArg):
1657         (WebCore::jsTestObjPrototypeFunctionConditionalMethod1):
1658         (WebCore::jsTestObjPrototypeFunctionConditionalMethod2):
1659         (WebCore::jsTestObjPrototypeFunctionConditionalMethod3):
1660         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
1661         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
1662         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
1663         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
1664         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
1665         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
1666         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
1667         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
1668         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9):
1669         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
1670         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11):
1671         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod12):
1672         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
1673         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1):
1674         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2):
1675         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter):
1676         (WebCore::jsTestObjConstructorFunctionClassMethod):
1677         (WebCore::jsTestObjConstructorFunctionClassMethodWithOptional):
1678         (WebCore::jsTestObjConstructorFunctionClassMethod2):
1679         (WebCore::jsTestObjConstructorFunctionOverloadedMethod11):
1680         (WebCore::jsTestObjConstructorFunctionOverloadedMethod12):
1681         (WebCore::jsTestObjConstructorFunctionOverloadedMethod1):
1682         (WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
1683         (WebCore::jsTestObjPrototypeFunctionClassMethodWithEnforceRange):
1684         (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
1685         (WebCore::jsTestObjPrototypeFunctionStringArrayFunction):
1686         (WebCore::jsTestObjPrototypeFunctionDomStringListFunction):
1687         (WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence):
1688         (WebCore::jsTestObjPrototypeFunctionGetElementById):
1689         (WebCore::jsTestObjPrototypeFunctionGetSVGDocument):
1690         (WebCore::jsTestObjPrototypeFunctionConvert1):
1691         (WebCore::jsTestObjPrototypeFunctionConvert2):
1692         (WebCore::jsTestObjPrototypeFunctionConvert3):
1693         (WebCore::jsTestObjPrototypeFunctionConvert4):
1694         (WebCore::jsTestObjPrototypeFunctionMutablePointFunction):
1695         (WebCore::jsTestObjPrototypeFunctionImmutablePointFunction):
1696         (WebCore::jsTestObjPrototypeFunctionOrange):
1697         (WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
1698         (WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod):
1699         (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
1700         (WebCore::jsTestObjPrototypeFunctionAny):
1701         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionPromise):
1702         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise):
1703         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionPromise):
1704         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentPromise):
1705         (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1Promise):
1706         (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Promise):
1707         (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction):
1708         (WebCore::jsTestObjConstructorFunctionTestStaticPromiseFunctionPromise):
1709         (WebCore::jsTestObjConstructorFunctionTestStaticPromiseFunctionWithExceptionPromise):
1710         (WebCore::jsTestObjPrototypeFunctionMethodWithNeedsCustomElementReactionStack):
1711         (WebCore::jsTestObjPrototypeFunctionConditionalOverload1):
1712         (WebCore::jsTestObjPrototypeFunctionConditionalOverload2):
1713         (WebCore::jsTestObjPrototypeFunctionConditionalOverload):
1714         (WebCore::jsTestObjPrototypeFunctionSingleConditionalOverload1):
1715         (WebCore::jsTestObjPrototypeFunctionSingleConditionalOverload2):
1716         (WebCore::jsTestObjPrototypeFunctionSingleConditionalOverload):
1717         (WebCore::jsTestObjPrototypeFunctionAttachShadowRoot):
1718         (WebCore::jsTestObjPrototypeFunctionToString):
1719         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1720         (WebCore::constructJSTestOverloadedConstructors1):
1721         (WebCore::constructJSTestOverloadedConstructors2):
1722         (WebCore::constructJSTestOverloadedConstructors3):
1723         (WebCore::constructJSTestOverloadedConstructors4):
1724         (WebCore::constructJSTestOverloadedConstructors5):
1725         (WebCore::JSTestOverloadedConstructorsConstructor::construct):
1726         (WebCore::jsTestOverloadedConstructorsConstructor):
1727         (WebCore::setJSTestOverloadedConstructorsConstructor):
1728         * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
1729         (WebCore::constructJSTestOverloadedConstructorsWithSequence1):
1730         (WebCore::constructJSTestOverloadedConstructorsWithSequence2):
1731         (WebCore::JSTestOverloadedConstructorsWithSequenceConstructor::construct):
1732         (WebCore::jsTestOverloadedConstructorsWithSequenceConstructor):
1733         (WebCore::setJSTestOverloadedConstructorsWithSequenceConstructor):
1734         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
1735         (WebCore::jsTestOverrideBuiltinsConstructor):
1736         (WebCore::setJSTestOverrideBuiltinsConstructor):
1737         (WebCore::jsTestOverrideBuiltinsPrototypeFunctionNamedItem):
1738         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1739         (WebCore::jsTestSerializedScriptValueInterfaceValue):
1740         (WebCore::jsTestSerializedScriptValueInterfaceReadonlyValue):
1741         (WebCore::jsTestSerializedScriptValueInterfaceCachedValue):
1742         (WebCore::jsTestSerializedScriptValueInterfacePorts):
1743         (WebCore::jsTestSerializedScriptValueInterfaceCachedReadonlyValue):
1744         (WebCore::jsTestSerializedScriptValueInterfaceConstructor):
1745         (WebCore::setJSTestSerializedScriptValueInterfaceConstructor):
1746         (WebCore::setJSTestSerializedScriptValueInterfaceValue):
1747         (WebCore::setJSTestSerializedScriptValueInterfaceCachedValue):
1748         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1749         (WebCore::JSTestTypedefsConstructor::construct):
1750         (WebCore::jsTestTypedefsUnsignedLongLongAttr):
1751         (WebCore::jsTestTypedefsImmutableSerializedScriptValue):
1752         (WebCore::jsTestTypedefsConstructorTestSubObj):
1753         (WebCore::jsTestTypedefsAttrWithGetterException):
1754         (WebCore::jsTestTypedefsAttrWithSetterException):
1755         (WebCore::jsTestTypedefsStringAttrWithGetterException):
1756         (WebCore::jsTestTypedefsStringAttrWithSetterException):
1757         (WebCore::jsTestTypedefsConstructor):
1758         (WebCore::setJSTestTypedefsConstructor):
1759         (WebCore::setJSTestTypedefsUnsignedLongLongAttr):
1760         (WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
1761         (WebCore::setJSTestTypedefsAttrWithGetterException):
1762         (WebCore::setJSTestTypedefsAttrWithSetterException):
1763         (WebCore::setJSTestTypedefsStringAttrWithGetterException):
1764         (WebCore::setJSTestTypedefsStringAttrWithSetterException):
1765         (WebCore::jsTestTypedefsPrototypeFunctionFunc):
1766         (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
1767         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
1768         (WebCore::jsTestTypedefsPrototypeFunctionNullableSequenceArg):
1769         (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp):
1770         (WebCore::jsTestTypedefsPrototypeFunctionImmutablePointFunction):
1771         (WebCore::jsTestTypedefsPrototypeFunctionStringSequenceFunction):
1772         (WebCore::jsTestTypedefsPrototypeFunctionStringSequenceFunction2):
1773         (WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude):
1774         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithException):
1775         * bindings/scripts/test/JS/JSattribute.cpp:
1776         (WebCore::jsattributeReadonly):
1777         (WebCore::jsattributeConstructor):
1778         (WebCore::setJSattributeConstructor):
1779         * bindings/scripts/test/JS/JSreadonly.cpp:
1780         (WebCore::jsreadonlyConstructor):
1781         (WebCore::setJSreadonlyConstructor):
1782         * bridge/c/c_instance.cpp:
1783         (JSC::Bindings::CInstance::moveGlobalExceptionToExecState):
1784         (JSC::Bindings::CInstance::invokeMethod):
1785         (JSC::Bindings::CInstance::invokeDefaultMethod):
1786         (JSC::Bindings::CInstance::invokeConstruct):
1787         (JSC::Bindings::CInstance::toJSPrimitive):
1788         * bridge/objc/objc_instance.mm:
1789         (ObjcInstance::moveGlobalExceptionToExecState):
1790         (ObjcInstance::invokeMethod):
1791         * bridge/objc/objc_runtime.mm:
1792         (JSC::Bindings::ObjcField::valueFromInstance):
1793         (JSC::Bindings::ObjcField::setValueToInstance):
1794         (JSC::Bindings::ObjcArray::setValueAt):
1795         (JSC::Bindings::ObjcArray::valueAt):
1796         (JSC::Bindings::callObjCFallbackObject):
1797         * bridge/objc/objc_utility.h:
1798         * bridge/objc/objc_utility.mm:
1799         (JSC::Bindings::throwError):
1800         * bridge/runtime_array.cpp:
1801         (JSC::RuntimeArray::lengthGetter):
1802         (JSC::RuntimeArray::put):
1803         (JSC::RuntimeArray::putByIndex):
1804         * bridge/runtime_method.cpp:
1805         (JSC::RuntimeMethod::lengthGetter):
1806         (JSC::callRuntimeMethod):
1807         * bridge/runtime_object.cpp:
1808         (JSC::Bindings::RuntimeObject::fallbackObjectGetter):
1809         (JSC::Bindings::RuntimeObject::fieldGetter):
1810         (JSC::Bindings::RuntimeObject::methodGetter):
1811         (JSC::Bindings::RuntimeObject::getOwnPropertySlot):
1812         (JSC::Bindings::RuntimeObject::put):
1813         (JSC::Bindings::RuntimeObject::defaultValue):
1814         (JSC::Bindings::RuntimeObject::getOwnPropertyNames):
1815         (JSC::Bindings::RuntimeObject::throwInvalidAccessError):
1816         * bridge/runtime_object.h:
1817
1818 2016-08-30  Brent Fulgham  <bfulgham@apple.com>
1819
1820         Use of uninitialised memory in TransformationMatrx::blend4()
1821         https://bugs.webkit.org/show_bug.cgi?id=134621
1822         <rdar://problem/27337539>
1823
1824         Reviewed by Dean Jackson.
1825
1826         Change is based on the Blink change (patch by <alancutter@chromium.org>):
1827         <https://src.chromium.org/viewvc/blink?revision=177453&view=revision>
1828
1829         TransformationMatrix::blend() was attempting to blend between non-invertable
1830         matricies. This resulted in garbage stack variables being used.
1831         This patch ensures that blend() will fall back to a 50% step interpolation
1832         when one of the sides are not invertable.
1833
1834         Tested by new TransformationMatrix test in TestWebKitAPI.
1835
1836         * platform/graphics/transforms/TransformationMatrix.cpp:
1837         (WebCore::TransformationMatrix::blend2): Properly handle failure in the
1838         decompose method calls.
1839         (WebCore::TransformationMatrix::blend4): Ditto.
1840
1841 2016-08-30  Alex Christensen  <achristensen@webkit.org>
1842
1843         URLParser should handle relative URLs that start with //
1844         https://bugs.webkit.org/show_bug.cgi?id=161364
1845
1846         Reviewed by Darin Adler.
1847
1848         Covered by an API test.
1849
1850         * platform/URLParser.cpp:
1851         (WebCore::URLParser::parse):
1852
1853 2016-08-30  Wenson Hsieh  <wenson_hsieh@apple.com>
1854
1855         Fix a typo introduced in r205184.
1856         https://bugs.webkit.org/show_bug.cgi?id=161380
1857
1858         Reviewed by Tim Horton.
1859
1860         Fixes a typo in an accessibility string: "Exit fullscreen" => "Exit Fullscreen"
1861
1862         * platform/LocalizedStrings.cpp:
1863         (WebCore::exitFullScreenButtonAccessibilityTitle):
1864
1865 2016-08-30  Youenn Fablet  <youenn@apple.com>
1866
1867         [Fetch API] Blob not found URL should result in a network error
1868         https://bugs.webkit.org/show_bug.cgi?id=161381
1869
1870         Reviewed by Sam Weinig.
1871
1872         Covered by rebased and updated tests.
1873
1874         Raising a network error if no blob can be found from the URL.
1875         It is no longer notified by a 404 response.
1876
1877         Updated FileReaderLoader to generate the correct exception.
1878
1879         Made some clean-up in the code, in particular adding an enum class for BlobResourceHandle errors.
1880
1881         * fileapi/FileReaderLoader.cpp:
1882         (WebCore::FileReaderLoader::didFail):
1883         (WebCore::FileReaderLoader::toErrorCode):
1884         (WebCore::FileReaderLoader::httpStatusCodeToErrorCode):
1885         * fileapi/FileReaderLoader.h:
1886         * platform/network/BlobResourceHandle.cpp:
1887         (WebCore::BlobResourceHandle::loadResourceSynchronously):
1888         (WebCore::BlobResourceHandle::doStart):
1889         (WebCore::BlobResourceHandle::didGetSize):
1890         (WebCore::BlobResourceHandle::readSync):
1891         (WebCore::BlobResourceHandle::readFileSync):
1892         (WebCore::BlobResourceHandle::readAsync):
1893         (WebCore::BlobResourceHandle::didOpen):
1894         (WebCore::BlobResourceHandle::didRead):
1895         (WebCore::BlobResourceHandle::failed):
1896         (WebCore::BlobResourceHandle::notifyResponse):
1897         (WebCore::BlobResourceHandle::notifyResponseOnError):
1898         (WebCore::BlobResourceHandle::notifyFail):
1899         * platform/network/BlobResourceHandle.h:
1900
1901 2016-08-30  Youenn Fablet  <youenn@apple.com>
1902
1903         [Fetch API] Body mix-in text() should decode data as UTF-8
1904         https://bugs.webkit.org/show_bug.cgi?id=161372
1905
1906         Reviewed by Sam Weinig.
1907
1908         Test: imported/w3c/web-platform-tests/fetch/api/basic/text-utf8.html
1909
1910         UsingTextResourceDecoder to decode data as UTF-8.
1911         Making sure to prepend BOM if there is none, as specified in https://encoding.spec.whatwg.org/#utf-8-decode.
1912
1913         * Modules/fetch/FetchBodyConsumer.cpp:
1914         (WebCore::shouldPrependBOM):
1915         (WebCore::textFromUTF8):
1916         (WebCore::FetchBodyConsumer::resolveWithData):
1917         (WebCore::FetchBodyConsumer::takeAsText):
1918
1919 2016-08-30  Zalan Bujtas  <zalan@apple.com>
1920
1921         ASSERTION FAILED: opportunitiesInRun <= expansionOpportunityCount in WebCore::computeExpansionForJustifiedText
1922         https://bugs.webkit.org/show_bug.cgi?id=139393
1923         <rdar://problem/27704243>
1924
1925         Reviewed by Myles C. Maxfield.
1926
1927         This patch ensures that we always remove a valid 'after expansion' opportunity (even when the last entry
1928         in the opportunities list is 0).
1929
1930         Test: fast/text/assert-on-expansion-opportunity.html
1931
1932         * rendering/RenderBlockLineLayout.cpp:
1933         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
1934
1935 2016-08-30  Wenson Hsieh  <wenson_hsieh@apple.com>
1936
1937         Exit fullscreen button in fullscreen media playback needs an accessibility string
1938         https://bugs.webkit.org/show_bug.cgi?id=161380
1939
1940         Reviewed by Beth Dakin.
1941
1942         Adds an accessibility string for the exit fullscreen button.
1943
1944         * English.lproj/Localizable.strings:
1945         * platform/LocalizedStrings.cpp:
1946         (WebCore::exitFullScreenButtonAccessibilityTitle):
1947         * platform/LocalizedStrings.h:
1948
1949 2016-08-30  Antti Koivisto  <antti@apple.com>
1950
1951         Remove StylePendingImage
1952         https://bugs.webkit.org/show_bug.cgi?id=161245
1953
1954         Reviewed by Andreas Kling.
1955
1956         Instances of this confusing type are used as placeholders during style resolution.
1957         We can get rid of it and make "pending" a state of StyleImage. This simplies the code and
1958         will allow further improvements.
1959
1960         * WebCore.xcodeproj/project.pbxproj:
1961         * css/CSSCrossfadeValue.cpp:
1962         (WebCore::CSSCrossfadeValue::isPending):
1963         (WebCore::CSSCrossfadeValue::blend):
1964         * css/CSSCrossfadeValue.h:
1965         * css/CSSCursorImageValue.cpp:
1966         (WebCore::CSSCursorImageValue::CSSCursorImageValue):
1967         (WebCore::CSSCursorImageValue::~CSSCursorImageValue):
1968
1969             Save the original URL since the underlying CSSImageValue may change.
1970
1971         (WebCore::CSSCursorImageValue::updateCursorElement):
1972         (WebCore::CSSCursorImageValue::cursorElementRemoved):
1973         (WebCore::CSSCursorImageValue::cursorElementChanged):
1974         (WebCore::CSSCursorImageValue::loadImage):
1975         (WebCore::CSSCursorImageValue::styleImage):
1976         (WebCore::CSSCursorImageValue::isSVGCursor):
1977         (WebCore::CSSCursorImageValue::cachedImageURL):
1978         (WebCore::CSSCursorImageValue::updateCachedImage):
1979         (WebCore::CSSCursorImageValue::detachPendingImage): Deleted.
1980         (WebCore::CSSCursorImageValue::cachedImage): Deleted.
1981         (WebCore::CSSCursorImageValue::cachedOrPendingImage): Deleted.
1982         (WebCore::CSSCursorImageValue::clearCachedImage): Deleted.
1983         * css/CSSCursorImageValue.h:
1984         * css/CSSFilterImageValue.cpp:
1985         (WebCore::CSSFilterImageValue::isPending):
1986         * css/CSSFilterImageValue.h:
1987         * css/CSSImageGeneratorValue.cpp:
1988         (WebCore::CSSImageGeneratorValue::isPending):
1989         (WebCore::CSSImageGeneratorValue::subimageIsPending):
1990         (WebCore::CSSImageGeneratorValue::cachedImageForCSSValue):
1991         * css/CSSImageGeneratorValue.h:
1992         * css/CSSImageSetValue.cpp:
1993         (WebCore::CSSImageSetValue::~CSSImageSetValue):
1994         (WebCore::CSSImageSetValue::loadBestFitImage):
1995         (WebCore::CSSImageSetValue::styleImage):
1996         (WebCore::CSSImageSetValue::traverseSubresources):
1997         (WebCore::CSSImageSetValue::detachPendingImage): Deleted.
1998         (WebCore::CSSImageSetValue::bestFitImage): Deleted.
1999         (WebCore::CSSImageSetValue::cachedOrPendingImageSet): Deleted.
2000         * css/CSSImageSetValue.h:
2001         * css/CSSImageValue.cpp:
2002         (WebCore::CSSImageValue::CSSImageValue):
2003         (WebCore::CSSImageValue::~CSSImageValue):
2004         (WebCore::CSSImageValue::isPending):
2005         (WebCore::CSSImageValue::styleImage):
2006         (WebCore::CSSImageValue::loadImage):
2007         (WebCore::CSSImageValue::traverseSubresources):
2008         (WebCore::CSSImageValue::detachPendingImage): Deleted.
2009         (WebCore::CSSImageValue::cachedOrPendingImage): Deleted.
2010         (WebCore::CSSImageValue::cachedImage): Deleted.
2011         * css/CSSImageValue.h:
2012         (WebCore::CSSImageValue::create):
2013         * css/StyleResolver.cpp:
2014         (WebCore::StyleResolver::cachedOrPendingFromValue):
2015         (WebCore::StyleResolver::generatedOrPendingFromValue):
2016         (WebCore::StyleResolver::setOrPendingFromValue):
2017         (WebCore::StyleResolver::cursorOrPendingFromValue):
2018         * page/PageSerializer.cpp:
2019         (WebCore::PageSerializer::retrieveResourcesForProperties):
2020         * page/animation/CSSPropertyAnimation.cpp:
2021         (WebCore::blendFilter):
2022         (WebCore::crossfadeBlend):
2023         * rendering/RenderImageResourceStyleImage.cpp:
2024         (WebCore::RenderImageResourceStyleImage::image):
2025         * rendering/shapes/ShapeOutsideInfo.cpp:
2026         (WebCore::ShapeOutsideInfo::createShapeForImage):
2027         * rendering/style/StyleCachedImage.cpp:
2028         (WebCore::StyleCachedImage::StyleCachedImage):
2029         (WebCore::StyleCachedImage::~StyleCachedImage):
2030         (WebCore::StyleCachedImage::setCachedImage):
2031         (WebCore::StyleCachedImage::cssValue):
2032         (WebCore::StyleCachedImage::canRender):
2033         (WebCore::StyleCachedImage::isPending):
2034         (WebCore::StyleCachedImage::isLoaded):
2035         (WebCore::StyleCachedImage::errorOccurred):
2036         (WebCore::StyleCachedImage::imageSize):
2037         (WebCore::StyleCachedImage::imageHasRelativeWidth):
2038         (WebCore::StyleCachedImage::imageHasRelativeHeight):
2039         (WebCore::StyleCachedImage::computeIntrinsicDimensions):
2040         (WebCore::StyleCachedImage::usesImageContainerSize):
2041         (WebCore::StyleCachedImage::setContainerSizeForRenderer):
2042         (WebCore::StyleCachedImage::addClient):
2043         (WebCore::StyleCachedImage::removeClient):
2044         (WebCore::StyleCachedImage::image):
2045         (WebCore::StyleCachedImage::knownToBeOpaque):
2046         * rendering/style/StyleCachedImage.h:
2047         * rendering/style/StyleGeneratedImage.cpp:
2048         (WebCore::StyleGeneratedImage::isPending):
2049         * rendering/style/StyleGeneratedImage.h:
2050         * rendering/style/StyleImage.h:
2051         (WebCore::StyleImage::isCachedImage):
2052         (WebCore::StyleImage::StyleImage):
2053         (WebCore::StyleImage::canRender): Deleted.
2054         (WebCore::StyleImage::isPendingImage): Deleted.
2055         * rendering/style/StylePendingImage.h: Removed.
2056         * style/StylePendingResources.cpp:
2057         (WebCore::Style::loadPendingImage):
2058         (WebCore::Style::loadPendingImages):
2059
2060 2016-08-30  Philippe Normand  <pnormand@igalia.com>
2061
2062         [GStreamer] bump required version to 1.2.3
2063         https://bugs.webkit.org/show_bug.cgi?id=159667
2064
2065         Reviewed by Xabier Rodriguez Calvar.
2066
2067         GStreamer 1.0.3 was released almost 4 years ago. GStreamer 1.2.3
2068         being the version shipped in the Ubuntu LTS (14.04) it
2069         feels reasonable to bump our requirement. Other major
2070         distributions like Debian Jessie and Fedora ship GStreamer 1.4.x
2071         already.
2072
2073         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2074         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
2075         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2076         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): Deleted.
2077         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
2078         (webkitVideoSinkProposeAllocation): Deleted.
2079         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2080         (webKitWebSrcQueryWithParent): Deleted.
2081
2082 2016-08-29  Alex Christensen  <achristensen@webkit.org>
2083
2084         Fix Windows build after r205161
2085
2086         * bindings/js/JSPerformanceTimingCustom.cpp:
2087
2088 2016-08-29  Chris Dumez  <cdumez@apple.com>
2089
2090         We should throw a SecurityError when denying setting a cross-origin Location property
2091         https://bugs.webkit.org/show_bug.cgi?id=161368
2092
2093         Reviewed by Ryosuke Niwa.
2094
2095         We should throw a SecurityError when denying setting a cross-origin
2096         Location property:
2097         - https://html.spec.whatwg.org/#location-set
2098         - https://html.spec.whatwg.org/#crossoriginset-(-o,-p,-v,-receiver-)
2099         - https://html.spec.whatwg.org/#location-getownproperty
2100
2101         Firefox and Chrome already throw. We currently ignore and log an error
2102         message.
2103
2104         No new tests, updated existing tests.
2105
2106         * bindings/js/JSLocationCustom.cpp:
2107         (WebCore::JSLocation::putDelegate):
2108
2109 2016-08-29  Brent Fulgham  <bfulgham@apple.com>
2110
2111         Avoid holding GlyphData in MathOperator
2112         https://bugs.webkit.org/show_bug.cgi?id=161256
2113         <rdar://problem/28033400>
2114
2115         Reviewed by Myles C. Maxfield.
2116
2117         Do not cache GlyphData in MathOperator elements, because the fonts referenced in the
2118         GlyphData may be purged during low-memory conditions. Instead, we should store either
2119         the relevant CodePoint, or the fallback Glyph (for the current system font).
2120
2121         Added an initialization function for GlyphAssemblyData, since unions containing structs
2122         do not properly call constructors, resulting in garbage font/glyph content.
2123
2124         No new tests. Changes are covered by existing MathML test suite.
2125
2126         * rendering/mathml/MathOperator.cpp:
2127         (WebCore::MathOperator::GlyphAssemblyData::initialize): Added.
2128         (WebCore::MathOperator::MathOperator): Initialize m_assembly/m_variant.
2129         (WebCore::MathOperator::setSizeVariant): Only store the glyph, not the font.
2130         (WebCore::glyphDataForCodePointOrFallbackGlyph): Added helper function.
2131         (WebCore::MathOperator::setGlyphAssembly): Do not rely on stored GlyphData.
2132         (WebCore::MathOperator::calculateGlyphAssemblyFallback): Remove unneeded argument. Check
2133         if a fallback glyph is being used and remember for later.
2134         (WebCore::MathOperator::calculateStretchyData): Do not rely on stored GlyphData.
2135         (WebCore::MathOperator::fillWithVerticalExtensionGlyph): Ditto.
2136         (WebCore::MathOperator::fillWithHorizontalExtensionGlyph): Ditto.
2137         (WebCore::MathOperator::paintVerticalGlyphAssembly): Ditto.
2138         (WebCore::MathOperator::paintHorizontalGlyphAssembly): Ditto.
2139         (WebCore::MathOperator::paint): Ditto.
2140         * rendering/mathml/MathOperator.h:
2141         (WebCore::MathOperator::GlyphAssemblyData::hasExtension): Added.
2142         (WebCore::MathOperator::GlyphAssemblyData::hasMiddle): Added.
2143         (WebCore::MathOperator::MathOperator): Deleted.
2144
2145 2016-08-29  Dean Jackson  <dino@apple.com>
2146
2147         JSON.stringify returns empty when used with performance.timing.
2148         https://bugs.webkit.org/show_bug.cgi?id=151813
2149         <rdar://problem/28066067>
2150
2151         Reviewed by Sam Weinig.
2152
2153         While we are waiting for our bindings generator to handle
2154         "serializer", add a custom toJSON function that allows
2155         performance.timing to be stringified.
2156
2157         Test: fast/dom/webtiming-performance-timing-stringify.html
2158
2159         * CMakeLists.txt: New file added.
2160         * WebCore.xcodeproj/project.pbxproj: New file added.
2161         * bindings/js/JSPerformanceTimingCustom.cpp: Added. Implements toJSON.
2162         (WebCore::JSPerformanceTiming::toJSON):
2163         * page/PerformanceTiming.idl: Add toJSON().
2164
2165 2016-08-29  Chris Dumez  <cdumez@apple.com>
2166
2167         Regression(r204923): It should be possible to set 'Location.href' cross origin
2168         https://bugs.webkit.org/show_bug.cgi?id=161343
2169         <rdar://problem/28063361>
2170
2171         Reviewed by Ryosuke Niwa.
2172
2173         It should be possible to set 'Location.href' cross origin:
2174         - https://html.spec.whatwg.org/#crossoriginproperties-(-o-)
2175
2176         Firefox and Chrome allow this but we throw a SecurityError.
2177
2178         We already allow setting crossOrigin.window.location which is equivalent.
2179
2180         No new tests, updated existing test.
2181
2182         * bindings/js/JSLocationCustom.cpp:
2183         (WebCore::JSLocation::putDelegate):
2184         Refactor the [Put] delegate so that it does not log a security error
2185         when setting 'href' attribute, given that setting it works as expected.
2186         This fixes a bug in shipping Safari where setting 'href' would work but
2187         log an error message anyway.
2188
2189         * bindings/scripts/CodeGeneratorJS.pm:
2190         (GenerateImplementation):
2191         Add support for [DoNotCheckSecurityOnSetter] IDL extended attribute,
2192         in addition to the already supported [DoNotCheckSecurity] and
2193         [DoNotCheckSecurityOnGetter].
2194
2195         * page/Location.idl:
2196         Use [DoNotCheckSecurityOnSetter] on 'href' attribute as it can be
2197         set cross-origin. This fixes the regression introduced in r204923.
2198
2199 2016-08-29  Chris Dumez  <cdumez@apple.com>
2200
2201         We should throw a SecurityError when denying setting a cross-origin Window property
2202         https://bugs.webkit.org/show_bug.cgi?id=161339
2203
2204         Reviewed by Geoffrey Garen.
2205
2206         We should throw a SecurityError when denying setting a cross-origin Window property:
2207         - https://html.spec.whatwg.org/#crossoriginset-(-o,-p,-v,-receiver-)
2208         - https://html.spec.whatwg.org/#crossorigingetownpropertyhelper-(-o,-p-)
2209
2210         e.g. crossOriginWindow.name = "" should throw.
2211
2212         Firefox and Chrome already throw but WebKit merely ignores the call and logs an
2213         error message.
2214
2215         No new tests, updated existing tests.
2216
2217         * bindings/js/JSDOMWindowCustom.cpp:
2218         (WebCore::JSDOMWindow::put):
2219
2220 2016-08-29  Alex Christensen  <achristensen@webkit.org>
2221
2222         URLParser should parse about:blank
2223         https://bugs.webkit.org/show_bug.cgi?id=161324
2224
2225         Reviewed by Brady Eidson.
2226
2227         Covered by new API tests.
2228
2229         * platform/URLParser.cpp:
2230         (WebCore::URLParser::parse):
2231
2232 2016-08-29  Chris Dumez  <cdumez@apple.com>
2233
2234         document.createEvent("popstateevent") should create a PopStateEvent
2235         https://bugs.webkit.org/show_bug.cgi?id=161321
2236
2237         Reviewed by Darin Adler.
2238
2239         document.createEvent("popstateevent") should create a PopStateEvent as per:
2240         - https://dom.spec.whatwg.org/#dom-document-createevent
2241
2242         Firefox and Chrome match the specification but WebKit throws an exception,
2243         which is risky compatibility-wise.
2244
2245         No new tests, rebaselined existing tests.
2246
2247         * dom/Document.cpp:
2248         (WebCore::Document::createEvent):
2249         * dom/PopStateEvent.cpp:
2250         (WebCore::PopStateEvent::createForBindings):
2251         * dom/PopStateEvent.h:
2252
2253 2016-08-29  Chris Dumez  <cdumez@apple.com>
2254
2255         We should throw a SecurityError when denying access to cross-origin Window properties
2256         https://bugs.webkit.org/show_bug.cgi?id=161316
2257
2258         Reviewed by Darin Adler.
2259
2260         We should throw a SecurityError when denying access to cross-origin Window properties:
2261         - https://html.spec.whatwg.org/#crossorigingetownpropertyhelper-(-o,-p-)
2262         - https://html.spec.whatwg.org/#crossoriginproperties-(-o-)
2263
2264         Firefox and Chrome already throw.
2265
2266         No new tests, updated existing tests.
2267
2268         * bindings/js/JSDOMWindowCustom.cpp:
2269         (WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess):
2270
2271 2016-08-29  Youenn Fablet  <youenn@apple.com>
2272
2273         Image Loader should use FetchOptions::mode according its crossOrigin attribute
2274         https://bugs.webkit.org/show_bug.cgi?id=161309
2275
2276         Reviewed by Darin Adler.
2277
2278         Test: http/tests/security/load-image-after-redirection.html
2279
2280         * loader/ImageLoader.cpp:
2281         (WebCore::ImageLoader::updateFromElement): Using CachedResourceRequest::setAsPotentiallyCrossOrigin to set fetch mode.
2282
2283 2016-08-29  Frederic Wang  <fwang@igalia.com>
2284
2285         Use MathMLPresentationElement for all MathML presentation tags
2286         https://bugs.webkit.org/show_bug.cgi?id=161297
2287
2288         Reviewed by Darin Adler.
2289
2290         Some tabular MathML elements as well as unsupported presentation MathML markup currently
2291         create a generic MathMLElement instance. We make them instead use the
2292         MathMLPresentationElement class since they are presentation MathML elements. This also
2293         allows to make MathMLElement::isPresentationMathML always return false.
2294
2295         No new tests, already covered by existing tests.
2296
2297         * mathml/MathMLElement.cpp:
2298         (WebCore::MathMLElement::isPresentationMathML): Deleted. Moved into the header file.
2299         * mathml/MathMLElement.h:
2300         (WebCore::MathMLElement::isPresentationMathML): Make this always return false now that all
2301         presentation markup are handled by MathMLPresentationElement.
2302         * mathml/MathMLPresentationElement.cpp:
2303         (WebCore::MathMLPresentationElement::createElementRenderer): Make the fallback always call
2304         MathMLElement::createElementRenderer. This preserves the behavior for the new elements
2305         handled here and does not affect the old ones (table is handled above while all the others
2306         are already handled in the derived class).
2307         * mathml/mathtags.in: Use MathMLPresentationElement for all MathML presentation tags.
2308
2309 2016-08-29  Alex Christensen  <achristensen@webkit.org>
2310
2311         API test URLParserTest.ParserFailures failing ASSERT_NOT_REACHED
2312         https://bugs.webkit.org/show_bug.cgi?id=161317
2313
2314         Reviewed by Brady Eidson.
2315
2316         Added an API test.
2317
2318         * platform/URLParser.cpp:
2319         (WebCore::URLParser::parse):
2320         Turns out, this state can be reached.
2321
2322 2016-08-29  Youenn Fablet  <youenn@apple.com>
2323
2324         [Fetch API] Response cloning should structureClone when teeing Response stream
2325         https://bugs.webkit.org/show_bug.cgi?id=161147
2326
2327         Reviewed by Darin Adler.
2328
2329         Covered by updated test.
2330
2331         Implementing structure cloning for ArrayBuffer and ArrayBufferView objects.
2332         Using this structure cloning in ReadableStream to support structureClone in the case of Fetch API.
2333
2334         * CMakeLists.txt: Adding StructureClone.cpp
2335         * Modules/fetch/FetchResponse.js:
2336         (clone): Setting structureClone to true
2337         * Modules/streams/ReadableStreamInternals.js:
2338         (doStructuredClone): Added to clone ArrayBuffer/ArrayBufferView chunks. Throwing exception otherwise.
2339         (teeReadableStreamPullFunction): Using @doStructuredClone
2340         * WebCore.xcodeproj/project.pbxproj: Adding StructureClone.cpp/.h
2341         * bindings/js/JSDOMGlobalObject.cpp:
2342         (WebCore::JSDOMGlobalObject::addBuiltinGlobals): Adding @ArrayBuffer and structuredCloneArrayBuffer and structuredCloneArrayBufferView private properties.
2343         * bindings/js/StructuredClone.cpp: Added.
2344         (WebCore::structuredCloneArrayBuffer): Cloning of ArrayBuffer as per
2345         http://w3c.github.io/html/infrastructure.html#section-structuredclone step 11.
2346        (WebCore::structuredCloneArrayBufferView): Cloning of ArrayBufferView as
2347        perhttp://w3c.github.io/html/infrastructure.html#section-structuredclone, step 12.
2348         * bindings/js/StructuredClone.h: Added.
2349         * bindings/js/WebCoreBuiltinNames.h: 
2350
2351 2016-08-16  Carlos Garcia Campos  <cgarcia@igalia.com>
2352
2353         [GTK] Accelerated compositing does not work in Wayland
2354         https://bugs.webkit.org/show_bug.cgi?id=115803
2355
2356         Reviewed by Michael Catanzaro.
2357
2358         The Wayland implementation in WebKit2 uses a nested display running in the UI process so that GL contexts created
2359         in the web process need to be created in the nested display. We currently have a shared platform display that
2360         should represent the connection to the actual display all applications connect to. This patch refactors the
2361         GLContext API to ensure that GL contexts are always attached to a particular platform display. The create
2362         methods receive an optional PlatformDisplay that will be used as the display of all GL operations of the created
2363         GL context. The sharing GL context should also share the same display, it can't be global to the process, but to
2364         the display, so it's now created on demand by the PlatformDisplay. In addition to the global shared display,
2365         it's now possible to set a shared display for compositing that can be used when creating GL contexts. This makes
2366         it possible to use a different display for compositing, connected to the nested display in wayland, even in non
2367         wayland environments.
2368         The patch also adds support for surfaceless EGL contexts that can be used for offscreen contexts. It also adds
2369         support for offscreen wayland contexts, as a fallback in wayland in case surfaceless is not supported.
2370         Some wayland code that is specific to the WebKit2 implementation has been moved to the WebKit2 layer.
2371
2372         * PlatformGTK.cmake:
2373         * platform/graphics/GLContext.cpp:
2374         (WebCore::initializeOpenGLShimsIfNeeded):
2375         (WebCore::GLContext::createContextForWindow):
2376         (WebCore::GLContext::createOffscreenContext):
2377         (WebCore::GLContext::createSharingContext):
2378         (WebCore::GLContext::GLContext):
2379         (WebCore::GLContext::~GLContext):
2380         (WebCore::GLContext::current):
2381         (WebCore::activeContextList): Deleted.
2382         * platform/graphics/GLContext.h:
2383         (WebCore::GLContext::display):
2384         * platform/graphics/GraphicsContext3DPrivate.cpp:
2385         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
2386         (WebCore::GraphicsContext3DPrivate::platformContext):
2387         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
2388         * platform/graphics/PlatformDisplay.cpp:
2389         (WebCore::PlatformDisplay::createPlatformDisplay): Always use the default wayland display created by GTK+ for
2390         the global shared display.
2391         (WebCore::PlatformDisplay::sharedDisplayForCompositing):
2392         (WebCore::PlatformDisplay::setSharedDisplayForCompositing):
2393         (WebCore::PlatformDisplay::sharingGLContext):
2394         (WebCore::eglDisplays): Helper HashSet to keep track of all PlatformDisplays with an EGL display intialized to
2395         properly termimate them at exit.
2396         (WebCore::PlatformDisplay::initializeEGLDisplay): Remove eglBindAPI() from display initialization, since it's
2397         not a display initialization and it's thread specific, so it needs to be called on every thread where EGL is used.
2398         (WebCore::PlatformDisplay::terminateEGLDisplay):
2399         (WebCore::PlatformDisplay::eglDisplay): Deleted.
2400         * platform/graphics/PlatformDisplay.h:
2401         * platform/graphics/cairo/ImageBufferCairo.cpp:
2402         (WebCore::ImageBufferData::~ImageBufferData):
2403         (WebCore::ImageBufferData::createCompositorBuffer):
2404         (WebCore::ImageBufferData::swapBuffersIfNeeded):
2405         (WebCore::ImageBufferData::createCairoGLSurface):
2406         (WebCore::ImageBufferData::paintToTextureMapper):
2407         (WebCore::ImageBuffer::copyToPlatformTexture):
2408         * platform/graphics/egl/GLContextEGL.cpp:
2409         (WebCore::GLContextEGL::getEGLConfig):
2410         (WebCore::GLContextEGL::createWindowContext):
2411         (WebCore::GLContextEGL::createPbufferContext):
2412         (WebCore::GLContextEGL::createSurfacelessContext):
2413         (WebCore::GLContextEGL::createPixmapContext):
2414         (WebCore::GLContextEGL::createWaylandContext):
2415         (WebCore::GLContextEGL::createContext):
2416         (WebCore::GLContextEGL::createSharingContext):
2417         (WebCore::GLContextEGL::GLContextEGL):
2418         (WebCore::GLContextEGL::~GLContextEGL):
2419         (WebCore::GLContextEGL::defaultFrameBufferSize):
2420         (WebCore::GLContextEGL::makeContextCurrent):
2421         (WebCore::GLContextEGL::swapBuffers):
2422         (WebCore::GLContextEGL::cairoDevice):
2423         * platform/graphics/egl/GLContextEGL.h:
2424         * platform/graphics/glx/GLContextGLX.cpp:
2425         (WebCore::GLContextGLX::createWindowContext):
2426         (WebCore::GLContextGLX::createPbufferContext):
2427         (WebCore::GLContextGLX::createPixmapContext):
2428         (WebCore::GLContextGLX::createContext):
2429         (WebCore::GLContextGLX::createSharingContext):
2430         (WebCore::GLContextGLX::GLContextGLX):
2431         (WebCore::GLContextGLX::~GLContextGLX):
2432         (WebCore::GLContextGLX::defaultFrameBufferSize):
2433         (WebCore::GLContextGLX::makeContextCurrent):
2434         (WebCore::GLContextGLX::swapBuffers):
2435         (WebCore::GLContextGLX::cairoDevice):
2436         (WebCore::GLContextGLX::waitNative): Deleted.
2437         * platform/graphics/glx/GLContextGLX.h:
2438         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2439         (WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext):
2440         (WebCore::MediaPlayerPrivateGStreamerBase::nativeImageForCurrentTime):
2441         * platform/graphics/wayland/PlatformDisplayWayland.cpp:
2442         (WebCore::PlatformDisplayWayland::PlatformDisplayWayland):
2443         (WebCore::PlatformDisplayWayland::~PlatformDisplayWayland):
2444         (WebCore::PlatformDisplayWayland::initialize):
2445         (WebCore::PlatformDisplayWayland::registryGlobal):
2446         (WebCore::PlatformDisplayWayland::createSurface):
2447         * platform/graphics/wayland/PlatformDisplayWayland.h:
2448         (WebCore::PlatformDisplayWayland::native): Deleted.
2449         * platform/graphics/wayland/WaylandEventSource.cpp: Removed.
2450         * platform/graphics/wayland/WaylandSurface.cpp: Removed.
2451         * platform/graphics/wayland/WebKitGtkWaylandClientProtocol.xml: Removed.
2452         * platform/graphics/wayland/WlUniquePtr.h: Make it possible to use std::unique_ptr with Wayland objects.
2453         (WebCore::WlPtrDeleter::operator()):
2454
2455 2016-08-29  Youenn Fablet  <youenn@apple.com>
2456
2457         [Fetch API] Add support for BufferSource bodies
2458         https://bugs.webkit.org/show_bug.cgi?id=161087
2459
2460         Reviewed by Darin Adler.
2461
2462         Covered by updated tests.
2463
2464         Added support for ArrayBuffer, ArrayBufferView and FormData upload.
2465         Added support for consuming ArrayBufferView.
2466
2467         To support FormData upload, FetchBOdy is now storing a FormData computed from the DOMFormData passed to the constructor.
2468         This allows setting the content-type for FormData correctly with the boundary parameter.
2469
2470         * Modules/fetch/FetchBody.cpp:
2471         (WebCore::FetchBody::bodyForInternalRequest): Adding support for FormData upload.
2472         (WebCore::FetchBody::FetchBody): Adding ArrayBuffer and ArrayBufferView constructors.
2473         (WebCore::FetchBody::extract): Extracting in case of BufferSource (i.e. ArrayBuffer or ArrayBufferView) and FormData.
2474         (WebCore::FetchBody::consume): Adding support to consume ArrayBufferView.
2475         (WebCore::FetchBody::consumeAsStream): Adding support to consume ArrayBufferView as a stream.
2476         Cloned the ArrayBuffer before enqueuing it in  the stream.
2477         (WebCore::FetchBody::consumeArrayBuffer): Cleaning m_data after being consumed.
2478         (WebCore::FetchBody::consumeArrayBufferView): Adding support to consume ArrayBufferView.
2479         (WebCore::FetchBody::consumeText): Cleaning m_text after being consumed.
2480         (WebCore::FetchBody::consumeBlob): Ditto for m_blob.
2481         (WebCore::FetchBody::bodyForInternalRequest): Adding support for ArrayBuffer and ArrayBufferView upload.
2482         * Modules/fetch/FetchBody.h:
2483         * Modules/fetch/FetchRequest.cpp:
2484         (WebCore::FetchRequest::internalRequest): Passing ScriptExecutionContext as this is needed for FormData upload.
2485         (WebCore::FetchRequest::setBody): Ditto.
2486         * Modules/fetch/FetchResponse.cpp:
2487         (WebCore::FetchResponse::initializeWith): Ditto.
2488         (WebCore::FetchResponse::fetch): Removing FormData upload rejection check.
2489
2490 2016-08-26  Sergio Villar Senin  <svillar@igalia.com>
2491
2492         [css-grid] Do not recursively call layout during auto repeat computation
2493         https://bugs.webkit.org/show_bug.cgi?id=161234
2494
2495         Reviewed by Manuel Rego Casasnovas.
2496
2497         The computation of auto repeat tracks was incorrectly recursively triggering
2498         a layout in order to compute the available size. That was happening whenever
2499         the width was indefinite. In such cases we should treat the width always as
2500         indefinite without having to run any extra code. During the layout phase
2501         we'll have the actual width available.
2502
2503         This fix also unveiled a few errors in one of the imported mozilla tests which were
2504         incorrectly passing when they should not.
2505
2506         Test: fast/css-grid-layout/grid-indefinite-size-auto-repeat-crash.html
2507
2508         * rendering/RenderGrid.cpp:
2509         (WebCore::RenderGrid::layoutBlock):
2510         (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
2511         (WebCore::RenderGrid::computeAutoRepeatTracksCount):
2512         (WebCore::RenderGrid::placeItemsOnGrid):
2513         * rendering/RenderGrid.h:
2514
2515 2016-08-29  Youenn Fablet  <youenn@apple.com>
2516
2517         data:// URL behavior of XHR does not match spec
2518         https://bugs.webkit.org/show_bug.cgi?id=109199
2519
2520         Reviewed by Darin Adler.
2521
2522         Covered by rebased tests.
2523
2524         Making data URLs same origin for XHR and fetch API.
2525         This is the behavior when https://fetch.spec.whatwg.org/#same-origin-data-url-flag is set.
2526         As per the specs, this flag is set for fetch API and XMLHttpRequest.
2527         Introducing this flag in ThreadableLoader options, default value being false.
2528         Setting flag for XHR and fetch API.
2529
2530         Fixing accuracy of data URL loading by setting status code and content-type HTTP header as per fetch specification.
2531
2532         As can be seen from the rebased tests, no constraint is put on the method used as the fetch specification is about to allow all methods for data URLs.
2533
2534         * Modules/fetch/FetchLoader.cpp:
2535         (WebCore::FetchLoader::start): Setting same-origin-data-url-flag to true.
2536         * loader/DocumentThreadableLoader.cpp:
2537         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader): Making data URLs same origin if flag is set.
2538         * loader/ResourceLoader.cpp:
2539         (WebCore::ResourceLoader::loadDataURL): Setting status code and content-type header according specification.
2540         * loader/ThreadableLoader.cpp:
2541         (WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions): Adding same-origin-data-url-flag option.
2542         * loader/ThreadableLoader.h:
2543         * loader/WorkerThreadableLoader.cpp:
2544         (WebCore::LoaderTaskOptions::LoaderTaskOptions): Ensuring flag is preserved when going to the main thread.
2545         * platform/network/DataURLDecoder.cpp:
2546         (WebCore::DataURLDecoder::parseMediaType): Setting mediaType value, used by ResourceLoader to set the content-type header.
2547         * platform/network/DataURLDecoder.h:
2548         * xml/XMLHttpRequest.cpp:
2549         (WebCore::XMLHttpRequest::createRequest): Setting same-origin-data-url-flag to true.
2550
2551 2016-08-25  Frederic Wang  <fwang@igalia.com>
2552
2553         Add support for non-BMP operators U+1EEF0 and U+1EEF1
2554         https://bugs.webkit.org/show_bug.cgi?id=153984
2555
2556         Reviewed by Darin Adler.
2557
2558         Tests: mathml/presentation/non-bmp-operators-spacing.html
2559                mathml/presentation/non-bmp-operators-stretching.html
2560
2561         * mathml/MathMLOperatorDictionary.cpp: We move the definition of operator dictionary Entry
2562         here as it is not used by external code.
2563         We now also accept non-BMP operators and add entries for U+1EEF0 and U+1EEF1.
2564         (WebCore::extractProperty): Helper function to convert from Entry structure to a Property
2565         structure.
2566         (WebCore::MathMLOperatorDictionary::search): This function now accepts a non-BMP parameter
2567         and returns a Property structure.
2568         (WebCore::MathMLOperatorDictionary::isVertical): This function now accepts a non-BMP parameter.
2569         * mathml/MathMLOperatorDictionary.h: Replace the Entry structure with a Property structure
2570         which was used by MathMLOperatorElement. Update the signatures of search and isVertical.
2571         * mathml/MathMLOperatorElement.cpp:
2572         (WebCore::MathMLOperatorElement::parseOperatorChar): Remove the special case that excludes
2573         non-BMP operators.
2574         (WebCore::MathMLOperatorElement::computeDictionaryProperty): Rename the property structure
2575         to use the one moved into MathMLOperatorDictionary.h. We no longer need to convert the result
2576         of the search call.
2577         (WebCore::MathMLOperatorElement::dictionaryProperty): Rename the property structure.
2578         * mathml/MathMLOperatorElement.h: Make OperatorChar accept non-BMP operators.
2579         MathMLOperatorElement::DictionaryProperty is now moved into MathMLOperatorDictionary
2580         and renamed Property.
2581         * rendering/mathml/MathOperator.cpp: Accept non-BMP operators.
2582         * rendering/mathml/MathOperator.h: Ditto.
2583         * rendering/mathml/RenderMathMLFencedOperator.cpp:
2584         (WebCore::RenderMathMLFencedOperator::updateOperatorContent):  Adjust code to use the new
2585         return type of MathMLOperatorDictionary::search.
2586         * rendering/mathml/RenderMathMLFencedOperator.h: Accept non-BMP operators.
2587         * rendering/mathml/RenderMathMLOperator.cpp: Ditto.
2588         * rendering/mathml/RenderMathMLOperator.h: Ditto.
2589
2590 2016-08-28  Youenn Fablet  <youenn@apple.com>
2591
2592         [Fetch API] Ensure response cloning works when data is loading
2593         https://bugs.webkit.org/show_bug.cgi?id=161137
2594
2595         Reviewed by Darin Adler.
2596
2597         Test: http/tests/fetch/clone-after-load-is-finished.html and updated wpt test
2598
2599         FetchBody is only able to clone data when requested by Response in case the data is already there.
2600         If data is loaded from FetchLoader, each received chunk should be given to each cloned response.
2601         The simplest approach is to create a ReadableStream body for the cloned Response and use it for the teeing.
2602
2603         * Modules/fetch/FetchResponse.cpp:
2604         (WebCore::FetchResponse::BodyLoader::didSucceed): Postpone stream closing if there is still data to enqueue in the FetchBody.
2605         * Modules/fetch/FetchResponse.h:
2606         * Modules/fetch/FetchResponse.idl:
2607         * Modules/fetch/FetchResponse.js:
2608         (clone): If response is being loaded, create a ReadableStream body so that loaded data cloning is handled by ReadableStream tee.
2609         * Modules/streams/ReadableStreamInternals.js: Restrict firstReadCallback to the case of a readable ReadableStream.
2610         If stream is errored or closed, FetchResponse will already have disposed of its source.
2611         (readFromReadableStreamDefaultReader):
2612         * bindings/js/WebCoreBuiltinNames.h:
2613
2614 2016-08-28  Andreas Kling  <akling@apple.com>
2615
2616         document.title setter can't throw.
2617         <https://webkit.org/b/161302>
2618
2619         Reviewed by Antti Koivisto.
2620
2621         Remove [SetterRaisesException] from document.title and replace
2622         ExceptionCode propagation with ASSERT_NO_EXCEPTION.
2623
2624         Setting the .textContent of a SVGTitleElement or HTMLTitleElement
2625         will never fail, so there's no exception to propagate.
2626
2627         * dom/Document.cpp:
2628         (WebCore::Document::setTitle):
2629         * dom/Document.h:
2630         * dom/Document.idl:
2631         * html/ImageDocument.cpp:
2632         (WebCore::ImageDocument::finishedParsing):
2633
2634 2016-08-23  Frederic Wang  <fwang@igalia.com>
2635
2636         MathML renderers should use struct to pass long list of LayoutUnits
2637         https://bugs.webkit.org/show_bug.cgi?id=161084
2638
2639         Reviewed by Darin Adler.
2640
2641         RenderMathMLFraction, RenderMathMLMenclose, RenderMathMLScripts and RenderMathMLUnderOver
2642         have helper functions to retrieve a list of LayoutUnit parameters. We gather them in a single
2643         struct instead of using a long list of LayoutUnit& parameters.
2644
2645         No new tests, behavior is unchanged.
2646
2647         * rendering/mathml/RenderMathMLFraction.cpp:
2648         (WebCore::RenderMathMLFraction::getFractionParameters):
2649         (WebCore::RenderMathMLFraction::getStackParameters):
2650         (WebCore::RenderMathMLFraction::layoutBlock):
2651         * rendering/mathml/RenderMathMLFraction.h:
2652         * rendering/mathml/RenderMathMLMenclose.cpp:
2653         (WebCore::RenderMathMLMenclose::getSpaceAroundContent):
2654         (WebCore::RenderMathMLMenclose::computePreferredLogicalWidths):
2655         (WebCore::RenderMathMLMenclose::layoutBlock):
2656         * rendering/mathml/RenderMathMLMenclose.h:
2657         * rendering/mathml/RenderMathMLScripts.cpp:
2658         (WebCore::RenderMathMLScripts::getScriptMetricsAndLayoutIfNeeded):
2659         (WebCore::RenderMathMLScripts::layoutBlock):
2660         * rendering/mathml/RenderMathMLScripts.h:
2661         * rendering/mathml/RenderMathMLUnderOver.cpp:
2662         (WebCore::RenderMathMLUnderOver::getVerticalParameters):
2663         (WebCore::RenderMathMLUnderOver::layoutBlock):
2664         * rendering/mathml/RenderMathMLUnderOver.h:
2665
2666 2016-08-28  Andreas Kling  <akling@apple.com>
2667
2668         Clean up some .text attribute setters that don't throw.
2669         <https://webkit.org/b/161292>
2670
2671         Reviewed by Darin Adler.
2672
2673         Remove [SetterRaisesException] for three .text attributes
2674         and replace them with ASSERT_NO_EXCEPTION.
2675
2676         These setters behave like .textContent, which can't throw as
2677         it's always okay to replace an Element's children with a Text.
2678
2679         * html/HTMLAnchorElement.cpp:
2680         (WebCore::HTMLAnchorElement::setText):
2681         * html/HTMLAnchorElement.h:
2682         * html/HTMLAnchorElement.idl:
2683         * html/HTMLOptionElement.cpp:
2684         (WebCore::HTMLOptionElement::setText):
2685         * html/HTMLOptionElement.h:
2686         * html/HTMLOptionElement.idl:
2687         * html/HTMLTitleElement.cpp:
2688         (WebCore::HTMLTitleElement::setText):
2689         * html/HTMLTitleElement.h:
2690         * html/HTMLTitleElement.idl:
2691
2692 2016-08-24  Dave Hyatt  <hyatt@apple.com>
2693
2694         Initial landing of CSS Parser Tokenization (and files to support that). Not used yet.
2695         https://bugs.webkit.org/show_bug.cgi?id=161174
2696
2697         This code is imported from Blink and is their CSS parser (modified to work in WebKit).
2698         It is from commit e4bb90df7f2ed8a63975b5ed27a1b488cb9b146f, Mon Aug 22 2016.
2699
2700         Reviewed by Simon Fraser.
2701
2702         * CMakeLists.txt:
2703         * WebCore.xcodeproj/project.pbxproj:
2704         * css/CSSMarkup.cpp: Added.
2705         (WebCore::isCSSTokenizerIdentifier):
2706         (WebCore::serializeCharacter):
2707         (WebCore::serializeCharacterAsCodePoint):
2708         (WebCore::serializeIdentifier):
2709         (WebCore::serializeString):
2710         (WebCore::serializeURI):
2711         (WebCore::serializeFontFamily):
2712         * css/CSSMarkup.h: Added.
2713         * css/CSSOMUtils.cpp: Removed.
2714         * css/CSSOMUtils.h: Removed.
2715         * css/CSSSelector.cpp:
2716         * css/parser/CSSParserFastPaths.cpp: Added.
2717         * css/parser/CSSParserFastPaths.h: Added.
2718         * css/parser/CSSParserIdioms.h: Added.
2719         (WebCore::isCSSSpace):
2720         (WebCore::isNameStartCodePoint):
2721         (WebCore::isNameCodePoint):
2722         * css/parser/CSSParserObserver.h: Added.
2723         (WebCore::CSSParserObserver::~CSSParserObserver):
2724         * css/parser/CSSParserObserverWrapper.cpp: Added.
2725         (WebCore::CSSParserObserverWrapper::startOffset):
2726         (WebCore::CSSParserObserverWrapper::previousTokenStartOffset):
2727         (WebCore::CSSParserObserverWrapper::endOffset):
2728         (WebCore::CSSParserObserverWrapper::skipCommentsBefore):
2729         (WebCore::CSSParserObserverWrapper::yieldCommentsBefore):
2730         * css/parser/CSSParserObserverWrapper.h: Added.
2731         (WebCore::CSSParserObserverWrapper::CSSParserObserverWrapper):
2732         (WebCore::CSSParserObserverWrapper::observer):
2733         (WebCore::CSSParserObserverWrapper::addComment):
2734         (WebCore::CSSParserObserverWrapper::addToken):
2735         (WebCore::CSSParserObserverWrapper::finalizeConstruction):
2736         * css/parser/CSSParserToken.cpp: Added.
2737         (WebCore::cssPrimitiveValueUnitFromTrie):
2738         (WebCore::stringToUnitType):
2739         (WebCore::CSSParserToken::CSSParserToken):
2740         (WebCore::CSSParserToken::convertToDimensionWithUnit):
2741         (WebCore::CSSParserToken::convertToPercentage):
2742         (WebCore::CSSParserToken::delimiter):
2743         (WebCore::CSSParserToken::numericSign):
2744         (WebCore::CSSParserToken::numericValueType):
2745         (WebCore::CSSParserToken::numericValue):
2746         (WebCore::CSSParserToken::parseAsUnresolvedCSSPropertyID):
2747         (WebCore::CSSParserToken::id):
2748         (WebCore::CSSParserToken::functionId):
2749         (WebCore::CSSParserToken::hasStringBacking):
2750         (WebCore::CSSParserToken::copyWithUpdatedString):
2751         (WebCore::CSSParserToken::valueDataCharRawEqual):
2752         (WebCore::CSSParserToken::operator==):
2753         (WebCore::CSSParserToken::serialize):
2754         * css/parser/CSSParserToken.h: Added.
2755         (WebCore::CSSParserToken::operator!=):
2756         (WebCore::CSSParserToken::type):
2757         (WebCore::CSSParserToken::value):
2758         (WebCore::CSSParserToken::getHashTokenType):
2759         (WebCore::CSSParserToken::getBlockType):
2760         (WebCore::CSSParserToken::unitType):
2761         (WebCore::CSSParserToken::unicodeRangeStart):
2762         (WebCore::CSSParserToken::unicodeRangeEnd):
2763         (WebCore::CSSParserToken::initValueFromStringView):
2764         * css/parser/CSSParserTokenRange.cpp: Added.
2765         (WebCore::CSSParserTokenRange::eofToken):
2766         (WebCore::CSSParserTokenRange::makeSubRange):
2767         (WebCore::CSSParserTokenRange::consumeBlock):
2768         (WebCore::CSSParserTokenRange::consumeComponentValue):
2769         (WebCore::CSSParserTokenRange::serialize):
2770         * css/parser/CSSParserTokenRange.h: Added.
2771         (WebCore::CSSParserTokenRange::CSSParserTokenRange):
2772         (WebCore::CSSParserTokenRange::atEnd):
2773         (WebCore::CSSParserTokenRange::end):
2774         (WebCore::CSSParserTokenRange::peek):
2775         (WebCore::CSSParserTokenRange::consume):
2776         (WebCore::CSSParserTokenRange::consumeIncludingWhitespace):
2777         (WebCore::CSSParserTokenRange::consumeWhitespace):
2778         (WebCore::CSSParserTokenRange::begin):
2779         * css/parser/CSSPropertyParser.cpp: Added.
2780         (WebCore::hasPrefix):
2781         (WebCore::cssPropertyID):
2782         (WebCore::cssPropertyNameIOSAliasing):
2783         (WebCore::isAppleLegacyCssValueKeyword):
2784         (WebCore::cssValueKeywordID):
2785         (WebCore::unresolvedCSSPropertyID):
2786         * css/parser/CSSPropertyParser.h: Added.
2787         (WebCore::CSSPropertyParser::inQuirksMode):
2788         * css/parser/CSSPropertyParserHelpers.cpp: Added.
2789         * css/parser/CSSPropertyParserHelpers.h: Added.
2790         (WebCore::CSSPropertyParserHelpers::identMatches):
2791         (WebCore::CSSPropertyParserHelpers::consumeIdent):
2792         (WebCore::CSSPropertyParserHelpers::isCSSWideKeyword):
2793         * css/parser/CSSTokenizer.cpp: Added.
2794         (WebCore::CSSTokenizer::Scope::Scope):
2795         (WebCore::CSSTokenizer::Scope::tokenRange):
2796         (WebCore::CSSTokenizer::Scope::tokenCount):
2797         (WebCore::isNewLine):
2798         (WebCore::twoCharsAreValidEscape):
2799         (WebCore::CSSTokenizer::CSSTokenizer):
2800         (WebCore::CSSTokenizer::reconsume):
2801         (WebCore::CSSTokenizer::consume):
2802         (WebCore::CSSTokenizer::whiteSpace):
2803         (WebCore::CSSTokenizer::blockStart):
2804         (WebCore::CSSTokenizer::blockEnd):
2805         (WebCore::CSSTokenizer::leftParenthesis):
2806         (WebCore::CSSTokenizer::rightParenthesis):
2807         (WebCore::CSSTokenizer::leftBracket):
2808         (WebCore::CSSTokenizer::rightBracket):
2809         (WebCore::CSSTokenizer::leftBrace):
2810         (WebCore::CSSTokenizer::rightBrace):
2811         (WebCore::CSSTokenizer::plusOrFullStop):
2812         (WebCore::CSSTokenizer::asterisk):
2813         (WebCore::CSSTokenizer::lessThan):
2814         (WebCore::CSSTokenizer::comma):
2815         (WebCore::CSSTokenizer::hyphenMinus):
2816         (WebCore::CSSTokenizer::solidus):
2817         (WebCore::CSSTokenizer::colon):
2818         (WebCore::CSSTokenizer::semiColon):
2819         (WebCore::CSSTokenizer::hash):
2820         (WebCore::CSSTokenizer::circumflexAccent):
2821         (WebCore::CSSTokenizer::dollarSign):
2822         (WebCore::CSSTokenizer::verticalLine):
2823         (WebCore::CSSTokenizer::tilde):
2824         (WebCore::CSSTokenizer::commercialAt):
2825         (WebCore::CSSTokenizer::reverseSolidus):
2826         (WebCore::CSSTokenizer::asciiDigit):
2827         (WebCore::CSSTokenizer::letterU):
2828         (WebCore::CSSTokenizer::nameStart):
2829         (WebCore::CSSTokenizer::stringStart):
2830         (WebCore::CSSTokenizer::endOfFile):
2831         (WebCore::CSSTokenizer::nextToken):
2832         (WebCore::CSSTokenizer::consumeNumber):
2833         (WebCore::CSSTokenizer::consumeNumericToken):
2834         (WebCore::CSSTokenizer::consumeIdentLikeToken):
2835         (WebCore::CSSTokenizer::consumeStringTokenUntil):
2836         (WebCore::CSSTokenizer::consumeUnicodeRange):
2837         (WebCore::isNonPrintableCodePoint):
2838         (WebCore::CSSTokenizer::consumeUrlToken):
2839         (WebCore::CSSTokenizer::consumeBadUrlRemnants):
2840         (WebCore::CSSTokenizer::consumeSingleWhitespaceIfNext):
2841         (WebCore::CSSTokenizer::consumeUntilCommentEndFound):
2842         (WebCore::CSSTokenizer::consumeIfNext):
2843         (WebCore::CSSTokenizer::consumeName):
2844         (WebCore::CSSTokenizer::consumeEscape):
2845         (WebCore::CSSTokenizer::nextTwoCharsAreValidEscape):
2846         (WebCore::CSSTokenizer::nextCharsAreNumber):
2847         (WebCore::CSSTokenizer::nextCharsAreIdentifier):
2848         (WebCore::CSSTokenizer::registerString):
2849         * css/parser/CSSTokenizer.h: Added.
2850         (WebCore::CSSTokenizer::Scope::storeString):
2851         * css/parser/CSSTokenizerInputStream.cpp: Added.
2852         (WebCore::CSSTokenizerInputStream::CSSTokenizerInputStream):
2853         (WebCore::CSSTokenizerInputStream::advanceUntilNonWhitespace):
2854         (WebCore::CSSTokenizerInputStream::getDouble):
2855         * css/parser/CSSTokenizerInputStream.h: Added.
2856         (WebCore::CSSTokenizerInputStream::nextInputChar):
2857         (WebCore::CSSTokenizerInputStream::peekWithoutReplacement):
2858         (WebCore::CSSTokenizerInputStream::advance):
2859         (WebCore::CSSTokenizerInputStream::pushBack):
2860         (WebCore::CSSTokenizerInputStream::skipWhilePredicate):
2861         (WebCore::CSSTokenizerInputStream::length):
2862         (WebCore::CSSTokenizerInputStream::offset):
2863         (WebCore::CSSTokenizerInputStream::rangeAt):
2864         * platform/Length.h:
2865
2866 2016-08-28  Javier Fernandez  <jfernandez@igalia.com>
2867
2868         Should never be reached failure in WebCore::RenderFlexibleBox::alignChildren
2869         https://bugs.webkit.org/show_bug.cgi?id=151591
2870         <rdar://problem/27711829>
2871
2872         Reviewed by Darin Adler.
2873
2874         The align-self and align-items CSS properties were originally defined in the
2875         Flexbible Box specification. The new CSS Box Alignment specification tries
2876         to generalize them so they can be used by other layout models, as it's  the
2877         case of the GridLayout spec.
2878
2879         Since we have implemented the Grid Layout spec behind a runtime flag, we should
2880         do the same with the new syntax of these properties.
2881
2882         Test: css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html
2883
2884         * css/CSSParser.cpp:
2885         (WebCore::isValidKeywordPropertyAndValue):
2886         (WebCore::isKeywordPropertyID):
2887         (WebCore::CSSParser::parseValue):
2888         * rendering/RenderFlexibleBox.cpp:
2889         (WebCore::RenderFlexibleBox::alignChildren):
2890
2891 2016-08-28  Frederic Wang  <fwang@igalia.com>
2892
2893         Improve parsing of the menclose notation attribute value
2894         https://bugs.webkit.org/show_bug.cgi?id=161045
2895
2896         Reviewed by Darin Adler.
2897
2898         We improve the way the list of menclose notations is parsed to avoid allocating a vector and
2899         accept any whitespace as separators.
2900
2901         New test cases in mathml/presentation/menclose-notation-equivalence.html
2902
2903         * mathml/MathMLMencloseElement.cpp: Include HTMLParserIdioms.h to use isHTMLSpace.
2904         (WebCore::MathMLMencloseElement::addNotationFlags): Helper function to perform the relevant
2905         addNotation calls from a notation name.
2906         (WebCore::MathMLMencloseElement::parseNotationAttribute): Use only simple string operations
2907         to determine the list of notations.
2908         * mathml/MathMLMencloseElement.h: Declare the new helper function.
2909
2910 2016-08-28  Frederic Wang  <fwang@igalia.com>
2911
2912         Make MathMLSpaceElement and MathMLTokenElement inherit from MathMLPresentationElement
2913         https://bugs.webkit.org/show_bug.cgi?id=161232
2914
2915         Reviewed by Darin Adler.
2916
2917         The mrow-like features of MathMLPresentationElement are now moved into RenderMathMLRow.
2918         Hence we make MathMLSpaceElement and MathMLTokenElement inherit from the generic class
2919         MathMLPresentationElement for presentation MathML elements.
2920
2921         No new tests, already covered by existing tests.
2922
2923         * mathml/MathMLSpaceElement.cpp:
2924         (WebCore::MathMLSpaceElement::MathMLSpaceElement): Derive from MathMLPresentationElement.
2925         (WebCore::MathMLSpaceElement::parseAttribute): Ditto.
2926         * mathml/MathMLSpaceElement.h: Ditto. Override acceptsDisplayStyleAttribute as a small
2927         optimization. isPresentationMathML is no longer needed.
2928         * mathml/MathMLTokenElement.cpp:
2929         (WebCore::MathMLTokenElement::MathMLTokenElement): Derive from MathMLPresentationElement.
2930         (WebCore::MathMLTokenElement::didAttachRenderers): Ditto.
2931         (WebCore::MathMLTokenElement::childrenChanged): Ditto.
2932         (WebCore::MathMLTokenElement::parseAttribute): Deleted. No need to override this function
2933         any more since it's already implemented in MathMLPresentationElement.
2934         * mathml/MathMLTokenElement.h: Derive from MathMLPresentationElement. Override
2935         acceptsDisplayStyleAttribute as a small optimization. isPresentationMathML is no longer
2936         needed.
2937
2938 2016-08-28  Frederic Wang  <fwang@igalia.com>
2939
2940         RenderMathMLRow::firstLineBaseline does not need to be overridden in RenderMathMLMenclose
2941         https://bugs.webkit.org/show_bug.cgi?id=161127
2942
2943         Reviewed by Darin Adler.
2944
2945         RenderMathMLRow::firstLineBaseline already provides the correct calculation of ascent for
2946         non-empty menclose elements. Empty menclose elements are not used in practice so the
2947         calculated value is irrelevant. Aligning on mrow (i.e. leaving firstLineBaseline to 0)
2948         is fine. This change allows to get rid of the m_ascent member and helps to keep good baseline
2949         alignment when the zoom level changes (bug 161126).
2950
2951         No new tests, already covered by existing tests.
2952
2953         * rendering/mathml/RenderMathMLMenclose.cpp:
2954         (WebCore::RenderMathMLMenclose::RenderMathMLMenclose): Remove initialization of m_ascent.
2955         (WebCore::RenderMathMLMenclose::layoutBlock): No need to calculate m_ascent. The height and
2956         content location can be determined without introducing local variables ascent or descent.
2957         (WebCore::RenderMathMLMenclose::firstLineBaseline): Deleted. We just use the implementation
2958         from RenderMathMLRow.
2959         * rendering/mathml/RenderMathMLMenclose.h: Delete m_ascent and do not override
2960         firstLineBaseline.
2961
2962 2016-08-28  Frederic Wang  <fwang@igalia.com>
2963
2964         More cleanup for the mpadded implementation
2965         https://bugs.webkit.org/show_bug.cgi?id=161136
2966
2967         Reviewed by Darin Adler.
2968
2969         We perform the following cleanup for the mpadded renderer class:
2970         1) We do not store the ascent on the class. This may make update more reliable and will
2971         help for general improvement of MathML ascents (bug 155879).
2972         2) We split resolveWidth/resolveAttributes into smaller functions and improve the coding
2973         style. This helps to calculate firstLineBaseline in 1).
2974         3) We do not override updateFromElement and styleDidChange to perform setNeedsLayout calls.
2975         These calls already seem unnecessary and can be removed even more safely after 1).
2976
2977         We add a test for style change. Change of attributes as well as metrics calcuation of empty
2978         and non-empty mpadded elements are already covered by other tests.
2979
2980         Test: mathml/presentation/mpadded-style-change.html
2981
2982         * rendering/mathml/RenderMathMLPadded.cpp:
2983         (WebCore::RenderMathMLPadded::voffset): New helper function to resolve voffset.
2984         (WebCore::RenderMathMLPadded::lspace): Ditto for lspace.
2985         (WebCore::RenderMathMLPadded::mpaddedWidth): Ditto for width.
2986         (WebCore::RenderMathMLPadded::mpaddedHeight): Ditto for height.
2987         (WebCore::RenderMathMLPadded::mpaddedDepth): Ditto for detph.
2988         (WebCore::RenderMathMLPadded::computePreferredLogicalWidths): Use mpaddedWidth().
2989         (WebCore::RenderMathMLPadded::layoutBlock): Use the new helper functions.
2990         (WebCore::RenderMathMLPadded::firstLineBaseline): Use voffset or mpaddedHeight for baseline
2991         calculation instead of m_padded.
2992         (WebCore::RenderMathMLPadded::resolveWidth): Deleted. Renamed mpaddedWidth.
2993         (WebCore::RenderMathMLPadded::resolveAttributes): Deleted. Split into smaller functions.
2994         (WebCore::RenderMathMLPadded::updateFromElement): Deleted. We do not need to call
2995         setNeedsLayout.
2996         (WebCore::RenderMathMLPadded::styleDidChange): Deleted. Ditto.
2997         * rendering/mathml/RenderMathMLPadded.h: Update function declaration and remove m_ascent.
2998
2999 2016-08-27  Alex Christensen  <achristensen@webkit.org>
3000
3001         URLParser should parse relative URLs
3002         https://bugs.webkit.org/show_bug.cgi?id=161282
3003
3004         Reviewed by Darin Adler.
3005
3006         Partially covered by new API tests, but once the parser is complete enough we can
3007         use the url web platform tests to more fully test this.  It's still a work in
3008         progress only used by tests.
3009
3010         * platform/URLParser.cpp:
3011         (WebCore::URLParser::urlLengthUntilPart):
3012         (WebCore::URLParser::copyURLPartsUntil):
3013         Added some helper functions to reduce redundant code.  When parsing relative URLs,
3014         we often want to copy large parts of the base URL, but the stopping point differs.
3015         (WebCore::URLParser::parse):
3016         The parser now returns a URL instead of an Optional<URL> because a URL has a m_isValid which behaves like Optional.
3017         * platform/URLParser.h:
3018         (WebCore::URLParser::parse):
3019
3020 2016-08-27  Chris Dumez  <cdumez@apple.com>
3021
3022         Update generated bindings to throw a SecurityError when denying cross-origin access to properties
3023         https://bugs.webkit.org/show_bug.cgi?id=161270
3024
3025         Reviewed by Darin Adler.
3026
3027         Update generated bindings to throw a SecurityError when denying cross-origin
3028         access to properties, as per the HTML specification:
3029         - https://html.spec.whatwg.org/#crossorigingetownpropertyhelper-(-o,-p-)
3030         - https://html.spec.whatwg.org/#crossoriginproperties-(-o-)
3031
3032         Firefox and Chrome already throw but Webkit was logging an error message and
3033         returning undefined instead.
3034
3035         No new tests, updated existing tests.
3036
3037         * bindings/js/JSDOMBinding.cpp:
3038         (WebCore::canAccessDocument):
3039         (WebCore::BindingSecurity::shouldAllowAccessToNode):
3040         * bindings/js/JSDOMBinding.h:
3041         * bindings/scripts/CodeGeneratorJS.pm:
3042         (GenerateImplementation):
3043
3044 2016-08-27  Chris Dumez  <cdumez@apple.com>
3045
3046         Follow-up fixes after r205030.
3047         https://bugs.webkit.org/show_bug.cgi?id=161216
3048
3049         Reviewed by Darin Adler.
3050
3051         * html/parser/HTMLParserIdioms.cpp:
3052         (WebCore::isHTMLSpaceOrDelimiter):
3053         (WebCore::isNumberStart):
3054         (WebCore::parseHTMLListOfOfFloatingPointNumberValues):
3055         * html/parser/HTMLParserIdioms.h:
3056
3057 2016-08-27  Rawinder Singh  <rawinder.singh-webkit@cisra.canon.com.au>
3058
3059         Add final keyword to final classes and overriden methods in WebCore/css
3060         https://bugs.webkit.org/show_bug.cgi?id=161182
3061
3062         Reviewed by Darin Adler.
3063
3064         - Mark classes in the WebCore/css directory final as appropriate.
3065         - Update WebCore/css classes so that overriden methods in final classes are marked final.
3066
3067         * css/CSSAnimationTriggerScrollValue.h:
3068         * css/CSSAspectRatioValue.h:
3069         * css/CSSBasicShapes.h:
3070         * css/CSSBorderImageSliceValue.h:
3071         * css/CSSCalculationValue.cpp:
3072         (WebCore::determineCategory):
3073         * css/CSSCalculationValue.h:
3074         * css/CSSCanvasValue.h:
3075         * css/CSSCharsetRule.h:
3076         * css/CSSComputedStyleDeclaration.h:
3077         * css/CSSContentDistributionValue.h:
3078         * css/CSSCrossfadeValue.h:
3079         * css/CSSCursorImageValue.h:
3080         * css/CSSCustomPropertyValue.h:
3081         * css/CSSFilterImageValue.h:
3082         * css/CSSFontFaceLoadEvent.h:
3083         * css/CSSFontFaceSrcValue.h:
3084         * css/CSSFontFeatureValue.h:
3085         * css/CSSFontSelector.h:
3086         * css/CSSFontValue.h:
3087         * css/CSSFunctionValue.h:
3088         * css/CSSGradientValue.h:
3089         * css/CSSGridAutoRepeatValue.h:
3090         * css/CSSGridLineNamesValue.h:
3091         * css/CSSGridTemplateAreasValue.h:
3092         * css/CSSImageSetValue.h:
3093         * css/CSSImageValue.h:
3094         * css/CSSInheritedValue.h:
3095         * css/CSSInitialValue.h:
3096         * css/CSSKeyframeRule.h:
3097         * css/CSSKeyframesRule.h:
3098         * css/CSSLineBoxContainValue.h:
3099         * css/CSSNamedImageValue.h:
3100         * css/CSSPrimitiveValue.h:
3101         * css/CSSReflectValue.h:
3102         * css/CSSRevertValue.h:
3103         * css/CSSRuleList.h:
3104         * css/CSSSegmentedFontFace.h:
3105         * css/CSSShadowValue.h:
3106         * css/CSSStyleSheet.cpp:
3107         * css/CSSStyleSheet.h:
3108         * css/CSSSupportsRule.h:
3109         * css/CSSTimingFunctionValue.h:
3110         * css/CSSUnicodeRangeValue.h:
3111         * css/CSSUnknownRule.h:
3112         * css/CSSUnsetValue.h:
3113         * css/CSSValue.cpp:
3114         * css/CSSVariableDependentValue.h:
3115         * css/CSSVariableValue.h:
3116         * css/Counter.h:
3117         * css/DOMCSSNamespace.h:
3118         * css/DashboardRegion.h:
3119         * css/LengthRepeat.h:
3120         * css/MediaList.h:
3121         * css/MediaQueryList.h:
3122         * css/MediaQueryMatcher.h:
3123         * css/Pair.h:
3124         * css/PropertySetCSSStyleDeclaration.h:
3125         * css/RGBColor.h:
3126         * css/Rect.h:
3127         * css/StyleMedia.h:
3128         * css/StyleProperties.h:
3129         * css/StyleRule.h:
3130         * css/StyleRuleImport.h:
3131         * css/StyleSheetContents.h:
3132         * css/StyleSheetList.h:
3133         * css/ViewportStyleResolver.h:
3134         * css/WebKitCSSFilterValue.h:
3135         * css/WebKitCSSRegionRule.h:
3136         * css/WebKitCSSTransformValue.h:
3137         * css/WebKitCSSViewportRule.h:
3138
3139 2016-08-27  Simon Fraser  <simon.fraser@apple.com>
3140
3141         Add more Editing logging
3142         https://bugs.webkit.org/show_bug.cgi?id=161287
3143
3144         Reviewed by Darin Adler.
3145
3146         Add logging which tracks how key events get from the UI process to the
3147         web process, and down to form fields.
3148
3149         * editing/Editor.cpp:
3150         (WebCore::Editor::handleTextEvent):
3151         (WebCore::Editor::appliedEditing):
3152         * editing/TypingCommand.cpp:
3153         (WebCore::TypingCommand::insertText):
3154         (WebCore::TypingCommand::insertTextAndNotifyAccessibility):
3155         * html/HTMLTextFormControlElement.cpp:
3156         (WebCore::HTMLTextFormControlElement::didEditInnerTextValue):
3157         * page/EventHandler.cpp:
3158         (WebCore::EventHandler::keyEvent):
3159         (WebCore::EventHandler::handleTextInputEvent):
3160
3161 2016-08-27  Sam Weinig  <sam@webkit.org>
3162
3163         Remove more custom JavaScript bindings
3164         https://bugs.webkit.org/show_bug.cgi?id=161293
3165
3166         Reviewed by Darin Adler.
3167
3168         Remove custom bindings for AudioContext, DOMFormData, MediaSession and WebKitPoint.
3169
3170         * Modules/mediasession/MediaSession.cpp:
3171         (WebCore::MediaSession::MediaSession):
3172         * Modules/mediasession/MediaSession.h:
3173         Change to take Document explicitly, since that is what it 
3174         expecting.
3175
3176         * Modules/webaudio/AudioContext.cpp:
3177         (WebCore::AudioContext::create):
3178         * Modules/webaudio/AudioContext.h:
3179         Remove unused ExceptionCode parameter.
3180
3181         * Modules/webaudio/AudioContext.idl:
3182         * html/DOMFormData.idl:
3183         * html/HTMLFormElement.idl:
3184         * page/WebKitPoint.idl:
3185         Switch to use the generated constructor.
3186
3187         * CMakeLists.txt:
3188         * WebCore.xcodeproj/project.pbxproj:
3189         * bindings/js/JSBindingsAllInOne.cpp:
3190         Remove files.
3191         
3192         * bindings/js/JSAudioContextCustom.cpp: Removed.
3193         * bindings/js/JSDOMFormDataCustom.cpp: Removed.
3194         * bindings/js/JSMediaSessionCustom.cpp: Removed.
3195         * bindings/js/JSWebKitPointCustom.cpp: Removed.
3196         Remove in favor of generated variants.
3197
3198         * bindings/js/JSHTMLInputElementCustom.h: Removed.
3199         Remove unused header.
3200
3201         * page/WebKitPoint.h:
3202         (WebCore::WebKitPoint::create):
3203         (WebCore::WebKitPoint::WebKitPoint):
3204         Move NaN replacement into the implementation and out of the bindings.
3205
3206 2016-08-27  Ryosuke Niwa  <rniwa@webkit.org>
3207
3208         Add adopted callback for custom elements
3209         https://bugs.webkit.org/show_bug.cgi?id=161284
3210
3211         Reviewed by Antti Koivisto.
3212
3213         Added the support for adoptedCallback: https://dom.spec.whatwg.org/#concept-node-adopt
3214         For now, we only support this callback on appendChild.
3215
3216         Test: fast/custom-elements/adopted-callback.html
3217
3218         * bindings/js/JSCustomElementInterface.cpp:
3219         (WebCore::JSCustomElementInterface::invokeCallback): Added JSDOMGlobalObject* as an argument to the callback so that
3220         we can invoke toJS on Document in invokeAdoptedCallback.
3221         (WebCore::JSCustomElementInterface::setAdoptedCallback): Added.
3222         (WebCore::JSCustomElementInterface::invokeAdoptedCallback): Added.
3223         (WebCore::JSCustomElementInterface::setAttributeChangedCallback):
3224         * bindings/js/JSCustomElementInterface.h:
3225         (WebCore::JSCustomElementInterface::hasConnectedCallback): Added.
3226         (WebCore::JSCustomElementInterface::hasDisconnectedCallback): Added.
3227         (WebCore::JSCustomElementInterface::hasAdoptedCallback): Added.
3228         * bindings/js/JSCustomElementRegistryCustom.cpp:
3229         (WebCore::JSCustomElementRegistry::define):
3230         * dom/CustomElementReactionQueue.cpp:
3231         (WebCore::CustomElementReactionQueueItem::CustomElementReactionQueueItem): Added a variant that takes two documents.
3232         (WebCore::CustomElementReactionQueueItem::invoke):
3233         (WebCore::CustomElementReactionQueue::enqueueConnectedCallbackIfNeeded): Fixed a bug that this function was always
3234         enqueuing a callback even when the interface didn't have connectedCallback. Also, there is no need to check
3235         the nullity of the interface since it should never be null.
3236         (WebCore::CustomElementReactionQueue::enqueueDisconnectedCallbackIfNeeded): Ditto.
3237         (WebCore::CustomElementReactionQueue::enqueueAdoptedCallbackIfNeeded): Added.
3238         (WebCore::CustomElementReactionQueue::enqueueAttributeChangedCallbackIfNeeded): Assert that the interface is never
3239         null instead of exiting early.
3240         * dom/CustomElementReactionQueue.h:
3241         * dom/Element.cpp:
3242         (WebCore::Element::didMoveToNewDocument): Added a call to enqueueAdoptedCallbackIfNeeded.
3243
3244 2016-08-27  Yoshiaki Jitsukawa  <Yoshiaki.Jitsukawa@sony.com>
3245
3246         Fix the !PLATFORM(WIN) && USE(CURL) build.
3247         https://bugs.webkit.org/show_bug.cgi?id=161281
3248
3249         Reviewed by Alex Christensen.
3250
3251         * platform/network/curl/ResourceHandleCurl.cpp:
3252
3253 2016-08-27  Youenn Fablet  <youenn@apple.com>
3254
3255         [Fetch API] Opaque responses should not have any body
3256         https://bugs.webkit.org/show_bug.cgi?id=161130
3257
3258         Reviewed by Sam Weinig.
3259
3260         Covered by updated test.
3261
3262         Added a new ThreadableLoader option to receive or not opaque response body.
3263         By default, option is set to Receive.
3264         FetchLoader is setting it to DoNotReceive.
3265
3266         * Modules/fetch/FetchLoader.cpp:
3267         (WebCore::FetchLoader::start):
3268         * loader/DocumentThreadableLoader.cpp:
3269         (WebCore::DocumentThreadableLoader::didReceiveResponse): Calling didFinishLoading just after didReceiveResponse in case of Opaque responses.
3270         * loader/ThreadableLoader.cpp:
3271         (WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions):
3272         * loader/ThreadableLoader.h:
3273         * loader/WorkerThreadableLoader.cpp:
3274         (WebCore::LoaderTaskOptions::LoaderTaskOptions):
3275
3276 2016-08-27  Youenn Fablet  <youenn@apple.com>
3277
3278         [Fetch API] opaqueredirect responses should have their URL set to the original URL
3279         https://bugs.webkit.org/show_bug.cgi?id=161194
3280
3281         Reviewed by Sam Weinig.
3282
3283         Covered by updated tests.
3284
3285         * loader/DocumentThreadableLoader.cpp:
3286         (WebCore::DocumentThreadableLoader::didReceiveResponse):
3287         * loader/SubresourceLoader.cpp: Removing isNull ASSERT since we now set the response URL.
3288         (WebCore::SubresourceLoader::willSendRequestInternal): Setting opaqueredirect response URL to the original URL.
3289
3290 2016-08-27  Andreas Kling  <akling@apple.com>
3291
3292         script.text should behave like script.textContent on setting
3293         <https://webkit.org/b/148852>
3294
3295         Reviewed by Chris Dumez.
3296
3297         HTMLScriptElement.text should behave just like .textContent when setting,
3298         so just forward setText() to setTextContent().
3299
3300         Test: import/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/script-text.html
3301
3302         * html/HTMLScriptElement.cpp:
3303         (WebCore::HTMLScriptElement::setText):
3304
3305 2016-08-27  Youenn Fablet  <youenn@apple.com>
3306
3307         [Fetch API] Blob type should be set from Response/Request contentType header
3308         https://bugs.webkit.org/show_bug.cgi?id=161228
3309
3310         Reviewed by Alex Christensen.
3311
3312         Covered by updated tests.
3313
3314         Renaming FetchBody::m_mimeType to m_contentType since that better relates to Content-Type header.
3315         Updated FetchRequest and FetchResponse to set m_contentType according request/response headers.
3316         Handled the case of a Request created from JS, a Response created from JS and a Response created internally to
3317         be used as resolve value in the fetch promise.
3318
3319         In case Content-Type is set but is empty, its empty value should be used for blob type.
3320         Updated contentType checks to use isNull in lieu of isEmpty.
3321
3322         * Modules/fetch/FetchBody.cpp:
3323         (WebCore::FetchBody::updateContentType): Routine to synchronize headers with m_contentType.
3324         (WebCore::FetchBody::FetchBody): Renamed m_mimeType to m_contentType.
3325         (WebCore::FetchBody::blob): Ditto.
3326         * Modules/fetch/FetchBody.h: Ditto.
3327         (WebCore::FetchBody::contentType):
3328         (WebCore::FetchBody::setMimeType): Deleted.
3329         (WebCore::FetchBody::mimeType): Deleted.
3330         * Modules/fetch/FetchRequest.cpp:
3331         (WebCore::FetchRequest::setBody): set FetchBody::m_contentType according HTTP headers.
3332         * Modules/fetch/FetchResponse.cpp:
3333         (WebCore::FetchResponse::initializeWith): Ditto.
3334         (WebCore::FetchResponse::BodyLoader::didReceiveResponse): Ditto.
3335
3336 2016-08-26  Alex Christensen  <achristensen@webkit.org>
3337
3338         Fix Windows build after r205065.
3339
3340         * Modules/webaudio/BiquadFilterNode.idl:
3341         * Modules/webaudio/PannerNode.idl:
3342         There's no WEB_AUDIO on Windows.
3343
3344 2016-08-26  Devin Rousso  <dcrousso+webkit@gmail.com>
3345
3346         REGRESSION (r203535): Web Inspector: Inspector overlay node info has disappeared
3347         https://bugs.webkit.org/show_bug.cgi?id=161264
3348
3349         Reviewed by Joseph Pecoraro.
3350
3351         No new tests.  Fixing JavaScript error in Inspector overlay.
3352
3353         * inspector/InspectorOverlay.cpp:
3354         (evaluateCommandInOverlay):
3355         (WebCore::InspectorOverlay::evaluateInOverlay):
3356         Add ASSERT to ensure that errors in the Inspector overlay will cause tests to crash.
3357
3358         * inspector/InspectorOverlayPage.js:
3359         (DOMBuilder.prototype.appendTextNode):
3360         Move textContent value to parameter of document.createTextNode.
3361
3362 2016-08-26  Sam Weinig  <sam@webkit.org>
3363