1 2017-08-03 Devin Rousso <drousso@apple.com>
3 Web Inspector: add button to open Inspector^2
4 https://bugs.webkit.org/show_bug.cgi?id=175108
6 Reviewed by Brian Burg.
8 This patch just exposes a function to the inspector page. No new functionality was added.
10 * inspector/InspectorFrontendHost.idl:
11 * inspector/InspectorFrontendHost.h:
12 * inspector/InspectorFrontendHost.cpp:
13 (WebCore::InspectorFrontendHost::inspectInspector):
15 2017-08-03 Matt Baker <mattbaker@apple.com>
17 Web Inspector: Instrument WebGLProgram created/deleted
18 https://bugs.webkit.org/show_bug.cgi?id=175059
20 Reviewed by Devin Rousso.
22 Tests: inspector/canvas/shaderProgram-add-remove-webgl.html
23 inspector/canvas/shaderProgram-add-remove-webgl2.html
25 This patch adds instrumentation to WebGLRenderingContextBase for tracking
26 WebGLPrograms. A new helper class, InspectorShaderProgram, is used by
27 the CanvasAgent to hold related data.
30 * WebCore.xcodeproj/project.pbxproj:
32 * html/canvas/WebGLRenderingContextBase.cpp:
33 (WebCore::WebGLRenderingContextBase::createProgram):
34 (WebCore::WebGLRenderingContextBase::deleteProgram):
36 * inspector/InspectorCanvasAgent.cpp:
37 (WebCore::InspectorCanvasAgent::enable):
38 (WebCore::InspectorCanvasAgent::frameNavigated):
39 (WebCore::InspectorCanvasAgent::didCreateProgram):
40 (WebCore::InspectorCanvasAgent::willDeleteProgram):
41 (WebCore::InspectorCanvasAgent::clearCanvasData):
42 (WebCore::InspectorCanvasAgent::unbindCanvas):
43 (WebCore::InspectorCanvasAgent::unbindProgram):
44 (WebCore::InspectorCanvasAgent::assertInspectorProgram):
45 (WebCore::InspectorCanvasAgent::findInspectorProgram):
46 * inspector/InspectorCanvasAgent.h:
48 * inspector/InspectorInstrumentation.cpp:
49 (WebCore::InspectorInstrumentation::didCreateCSSCanvasImpl):
50 (WebCore::InspectorInstrumentation::didChangeCSSCanvasClientNodesImpl):
51 (WebCore::InspectorInstrumentation::didCreateCanvasRenderingContextImpl):
52 (WebCore::InspectorInstrumentation::didChangeCanvasMemoryImpl):
53 (WebCore::InspectorInstrumentation::recordCanvasActionImpl):
54 (WebCore::InspectorInstrumentation::didFinishRecordingCanvasFrameImpl):
55 (WebCore::InspectorInstrumentation::didCreateProgramImpl):
56 (WebCore::InspectorInstrumentation::willDeleteProgramImpl):
58 * inspector/InspectorInstrumentation.h:
59 (WebCore::InspectorInstrumentation::recordCanvasActionImpl):
60 (WebCore::InspectorInstrumentation::didCreateCSSCanvas):
61 (WebCore::InspectorInstrumentation::didChangeCSSCanvasClientNodes):
62 (WebCore::InspectorInstrumentation::didCreateCanvasRenderingContext):
63 (WebCore::InspectorInstrumentation::didChangeCanvasMemory):
64 (WebCore::InspectorInstrumentation::recordCanvasAction):
65 (WebCore::InspectorInstrumentation::didFinishRecordingCanvasFrame):
66 (WebCore::InspectorInstrumentation::didCreateProgram):
67 (WebCore::InspectorInstrumentation::willDeleteProgram):
69 * inspector/InspectorShaderProgram.cpp: Added.
70 (WebCore::InspectorShaderProgram::create):
71 (WebCore::InspectorShaderProgram::InspectorShaderProgram):
72 (WebCore::InspectorShaderProgram::context const):
73 * inspector/InspectorShaderProgram.h: Added.
75 2017-08-03 Matt Lewis <jlewis3@apple.com>
77 Unreviewed, rolling out r220209.
79 This caused internal build failures.
83 "Use MPAVRoutingController instead of deprecated versions."
84 https://bugs.webkit.org/show_bug.cgi?id=175063
85 http://trac.webkit.org/changeset/220209
87 2017-08-03 Brady Eidson <beidson@apple.com>
89 Add SW IDLs and stub out basic functionality.
90 https://bugs.webkit.org/show_bug.cgi?id=175115
92 Reviewed by Chris Dumez.
94 No new tests (Currently no behavior change).
96 Overall note: This feature is EnabledAtRuntime as opposed to EnabledBySetting because
97 the Settings-based code generation is completely broken for non-Document contexts,
98 whereas the RuntimeEnabledFeatures-based generation is not.
101 * Configurations/FeatureDefines.xcconfig:
102 * DerivedSources.make:
103 * WebCore.xcodeproj/project.pbxproj:
105 * bindings/scripts/preprocess-idls.pl: Handle the new global scope c'tor file.
107 * bindings/js/JSServiceWorkerContainerCustom.cpp: Added.
108 (WebCore::JSServiceWorkerContainer::ready const):
110 * bindings/js/JSWorkerGlobalScopeBase.cpp:
111 (WebCore::toJSWorkerGlobalScope): Refactor to handle both types of derived workers.
112 (WebCore::toJSServiceWorkerGlobalScope):
113 * bindings/js/JSWorkerGlobalScopeBase.h:
116 * dom/EventTargetFactory.in:
118 * features.json: Change status of feature.
120 * page/Navigator.idl:
121 * page/NavigatorBase.cpp:
122 (WebCore::NavigatorBase::serviceWorker):
123 * page/NavigatorBase.h:
124 * page/NavigatorServiceWorker.idl: Added.
126 * page/RuntimeEnabledFeatures.h:
127 (WebCore::RuntimeEnabledFeatures::serviceWorkerEnabled const):
128 (WebCore::RuntimeEnabledFeatures::setServiceWorkerEnabled):
130 * workers/ServiceWorker.cpp: Added.
131 (WebCore::ServiceWorker::postMessage):
132 (WebCore::ServiceWorker::~ServiceWorker):
133 (WebCore::ServiceWorker::scriptURL const):
134 (WebCore::ServiceWorker::state const):
135 (WebCore::ServiceWorker::eventTargetInterface const):
136 (WebCore::ServiceWorker::scriptExecutionContext const):
137 * workers/ServiceWorker.h: Added.
138 * workers/ServiceWorker.idl: Added.
140 * workers/ServiceWorkerContainer.cpp: Added.
141 (WebCore::ServiceWorkerContainer::~ServiceWorkerContainer):
142 (WebCore::ServiceWorkerContainer::controller const):
143 (WebCore::ServiceWorkerContainer::ready):
144 (WebCore::ServiceWorkerContainer::addRegistration):
145 (WebCore::ServiceWorkerContainer::getRegistration):
146 (WebCore::ServiceWorkerContainer::getRegistrations):
147 (WebCore::ServiceWorkerContainer::startMessages):
148 (WebCore::ServiceWorkerContainer::eventTargetInterface const):
149 (WebCore::ServiceWorkerContainer::scriptExecutionContext const):
150 * workers/ServiceWorkerContainer.h: Added.
151 * workers/ServiceWorkerContainer.idl: Added.
153 * workers/ServiceWorkerGlobalScope.cpp: Added.
154 (WebCore::ServiceWorkerGlobalScope::registration):
155 (WebCore::ServiceWorkerGlobalScope::skipWaiting):
156 * workers/ServiceWorkerGlobalScope.h: Added.
157 * workers/ServiceWorkerGlobalScope.idl: Added.
159 * workers/ServiceWorkerRegistration.cpp: Added.
160 (WebCore::ServiceWorkerRegistration::~ServiceWorkerRegistration):
161 (WebCore::ServiceWorkerRegistration::installing):
162 (WebCore::ServiceWorkerRegistration::waiting):
163 (WebCore::ServiceWorkerRegistration::active):
164 (WebCore::ServiceWorkerRegistration::scope const):
165 (WebCore::ServiceWorkerRegistration::update):
166 (WebCore::ServiceWorkerRegistration::unregister):
167 (WebCore::ServiceWorkerRegistration::eventTargetInterface const):
168 (WebCore::ServiceWorkerRegistration::scriptExecutionContext const):
169 * workers/ServiceWorkerRegistration.h: Added.
170 * workers/ServiceWorkerRegistration.idl: Added.
172 2017-08-03 Yoshiaki Jitsukawa <jitsu@rd.scei.sony.co.jp>
174 [WebCore] Sort Xcode project files
175 https://bugs.webkit.org/show_bug.cgi?id=175121
177 Reviewed by Antti Koivisto.
179 * WebCore.xcodeproj/project.pbxproj:
181 2017-08-02 Sam Weinig <sam@webkit.org>
183 [WebIDL] Convert MutationCallback to be a normal generated callback
184 https://bugs.webkit.org/show_bug.cgi?id=174140
186 Reviewed by Darin Adler.
188 To make this work more nicely, I:
189 - Added the ability to for non-nullable interfaces in sequences to be passed
190 via a Ref<> rather than a RefPtr<> as a parameter to a callback function.
191 (e.g. callback MyCallback = void (sequence<Foo> foos) will now have the
192 signature, CallbackResult<void> handleEvent(const Vector<Ref<Foo>>&) rather
193 than CallbackResult<void> handleEvent(const Vector<RefPtr<Foo>>&).
194 - Added a new extended attribute for callback functions called [CallbackThisObject=Type]
195 which allows you to specify that the callback needs a this object in addition
196 to its arguments. When specified, the first argument of the C++ implementation
197 function will now correspond to the this object, with the remaining arguments
199 - Converted callback objects to all inherit directly from ActiveDOMCallback rather
200 than having the generated JS callback derived class inherit from it. This allows
201 us to have access to a callback's canInvokeCallback() function anywhere (needed
202 for MutationCallback) as well as giving a place to put an optional virtual
203 visitJSFunction to allow marking weak callbacks (while not an ideal layering,
204 this matches what we do in EventListener). This change requires each callback to
205 have a bit more code to import the ActiveDOMCallback's constructor and requires
206 non-JS derived callbacks to pass a ScriptExecutionContext (e.g. the Document).
209 * DerivedSources.make:
210 * WebCore.xcodeproj/project.pbxproj:
211 * bindings/js/JSMutationCallback.cpp: Removed.
212 * bindings/js/JSMutationCallback.h: Removed.
213 Remove custom JSMutationCallback.h/cpp
215 * Modules/geolocation/PositionCallback.h:
216 * Modules/geolocation/PositionErrorCallback.h:
217 * Modules/notifications/NotificationPermissionCallback.h:
218 * Modules/webaudio/AudioBufferCallback.h:
219 * Modules/webdatabase/DatabaseCallback.h:
220 * Modules/webdatabase/SQLStatementCallback.h:
221 * Modules/webdatabase/SQLStatementErrorCallback.h:
222 * Modules/webdatabase/SQLTransactionCallback.h:
223 * Modules/webdatabase/SQLTransactionErrorCallback.h:
224 * css/MediaQueryListListener.h:
226 * dom/RequestAnimationFrameCallback.h:
227 * dom/StringCallback.h:
228 * fileapi/BlobCallback.h:
229 * html/VoidCallback.h:
230 * page/IntersectionObserverCallback.h:
231 * page/PerformanceObserverCallback.h:
232 Add ActiveDOMCallback as a base class. Import the ActiveDOMCallback constructor.
234 * Modules/mediastream/MediaDevicesRequest.cpp:
235 (WebCore::MediaDevicesRequest::filterDeviceList):
236 (WebCore::MediaDevicesRequest::start):
237 * Modules/mediastream/MediaDevicesRequest.h:
238 Change filterDeviceList to take a Vector of Refs.
240 * bindings/IDLTypes.h:
241 Add InnerParameterType and NullableInnerParameterType type hooks
242 and specialize wrappers to use Ref for InnerParameterType, and RefPtr
243 for NullableInnerParameterType.
245 * bindings/js/JSCallbackData.cpp:
246 * bindings/js/JSCallbackData.h:
247 Add support for passing a this object and give JSCallbackDataWeak a visitJSFunction
248 to allow marking the underlying function.
250 * bindings/js/JSMutationObserverCustom.cpp:
251 (WebCore::JSMutationObserver::visitAdditionalChildren):
252 (WebCore::constructJSMutationObserver): Deleted.
253 Remove the custom constructor and replace it with a custom visitAdditionalChildren
254 that calls the new ActiveDOMObject's visitJSFunction.
256 * bindings/scripts/CodeGenerator.pm:
258 Add helper to parse a type and cache the result.
260 * bindings/scripts/CodeGeneratorJS.pm:
261 (GenerateCallbackHeaderContent):
262 (GenerateCallbackImplementationContent):
263 (GetJSCallbackDataType): Deleted.
264 - Add support for [CallbackThisObject]. When [CallbackThisObject] is not specified, use jsUndefined()
265 as the this object as specified by WebIDL.
266 - Stop inheriting from ActiveDOMCallback now that callbacks need to do this themselves.
267 - Add a visitJSFunction override for weak callback functions which calls into the callback data.
269 * bindings/scripts/IDLAttributes.json:
270 Add [CallbackThisObject].
272 * bindings/scripts/IDLParser.pm:
274 Add entry point to parse a single type.
277 Use Ref rather than RefPtr for the faces sequence.
279 * dom/ActiveDOMCallback.h:
280 (WebCore::ActiveDOMCallback::visitJSFunction):
281 Add an optional visitJSFunction virtual function so that derived classes
282 have a way of marking underlying function objects.
284 * dom/MutationCallback.h:
285 Convert to support generation (return a CallbackResult, inherit from ActiveDOMObject).
287 * dom/MutationCallback.idl: Added.
288 Added to generate the callback. Uses the new [CallbackThisObject].
290 * dom/MutationObserver.cpp:
291 (WebCore::MutationObserver::deliver):
292 Switch to call idiomatic handleEvent, and pass *this as the first parameter
293 which will be translated into the this object.
295 * dom/MutationObserver.h:
296 (WebCore::MutationObserver::callback):
297 Expose the callback so it can marked during GC.
299 * dom/MutationObserver.idl:
300 Remove CustomConstructor and replace it with a custom mark function.
302 * dom/NativeNodeFilter.cpp:
303 * dom/NativeNodeFilter.h:
304 * inspector/InspectorDatabaseAgent.cpp:
305 Pass now needed ScriptExecutionContext to non-js based callbacks.
307 * bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
308 * bindings/scripts/test/JS/JSTestCallbackFunctionRethrow.cpp:
309 * bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.cpp: Added.
310 * bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.h: Added.
311 * bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp:
312 * bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
313 * bindings/scripts/test/JS/JSTestCallbackInterface.h:
314 * bindings/scripts/test/JS/JSTestVoidCallbackFunction.cpp:
315 * bindings/scripts/test/TestCallbackFunctionWithThisObject.idl: Added.
316 * bindings/scripts/test/TestCallbackInterface.idl:
319 2017-08-03 Jeremy Jones <jeremyj@apple.com>
321 Use MPAVRoutingController instead of deprecated versions.
322 https://bugs.webkit.org/show_bug.cgi?id=175063
324 Reviewed by Tim Horton.
326 No new tests because no behavior change. This uses a different platform class to present
329 Remove deprecated MPAudioVideoRoutingPopoverController and MPAVRoutingSheet
330 Add MPMediaControlsViewController.
332 * platform/spi/ios/MediaPlayerSPI.h:
334 2017-08-03 Chris Dumez <cdumez@apple.com>
336 Improve our support for referrer policies
337 https://bugs.webkit.org/show_bug.cgi?id=175069
338 <rdar://problem/33677313>
340 Reviewed by Darin Adler.
342 Improve our support for referrer policies. In particular, we now support the
343 additional following ones: "same-origin", "origin-when-cross-origin" and
344 "strict-origin-when-cross-origin".
346 This is as per the following specification:
347 - https://www.w3.org/TR/referrer-policy/#referrer-policies
349 Also refactor the code a bit for clarity: I merged the ReferrerPolicy enum and the
350 FetchOptions::ReferrerPolicy one.
352 Tests: http/tests/referrer-policy/origin-when-cross-origin/cross-origin-http-http.html
353 http/tests/referrer-policy/origin-when-cross-origin/cross-origin-http.https.html
354 http/tests/referrer-policy/origin-when-cross-origin/same-origin.html
355 http/tests/referrer-policy/same-origin/cross-origin-http-http.html
356 http/tests/referrer-policy/same-origin/cross-origin-http.https.html
357 http/tests/referrer-policy/same-origin/same-origin.html
358 http/tests/referrer-policy/strict-origin-when-cross-origin/cross-origin-http-http.html
359 http/tests/referrer-policy/strict-origin-when-cross-origin/cross-origin-http.https.html
360 http/tests/referrer-policy/strict-origin-when-cross-origin/same-origin.html
361 http/tests/referrer-policy/strict-origin/cross-origin-http-http.html
362 http/tests/referrer-policy/strict-origin/cross-origin-http.https.html
363 http/tests/referrer-policy/strict-origin/same-origin.html
365 * Modules/fetch/FetchLoader.cpp:
366 (WebCore::FetchLoader::start):
367 * Modules/fetch/FetchReferrerPolicy.h:
368 * Modules/fetch/FetchReferrerPolicy.idl:
369 * Modules/fetch/FetchRequest.h:
370 * Modules/fetch/FetchRequestInit.h:
372 (WebCore::Document::processReferrerPolicy):
373 (WebCore::Document::applyQuickLookSandbox):
374 (WebCore::Document::applyContentDispositionAttachmentSandbox):
376 * loader/FetchOptions.h:
377 * loader/FrameNetworkingContext.h:
378 * loader/PingLoader.cpp:
379 (WebCore::PingLoader::sendBeacon):
380 Drop explicit call to SecurityPolicy::shouldHideReferrer(). This is already called inside
381 SecurityPolicy::generateReferrerHeader() and used only when needed, depending on the
382 actual referrer policy.
384 * loader/cache/CachedResourceLoader.cpp:
385 (WebCore::CachedResourceLoader::updateHTTPRequestHeaders):
386 * loader/cache/CachedResourceRequest.cpp:
387 (WebCore::CachedResourceRequest::updateReferrerOriginAndUserAgentHeaders):
388 * page/SecurityPolicy.cpp:
389 (WebCore::referrerToOriginString):
390 (WebCore::SecurityPolicy::generateReferrerHeader):
391 * page/SecurityPolicy.h:
392 * platform/ReferrerPolicy.h:
394 2017-08-03 Daniel Bates <dabates@apple.com>
396 Support ::marker pseudo-element
397 https://bugs.webkit.org/show_bug.cgi?id=141477
399 Reviewed by David Hyatt.
401 Implements the ::marker pseudo element as per the CSS Pseudo-Element Module Level 4
402 spec., <https://drafts.csswg.org/css-pseudo-4> (Editor's Draft, 24 July 2017).
404 The ::marker pseudo element is a convenience pseudo element that allows a person to
405 style the appearance of a list item marker. For example, to render all list item
406 markers in bolded, blue text you would define a stylesheet with the following content:
413 and this could be applied to a page that contains markup of the form:
423 Formerly to the achieve the same effect you would need to use a stylesheet of the form:
434 and then write your markup to have the form:
437 <li><span class="list-item-content">Item 1</span></li>
438 <li><span class="list-item-content">Item 2</span></li>
440 <li><span class="list-item-content">Item N-1</span></li>
441 <li><span class="list-item-content">Item N</span></li>
444 The ::marker pseudo element only supports stylizing all font properties and the color property
445 of a list item marker.
447 Tests: fast/lists/list-marker-with-display.html
448 http/wpt/css/css-pseudo-4/marker-and-other-pseudo-elements.html
449 http/wpt/css/css-pseudo-4/marker-color.html
450 http/wpt/css/css-pseudo-4/marker-font-properties.html
451 http/wpt/css/css-pseudo-4/marker-inherit-values.html
453 * css/CSSSelector.cpp:
454 (WebCore::CSSSelector::pseudoId): Return the pseudo id for the ::marker pseudo element.
455 * css/CSSSelector.h: Add enumerator PseudoElementMarker to the pseudo element enum.
457 (WebCore::determinePropertyWhitelistType): Return whitelist type PropertyWhitelistMarker for ::marker
458 so that we match rules against the acceptable rules for ::marker.
459 * css/RuleSet.h: Add enumerator PropertyWhitelistMarker to the property whitelist type enum.
460 * css/SelectorPseudoElementTypeMap.in: Add "marker" to the list of pseudo element types.
461 * css/StyleResolver.cpp:
462 (WebCore::isValidMarkerStyleProperty): Determines if the specified CSS property is valid inside ::marker.
463 (WebCore::StyleResolver::CascadedProperties::addMatch): Only recognize CSS properties in the content block
464 of ::marker that match the ::marker whitelist policy.
465 * rendering/RenderListItem.cpp:
466 (WebCore::RenderListItem::computeMarkerStyle): Computes the style object for the list item marker. We
467 apply the user-agent style to the marker here as opposed to defining ::marker in the UA sheet as per
468 the spec. as an optimization to avoid having the style resolver apply the pseudo element to all elements.
469 For now, we always inherit style from the originating element (list item). Added FIXME to selectively
471 (WebCore::RenderListItem::styleDidChange): Always apply the list marker style to the list marker renderer.
472 * rendering/RenderListItem.h:
473 * rendering/style/RenderStyleConstants.h: Add pseudo ID for the ::marker pseudo element.
475 2017-08-03 Antti Koivisto <antti@apple.com>
477 Factor common code in Style::*ChangeInvalidation into helper functions
478 https://bugs.webkit.org/show_bug.cgi?id=174312
480 Reviewed by Andreas Kling.
482 There is a lot of copy code here.
484 * Style/StyleInvalidationFunctions.h: Added.
485 (WebCore::Style::traverseRuleFeaturesInShadowTree):
486 (WebCore::Style::traverseRuleFeaturesForSlotted):
487 (WebCore::Style::traverseRuleFeatures):
489 Add functions for traversing rule features that may affect style of an element.
490 Use lambdas to implement client-specific behavior.
492 * WebCore.xcodeproj/project.pbxproj:
493 * style/AttributeChangeInvalidation.cpp:
494 (WebCore::Style::mayBeAffectedByAttributeChange):
495 (WebCore::Style::AttributeChangeInvalidation::invalidateStyle):
496 (WebCore::Style::mayBeAffectedByHostRules): Deleted.
497 (WebCore::Style::mayBeAffectedBySlottedRules): Deleted.
498 * style/ClassChangeInvalidation.cpp:
499 (WebCore::Style::ClassChangeInvalidation::invalidateStyle):
500 (WebCore::Style::mayBeAffectedByHostRules): Deleted.
501 (WebCore::Style::mayBeAffectedBySlottedRules): Deleted.
502 * style/IdChangeInvalidation.cpp:
503 (WebCore::Style::IdChangeInvalidation::invalidateStyle):
504 (WebCore::Style::mayBeAffectedByHostRules): Deleted.
505 (WebCore::Style::mayBeAffectedBySlottedRules): Deleted.
507 2017-08-03 Zan Dobersek <zdobersek@igalia.com>
509 [EME] CDM constructor assigns CDMPrivate member multiple times
510 https://bugs.webkit.org/show_bug.cgi?id=175128
512 Reviewed by Xabier Rodriguez-Calvar.
514 In the CDM class constructor, iterate over the registered CDM
515 factories, finding one that supports the specified key system.
516 A CDMPrivate object is created through that factory, and the
517 iteration is now stopped at that point, while previously it
518 contined to potentially create CDMPrivate objects through
521 Helper createCDMPrivateForKeySystem() function is removed.
523 * Modules/encryptedmedia/CDM.cpp:
525 (WebCore::createCDMPrivateForKeySystem): Deleted.
527 2017-08-03 Emilio Cobos Álvarez <ecobos@igalia.com>
529 Don't always recalc the style of display: contents elements.
530 https://bugs.webkit.org/show_bug.cgi?id=172753
532 Reviewed by Antti Koivisto.
534 No new tests (no functionality change). This only removes an
538 (WebCore::Element::existingComputedStyle):
540 * style/RenderTreeUpdater.cpp:
541 (WebCore::RenderTreeUpdater::updateRenderTree):
542 (WebCore::RenderTreeUpdater::updateElementRenderer):
543 * style/StyleTreeResolver.cpp:
544 (WebCore::Style::renderOrDisplayContentsStyle):
545 (WebCore::Style::TreeResolver::resolveElement):
546 (WebCore::Style::TreeResolver::createAnimatedElementUpdate):
547 (WebCore::Style::shouldResolveElement):
548 (WebCore::Style::TreeResolver::resolveComposedTree):
550 2017-08-02 Devin Rousso <drousso@apple.com>
552 Web Inspector: add stack trace information for each RecordingAction
553 https://bugs.webkit.org/show_bug.cgi?id=174663
555 Reviewed by Joseph Pecoraro.
557 Tests: inspector/canvas/recording-2d.html
558 inspector/model/recording.html
560 * inspector/InspectorCanvas.h:
561 * inspector/InspectorCanvas.cpp:
562 (WebCore::InspectorCanvas::indexForData):
563 (WebCore::InspectorCanvas::buildAction):
565 2017-08-02 Yusuke Suzuki <utatane.tea@gmail.com>
567 Merge WTFThreadData to Thread::current
568 https://bugs.webkit.org/show_bug.cgi?id=174716
570 Reviewed by Mark Lam.
572 Use Thread::current() instead.
574 * fileapi/AsyncFileStream.cpp:
575 * platform/ThreadGlobalData.cpp:
576 (WebCore::ThreadGlobalData::ThreadGlobalData):
577 * platform/graphics/cocoa/WebCoreDecompressionSession.h:
578 * platform/ios/wak/WebCoreThread.mm:
580 * workers/WorkerThread.cpp:
581 (WebCore::WorkerThread::workerThread):
583 2017-08-02 Sam Weinig <sam@webkit.org>
585 Fix crashes in GC creating a document fragment on a background thread
586 https://bugs.webkit.org/show_bug.cgi?id=175111
588 Reviewed by Chris Dumez.
590 r220095 (https://webkit.org/b/175006) change JSHTMLTemplateElement from using a
591 private name + property to manager the lifetime of the reference DocumentFragment
592 to using the idiomatic visitAdditionalChildren. Unfortunately, the function to access
593 the DocumentFragment lazily creates it. If this lazy creation happens on a GC thread,
594 badness ensues. This introduces an accessor that returns the DocumentFragment if it
595 has been created or null if it has not.
597 * bindings/js/JSHTMLTemplateElementCustom.cpp:
598 (WebCore::JSHTMLTemplateElement::visitAdditionalChildren):
599 * html/HTMLTemplateElement.cpp:
600 (WebCore::HTMLTemplateElement::contentIfAvailable):
601 * html/HTMLTemplateElement.h:
603 2017-08-02 Sam Weinig <sam@webkit.org>
605 [WebIDL] Simplify [EnabledBySettings] extended attribute code to not require passing a global object to finishCreation
606 https://bugs.webkit.org/show_bug.cgi?id=175087
608 Reviewed by Chris Dumez.
610 * bindings/scripts/CodeGeneratorJS.pm:
611 (GenerateImplementation):
612 (GeneratePrototypeDeclaration):
613 Remove unnecessary passing of the global object to finishCreation for [EnabledBySettings].
615 * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
616 * bindings/scripts/test/JS/JSTestNode.cpp:
617 * bindings/scripts/test/JS/JSTestObj.cpp:
620 2017-08-02 Andy Estes <aestes@apple.com>
622 REGRESSION (r207155): Unable to switch sheets when previewing Numbers '09 spreadsheets
623 https://bugs.webkit.org/show_bug.cgi?id=175098
624 <rdar://problem/31416763>
626 Reviewed by Daniel Bates.
628 r207155 enabled sandboxing on the frame displaying a QuickLook preview. This restricted
629 frames within the sandbox from navigating their sandboxed siblings or ancestors, which
630 breaks the functionality of multi-sheet Numbers '09 spreadsheet previews. These previews
631 contain a frameset with a table of contents frame and a content frame, and the table of
632 contents frame needs to be able to navigate the content frame when the sheet selection
635 Fix this by disabling the SandboxNavigation flag in the QuickLook sandbox. Frames within the
636 sandbox will be able to navigate each other, but will not be able to navigate the top frame
637 (due to SandboxTopNavigation still being enabled), nor will they be able to navigate any
638 other ancestor frame outside the sandbox (due to QuickLook previews being in a different
639 origin than the hosting frame). These two cases are covered by existing tests.
641 Test: quicklook/multi-sheet-numbers-09.html
644 (WebCore::Document::applyQuickLookSandbox): Added a call to
645 disableSandboxFlags(SandboxNavigation) after applying the content security policy.
646 * dom/SecurityContext.h:
647 (WebCore::SecurityContext::disableSandboxFlags): Defined disableSandboxFlags().
649 2017-08-02 Jer Noble <jer.noble@apple.com>
651 [MSE] Removing samples when presentation order does not match decode order can cause bad behavior.
652 https://bugs.webkit.org/show_bug.cgi?id=175091
654 Reviewed by Eric Carlson.
656 Address follow-up comments to r219519.
658 * Modules/mediasource/SourceBuffer.cpp:
659 (WebCore::SourceBuffer::removeCodedFrames):
661 2017-08-02 Jeremy Jones <jeremyj@apple.com>
663 Remove unused and obsolete setting mediaDocumentEntersFullscreenAutomatically
664 https://bugs.webkit.org/show_bug.cgi?id=175080
668 No new tests because this only removes unused code.
670 This is obsolete because of the alternate solution in
671 https://bugs.webkit.org/show_bug.cgi?id=174850
675 2017-08-02 Filip Pizlo <fpizlo@apple.com>
677 GPUBuffer::length() should return the size of the array buffer backing the GPU buffer, not the rounded-up GPU buffer length
678 https://bugs.webkit.org/show_bug.cgi?id=175079
680 Reviewed by Simon Fraser.
682 This fixes a failure in the GPU.BufferCreate unit test.
684 The problem is that in order to have a Metal buffer wrap memory we allocated, we have to tell Metal
685 that the memory is page-aligned. This means that the Metal buffer reports back a page-aligned size,
686 which is different than what the test expected.
688 It seems that it's most convenient for our GPUBuffer class to return the unaligned length, rather
689 than the aligned length. This is just a simple matter of returning the length from the ArrayBuffer
690 rather than the Metal buffer.
692 This fixes the unit test and is probably more sensible for actual users of this class, since the page
693 alignment of the length is a goofy implementation detail.
695 * platform/graphics/cocoa/GPUBufferMetal.mm:
696 (WebCore::GPUBuffer::length const):
698 2017-08-01 Brian Burg <bburg@apple.com>
700 HTML file input elements do not support file extensions in the "accept" attribute
701 https://bugs.webkit.org/show_bug.cgi?id=95698
702 <rdar://problem/12231850>
704 Reviewed by Darin Adler.
706 Serialize the accepted file extensions so they can be accessed in the UI process.
708 * platform/FileChooser.h:
709 * platform/FileChooser.cpp:
710 (WebCore::FileChooser::invalidate): Modernize.
711 (WebCore::FileChooserSettings::acceptTypes const): Deleted.
712 This is dead code, it was only used by Chromium.
714 2017-08-02 Fujii Hironori <Hironori.Fujii@sony.com>
716 Use LazyNeverDestroyed instead of DEFINE_GLOBAL for QualifiedName
717 https://bugs.webkit.org/show_bug.cgi?id=175010
718 <rdar://problem/33647818>
720 Reviewed by Alex Christensen.
722 No new tests because no behavior change.
724 Stop using DEFINE_GLOBAL hack in favor of LazyNeverDestroyed.
726 * contentextensions/ContentExtensionParser.cpp:
727 (WebCore::ContentExtensions::isValidCSSSelector):
728 Call QualifiedName::init().
729 * dom/DOMAllInOne.cpp: Remove the warning. Include QualifiedName.cpp.
730 * dom/QualifiedName.cpp:
731 (WebCore::QualifiedName::init): Call LazyNeverDestroyed::construct
732 instead of placement new.
733 * dom/QualifiedName.h: Use LazyNeverDestroyed.
735 2017-08-01 Joseph Pecoraro <pecoraro@apple.com>
737 CFString leak dragging an image - allocation under PlatformPasteboard::writeObjectRepresentations
738 https://bugs.webkit.org/show_bug.cgi?id=175064
740 Reviewed by Tim Horton.
742 * platform/ios/PlatformPasteboardIOS.mm:
743 (WebCore::PlatformPasteboard::writeObjectRepresentations):
744 Adopt a created string into the RetainPtr.
746 * platform/ios/WebItemProviderPasteboard.h:
747 * platform/ios/WebItemProviderPasteboard.mm:
748 (-[WebItemProviderRegistrationInfoList dealloc]):
749 Release suggestedName and switch from -strong to -copy.
751 2017-08-01 Chris Dumez <cdumez@apple.com>
753 Unreviewed, update Beacon API status to "In Development".
757 2017-08-01 Chris Dumez <cdumez@apple.com>
759 Add initial support for navigator.sendBeacon
760 https://bugs.webkit.org/show_bug.cgi?id=175007
761 <rdar://problem/33547728>
763 Reviewed by Sam Weinig.
765 Add initial support for navigator.sendBeacon behind an experimental
766 feature runtime flag. The specification is available at:
767 - https://w3c.github.io/beacon/
769 The current implementation supports sending beacons with all types of
770 payloads except for ReadableStream. Some functionality is incomplete
771 and will be taken care of in follow-up patches:
772 - Support for CORS preflight for the cases where it is required. We currently
773 return false and do not send the beacon in such cases.
774 - Better support for redirects.
775 - Use a more power-friendly network priority for beacon requests.
777 Tests: http/tests/blink/sendbeacon/*
778 http/tests/security/mixedContent/beacon/insecure-beacon-in-iframe.html
780 imported/blink/fast/beacon/*
781 imported/w3c/web-platform-tests/beacon/*
784 * DerivedSources.make:
785 * Modules/beacon/NavigatorBeacon.cpp: Added.
786 (WebCore::NavigatorBeacon::sendBeacon):
787 * Modules/beacon/NavigatorBeacon.h: Added.
788 * Modules/beacon/NavigatorBeacon.idl: Added.
789 * WebCore.xcodeproj/project.pbxproj:
790 * loader/PingLoader.cpp:
791 (WebCore::PingLoader::sendBeacon):
792 * loader/PingLoader.h:
794 2017-08-01 Filip Pizlo <fpizlo@apple.com>
796 Bmalloc and GC should put auxiliaries (butterflies, typed array backing stores) in a gigacage (separate multi-GB VM region)
797 https://bugs.webkit.org/show_bug.cgi?id=174727
799 Reviewed by Mark Lam.
801 No new tests because no change in behavior.
803 Needed to teach Metal how to allocate in the Gigacage.
805 * platform/graphics/cocoa/GPUBufferMetal.mm:
806 (WebCore::GPUBuffer::GPUBuffer):
807 (WebCore::GPUBuffer::contents):
809 2017-08-01 Fujii Hironori <Hironori.Fujii@sony.com>
811 [WinCairo] Implement Font::platformBoundsForGlyph
812 https://bugs.webkit.org/show_bug.cgi?id=174813
814 Reviewed by Alex Christensen.
816 Test: fast/text/emphasis.html
818 * platform/graphics/win/SimpleFontDataCairoWin.cpp:
819 (WebCore::Font::platformBoundsForGlyph): Implemented by copying
820 the code from Font::boundsForGDIGlyph().
822 2017-08-01 Zalan Bujtas <zalan@apple.com>
824 REGRESSION (r217197): New Yorker website hangs for a long time on load, lots of blank tiles
825 https://bugs.webkit.org/show_bug.cgi?id=175009
826 <rdar://problem/33505791>
828 Reviewed by Simon Fraser.
830 This patch ensures that we report the desktop, non-frame-flattened frame size for media queries in subframes.
831 Some websites don't expect the iframes to be expanded to the size of the content and when the media query
832 callback mutates the content (triggering frame resize), they might end up getting into a never ending layout.
834 Test: fast/frames/flattening/media-query-growing-content.html
836 * css/MediaQueryEvaluator.cpp:
837 (WebCore::orientationEvaluate):
838 (WebCore::aspectRatioEvaluate):
839 (WebCore::heightEvaluate):
840 (WebCore::widthEvaluate):
841 * page/FrameView.cpp:
842 (WebCore::FrameView::layout):
843 (WebCore::FrameView::layoutSizeForMediaQuery const):
844 (WebCore::FrameView::evaluateMediaQueryList):
847 2017-07-26 Jiewen Tan <jiewen_tan@apple.com>
849 Add tests to detect mistakes in backward compatibility when the structured clone algorithm is changed in the future
850 https://bugs.webkit.org/show_bug.cgi?id=173998
852 Reviewed by Darin Adler.
854 * bindings/js/SerializedScriptValue.cpp:
857 2017-08-01 Matt Lewis <jlewis3@apple.com>
859 Unreviewed, rolling out r220089.
861 This caused multiple crashes on macOS Debug testers.
865 "Use LazyNeverDestroyed instead of DEFINE_GLOBAL for
867 https://bugs.webkit.org/show_bug.cgi?id=175010
868 http://trac.webkit.org/changeset/220089
870 2017-08-01 Sam Weinig <sam@webkit.org>
872 [WebIDL] Swap a custom attribute for a custom mark function for HTMLTemplateElement
873 https://bugs.webkit.org/show_bug.cgi?id=175006
875 Reviewed by Chris Dumez.
877 Use the standard way of augmenting GC, visitAdditionalChildren, rather
878 than using a private name to create ownership.
880 * bindings/js/JSHTMLTemplateElementCustom.cpp:
881 (WebCore::JSHTMLTemplateElement::visitAdditionalChildren):
882 (WebCore::JSHTMLTemplateElement::content const): Deleted.
883 * html/HTMLTemplateElement.idl:
885 2017-08-01 Zan Dobersek <zdobersek@igalia.com>
887 [GCrypt] Gather crypto constants in a single location
888 https://bugs.webkit.org/show_bug.cgi?id=174091
890 Reviewed by Jiewen Tan.
892 Gather common constants used across the libgcrypt-specific Web Crypto
893 implementations in a single place -- in the GCryptUtilities.h header,
894 inside the CryptoConstants namespace. The various ASN.1 object identifiers
895 and other helper values are placed inside, in the std::array<uint8_t, N>
898 Additionally, CryptoConstants::matches() helper function is provided. It
899 compares the provided data-and-size pair with the given std::array
900 container and returns true if the std::memcmp() call returns 0.
902 Changes in CryptoKeyEC and CryptoKeyRSA consist mostly of switching to the
903 use of CryptoConstants::matches() and the CryptoConstants data arrays, as
904 well as some whitespace cleanup.
906 Additionallity in CryptoKeyEC, the helper functions covering various curve
907 attributes are reordered, renamed and reorganized for simplicity.
909 No new tests -- no changes in behavior.
911 * crypto/gcrypt/CryptoKeyECGCrypt.cpp:
912 (WebCore::curveIdentifier):
913 (WebCore::curveSize):
914 (WebCore::curveUncompressedFieldElementSize):
915 (WebCore::curveUncompressedPointSize):
916 (WebCore::CryptoKeyEC::platformImportRaw):
917 (WebCore::CryptoKeyEC::platformImportJWKPublic):
918 (WebCore::CryptoKeyEC::platformImportJWKPrivate):
919 (WebCore::supportedAlgorithmIdentifier):
920 (WebCore::curveForIdentifier):
921 (WebCore::CryptoKeyEC::platformImportSpki):
922 (WebCore::CryptoKeyEC::platformExportRaw):
923 (WebCore::CryptoKeyEC::platformAddFieldElements):
924 (WebCore::CryptoKeyEC::platformExportSpki):
925 (WebCore::CryptoKeyEC::platformExportPkcs8):
926 (WebCore::uncompressedPointSizeForCurve): Deleted.
927 (WebCore::uncompressedFieldElementSizeForCurve): Deleted.
928 * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
929 (WebCore::supportedAlgorithmIdentifier):
930 (WebCore::CryptoKeyRSA::importPkcs8):
931 (WebCore::CryptoKeyRSA::exportSpki):
932 (WebCore::CryptoKeyRSA::exportPkcs8):
933 * crypto/gcrypt/GCryptUtilities.h:
934 (WebCore::CryptoConstants::matches):
936 2017-07-31 Fujii Hironori <Hironori.Fujii@sony.com>
938 Use LazyNeverDestroyed instead of DEFINE_GLOBAL for MediaFeatureNames
939 https://bugs.webkit.org/show_bug.cgi?id=175008
941 Reviewed by Alex Christensen.
943 No new tests because no behavior change.
945 Stop using DEFINE_GLOBAL hack in favor of LazyNeverDestroyed.
947 * css/MediaFeatureNames.cpp:
948 (WebCore::MediaFeatureNames::init): Do not include
949 <wtf/StaticConstructors.h>. Use LazyNeverDestroyed instead of
950 DEFINE_GLOBAL. Call LazyNeverDestroyed::construct instead of
952 * css/MediaFeatureNames.h: Use LazyNeverDestroyed.
953 * css/MediaQueryEvaluator.cpp:
954 (WebCore::MediaQueryEvaluator::evaluate const): Dereference with ->.
956 2017-07-31 Fujii Hironori <Hironori.Fujii@sony.com>
958 Use LazyNeverDestroyed instead of DEFINE_GLOBAL for QualifiedName
959 https://bugs.webkit.org/show_bug.cgi?id=175010
961 Reviewed by Alex Christensen.
963 No new tests because no behavior change.
965 Stop using DEFINE_GLOBAL hack in favor of LazyNeverDestroyed.
967 * dom/DOMAllInOne.cpp: Remove the warning. Include QualifiedName.cpp.
968 * dom/QualifiedName.cpp:
969 (WebCore::QualifiedName::init): Call LazyNeverDestroyed::construct
970 instead of placement new.
971 * dom/QualifiedName.h: Use LazyNeverDestroyed.
973 2017-07-31 Matt Rajca <mrajca@apple.com>
975 Support quirk for letting media autoplay if the user interacted with at least one media element.
976 https://bugs.webkit.org/show_bug.cgi?id=175005
977 <rdar://problem/33476038>
979 Reviewed by Eric Carlson.
981 If the user has interacted with at least one media element, let other media elements auto-play
985 (WebCore::Document::updateIsPlayingMedia):
987 (WebCore::Document::noteUserInteractionWithMediaElement):
988 * html/HTMLMediaElement.cpp:
989 (WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture):
990 * html/MediaElementSession.cpp:
991 (WebCore::needsDocumentLevelMediaUserGestureQuirk):
992 (WebCore::MediaElementSession::playbackPermitted const):
993 * page/MediaProducer.h:
995 2017-07-31 Nan Wang <n_wang@apple.com>
997 AX: CFEqual is failing on text markers with exact same data
998 https://bugs.webkit.org/show_bug.cgi?id=175002
999 <rdar://problem/33636985>
1001 Reviewed by Chris Fleizach.
1003 We should zero the memory of the TextMarkerData instance so that it
1004 can be tested for byte-equivalence.
1006 Made sure this change won't break any of the existing tests.
1008 * accessibility/AXObjectCache.cpp:
1009 (WebCore::AXObjectCache::textMarkerDataForVisiblePosition):
1010 (WebCore::AXObjectCache::textMarkerDataForFirstPositionInTextControl):
1012 2017-07-28 Matt Rajca <mrajca@apple.com>
1014 Propagate user gesture tokens when script elements are loaded.
1015 https://bugs.webkit.org/show_bug.cgi?id=174959
1017 Reviewed by Eric Carlson.
1019 Propagate user gesture tokens when script elements are loaded (i.e. between the time an
1020 element is created and its onload handler is invoked).
1022 * dom/ScriptElement.cpp:
1023 (WebCore::ScriptElement::ScriptElement):
1024 (WebCore::ScriptElement::dispatchLoadEventRespectingUserGestureIndicator):
1025 (WebCore::ScriptElement::executeScriptAndDispatchEvent):
1026 (WebCore::ScriptElement::executePendingScript):
1027 * dom/ScriptElement.h:
1029 2017-07-31 Matt Lewis <jlewis3@apple.com>
1031 Unreviewed, rolling out r220048.
1033 This revision caused multiple crashes in fast/images. See
1038 "RenderImageResourceStyleImage::image() should return the
1039 nullImage() if the image is not available"
1040 https://bugs.webkit.org/show_bug.cgi?id=174874
1041 http://trac.webkit.org/changeset/220048
1043 2017-07-31 Sam Weinig <sam@webkit.org>
1045 Remove unnecessary exceptions from storage code
1046 https://bugs.webkit.org/show_bug.cgi?id=174572
1048 Reviewed by Chris Dumez.
1050 Remove checks for canAccessStorage() and the exceptions they would cause.
1051 These were used for Storage in ephemeral sessions, but they are now supported.
1052 Add checks for a null frame to functions that can mutate the storage, as the
1053 frame is needed for that, and it retains our existing behavior for disconnected
1054 frames. By removing these checks / exceptions, we can fully generate Storage.idl.
1057 * WebCore.xcodeproj/project.pbxproj:
1058 * bindings/js/JSBindingsAllInOne.cpp:
1059 * bindings/js/JSStorageCustom.cpp: Removed.
1060 Remove JSStorageCustom.cpp
1062 * loader/EmptyClients.cpp:
1063 * page/DOMWindow.cpp:
1064 (WebCore::DOMWindow::sessionStorage):
1065 (WebCore::DOMWindow::localStorage):
1066 * storage/StorageArea.h:
1067 Remove canAccessStorage.
1069 * storage/Storage.cpp:
1070 (WebCore::Storage::length):
1071 (WebCore::Storage::key):
1072 (WebCore::Storage::getItem):
1073 (WebCore::Storage::setItem):
1074 (WebCore::Storage::removeItem):
1075 (WebCore::Storage::clear):
1076 (WebCore::Storage::contains):
1077 (WebCore::Storage::isSupportedPropertyName):
1078 (WebCore::Storage::supportedPropertyNames):
1079 * storage/Storage.h:
1080 * storage/Storage.idl:
1081 Remove canAccessStorage checks and corresponding exceptions. Add supportedPropertyNames
1082 to allow the removal of the [CustomGetOwnPropertyNames].
1084 2017-07-31 Matt Lewis <jlewis3@apple.com>
1086 Unreviewed, rolling out r220060.
1088 This broke our internal builds. Contact reviewer of patch for
1093 "Merge WTFThreadData to Thread::current"
1094 https://bugs.webkit.org/show_bug.cgi?id=174716
1095 http://trac.webkit.org/changeset/220060
1097 2017-07-31 Yusuke Suzuki <utatane.tea@gmail.com>
1099 Merge WTFThreadData to Thread::current
1100 https://bugs.webkit.org/show_bug.cgi?id=174716
1102 Reviewed by Sam Weinig.
1104 Use Thread::current() instead.
1106 * fileapi/AsyncFileStream.cpp:
1107 * platform/ThreadGlobalData.cpp:
1108 (WebCore::ThreadGlobalData::ThreadGlobalData):
1109 * platform/graphics/cocoa/WebCoreDecompressionSession.h:
1110 * platform/ios/wak/WebCoreThread.mm:
1112 * workers/WorkerThread.cpp:
1113 (WebCore::WorkerThread::workerThread):
1115 2017-07-31 Xabier Rodriguez Calvar <calvaris@igalia.com>
1117 Created a bool pretty printer at WTF for debugging purposes
1118 https://bugs.webkit.org/show_bug.cgi?id=174893
1120 Reviewed by Darin Adler.
1122 Use WTF::boolPrettyPrinter in debugging messages.
1124 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1125 (WebCore::MediaPlayerPrivateGStreamerBase::supportsKeySystem):
1126 * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
1127 (WebCore::MediaPlayerPrivateGStreamerMSE::seek):
1129 2017-07-30 Zan Dobersek <zdobersek@igalia.com>
1131 Unreviewed. Suppress the -Wextra compiler warning when building with GCC 6.3.0,
1132 explicitly initializing the RefCounted<> base class in the
1133 FetchHeaders(const FetchHeaders&) constructor.
1135 Note that while that's the signature of the copy constructor for the FetchHeaders
1136 class, the base RefCounted<> class is not copyable, so the default RefCounted<>
1137 constructor is used, but the FetchHeaders resources are normally copied into the
1138 new object from the one that's passed in.
1140 * Modules/fetch/FetchHeaders.h:
1141 (WebCore::FetchHeaders::FetchHeaders):
1143 2017-07-30 Darin Adler <darin@apple.com>
1145 Remove code in HTMLObjectElement attribute parsing that forces style resolution and layout
1146 https://bugs.webkit.org/show_bug.cgi?id=130653
1148 Reviewed by Antti Koivisto.
1150 Also fixes a bug where load events are delivered prematurely in some cases
1151 when an object, embed, frame, or iframe element is still loading.
1154 (WebCore::Document::loadEventDelayTimerFired): Added a call to
1155 FrameLoader::checkLoadComplete. Goes along with the change to
1156 FrameLoader::checkLoadCompleteForThisFrame, which now respects the
1157 isDelayingLoadEvent flag.
1159 * html/HTMLAppletElement.cpp:
1160 (WebCore::HTMLAppletElement::HTMLAppletElement): Removed the createdByParser argument,
1161 no longer needed by the base class.
1162 (WebCore::HTMLAppletElement::create): Added call to finishCreating, which is now part of
1163 the process of creating any object in a class derived from HTMLPlugInImageElement.
1164 (WebCore::HTMLAppletElement::updateWidget): Rearranged logic so setNeedsWidgetUpdate
1165 is only called when it's becoming false; avoids a false/true/false round trip that can
1167 * html/HTMLAppletElement.h: Updated for the above.
1169 * html/HTMLEmbedElement.cpp:
1170 (WebCore::HTMLEmbedElement::HTMLEmbedElement): Removed the createdByParser argument,
1171 no longer needed by the base class.
1172 (WebCore::HTMLEmbedElement::create): Added call to finishCreating, which is now part of
1173 the process of creating any object in a class derived from HTMLPlugInImageElement.
1174 (WebCore::HTMLEmbedElement::parseAttribute): Changed srcAttr to call
1175 updateImageLoaderWithNewURLSoon to do the image loading logic.
1176 (WebCore::HTMLEmbedElement::updateWidget): Rearranged logic so setNeedsWidgetUpdate
1177 is only called when it's becoming false; avoids a false/true/false round trip that can
1179 * html/HTMLEmbedElement.h: Updated for the above.
1181 * html/HTMLMediaElement.cpp:
1182 (WebCore::HTMLMediaElement::setReadyState): Call setShouldDelayLoadEvent(false) when
1183 transitioning to HAVE_CURRENT_DATA (or beyond), even if we have already fired a loadeddata
1184 event in the past. This matches what the HTML specification calls for, but only if you
1185 read it carefully. Without this change, and with the more complete implementation of
1186 load event delay below, one of the regression tests hangs because are permanently stuck
1187 dealying load events. Also added a FIXME about other code that likely has a similar
1188 problem; the symptom is likely to be subtle and minor, though.
1190 * html/HTMLObjectElement.cpp:
1191 (WebCore::HTMLObjectElement::HTMLObjectElement): Removed the createdByParser argument,
1192 no longer needed by the base class.
1193 (WebCore::HTMLObjectElement::create): Added call to finishCreating, which is now part of
1194 the process of creating any object in a class derived from HTMLPlugInImageElement.
1195 (WebCore::HTMLObjectElement::parseAttribute): Changed dataAttr to use
1196 updateImageLoaderWithNewURLSoon. Explicitly call scheduleUpdateForAfterStyleResolution
1197 since just calling invalidateStyleAndRenderersForSubtree alone is no longer sufficient.
1198 (WebCore::HTMLObjectElement::updateWidget): Rearranged logic so setNeedsWidgetUpdate
1199 is only called when it's becoming false; avoids a false/true/false round trip that can
1201 (WebCore::HTMLObjectElement::childrenChanged): Added calls to the new
1202 scheduleUpdateForAfterStyleResolution since invalidating style is no longer sufficient.
1203 (WebCore::HTMLObjectElement::renderFallbackContent): Remove the call to
1204 updateStyleIfNeeded. This is the main change that the title of this bug refers to.
1205 * html/HTMLObjectElement.h: Updated for the above. Also removed the
1206 clearUseFallbackContent function because it's clearer to set the data member in
1207 line at the single call site in HTMLObjectElement::parseAttribute.
1209 * html/HTMLPlugInImageElement.cpp:
1210 (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): Removed the createdByParser
1211 argument; no need to set an m_needsWidgetUpdate flag differently for parser cases now.
1212 (WebCore::HTMLPlugInImageElement::finshCreating): Added. To be called after creating
1213 an element to do work that can't be done in a constructor.
1214 (WebCore::HTMLPlugInImageElement::didRecalcStyle): Added. Calls the new
1215 scheduleUpdateForAfterStyleResolution function.
1216 (WebCore::HTMLPlugInImageElement::didAttachRenderers): Moved all the logic from this
1217 function into scheduleUpdateForAfterStyleResolution. Also added a call through to the base
1218 class; cleans things up, even though it's just an assertion.
1219 (WebCore::HTMLPlugInImageElement::willDetachRenderers): Removed the call to
1220 setNeedsWidgetUpdate(true) here; no longer needed because the new logic already
1221 does the right thing in this case.
1222 (WebCore::HTMLPlugInImageElement::updateWidgetIfNecessary): Deleted. Now handled by
1223 updateAfterStyleResolution instead.
1224 (WebCore::HTMLPlugInImageElement::finishParsingChildren): Deleted. Handling updates
1225 after parsing all the children now comes naturally out of the new implementation.
1226 (WebCore::HTMLPlugInImageElement::scheduleUpdateForAfterStyleResolution): Added.
1227 Schedules a call to updateAfterStyleResolution when needed, and equally importantly,
1228 increments the load event delay count to make sure that loads that are part of that
1229 update can participate in decision about whether it's time for the load event.
1230 (WebCore::HTMLPlugInImageElement::updateAfterStyleResolution): Added.
1231 Combines updateWidgetIfNecessary and startLoadingImage, and also deals with the new
1232 m_needsImageReload boolean in cases where no actual loading is done.
1233 (WebCore::HTMLPlugInImageElement::didMoveToNewDocument): Update load event delay
1234 count when moving an element that is in the middle of loading. This lets the
1235 updateAfterStyleResolution function do the right thing even when the element is
1236 moved without leaving anything stuck in a strange state.
1237 (WebCore::HTMLPlugInImageElement::prepareForDocumentSuspension): Call the new
1238 scheduleUpdateForAfterStyleResolution since invalidating style is no longer sufficient.
1239 (WebCore::HTMLPlugInImageElement::startLoadingImage): Deleted. Now handled by
1240 updateAfterStyleResolution instead.
1241 (WebCore::HTMLPlugInImageElement::updateImageLoaderWithNewURLSoon): Added. Does all
1242 the right things for when an image URL is changed; for use by the concrete derived classes.
1243 * html/HTMLPlugInImageElement.h: Updated for above changes. Also made m_imageLoader
1244 private rather than protected, and added the two new boolean data members.
1246 * html/HTMLTagNames.in: Removed unneeded constructorNeedsCreatedByParser flags for
1247 applet, embed, and object.
1249 * loader/DocumentLoader.cpp:
1250 (WebCore::DocumentLoader::isLoadingInAPISense): Return true if the document is
1251 delaying a load event.
1253 * loader/FrameLoader.cpp:
1254 (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Don't do any work if
1255 isDelayingLoadEvent is true; otherwise this function can have a side effect of
1256 triggering the load event.
1257 (WebCore::FrameLoader::detachFromParent): Schedule a checkLoadComplete here, too, not
1258 just a checkCompleted. This is relevant if the frame we are detaching was delaying
1259 a load event because it no longer will be and so the load might be complete.
1261 2017-07-30 Sam Weinig <sam@webkit.org>
1263 [WebIDL] Remove JS builtin bindings for FetchRequest, DOMWindowFetch and WorkerGlobalScopeFetch
1264 https://bugs.webkit.org/show_bug.cgi?id=174974
1266 Reviewed by Darin Adler.
1269 * DerivedSources.make:
1270 * WebCore.xcodeproj/project.pbxproj:
1271 * Modules/fetch/DOMWindowFetch.js: Removed.
1272 * Modules/fetch/FetchRequest.js: Removed.
1273 * Modules/fetch/WorkerGlobalScopeFetch.js: Removed.
1274 Remove builtin files.
1276 * Modules/fetch/DOMWindowFetch.cpp:
1277 (WebCore::DOMWindowFetch::fetch):
1278 * Modules/fetch/DOMWindowFetch.h:
1279 * Modules/fetch/DOMWindowFetch.idl:
1280 * Modules/fetch/WorkerGlobalScopeFetch.cpp:
1281 (WebCore::WorkerGlobalScopeFetch::fetch):
1282 * Modules/fetch/WorkerGlobalScopeFetch.h:
1283 * Modules/fetch/WorkerGlobalScopeFetch.idl:
1284 Remove builtin and instead create FetchRequest in the implementation.
1286 * Modules/fetch/FetchBody.cpp:
1287 (WebCore::FetchBody::extract):
1288 * Modules/fetch/FetchBody.h:
1289 * Modules/fetch/FetchBodyOwner.cpp:
1290 (WebCore::FetchBodyOwner::extractBody):
1291 * Modules/fetch/FetchBodyOwner.h:
1292 * Modules/fetch/FetchResponse.cpp:
1293 * Modules/fetch/FetchResponse.h:
1294 Rename FetchBody::BindingDataType to FetchBody::Init to match its IDL naming.
1296 * Modules/fetch/FetchHeaders.cpp:
1297 (WebCore::appendToHeaderMap):
1298 (WebCore::fillHeaderMap):
1299 (WebCore::FetchHeaders::create):
1300 (WebCore::FetchHeaders::fill):
1301 * Modules/fetch/FetchHeaders.h:
1302 Add helpers to implement the fill algorithm for various input types.
1303 Leave the existing fill for now, as it is still used by the FetchResponse
1304 builtin, but will eventually be removed.
1306 * Modules/fetch/FetchRequest.cpp:
1307 (WebCore::FetchRequest::initializeOptions):
1308 (WebCore::FetchRequest::initializeWith):
1309 (WebCore::FetchRequest::setBody):
1310 (WebCore::FetchRequest::create):
1311 (WebCore::FetchRequest::setBodyFromInputRequest): Deleted.
1312 * Modules/fetch/FetchRequest.h:
1313 Migrate builtin code to the implementation. This is 1-to-1 re-implementation,
1314 so I did not attempt to fix any conformance issues. That will come in follow up.
1316 * Modules/fetch/FetchRequest.idl:
1317 Replace builtins with an IDL constructor.
1319 * Modules/fetch/FetchRequestInit.h:
1320 * Modules/fetch/FetchRequestInit.idl:
1321 Add missing headers and body to FetchRequestInit.
1323 2017-07-30 Said Abou-Hallawa <sabouhallawa@apple.com>
1325 RenderImageResourceStyleImage::image() should return the nullImage() if the image is not available
1326 https://bugs.webkit.org/show_bug.cgi?id=174874
1327 <rdar://problem/33530130>
1329 Reviewed by Darin Adler.
1331 If an <img> element has image content data for a none cached image, e.g.
1332 -webkit-named-image, RenderImageResourceStyleImage will be created and
1333 attached to the RenderImage. RenderImageResourceStyleImage::m_cachedImage
1334 will be set to null because the m_styleImage->isCachedImage() is false in
1335 this case. When ImageLoader finishes loading the url of the src attribute,
1336 RenderImageResource::setCachedImage() will be called to set m_cachedImage.
1338 A crash will happen when the RenderImage is destroyed. Destroying the
1339 RenderImage calls RenderImageResourceStyleImage::shutdown() which checks
1340 m_cachedImage and finds it not null, so it calls RenderImageResourceStyleImage::image()
1341 which ends up calling CSSNamedImageValue::image() which returns a null pointer
1342 because the size is empty. RenderImageResourceStyleImage::shutdown() calls
1343 image()->stopAnimation() without checking the return value of image().
1345 Like the base class virtual method RenderImageResource::image(),
1346 RenderImageResourceStyleImage::image() should return the nullImage() if
1347 the image is not available.
1349 Test: fast/images/image-element-image-content-data.html
1351 * css/CSSCrossfadeValue.cpp:
1352 * css/CSSFilterImageValue.cpp:
1353 * page/EventHandler.cpp:
1354 * page/PageSerializer.cpp:
1355 * rendering/RenderElement.cpp:
1356 * rendering/RenderImageResource.cpp:
1357 * rendering/RenderImageResourceStyleImage.cpp:
1358 (WebCore::RenderImageResourceStyleImage::initialize):
1360 (WebCore::RenderImageResourceStyleImage::shutdown): Revert back the changes
1361 of r208511 in this function. Add a call to image()->stopAnimation() without
1362 checking the return of image() since it will return the nullImage() if
1363 the image not available. There is no need to check m_cachedImage before
1364 calling image() because image() does not check or access m_cachedImage.
1366 (WebCore::RenderImageResourceStyleImage::image): The base class method
1367 RenderImageResource::image() returns the nullImage() if the image not
1368 available. This is because CachedImage::imageForRenderer() returns
1369 the nullImage() if the image is not available; see CachedImage.h. We should
1370 do the same for the derived class for consistency.
1372 * rendering/style/ContentData.cpp:
1373 * rendering/style/StyleCachedImage.cpp:
1374 * style/StylePendingResources.cpp:
1376 2017-07-29 Filip Pizlo <fpizlo@apple.com>
1378 Unreviewed, rollout r220044 because it set the bots on fire.
1380 It seems that the "-Wunguarded-availability-new" pragma is not widely supported. So, a bunch of the
1381 Mac bots are now unable to build and that includes EWS.
1383 Fixing by rolling it out.
1385 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
1386 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1387 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1388 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setHasAvailableAudioSample):
1389 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer):
1390 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeAudioRenderer):
1391 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
1392 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1393 (-[WebAVSampleBufferErrorListener beginObservingRenderer:]):
1394 (-[WebAVSampleBufferErrorListener stopObservingRenderer:]):
1395 (-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):
1396 (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
1397 (WebCore::SourceBufferPrivateAVFObjC::rendererDidReceiveError):
1398 (WebCore::SourceBufferPrivateAVFObjC::flush):
1400 2017-07-29 Dan Bernstein <mitz@apple.com>
1402 Fixed building for macOS 10.12 with the macOS 10.13 SDK.
1404 Suppressed the unguarded-availability-new warning around uses of AVSampleBufferAudioRenderer
1405 and AVSampleBufferRenderSynchronizer. Even though the 10.13 SDK declares them as available
1406 starting in that release, they have been available as SPI earlier.
1408 * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
1409 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1410 * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1411 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setHasAvailableAudioSample):
1412 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer):
1413 (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeAudioRenderer):
1414 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
1415 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1416 (-[WebAVSampleBufferErrorListener beginObservingRenderer:]):
1417 (-[WebAVSampleBufferErrorListener stopObservingRenderer:]):
1418 (-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):
1419 (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
1420 (WebCore::SourceBufferPrivateAVFObjC::rendererDidReceiveError):
1421 (WebCore::SourceBufferPrivateAVFObjC::flush):
1423 2017-07-29 Nan Wang <n_wang@apple.com>
1425 AX: findMatchingObjects doesn't work when the startObject is ignored
1426 https://bugs.webkit.org/show_bug.cgi?id=174965
1428 Reviewed by Chris Fleizach.
1430 findMatchingObjects would return a wrong element if we pass in an ignored
1431 start object. To fix this, we should use the closest accessible sibling as
1434 Test: accessibility/mac/search-predicate-from-ignored-element.html
1436 * accessibility/AccessibilityObject.cpp:
1437 (WebCore::appendChildrenToArray):
1439 2017-07-29 Aaron Chu <aaron_chu@apple.com>
1441 AX: FKA: Buttons need a visible focus indicator
1442 https://bugs.webkit.org/show_bug.cgi?id=171040
1443 <rdar://problem/30922548>
1445 Reviewed by Antoine Quint.
1447 Added a background color for the focus state of the icon buttons in modern media controls.
1449 Test: media/modern-media-controls/button/button-focus-state.html
1451 * Modules/modern-media-controls/controls/button.css:
1453 (button:focus > picture):
1454 * Modules/modern-media-controls/controls/slider.css:
1457 2017-07-28 Sam Weinig <sam@webkit.org>
1459 [WebIDL] Remove JS builtin bindings for FetchHeaders
1460 https://bugs.webkit.org/show_bug.cgi?id=174905
1462 Reviewed by Alex Christensen.
1465 * DerivedSources.make:
1466 * WebCore.xcodeproj/project.pbxproj:
1467 * Modules/fetch/FetchHeaders.js: Removed.
1468 Remove FetchHeaders.js
1470 * Modules/fetch/FetchHeaders.cpp:
1471 (WebCore::appendToHeaderMap):
1472 (WebCore::FetchHeaders::create):
1473 (WebCore::FetchHeaders::append):
1474 * Modules/fetch/FetchHeaders.h:
1475 (WebCore::FetchHeaders::FetchHeaders):
1476 Add create function for generated constructor.
1477 Add appendToHeaderMap static function which takes the functionality
1478 from the existing append function, and makes it useable in create.
1480 * Modules/fetch/FetchHeaders.idl:
1481 Replace [JSBuiltinConstructor] with real constructor. Keep other builtin
1482 attributes as they are still used by other Fetch code.
1484 * bindings/js/JSDOMConvertRecord.h:
1485 Fix record conversion to work with proxies by changing to use the method table
1486 for getOwnPropertyNames, and undefined values by not excluding undefined values.
1488 2017-07-28 Matt Baker <mattbaker@apple.com>
1490 Web Inspector: capture an async stack trace when web content calls addEventListener
1491 https://bugs.webkit.org/show_bug.cgi?id=174739
1492 <rdar://problem/33468197>
1494 Reviewed by Brian Burg.
1496 Test: inspector/debugger/async-stack-trace.html
1498 Add instrumentation to EventTarget to support showing asynchronous
1499 stack traces when the debugger breaks in a script event listener.
1501 * dom/EventTarget.cpp:
1502 (WebCore::EventTarget::addEventListener):
1503 (WebCore::EventTarget::removeEventListener):
1504 (WebCore::EventTarget::fireEventListeners):
1505 * inspector/InspectorInstrumentation.cpp:
1506 (WebCore::InspectorInstrumentation::didAddEventListenerImpl):
1507 (WebCore::InspectorInstrumentation::willRemoveEventListenerImpl):
1508 (WebCore::InspectorInstrumentation::willHandleEventImpl):
1509 (WebCore::InspectorInstrumentation::didHandleEventImpl):
1510 * inspector/InspectorInstrumentation.h:
1511 (WebCore::InspectorInstrumentation::didAddEventListener):
1512 (WebCore::InspectorInstrumentation::willRemoveEventListener):
1513 (WebCore::InspectorInstrumentation::willHandleEvent):
1514 (WebCore::InspectorInstrumentation::didHandleEvent):
1515 * inspector/PageDebuggerAgent.cpp:
1516 (WebCore::PageDebuggerAgent::didClearAsyncStackTraceData):
1517 (WebCore::PageDebuggerAgent::didAddEventListener):
1518 (WebCore::PageDebuggerAgent::willRemoveEventListener):
1519 (WebCore::PageDebuggerAgent::willHandleEvent):
1520 * inspector/PageDebuggerAgent.h:
1522 2017-07-28 Matt Rajca <mrajca@apple.com>
1524 Don't add autoplay restrictions to media elements created in response to user gestures.
1525 https://bugs.webkit.org/show_bug.cgi?id=174947
1527 Reviewed by Eric Carlson.
1529 Test: media/video-create-with-user-gesture.html
1531 * html/HTMLMediaElement.cpp:
1532 (WebCore::HTMLMediaElement::HTMLMediaElement):
1534 2017-07-28 Jeremy Jones <jeremyj@apple.com>
1536 WebMediaSessionHelper calls -[UIApplication beginReceivingRemoteControlEvents] from WebThread
1537 https://bugs.webkit.org/show_bug.cgi?id=174934
1538 rdar://problem/33586772
1540 Reviewed by Eric Carlson.
1542 No new tests because no effect on DOM.
1544 This dispatches a UIKit call to the main thread since it might happen on WebThread in WK1.
1546 * platform/audio/ios/MediaSessionManagerIOS.mm:
1547 (-[WebMediaSessionHelper initWithCallback:]):
1549 2017-07-28 Myles C. Maxfield <mmaxfield@apple.com>
1551 [macOS] Reeder's defaults font is Times instead of San Francisco
1552 https://bugs.webkit.org/show_bug.cgi?id=174885
1553 <rdar://problem/33462483>
1555 Reviewed by Simon Fraser.
1557 Reeder uses explicit dot-prefixed names in its source code. Within Core Text,
1558 dot-prefixed names cannot be matched case insensitively. The solution is to
1559 not case-fold these family names, and to make our caches case sensitive for
1560 these special names.
1562 Tests: fast/text/font-lookup-dot-prefix-case-sensitive-2.html
1563 fast/text/font-lookup-dot-prefix-case-sensitive.html
1565 * platform/graphics/FontCache.cpp:
1566 (WebCore::FontPlatformDataCacheKey::operator==):
1567 (WebCore::FontPlatformDataCacheKeyHash::hash):
1568 * platform/graphics/FontCascade.cpp:
1569 (WebCore::keysMatch):
1570 (WebCore::computeFontCascadeCacheHash):
1571 * platform/graphics/FontDescription.cpp:
1572 (WebCore::FontCascadeDescription::familyNamesAreEqual):
1573 (WebCore::FontCascadeDescription::familyNameHash):
1574 (WebCore::FontCascadeDescription::foldedFamilyName):
1575 * platform/graphics/FontDescription.h:
1576 * platform/graphics/cocoa/FontCacheCoreText.cpp:
1577 (WebCore::FontDatabase::fontForPostScriptName):
1579 2017-07-28 Devin Rousso <drousso@apple.com>
1581 Web Inspector: Record actions performed on CanvasRenderingContext2D
1582 https://bugs.webkit.org/show_bug.cgi?id=174482
1584 Reviewed by Joseph Pecoraro.
1586 Tests: inspector/canvas/recording-2d.html
1587 inspector/canvas/recording.html
1589 * html/canvas/CanvasRenderingContext2D.idl:
1590 Add CallTracingCallback to interface to record all API calls.
1592 * html/HTMLCanvasElement.cpp:
1593 (WebCore::HTMLCanvasElement::paint):
1594 If a recording is active, mark the current frame as completed.
1596 * bindings/scripts/CodeGeneratorJS.pm:
1597 (GenerateAttributeGetterBodyDefinition):
1598 (GenerateAttributeSetterBodyDefinition):
1599 (GenerateImplementationFunctionCall):
1600 (GenerateCallTracerParameter):
1601 (GenerateCallTracer):
1602 * bindings/scripts/test/TestCallTracer.idl:
1603 * bindings/scripts/test/JS/JSTestCallTracer.cpp:
1604 (WebCore::setJSTestCallTracerTestAttributeInterfaceSetter):
1605 (WebCore::setJSTestCallTracerTestAttributeSpecifiedSetter):
1606 (WebCore::jsTestCallTracerTestAttributeWithVariantGetter):
1607 (WebCore::jsTestCallTracerTestAttributeWithVariant):
1608 (WebCore::setJSTestCallTracerTestAttributeWithVariantSetter):
1609 (WebCore::setJSTestCallTracerTestAttributeWithVariant):
1610 (WebCore::jsTestCallTracerPrototypeFunctionTestOperationInterfaceBody):
1611 (WebCore::jsTestCallTracerPrototypeFunctionTestOperationSpecifiedBody):
1612 (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithArgumentsBody):
1613 (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithNullableArgumentBody):
1614 (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithVariantArgumentBody):
1615 (WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithVariantArgument):
1616 * inspector/InspectorCanvas.h:
1617 * inspector/InspectorCanvas.cpp:
1618 (WebCore::InspectorCanvas::recordAction):
1619 (WebCore::InspectorCanvas::buildAction):
1620 Change CallTracer IDL generation to flatten any variants so that all types for the
1621 parameters of an action are able to be listed in a single variant. This prevents possible
1622 ambiguity when constructing the variant, as they require that exactly one type be
1623 constructible and a sub-variant might not satisfy that condition. This was only an issue for
1626 * bindings/js/CallTracer.h:
1627 * bindings/js/CallTracer.cpp:
1628 (WebCore::CallTracer::recordCanvasAction):
1629 * bindings/js/CallTracerTypes.h:
1630 * inspector/InspectorCanvasAgent.h:
1631 * inspector/InspectorCanvasAgent.cpp:
1632 (WebCore::InspectorCanvasAgent::recordCanvasAction):
1633 * inspector/InspectorInstrumentation.h:
1634 * inspector/InspectorInstrumentation.cpp:
1635 (WebCore::InspectorInstrumentation::recordCanvasAction):
1636 (WebCore::InspectorInstrumentation::recordCanvasActionImpl):
1637 Rename CanvasActionParameterVariant to RecordCanvasActionVariant to match what is expected by
1638 the IDL generator. Also remove unnecessary includes now that they are in CallTracerTypes.h.
1641 * bindings/js/JSBindingsAllInOne.cpp:
1642 Add CallTracer for CMake builds.
1644 2017-07-28 Sam Weinig <sam@webkit.org>
1646 [WebIDL] Split-up and cleanup Fetch IDL files in preparation for removing unnecessary js builtins
1647 https://bugs.webkit.org/show_bug.cgi?id=174915
1649 Reviewed by Alex Christensen.
1651 - Split FetchRequest enums and Init dictionary out of FetchRequest so they
1652 can be used from other files like WorkerGlobalScopeFetch and DOMWindowFetch.
1653 - Add missing FetchResponseInit. Currently unused but will be in a subsequent patch.
1654 - Add and update comments about missing properties and functions.
1657 * DerivedSources.make:
1658 * WebCore.xcodeproj/project.pbxproj:
1659 * Modules/fetch/DOMWindowFetch.idl:
1660 * Modules/fetch/FetchBody.idl:
1661 * Modules/fetch/FetchBodyOwner.h:
1662 * Modules/fetch/FetchHeaders.h:
1663 * Modules/fetch/FetchHeaders.idl:
1664 * Modules/fetch/FetchReferrerPolicy.h: Added.
1665 * Modules/fetch/FetchReferrerPolicy.idl: Added.
1666 * Modules/fetch/FetchRequest.h:
1667 * Modules/fetch/FetchRequest.idl:
1668 * Modules/fetch/FetchRequestCache.h: Added.
1669 * Modules/fetch/FetchRequestCache.idl: Added.
1670 * Modules/fetch/FetchRequestCredentials.h: Added.
1671 * Modules/fetch/FetchRequestCredentials.idl: Added.
1672 * Modules/fetch/FetchRequestInit.h: Added.
1673 * Modules/fetch/FetchRequestInit.idl: Added.
1674 * Modules/fetch/FetchRequestMode.h: Added.
1675 * Modules/fetch/FetchRequestMode.idl: Added.
1676 * Modules/fetch/FetchRequestRedirect.h: Added.
1677 * Modules/fetch/FetchRequestRedirect.idl: Added.
1678 * Modules/fetch/FetchResponse.h:
1679 * Modules/fetch/FetchResponse.idl:
1680 * Modules/fetch/WorkerGlobalScopeFetch.idl:
1682 2017-07-28 Myles C. Maxfield <mmaxfield@apple.com>
1684 REGRESSION(r216944): Fallback fonts erroneously visible when the primary font is loading
1685 https://bugs.webkit.org/show_bug.cgi?id=174772
1686 <rdar://problem/33267643>
1688 Reviewed by Simon Fraser.
1690 During a font load, we try pretty hard to find a font to use that isn't the
1691 last resort font (which happens to be Times). We do this by iterating through
1692 all the fonts in the font-family list, as well as through all the relevant
1693 @font-face blocks which share the requested font family name.
1695 Unfortunately, if we find one of these fallback fonts, we were simply using it
1696 directly, which means that it was being drawn as visible (because the
1697 visibility setting lives inside the Font object). Instead, we should carry the
1698 invisibility setting from the interstitial font to this used fallback font.
1700 This patch is an extension of r219221, which fixed the problem only for system
1701 fallback fonts. This patch adopts the same methodology to all fallback fonts.
1703 Test: http/tests/webfont/font-loading-system-fallback-visibility-FontRanges.html
1705 * platform/graphics/FontCascadeFonts.cpp:
1706 (WebCore::FontCascadeFonts::glyphDataForVariant):
1707 (WebCore::glyphPageFromFontRanges):
1708 * platform/graphics/FontRanges.cpp:
1709 (WebCore::FontRanges::glyphDataForCharacter):
1711 2017-07-28 Frederic Wang <fwang@igalia.cpm>
1713 Fix typo in scrollPositionChangedViaDelegatedScrolling
1714 https://bugs.webkit.org/show_bug.cgi?id=174937
1716 Reviewed by Wenson Hsieh.
1718 No new tests, fix typo in the inUserInteraction parameter.
1720 * page/scrolling/ScrollingTree.cpp:
1721 (WebCore::ScrollingTree::scrollPositionChangedViaDelegatedScrolling):
1722 * page/scrolling/ScrollingTree.h:
1724 2017-07-28 Wenson Hsieh <wenson_hsieh@apple.com>
1726 [iOS DnD] [WK1] Snapshots generated using -[DOMRange renderImageForcingBlackText:] are upside down
1727 https://bugs.webkit.org/show_bug.cgi?id=174928
1728 <rdar://problem/33584280>
1730 Reviewed by Tim Horton.
1732 Pulls the implementation of createDragImageForRange out into DragImageIOS, and use TextIndicator to generate a
1733 snapshot instead of FrameSelection's snapshotting utilities. This makes snapshotting a DOMRange behave the same
1734 way as snapshotting a dragged selection.
1736 No way of testing TextIndicator-based snapshotting yet.
1738 * platform/DragImage.cpp:
1740 Guard createDragImageForRange for !PLATFORM(IOS).
1742 * platform/ios/DragImageIOS.mm:
1743 (WebCore::createDragImageForSelection):
1745 Add a FIXME to point out that having an additional context flip inside the UIGraphicsImageRenderer block results
1746 in an upside-down drag image being returned from createDragImageFromImage. This image is being flipped elsewhere
1747 in drag initiation code, which eventually results in the correct orientation; we'll need further investigation
1748 to remove this extraneous flip.
1750 (WebCore::createDragImageForRange):
1752 2017-07-28 Jeremy Jones <jeremyj@apple.com>
1754 Remove Web prefix from WebVideoFullscreen and WebPlaybackSession classes.
1755 https://bugs.webkit.org/show_bug.cgi?id=174437
1757 Reviewed by Darin Adler.
1759 No new tests because no behavior change.
1761 Remove redundant Web- prefix from classes in WebCore namespace.
1763 * WebCore.xcodeproj/project.pbxproj:
1764 * html/HTMLMediaElement.cpp:
1765 * html/HTMLVideoElement.cpp:
1766 * platform/cocoa/PlaybackSessionInterface.h: Renamed from Source/WebCore/platform/cocoa/WebPlaybackSessionInterface.h.
1767 (WebCore::PlaybackSessionInterface::~PlaybackSessionInterface):
1768 * platform/cocoa/PlaybackSessionModel.h: Renamed from Source/WebCore/platform/cocoa/WebPlaybackSessionModel.h.
1769 (WebCore::PlaybackSessionModel::~PlaybackSessionModel):
1770 (WebCore::PlaybackSessionModelClient::~PlaybackSessionModelClient):
1771 (WebCore::PlaybackSessionModelClient::externalPlaybackChanged):
1772 * platform/cocoa/PlaybackSessionModelMediaElement.h: Renamed from Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.h.
1773 * platform/cocoa/PlaybackSessionModelMediaElement.mm: Renamed from Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.mm.
1774 * platform/cocoa/VideoFullscreenChangeObserver.h: Renamed from Source/WebCore/platform/cocoa/WebVideoFullscreenChangeObserver.h.
1775 (WebCore::VideoFullscreenChangeObserver::~VideoFullscreenChangeObserver):
1776 * platform/cocoa/VideoFullscreenModel.h: Renamed from Source/WebCore/platform/cocoa/WebVideoFullscreenModel.h.
1777 (WebCore::VideoFullscreenModel::~VideoFullscreenModel):
1778 (WebCore::VideoFullscreenModelClient::~VideoFullscreenModelClient):
1779 * platform/cocoa/VideoFullscreenModelVideoElement.h: Renamed from Source/WebCore/platform/cocoa/WebVideoFullscreenModelVideoElement.h.
1780 (WebCore::VideoFullscreenModelVideoElement::create):
1781 * platform/cocoa/VideoFullscreenModelVideoElement.mm: Renamed from Source/WebCore/platform/cocoa/WebVideoFullscreenModelVideoElement.mm.
1782 * platform/ios/PlaybackSessionInterfaceAVKit.h: Renamed from Source/WebCore/platform/ios/WebPlaybackSessionInterfaceAVKit.h.
1783 * platform/ios/PlaybackSessionInterfaceAVKit.mm: Renamed from Source/WebCore/platform/ios/WebPlaybackSessionInterfaceAVKit.mm.
1784 * platform/ios/VideoFullscreenInterfaceAVKit.h: Renamed from Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.h.
1785 * platform/ios/VideoFullscreenInterfaceAVKit.mm: Renamed from Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm.
1786 * platform/ios/WebAVPlayerController.h:
1787 * platform/ios/WebAVPlayerController.mm:
1788 * platform/ios/WebVideoFullscreenControllerAVKit.mm:
1789 * platform/mac/PlaybackSessionInterfaceMac.h: Renamed from Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.h.
1790 * platform/mac/PlaybackSessionInterfaceMac.mm: Renamed from Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.mm.
1791 * platform/mac/VideoFullscreenInterfaceMac.h: Renamed from Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.h.
1792 * platform/mac/VideoFullscreenInterfaceMac.mm: Renamed from Source/WebCore/platform/mac/WebVideoFullscreenInterfaceMac.mm.
1793 * platform/mac/WebPlaybackControlsManager.h:
1794 * platform/mac/WebPlaybackControlsManager.mm:
1796 2017-07-27 Jeremy Jones <jeremyj@apple.com>
1798 Don't override _allowsMediaDocumentInlinePlayback in MediaDocument with playsinlineAttr.
1799 https://bugs.webkit.org/show_bug.cgi?id=174850
1800 rdar://problem/33449903
1802 Reviewed by Jon Lee.
1804 This change removes playsinlineAttr from MediaDocument so that it doesn't override the setting
1805 from _allowsMediaDocumentInlinePlayback. In its place is an update to requiresFullscreenForVideoPlayback
1806 that implements the details of exactly which media documents are still allowed to play inlne.
1808 Media documents always use a video element; but when there are no video tracks, it has behavior like
1809 an audio element. See media-controller.js isAudio().
1811 This change preserves this behavior with respect to fullscreen requirements for media document by
1812 mirroring the isAudio() check in requiresFullscreenForVideoPlayback.
1814 * html/MediaDocument.cpp:
1815 (WebCore::MediaDocumentParser::createDocumentStructure):
1816 * html/MediaElementSession.cpp:
1817 (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback):
1819 2017-07-27 Jeremy Jones <jeremyj@apple.com>
1821 MediaDocument fullscreen pinch gesture should trigger navigate back.
1822 https://bugs.webkit.org/show_bug.cgi?id=174914
1824 Reviewed by Jon Lee.
1826 No new tests because only effect is from interaction with platform.
1828 For media documents, pressing the "done" button on fullscreen video navigates back
1829 to the previous page. The same should happen for other gestures that pause playback
1830 when returning to inline. This allows the gesture to have the same behavior as the
1833 * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1834 (WebVideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason):
1836 2017-07-27 Aaron Chu <aaron_chu@apple.com>
1838 AX: VoiceOver silent or skipping over time values on media player.
1839 https://bugs.webkit.org/show_bug.cgi?id=174324
1840 <rdar://problem/32021784>
1842 Reviewed by Antoine Quint.
1844 Added role attribute to modern media controls time lable class so that VoiceOver can access the time label when the media is playing.
1846 Test Updated: media/modern-media-controls/time-label/time-label.html
1847 Test Added: media/modern-media-controls/time-label/ios-time-label.html
1849 * Modules/modern-media-controls/controls/time-label.js:
1851 2017-07-27 Yusuke Suzuki <utatane.tea@gmail.com>
1853 Hoist DOM binding attribute getter prologue into JavaScriptCore taking advantage of DOMJIT / CheckSubClass
1854 https://bugs.webkit.org/show_bug.cgi?id=171637
1856 Reviewed by Darin Adler.
1858 We use DOMAttribute. When DOMAttribute is specified, ClassInfo check is performed by JSC side.
1859 So, we can drop ClassInfo check from the actual function.
1861 We also simplify DOMJIT::GetterSetter to make it smaller size.
1863 WebCore size comparison
1865 After: 48087800 (0.7% reduction)
1867 Speedometer Scores show 0.8% improvement.
1868 Before: 158.9 +- 0.46
1869 After: 160.2 +- 0.36
1871 Dromaeo DOM core Scores show 5.8% improvement.
1873 Total Score: 8424.12runs/s ±1.38% 8911.60runs/s ±1.47%
1874 DOM Attributes 12627.27runs/s ±1.87% 14023.17runs/s ±1.87%
1875 DOM Modification 1207.82runs/s ±2.48% 1204.21runs/s ±3.05%
1876 DOM Query 68068.82runs/s ±0.63% 74273.38runs/s ±0.69%
1877 DOM Traversal 1240.07runs/s ±1.96% 1256.64runs/s ±1.77%
1879 Performance improvement can be explained by the following optimizations.
1881 1. Type checks are typically eliminated in all the JIT tiers. IC / DFG / FTL can
1882 drop type checks since get_by_id operation already performs a structure check
1883 which subsumes this type check.
1884 2. Direct getter call by CallDOMGetter without creating IC in DFG and FTL.
1886 * bindings/js/JSDOMAttribute.h:
1887 (WebCore::IDLAttribute::get):
1888 Add CastedThisErrorBehavior::Assert case. When this is specified, we perform casting without using jsDynamicCast.
1890 * bindings/scripts/CodeGeneratorJS.pm:
1891 (IsAcceleratedDOMAttribute):
1892 (GetJSCAttributesForAttribute):
1894 (GeneratePropertiesHashTable):
1895 (GenerateImplementation):
1896 (GenerateAttributeGetterTrampolineDefinition):
1897 (GenerateAttributeGetterDefinition):
1898 (GenerateCallbackImplementationContent):
1899 (GenerateHashTableValueArray):
1900 (GenerateHashTable):
1901 (GenerateConstructorHelperMethods):
1902 Update CodeGeneratorJS to emit DOMAttribute. And DOMJIT::GetterSetter becomes changed to be smaller size.
1904 * bindings/scripts/test/JS/JSInterfaceName.cpp:
1905 (WebCore::JSInterfaceNamePrototype::finishCreation):
1906 * bindings/scripts/test/JS/JSMapLike.cpp:
1907 (WebCore::JSMapLikePrototype::finishCreation):
1908 * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
1909 (WebCore::JSReadOnlyMapLikePrototype::finishCreation):
1910 * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1911 (WebCore::JSTestActiveDOMObjectPrototype::finishCreation):
1912 (WebCore::jsTestActiveDOMObjectExcitingAttr):
1913 * bindings/scripts/test/JS/JSTestCEReactions.cpp:
1914 (WebCore::JSTestCEReactionsPrototype::finishCreation):
1915 (WebCore::jsTestCEReactionsAttributeWithCEReactions):
1916 (WebCore::jsTestCEReactionsReflectAttributeWithCEReactions):
1917 (WebCore::jsTestCEReactionsStringifierAttribute):
1918 * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
1919 (WebCore::JSTestCEReactionsStringifierPrototype::finishCreation):
1920 (WebCore::jsTestCEReactionsStringifierValue):
1921 * bindings/scripts/test/JS/JSTestCallTracer.cpp:
1922 (WebCore::JSTestCallTracerPrototype::finishCreation):
1923 (WebCore::jsTestCallTracerTestAttributeInterface):
1924 (WebCore::jsTestCallTracerTestAttributeSpecified):
1925 * bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
1926 (WebCore::JSTestCallbackInterfaceConstructor::initializeProperties):
1927 * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
1928 (WebCore::JSTestClassWithJSBuiltinConstructorPrototype::finishCreation):
1929 * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
1930 (WebCore::JSTestCustomConstructorWithNoInterfaceObjectPrototype::finishCreation):
1931 * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
1932 (WebCore::JSTestDOMJITPrototype::finishCreation):
1933 (WebCore::TestDOMJITAnyAttrDOMJIT::TestDOMJITAnyAttrDOMJIT): Deleted.
1934 (WebCore::domJITGetterSetterForTestDOMJITAnyAttr): Deleted.
1935 (WebCore::TestDOMJITBooleanAttrDOMJIT::TestDOMJITBooleanAttrDOMJIT): Deleted.
1936 (WebCore::domJITGetterSetterForTestDOMJITBooleanAttr): Deleted.
1937 (WebCore::TestDOMJITByteAttrDOMJIT::TestDOMJITByteAttrDOMJIT): Deleted.
1938 (WebCore::domJITGetterSetterForTestDOMJITByteAttr): Deleted.
1939 (WebCore::TestDOMJITOctetAttrDOMJIT::TestDOMJITOctetAttrDOMJIT): Deleted.
1940 (WebCore::domJITGetterSetterForTestDOMJITOctetAttr): Deleted.
1941 (WebCore::TestDOMJITShortAttrDOMJIT::TestDOMJITShortAttrDOMJIT): Deleted.
1942 (WebCore::domJITGetterSetterForTestDOMJITShortAttr): Deleted.
1943 (WebCore::TestDOMJITUnsignedShortAttrDOMJIT::TestDOMJITUnsignedShortAttrDOMJIT): Deleted.
1944 (WebCore::domJITGetterSetterForTestDOMJITUnsignedShortAttr): Deleted.
1945 (WebCore::TestDOMJITLongAttrDOMJIT::TestDOMJITLongAttrDOMJIT): Deleted.
1946 (WebCore::domJITGetterSetterForTestDOMJITLongAttr): Deleted.
1947 (WebCore::TestDOMJITUnsignedLongAttrDOMJIT::TestDOMJITUnsignedLongAttrDOMJIT): Deleted.
1948 (WebCore::domJITGetterSetterForTestDOMJITUnsignedLongAttr): Deleted.
1949 (WebCore::TestDOMJITLongLongAttrDOMJIT::TestDOMJITLongLongAttrDOMJIT): Deleted.
1950 (WebCore::domJITGetterSetterForTestDOMJITLongLongAttr): Deleted.
1951 (WebCore::TestDOMJITUnsignedLongLongAttrDOMJIT::TestDOMJITUnsignedLongLongAttrDOMJIT): Deleted.
1952 (WebCore::domJITGetterSetterForTestDOMJITUnsignedLongLongAttr): Deleted.
1953 (WebCore::TestDOMJITFloatAttrDOMJIT::TestDOMJITFloatAttrDOMJIT): Deleted.
1954 (WebCore::domJITGetterSetterForTestDOMJITFloatAttr): Deleted.
1955 (WebCore::TestDOMJITUnrestrictedFloatAttrDOMJIT::TestDOMJITUnrestrictedFloatAttrDOMJIT): Deleted.
1956 (WebCore::domJITGetterSetterForTestDOMJITUnrestrictedFloatAttr): Deleted.
1957 (WebCore::TestDOMJITDoubleAttrDOMJIT::TestDOMJITDoubleAttrDOMJIT): Deleted.
1958 (WebCore::domJITGetterSetterForTestDOMJITDoubleAttr): Deleted.
1959 (WebCore::TestDOMJITUnrestrictedDoubleAttrDOMJIT::TestDOMJITUnrestrictedDoubleAttrDOMJIT): Deleted.
1960 (WebCore::domJITGetterSetterForTestDOMJITUnrestrictedDoubleAttr): Deleted.
1961 (WebCore::TestDOMJITDomStringAttrDOMJIT::TestDOMJITDomStringAttrDOMJIT): Deleted.
1962 (WebCore::domJITGetterSetterForTestDOMJITDomStringAttr): Deleted.
1963 (WebCore::TestDOMJITByteStringAttrDOMJIT::TestDOMJITByteStringAttrDOMJIT): Deleted.
1964 (WebCore::domJITGetterSetterForTestDOMJITByteStringAttr): Deleted.
1965 (WebCore::TestDOMJITUsvStringAttrDOMJIT::TestDOMJITUsvStringAttrDOMJIT): Deleted.
1966 (WebCore::domJITGetterSetterForTestDOMJITUsvStringAttr): Deleted.
1967 (WebCore::TestDOMJITNodeAttrDOMJIT::TestDOMJITNodeAttrDOMJIT): Deleted.
1968 (WebCore::domJITGetterSetterForTestDOMJITNodeAttr): Deleted.
1969 (WebCore::TestDOMJITBooleanNullableAttrDOMJIT::TestDOMJITBooleanNullableAttrDOMJIT): Deleted.
1970 (WebCore::domJITGetterSetterForTestDOMJITBooleanNullableAttr): Deleted.
1971 (WebCore::TestDOMJITByteNullableAttrDOMJIT::TestDOMJITByteNullableAttrDOMJIT): Deleted.
1972 (WebCore::domJITGetterSetterForTestDOMJITByteNullableAttr): Deleted.
1973 (WebCore::TestDOMJITOctetNullableAttrDOMJIT::TestDOMJITOctetNullableAttrDOMJIT): Deleted.
1974 (WebCore::domJITGetterSetterForTestDOMJITOctetNullableAttr): Deleted.
1975 (WebCore::TestDOMJITShortNullableAttrDOMJIT::TestDOMJITShortNullableAttrDOMJIT): Deleted.
1976 (WebCore::domJITGetterSetterForTestDOMJITShortNullableAttr): Deleted.
1977 (WebCore::TestDOMJITUnsignedShortNullableAttrDOMJIT::TestDOMJITUnsignedShortNullableAttrDOMJIT): Deleted.
1978 (WebCore::domJITGetterSetterForTestDOMJITUnsignedShortNullableAttr): Deleted.
1979 (WebCore::TestDOMJITLongNullableAttrDOMJIT::TestDOMJITLongNullableAttrDOMJIT): Deleted.
1980 (WebCore::domJITGetterSetterForTestDOMJITLongNullableAttr): Deleted.
1981 (WebCore::TestDOMJITUnsignedLongNullableAttrDOMJIT::TestDOMJITUnsignedLongNullableAttrDOMJIT): Deleted.
1982 (WebCore::domJITGetterSetterForTestDOMJITUnsignedLongNullableAttr): Deleted.
1983 (WebCore::TestDOMJITLongLongNullableAttrDOMJIT::TestDOMJITLongLongNullableAttrDOMJIT): Deleted.
1984 (WebCore::domJITGetterSetterForTestDOMJITLongLongNullableAttr): Deleted.
1985 (WebCore::TestDOMJITUnsignedLongLongNullableAttrDOMJIT::TestDOMJITUnsignedLongLongNullableAttrDOMJIT): Deleted.
1986 (WebCore::domJITGetterSetterForTestDOMJITUnsignedLongLongNullableAttr): Deleted.
1987 (WebCore::TestDOMJITFloatNullableAttrDOMJIT::TestDOMJITFloatNullableAttrDOMJIT): Deleted.
1988 (WebCore::domJITGetterSetterForTestDOMJITFloatNullableAttr): Deleted.
1989 (WebCore::TestDOMJITUnrestrictedFloatNullableAttrDOMJIT::TestDOMJITUnrestrictedFloatNullableAttrDOMJIT): Deleted.
1990 (WebCore::domJITGetterSetterForTestDOMJITUnrestrictedFloatNullableAttr): Deleted.
1991 (WebCore::TestDOMJITDoubleNullableAttrDOMJIT::TestDOMJITDoubleNullableAttrDOMJIT): Deleted.
1992 (WebCore::domJITGetterSetterForTestDOMJITDoubleNullableAttr): Deleted.
1993 (WebCore::TestDOMJITUnrestrictedDoubleNullableAttrDOMJIT::TestDOMJITUnrestrictedDoubleNullableAttrDOMJIT): Deleted.
1994 (WebCore::domJITGetterSetterForTestDOMJITUnrestrictedDoubleNullableAttr): Deleted.
1995 (WebCore::TestDOMJITDomStringNullableAttrDOMJIT::TestDOMJITDomStringNullableAttrDOMJIT): Deleted.
1996 (WebCore::domJITGetterSetterForTestDOMJITDomStringNullableAttr): Deleted.
1997 (WebCore::TestDOMJITByteStringNullableAttrDOMJIT::TestDOMJITByteStringNullableAttrDOMJIT): Deleted.
1998 (WebCore::domJITGetterSetterForTestDOMJITByteStringNullableAttr): Deleted.
1999 (WebCore::TestDOMJITUsvStringNullableAttrDOMJIT::TestDOMJITUsvStringNullableAttrDOMJIT): Deleted.
2000 (WebCore::domJITGetterSetterForTestDOMJITUsvStringNullableAttr): Deleted.
2001 (WebCore::TestDOMJITNodeNullableAttrDOMJIT::TestDOMJITNodeNullableAttrDOMJIT): Deleted.
2002 (WebCore::domJITGetterSetterForTestDOMJITNodeNullableAttr): Deleted.
2003 * bindings/scripts/test/JS/JSTestDOMJIT.h:
2004 * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2005 (WebCore::JSTestEventConstructorPrototype::finishCreation):
2006 (WebCore::jsTestEventConstructorAttr1):
2007 (WebCore::jsTestEventConstructorAttr2):
2008 (WebCore::jsTestEventConstructorAttr3):
2009 * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2010 (WebCore::JSTestEventTargetPrototype::finishCreation):
2011 * bindings/scripts/test/JS/JSTestException.cpp:
2012 (WebCore::JSTestExceptionPrototype::finishCreation):
2013 (WebCore::jsTestExceptionName):
2014 * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2015 (WebCore::JSTestGenerateIsReachablePrototype::finishCreation):
2016 (WebCore::jsTestGenerateIsReachableASecretAttribute):
2017 * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
2018 (WebCore::jsTestGlobalObjectRegularAttribute):
2019 * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
2020 (WebCore::JSTestIndexedSetterNoIdentifierPrototype::finishCreation):
2021 * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
2022 (WebCore::JSTestIndexedSetterThrowingExceptionPrototype::finishCreation):
2023 * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
2024 (WebCore::JSTestIndexedSetterWithIdentifierPrototype::finishCreation):
2025 * bindings/scripts/test/JS/JSTestInterface.cpp:
2026 (WebCore::JSTestInterfaceConstructor::initializeProperties):
2027 (WebCore::JSTestInterfacePrototype::finishCreation):
2028 (WebCore::jsTestInterfaceImplementsStr1):
2029 (WebCore::jsTestInterfaceImplementsStr2):
2030 (WebCore::jsTestInterfaceImplementsStr3):
2031 (WebCore::jsTestInterfaceImplementsNode):
2032 (WebCore::jsTestInterfaceSupplementalStr1):
2033 (WebCore::jsTestInterfaceSupplementalStr2):
2034 (WebCore::jsTestInterfaceSupplementalStr3):
2035 (WebCore::jsTestInterfaceSupplementalNode):
2036 * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
2037 (WebCore::JSTestInterfaceLeadingUnderscorePrototype::finishCreation):
2038 (WebCore::jsTestInterfaceLeadingUnderscoreReadonly):
2039 * bindings/scripts/test/JS/JSTestIterable.cpp:
2040 (WebCore::JSTestIterablePrototype::finishCreation):
2041 * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
2042 (WebCore::JSTestJSBuiltinConstructorPrototype::finishCreation):
2043 (WebCore::jsTestJSBuiltinConstructorTestAttributeCustom):
2044 (WebCore::jsTestJSBuiltinConstructorTestAttributeRWCustom):
2045 * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2046 (WebCore::JSTestMediaQueryListListenerPrototype::finishCreation):
2047 * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
2048 (WebCore::JSTestNamedAndIndexedSetterNoIdentifierPrototype::finishCreation):
2049 * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
2050 (WebCore::JSTestNamedAndIndexedSetterThrowingExceptionPrototype::finishCreation):
2051 * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
2052 (WebCore::JSTestNamedAndIndexedSetterWithIdentifierPrototype::finishCreation):
2053 * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2054 (WebCore::JSTestNamedConstructorPrototype::finishCreation):
2055 * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
2056 (WebCore::JSTestNamedDeleterNoIdentifierPrototype::finishCreation):
2057 * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
2058 (WebCore::JSTestNamedDeleterThrowingExceptionPrototype::finishCreation):
2059 * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
2060 (WebCore::JSTestNamedDeleterWithIdentifierPrototype::finishCreation):
2061 * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
2062 (WebCore::JSTestNamedDeleterWithIndexedGetterPrototype::finishCreation):
2063 * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
2064 (WebCore::JSTestNamedGetterCallWithPrototype::finishCreation):
2065 * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
2066 (WebCore::JSTestNamedGetterNoIdentifierPrototype::finishCreation):
2067 * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
2068 (WebCore::JSTestNamedGetterWithIdentifierPrototype::finishCreation):
2069 * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
2070 (WebCore::JSTestNamedSetterNoIdentifierPrototype::finishCreation):
2071 * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
2072 (WebCore::JSTestNamedSetterThrowingExceptionPrototype::finishCreation):
2073 * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
2074 (WebCore::JSTestNamedSetterWithIdentifierPrototype::finishCreation):
2075 * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
2076 (WebCore::JSTestNamedSetterWithIndexedGetterPrototype::finishCreation):
2077 * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
2078 (WebCore::JSTestNamedSetterWithIndexedGetterAndSetterPrototype::finishCreation):
2079 * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
2080 (WebCore::JSTestNamedSetterWithOverrideBuiltinsPrototype::finishCreation):
2081 * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
2082 (WebCore::JSTestNamedSetterWithUnforgablePropertiesPrototype::finishCreation):
2083 (WebCore::jsTestNamedSetterWithUnforgablePropertiesUnforgeableAttribute):
2084 * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
2085 (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype::finishCreation):
2086 (WebCore::jsTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsUnforgeableAttribute):
2087 * bindings/scripts/test/JS/JSTestNode.cpp:
2088 (WebCore::JSTestNodePrototype::finishCreation):
2089 (WebCore::jsTestNodeName):
2090 * bindings/scripts/test/JS/JSTestObj.cpp:
2091 (WebCore::JSTestObjConstructor::initializeProperties):
2092 (WebCore::JSTestObjPrototype::finishCreation):
2093 (WebCore::jsTestObjReadOnlyLongAttr):
2094 (WebCore::jsTestObjReadOnlyStringAttr):
2095 (WebCore::jsTestObjReadOnlyTestObjAttr):
2096 (WebCore::jsTestObjEnumAttr):
2097 (WebCore::jsTestObjByteAttr):
2098 (WebCore::jsTestObjOctetAttr):
2099 (WebCore::jsTestObjShortAttr):
2100 (WebCore::jsTestObjClampedShortAttr):
2101 (WebCore::jsTestObjEnforceRangeShortAttr):
2102 (WebCore::jsTestObjUnsignedShortAttr):
2103 (WebCore::jsTestObjLongAttr):
2104 (WebCore::jsTestObjLongLongAttr):
2105 (WebCore::jsTestObjUnsignedLongLongAttr):
2106 (WebCore::jsTestObjStringAttr):
2107 (WebCore::jsTestObjUsvstringAttr):
2108 (WebCore::jsTestObjTestObjAttr):
2109 (WebCore::jsTestObjTestNullableObjAttr):
2110 (WebCore::jsTestObjUnforgeableAttr):
2111 (WebCore::jsTestObjStringAttrTreatingNullAsEmptyString):
2112 (WebCore::jsTestObjUsvstringAttrTreatingNullAsEmptyString):
2113 (WebCore::jsTestObjByteStringAttrTreatingNullAsEmptyString):
2114 (WebCore::jsTestObjStringLongRecordAttr):
2115 (WebCore::jsTestObjUsvstringLongRecordAttr):
2116 (WebCore::jsTestObjStringObjRecordAttr):
2117 (WebCore::jsTestObjStringNullableObjRecordAttr):
2118 (WebCore::jsTestObjDictionaryAttr):
2119 (WebCore::jsTestObjNullableDictionaryAttr):
2120 (WebCore::jsTestObjAnnotatedTypeInUnionAttr):
2121 (WebCore::jsTestObjAnnotatedTypeInSequenceAttr):
2122 (WebCore::jsTestObjImplementationEnumAttr):
2123 (WebCore::jsTestObjXMLObjAttr):
2124 (WebCore::jsTestObjCreate):
2125 (WebCore::jsTestObjReflectedStringAttr):
2126 (WebCore::jsTestObjReflectedUSVStringAttr):
2127 (WebCore::jsTestObjReflectedIntegralAttr):
2128 (WebCore::jsTestObjReflectedUnsignedIntegralAttr):
2129 (WebCore::jsTestObjReflectedBooleanAttr):
2130 (WebCore::jsTestObjReflectedURLAttr):
2131 (WebCore::jsTestObjReflectedUSVURLAttr):
2132 (WebCore::jsTestObjReflectedCustomIntegralAttr):
2133 (WebCore::jsTestObjReflectedCustomBooleanAttr):
2134 (WebCore::jsTestObjReflectedCustomURLAttr):
2135 (WebCore::jsTestObjEnabledAtRuntimeAttribute):
2136 (WebCore::jsTestObjEnabledBySettingAttribute):
2137 (WebCore::jsTestObjTypedArrayAttr):
2138 (WebCore::jsTestObjAttributeWithGetterException):
2139 (WebCore::jsTestObjAttributeWithSetterException):
2140 (WebCore::jsTestObjStringAttrWithGetterException):
2141 (WebCore::jsTestObjStringAttrWithSetterException):
2142 (WebCore::jsTestObjCustomAttr):
2143 (WebCore::jsTestObjOnfoo):
2144 (WebCore::jsTestObjOnwebkitfoo):
2145 (WebCore::jsTestObjWithScriptStateAttribute):
2146 (WebCore::jsTestObjWithCallWithAndSetterCallWithAttribute):
2147 (WebCore::jsTestObjWithScriptExecutionContextAttribute):
2148 (WebCore::jsTestObjWithScriptStateAttributeRaises):
2149 (WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
2150 (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttribute):
2151 (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
2152 (WebCore::jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
2153 (WebCore::jsTestObjConditionalAttr1):
2154 (WebCore::jsTestObjConditionalAttr2):
2155 (WebCore::jsTestObjConditionalAttr3):
2156 (WebCore::jsTestObjCachedAttribute1):
2157 (WebCore::jsTestObjCachedAttribute2):
2158 (WebCore::jsTestObjAnyAttribute):
2159 (WebCore::jsTestObjObjectAttribute):
2160 (WebCore::jsTestObjContentDocument):
2161 (WebCore::jsTestObjMutablePoint):
2162 (WebCore::jsTestObjStrawberry):
2163 (WebCore::jsTestObjDescription):
2164 (WebCore::jsTestObjId):
2165 (WebCore::jsTestObjHash):
2166 (WebCore::jsTestObjReplaceableAttribute):
2167 (WebCore::jsTestObjNullableDoubleAttribute):
2168 (WebCore::jsTestObjNullableLongAttribute):
2169 (WebCore::jsTestObjNullableBooleanAttribute):
2170 (WebCore::jsTestObjNullableStringAttribute):
2171 (WebCore::jsTestObjNullableLongSettableAttribute):
2172 (WebCore::jsTestObjNullableStringSettableAttribute):
2173 (WebCore::jsTestObjNullableUSVStringSettableAttribute):
2174 (WebCore::jsTestObjNullableByteStringSettableAttribute):
2175 (WebCore::jsTestObjNullableStringValue):
2176 (WebCore::jsTestObjAttribute):
2177 (WebCore::jsTestObjAttributeWithReservedEnumType):
2178 (WebCore::jsTestObjPutForwardsAttribute):
2179 (WebCore::jsTestObjPutForwardsNullableAttribute):
2180 (WebCore::jsTestObjStringifierAttribute):
2181 (WebCore::jsTestObjConditionallyReadWriteAttribute):
2182 (WebCore::jsTestObjConditionalAndConditionallyReadWriteAttribute):
2183 * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2184 (WebCore::JSTestOverloadedConstructorsPrototype::finishCreation):
2185 * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
2186 (WebCore::JSTestOverloadedConstructorsWithSequencePrototype::finishCreation):
2187 * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
2188 (WebCore::JSTestOverrideBuiltinsPrototype::finishCreation):
2189 * bindings/scripts/test/JS/JSTestPluginInterface.cpp:
2190 (WebCore::JSTestPluginInterfacePrototype::finishCreation):
2191 * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
2192 (WebCore::JSTestPromiseRejectionEventPrototype::finishCreation):
2193 (WebCore::jsTestPromiseRejectionEventReason):
2194 * bindings/scripts/test/JS/JSTestSerialization.cpp:
2195 (WebCore::JSTestSerializationPrototype::finishCreation):
2196 (WebCore::jsTestSerializationFirstStringAttribute):
2197 (WebCore::jsTestSerializationSecondLongAttribute):
2198 (WebCore::jsTestSerializationThirdUnserializableAttribute):
2199 (WebCore::jsTestSerializationFourthUnrestrictedDoubleAttribute):
2200 (WebCore::jsTestSerializationFifthLongAttribute):
2201 (WebCore::jsTestSerializationSixthTypedefAttribute):
2202 (WebCore::jsTestSerializationSeventhDirectlySerializableAttribute):
2203 (WebCore::jsTestSerializationEighthIndirectlyAttribute):
2204 * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp:
2205 (WebCore::JSTestSerializationIndirectInheritancePrototype::finishCreation):
2206 * bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
2207 (WebCore::JSTestSerializationInheritPrototype::finishCreation):
2208 (WebCore::jsTestSerializationInheritInheritLongAttribute):
2209 * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
2210 (WebCore::JSTestSerializationInheritFinalPrototype::finishCreation):
2211 (WebCore::jsTestSerializationInheritFinalFinalLongAttributeFoo):
2212 (WebCore::jsTestSerializationInheritFinalFinalLongAttributeBar):
2213 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2214 (WebCore::JSTestSerializedScriptValueInterfacePrototype::finishCreation):
2215 (WebCore::jsTestSerializedScriptValueInterfaceValue):
2216 (WebCore::jsTestSerializedScriptValueInterfaceReadonlyValue):
2217 (WebCore::jsTestSerializedScriptValueInterfaceCachedValue):
2218 (WebCore::jsTestSerializedScriptValueInterfacePorts):
2219 (WebCore::jsTestSerializedScriptValueInterfaceCachedReadonlyValue):
2220 * bindings/scripts/test/JS/JSTestStringifier.cpp:
2221 (WebCore::JSTestStringifierPrototype::finishCreation):
2222 * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
2223 (WebCore::JSTestStringifierAnonymousOperationPrototype::finishCreation):
2224 * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
2225 (WebCore::JSTestStringifierNamedOperationPrototype::finishCreation):
2226 * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
2227 (WebCore::JSTestStringifierOperationImplementedAsPrototype::finishCreation):
2228 * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
2229 (WebCore::JSTestStringifierOperationNamedToStringPrototype::finishCreation):
2230 * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
2231 (WebCore::JSTestStringifierReadOnlyAttributePrototype::finishCreation):
2232 (WebCore::jsTestStringifierReadOnlyAttributeIdentifier):
2233 * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
2234 (WebCore::JSTestStringifierReadWriteAttributePrototype::finishCreation):
2235 (WebCore::jsTestStringifierReadWriteAttributeIdentifier):
2236 * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2237 (WebCore::JSTestTypedefsConstructor::initializeProperties):
2238 (WebCore::JSTestTypedefsPrototype::finishCreation):
2239 (WebCore::jsTestTypedefsUnsignedLongLongAttr):
2240 (WebCore::jsTestTypedefsSerializedScriptValue):
2241 (WebCore::jsTestTypedefsAttributeWithClamp):
2242 (WebCore::jsTestTypedefsAttributeWithClampInTypedef):
2243 (WebCore::jsTestTypedefsAttrWithGetterException):
2244 (WebCore::jsTestTypedefsAttrWithSetterException):
2245 (WebCore::jsTestTypedefsStringAttrWithGetterException):
2246 (WebCore::jsTestTypedefsStringAttrWithSetterException):
2247 (WebCore::jsTestTypedefsBufferSourceAttr):
2248 (WebCore::jsTestTypedefsDomTimeStampAttr):
2249 They are binding test rebaselines.
2251 * domjit/DOMJITIDLTypeFilter.h:
2252 * domjit/JSDocumentDOMJIT.cpp:
2253 (WebCore::compileDocumentDocumentElementAttribute):
2254 (WebCore::compileDocumentBodyAttribute):
2255 (WebCore::DocumentDocumentElementDOMJIT::callDOMGetter): Deleted.
2256 (WebCore::DocumentBodyDOMJIT::callDOMGetter): Deleted.
2257 * domjit/JSNodeDOMJIT.cpp:
2258 (WebCore::compileNodeFirstChildAttribute):
2259 (WebCore::compileNodeLastChildAttribute):
2260 (WebCore::compileNodeNextSiblingAttribute):
2261 (WebCore::compileNodePreviousSiblingAttribute):
2262 (WebCore::compileNodeParentNodeAttribute):
2263 (WebCore::compileNodeNodeTypeAttribute):
2264 (WebCore::compileNodeOwnerDocumentAttribute):
2265 (WebCore::NodeFirstChildDOMJIT::callDOMGetter): Deleted.
2266 (WebCore::NodeLastChildDOMJIT::callDOMGetter): Deleted.
2267 (WebCore::NodeNextSiblingDOMJIT::callDOMGetter): Deleted.
2268 (WebCore::NodePreviousSiblingDOMJIT::callDOMGetter): Deleted.
2269 (WebCore::NodeParentNodeDOMJIT::callDOMGetter): Deleted.
2270 (WebCore::NodeNodeTypeDOMJIT::callDOMGetter): Deleted.
2271 (WebCore::NodeOwnerDocumentDOMJIT::callDOMGetter): Deleted.
2272 DOMJIT::GetterSetter becomes smaller constexpr data.
2274 2017-07-27 Xabier Rodriguez Calvar <calvaris@igalia.com>
2276 [GStreamer][EME] Not having a key id buffer should not always error
2277 https://bugs.webkit.org/show_bug.cgi?id=174889
2279 Reviewed by Žan Doberšek.
2281 In r219946 we introduced a hard requirement for a key id buffer
2282 that does not happen for all CDMs.
2284 * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
2285 (webKitMediaClearKeyDecryptorSetupCipher): Check for key id buffer
2286 and error if we didn't get it.
2287 * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
2288 (webkitMediaCommonEncryptionDecryptTransformInPlace): Soften the
2289 requirement for key id buffer.
2291 2017-07-27 Xabier Rodriguez Calvar <calvaris@igalia.com>
2293 [GStreamer][EME] Fix phony debug output in player base for supported key system
2294 https://bugs.webkit.org/show_bug.cgi?id=174888
2296 Reviewed by Žan Doberšek.
2298 The debug output was returning always false because that method
2299 was not checking anything before. Now it is and should reflect it.
2301 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2302 (WebCore::MediaPlayerPrivateGStreamerBase::supportsKeySystem):
2304 2017-07-27 Zan Dobersek <zdobersek@igalia.com>
2306 [EME][GStreamer] Add barebones CDM interface implementations for ClearKey
2307 https://bugs.webkit.org/show_bug.cgi?id=174887
2309 Reviewed by Xabier Rodriguez-Calvar.
2311 Add empty ClearKey derivations of CDMFactory, CDMPrivate and CDMInstance
2312 classes. These will be enhanced as the implementation progresses.
2314 ClearKey is added to CDMInstance::ImplementationType, and the
2315 CDMInstanceClearKey::implementationType() override returns that value.
2316 Type traits specialization for the CDMInstanceClearKey class is also
2317 added, utilizing the CDMInstance::ImplementationType::ClearKey value.
2319 The implementation file is added to the WPE build, along with the
2320 necessary inclusion directory.
2322 * PlatformWPE.cmake:
2323 * platform/encryptedmedia/CDMInstance.h:
2324 * platform/encryptedmedia/clearkey/CDMClearKey.cpp: Added.
2325 (WebCore::CDMFactoryClearKey::createCDM):
2326 (WebCore::CDMFactoryClearKey::supportsKeySystem):
2327 (WebCore::CDMPrivateClearKey::supportsInitDataType):
2328 (WebCore::CDMPrivateClearKey::supportsConfiguration):
2329 (WebCore::CDMPrivateClearKey::supportsConfigurationWithRestrictions):
2330 (WebCore::CDMPrivateClearKey::supportsSessionTypeWithConfiguration):
2331 (WebCore::CDMPrivateClearKey::supportsRobustness):
2332 (WebCore::CDMPrivateClearKey::distinctiveIdentifiersRequirement):
2333 (WebCore::CDMPrivateClearKey::persistentStateRequirement):
2334 (WebCore::CDMPrivateClearKey::distinctiveIdentifiersAreUniquePerOriginAndClearable):
2335 (WebCore::CDMPrivateClearKey::createInstance):
2336 (WebCore::CDMPrivateClearKey::loadAndInitialize):
2337 (WebCore::CDMPrivateClearKey::supportsServerCertificates):
2338 (WebCore::CDMPrivateClearKey::supportsSessions):
2339 (WebCore::CDMPrivateClearKey::supportsInitData):
2340 (WebCore::CDMPrivateClearKey::sanitizeResponse):
2341 (WebCore::CDMPrivateClearKey::sanitizeSessionId):
2342 (WebCore::CDMInstanceClearKey::initializeWithConfiguration):
2343 (WebCore::CDMInstanceClearKey::setDistinctiveIdentifiersAllowed):
2344 (WebCore::CDMInstanceClearKey::setPersistentStateAllowed):
2345 (WebCore::CDMInstanceClearKey::setServerCertificate):
2346 (WebCore::CDMInstanceClearKey::requestLicense):
2347 (WebCore::CDMInstanceClearKey::updateLicense):
2348 (WebCore::CDMInstanceClearKey::loadSession):
2349 (WebCore::CDMInstanceClearKey::closeSession):
2350 (WebCore::CDMInstanceClearKey::removeSessionData):
2351 (WebCore::CDMInstanceClearKey::storeRecordOfKeyUsage):
2352 * platform/encryptedmedia/clearkey/CDMClearKey.h: Added.
2354 2017-07-27 Zan Dobersek <zdobersek@igalia.com>
2356 [EME] Allow CDMInstance type traits specialization
2357 https://bugs.webkit.org/show_bug.cgi?id=174886
2359 Reviewed by Xabier Rodriguez-Calvar.
2361 Allow using the trait-based type casting for the CDMInstance class and its
2362 derivatives. ImplementationType enumeration values are to be used and
2363 returned from the new implementationType() virtual method. This method is
2364 leveraged in the type trait specialization that enables using is<>() and
2365 downcast<>() helpers for CDMInstance objects.
2367 This will allow differentiating between CDMInstance implementations once
2368 the media playback pipeline has to retrieve any key information that's
2369 necessary for playback of encrypted content.
2371 MockCDMInstance class overrides the implementationType() method, returning
2372 the ImplementationType::Mock value. Type trait specializations for this
2373 class aren't added since they're not needed anywhere at this point.
2375 * platform/encryptedmedia/CDMInstance.h:
2376 * testing/MockCDMFactory.h:
2378 2017-07-27 Zan Dobersek <zdobersek@igalia.com>
2380 [GCrypt] Key serialization support
2381 https://bugs.webkit.org/show_bug.cgi?id=173883
2383 Reviewed by Jiewen Tan.
2385 Implement crypto key serialization for platforms that use libgcrypt.
2387 Despite the function names and the existing implementation for the Mac port,
2388 we don't perform the KEK wrapping and unwrapping due to the review feedback
2389 advising against it.
2391 Instead the passed-in key data is simply copied and returned as the result of
2392 the 'wrapping' operation, and similarly the passed-in serialized data is simply
2393 copied and returned as the result of the 'unwrapping' operation.
2395 No new tests -- related tests are now passing and are unskipped.
2397 * crypto/gcrypt/SerializedCryptoKeyWrapGCrypt.cpp:
2398 (WebCore::getDefaultWebCryptoMasterKey):
2399 (WebCore::wrapSerializedCryptoKey):
2400 (WebCore::unwrapSerializedCryptoKey):
2402 2017-07-26 Arnaud Renevier <a.renevier@sisa.samsung.com> and Fujii Hironori <Hironori.Fujii@sony.com>
2404 Implement new TextMetrics, returned by canvas measureText()
2405 https://bugs.webkit.org/show_bug.cgi?id=82798
2406 <rdar://problem/11159332>
2408 Reviewed by Dean Jackson.
2410 The specification: https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-measuretext
2412 Add new attributes to TextMetrics.
2414 Add a new method textOffset() of CanvasRenderingContext2D by
2415 extracting from drawTextInternal() to use the same horizontal and
2416 vertical offsets of a text in both drawTextInternal() and
2419 Test: fast/canvas/canvas-measureText-2.html
2421 * html/TextMetrics.h:
2422 (WebCore::TextMetrics::actualBoundingBoxLeft):
2423 (WebCore::TextMetrics::setActualBoundingBoxLeft):
2424 (WebCore::TextMetrics::actualBoundingBoxRight):
2425 (WebCore::TextMetrics::setActualBoundingBoxRight):
2426 (WebCore::TextMetrics::fontBoundingBoxAscent):
2427 (WebCore::TextMetrics::setFontBoundingBoxAscent):
2428 (WebCore::TextMetrics::fontBoundingBoxDescent):
2429 (WebCore::TextMetrics::setFontBoundingBoxDescent):
2430 (WebCore::TextMetrics::actualBoundingBoxAscent):
2431 (WebCore::TextMetrics::setActualBoundingBoxAscent):
2432 (WebCore::TextMetrics::actualBoundingBoxDescent):
2433 (WebCore::TextMetrics::setActualBoundingBoxDescent):
2434 (WebCore::TextMetrics::emHeightAscent):
2435 (WebCore::TextMetrics::setEmHeightAscent):
2436 (WebCore::TextMetrics::emHeightDescent):
2437 (WebCore::TextMetrics::setEmHeightDescent):
2438 (WebCore::TextMetrics::hangingBaseline):
2439 (WebCore::TextMetrics::setHangingBaseline):
2440 (WebCore::TextMetrics::alphabeticBaseline):
2441 (WebCore::TextMetrics::setAlphabeticBaseline):
2442 (WebCore::TextMetrics::ideographicBaseline):
2443 (WebCore::TextMetrics::setIdeographicBaseline):
2444 Added getters and setters.
2445 (WebCore::TextMetrics::TextMetrics): Deleted.
2446 * html/TextMetrics.idl: Added new attributes.
2447 * html/canvas/CanvasRenderingContext2D.cpp:
2448 (WebCore::CanvasRenderingContext2D::FontProxy::fontMetrics):
2449 Changed the return value type to a const reference of FontMetrics
2451 (WebCore::CanvasRenderingContext2D::FontProxy::width):
2452 Added the second arguemnt of GlyphOverflow type.
2453 (WebCore::CanvasRenderingContext2D::measureText): Calculate and
2454 set the new attributes of TextMetrics.
2455 (WebCore::CanvasRenderingContext2D::textOffset): Extracted from drawTextInternal.
2456 (WebCore::CanvasRenderingContext2D::drawTextInternal): Removed the
2457 offset calculation code and call textOffset.
2458 * html/canvas/CanvasRenderingContext2D.h: Added the method
2459 declaration of textOffset. Change types of fontMetrics and width
2461 * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
2462 (WebCore::FontCascade::floatWidthForComplexText): Added a dummy
2463 implementation of calculating GlyphOverflow.
2465 2017-07-26 Devin Rousso <drousso@apple.com>
2467 Web Inspector: create protocol for recording Canvas contexts
2468 https://bugs.webkit.org/show_bug.cgi?id=174481
2470 Reviewed by Joseph Pecoraro.
2472 Currently, a recording doesn't actually "start" until an action is performed on the context.
2473 This change adds the recording logic, but it does not use it anywhere. Additonal tests will
2474 be added in the patches that add uses:
2475 - <https://webkit.org/b/174482> Web Inspector: Record actions performed on CanvasRenderingContext2D
2476 - <https://webkit.org/b/174483> Web Inspector: Record actions performed on WebGLRenderingContext
2478 Test: inspector/model/recording.html
2480 * bindings/scripts/IDLAttributes.json:
2481 * bindings/scripts/CodeGeneratorJS.pm:
2482 (GenerateAttributeGetterBodyDefinition):
2483 (GenerateAttributeSetterBodyDefinition):
2484 (GenerateImplementationFunctionCall):
2485 * WebCore.xcodeproj/project.pbxproj:
2486 * bindings/js/CallTracer.h: Added.
2487 * bindings/js/CallTracer.cpp: Added.
2488 (WebCore::CallTracer::recordCanvasAction):
2489 * bindings/js/CallTracerTypes.h: Added.
2490 * bindings/scripts/test/TestCallTracer.idl: Added.
2491 * bindings/scripts/test/JS/JSTestCallTracer.h: Added.
2492 * bindings/scripts/test/JS/JSTestCallTracer.cpp: Added.
2494 Create new IDL extended attribute called "CallTracingCallback" that will add code to call a
2495 static function on CallTracer with the given extended attribute value as the function name,
2496 the `impl` object as the first parameter, the name of the attribute/operation as the second,
2497 and an optional object that accepts an initializer list of all the parameters as the third.
2499 This function will not be called, however, unless a `callTracingActive` function on the
2500 `impl` object returns true, and this is marked as UNLIKELY.
2502 "CallTracingCallback" can be added to an Interface, in which case it will apply to all
2503 attributes/operations of the generated class, or an individual Attribute/Operation.
2505 * html/canvas/CanvasRenderingContext.h:
2506 (WebCore::CanvasRenderingContext::callTracingActive):
2507 (WebCore::CanvasRenderingContext::setCallTracingActive):
2509 * inspector/InspectorCanvas.h:
2510 * inspector/InspectorCanvas.cpp:
2511 (WebCore::InspectorCanvas::~InspectorCanvas):
2512 (WebCore::InspectorCanvas::resetRecordingData):
2513 (WebCore::InspectorCanvas::hasRecordingData):
2514 (WebCore::InspectorCanvas::recordAction):
2515 (WebCore::InspectorCanvas::releaseInitialState):
2516 (WebCore::InspectorCanvas::releaseFrames):
2517 (WebCore::InspectorCanvas::releaseData):
2518 (WebCore::InspectorCanvas::markNewFrame):
2519 (WebCore::InspectorCanvas::markCurrentFrameIncomplete):
2520 (WebCore::InspectorCanvas::setBufferLimit):
2521 (WebCore::InspectorCanvas::hasBufferSpace):
2522 (WebCore::InspectorCanvas::singleFrame):
2523 (WebCore::InspectorCanvas::setSingleFrame):
2524 (WebCore::InspectorCanvas::indexForData):
2525 (WebCore::buildArrayForAffineTransform):
2526 (WebCore::buildArrayForVector):
2527 (WebCore::InspectorCanvas::buildInitialState):
2528 (WebCore::InspectorCanvas::buildAction):
2529 (WebCore::InspectorCanvas::buildArrayForCanvasGradient):
2530 (WebCore::InspectorCanvas::buildArrayForCanvasPattern):
2531 (WebCore::InspectorCanvas::buildArrayForImageData):
2533 Hold the recording data on the corresponding InspectorCanvas. Recording Frames are
2534 completed when the HTMLCanvasElement paints or a 0_s timer is fired. A recording is not
2535 considered valid until at least one action is performed on the canvas context. Once that
2536 condition is satisfied, canceling the recording will flush the data.
2538 * inspector/InspectorCanvasAgent.h:
2539 * inspector/InspectorCanvasAgent.cpp:
2540 (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
2541 (WebCore::InspectorCanvasAgent::disable):
2542 (WebCore::InspectorCanvasAgent::requestRecording):
2543 (WebCore::InspectorCanvasAgent::cancelRecording):
2544 (WebCore::InspectorCanvasAgent::recordCanvasAction):
2545 (WebCore::InspectorCanvasAgent::didFinishRecordingCanvasFrame):
2546 (WebCore::InspectorCanvasAgent::canvasDestroyed):
2547 (WebCore::InspectorCanvasAgent::canvasRecordingTimerFired):
2548 (WebCore::InspectorCanvasAgent::clearCanvasData):
2550 * inspector/InspectorInstrumentation.h:
2551 * inspector/InspectorInstrumentation.cpp:
2552 (WebCore::InspectorInstrumentation::recordCanvasAction):
2553 (WebCore::InspectorInstrumentation::recordCanvasActionImpl):
2554 (WebCore::InspectorInstrumentation::didFinishRecordingCanvasFrameImpl):
2556 * html/canvas/CanvasRenderingContext2D.h:
2557 * html/canvas/CanvasRenderingContext2D.cpp:
2558 (WebCore::CanvasRenderingContext2D::stringForWindingRule):
2559 (WebCore::CanvasRenderingContext2D::stringForImageSmoothingQuality):
2561 * platform/graphics/Gradient.h:
2562 (WebCore::Gradient::stops):
2564 * svg/SVGPathUtilities.h:
2565 * svg/SVGPathUtilities.cpp:
2566 (WebCore::buildStringFromPath):
2568 2017-07-26 Ali Juma <ajuma@chromium.org>
2570 Implement document.elementsFromPoint
2571 https://bugs.webkit.org/show_bug.cgi?id=153137
2573 Reviewed by Simon Fraser.
2575 This ports Blink's implementation of elementsFromPoint, from the
2576 following patches by Philip Rogers (pdr@chromium.org):
2577 -https://src.chromium.org/viewvc/blink?revision=190686&view=revision
2578 -https://src.chromium.org/viewvc/blink?revision=191240&view=revision
2579 -https://src.chromium.org/viewvc/blink?revision=199214&view=revision
2581 Tests: imported/w3c/web-platform-tests/cssom-view/elementsFromPoint-iframes.html
2582 imported/w3c/web-platform-tests/cssom-view/elementsFromPoint-invalid-cases.html
2583 imported/w3c/web-platform-tests/cssom-view/elementsFromPoint-shadowroot.html
2584 imported/w3c/web-platform-tests/cssom-view/elementsFromPoint-simple.html
2585 imported/w3c/web-platform-tests/cssom-view/elementsFromPoint-svg.html
2586 imported/w3c/web-platform-tests/cssom-view/elementsFromPoint-table.html
2588 * dom/DocumentOrShadowRoot.idl:
2589 * dom/TreeScope.cpp:
2590 (WebCore::absolutePointIfNotClipped):
2591 (WebCore::TreeScope::nodeFromPoint):
2592 (WebCore::TreeScope::elementFromPoint):
2593 (WebCore::TreeScope::elementsFromPoint):
2595 * page/EventHandler.cpp:
2596 (WebCore::EventHandler::hitTestResultAtPoint):
2597 * rendering/EllipsisBox.cpp:
2598 (WebCore::EllipsisBox::nodeAtPoint):
2599 * rendering/HitTestRequest.h:
2600 (WebCore::HitTestRequest::HitTestRequest):
2601 (WebCore::HitTestRequest::resultIsElementList):
2602 (WebCore::HitTestRequest::includesAllElementsUnderPoint):
2603 * rendering/HitTestResult.cpp:
2604 (WebCore::HitTestResult::HitTestResult):
2605 (WebCore::HitTestResult::operator=):
2606 (WebCore::HitTestResult::addNodeToListBasedTestResult):
2607 (WebCore::HitTestResult::append):
2608 (WebCore::HitTestResult::listBasedTestResult):
2609 (WebCore::HitTestResult::mutableListBasedTestResult):
2610 (WebCore::HitTestResult::addNodeToRectBasedTestResult): Deleted.
2611 (WebCore::HitTestResult::rectBasedTestResult): Deleted.
2612 (WebCore::HitTestResult::mutableRectBasedTestResult): Deleted.
2613 * rendering/HitTestResult.h:
2614 * rendering/InlineFlowBox.cpp:
2615 (WebCore::InlineFlowBox::nodeAtPoint):
2616 * rendering/InlineTextBox.cpp:
2617 (WebCore::InlineTextBox::nodeAtPoint):
2618 * rendering/RenderBlock.cpp:
2619 (WebCore::RenderBlock::nodeAtPoint):
2620 * rendering/RenderBox.cpp:
2621 (WebCore::RenderBox::nodeAtPoint):
2622 * rendering/RenderImage.cpp:
2623 (WebCore::RenderImage::nodeAtPoint):
2624 * rendering/RenderInline.cpp:
2625 (WebCore::RenderInline::hitTestCulledInline):
2626 * rendering/RenderLayer.cpp:
2627 (WebCore::RenderLayer::hitTestFixedLayersInNamedFlows):
2628 (WebCore::RenderLayer::hitTestLayer):
2629 (WebCore::RenderLayer::hitTestContents):
2630 (WebCore::RenderLayer::hitTestList):
2631 (WebCore::RenderLayer::calculateClipRects):
2632 * rendering/RenderTable.cpp:
2633 (WebCore::RenderTable::nodeAtPoint):
2634 * rendering/RenderTableSection.cpp:
2635 (WebCore::RenderTableSection::nodeAtPoint):
2636 * rendering/RenderWidget.cpp:
2637 (WebCore::RenderWidget::nodeAtPoint):
2638 * rendering/SimpleLineLayoutFunctions.cpp:
2639 (WebCore::SimpleLineLayout::hitTestFlow):
2640 * rendering/svg/RenderSVGContainer.cpp:
2641 (WebCore::RenderSVGContainer::nodeAtFloatPoint):
2642 * rendering/svg/RenderSVGImage.cpp:
2643 (WebCore::RenderSVGImage::nodeAtFloatPoint):
2644 * rendering/svg/RenderSVGRoot.cpp:
2645 (WebCore::RenderSVGRoot::nodeAtPoint):
2646 * rendering/svg/RenderSVGShape.cpp:
2647 (WebCore::RenderSVGShape::nodeAtFloatPoint):
2648 * rendering/svg/SVGInlineTextBox.cpp:
2649 (WebCore::SVGInlineTextBox::nodeAtPoint):
2650 * testing/Internals.cpp:
2651 (WebCore::Internals::nodesFromRect):
2653 2017-07-26 Charlie Turner <cturner@igalia.com>
2655 [GStreamer] Review WebKitWebSource after r219252.
2656 https://bugs.webkit.org/show_bug.cgi?id=174415
2658 Reviewed by Carlos Garcia Campos.
2660 Remove ResourceHandleStreamingClient, and flatten the StreamingClient
2661 into CachedResourceStreamingClient (the only implemetation left). They
2662 are no longer required after r219252.
2664 Also remove the locking code. It's not needed now, and what existed
2665 was heavy-handed and missed several cases it was supposed to protect
2667 Covered by existing tests.
2669 * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2670 (webkit_web_src_init):
2671 (webKitWebSrcDispose):
2673 (webKitWebSrcStart):
2674 (webKitWebSrcNeedData):
2675 (webKitWebSrcEnoughData):
2677 (webKitWebSrcSetMediaPlayer):
2678 (CachedResourceStreamingClient::CachedResourceStreamingClient):
2679 (CachedResourceStreamingClient::~CachedResourceStreamingClient):
2680 (CachedResourceStreamingClient::getOrCreateReadBuffer):
2681 (CachedResourceStreamingClient::responseReceived):
2682 (CachedResourceStreamingClient::dataReceived):
2683 (CachedResourceStreamingClient::loadFinished):
2684 (ResourceHandleStreamingClient::create): Deleted.
2686 (StreamingClient::StreamingClient): Deleted.
2687 (StreamingClient::~StreamingClient): Deleted.
2688 (StreamingClient::createReadBuffer): Deleted.
2689 (StreamingClient::handleResponseReceived): Deleted.
2690 (StreamingClient::handleDataReceived): Deleted.
2691 (StreamingClient::handleNotifyFinished): Deleted.
2692 (ResourceHandleStreamingClient::ResourceHandleStreamingClient): Deleted.
2693 (ResourceHandleStreamingClient::~ResourceHandleStreamingClient): Deleted.
2694 (ResourceHandleStreamingClient::cleanupAndStopRunLoop): Deleted.
2695 (ResourceHandleStreamingClient::invalidate): Deleted.
2696 (ResourceHandleStreamingClient::loadFailed): Deleted.
2697 (ResourceHandleStreamingClient::setDefersLoading): Deleted.
2698 (ResourceHandleStreamingClient::getOrCreateReadBuffer): Deleted.
2699 (ResourceHandleStreamingClient::willSendRequest): Deleted.
2700 (ResourceHandleStreamingClient::didReceiveResponse): Deleted.
2701 (ResourceHandleStreamingClient::didReceiveData): Deleted.
2702 (ResourceHandleStreamingClient::didReceiveBuffer): Deleted.
2703 (ResourceHandleStreamingClient::didFinishLoading): Deleted.
2704 (ResourceHandleStreamingClient::didFail): Deleted.
2705 (ResourceHandleStreamingClient::wasBlocked): Deleted.
2706 (ResourceHandleStreamingClient::cannotShowURL): Deleted.
2708 2017-07-26 Brian Burg <bburg@apple.com>
2710 Remove WEB_TIMING feature flag
2711 https://bugs.webkit.org/show_bug.cgi?id=174795
2713 Reviewed by Alex Christensen.
2715 * Configurations/FeatureDefines.xcconfig:
2716 * bindings/js/JSPerformanceEntryCustom.cpp:
2718 (WebCore::Document::setReadyState):
2719 (WebCore::Document::finishedParsing):
2721 (WebCore::Document::timing):
2722 * dom/DocumentTiming.h:
2723 * dom/EventTargetFactory.in:
2724 * loader/DocumentThreadableLoader.cpp:
2725 (WebCore::DocumentThreadableLoader::finishedTimingForWorkerLoad):
2726 (WebCore::DocumentThreadableLoader::loadRequest):
2727 * loader/DocumentThreadableLoader.h:
2728 * loader/ResourceTimingInformation.cpp:
2729 * loader/ResourceTimingInformation.h:
2730 * loader/SubresourceLoader.cpp:
2731 (WebCore::SubresourceLoader::didFinishLoading):
2732 (WebCore::SubresourceLoader::reportResourceTiming):
2733 * loader/SubresourceLoader.h:
2734 * loader/ThreadableLoaderClient.h:
2735 (WebCore::ThreadableLoaderClient::didFail):
2736 (WebCore::ThreadableLoaderClient::didFinishTiming):
2737 * loader/WorkerThreadableLoader.cpp:
2738 (WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishTiming):
2739 * loader/WorkerThreadableLoader.h:
2740 * loader/cache/CachedResourceLoader.cpp:
2741 (WebCore::CachedResourceLoader::requestResource):
2742 (WebCore::CachedResourceLoader::revalidateResource):
2743 (WebCore::CachedResourceLoader::loadResource):
2744 * loader/cache/CachedResourceLoader.h:
2745 (WebCore::CachedResourceLoader::resourceTimingInformation):
2746 * page/DOMWindow.cpp:
2747 (WebCore::DOMWindow::~DOMWindow):
2748 (WebCore::DOMWindow::resetDOMWindowProperties):
2749 (WebCore::DOMWindow::nowTimestamp):
2750 (WebCore::DOMWindow::removeAllEventListeners):
2752 * page/GlobalPerformance.idl:
2753 * page/Performance.cpp:
2754 * page/Performance.h:
2755 * page/Performance.idl:
2756 * page/PerformanceEntry.cpp:
2757 * page/PerformanceEntry.h:
2758 * page/PerformanceEntry.idl:
2759 * page/PerformanceMark.h:
2760 * page/PerformanceMark.idl:
2761 * page/PerformanceMeasure.h:
2762 * page/PerformanceMeasure.idl:
2763 * page/PerformanceNavigation.cpp:
2764 * page/PerformanceNavigation.h:
2765 * page/PerformanceNavigation.idl:
2766 * page/PerformanceObserver.cpp:
2767 * page/PerformanceObserver.h:
2768 * page/PerformanceObserver.idl:
2769 * page/PerformanceObserverCallback.h:
2770 * page/PerformanceObserverCallback.idl:
2771 * page/PerformanceObserverEntryList.cpp:
2772 * page/PerformanceObserverEntryList.h:
2773 * page/PerformanceObserverEntryList.idl:
2774 * page/PerformanceResourceTiming.cpp:
2775 * page/PerformanceResourceTiming.h:
2776 * page/PerformanceResourceTiming.idl:
2777 * page/PerformanceTiming.cpp:
2778 * page/PerformanceTiming.h:
2779 * page/PerformanceTiming.idl:
2780 * page/PerformanceUserTiming.cpp:
2781 * page/PerformanceUserTiming.h:
2782 * platform/network/ResourceHandle.h:
2783 * platform/network/ResourceHandleInternal.h:
2784 * platform/network/cf/ResourceHandleCFNet.cpp:
2785 (WebCore::ResourceHandle::start):
2786 * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
2787 (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
2788 * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
2789 (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
2790 * platform/network/curl/ResourceHandleCurl.cpp:
2791 (WebCore::ResourceHandleInternal::didFinish):
2792 (WebCore::ResourceHandleInternal::calculateWebTimingInformations):
2793 (WebCore::ResourceHandleInternal::dispatchSynchronousJob):
2794 * platform/network/mac/ResourceHandleMac.mm:
2795 (WebCore::ResourceHandle::createNSURLConnection):
2796 * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
2797 (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
2798 * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
2799 (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
2800 * platform/network/soup/ResourceHandleSoup.cpp:
2801 (WebCore::restartedCallback):
2802 (WebCore::sendRequestCallback):
2803 (WebCore::createSoupMessageForHandleAndRequest):
2804 (WebCore::ResourceHandle::sendPendingRequest):
2805 * platform/network/soup/SoupNetworkSession.cpp:
2806 (WebCore::SoupNetworkSession::SoupNetworkSession):
2807 * workers/WorkerGlobalScope.cpp:
2808 (WebCore::WorkerGlobalScope::WorkerGlobalScope):
2809 (WebCore::WorkerGlobalScope::~WorkerGlobalScope):
2810 (WebCore::WorkerGlobalScope::removeAllEventListeners):
2811 * workers/WorkerGlobalScope.h:
2813 2017-07-26 Chris Dumez <cdumez@apple.com>
2815 Pressing the Escape key should not be a valid user gesture to enter fullscreen
2816 https://bugs.webkit.org/show_bug.cgi?id=174864
2817 <rdar://problem/33009088>
2819 Reviewed by Geoffrey Garen.
2821 Pressing the Escape key should not be a valid user gesture to enter fullscreen since this
2822 is the gesture to exit fullscreen already.
2824 Test: fullscreen/requestFullscreen-escape-key.html
2827 (WebCore::Document::requestFullScreenForElement):
2828 * dom/UserGestureIndicator.cpp:
2829 (WebCore::UserGestureIndicator::UserGestureIndicator):
2830 * dom/UserGestureIndicator.h:
2831 (WebCore::UserGestureToken::create):
2832 (WebCore::UserGestureToken::gestureType):
2833 (WebCore::UserGestureToken::UserGestureToken):
2834 * page/EventHandler.cpp:
2835 (WebCore::EventHandler::internalKeyEvent):
2837 2017-07-26 Nan Wang <n_wang@apple.com>
2839 AX: Incorrect range from index and length in contenteditable with <p> tags
2840 https://bugs.webkit.org/show_bug.cgi?id=174856
2842 Reviewed by Chris Fleizach.
2844 When asking for the string inside a text control with a given range, we sometimes get
2845 a wrong string at the line boundary due to a bad plain range to text marker conversion.
2846 To fix this, we should use the exsisting method on text controls to avoid this issue.
2848 Updated the test to test the problematic case.
2850 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2851 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
2853 2017-07-26 Daewoong Jang <daewoong.jang@navercorp.com>
2855 [Curl] Bug fix after r219606
2856 https://bugs.webkit.org/show_bug.cgi?id=174845
2858 Reviewed by Alex Christensen.
2860 * platform/network/curl/CurlContext.h:
2861 (WebCore::CurlSList::isEmpty):
2862 * platform/network/curl/ResourceHandleCurl.cpp:
2863 (WebCore::ResourceHandleInternal::didReceiveHeaderLine):
2864 (WebCore::ResourceHandleInternal::headerCallback):
2866 2017-07-26 Zan Dobersek <zdobersek@igalia.com>
2868 [EME][GStreamer] Multi-key support in the GStreamer ClearKey decryptor
2869 https://bugs.webkit.org/show_bug.cgi?id=174779
2871 Reviewed by Xabier Rodriguez-Calvar.
2873 In the CENC decryptor, the key ID value is retrieved from the info structure
2874 on the GstProtectionMeta object. GstBuffer for that value is retrieved and
2875 passed to the setupCipher() function.
2877 In the ClearKey decryptor (which extends the CENC decryptor), the single
2878 GstBuffer object on the private instance that holds the key value is replaced
2879 with a Vector object that holds pairs of key ID and value GstBuffers. In the
2880 handleKeyResponse() implementation that Vector is emptied and then refilled
2881 with key ID and value pairs that are passed in through the drm-cipher-clearkey
2882 structure that's attached to the GstEvent that signalled new key information.
2884 In the ClearKey decryptor's setupCipher() implementation the passed-in key ID
2885 buffer is used to find a matching key ID and value pair stored on the private
2886 instance. If not found, an error is thrown. If found, the matching key value
2887 is used for decryption.
2889 * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
2890 (webKitMediaClearKeyDecryptorHandleKeyResponse):
2891 (webKitMediaClearKeyDecryptorSetupCipher):
2892 * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
2893 (webkitMediaCommonEncryptionDecryptTransformInPlace):
2894 (webKitMediaCommonEncryptionDecryptDefaultSetupCipher):
2895 * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h:
2897 2017-07-26 Zan Dobersek <zdobersek@igalia.com>
2899 [EME][GStreamer] Handle ClearKey as a supported key system
2900 https://bugs.webkit.org/show_bug.cgi?id=174778
2902 Reviewed by Xabier Rodriguez-Calvar.
2904 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2905 (WebCore::MediaPlayerPrivateGStreamerBase::supportsKeySystem):
2906 Return true for the 'org.w3.clearkey' key system when building with
2907 ENCRYPTED_MEDIA enabled. The underlying implementation will follow.
2909 2017-07-26 Claudio Saavedra <csaavedra@igalia.com>
2911 [WPE] Fix a potential crash in the platform pasteboard when reading a string
2912 https://bugs.webkit.org/show_bug.cgi?id=174859
2914 Reviewed by Žan Doberšek.
2916 We shouldn't assume that the wpe_pasteboard_string struct will be
2917 filled in, so initialize it.
2919 * platform/wpe/PlatformPasteboardWPE.cpp:
2920 (WebCore::PlatformPasteboard::readString): Initialize the struct
2921 before passing it to wpe and early return if it's still empty.
2923 2017-07-26 Javier Fernandez <jfernandez@igalia.com>
2925 InsertOrderedList command applied to table cells inserts an extra BR before the table
2926 https://bugs.webkit.org/show_bug.cgi?id=174593
2928 Reviewed by Darin Adler.
2930 Don't add BR when pruning empty blocks if it's the start of a paragraph.
2932 The function MoveParagraph is used for several operations and editing
2933 commands, like 'insertOrderedList'. When moving paragraphs we check out
2934 whether we should add a 'br' element to avoid undesired block collapse.
2936 However, we shouldn't do this when destination is the start of a
2939 Tests: editing/inserting/insert-list-in-table-cell-01.html
2940 editing/inserting/insert-list-in-table-cell-02.html
2941 editing/inserting/insert-list-in-table-cell-03.html
2942 editing/inserting/insert-list-in-table-cell-04.html
2943 editing/inserting/insert-list-in-table-cell-05.html
2944 editing/inserting/insert-list-in-table-cell-06.html
2945 editing/inserting/insert-list-in-table-cell-07.html
2946 editing/inserting/insert-list-in-table-cell-08.html
2948 * editing/CompositeEditCommand.cpp:
2949 (WebCore::CompositeEditCommand::moveParagraphs):
2951 2017-07-26 Zan Dobersek <zdobersek@igalia.com>
2953 [WPE] WebGL2 support
2954 https://bugs.webkit.org/show_bug.cgi?id=174249
2956 Reviewed by Alex Christensen.
2958 Implement WebGL2 support in GraphicsContext3DCairo for the WPE port, but keep
2959 the implementation specific to libepoxy (which WPE leverages by default).
2961 In the GraphicsContext3D::create() method, we first construct the
2962 GraphicsContext3D object that also ensures a current GL context on this thread.
2963 Only then can we determine through libepoxy whether the underlying GL library
2964 is able to support WebGL2.
2966 For WebGL2, the GLES3 support is required. The initial libepoxy implementation
2967 ensures this only in case of 'non-desktop GL' library of minimum version 3.0.
2968 This effectively translates to the only supported configuration being the
2969 EGL and OpenGL ES 3.0 (or higher) combination. If this cannot be ensured, we
2970 discard the existing GraphicsContext3D object and return null.
2972 WebGL2 can also be supported via OpenGL (i.e. 'desktop GL'), but this hasn't
2973 been tested yet. Implementation will in the future be extended to support that
2976 In the GraphicsContext3D constructor itself, the ANGLEWebKitBridge constructor
2977 has to now receive the second argument, the desired shader specification that's
2978 used when parsing the provided shaders. This should be SH_WEBGL_SPEC for WebGL1,
2979 and SH_WEBGL2_SPEC for WebGL2.
2981 No new tests -- a small set of existing WebGL2 tests is unskipped and passing.
2983 * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
2984 (WebCore::GraphicsContext3D::create):
2985 (WebCore::GraphicsContext3D::GraphicsContext3D):
2986 * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2987 Add WebGL2-specific methods to the build.
2989 2017-07-26 Nan Wang <n_wang@apple.com>
2991 AX: should dispatch accessibilityPerformPressAction async on MacOS
2992 https://bugs.webkit.org/show_bug.cgi?id=174849
2994 Reviewed by Chris Fleizach.
2996 If performing the accessibility press action results in a modal alert being displayed,
2997 it can cause VoiceOver to hang. To fix it, we should dispatch the action asynchronously.
2999 Updated tests to adapt to this change.
3001 * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3002 (-[WebAccessibilityObjectWrapper accessibilityPerformPressAction]):
3003 (-[WebAccessibilityObjectWrapper _accessibilityPerformPressAction]):
3005 2017-07-25 Carlos Garcia Campos <cgarcia@igalia.com>
3007 Icon loader error on startup
3008 https://bugs.webkit.org/show_bug.cgi?id=174787
3010 Reviewed by Brady Eidson.
3012 This is a regression of the new icon loading, it happens with pages that shouldn't have a favicon, like about
3013 pages. IconController::startLoader() did several checks before starting the load that
3014 DocumentLoader::startIconLoading() is not doing. It checked that the frame is the main one, the document can have
3015 an icon (document url is not empty and not about:blank) and that favicon url is in HTTP family. We should do the
3016 same checks now before starting to load icons.
3018 * loader/DocumentLoader.cpp:
3019 (WebCore::DocumentLoader::startIconLoading):
3021 2017-07-25 Sam Weinig <sam@webkit.org>
3023 [WebIDL] Remove custom bindings for HTMLCanvasElement
3024 https://bugs.webkit.org/show_bug.cgi?id=174847
3026 Reviewed by Darin Adler.
3029 * WebCore.xcodeproj/project.pbxproj:
3030 * bindings/js/JSBindingsAllInOne.cpp:
3031 * bindings/js/JSHTMLCanvasElementCustom.cpp: Removed.
3032 Remove JSHTMLCanvasElementCustom.
3034 * html/HTMLCanvasElement.cpp:
3035 (WebCore::HTMLCanvasElement::getContext):
3036 (WebCore::HTMLCanvasElement::getContext2d):
3037 (WebCore::HTMLCanvasElement::getContextWebGL):
3038 (WebCore::HTMLCanvasElement::getContextWebGPU):
3039 * html/HTMLCanvasElement.h:
3040 * html/HTMLCanvasElement.idl:
3041 Move context picking code to HTMLCanvasElement. Give more
3042 exact types to remaining context getters.
3044 2017-07-25 Chris Dumez <cdumez@apple.com>
3046 Clean up ExceptionCode enumeration
3047 https://bugs.webkit.org/show_bug.cgi?id=174812
3049 Reviewed by Darin Adler.
3051 Clean up ExceptionCode enumeration:
3052 - Updated comments to reflect the latest WebIDL specification
3053 - Drop special values given to some exception codes. Those legacy codes are already in the
3054 table inside DOMException.cpp. This also allows us to drop empty rows in the DOMException
3056 - Drop NoException value in the enumeration and use std::optional<ExceptionCode> when needed
3059 * Modules/indexeddb/shared/IDBError.cpp:
3060 (WebCore::IDBError::IDBError):
3061 (WebCore::IDBError::name):
3062 (WebCore::IDBError::message):
3063 * Modules/indexeddb/shared/IDBError.h:
3064 (WebCore::IDBError::code):
3065 (WebCore::IDBError::encode):
3066 (WebCore::IDBError::decode):
3067 * dom/DOMException.cpp:
3068 * dom/ExceptionCode.h:
3069 * fileapi/FileReaderSync.cpp:
3070 (WebCore::errorCodeToException):
3071 (WebCore::FileReaderSync::startLoading):
3072 * xml/XMLHttpRequest.cpp:
3073 (WebCore::XMLHttpRequest::createRequest):
3074 * xml/XMLHttpRequest.h:
3076 2017-07-25 Andy Estes <aestes@apple.com>
3078 [Apple Pay] Add "carteBancaire" as a supported payment network
3079 https://bugs.webkit.org/show_bug.cgi?id=174841
3080 <rdar://problem/31935596>
3082 Reviewed by Alex Christensen.
3084 Tests: http/tests/ssl/applepay/ApplePaySession.html
3085 http/tests/ssl/applepay/ApplePaySessionV3.html
3087 * Modules/applepay/PaymentRequest.cpp:
3088 (WebCore::PaymentRequest::isValidSupportedNetwork):
3090 2017-07-25 Daniel Bates <dabates@apple.com>
3092 Make StyleResolver::isValid{Cue, Region}StyleProperty() static, inline, non-member functions
3093 https://bugs.webkit.org/show_bug.cgi?id=174827
3095 Reviewed by Simon Fraser.
3097 StyleResolver::isValid{Cue, Region}StyleProperty() access neither instance nor
3098 class data. Moreover, they are private member functions and hence cannot be
3099 used outside of StyleResolver's implementation. So, make these static, inline,
3100 non-member functions.
3102 * css/StyleResolver.cpp:
3103 (WebCore::isValidRegionStyleProperty):
3104 (WebCore::isValidCueStyleProperty):
3105 (WebCore::StyleResolver::CascadedProperties::addMatch):
3106 (WebCore::StyleResolver::isValidRegionStyleProperty): Deleted.
3107 (WebCore::StyleResolver::isValidCueStyleProperty): Deleted.
3108 * css/StyleResolver.h:
3110 2017-07-25 Per Arne Vollan <pvollan@apple.com>
3112 Dragged links are blurry on 1x displays.
3113 https://bugs.webkit.org/show_bug.cgi?id=174831
3114 <rdar://problem/33519698>
3116 Reviewed by Simon Fraser.
3118 When the width and height of the drag image is a multiple of 2, the drag image is not blurry
3119 on a 1x display. This is a workaround which should be removed when <rdar://problem/33059739>
3122 No new tests, since this is not straightforward to test with a layout test.
3124 * platform/mac/DragImageMac.mm:
3125 (WebCore::LinkImageLayout::LinkImageLayout):
3127 2017-07-25 Matt Baker <mattbaker@apple.com>
3129 Web Inspector: Refactoring: extract async stack trace logic from InspectorInstrumentation
3130 https://bugs.webkit.org/show_bug.cgi?id=174738
3132 Reviewed by Brian Burg.
3134 Relocate AsyncCallType from InspectorInstrumentation to the debugger
3135 agent. Plumbing for `requestAnimationFrame` notifications has been added
3136 to PageDebuggerAgent, which is responsible for managing async stack traces.
3138 * dom/ScriptedAnimationController.cpp:
3139 (WebCore::ScriptedAnimationController::registerCallback):
3140 (WebCore::ScriptedAnimationController::cancelCallback):
3141 (WebCore::ScriptedAnimationController::serviceScriptedAnimations):
3143 * inspector/InspectorInstrumentation.cpp:
3144 (WebCore::InspectorInstrumentation::didInstallTimerImpl):
3145 (WebCore::InspectorInstrumentation::didRemoveTimerImpl):
3146 (WebCore::InspectorInstrumentation::willFireTimerImpl):
3147 (WebCore::InspectorInstrumentation::didRequestAnimationFrameImpl):
3148 (WebCore::InspectorInstrumentation::didCancelAnimationFrameImpl):
3149 (WebCore::InspectorInstrumentation::willFireAnimationFrameImpl):
3151 (WebCore::didScheduleAsyncCall): Deleted.
3153 * inspector/InspectorInstrumentation.h:
3154 (WebCore::InspectorInstrumentation::didRequestAnimationFrame):
3155 (WebCore::InspectorInstrumentation::didCancelAnimationFrame):
3156 (WebCore::InspectorInstrumentation::willFireAnimationFrame):
3157 Replaced Frame and Document pointers with references and moved
3158 pointer validation upstream.
3160 * inspector/PageDebuggerAgent.cpp:
3161 (WebCore::PageDebuggerAgent::didRequestAnimationFrame):
3162 (WebCore::PageDebuggerAgent::willFireAnimationFrame):
3163 (WebCore::PageDebuggerAgent::didCancelAnimationFrame):
3164 * inspector/PageDebuggerAgent.h:
3166 2017-07-25 Said Abou-Hallawa <sabouhallawa@apple.com>
3168 Async image decoding for large images should be disabled after the first time a tile is painted
3169 https://bugs.webkit.org/show_bug.cgi?id=174451
3170 <rdar://problem/31246421>
3172 Reviewed by Simon Fraser.
3174 Flashing because of DOM mutation can be fixed by disabling the asynchronous
3175 image decoding after the first time a tile was painted.
3177 We can detect this by consulting the tile repaintCount. If it is zero, then
3178 it is safe to use asynchronous image decoded. If the tile repaintCount is
3179 greater than zero, we are not sure if the renderer rectangle has an image
3180 drawn in it already or not. In this case we have to use the synchronous
3181 image decoding to avoid causing a flash.
3183 Tests: fast/images/async-image-background-change.html
3184 fast/images/async-image-src-change.html
3185 http/tests/multipart/multipart-async-image.html
3187 * html/shadow/MediaControlElements.cpp:
3188 (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
3189 * page/FrameView.cpp:
3190 (WebCore::FrameView::willPaintContents):
3191 (WebCore::FrameView::paintContentsForSnapshot):
3192 * page/PageOverlayController.cpp:
3193 (WebCore::PageOverlayController::paintContents):
3194 * page/PageOverlayController.h:
3195 * page/linux/ResourceUsageOverlayLinux.cpp:
3196 * page/mac/ServicesOverlayController.h:
3197 * page/mac/ServicesOverlayController.mm:
3198 (WebCore::ServicesOverlayController::Highlight::paintContents):
3199 * platform/graphics/BitmapImage.cpp:
3200 (WebCore::BitmapImage::draw):
3201 * platform/graphics/BitmapImage.h:
3202 * platform/graphics/GraphicsLayer.cpp:
3203 (WebCore::GraphicsLayer::paintGraphicsLayerContents):
3204 * platform/graphics/GraphicsLayer.h:
3205 * platform/graphics/GraphicsLayerClient.h:
3206 (WebCore::GraphicsLayerClient::paintContents):
3207 * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3208 (WebCore::LayerClient::platformCALayerPaintContents):
3209 * platform/graphics/ca/GraphicsLayerCA.cpp:
3210 (WebCore::GraphicsLayerCA::platformCALayerPaintContents):
3211 * platform/graphics/ca/GraphicsLayerCA.h:
3212 * platform/graphics/ca/PlatformCALayer.h:
3213 * platform/graphics/ca/PlatformCALayerClient.h:
3214 (WebCore::PlatformCALayerClient::platformCALayerRepaintCount):
3215 * platform/graphics/ca/TileCoverageMap.cpp:
3216 (WebCore::TileCoverageMap::platformCALayerPaintContents):
3217 * platform/graphics/ca/TileCoverageMap.h:
3218 * platform/graphics/ca/TileGrid.cpp:
3219 (WebCore::TileGrid::platformCALayerPaintContents):
3220 (WebCore::TileGrid::platformCALayerRepaintCount):
3221 * platform/graphics/ca/TileGrid.h:
3222 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
3223 (PlatformCALayer::drawLayerContents):
3224 * platform/graphics/ca/win/PlatformCALayerWin.cpp:
3225 (PlatformCALayer::drawLayerContents):
3226 * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
3227 (PlatformCALayerWinInternal::displayCallback):
3228 * platform/graphics/ca/win/WebTiledBackingLayerWin.cpp:
3229 (WebTiledBackingLayerWin::displayCallback):
3230 * platform/graphics/mac/WebLayer.mm:
3231 (-[WebLayer drawInContext:]):
3232 (-[WebSimpleLayer drawInContext:]):
3233 * rendering/PaintPhase.h:
3234 * rendering/RenderBoxModelObject.cpp:
3235 (WebCore::RenderBoxModelObject::decodingModeForImageDraw):
3236 * rendering/RenderElement.h:
3237 * rendering/RenderLayer.cpp:
3238 (WebCore::RenderLayer::paintLayerContents):
3239 (WebCore::RenderLayer::paintForegroundForFragments):
3240 * rendering/RenderLayerBacking.cpp:
3241 (WebCore::RenderLayerBacking::paintContents):
3242 * rendering/RenderLayerBacking.h:
3243 * rendering/RenderLayerCompositor.cpp:
3244 (WebCore::RenderLayerCompositor::paintContents):
3245 * rendering/RenderLayerCompositor.h:
3246 * rendering/RenderWidget.cpp:
3247 (WebCore::RenderWidget::paintContents):
3248 * testing/Internals.cpp:
3249 (WebCore::imageFromImageElement):
3250 (WebCore::bitmapImageFromImageElement):
3251 (WebCore::Internals::imageFrameIndex):
3252 (WebCore::Internals::setImageFrameDecodingDuration):
3253 (WebCore::Internals::resetImageAnimation):
3254 (WebCore::Internals::isImageAnimating):
3255 (WebCore::Internals::setClearDecoderAfterAsyncFrameRequestForTesting):
3256 (WebCore::Internals::imageDecodeCount):
3257 (WebCore::Internals::setLargeImageAsyncDecodingEnabledForTesting):
3258 * testing/Internals.h:
3259 * testing/Internals.idl:
3261 2017-07-23 Sam Weinig <sam@webkit.org>
3263 [WebIDL] Add support for generating timer bindings
3264 https://bugs.webkit.org/show_bug.cgi?id=174766
3266 Reviewed by Darin Adler.
3268 Adds a new non-standard type, ScheduledAction, which stands in for the
3269 standard (DOMString or Function). It would be good to move to that in
3270 future, but for now, this allows for forward momentum on removing custom
3273 * WebCore.xcodeproj/project.pbxproj:
3274 Add JSDOMConvertScheduledAction.h.
3276 * bindings/IDLTypes.h:
3277 Add IDLScheduledAction.
3279 * bindings/js/JSDOMConvertScheduledAction.h: Added.
3280 (WebCore::Converter<IDLScheduledAction>::convert):
3281 Add conversion from JSValue -> ScheduledAction. This is moved from the old ScheduledAction
3284 * bindings/js/JSDOMConvertVariadic.h:
3285 (WebCore::convertVariadicArguments):
3286 (WebCore::Detail::VariadicConverterBase::convert): Deleted.
3287 (WebCore::Detail::VariadicConverterBase<IDLInterface<T>>::convert): Deleted.
3288 * bindings/js/JSDOMConvertBase.h:
3289 * bindings/js/JSDOMConvertAny.h:
3290 (WebCore::VariadicConverter<IDLAny>::convert):
3291 * bindings/js/JSDOMConvertInterface.h:
3292 (WebCore::VariadicConverter<IDLInterface<T>>::convert):
3293 Rename VariadicConverter to VariadicConverterDetails, and remove base class. Rename
3294 VariadicConverterBase to VariadicConverter, and move specializations to the file
3295 containing the base converter for that IDL type
3297 * bindings/js/JSDOMWindowCustom.cpp:
3298 (WebCore::JSDOMWindow::setTimeout): Deleted.
3299 (WebCore::JSDOMWindow::setInterval): Deleted.
3300 * bindings/js/JSWorkerGlobalScopeCustom.cpp:
3301 (WebCore::JSWorkerGlobalScope::setTimeout): Deleted.
3302 (WebCore::JSWorkerGlobalScope::setInterval): Deleted.
3303 Remove custom implementations of setTimeout and setInterval.
3305 * bindings/js/ScheduledAction.cpp:
3306 (WebCore::ScheduledAction::create):
3307 (WebCore::ScheduledAction::ScheduledAction):
3308 (WebCore::ScheduledAction::~ScheduledAction):
3309 (WebCore::ScheduledAction::addArguments):
3310 (WebCore::ScheduledAction::executeFunctionInContext):
3311 * bindings/js/ScheduledAction.h:
3312 (WebCore::ScheduledAction::ScheduledAction): Deleted.
3313 Rework ScheduledAction. Now has two create functions, one for the function
3314 form, one for the string form. These are now called by the Converter. Also,
3315 rather than extracting the arguments directly from the ExecState, allow the
3316 bindings to work as designed, and have the arguments come in as variadic
3317 arguments to setTimeout/setInterval and get added to the ScheduledAction if
3318 needed. Also, move ContentSecurityPolicy check out of construction, and into
3319 setTimeout/setInterval.
3321 * bindings/scripts/CodeGenerator.pm:
3323 Add ScheduledAction to the builtin list.
3325 * bindings/scripts/CodeGeneratorJS.pm:
3326 (AddToIncludesForIDLType):
3327 Add the correct include when ScheduledAction is used.
3329 (GenerateParametersCheck):
3330 Remove rule disallowing optional arguments before variadic arguments. That works
3334 Add mapping of ScheduledAction -> IDLScheduledAction.
3336 (JSValueToNativeDOMConvertNeedsGlobalObject):
3337 Add ScheduledAction to the list of types that need a global object
3340 * page/WindowOrWorkerGlobalScope.idl:
3341 Update interface to match spec and add FIXMEs for moving to TimerHandler.
3343 * page/DOMWindow.cpp:
3344 (WebCore::DOMWindow::setTimeout):
3345 (WebCore::DOMWindow::setInterval):
3347 * workers/WorkerGlobalScope.cpp:
3348 (WebCore::WorkerGlobalScope::setTimeout):
3349 (WebCore::WorkerGlobalScope::setInterval):
3350 * workers/WorkerGlobalScope.h:
3351 Update for new signatures. WorkerGlobalScope now has to return ExceptionOr<int>
3352 even though it never throws, due to having one IDL file defining these. This is
3353 unfortunate and something we should look at addressing the future.
3355 2017-07-25 Yoshiaki Jitsukawa <Yoshiaki.Jitsukawa@sony.com>
3357 [WinCairo] Fix build with AllInOnes disabled
3358 https://bugs.webkit.org/show_bug.cgi?id=174784
3359 <rdar://problem/33488914>
3361 Reviewed by Alex Christensen.
3363 * PlatformWin.cmake:
3364 Add RenderThemeWin.cpp to WebCore_SOURCES
3366 * rendering/RenderingAllInOne.cpp:
3367 Remove #include "RenderThemeWin.cpp"
3369 * testing/MemoryInfo.h:
3370 Remove #include "JSDomWindow.h"
3372 * bindings/js/JSDOMGlobalObject.cpp:
3373 * bindings/js/JSDOMPromiseDeferred.cpp:
3374 * bindings/js/JSDOMWrapper.cpp:
3375 * bindings/js/JSImageDataCustom.cpp:
3376 * bindings/scripts/CodeGeneratorJS.pm:
3378 * dom/ScriptExecutionContext.cpp:
3379 * inspector/InspectorController.cpp:
3380 * inspector/InspectorTimelineAgent.cpp:
3381 * rendering/RenderMediaControls.cpp:
3382 * rendering/RenderMediaControls.h:
3383 * rendering/RenderThemeWin.cpp:
3385 * bindings/scripts/test/JS/JSTestObj.cpp:
3386 Update test results.
3388 2017-07-25 Konstantin Tokarev <annulen@yandex.ru>
3390 Unreviewed, fix Mac CMake build after r219567