libwebrtc update broke internal builds
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2018-03-08  Youenn Fablet  <youenn@apple.com>
2
3         libwebrtc update broke internal builds
4         https://bugs.webkit.org/show_bug.cgi?id=183454
5
6         Reviewed by Eric Carlson.
7
8         No change of behavior.
9         Fixed header search paths.
10         Removed deleted file from XCode project as an additional clean-up.
11
12         * Configurations/WebCore.xcconfig:
13         * WebCore.xcodeproj/project.pbxproj:
14
15 2018-03-08  Per Arne Vollan  <pvollan@apple.com>
16
17         NSAnimation is not working in the WebContent process when WindowServer access is blocked.
18         https://bugs.webkit.org/show_bug.cgi?id=183291
19
20         Reviewed by Dean Jackson.
21
22         The animation can be implemented by using an NSTimer instead. Use the existing Bezier timing
23         function to create a smooth animation.
24
25         No new tests. This code is used to fade scrollbars in and out by animating the alpha value.
26         This scrollbar setting is not the default in macOS, which makes it non trivial to create
27         layout tests for this.
28
29         * platform/mac/ScrollAnimatorMac.mm:
30         (-[WebScrollbarPartAnimation initWithScrollbar:featureToAnimate:animateFrom:animateTo:duration:]):
31         (-[WebScrollbarPartAnimation startAnimation]):
32         (-[WebScrollbarPartAnimation setCurrentProgress:setCurrentProgress:]):
33         (-[WebScrollbarPartAnimation invalidate]):
34         (-[WebScrollbarPartAnimation setDuration:]):
35         (-[WebScrollbarPartAnimation stopAnimation]):
36         (-[WebScrollbarPartAnimation setCurrentProgress:]): Deleted.
37
38 2018-03-08  Said Abou-Hallawa  <sabouhallawa@apple.com>
39
40         Templatize SVGAnimatedType
41         https://bugs.webkit.org/show_bug.cgi?id=183017
42
43         Reviewed by Dean Jackson.
44
45         This is a work toward https://bugs.webkit.org/show_bug.cgi?id=168586. The
46         goal to have SVGAnimatedType be type independent. The appropriate method
47         of this template will be implicitly instantiated based to the type of the
48         animated attribute(s).
49
50         * Sources.txt: Delete SVGAnimatedType.cpp since its function became template
51         functions or short enough to be inline functions.
52         * WebCore.xcodeproj/project.pbxproj:
53         * svg/SVGAnimatedAngle.cpp:
54         (WebCore::SVGAnimatedAngleAnimator::constructFromString):
55         (WebCore::SVGAnimatedAngleAnimator::startAnimValAnimation):
56         (WebCore::SVGAnimatedAngleAnimator::resetAnimValToBaseVal):
57         (WebCore::SVGAnimatedAngleAnimator::addAnimatedTypes):
58         (WebCore::SVGAnimatedAngleAnimator::calculateAnimatedValue):
59         Use the template functions SVGAnimatedType::create<>() and SVGAnimatedType::as<>().
60
61         * svg/SVGAnimatedBoolean.cpp:
62         (WebCore::SVGAnimatedBooleanAnimator::constructFromString):
63         (WebCore::SVGAnimatedBooleanAnimator::startAnimValAnimation):
64         (WebCore::SVGAnimatedBooleanAnimator::resetAnimValToBaseVal):
65         (WebCore::SVGAnimatedBooleanAnimator::calculateAnimatedValue):
66         Ditto.
67
68         * svg/SVGAnimatedColor.cpp:
69         (WebCore::SVGAnimatedColorAnimator::constructFromString):
70         (WebCore::SVGAnimatedColorAnimator::addAnimatedTypes):
71         (WebCore::SVGAnimatedColorAnimator::calculateAnimatedValue):
72         Ditto.
73
74         * svg/SVGAnimatedEnumeration.cpp:
75         (WebCore::SVGAnimatedEnumerationAnimator::constructFromString):
76         (WebCore::SVGAnimatedEnumerationAnimator::startAnimValAnimation):
77         (WebCore::SVGAnimatedEnumerationAnimator::resetAnimValToBaseVal):
78         (WebCore::SVGAnimatedEnumerationAnimator::calculateAnimatedValue):
79         Ditto.
80
81         * svg/SVGAnimatedInteger.cpp:
82         (WebCore::SVGAnimatedIntegerAnimator::constructFromString):
83         (WebCore::SVGAnimatedIntegerAnimator::startAnimValAnimation):
84         (WebCore::SVGAnimatedIntegerAnimator::resetAnimValToBaseVal):
85         (WebCore::SVGAnimatedIntegerAnimator::addAnimatedTypes):
86         (WebCore::SVGAnimatedIntegerAnimator::calculateAnimatedValue):
87         Ditto.
88
89         * svg/SVGAnimatedIntegerOptionalInteger.cpp:
90         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::constructFromString):
91         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::startAnimValAnimation):
92         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::resetAnimValToBaseVal):
93         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::addAnimatedTypes):
94         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::calculateAnimatedValue):
95         Ditto.
96
97         * svg/SVGAnimatedLength.cpp:
98         (WebCore::SVGAnimatedLengthAnimator::constructFromString):
99         (WebCore::SVGAnimatedLengthAnimator::startAnimValAnimation):
100         (WebCore::SVGAnimatedLengthAnimator::resetAnimValToBaseVal):
101         (WebCore::SVGAnimatedLengthAnimator::addAnimatedTypes):
102         (WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue):
103         Ditto.
104
105         * svg/SVGAnimatedLengthList.cpp:
106         (WebCore::SVGAnimatedLengthListAnimator::constructFromString):
107         (WebCore::SVGAnimatedLengthListAnimator::startAnimValAnimation):
108         (WebCore::SVGAnimatedLengthListAnimator::resetAnimValToBaseVal):
109         (WebCore::SVGAnimatedLengthListAnimator::addAnimatedTypes):
110         (WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue):
111         Ditto.
112
113         * svg/SVGAnimatedNumber.cpp:
114         (WebCore::SVGAnimatedNumberAnimator::constructFromString):
115         (WebCore::SVGAnimatedNumberAnimator::startAnimValAnimation):
116         (WebCore::SVGAnimatedNumberAnimator::resetAnimValToBaseVal):
117         (WebCore::SVGAnimatedNumberAnimator::addAnimatedTypes):
118         (WebCore::SVGAnimatedNumberAnimator::calculateAnimatedValue):
119         Ditto.
120
121         * svg/SVGAnimatedNumberList.cpp:
122         (WebCore::SVGAnimatedNumberListAnimator::constructFromString):
123         (WebCore::SVGAnimatedNumberListAnimator::startAnimValAnimation):
124         (WebCore::SVGAnimatedNumberListAnimator::resetAnimValToBaseVal):
125         (WebCore::SVGAnimatedNumberListAnimator::addAnimatedTypes):
126         (WebCore::SVGAnimatedNumberListAnimator::calculateAnimatedValue):
127         Ditto.
128
129         * svg/SVGAnimatedNumberOptionalNumber.cpp:
130         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::constructFromString):
131         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::startAnimValAnimation):
132         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::resetAnimValToBaseVal):
133         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::addAnimatedTypes):
134         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::calculateAnimatedValue):
135         Ditto.
136
137         * svg/SVGAnimatedPath.cpp:
138         (WebCore::SVGAnimatedPathAnimator::constructFromString):
139         (WebCore::SVGAnimatedPathAnimator::startAnimValAnimation):
140         (WebCore::SVGAnimatedPathAnimator::resetAnimValToBaseVal):
141         (WebCore::SVGAnimatedPathAnimator::addAnimatedTypes):
142         (WebCore::SVGAnimatedPathAnimator::calculateAnimatedValue):
143         Ditto.
144
145         * svg/SVGAnimatedPointList.cpp:
146         (WebCore::SVGAnimatedPointListAnimator::constructFromString):
147         (WebCore::SVGAnimatedPointListAnimator::startAnimValAnimation):
148         (WebCore::SVGAnimatedPointListAnimator::resetAnimValToBaseVal):
149         (WebCore::SVGAnimatedPointListAnimator::addAnimatedTypes):
150         (WebCore::SVGAnimatedPointListAnimator::calculateAnimatedValue):
151         Ditto.
152
153         * svg/SVGAnimatedPreserveAspectRatio.cpp:
154         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::constructFromString):
155         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::startAnimValAnimation):
156         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::resetAnimValToBaseVal):
157         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::calculateAnimatedValue):
158         Ditto.
159
160         * svg/SVGAnimatedRect.cpp:
161         (WebCore::SVGAnimatedRectAnimator::constructFromString):
162         (WebCore::SVGAnimatedRectAnimator::startAnimValAnimation):
163         (WebCore::SVGAnimatedRectAnimator::resetAnimValToBaseVal):
164         (WebCore::SVGAnimatedRectAnimator::addAnimatedTypes):
165         (WebCore::SVGAnimatedRectAnimator::calculateAnimatedValue):
166         Ditto.
167
168         * svg/SVGAnimatedString.cpp:
169         (WebCore::SVGAnimatedStringAnimator::constructFromString):
170         (WebCore::SVGAnimatedStringAnimator::startAnimValAnimation):
171         (WebCore::SVGAnimatedStringAnimator::resetAnimValToBaseVal):
172         (WebCore::SVGAnimatedStringAnimator::calculateAnimatedValue):
173         Ditto.
174
175         * svg/SVGAnimatedTransformList.cpp:
176         (WebCore::SVGAnimatedTransformListAnimator::constructFromString):
177         (WebCore::SVGAnimatedTransformListAnimator::startAnimValAnimation):
178         (WebCore::SVGAnimatedTransformListAnimator::resetAnimValToBaseVal):
179         (WebCore::SVGAnimatedTransformListAnimator::addAnimatedTypes):
180         (WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue):
181         (WebCore::SVGAnimatedTransformListAnimator::calculateDistance):
182         Ditto.
183
184         * svg/SVGAnimatedType.cpp: Removed.
185         * svg/SVGAnimatedType.h:
186         (WebCore::SVGAnimatedType::create):
187         (WebCore::SVGAnimatedType::SVGAnimatedType):
188         (WebCore::SVGAnimatedType::~SVGAnimatedType):
189         (WebCore::SVGAnimatedType::as const):
190         (WebCore::SVGAnimatedType::as):
191         (WebCore::SVGAnimatedType::type const):
192         (WebCore::SVGAnimatedType::valueAsString const):
193         (WebCore::SVGAnimatedType::setValueAsString):
194         (WebCore::SVGAnimatedType::supportsAnimVal):
195         (WebCore::SVGAnimatedType::angleAndEnumeration const): Deleted.
196         (WebCore::SVGAnimatedType::boolean const): Deleted.
197         (WebCore::SVGAnimatedType::color const): Deleted.
198         (WebCore::SVGAnimatedType::enumeration const): Deleted.
199         (WebCore::SVGAnimatedType::integer const): Deleted.
200         (WebCore::SVGAnimatedType::integerOptionalInteger const): Deleted.
201         (WebCore::SVGAnimatedType::length const): Deleted.
202         (WebCore::SVGAnimatedType::lengthList const): Deleted.
203         (WebCore::SVGAnimatedType::number const): Deleted.
204         (WebCore::SVGAnimatedType::numberList const): Deleted.
205         (WebCore::SVGAnimatedType::numberOptionalNumber const): Deleted.
206         (WebCore::SVGAnimatedType::path const): Deleted.
207         (WebCore::SVGAnimatedType::pointList const): Deleted.
208         (WebCore::SVGAnimatedType::preserveAspectRatio const): Deleted.
209         (WebCore::SVGAnimatedType::rect const): Deleted.
210         (WebCore::SVGAnimatedType::string const): Deleted.
211         (WebCore::SVGAnimatedType::transformList const): Deleted.
212         (WebCore::SVGAnimatedType::angleAndEnumeration): Deleted.
213         (WebCore::SVGAnimatedType::boolean): Deleted.
214         (WebCore::SVGAnimatedType::color): Deleted.
215         (WebCore::SVGAnimatedType::enumeration): Deleted.
216         (WebCore::SVGAnimatedType::integer): Deleted.
217         (WebCore::SVGAnimatedType::integerOptionalInteger): Deleted.
218         (WebCore::SVGAnimatedType::length): Deleted.
219         (WebCore::SVGAnimatedType::lengthList): Deleted.
220         (WebCore::SVGAnimatedType::number): Deleted.
221         (WebCore::SVGAnimatedType::numberList): Deleted.
222         (WebCore::SVGAnimatedType::numberOptionalNumber): Deleted.
223         (WebCore::SVGAnimatedType::path): Deleted.
224         (WebCore::SVGAnimatedType::pointList): Deleted.
225         (WebCore::SVGAnimatedType::preserveAspectRatio): Deleted.
226         (WebCore::SVGAnimatedType::rect): Deleted.
227         (WebCore::SVGAnimatedType::string): Deleted.
228         (WebCore::SVGAnimatedType::transformList): Deleted.
229         Replace the union by a Variant. Replace all the type specific functions
230         by the template functions create() and as(). Use WTF::visit to get the
231         value stored in the variant. Use the SVGPropertyTraits to perform the
232         required operation.
233
234         * svg/SVGAnimatedTypeAnimator.h:
235         (WebCore::SVGAnimatedTypeAnimator::constructFromBaseValue):
236         (WebCore::SVGAnimatedTypeAnimator::resetFromBaseValue):
237         (WebCore::SVGAnimatedTypeAnimator::stopAnimValAnimationForType):
238         (WebCore::SVGAnimatedTypeAnimator::animValDidChangeForType):
239         (WebCore::SVGAnimatedTypeAnimator::animValWillChangeForType):
240         (WebCore::SVGAnimatedTypeAnimator::constructFromBaseValues):
241         (WebCore::SVGAnimatedTypeAnimator::resetFromBaseValues):
242         (WebCore::SVGAnimatedTypeAnimator::stopAnimValAnimationForTypes):
243         (WebCore::SVGAnimatedTypeAnimator::animValDidChangeForTypes):
244         (WebCore::SVGAnimatedTypeAnimator::animValWillChangeForTypes):
245         (WebCore::SVGAnimatedTypeAnimator::executeAction):
246         Rename the parameters and the local variables to match their types. Use
247         the SVGAnimatedType template functions create() and as().
248
249         * svg/SVGLengthValue.h:
250         (WebCore::SVGPropertyTraits<SVGLengthValue>::parse): This was moved from
251         SVGAnimatedType::setValueAsString()
252         (WebCore::SVGPropertyTraits<SVGLengthValue>::toString): This was moved from
253         SVGAnimatedType::valueAsString().
254
255         * svg/SVGMarkerTypes.h: Add placeholders for parse() and toString() so
256         SVGAnimatedType::valueAsString() and setValueAsString() can compile for 
257         all types.
258
259         * svg/SVGNumberListValues.h:
260         (WebCore::SVGPropertyTraits<SVGNumberListValues>::parse):
261         * svg/SVGPathByteStream.h:
262         (WebCore::SVGPropertyTraits<SVGPathByteStream>::parse):
263         (WebCore::SVGPropertyTraits<SVGPathByteStream>::toString):
264         * svg/SVGPointListValues.h:
265         (WebCore::SVGPropertyTraits<SVGPointListValues>::parse):
266         (WebCore::SVGPropertyTraits<SVGPointListValues>::toString):
267         * svg/SVGPreserveAspectRatioValue.h:
268         (WebCore::SVGPropertyTraits<SVGPreserveAspectRatioValue>::fromString):
269         (WebCore::SVGPropertyTraits<SVGPreserveAspectRatioValue>::parse):
270         (WebCore::SVGPropertyTraits<SVGPreserveAspectRatioValue>::toString):
271         Ditto.
272
273         * svg/SVGTransformListValues.h:
274         (WebCore::SVGPropertyTraits<SVGTransformListValues>::parse):
275         Ditto.
276
277         * svg/SVGValue.h: Added. SVGValueVariant is the replacement of the union
278         SVGAnimatedType::DataUnion.
279
280         * svg/properties/SVGPropertyInfo.h:
281         Add a minimum and maximum AnimatedPropertyType so, SVGAnimatedType::type()
282         can assert that the index of the variant is in the range of this enum.
283
284         * svg/properties/SVGPropertyTraits.h:
285         (WebCore::SVGPropertyTraits<bool>::parse):
286         (WebCore::SVGPropertyTraits<unsigned>::parse):
287         (WebCore::SVGPropertyTraits<int>::parse):
288         Ditto.
289
290 2018-03-08  Yusuke Suzuki  <utatane.tea@gmail.com>
291
292         [JSC][WebCore] Extend jsDynamicCast for WebCore types in WebCore and remove jsDynamicDowncast
293         https://bugs.webkit.org/show_bug.cgi?id=183449
294
295         Reviewed by Mark Lam.
296
297         This patch removes jsDynamicDowncast. Our JSC::jsDynamicCast can have a way to inject a fast
298         path that is similar to jsDynamicDowncast. WebCore can leverage this functionality to add
299         a fast path for WebCore's extended JS object types (JSEvent, JSElement, JSNode, and JSDocument).
300
301         No behavior change.
302
303         * WebCore.xcodeproj/project.pbxproj:
304         * bindings/js/CommonVM.cpp:
305         (WebCore::lexicalFrameFromCommonVM):
306         * bindings/js/JSDOMConvertBufferSource.h:
307         (WebCore::toPossiblySharedArrayBufferView):
308         * bindings/js/JSDOMConvertPromise.h:
309         (WebCore::Converter<IDLPromise<T>>::convert):
310         * bindings/js/JSDOMExceptionHandling.cpp:
311         (WebCore::reportException):
312         (WebCore::retrieveErrorMessage):
313         * bindings/js/JSDOMIterator.h:
314         (WebCore::IteratorTraits>::next):
315         * bindings/js/JSDOMWindowProxy.cpp:
316         (WebCore::JSDOMWindowProxy::toWrapped):
317         * bindings/js/JSDOMWrapperCache.h:
318         * bindings/js/JSDocumentCustom.h:
319         (JSC::JSCastingHelpers::InheritsTraits<WebCore::JSDocument>::inherits):
320         (WebCore::jsDocumentCast): Deleted.
321         * bindings/js/JSDynamicDowncast.h: Removed.
322         * bindings/js/JSElementCustom.h:
323         (JSC::JSCastingHelpers::InheritsTraits<WebCore::JSElement>::inherits):
324         (WebCore::jsElementCast): Deleted.
325         * bindings/js/JSEventCustom.h:
326         (JSC::JSCastingHelpers::InheritsTraits<WebCore::JSEvent>::inherits):
327         (WebCore::jsEventCast): Deleted.
328         * bindings/js/JSEventTargetCustom.cpp:
329         (WebCore::jsEventTargetCast):
330         * bindings/js/JSNodeCustom.h:
331         (JSC::JSCastingHelpers::InheritsTraits<WebCore::JSNode>::inherits):
332         (WebCore::jsNodeCast): Deleted.
333         * bindings/js/JSPluginElementFunctions.cpp:
334         (WebCore::pluginElementPropertyGetter):
335         * bindings/js/JSReadableStreamSourceCustom.cpp:
336         (WebCore::JSReadableStreamSource::start):
337         * bindings/js/JSWorkerGlobalScopeBase.cpp:
338         (WebCore::toJSDedicatedWorkerGlobalScope):
339         (WebCore::toJSWorkerGlobalScope):
340         (WebCore::toJSServiceWorkerGlobalScope):
341         * bindings/js/ReadableStream.cpp:
342         (WebCore::ReadableStream::create):
343         (WebCore::ReadableStream::isDisturbed):
344         * bindings/js/ReadableStream.h:
345         (WebCore::JSReadableStreamWrapperConverter::toWrapped):
346         * bindings/js/ScriptModuleLoader.cpp:
347         (WebCore::ScriptModuleLoader::evaluate):
348         * bindings/js/SerializedScriptValue.cpp:
349         (WebCore::CloneSerializer::dumpIfTerminal):
350         (WebCore::CloneSerializer::serialize):
351         * bindings/js/StructuredClone.cpp:
352         (WebCore::structuredCloneArrayBufferView):
353         * bindings/scripts/CodeGeneratorJS.pm:
354         (GetCastingHelperForThisObject):
355         (GenerateImplementation):
356         * bindings/scripts/test/JS/JSInterfaceName.cpp:
357         (WebCore::jsInterfaceNameConstructor):
358         (WebCore::setJSInterfaceNameConstructor):
359         (WebCore::JSInterfaceName::toWrapped):
360         * bindings/scripts/test/JS/JSMapLike.cpp:
361         (WebCore::IDLAttribute<JSMapLike>::cast):
362         (WebCore::IDLOperation<JSMapLike>::cast):
363         (WebCore::jsMapLikeConstructor):
364         (WebCore::setJSMapLikeConstructor):
365         (WebCore::JSMapLike::toWrapped):
366         * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
367         (WebCore::IDLAttribute<JSReadOnlyMapLike>::cast):
368         (WebCore::IDLOperation<JSReadOnlyMapLike>::cast):
369         (WebCore::jsReadOnlyMapLikeConstructor):
370         (WebCore::setJSReadOnlyMapLikeConstructor):
371         (WebCore::JSReadOnlyMapLike::toWrapped):
372         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
373         (WebCore::IDLAttribute<JSTestActiveDOMObject>::cast):
374         (WebCore::IDLOperation<JSTestActiveDOMObject>::cast):
375         (WebCore::jsTestActiveDOMObjectConstructor):
376         (WebCore::setJSTestActiveDOMObjectConstructor):
377         (WebCore::JSTestActiveDOMObject::toWrapped):
378         * bindings/scripts/test/JS/JSTestCEReactions.cpp:
379         (WebCore::IDLAttribute<JSTestCEReactions>::cast):
380         (WebCore::IDLOperation<JSTestCEReactions>::cast):
381         (WebCore::jsTestCEReactionsConstructor):
382         (WebCore::setJSTestCEReactionsConstructor):
383         (WebCore::JSTestCEReactions::toWrapped):
384         * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
385         (WebCore::IDLAttribute<JSTestCEReactionsStringifier>::cast):
386         (WebCore::IDLOperation<JSTestCEReactionsStringifier>::cast):
387         (WebCore::jsTestCEReactionsStringifierConstructor):
388         (WebCore::setJSTestCEReactionsStringifierConstructor):
389         (WebCore::JSTestCEReactionsStringifier::toWrapped):
390         * bindings/scripts/test/JS/JSTestCallTracer.cpp:
391         (WebCore::IDLAttribute<JSTestCallTracer>::cast):
392         (WebCore::IDLOperation<JSTestCallTracer>::cast):
393         (WebCore::jsTestCallTracerConstructor):
394         (WebCore::setJSTestCallTracerConstructor):
395         (WebCore::JSTestCallTracer::toWrapped):
396         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
397         (WebCore::jsTestClassWithJSBuiltinConstructorConstructor):
398         (WebCore::setJSTestClassWithJSBuiltinConstructorConstructor):
399         (WebCore::JSTestClassWithJSBuiltinConstructor::toWrapped):
400         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
401         (WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor):
402         (WebCore::setJSTestCustomConstructorWithNoInterfaceObjectConstructor):
403         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::toWrapped):
404         * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
405         (WebCore::IDLAttribute<JSTestDOMJIT>::cast):
406         (WebCore::IDLOperation<JSTestDOMJIT>::cast):
407         (WebCore::jsTestDOMJITConstructor):
408         (WebCore::setJSTestDOMJITConstructor):
409         * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
410         (WebCore::IDLAttribute<JSTestEnabledBySetting>::cast):
411         (WebCore::IDLOperation<JSTestEnabledBySetting>::cast):
412         (WebCore::jsTestEnabledBySettingConstructor):
413         (WebCore::setJSTestEnabledBySettingConstructor):
414         (WebCore::JSTestEnabledBySetting::toWrapped):
415         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
416         (WebCore::IDLAttribute<JSTestEventConstructor>::cast):
417         (WebCore::jsTestEventConstructorConstructor):
418         (WebCore::setJSTestEventConstructorConstructor):
419         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
420         (WebCore::IDLOperation<JSTestEventTarget>::cast):
421         (WebCore::jsTestEventTargetConstructor):
422         (WebCore::setJSTestEventTargetConstructor):
423         (WebCore::JSTestEventTarget::toWrapped):
424         * bindings/scripts/test/JS/JSTestException.cpp:
425         (WebCore::IDLAttribute<JSTestException>::cast):
426         (WebCore::jsTestExceptionConstructor):
427         (WebCore::setJSTestExceptionConstructor):
428         (WebCore::JSTestException::toWrapped):
429         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
430         (WebCore::IDLAttribute<JSTestGenerateIsReachable>::cast):
431         (WebCore::jsTestGenerateIsReachableConstructor):
432         (WebCore::setJSTestGenerateIsReachableConstructor):
433         (WebCore::JSTestGenerateIsReachable::toWrapped):
434         * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
435         (WebCore::IDLAttribute<JSTestGlobalObject>::cast):
436         (WebCore::IDLOperation<JSTestGlobalObject>::cast):
437         (WebCore::jsTestGlobalObjectConstructor):
438         (WebCore::setJSTestGlobalObjectConstructor):
439         (WebCore::JSTestGlobalObject::toWrapped):
440         * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
441         (WebCore::jsTestIndexedSetterNoIdentifierConstructor):
442         (WebCore::setJSTestIndexedSetterNoIdentifierConstructor):
443         (WebCore::JSTestIndexedSetterNoIdentifier::toWrapped):
444         * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
445         (WebCore::jsTestIndexedSetterThrowingExceptionConstructor):
446         (WebCore::setJSTestIndexedSetterThrowingExceptionConstructor):
447         (WebCore::JSTestIndexedSetterThrowingException::toWrapped):
448         * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
449         (WebCore::IDLOperation<JSTestIndexedSetterWithIdentifier>::cast):
450         (WebCore::jsTestIndexedSetterWithIdentifierConstructor):
451         (WebCore::setJSTestIndexedSetterWithIdentifierConstructor):
452         (WebCore::JSTestIndexedSetterWithIdentifier::toWrapped):
453         * bindings/scripts/test/JS/JSTestInterface.cpp:
454         (WebCore::IDLAttribute<JSTestInterface>::cast):
455         (WebCore::IDLOperation<JSTestInterface>::cast):
456         (WebCore::jsTestInterfaceConstructor):
457         (WebCore::setJSTestInterfaceConstructor):
458         (WebCore::JSTestInterface::toWrapped):
459         * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
460         (WebCore::IDLAttribute<JSTestInterfaceLeadingUnderscore>::cast):
461         (WebCore::jsTestInterfaceLeadingUnderscoreConstructor):
462         (WebCore::setJSTestInterfaceLeadingUnderscoreConstructor):
463         (WebCore::JSTestInterfaceLeadingUnderscore::toWrapped):
464         * bindings/scripts/test/JS/JSTestIterable.cpp:
465         (WebCore::IDLOperation<JSTestIterable>::cast):
466         (WebCore::jsTestIterableConstructor):
467         (WebCore::setJSTestIterableConstructor):
468         (WebCore::JSTestIterable::toWrapped):
469         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
470         (WebCore::IDLAttribute<JSTestJSBuiltinConstructor>::cast):
471         (WebCore::IDLOperation<JSTestJSBuiltinConstructor>::cast):
472         (WebCore::jsTestJSBuiltinConstructorConstructor):
473         (WebCore::setJSTestJSBuiltinConstructorConstructor):
474         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
475         (WebCore::IDLOperation<JSTestMediaQueryListListener>::cast):
476         (WebCore::jsTestMediaQueryListListenerConstructor):
477         (WebCore::setJSTestMediaQueryListListenerConstructor):
478         (WebCore::JSTestMediaQueryListListener::toWrapped):
479         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
480         (WebCore::jsTestNamedAndIndexedSetterNoIdentifierConstructor):
481         (WebCore::setJSTestNamedAndIndexedSetterNoIdentifierConstructor):
482         (WebCore::JSTestNamedAndIndexedSetterNoIdentifier::toWrapped):
483         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
484         (WebCore::jsTestNamedAndIndexedSetterThrowingExceptionConstructor):
485         (WebCore::setJSTestNamedAndIndexedSetterThrowingExceptionConstructor):
486         (WebCore::JSTestNamedAndIndexedSetterThrowingException::toWrapped):
487         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
488         (WebCore::IDLOperation<JSTestNamedAndIndexedSetterWithIdentifier>::cast):
489         (WebCore::jsTestNamedAndIndexedSetterWithIdentifierConstructor):
490         (WebCore::setJSTestNamedAndIndexedSetterWithIdentifierConstructor):
491         (WebCore::JSTestNamedAndIndexedSetterWithIdentifier::toWrapped):
492         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
493         (WebCore::jsTestNamedConstructorConstructor):
494         (WebCore::setJSTestNamedConstructorConstructor):
495         (WebCore::JSTestNamedConstructor::toWrapped):
496         * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
497         (WebCore::jsTestNamedDeleterNoIdentifierConstructor):
498         (WebCore::setJSTestNamedDeleterNoIdentifierConstructor):
499         (WebCore::JSTestNamedDeleterNoIdentifier::toWrapped):
500         * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
501         (WebCore::jsTestNamedDeleterThrowingExceptionConstructor):
502         (WebCore::setJSTestNamedDeleterThrowingExceptionConstructor):
503         (WebCore::JSTestNamedDeleterThrowingException::toWrapped):
504         * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
505         (WebCore::IDLOperation<JSTestNamedDeleterWithIdentifier>::cast):
506         (WebCore::jsTestNamedDeleterWithIdentifierConstructor):
507         (WebCore::setJSTestNamedDeleterWithIdentifierConstructor):
508         (WebCore::JSTestNamedDeleterWithIdentifier::toWrapped):
509         * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
510         (WebCore::jsTestNamedDeleterWithIndexedGetterConstructor):
511         (WebCore::setJSTestNamedDeleterWithIndexedGetterConstructor):
512         (WebCore::JSTestNamedDeleterWithIndexedGetter::toWrapped):
513         * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
514         (WebCore::jsTestNamedGetterCallWithConstructor):
515         (WebCore::setJSTestNamedGetterCallWithConstructor):
516         (WebCore::JSTestNamedGetterCallWith::toWrapped):
517         * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
518         (WebCore::jsTestNamedGetterNoIdentifierConstructor):
519         (WebCore::setJSTestNamedGetterNoIdentifierConstructor):
520         (WebCore::JSTestNamedGetterNoIdentifier::toWrapped):
521         * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
522         (WebCore::IDLOperation<JSTestNamedGetterWithIdentifier>::cast):
523         (WebCore::jsTestNamedGetterWithIdentifierConstructor):
524         (WebCore::setJSTestNamedGetterWithIdentifierConstructor):
525         (WebCore::JSTestNamedGetterWithIdentifier::toWrapped):
526         * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
527         (WebCore::jsTestNamedSetterNoIdentifierConstructor):
528         (WebCore::setJSTestNamedSetterNoIdentifierConstructor):
529         (WebCore::JSTestNamedSetterNoIdentifier::toWrapped):
530         * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
531         (WebCore::jsTestNamedSetterThrowingExceptionConstructor):
532         (WebCore::setJSTestNamedSetterThrowingExceptionConstructor):
533         (WebCore::JSTestNamedSetterThrowingException::toWrapped):
534         * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
535         (WebCore::IDLOperation<JSTestNamedSetterWithIdentifier>::cast):
536         (WebCore::jsTestNamedSetterWithIdentifierConstructor):
537         (WebCore::setJSTestNamedSetterWithIdentifierConstructor):
538         (WebCore::JSTestNamedSetterWithIdentifier::toWrapped):
539         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
540         (WebCore::IDLOperation<JSTestNamedSetterWithIndexedGetter>::cast):
541         (WebCore::jsTestNamedSetterWithIndexedGetterConstructor):
542         (WebCore::setJSTestNamedSetterWithIndexedGetterConstructor):
543         (WebCore::JSTestNamedSetterWithIndexedGetter::toWrapped):
544         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
545         (WebCore::IDLOperation<JSTestNamedSetterWithIndexedGetterAndSetter>::cast):
546         (WebCore::jsTestNamedSetterWithIndexedGetterAndSetterConstructor):
547         (WebCore::setJSTestNamedSetterWithIndexedGetterAndSetterConstructor):
548         (WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::toWrapped):
549         * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
550         (WebCore::jsTestNamedSetterWithOverrideBuiltinsConstructor):
551         (WebCore::setJSTestNamedSetterWithOverrideBuiltinsConstructor):
552         (WebCore::JSTestNamedSetterWithOverrideBuiltins::toWrapped):
553         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
554         (WebCore::IDLAttribute<JSTestNamedSetterWithUnforgableProperties>::cast):
555         (WebCore::IDLOperation<JSTestNamedSetterWithUnforgableProperties>::cast):
556         (WebCore::jsTestNamedSetterWithUnforgablePropertiesConstructor):
557         (WebCore::setJSTestNamedSetterWithUnforgablePropertiesConstructor):
558         (WebCore::JSTestNamedSetterWithUnforgableProperties::toWrapped):
559         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
560         (WebCore::IDLAttribute<JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins>::cast):
561         (WebCore::IDLOperation<JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins>::cast):
562         (WebCore::jsTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructor):
563         (WebCore::setJSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructor):
564         (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::toWrapped):
565         * bindings/scripts/test/JS/JSTestNode.cpp:
566         (WebCore::IDLAttribute<JSTestNode>::cast):
567         (WebCore::IDLOperation<JSTestNode>::cast):
568         (WebCore::jsTestNodeConstructor):
569         (WebCore::setJSTestNodeConstructor):
570         * bindings/scripts/test/JS/JSTestObj.cpp:
571         (WebCore::IDLAttribute<JSTestObj>::cast):
572         (WebCore::IDLOperation<JSTestObj>::cast):
573         (WebCore::jsTestObjConstructor):
574         (WebCore::setJSTestObjConstructor):
575         (WebCore::JSTestObj::toWrapped):
576         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
577         (WebCore::jsTestOverloadedConstructorsConstructor):
578         (WebCore::setJSTestOverloadedConstructorsConstructor):
579         (WebCore::JSTestOverloadedConstructors::toWrapped):
580         * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
581         (WebCore::jsTestOverloadedConstructorsWithSequenceConstructor):
582         (WebCore::setJSTestOverloadedConstructorsWithSequenceConstructor):
583         (WebCore::JSTestOverloadedConstructorsWithSequence::toWrapped):
584         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
585         (WebCore::IDLOperation<JSTestOverrideBuiltins>::cast):
586         (WebCore::jsTestOverrideBuiltinsConstructor):
587         (WebCore::setJSTestOverrideBuiltinsConstructor):
588         (WebCore::JSTestOverrideBuiltins::toWrapped):
589         * bindings/scripts/test/JS/JSTestPluginInterface.cpp:
590         (WebCore::jsTestPluginInterfaceConstructor):
591         (WebCore::setJSTestPluginInterfaceConstructor):
592         (WebCore::JSTestPluginInterface::toWrapped):
593         * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
594         (WebCore::IDLAttribute<JSTestPromiseRejectionEvent>::cast):
595         (WebCore::jsTestPromiseRejectionEventConstructor):
596         (WebCore::setJSTestPromiseRejectionEventConstructor):
597         * bindings/scripts/test/JS/JSTestSerialization.cpp:
598         (WebCore::IDLAttribute<JSTestSerialization>::cast):
599         (WebCore::IDLOperation<JSTestSerialization>::cast):
600         (WebCore::jsTestSerializationConstructor):
601         (WebCore::setJSTestSerializationConstructor):
602         (WebCore::JSTestSerialization::toWrapped):
603         * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp:
604         (WebCore::jsTestSerializationIndirectInheritanceConstructor):
605         (WebCore::setJSTestSerializationIndirectInheritanceConstructor):
606         * bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
607         (WebCore::IDLAttribute<JSTestSerializationInherit>::cast):
608         (WebCore::IDLOperation<JSTestSerializationInherit>::cast):
609         (WebCore::jsTestSerializationInheritConstructor):
610         (WebCore::setJSTestSerializationInheritConstructor):
611         * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
612         (WebCore::IDLAttribute<JSTestSerializationInheritFinal>::cast):
613         (WebCore::IDLOperation<JSTestSerializationInheritFinal>::cast):
614         (WebCore::jsTestSerializationInheritFinalConstructor):
615         (WebCore::setJSTestSerializationInheritFinalConstructor):
616         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
617         (WebCore::IDLAttribute<JSTestSerializedScriptValueInterface>::cast):
618         (WebCore::IDLOperation<JSTestSerializedScriptValueInterface>::cast):
619         (WebCore::jsTestSerializedScriptValueInterfaceConstructor):
620         (WebCore::setJSTestSerializedScriptValueInterfaceConstructor):
621         (WebCore::JSTestSerializedScriptValueInterface::toWrapped):
622         * bindings/scripts/test/JS/JSTestStringifier.cpp:
623         (WebCore::IDLOperation<JSTestStringifier>::cast):
624         (WebCore::jsTestStringifierConstructor):
625         (WebCore::setJSTestStringifierConstructor):
626         (WebCore::JSTestStringifier::toWrapped):
627         * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
628         (WebCore::IDLOperation<JSTestStringifierAnonymousOperation>::cast):
629         (WebCore::jsTestStringifierAnonymousOperationConstructor):
630         (WebCore::setJSTestStringifierAnonymousOperationConstructor):
631         (WebCore::JSTestStringifierAnonymousOperation::toWrapped):
632         * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
633         (WebCore::IDLOperation<JSTestStringifierNamedOperation>::cast):
634         (WebCore::jsTestStringifierNamedOperationConstructor):
635         (WebCore::setJSTestStringifierNamedOperationConstructor):
636         (WebCore::JSTestStringifierNamedOperation::toWrapped):
637         * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
638         (WebCore::IDLOperation<JSTestStringifierOperationImplementedAs>::cast):
639         (WebCore::jsTestStringifierOperationImplementedAsConstructor):
640         (WebCore::setJSTestStringifierOperationImplementedAsConstructor):
641         (WebCore::JSTestStringifierOperationImplementedAs::toWrapped):
642         * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
643         (WebCore::IDLOperation<JSTestStringifierOperationNamedToString>::cast):
644         (WebCore::jsTestStringifierOperationNamedToStringConstructor):
645         (WebCore::setJSTestStringifierOperationNamedToStringConstructor):
646         (WebCore::JSTestStringifierOperationNamedToString::toWrapped):
647         * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
648         (WebCore::IDLAttribute<JSTestStringifierReadOnlyAttribute>::cast):
649         (WebCore::IDLOperation<JSTestStringifierReadOnlyAttribute>::cast):
650         (WebCore::jsTestStringifierReadOnlyAttributeConstructor):
651         (WebCore::setJSTestStringifierReadOnlyAttributeConstructor):
652         (WebCore::JSTestStringifierReadOnlyAttribute::toWrapped):
653         * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
654         (WebCore::IDLAttribute<JSTestStringifierReadWriteAttribute>::cast):
655         (WebCore::IDLOperation<JSTestStringifierReadWriteAttribute>::cast):
656         (WebCore::jsTestStringifierReadWriteAttributeConstructor):
657         (WebCore::setJSTestStringifierReadWriteAttributeConstructor):
658         (WebCore::JSTestStringifierReadWriteAttribute::toWrapped):
659         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
660         (WebCore::IDLAttribute<JSTestTypedefs>::cast):
661         (WebCore::IDLOperation<JSTestTypedefs>::cast):
662         (WebCore::jsTestTypedefsConstructor):
663         (WebCore::setJSTestTypedefsConstructor):
664         (WebCore::JSTestTypedefs::toWrapped):
665         * bridge/objc/WebScriptObject.mm:
666         (-[WebScriptObject setValue:forKey:]):
667         * bridge/runtime_array.cpp:
668         (JSC::RuntimeArray::lengthGetter):
669         * bridge/runtime_method.cpp:
670         (JSC::RuntimeMethod::lengthGetter):
671         * html/HTMLMediaElement.cpp:
672         (WebCore::controllerJSValue):
673         (WebCore::HTMLMediaElement::updateCaptionContainer):
674         (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):
675         * inspector/agents/InspectorDOMAgent.cpp:
676         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
677
678 2018-03-08  Yusuke Suzuki  <utatane.tea@gmail.com>
679
680         [JSC] Add inherits<T>(VM&) leveraging JSCast fast path
681         https://bugs.webkit.org/show_bug.cgi?id=183429
682
683         Reviewed by Mark Lam.
684
685         * bindings/js/IDBBindingUtilities.cpp:
686         (WebCore::createIDBKeyFromValue):
687         * bindings/js/JSDOMConvertDate.cpp:
688         (WebCore::valueToDate):
689         * bindings/js/JSDOMGlobalObject.cpp:
690         (WebCore::JSDOMGlobalObject::scriptExecutionContext const):
691         * bindings/js/JSDOMWindowCustom.cpp:
692         (WebCore::JSDOMWindow::toWrapped):
693         * bindings/js/JSEventTargetCustom.cpp:
694         * bindings/js/JSNodeCustom.cpp:
695         (WebCore::JSNode::pushEventHandlerScope const):
696         * bindings/js/JSXPathNSResolverCustom.cpp:
697         (WebCore::JSXPathNSResolver::toWrapped):
698         * bindings/js/ScriptState.cpp:
699         (WebCore::domWindowFromExecState):
700         (WebCore::scriptExecutionContextFromExecState):
701         * bindings/js/SerializedScriptValue.cpp:
702         (WebCore::CloneSerializer::isArray):
703         (WebCore::CloneSerializer::isMap):
704         (WebCore::CloneSerializer::isSet):
705         (WebCore::CloneSerializer::dumpArrayBufferView):
706         (WebCore::CloneSerializer::dumpDOMPoint):
707         (WebCore::CloneSerializer::dumpDOMRect):
708         (WebCore::CloneSerializer::dumpDOMMatrix):
709         (WebCore::CloneSerializer::dumpIfTerminal):
710         (WebCore::CloneDeserializer::CloneDeserializer):
711         (WebCore::CloneDeserializer::readArrayBufferView):
712         * bindings/scripts/CodeGeneratorJS.pm:
713         (GenerateOverloadDispatcher):
714         * bindings/scripts/test/JS/JSTestObj.cpp:
715         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodOverloadDispatcher):
716         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameterOverloadDispatcher):
717         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithDistinguishingUnionOverloadDispatcher):
718         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWith2DistinguishingUnionsOverloadDispatcher):
719         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithNonDistinguishingUnionOverloadDispatcher):
720         (WebCore::jsTestObjPrototypeFunctionOverloadWithNullableUnionOverloadDispatcher):
721         (WebCore::jsTestObjPrototypeFunctionOverloadWithNullableNonDistinguishingParameterOverloadDispatcher):
722         (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunctionOverloadDispatcher):
723         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
724         (WebCore::JSTestOverloadedConstructorsConstructor::construct):
725         * bridge/c/c_instance.cpp:
726         (JSC::Bindings::CInstance::invokeMethod):
727         * bridge/objc/WebScriptObject.mm:
728         (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
729         * bridge/objc/objc_instance.mm:
730         (ObjcInstance::invokeMethod):
731         * bridge/objc/objc_runtime.mm:
732         (JSC::Bindings::callObjCFallbackObject):
733         * bridge/runtime_method.cpp:
734         (JSC::callRuntimeMethod):
735         * bridge/runtime_object.cpp:
736         (JSC::Bindings::callRuntimeObject):
737         (JSC::Bindings::callRuntimeConstructor):
738         * inspector/WebInjectedScriptHost.cpp:
739         (WebCore::WebInjectedScriptHost::subtype):
740         (WebCore::WebInjectedScriptHost::isHTMLAllCollection):
741
742 2018-03-08  Tim Horton  <timothy_horton@apple.com>
743
744         Stop linking ApplicationServices directly
745         https://bugs.webkit.org/show_bug.cgi?id=182867
746         <rdar://problem/38252142>
747
748         Reviewed by Alex Christensen.
749
750         The frameworks that we use that live inside ApplicationServices
751         have mostly moved out, so import them directly.
752
753         * Configurations/WebCore.xcconfig:
754         * html/canvas/CanvasRenderingContext2D.cpp:
755         * html/canvas/CanvasRenderingContext2DBase.cpp:
756         * platform/MIMETypeRegistry.cpp:
757         * platform/graphics/ComplexTextController.cpp:
758         * platform/graphics/cg/ColorCG.cpp:
759         * platform/graphics/cg/ImageDecoderCG.cpp:
760         * platform/graphics/cg/UTIRegistry.cpp:
761         * platform/graphics/cocoa/FontCocoa.mm:
762         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
763         * platform/graphics/mac/GlyphPageMac.cpp:
764         * platform/graphics/mac/PDFDocumentImageMac.mm:
765         * platform/graphics/mac/SimpleFontDataCoreText.cpp:
766         * platform/graphics/win/FontCGWin.cpp:
767         * platform/graphics/win/FontCacheWin.cpp:
768         * platform/graphics/win/FontCustomPlatformData.cpp:
769         * platform/graphics/win/FontPlatformDataCGWin.cpp:
770         * platform/graphics/win/ImageCGWin.cpp:
771         * platform/graphics/win/SimpleFontDataCGWin.cpp:
772
773 2018-03-07  Tim Horton  <timothy_horton@apple.com>
774
775         Sort and separate FeatureDefines.xcconfig
776         https://bugs.webkit.org/show_bug.cgi?id=183427
777
778         Reviewed by Dan Bernstein.
779
780         * Configurations/FeatureDefines.xcconfig:
781         Sort and split FeatureDefines into paragraphs
782         (to make it easier to sort later).
783
784 2018-03-07  Zalan Bujtas  <zalan@apple.com>
785
786         Invalid innerTextRenderer in RenderTextControlSingleLine::styleDidChange()
787         https://bugs.webkit.org/show_bug.cgi?id=183385
788         <rdar://problem/38085397>
789
790         Reviewed by Antti Koivisto.
791
792         When HTMLInputElement::updateType() is called with a dirty value, we eagerly change the m_inputType first
793         and then we take care of the dirty value by calling setAttributeWithoutSynchronization().
794         With a DOMSubtreeModified event listener attached, setAttributeWithoutSynchronization() can end up running some
795         layout code (offsetHeight) with a renderer - m_inputType mismatch.
796
797         This patch ensures that we don't change the m_inputType until after we finished setting the new value.
798
799         Test: fast/DOM/HTMLInputElement/input-value-and-type-change-crash.html
800
801         * html/HTMLInputElement.cpp:
802         (WebCore::HTMLInputElement::updateType):
803
804 2018-03-07  Chris Dumez  <cdumez@apple.com>
805
806         Get rid of custom bindings for History's replaceState() / pushState()
807         https://bugs.webkit.org/show_bug.cgi?id=183372
808
809         Reviewed by Youenn Fablet.
810
811         Get rid of custom bindings for History's replaceState() / pushState() by
812         moving the cached state from the wrapper to the History implementation
813         object.
814
815         No new tests, no web-facing behavior change.
816
817         * bindings/js/JSHistoryCustom.cpp:
818         (WebCore::JSHistory::state const):
819         (WebCore::JSHistory::visitAdditionalChildren):
820         * page/History.cpp:
821         (WebCore::History::cachedState):
822         (WebCore::History::stateObjectAdded):
823         * page/History.h:
824         (WebCore::History::pushState):
825         (WebCore::History::replaceState):
826         * page/History.idl:
827
828 2018-03-07  Youenn Fablet  <youenn@apple.com>
829
830         Match unsupported plugins based on domains and not origin
831         https://bugs.webkit.org/show_bug.cgi?id=183384
832
833         Reviewed by Chris Dumez.
834
835         Move from an origin-keyed map to a vector of plugins.
836         We iterate through the vector and a match happens if the page host name ends with the provided matching domain.
837         This allows supporting rules for *.mydomain.com by passing 'mydomain.com'.
838         Covered by existing tests.
839         We are not testing subdomains like www.localhost since there is no support in our CI but this is tested through Unit tests.
840
841         * loader/EmptyClients.cpp:
842         * platform/URL.cpp:
843         (WebCore::URL::isMatchingDomain const):
844         * platform/URL.h:
845         * plugins/PluginData.h:
846         (WebCore::isSupportedPlugin):
847         (WebCore::SupportedPluginName::decode):
848         (WebCore::SupportedPluginName::encode const):
849         * plugins/PluginInfoProvider.h:
850
851 2017-12-18  Youenn Fablet  <youenn@apple.com>
852
853         Update to libwebrtc revision 4e70a72571dd26b85c2385e9c618e343428df5d3
854         https://bugs.webkit.org/show_bug.cgi?id=180843
855
856         Reviewed by Eric Carlson.
857
858         Covered by existing tests.
859
860         Moving H264 codecs and factories to libwebrtc.
861         Updating LibWebRTCProvider according new libwebrtc API.
862         Updating ref counting according new libwebrtc API.
863
864         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
865         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
866         (WebCore::LibWebRTCMediaEndpoint::AddRef const):
867         (WebCore::LibWebRTCMediaEndpoint::Release const):
868         (WTF::LogArgument<webrtc::RTCStats>::toString):
869         * WebCore.xcodeproj/project.pbxproj:
870         * platform/mediastream/RealtimeOutgoingAudioSource.h:
871         * platform/mediastream/RealtimeOutgoingVideoSource.h:
872         * platform/mediastream/libwebrtc/LibWebRTCAudioModule.h:
873         * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
874         (WebCore::LibWebRTCProvider::createPeerConnectionFactory):
875         * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
876         * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:
877         (WebCore::LibWebRTCProviderCocoa::~LibWebRTCProviderCocoa):
878         (WebCore::LibWebRTCProviderCocoa::createDecoderFactory):
879         (WebCore::LibWebRTCProviderCocoa::createEncoderFactory):
880         (WebCore::LibWebRTCProviderCocoa::setActive):
881         * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.h:
882         * platform/mediastream/libwebrtc/VideoToolBoxDecoderFactory.cpp: Removed.
883         * platform/mediastream/libwebrtc/VideoToolBoxEncoderFactory.cpp: Removed.
884         * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:
885         (WebCore::ConvertToI420):
886         (WebCore::RealtimeOutgoingVideoSourceCocoa::sampleBufferUpdated):
887         * testing/Internals.cpp:
888         (WebCore::Internals::setH264HardwareEncoderAllowed):
889         * testing/MockLibWebRTCPeerConnection.h:
890
891 2018-03-07  Sihui Liu  <sihui_liu@apple.com>
892
893         replaceState cause back/forward malfunction on html page with <base href="/"> tag
894         https://bugs.webkit.org/show_bug.cgi?id=182678
895         <rdar://problem/37517821>
896
897         Reviewed by Chris Dumez.
898
899         replaceState should not change URL when the URL argument is NULL, but should change URL when the URL argument is an empty string.
900
901         Test: http/tests/history/replacestate-no-url.html
902
903         * page/History.cpp:
904         (WebCore::History::urlForState):
905
906 2018-03-07  Antti Koivisto  <antti@apple.com>
907
908         Don't invalidate descendants for sibling combinators unless needed
909         https://bugs.webkit.org/show_bug.cgi?id=183410
910         <rdar://problem/38227297>
911
912         Reviewed by Zalan Bujtas.
913
914         If we know the matched sibling combinator doesn't affect descendants we shouldn't invalidate them.
915
916         * css/SelectorChecker.cpp:
917         (WebCore::SelectorChecker::matchRecursively const):
918
919             Use different bit for the descendant case.
920
921         * cssjit/SelectorCompiler.cpp:
922         (WebCore::SelectorCompiler::fragmentMatchesTheRightmostElement):
923
924             Remove unneeded context assert.
925
926         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
927
928             Use different bit for the descendant case.
929
930         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorCheckerExcludingPseudoElements):
931         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasPseudoElement):
932         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateRequestedPseudoElementEqualsToSelectorPseudoElement):
933         * dom/Element.cpp:
934         (WebCore::invalidateForSiblingCombinators):
935
936             Invalidate the target sibling or all descendants based on the bits.
937
938         * dom/Element.h:
939         (WebCore::Element::descendantsAffectedByPreviousSibling const):
940         (WebCore::Element::setDescendantsAffectedByPreviousSibling const):
941         * dom/Node.h:
942         * style/StyleRelations.cpp:
943         (WebCore::Style::commitRelationsToRenderStyle):
944         (WebCore::Style::commitRelations):
945         * style/StyleRelations.h:
946
947             Add DescendantsAffectedByPreviousSibling bit. AffectedByPreviousSibling is now just about the target element.
948
949 2018-03-07  Antti Koivisto  <antti@apple.com>
950
951         checkForSiblingStyleChanges should use internal versions of the invalidation functions
952         https://bugs.webkit.org/show_bug.cgi?id=183405
953         <rdar://problem/38218310>
954
955         Reviewed by Zalan Bujtas.
956
957         Non-internal invalidateStyleForElement/Subtree() implement sibling combinator invalidation. Checking this
958         is only needed if the element in question changed somehow. In checkForSiblingStyleChanges we know that
959         another element changed and we really just want to invalidate.
960
961         * css/SelectorChecker.cpp:
962         (WebCore::isFirstOfType):
963         (WebCore::SelectorChecker::checkOne const):
964
965         Also make :first-of-type use ChildrenAffectedByForwardPositionalRules for invalidation similar to :last-of-type
966         for more correct invalidation.
967
968         * dom/Element.cpp:
969         (WebCore::checkForSiblingStyleChanges):
970
971 2018-03-07  Yusuke Suzuki  <utatane.tea@gmail.com>
972
973         HTML `pattern` attribute should set `u` flag for regular expressions
974         https://bugs.webkit.org/show_bug.cgi?id=151598
975
976         Reviewed by Chris Dumez.
977
978         This patch attaches "u" flag to the RegExp compiled for HTML "pattern" attribute[1].
979
980         [1]: https://html.spec.whatwg.org/multipage/forms.html#the-pattern-attribute
981
982         * html/BaseTextInputType.cpp:
983         (WebCore::BaseTextInputType::patternMismatch const):
984
985 2018-03-07  Frederic Wang  <fwang@igalia.com>
986
987         Relayout frames after AsyncFrameScrolling or FrameFlattening option is changed
988         https://bugs.webkit.org/show_bug.cgi?id=183081
989
990         Reviewed by Antonio Gomes.
991
992         The frames may be resized when the FrameFlattening option is modified and hence this patch
993         forces a relayout. It also does that when AsyncFrameScrolling is modified too, since that
994         may imply changes in frame flattening after bug 173704. Forcing a relayout will also be
995         enough to trigger other updates for async frame scrolling in the future (see bug 149264 and
996         bug 171667).
997
998         Test: platform/ios/fast/frames/flattening/iframe-flattening-async-frame-scrolling-dynamic.html
999
1000         * page/Settings.yaml: Call setNeedsRelayoutAllFrames when one of the AsyncFrameScrolling or
1001         FrameFlattening options is changed.
1002         * page/SettingsBase.cpp: Include RenderWidget to make call on frame->ownerRenderer().
1003         (WebCore::SettingsBase::setNeedsRelayoutAllFrames):  Make layout and preferred widths dirty
1004         on all frames in the page and schedule a relayout.
1005         * page/SettingsBase.h: Declare setNeedsRelayoutAllFrames().
1006
1007 2018-03-07  Alejandro G. Castro  <alex@igalia.com>
1008
1009         Make NetworkRTCResolver port agnostic
1010         https://bugs.webkit.org/show_bug.cgi?id=178855
1011
1012         Reviewed by Youenn Fablet.
1013
1014         Add new API in the DNSResolveQueue allowing to revolve hostnames and get the result. Add platform
1015         specific code for soup platform and refactor the other platforms. Added new API to the DNS API header
1016         and move the general code to the DNS.cpp file, that way we can reuse that code in all the platforms
1017         and leave the ResolveQueue class of the platforms in a file.
1018
1019         No new tests because this is a refactor.
1020
1021         * PlatformAppleWin.cmake: Move the DNSCFNet class to DNSResolveQueueCFNet.
1022         * PlatformMac.cmake: Ditto.
1023         * Sources.txt: Add the DNS.cpp for compilation.
1024         * SourcesCocoa.txt: Move the DNSCFNet class to DNSResolveQueueCFNet.
1025         * WebCore.xcodeproj/project.pbxproj: Move the DNSCFNet class to DNSResolveQueueCFNet, add the DNS.cpp
1026         for compilation. Add the new DNSResolveQueueCFNet class.
1027         * platform/Curl.cmake: Move the DNSCFNet class to DNSResolveQueueCurl.
1028         * platform/network/DNS.cpp: Add this file with the default implementation of the DNS functions for
1029         all the platforms.
1030         (WebCore::prefetchDNS): Copied from every platform implementation.
1031         (WebCore::resolveDNS): Add the function, resolves a hostname, receives the identifier of the operation
1032         and the completion handler.
1033         (WebCore::stopResolveDNS): Add the function, stops a resolution operation, receives the identifier
1034         of the operation.
1035         * platform/network/DNS.h: Add the new APIs resolveDNS and stopResolveDNS with the classes used for the
1036         implementation.
1037         (WebCore::IPAddress::IPAddress): Add this class used to send the resolved address information, it does
1038         not depend on libwebrtc rtc classes.
1039         (WebCore::IPAddress::get): Get a reference to the struct sockaddr_in in the IPAddress class.
1040         (WebCore::DNSCompletionHandler): Add this CompletionHandler type to be used when resolving the DNS
1041         address.
1042         * platform/network/DNSResolveQueue.cpp: Add the DNSResolveQueue platform instantiation in the singleton.
1043         (WebCore::DNSResolveQueue::singleton): Use DNSResolveQueue platform classes when creating the singleton..
1044         (WebCore::DNSResolveQueue::resolve): Add this method to get the address of a hostname, it sends the
1045         identifier and the completion handler to use when returning the result.
1046         (WebCore::DNSResolveQueue::stopResolve): Add this method to stop the resolve operation when required.
1047         * platform/network/DNSResolveQueue.h: Add the new methods and make the class abstract, so that every
1048         platform can implement the functions.
1049         * platform/network/cf/DNSResolveQueueCFNet.cpp: Renamed from Source/WebCore/platform/network/cf/DNSCFNet.cpp.
1050         Add the methods to the new class DNSResolveQueueCFNet, move the prefetchDNS to the DNS.cpp general
1051         implementation.
1052         * platform/network/cf/DNSResolveQueueCFNet.h: Add the new class inheriting from the DNSResolveQueue. Add the
1053         new methods, we have to implement these methods and move the NetworkRTCResolver for COCOA code here.
1054         (WebCore::DNSResolveQueueCF::resolve): Dummy method, not implemented.
1055         (WebCore::DNSResolveQueueCF::stopResolve): Ditto.
1056         * platform/network/curl/DNSResolveQueueCurl.cpp: Renamed from Source/WebCore/platform/network/curl/DNSCurl.cpp.
1057         * platform/network/curl/DNSResolveQueueCurl.h: Add the new class inheriting from the DNSResolveQueue.
1058         (WebCore::DNSResolveQueueCurl::resolve): Ditto.
1059         (WebCore::DNSResolveQueueCurl::stopResolve): Ditto.
1060         * platform/network/soup/DNSResolveQueueSoup.h: New class inheriting from the DNSResolveQueue class, adding
1061         a HasMap with the active operations, it allows stopping them.
1062         * platform/network/soup/DNSResolveQueueSoup.cpp: Renamed from Source/WebCore/platform/network/curl/DNSSoup.cpp.
1063         (WebCore::resolvedWithObserverCallback): Called when the result address from the soup platform is ready,
1064         sends the address to the completion handler.
1065         (WebCore::DNSResolveQueueSoup::resolve): Launch the resolve operation with the soup library.
1066         (WebCore::DNSResolveQueueSoup::stopResolve): Stop the resolve operation on process with a GCancellable.
1067
1068 2018-03-06  Brian Burg  <bburg@apple.com>
1069
1070         [Cocoa] Stop copying ForwardingHeaders directory that no longer exists
1071         https://bugs.webkit.org/show_bug.cgi?id=183396
1072
1073         Reviewed by Dan Bernstein.
1074
1075         * WebCore.xcodeproj/project.pbxproj:
1076         Rename the phase to "Copy ICU Headers". ForwardingHeaders are no longer a thing.
1077
1078 2018-03-06  Youenn Fablet  <youenn@apple.com>
1079
1080         didReceiveServerRedirectForProvisionalNavigation is not called in case of document redirection with service worker registration change
1081         https://bugs.webkit.org/show_bug.cgi?id=183299
1082         <rdar://problem/37547029>
1083
1084         Reviewed by Alex Christensen.
1085
1086         In case of redirection with service worker registration change, we cancel the load and create a new one.
1087         This prevent ResourceLoader::willSendRequestInternal to call the didReceiveServerRedirectForProvisionalNavigation
1088         callback. We thus explictly call this callback after restarting the load with the new service worker step.
1089         We only call this callback if the main resource is there as we do not want to call it if it was blocked by content extension.
1090
1091         Test: http/wpt/service-workers/navigation-redirect-main-frame.https.html
1092
1093         * loader/DocumentLoader.cpp:
1094         (WebCore::DocumentLoader::restartLoadingDueToServiceWorkerRegistrationChange):
1095
1096 2018-03-06  Basuke Suzuki  <Basuke.Suzuki@sony.com>
1097
1098         [Curl] Remove unnecessary copied ResourceRequest member variable.
1099         https://bugs.webkit.org/show_bug.cgi?id=183010
1100
1101         Reviewed by Youenn Fablet.
1102
1103         * platform/network/ResourceHandle.h:
1104         * platform/network/ResourceHandleInternal.h:
1105         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
1106         * platform/network/curl/CurlRequest.h:
1107         (WebCore::CurlRequest::resourceRequest const):
1108         * platform/network/curl/ResourceHandleCurl.cpp:
1109         (WebCore::ResourceHandle::start):
1110         (WebCore::ResourceHandle::addCacheValidationHeaders):
1111         (WebCore::ResourceHandle::createCurlRequest):
1112         (WebCore::ResourceHandle::restartRequestWithCredential):
1113         (WebCore::ResourceHandle::continueAfterWillSendRequest):
1114
1115 2018-03-06  Nan Wang  <n_wang@apple.com>
1116
1117         AX: Flaky test after r229310
1118         https://bugs.webkit.org/show_bug.cgi?id=183376
1119         <rdar://problem/38188685>
1120
1121         Reviewed by Chris Fleizach.
1122
1123         The test that forces the context menu to show sometimes locks up 
1124         the test runner. Also, we missed a case where calling AXShowMenu
1125         action on a combobox is not dispatching the accessibility event.
1126
1127         Using the combobox example to test the event dispatching in order to
1128         avoid the test hang.
1129
1130         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1131         (-[WebAccessibilityObjectWrapper accessibilityPerformShowMenuAction]):
1132         (-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
1133
1134 2018-03-06  Chris Dumez  <cdumez@apple.com>
1135
1136         fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed.html fails with async policy delegates
1137         https://bugs.webkit.org/show_bug.cgi?id=183345
1138
1139         Reviewed by Alex Christensen.
1140
1141         FrameLoader::loadURL() was calling loadWithNavigationAction() and then resetting the
1142         m_quickRedirectComing flag right after. This works if the navigation policy decision
1143         triggered by loadWithNavigationAction() is made synchronously. However, when it is
1144         made asynchronously, the flag gets reset too early, before the policy decision
1145         handler has been called. This is an issue because the policy decision handler
1146         relies on the m_quickRedirectComing flag.
1147
1148         Similarly, FrameLoader::loadFrameRequest() was calling loadPostRequest() / loadURL()
1149         and then focusing a frame right after. This does not work as intended when the navigation
1150         policy decision is made asynchronously.
1151
1152         To address the issue, we now pass a completion handler that gets called when the operation
1153         has actually completion, after the policy decision has been made. This maintains the
1154         behavior in place with synchronous policy delegates.
1155
1156         Test: fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed-async-delegates.html
1157
1158         * loader/FrameLoader.cpp:
1159         (WebCore::FrameLoader::loadURLIntoChildFrame):
1160         (WebCore::FrameLoader::loadFrameRequest):
1161         (WebCore::FrameLoader::loadURL):
1162         (WebCore::FrameLoader::loadWithNavigationAction):
1163         (WebCore::FrameLoader::load):
1164         (WebCore::FrameLoader::loadWithDocumentLoader):
1165         (WebCore::FrameLoader::reloadWithOverrideEncoding):
1166         (WebCore::FrameLoader::reload):
1167         (WebCore::FrameLoader::loadPostRequest):
1168         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
1169         (WebCore::FrameLoader::loadDifferentDocumentItem):
1170         * loader/FrameLoader.h:
1171
1172 2018-03-06  Antoine Quint  <graouts@apple.com>
1173
1174         [Web Animations] Add a new CSSTransition subclass of WebAnimation
1175         https://bugs.webkit.org/show_bug.cgi?id=183373
1176         <rdar://problem/38181985>
1177
1178         Reviewed by Dean Jackson.
1179
1180         Adding a new CSSAnimation subclass which we will create in a later patch while resolving styles
1181         upon identifying that a new CSS Animation has been added to an element.
1182
1183         * CMakeLists.txt:
1184         * DerivedSources.make:
1185         * Sources.txt:
1186         * WebCore.xcodeproj/project.pbxproj:
1187         * animation/CSSTransition.cpp: Added.
1188         (WebCore::CSSTransition::create):
1189         (WebCore::CSSTransition::CSSTransition):
1190         * animation/CSSTransition.h: Added.
1191         * animation/CSSTransition.idl: Added.
1192         * animation/KeyframeEffect.cpp:
1193         * animation/WebAnimation.h:
1194         (WebCore::WebAnimation::isCSSTransition const):
1195         * bindings/js/JSWebAnimationCustom.cpp:
1196         (WebCore::toJSNewlyCreated):
1197         * bindings/js/WebCoreBuiltinNames.h:
1198
1199 2018-03-06  Megan Gardner  <megan_gardner@apple.com>
1200
1201         Ensure system appearance is default for web content
1202         https://bugs.webkit.org/show_bug.cgi?id=183354
1203         <rdar://problem/36975571>
1204         <rdar://problem/38162381>
1205
1206         Make sure the the system appearance for web content is default, and
1207         consolidate that code to a single class.
1208
1209         Reviewed by Tim Horton.
1210
1211         Not currently testable, will add tests in a future patch.
1212
1213         * WebCore.xcodeproj/project.pbxproj:
1214         * platform/mac/LocalDefaultSystemAppearance.h: Added.
1215         * platform/mac/LocalDefaultSystemAppearance.mm: Added.
1216         (WebCore::LocalDefaultSystemAppearance::LocalDefaultSystemAppearance):
1217         (WebCore::LocalDefaultSystemAppearance::~LocalDefaultSystemAppearance):
1218         * platform/mac/ThemeMac.mm:
1219         (-[WebCoreThemeView init]):
1220         (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext):
1221         * rendering/RenderThemeMac.mm:
1222         (WebCore::RenderThemeMac::systemColor const):
1223
1224 2018-03-06  Antoine Quint  <graouts@apple.com>
1225
1226         [Web Animations] Add a new runtime flag to control whether CSS Animations and CSS Transitions should run using the Web Animations timeline
1227         https://bugs.webkit.org/show_bug.cgi?id=183370
1228         <rdar://problem/38180729>
1229
1230         Reviewed by Dean Jackson.
1231
1232         Before we start creating WebAnimation objects to perform CSS Animations and CSS Transitions, which will replace the existing codepath
1233         involving CSSAnimationController and CompositeAnimation, we need a runtime flag that will allow all the new code to be turned off by
1234         default while we bring this feature up.
1235
1236         * page/RuntimeEnabledFeatures.h:
1237         (WebCore::RuntimeEnabledFeatures::setCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled):
1238         (WebCore::RuntimeEnabledFeatures::cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled const):
1239
1240 2018-03-06  Daniel Bates  <dabates@apple.com>
1241
1242         Make more use of USE(OPENGL_ES) and replace typedefs with C++11 using statements
1243         in TextureCacheCV.h
1244
1245         Rubber-stamped by Tim Horton.
1246
1247         * platform/graphics/cv/TextureCacheCV.h:
1248
1249 2018-03-06  Antti Koivisto  <antti@apple.com>
1250
1251         Cache hasComplexSelectorsForStyleAttribute bit
1252         https://bugs.webkit.org/show_bug.cgi?id=183363
1253
1254         Reviewed by Andreas Kling.
1255
1256         * css/DocumentRuleSets.cpp:
1257         (WebCore::DocumentRuleSets::collectFeatures const):
1258         (WebCore::DocumentRuleSets::hasComplexSelectorsForStyleAttribute const):
1259
1260         Cache the bit to avoid hash lookups.
1261
1262         * css/DocumentRuleSets.h:
1263         * dom/StyledElement.cpp:
1264         (WebCore::StyledElement::invalidateStyleAttribute):
1265         (WebCore::shouldSynchronizeStyleAttributeImmediatelyForInvalidation): Deleted.
1266
1267         Move code to DocumentRuleSets.
1268
1269 2018-03-06  Myles C. Maxfield  <mmaxfield@apple.com>
1270
1271         Change the type of SVGToOTFFontConverter::m_weight to be not a char
1272         https://bugs.webkit.org/show_bug.cgi?id=183339
1273
1274         Reviewed by Alex Christensen.
1275
1276         No new tests because there is no behavior change.
1277
1278         * svg/SVGToOTFFontConversion.cpp:
1279         (WebCore::SVGToOTFFontConverter::appendOS2Table):
1280         (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):
1281
1282 2018-03-06  Antoine Quint  <graouts@apple.com>
1283
1284         [Web Animations] Add a new CSSAnimation subclass of WebAnimation
1285         https://bugs.webkit.org/show_bug.cgi?id=183371
1286         <rdar://problem/38181724>
1287
1288         Reviewed by Dean Jackson.
1289
1290         Adding a new CSSAnimation subclass which we will create in a later patch while resolving styles
1291         upon identifying that a new CSS Animation has been added to an element.
1292
1293         * CMakeLists.txt:
1294         * DerivedSources.make:
1295         * Sources.txt:
1296         * WebCore.xcodeproj/project.pbxproj:
1297         * animation/CSSAnimation.cpp: Added.
1298         (WebCore::CSSAnimation::create):
1299         (WebCore::CSSAnimation::CSSAnimation):
1300         * animation/CSSAnimation.h: Added.
1301         * animation/CSSAnimation.idl: Added.
1302         * animation/KeyframeEffectReadOnly.cpp
1303         * animation/WebAnimation.h:
1304         (WebCore::WebAnimation::isCSSAnimation const):
1305         * animation/WebAnimation.idl:
1306         * bindings/js/JSWebAnimationCustom.cpp:
1307         (WebCore::toJSNewlyCreated):
1308         (WebCore::toJS):
1309         * bindings/js/WebCoreBuiltinNames.h:
1310
1311 2018-03-06  Ms2ger  <Ms2ger@igalia.com>
1312
1313         Explicitly qualify some method calls on this in lambdas in Service Worker code.
1314         https://bugs.webkit.org/show_bug.cgi?id=183367
1315
1316         Reviewed by Chris Dumez.
1317
1318         No new tests -- no change in behavior.
1319
1320         * loader/DocumentLoader.cpp:
1321         (WebCore::DocumentLoader::startLoadingMainResource):
1322         * workers/service/server/SWServer.cpp:
1323         (WebCore::SWServer::matchAll):
1324
1325 2018-03-06  Zan Dobersek  <zdobersek@igalia.com>
1326
1327         [CoordGraphics] Remove unused scrolling-related code in TextureMapperLayer, CoordinatedGraphics stack
1328         https://bugs.webkit.org/show_bug.cgi?id=183340
1329
1330         Reviewed by Michael Catanzaro.
1331
1332         TextureMapperLayer::scrollBy() method is completely unused and can be
1333         removed. This opens the gates on removing majority of scrolling-related
1334         code in TextureMapperLayer, CoordinatedGraphicsLayer and
1335         CoordinatedGraphicsScene classes, along with smaller bits in other
1336         closely-associated classes.
1337
1338         We're able to remove two virtual method overrides in the
1339         ScrollingCoordinatorCoordinatedGraphics class.
1340
1341         TextureMapperLayer can drop the ScrollingClient member variable, along
1342         with multiple others. Various unused methods in that class are removed
1343         as well.
1344
1345         CoordinatedGraphicsLayer and GraphicsLayerTextureMapper can both remove
1346         the custom scrolling state tracking.
1347
1348         No new tests -- no change in behavior.
1349
1350         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
1351         (WebCore::ScrollingCoordinatorCoordinatedGraphics::scrollableAreaScrollLayerDidChange): Deleted.
1352         (WebCore::ScrollingCoordinatorCoordinatedGraphics::willDestroyScrollableArea): Deleted.
1353         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h:
1354         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1355         (WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
1356         (WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
1357         (WebCore::GraphicsLayerTextureMapper::didCommitScrollOffset): Deleted.
1358         (WebCore::GraphicsLayerTextureMapper::setIsScrollable): Deleted.
1359         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
1360         * platform/graphics/texmap/TextureMapperLayer.cpp:
1361         (WebCore::TextureMapperLayer::hitTest): Deleted.
1362         (WebCore::TextureMapperLayer::scrollableLayerHitTestCondition): Deleted.
1363         (WebCore::TextureMapperLayer::findScrollableContentsLayerAt): Deleted.
1364         (WebCore::TextureMapperLayer::mapScrollOffset): Deleted.
1365         (WebCore::TextureMapperLayer::commitScrollOffset): Deleted.
1366         (WebCore::TextureMapperLayer::scrollBy): Deleted.
1367         (WebCore::TextureMapperLayer::didCommitScrollOffset): Deleted.
1368         * platform/graphics/texmap/TextureMapperLayer.h:
1369         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1370         (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
1371         (WebCore::CoordinatedGraphicsLayer::syncLayerState):
1372         (WebCore::CoordinatedGraphicsLayer::resetLayerState):
1373         (WebCore::CoordinatedGraphicsLayer::setScrollableArea): Deleted.
1374         (WebCore::CoordinatedGraphicsLayer::commitScrollOffset): Deleted.
1375         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
1376         * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
1377
1378 2018-03-06  Zan Dobersek  <zdobersek@igalia.com>
1379
1380         [CoordGraphics] Apply TextureMapperLayer animations with a single MonotonicTime value
1381         https://bugs.webkit.org/show_bug.cgi?id=183360
1382
1383         Reviewed by Sergio Villar Senin.
1384
1385         When animations are being applied on the TextureMapperLayer tree, the
1386         monotonic time value is retrieved repeatedly in TextureMapperAnimation
1387         class. Instead of spawning repeated syscalls that are required to obtain
1388         the time value, TextureMapperLayer::applyAnimationsRecursively() now
1389         accepts a MonotonicTime value that should be used for all animation
1390         updates.
1391
1392         No new tests -- no change in behavior.
1393
1394         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1395         (WebCore::GraphicsLayerTextureMapper::flushCompositingStateForThisLayerOnly):
1396         * platform/graphics/texmap/TextureMapperAnimation.cpp:
1397         (WebCore::TextureMapperAnimation::apply):
1398         (WebCore::TextureMapperAnimation::computeTotalRunningTime):
1399         (WebCore::TextureMapperAnimations::apply):
1400         * platform/graphics/texmap/TextureMapperAnimation.h:
1401         (WebCore::TextureMapperAnimation::keyframes const):
1402         (WebCore::TextureMapperAnimation::animation const):
1403         (WebCore::TextureMapperAnimation::boxSize const): Deleted.
1404         (WebCore::TextureMapperAnimation::listsMatch const): Deleted.
1405         (WebCore::TextureMapperAnimation::startTime const): Deleted.
1406         (WebCore::TextureMapperAnimation::pauseTime const): Deleted.
1407         * platform/graphics/texmap/TextureMapperLayer.cpp:
1408         (WebCore::TextureMapperLayer::applyAnimationsRecursively):
1409         (WebCore::TextureMapperLayer::syncAnimations):
1410         * platform/graphics/texmap/TextureMapperLayer.h:
1411
1412 2018-03-06  Zan Dobersek  <zdobersek@igalia.com>
1413
1414         [CoordGraphics] Clean up CoordinatedImageBacking
1415         https://bugs.webkit.org/show_bug.cgi?id=183332
1416
1417         Reviewed by Carlos Garcia Campos.
1418
1419         Clean up the CoordinatedImageBacking class. Prefer reference values in
1420         class functions, methods and member variables, where possible. Move
1421         member variables into a more sensible order. Initialize a few member
1422         variables at the place of declaration.
1423
1424         Drop releaseSurfaceIfNeeded() and updateVisibilityIfNeeded() methods,
1425         integrating them into the update() method, which was the only place
1426         where they were called from.
1427
1428         We don't have to keep a reference to the buffer object, since we're
1429         not using it internally after it's been passed to the client's
1430         updateImageBacking() implementation.
1431
1432         No new tests -- no change in behavior.
1433
1434         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1435         (WebCore::CoordinatedGraphicsLayer::syncImageBacking):
1436         (WebCore::CoordinatedGraphicsLayer::releaseImageBackingIfNeeded):
1437         * platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
1438         (WebCore::CoordinatedImageBacking::getCoordinatedImageBackingID):
1439         (WebCore::CoordinatedImageBacking::CoordinatedImageBacking):
1440         (WebCore::CoordinatedImageBacking::addHost):
1441         (WebCore::CoordinatedImageBacking::removeHost):
1442         (WebCore::CoordinatedImageBacking::update):
1443         (WebCore::CoordinatedImageBacking::clearContentsTimerFired):
1444         (WebCore::CoordinatedImageBacking::create): Deleted.
1445         (WebCore::CoordinatedImageBacking::markDirty): Deleted.
1446         (WebCore::CoordinatedImageBacking::releaseSurfaceIfNeeded): Deleted.
1447         (WebCore::CoordinatedImageBacking::updateVisibilityIfNeeded): Deleted.
1448         * platform/graphics/texmap/coordinated/CoordinatedImageBacking.h:
1449
1450 2018-03-06  Zan Dobersek  <zdobersek@igalia.com>
1451
1452         GraphicsLayerTextureMapper: remove the setAnimations() method
1453         https://bugs.webkit.org/show_bug.cgi?id=183358
1454
1455         Reviewed by Carlos Garcia Campos.
1456
1457         Remove the GraphicsLayerTextureMapper::setAnimations() method. This was
1458         not called from anywhere, and is not the way animations are generated
1459         for a given GraphicsLayer object (that would be addAnimation() method).
1460
1461         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1462         (WebCore::GraphicsLayerTextureMapper::setAnimations): Deleted.
1463         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
1464
1465 2018-03-06  Nan Wang  <n_wang@apple.com>
1466
1467         AX: AOM: More accessibility events support
1468         https://bugs.webkit.org/show_bug.cgi?id=183023
1469         <rdar://problem/37764380>
1470
1471         Reviewed by Chris Fleizach.
1472
1473         Accessibility events.
1474         Spec: https://wicg.github.io/aom/spec/phase2.html
1475
1476         This change adds support for these new events:
1477           accessiblecontextmenu
1478           accessibledecrement
1479           accessibledismiss
1480           accessiblefocus
1481           accessibleincrement
1482           accessiblescrollintoview
1483           accessibleselect
1484
1485         Note: The show context menu action is only supported on macOS now.
1486         The dismiss action is not implemented for all the platforms yet.
1487
1488         Test: accessibility/mac/AOM-events-all.html
1489
1490         * accessibility/AccessibilityListBoxOption.cpp:
1491         (WebCore::AccessibilityListBoxOption::setSelected):
1492         * accessibility/AccessibilityMediaObject.cpp:
1493         (WebCore::AccessibilityMediaObject::increment):
1494         (WebCore::AccessibilityMediaObject::decrement):
1495         * accessibility/AccessibilityMenuListOption.cpp:
1496         (WebCore::AccessibilityMenuListOption::setSelected):
1497         * accessibility/AccessibilityNodeObject.cpp:
1498         (WebCore::AccessibilityNodeObject::increment):
1499         (WebCore::AccessibilityNodeObject::decrement):
1500         * accessibility/AccessibilityObject.cpp:
1501         (WebCore::AccessibilityObject::press):
1502         (WebCore::AccessibilityObject::dispatchAccessibilityEvent const):
1503         (WebCore::AccessibilityObject::dispatchAccessibilityEventWithType const):
1504         (WebCore::AccessibilityObject::dispatchAccessibleSetValueEvent const):
1505         (WebCore::AccessibilityObject::scrollToMakeVisible const):
1506         (WebCore::AccessibilityObject::dispatchAccessibilityEvent): Deleted.
1507         (WebCore::AccessibilityObject::dispatchAccessibleSetValueEvent): Deleted.
1508         * accessibility/AccessibilityObject.h:
1509         * accessibility/AccessibilityRenderObject.cpp:
1510         (WebCore::AccessibilityRenderObject::setFocused):
1511         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1512         (-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
1513         * dom/Element.idl:
1514         * dom/EventNames.h:
1515
1516 2018-03-05  Yusuke Suzuki  <utatane.tea@gmail.com>
1517
1518         Fix std::make_unique / new[] using system malloc
1519         https://bugs.webkit.org/show_bug.cgi?id=182975
1520
1521         Reviewed by JF Bastien.
1522
1523         Use Vector, FAST_ALLOCATED, or UniqueArray instead.
1524
1525         * Modules/webaudio/AudioBufferSourceNode.cpp:
1526         (WebCore::AudioBufferSourceNode::setBuffer):
1527         * Modules/webaudio/AudioBufferSourceNode.h:
1528         * css/StyleRule.h:
1529         * cssjit/CompiledSelector.h:
1530         * html/HTMLFrameSetElement.h:
1531         * html/canvas/WebGLRenderingContextBase.cpp:
1532         (WebCore::WebGLRenderingContextBase::copyTexSubImage2D):
1533         (WebCore::WebGLRenderingContextBase::simulateVertexAttrib0):
1534         (WebCore::WebGLRenderingContextBase::LRUImageBufferCache::LRUImageBufferCache):
1535         (WebCore::WebGLRenderingContextBase::LRUImageBufferCache::imageBuffer):
1536         (WebCore::WebGLRenderingContextBase::LRUImageBufferCache::bubbleToFront):
1537         * html/canvas/WebGLRenderingContextBase.h:
1538         * platform/Length.cpp:
1539         (WebCore::newCoordsArray):
1540         (WebCore::newLengthArray):
1541         (): Deleted.
1542         * platform/Length.h:
1543         * platform/audio/DynamicsCompressor.cpp:
1544         (WebCore::DynamicsCompressor::setNumberOfChannels):
1545         * platform/audio/DynamicsCompressor.h:
1546         * platform/audio/FFTFrame.h:
1547         * platform/audio/gstreamer/FFTFrameGStreamer.cpp:
1548         (WebCore::FFTFrame::FFTFrame):
1549         * platform/graphics/FormatConverter.h:
1550         (WebCore::FormatConverter::FormatConverter):
1551         * platform/graphics/GraphicsContext3D.cpp:
1552         (WebCore::GraphicsContext3D::texImage2DResourceSafe):
1553         * platform/graphics/GraphicsContext3D.h:
1554         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
1555         (WebCore::getDirtyRects):
1556         * platform/graphics/cairo/CairoUtilities.cpp:
1557         (WebCore::flipImageSurfaceVertically):
1558         * platform/graphics/cg/GraphicsContext3DCG.cpp:
1559         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
1560         * platform/graphics/gpu/Texture.cpp:
1561         (WebCore::Texture::updateSubRect):
1562         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1563         (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
1564         (WebCore::GraphicsContext3D::compileShader):
1565         (WebCore::GraphicsContext3D::getActiveAttribImpl):
1566         (WebCore::GraphicsContext3D::getActiveUniformImpl):
1567         (WebCore::GraphicsContext3D::getProgramInfoLog):
1568         (WebCore::GraphicsContext3D::getShaderInfoLog):
1569         * platform/graphics/texmap/TextureMapperShaderProgram.cpp:
1570         (WebCore::getShaderLog):
1571         (WebCore::getProgramLog):
1572         * platform/graphics/win/ImageBufferDataDirect2D.cpp:
1573         (WebCore::ImageBufferData::putData):
1574         * platform/image-decoders/png/PNGImageDecoder.cpp:
1575         (WebCore::PNGImageReader::PNGImageReader):
1576         (WebCore::PNGImageReader::close):
1577         (WebCore::PNGImageReader::interlaceBuffer const):
1578         (WebCore::PNGImageReader::createInterlaceBuffer):
1579         * platform/image-decoders/webp/WEBPImageDecoder.cpp:
1580         (WebCore::WEBPImageDecoder::decodeFrame):
1581         * platform/network/curl/SocketStreamHandleImpl.h:
1582         (WebCore::SocketStreamHandleImpl::SocketData::SocketData):
1583         * platform/network/curl/SocketStreamHandleImplCurl.cpp:
1584         (WebCore::createCopy):
1585         (WebCore::SocketStreamHandleImpl::readData):
1586         (): Deleted.
1587         * platform/network/soup/SocketStreamHandleImpl.h:
1588         * platform/network/soup/SocketStreamHandleImplSoup.cpp:
1589         (WebCore::SocketStreamHandleImpl::connected):
1590         * platform/win/LoggingWin.cpp:
1591         (WebCore::logLevelString):
1592
1593 2018-03-05  Yoav Weiss  <yoav@yoav.ws>
1594
1595         Support for preconnect Link headers
1596         https://bugs.webkit.org/show_bug.cgi?id=181657
1597
1598         Reviewed by Darin Adler.
1599
1600         Move the preconnect functionality into its own function, and
1601         also call this function when Link headers are processed.
1602
1603         Test: http/tests/preconnect/link-header-rel-preconnect-http.php
1604
1605         * loader/LinkLoader.cpp:
1606         (WebCore::LinkLoader::loadLinksFromHeader): Call preconnectIfNeeded.
1607         (WebCore::LinkLoader::preconnectIfNeeded): Preconnect to a host functionality moved here.
1608         (WebCore::LinkLoader::loadLink): Call preconnectIfNeeded.
1609         * loader/LinkLoader.h:
1610
1611 2018-03-05  Antti Koivisto  <antti@apple.com>
1612
1613         Add ChildrenAffectedByForwardPositionalRules bit for nth-child pseudo class marking
1614         https://bugs.webkit.org/show_bug.cgi?id=183341
1615         <rdar://problem/38151470>
1616
1617         Reviewed by Zalan Bujtas.
1618
1619         Use it instead of AffectsNextSibling/AffectedByPreviousSibling bits, similar to ChildrenAffectedByBackwardPositionalRules bit.
1620         This is more efficient and requires way less marking.
1621
1622         * css/SelectorChecker.cpp:
1623         (WebCore::countElementsBefore):
1624         (WebCore::countElementsOfTypeBefore):
1625         (WebCore::SelectorChecker::checkOne const):
1626
1627             Mark with ChildrenAffectedByForwardPositionalRules.
1628
1629         * cssjit/SelectorCompiler.cpp:
1630         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
1631         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChildOf):
1632
1633              Mark with ChildrenAffectedByForwardPositionalRules.
1634
1635         * dom/Element.cpp:
1636         (WebCore::checkForSiblingStyleChanges):
1637
1638             Invalidate siblings after added/removed element.
1639
1640         (WebCore::Element::setChildrenAffectedByForwardPositionalRules):
1641         (WebCore::Element::hasFlagsSetDuringStylingOfChildren const):
1642         (WebCore::Element::rareDataChildrenAffectedByForwardPositionalRules const):
1643
1644             Add the new marking bit.
1645
1646         * dom/Element.h:
1647         (WebCore::Element::childrenAffectedByForwardPositionalRules const):
1648         (WebCore::Element::attributeWithoutSynchronization const):
1649
1650             Remove assert so we can use this to get the current unresolved lazy value of style attrbute.
1651
1652         * dom/ElementRareData.h:
1653         (WebCore::ElementRareData::childrenAffectedByForwardPositionalRules const):
1654         (WebCore::ElementRareData::setChildrenAffectedByForwardPositionalRules):
1655         (WebCore::ElementRareData::ElementRareData):
1656         (WebCore::ElementRareData::resetStyleRelations):
1657
1658              Add the new marking bit.
1659
1660         * dom/StyledElement.cpp:
1661         (WebCore::StyledElement::invalidateStyleAttribute):
1662
1663             In special case where we have attribute selectors for style attribute, synchronize the attribute immediately so we get invalidation right.
1664             Tested by fast/css/style-attribute-invalidation-propagates-to-counted-siblings.html    
1665
1666         * style/StyleRelations.cpp:
1667         (WebCore::Style::commitRelationsToRenderStyle):
1668         (WebCore::Style::commitRelations):
1669
1670             Commit the new bit.
1671
1672         * style/StyleRelations.h:
1673
1674 2018-03-05  Ryan Haddad  <ryanhaddad@apple.com>
1675
1676         Unreviewed build fix, remove unused variables.
1677
1678         * css/parser/CSSPropertyParser.cpp:
1679         (WebCore::consumeSpeakAs):
1680         (WebCore::consumeHangingPunctuation):
1681
1682 2018-03-05  Chris Dumez  <cdumez@apple.com>
1683
1684         fast/loader/onload-policy-ignore-for-frame.html is timing out with async policy delegates
1685         https://bugs.webkit.org/show_bug.cgi?id=183337
1686
1687         Reviewed by Ryosuke Niwa.
1688
1689         Make sure we call checkCompleted() before calling checkLoadComplete() in
1690         FrameLoader::continueLoadAfterNavigationPolicy() when the client tells us
1691         to ignore the navigation, so that we properly recognize that the load is
1692         done. This matches what is already done in FrameLoader::receivedMainResourceError().
1693
1694         Test: fast/loader/onload-policy-ignore-for-frame-async-delegates.html
1695
1696         * loader/FrameLoader.cpp:
1697         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
1698
1699 2018-03-05  Myles C. Maxfield  <mmaxfield@apple.com>
1700
1701         [Cocoa] Allow user-installed fonts to be disabled
1702         https://bugs.webkit.org/show_bug.cgi?id=183349
1703
1704         Rubber stamped by Brent Fulgham.
1705
1706         Tests: fast/text/user-installed-font.html
1707                fast/text/user-installed-fonts/disable.html
1708                fast/text/user-installed-fonts/shadow-disable.html
1709                fast/text/user-installed-fonts/shadow-family-disable.html
1710                fast/text/user-installed-fonts/shadow-family.html
1711                fast/text/user-installed-fonts/shadow-postscript-disable.html
1712                fast/text/user-installed-fonts/shadow-postscript-family-disable.html
1713                fast/text/user-installed-fonts/shadow-postscript-family.html
1714                fast/text/user-installed-fonts/shadow-postscript.html
1715                fast/text/user-installed-fonts/shadow.html
1716                fast/text/user-installed-fonts/system-ui.html
1717
1718         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1719
1720 2018-03-05  Myles C. Maxfield  <mmaxfield@apple.com>
1721
1722         Silence OpenGL and OpenGL ES deprecation warnings in newer SDKs
1723         https://bugs.webkit.org/show_bug.cgi?id=183350
1724
1725         Unreviewed.
1726
1727         * Configurations/WebCore.xcconfig:
1728
1729 2018-03-05  Andy Estes  <aestes@apple.com>
1730
1731         [Mac] Teach WebCore::Pasteboard about file promise drags
1732         https://bugs.webkit.org/show_bug.cgi?id=183314
1733         <rdar://problem/38105493>
1734
1735         Reviewed by Darin Adler.
1736
1737         While WebKit does support receiving file promise drags (since r210360), WebCore::Pasteboard
1738         has not been instructed on how to read their file paths. When the various pasteboard readers
1739         ask for file paths after a file promise drop, they receive an empty vector. This impacts
1740         various features, most notably the DataTransfer API.
1741
1742         Pasteboard actually cannot learn about promised file paths from the pasteboard itself, as
1743         the pasteboard only contains the dragged files' UTIs. Promised file paths aren't known until
1744         the WebKits call -[NSFilePromiseReceiver receivePromisedFilesAtDestination:...], at which
1745         point the file paths are passed to WebCore as part of WebCore::DragData.
1746
1747         When we construct new Pasteboards for drag and drop, we need to store any promised file
1748         paths from the DragData. Then, when the various pasteboard readers ask for file paths and
1749         NSFilesPromisePboardType is on the pasteboard, we can return these promised file paths.
1750
1751         Tests: editing/pasteboard/data-transfer-items-drag-drop-file-promise.html
1752                editing/pasteboard/data-transfer-items-drop-file-promise.html
1753                editing/pasteboard/datatransfer-items-drop-plaintext-file-promise.html
1754                editing/pasteboard/datatransfer-types-dropping-text-file-promise.html
1755                editing/pasteboard/drag-file-promises-to-editable-element-as-URLs.html
1756                editing/pasteboard/drag-file-promises-to-editable-element-as-attachment.html
1757                editing/pasteboard/file-input-files-access-promise.html
1758
1759         * platform/FileSystem.h:
1760         * platform/Pasteboard.h:
1761         (WebCore::Pasteboard::Pasteboard):
1762         * platform/mac/DragDataMac.mm:
1763         (WebCore::DragData::containsPromise const):
1764         * platform/mac/PasteboardMac.mm:
1765         (WebCore::Pasteboard::Pasteboard):
1766         (WebCore::Pasteboard::createForDragAndDrop):
1767         (WebCore::toString):
1768         (WebCore::Pasteboard::read):
1769         (WebCore::Pasteboard::readFilePaths):
1770         (WebCore::absoluteURLsFromPasteboardFilenames): Deleted.
1771         * platform/mac/PlatformPasteboardMac.mm:
1772         (WebCore::PlatformPasteboard::numberOfFiles const):
1773
1774 2018-03-05  Andy Estes  <aestes@apple.com>
1775
1776         [Mac] Fix the build
1777
1778         * Modules/applepay/ApplePaySession.cpp:
1779         (WebCore::convertAndValidate): Removed unused variables.
1780
1781 2018-03-05  Antti Koivisto  <antti@apple.com>
1782
1783         Don't invalidate all children when doing insertion/deletion in presence of backward positional selectors
1784         https://bugs.webkit.org/show_bug.cgi?id=183325
1785         <rdar://problem/38134480>
1786
1787         Reviewed by Zalan Bujtas.
1788
1789         It is sufficient to invalidate siblings before the mutation point.
1790
1791         * dom/Element.cpp:
1792         (WebCore::checkForSiblingStyleChanges):
1793
1794         We already do sibling walk in the case of forwards positional rules and sibling combinators. The work
1795         done here is insignifant compared to cost of overinvalidating.
1796
1797 2018-03-05  Ali Juma  <ajuma@chromium.org>
1798
1799         imported/w3c/web-platform-tests/html/semantics/text-level-semantics/the-a-element/a-download-click-404.html times out with async policy delegates
1800         https://bugs.webkit.org/show_bug.cgi?id=183297
1801
1802         Reviewed by Chris Dumez.
1803
1804         When a FrameLoader's policy document loader is cleared after receiving a navigation policy decision
1805         to not continue loading, we still need to trigger a check for load completion, since this loader or
1806         an ancestor loader may have been in state isLoadingInAPISense only because of the existence of
1807         the just-cleared policy document loader. Without triggering this check, these loaders may never
1808         call WebFrameLoaderClient::dispatchDidFinishLoad.
1809
1810         Test: http/wpt/html/semantics/text-level-semantics/the-a-element/a-download-click-404.html
1811
1812         * loader/FrameLoader.cpp:
1813         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
1814
1815 2018-03-04  Yusuke Suzuki  <utatane.tea@gmail.com>
1816
1817         [WTF] Move currentCPUTime and sleep(Seconds) to CPUTime.h and Seconds.h respectively
1818         https://bugs.webkit.org/show_bug.cgi?id=183312
1819
1820         Reviewed by Mark Lam.
1821
1822         Remove wtf/CurrentTime.h include pragma.
1823
1824         * Modules/geolocation/Geolocation.cpp:
1825         * Modules/mediasource/SourceBuffer.cpp:
1826         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
1827         * Modules/speech/SpeechSynthesis.cpp:
1828         * contentextensions/ContentExtensionCompiler.cpp:
1829         * contentextensions/ContentExtensionParser.cpp:
1830         * dom/Document.cpp:
1831         * dom/Element.cpp:
1832         * dom/Event.cpp:
1833         * dom/ScriptedAnimationController.cpp:
1834         * dom/SimulatedClick.cpp:
1835         * fileapi/File.cpp:
1836         * fileapi/FileReader.cpp:
1837         * history/CachedPage.cpp:
1838         * html/BaseDateAndTimeInputType.cpp:
1839         * html/DateTimeInputType.cpp:
1840         * html/HTMLMediaElement.cpp:
1841         * html/MediaController.cpp:
1842         * html/MediaElementSession.cpp:
1843         * html/MonthInputType.cpp:
1844         * html/TimeInputType.cpp:
1845         * html/parser/HTMLParserScheduler.h:
1846         * inspector/InspectorCanvas.cpp:
1847         * loader/FrameLoader.cpp:
1848         * loader/LoadTiming.cpp:
1849         * loader/NavigationScheduler.cpp:
1850         * loader/ProgressTracker.cpp:
1851         * loader/cache/CachedCSSStyleSheet.cpp:
1852         * loader/cache/CachedImage.cpp:
1853         * loader/cache/CachedResource.cpp:
1854         * loader/cache/MemoryCache.cpp:
1855         * page/DOMTimer.cpp:
1856         * page/DOMWindow.cpp:
1857         * page/DragController.cpp:
1858         * page/EventHandler.cpp:
1859         * page/FocusController.cpp:
1860         * page/FrameView.cpp:
1861         * page/Page.cpp:
1862         * page/Performance.cpp:
1863         * page/PerformanceTiming.cpp:
1864         * page/animation/AnimationBase.cpp:
1865         * page/animation/CSSAnimationController.cpp:
1866         * page/mac/WheelEventDeltaFilterMac.mm:
1867         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1868         * platform/ScrollAnimationKinetic.cpp:
1869         * platform/ScrollAnimationSmooth.cpp:
1870         * platform/ThreadTimers.cpp:
1871         * platform/Timer.cpp:
1872         * platform/audio/mac/AudioSampleDataSource.mm:
1873         * platform/cocoa/ScrollController.mm:
1874         * platform/gamepad/cocoa/GameControllerGamepad.mm:
1875         * platform/gamepad/mac/HIDGamepad.cpp:
1876         * platform/graphics/BitmapImage.cpp:
1877         * platform/graphics/DisplayRefreshMonitorManager.cpp:
1878         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1879         * platform/graphics/ca/GraphicsLayerCA.cpp:
1880         * platform/graphics/ca/LayerPool.cpp:
1881         * platform/graphics/ca/PlatformCALayer.h:
1882         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
1883         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
1884         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
1885         * platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp:
1886         * platform/graphics/cg/GraphicsContextCG.cpp:
1887         * platform/graphics/cocoa/WebCoreDecompressionSession.mm:
1888         * platform/graphics/ios/DisplayRefreshMonitorIOS.mm:
1889         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
1890         * platform/graphics/texmap/BitmapTexturePool.h:
1891         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1892         * platform/graphics/texmap/TextureMapper.cpp:
1893         * platform/graphics/texmap/TextureMapperAnimation.cpp:
1894         * platform/graphics/texmap/TextureMapperFPSCounter.cpp:
1895         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1896         * platform/graphics/win/GraphicsContextDirect2D.cpp:
1897         * platform/graphics/win/GraphicsLayerDirect2D.cpp:
1898         * platform/gtk/PlatformKeyboardEventGtk.cpp:
1899         * platform/gtk/ScrollAnimatorGtk.cpp:
1900         * platform/ios/LegacyTileCache.mm:
1901         * platform/ios/LegacyTileLayerPool.mm:
1902         * platform/ios/ScrollViewIOS.mm:
1903         * platform/mediastream/RealtimeOutgoingVideoSource.cpp:
1904         * platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp:
1905         * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:
1906         * platform/mock/MockRealtimeMediaSource.cpp:
1907         * platform/mock/MockRealtimeVideoSource.cpp:
1908         * platform/network/CacheValidation.cpp:
1909         * platform/network/DNSResolveQueue.cpp:
1910         * platform/network/ResourceResponseBase.cpp:
1911         * platform/network/curl/CurlCacheEntry.cpp:
1912         * platform/network/soup/ResourceHandleSoup.cpp:
1913         * platform/text/TextEncodingRegistry.cpp:
1914         * platform/text/win/LocaleWin.cpp:
1915         * platform/win/MainThreadSharedTimerWin.cpp:
1916         * platform/win/PlatformMouseEventWin.cpp:
1917         * rendering/RenderLayerCompositor.cpp:
1918         * rendering/RenderProgress.cpp:
1919         * svg/animation/SMILTimeContainer.cpp:
1920         * testing/MockGamepad.cpp:
1921         * workers/WorkerRunLoop.cpp:
1922
1923 2018-03-04  Tim Horton  <timothy_horton@apple.com>
1924
1925         Make !ENABLE(DATA_DETECTION) iOS build actually succeed
1926         https://bugs.webkit.org/show_bug.cgi?id=183283
1927         <rdar://problem/38062148>
1928
1929         Reviewed by Sam Weinig.
1930
1931         * Configurations/FeatureDefines.xcconfig:
1932
1933 2018-03-03  Said Abou-Hallawa  <sabouhallawa@apple.com>
1934
1935         Delete incorrect version of clampTo() function from SVGToOTFFontConversion.cpp
1936         https://bugs.webkit.org/show_bug.cgi?id=183165
1937
1938         Reviewed by Darin Adler.
1939
1940         Some of the calls in SVGToOTFFontConversion.cpp were directed to the function
1941         in MathExtras.h while the rest were directed to this local static function.
1942         There should not be two versions with the same name while they are supposed
1943         to do the same thing. Besides, the local version does not work correctly
1944         if the type of the argument's max limit is less the max limit of the returned
1945         type, e.g. char -> uint16_t.
1946
1947         * svg/SVGToOTFFontConversion.cpp:
1948         (WebCore::clampTo): Deleted.
1949
1950 2018-03-03  Zalan Bujtas  <zalan@apple.com>
1951
1952         [RenderTreeBuilder] Move styleDidChange mutation logic to RenderTreeUpdater
1953         https://bugs.webkit.org/show_bug.cgi?id=183273
1954         <rdar://problem/38054892>
1955
1956         Reviewed by Antti Koivisto.
1957
1958         Covered by existing tests.
1959
1960         * rendering/RenderBlockFlow.cpp:
1961         (WebCore::RenderBlockFlow::styleDidChange):
1962         * rendering/RenderElement.cpp:
1963         (WebCore::RenderElement::styleDidChange):
1964         (WebCore::RenderElement::noLongerAffectsParentBlock const): Deleted.
1965         * rendering/RenderElement.h:
1966         * rendering/updating/RenderTreeUpdater.cpp:
1967         (WebCore::RenderTreeUpdater::updateElementRenderer):
1968
1969 2018-03-03  Yoav Weiss  <yoav@yoav.ws>
1970
1971         Link headers for subresources are not being processes
1972         https://bugs.webkit.org/show_bug.cgi?id=181789
1973
1974         Reviewed by Youenn Fablet.
1975
1976         Triggers Link header processing when the Link headers arrive on a subresource.
1977
1978         Test: http/tests/preload/link-header-on-subresource.html
1979
1980         * loader/LinkLoader.cpp:
1981         (WebCore::LinkLoader::loadLinksFromHeader): Change the media check conditions.
1982         * loader/LinkLoader.h: Add a third state for media checks.
1983         * loader/SubresourceLoader.cpp:
1984         (WebCore::SubresourceLoader::didReceiveResponse): Preload links from headers for subresources.
1985
1986 2018-03-02  Yusuke Suzuki  <utatane.tea@gmail.com>
1987
1988         [WTF] Remove RunLoop and RunLoop::Timer's interface using double as seconds
1989         https://bugs.webkit.org/show_bug.cgi?id=183293
1990
1991         Reviewed by Alex Christensen.
1992
1993         * platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:
1994         (WebCore::TextureMapperPlatformLayerProxy::dropCurrentBufferWhilePreservingTexture):
1995
1996 2018-03-02  Dean Jackson  <dino@apple.com>
1997
1998         Remove NP_GLContext since it is unsupported
1999         https://bugs.webkit.org/show_bug.cgi?id=183305
2000         <rdar://problem/36875555>
2001
2002         Reviewed by Simon Fraser.
2003
2004         * plugins/npapi.h: Remove NP_GLContext and mention that
2005         it is not supported.
2006
2007 2018-03-02  Chris Dumez  <cdumez@apple.com>
2008
2009         imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location-protocol-setter-non-broken.html crashes with async policy delegates
2010         https://bugs.webkit.org/show_bug.cgi?id=183294
2011         <rdar://problem/38073596>
2012
2013         Reviewed by Youenn Fablet.
2014
2015         Drop code that was added to SubresourceLoader::willCancel() in r228852. The purpose of this code
2016         was to make sure that SubresourceLoader::m_policyForResponseCompletionHandler always gets called,
2017         even when the load is cancelled. However, this code is not needed (since m_policyForResponseCompletionHandler
2018         is a CompletionHandler, an assertion will be hit if we fail to call it and we'll know). Calling
2019         the completionHandler inside SubresourceLoader::willCancel() is too early and leads to crashes.
2020
2021         The completionHandler currently gets called DocumentLoader::responseReceived() via a call to
2022         mainResourceLoader->didReceiveResponsePolicy(). Note that in r229177, we made sure that the
2023         call to didReceiveResponsePolicy() happens *after* the call to continueAfterContentPolicy()
2024         to maintain our non-async policy delegate behavior. However, continueAfterContentPolicy()
2025         would end up calling willCancel() and call the completionHandler when shouldContinue was
2026         false.
2027
2028         Test: http/wpt/html/browsers/history/the-location-interface/location-protocol-setter-non-broken-async-delegate.html
2029
2030         * loader/SubresourceLoader.cpp:
2031         (WebCore::SubresourceLoader::willCancel):
2032
2033 2018-03-02  Tim Horton  <timothy_horton@apple.com>
2034
2035         Fix the build after r229185 and r229184
2036
2037         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2038         (WebCore::exernalDeviceDisplayNameForPlayer):
2039         * platform/ios/DeviceOrientationClientIOS.h:
2040         * platform/ios/DeviceOrientationClientIOS.mm:
2041
2042 2018-03-02  Tim Horton  <timothy_horton@apple.com>
2043
2044         Make the !ENABLE(DEVICE_ORIENTATION) iOS build succeed
2045         https://bugs.webkit.org/show_bug.cgi?id=183296
2046
2047         Reviewed by Dan Bernstein.
2048
2049         * platform/ios/DeviceMotionClientIOS.h:
2050         * platform/ios/DeviceMotionClientIOS.mm:
2051         * platform/ios/WebCoreMotionManager.h:
2052         * platform/ios/WebCoreMotionManager.mm:
2053
2054 2018-03-02  Tim Horton  <timothy_horton@apple.com>
2055
2056         Make it possible to build for iOS without Celestial
2057         https://bugs.webkit.org/show_bug.cgi?id=183295
2058         <rdar://problem/38074468>
2059
2060         Reviewed by Dan Bernstein.
2061
2062         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2063         (WebCore::exernalDeviceDisplayNameForPlayer):
2064
2065 2018-03-02  Youenn Fablet  <youenn@apple.com>
2066
2067         Clients should register to StorageProcess with their service worker registration identifier
2068         https://bugs.webkit.org/show_bug.cgi?id=182313
2069         <rdar://problem/38044403>
2070
2071         Reviewed by Chris Dumez.
2072
2073         Relanding with fixing matchAll for uncontrolled clients.
2074
2075         No observable change of behavior in regular conditions.
2076         When service worker process crashes, the service worker identifiers sent by the WebProcess might be wrong
2077         and we will not be able to retrieve the registration from these identifiers.
2078         The storage process will be able to still process correctly messages coming from the WebProcess to register clients of the registration.
2079         Otherwise, there is a chance that WebProcess clients will not be added to the SWServerRegistration.m_clientsUsingRegistration maps.
2080
2081         * dom/Document.cpp:
2082         (WebCore::Document::setServiceWorkerConnection):
2083         * workers/service/SWClientConnection.h:
2084         * workers/service/server/SWServer.cpp:
2085         (WebCore::SWServer::matchAll):
2086         (WebCore::SWServer::claim):
2087         (WebCore::SWServer::registerServiceWorkerClient):
2088         (WebCore::SWServer::unregisterServiceWorkerClient):
2089         (WebCore::SWServer::setClientActiveWorker): Deleted.
2090         * workers/service/server/SWServer.h:
2091         * workers/service/server/SWServerRegistration.cpp:
2092         (WebCore::SWServerRegistration::activate):
2093
2094 2018-03-02  Youenn Fablet  <youenn@apple.com>
2095
2096         Loads for a Document controlled by a Service Worker should not use AppCache
2097         https://bugs.webkit.org/show_bug.cgi?id=183148
2098
2099         Reviewed by Chris Dumez.
2100
2101         Covered by updated test.
2102
2103         Postponing document loading through app cache after matching service worker registration.
2104         Trying to load through app cache only if there is no service worker registration.
2105
2106         Disabling app cache for any load that has a service worker registration identifier.
2107
2108         * loader/DocumentLoader.cpp:
2109         (WebCore::DocumentLoader::redirectReceived):
2110         (WebCore::DocumentLoader::willSendRequest):
2111         (WebCore::DocumentLoader::tryLoadingRequestFromApplicationCache):
2112         (WebCore::DocumentLoader::tryLoadingRedirectRequestFromApplicationCache):
2113         (WebCore::DocumentLoader::restartLoadingDueToServiceWorkerRegistrationChange):
2114         (WebCore::DocumentLoader::scheduleSubstituteResourceLoad):
2115         (WebCore::DocumentLoader::startLoadingMainResource):
2116         * loader/DocumentLoader.h:
2117         * loader/appcache/ApplicationCacheHost.cpp:
2118         (WebCore::ApplicationCacheHost::maybeLoadMainResource):
2119         (WebCore::ApplicationCacheHost::maybeLoadMainResourceForRedirect):
2120         (WebCore::ApplicationCacheHost::maybeLoadResource):
2121         (WebCore::ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache):
2122         * loader/appcache/ApplicationCacheHost.h:
2123
2124 2018-03-02  Chris Dumez  <cdumez@apple.com>
2125
2126         fast/events/before-unload-remove-itself.html crashes with async policy delegates
2127         https://bugs.webkit.org/show_bug.cgi?id=183290
2128         <rdar://problem/38069045>
2129
2130         Reviewed by Alex Christensen.
2131
2132         When the navigation policy happens asynchronously, it is now possible for the
2133         Frame / FrameLoader to get destroyed between the point that policyChecker().checkNavigationPolicy()
2134         is called and when continueLoadAfterNavigationPolicy() is called.
2135
2136         To address the issue, we now protect the Frame and capture it in the lambda passed
2137         to policyChecker().checkNavigationPolicy().
2138
2139         Test: fast/events/before-unload-remove-itself-async-delegate.html
2140
2141         * loader/FrameLoader.cpp:
2142         (WebCore::FrameLoader::loadURL):
2143         (WebCore::FrameLoader::loadWithDocumentLoader):
2144
2145 2018-03-02  Chris Dumez  <cdumez@apple.com>
2146
2147         Converting a load to a download does not work with async policy delegates
2148         https://bugs.webkit.org/show_bug.cgi?id=183254
2149         <rdar://problem/38035334>
2150
2151         Reviewed by Youenn Fablet.
2152
2153         Update DocumentLoader::responseReceived() to call didReceiveResponsePolicy()
2154         on the mainResourceLoader *after* calling continueAfterContentPolicy(),
2155         not *before*. This makes sure that the WebResourceLoader sends the
2156         NetworkResourceLoader::ContinueDidReceiveResponse IPC back to the Network
2157         Process *after* the policy decision has been processed, which restores the
2158         pre-r228852 order.
2159
2160         Test: fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download-async-delegate.html
2161
2162         * loader/DocumentLoader.cpp:
2163         (WebCore::DocumentLoader::responseReceived):
2164
2165 2018-03-02  Youenn Fablet  <youenn@apple.com>
2166
2167         Some RealtimeMediaSource methods do not need to be marked as virtual
2168         https://bugs.webkit.org/show_bug.cgi?id=183272
2169
2170         Reviewed by Eric Carlson.
2171
2172         No change of behavior.
2173
2174         * platform/mediastream/RealtimeMediaSource.h:
2175
2176 2018-03-01  Yusuke Suzuki  <utatane.tea@gmail.com>
2177
2178         Remove monotonicallyIncreasingTime
2179         https://bugs.webkit.org/show_bug.cgi?id=182911
2180
2181         Reviewed by Michael Catanzaro.
2182
2183         While generic code uses MonotonicTime, CAAnimation uses media time (CFTimeInterval).
2184         At this boundary, we convert MonotonicTime to media time, this is the same logic to
2185         the code before this patch.
2186
2187         * Modules/gamepad/Gamepad.h:
2188         * Modules/mediasource/SourceBuffer.cpp:
2189         (WebCore::SourceBuffer::SourceBuffer):
2190         (WebCore::SourceBuffer::monitorBufferingRate):
2191         * Modules/mediasource/SourceBuffer.h:
2192         * Modules/speech/SpeechSynthesis.cpp:
2193         (WebCore::SpeechSynthesis::startSpeakingImmediately):
2194         (WebCore::SpeechSynthesis::fireEvent):
2195         * Modules/speech/SpeechSynthesisUtterance.h:
2196         * contentextensions/ContentExtensionCompiler.cpp:
2197         (WebCore::ContentExtensions::compileRuleList):
2198         * contentextensions/ContentExtensionParser.cpp:
2199         (WebCore::ContentExtensions::parseRuleList):
2200         * contentextensions/ContentExtensionsBackend.cpp:
2201         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad const):
2202         * dom/Element.cpp:
2203         (WebCore::Element::setActive):
2204         * history/CachedPage.cpp:
2205         (WebCore::CachedPage::CachedPage):
2206         (WebCore::CachedPage::hasExpired const):
2207         * history/CachedPage.h:
2208         * html/HTMLMediaElement.cpp:
2209         (WebCore::HTMLMediaElement::startProgressEventTimer):
2210         (WebCore::HTMLMediaElement::progressEventTimerFired):
2211         (WebCore::HTMLMediaElement::refreshCachedTime const):
2212         (WebCore::HTMLMediaElement::invalidateCachedTime const):
2213         (WebCore::HTMLMediaElement::currentMediaTime const):
2214         (WebCore::HTMLMediaElement::startPlaybackProgressTimer):
2215         * html/HTMLMediaElement.h:
2216         * html/MediaElementSession.cpp:
2217         (WebCore::MediaElementSession::removeBehaviorRestriction):
2218         (WebCore::MediaElementSession::mostRecentUserInteractionTime const):
2219         (WebCore::MediaElementSession::resetPlaybackSessionState):
2220         * html/MediaElementSession.h:
2221         * html/parser/HTMLParserScheduler.cpp:
2222         (WebCore::PumpSession::PumpSession):
2223         (WebCore::HTMLParserScheduler::HTMLParserScheduler):
2224         * html/parser/HTMLParserScheduler.h:
2225         (WebCore::HTMLParserScheduler::checkForYield):
2226         * inspector/InspectorCanvas.cpp:
2227         (WebCore::InspectorCanvas::recordAction):
2228         (WebCore::InspectorCanvas::finalizeFrame):
2229         * inspector/InspectorCanvas.h:
2230         * inspector/agents/InspectorMemoryAgent.cpp:
2231         (WebCore::InspectorMemoryAgent::startTracking):
2232         (WebCore::InspectorMemoryAgent::didHandleMemoryPressure):
2233         (WebCore::InspectorMemoryAgent::collectSample):
2234         * inspector/agents/InspectorNetworkAgent.cpp:
2235         (WebCore::InspectorNetworkAgent::buildObjectForTiming):
2236         (WebCore::InspectorNetworkAgent::timestamp):
2237         (WebCore::InspectorNetworkAgent::didFinishLoading):
2238         * inspector/agents/InspectorPageAgent.cpp:
2239         (WebCore::InspectorPageAgent::timestamp):
2240         * inspector/agents/InspectorTimelineAgent.cpp:
2241         (WebCore::InspectorTimelineAgent::timestamp):
2242         * inspector/agents/WebHeapAgent.cpp:
2243         (WebCore::WebHeapAgent::dispatchGarbageCollectedEvent):
2244         * inspector/agents/WebHeapAgent.h:
2245         * loader/cache/CachedCSSStyleSheet.cpp:
2246         (WebCore::CachedCSSStyleSheet::restoreParsedStyleSheet):
2247         * loader/cache/CachedImage.cpp:
2248         (WebCore::CachedImage::didDraw):
2249         * loader/cache/CachedResource.cpp:
2250         (WebCore::CachedResource::didAccessDecodedData):
2251         * loader/cache/CachedResource.h:
2252         * loader/cache/MemoryCache.cpp:
2253         (WebCore::MemoryCache::pruneLiveResourcesToSize):
2254         * page/EventHandler.cpp:
2255         (WebCore::MaximumDurationTracker::MaximumDurationTracker):
2256         (WebCore::MaximumDurationTracker::~MaximumDurationTracker):
2257         * page/FocusController.cpp:
2258         (WebCore::FocusController::setFocusedElement):
2259         (WebCore::FocusController::timeSinceFocusWasSet const):
2260         * page/FocusController.h:
2261         * page/FrameView.cpp:
2262         (WebCore::FrameView::reset):
2263         (WebCore::FrameView::willPaintContents):
2264         (WebCore::FrameView::didPaintContents):
2265         * page/FrameView.h:
2266         * page/animation/AnimationBase.cpp:
2267         (WebCore::AnimationBase::freezeAtTime):
2268         (WebCore::AnimationBase::beginAnimationUpdateTime const):
2269         * page/animation/AnimationBase.h:
2270         (WebCore::AnimationBase::onAnimationStartResponse):
2271         * page/animation/CSSAnimationController.cpp:
2272         (WebCore::CSSAnimationControllerPrivate::beginAnimationUpdateTime):
2273         (WebCore::CSSAnimationControllerPrivate::receivedStartTimeResponse):
2274         (WebCore::CSSAnimationControllerPrivate::startTimeResponse):
2275         (WebCore::CSSAnimationController::notifyAnimationStarted):
2276         * page/animation/CSSAnimationController.h:
2277         * page/animation/CSSAnimationControllerPrivate.h:
2278         * page/mac/WheelEventDeltaFilterMac.h:
2279         * page/mac/WheelEventDeltaFilterMac.mm:
2280         (WebCore::WheelEventDeltaFilterMac::beginFilteringDeltas):
2281         (WebCore::WheelEventDeltaFilterMac::updateFromDelta):
2282         (WebCore::WheelEventDeltaFilterMac::endFilteringDeltas):
2283         * platform/ControlStates.h:
2284         (WebCore::ControlStates::timeSinceControlWasFocused const):
2285         (WebCore::ControlStates::setTimeSinceControlWasFocused):
2286         * platform/PlatformSpeechSynthesisUtterance.h:
2287         (WebCore::PlatformSpeechSynthesisUtterance::startTime const):
2288         (WebCore::PlatformSpeechSynthesisUtterance::setStartTime):
2289         * platform/gamepad/PlatformGamepad.h:
2290         (WebCore::PlatformGamepad::lastUpdateTime const):
2291         (WebCore::PlatformGamepad::connectTime const):
2292         (WebCore::PlatformGamepad::PlatformGamepad):
2293         * platform/gamepad/cocoa/GameControllerGamepad.mm:
2294         (WebCore::GameControllerGamepad::setupAsExtendedGamepad):
2295         (WebCore::GameControllerGamepad::setupAsGamepad):
2296         * platform/gamepad/mac/HIDGamepad.cpp:
2297         (WebCore::HIDGamepad::HIDGamepad):
2298         (WebCore::HIDGamepad::valueChanged):
2299         * platform/graphics/GraphicsLayer.cpp:
2300         (WebCore::GraphicsLayer::suspendAnimations):
2301         * platform/graphics/GraphicsLayer.h:
2302         * platform/graphics/GraphicsLayerClient.h:
2303         (WebCore::GraphicsLayerClient::notifyAnimationStarted):
2304         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2305         (WebCore::LayerClient::platformCALayerAnimationStarted):
2306         (WebCore::AVFWrapper::createImageForTimeInRect):
2307         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2308         (WebCore::MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect):
2309         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastImage):
2310         * platform/graphics/ca/GraphicsLayerCA.cpp:
2311         (WebCore::GraphicsLayerCA::addAnimation):
2312         (WebCore::GraphicsLayerCA::pauseAnimation):
2313         (WebCore::GraphicsLayerCA::platformCALayerAnimationStarted):
2314         (WebCore::GraphicsLayerCA::setAnimationOnLayer):
2315         (WebCore::GraphicsLayerCA::pauseCAAnimationOnLayer):
2316         (WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
2317         (WebCore::GraphicsLayerCA::appendToUncommittedAnimations):
2318         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
2319         * platform/graphics/ca/GraphicsLayerCA.h:
2320         (WebCore::GraphicsLayerCA::LayerPropertyAnimation::LayerPropertyAnimation):
2321         (WebCore::GraphicsLayerCA::AnimationProcessingAction::AnimationProcessingAction):
2322         * platform/graphics/ca/LayerPool.cpp:
2323         (WebCore::LayerPool::LayerPool):
2324         (WebCore::LayerPool::addLayer):
2325         (WebCore::LayerPool::decayedCapacity const):
2326         (WebCore::LayerPool::pruneTimerFired):
2327         * platform/graphics/ca/LayerPool.h:
2328         * platform/graphics/ca/PlatformCAAnimation.h:
2329         * platform/graphics/ca/PlatformCALayer.h:
2330         * platform/graphics/ca/PlatformCALayerClient.h:
2331         (WebCore::PlatformCALayerClient::platformCALayerAnimationStarted):
2332         * platform/graphics/ca/TileGrid.cpp:
2333         (WebCore::TileGrid::revalidateTiles):
2334         (WebCore::TileGrid::startedNewCohort):
2335         (WebCore::TileGrid::TileCohortInfo::timeUntilExpiration):
2336         (WebCore::TileGrid::cohortRemovalTimerFired):
2337         * platform/graphics/ca/TileGrid.h:
2338         (WebCore::TileGrid::TileCohortInfo::TileCohortInfo):
2339         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
2340         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
2341         (mediaTimeToCurrentTime):
2342         (-[WebAnimationDelegate animationDidStart:]):
2343         (PlatformCALayerCocoa::animationStarted):
2344         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
2345         (WebCore::CACFLayerTreeHost::notifyAnimationsStarted):
2346         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
2347         (PlatformCALayerWin::animationStarted):
2348         (PlatformCALayerWin::layerTreeAsString const):
2349         * platform/graphics/ca/win/PlatformCALayerWin.h:
2350         * platform/graphics/cocoa/WebCoreDecompressionSession.mm:
2351         (WebCore::WebCoreDecompressionSession::decodeSample):
2352         * platform/graphics/texmap/BitmapTexturePool.cpp:
2353         (WebCore::BitmapTexturePool::releaseUnusedTexturesTimerFired):
2354         * platform/graphics/texmap/BitmapTexturePool.h:
2355         (WebCore::BitmapTexturePool::Entry::markIsInUse):
2356         (WebCore::BitmapTexturePool::Entry::canBeReleased const):
2357         (): Deleted.
2358         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2359         (WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
2360         (WebCore::GraphicsLayerTextureMapper::addAnimation):
2361         (WebCore::GraphicsLayerTextureMapper::pauseAnimation):
2362         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
2363         * platform/graphics/texmap/TextureMapperAnimation.cpp:
2364         (WebCore::TextureMapperAnimation::TextureMapperAnimation):
2365         (WebCore::TextureMapperAnimation::apply):
2366         (WebCore::TextureMapperAnimation::pause):
2367         (WebCore::TextureMapperAnimation::resume):
2368         (WebCore::TextureMapperAnimation::computeTotalRunningTime):
2369         (WebCore::TextureMapperAnimations::pause):
2370         (WebCore::TextureMapperAnimations::suspend):
2371         * platform/graphics/texmap/TextureMapperAnimation.h:
2372         (WebCore::TextureMapperAnimation::startTime const):
2373         (WebCore::TextureMapperAnimation::pauseTime const):
2374         * platform/graphics/texmap/TextureMapperFPSCounter.cpp:
2375         (WebCore::TextureMapperFPSCounter::TextureMapperFPSCounter):
2376         (WebCore::TextureMapperFPSCounter::updateFPSAndDisplay):
2377         * platform/graphics/texmap/TextureMapperFPSCounter.h:
2378         * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:
2379         (WebCore::TextureMapperPlatformLayerBuffer::markUsed):
2380         (WebCore::TextureMapperPlatformLayerBuffer::lastUsedTime const):
2381         (): Deleted.
2382         * platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:
2383         (WebCore::TextureMapperPlatformLayerProxy::releaseUnusedBuffersTimerFired):
2384         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2385         (WebCore::CoordinatedGraphicsLayer::addAnimation):
2386         (WebCore::CoordinatedGraphicsLayer::pauseAnimation):
2387         (WebCore::CoordinatedGraphicsLayer::suspendAnimations):
2388         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2389         * platform/mediastream/RealtimeMediaSource.h:
2390         * platform/mediastream/RealtimeOutgoingVideoSource.cpp:
2391         (WebCore::RealtimeOutgoingVideoSource::sendFrame):
2392         * platform/mediastream/libwebrtc/LibWebRTCAudioModule.cpp:
2393         (WebCore::LibWebRTCAudioModule::StartPlayoutOnAudioThread):
2394         * platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp:
2395         (WebCore::DisplayCaptureSourceCocoa::startProducingData):
2396         (WebCore::DisplayCaptureSourceCocoa::stopProducingData):
2397         (WebCore::DisplayCaptureSourceCocoa::elapsedTime):
2398         * platform/mediastream/mac/DisplayCaptureSourceCocoa.h:
2399         * platform/mediastream/mac/MockRealtimeAudioSourceMac.h:
2400         * platform/mediastream/mac/MockRealtimeAudioSourceMac.mm:
2401         (WebCore::MockRealtimeAudioSourceMac::render):
2402         * platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:
2403         (WebCore::MockRealtimeVideoSourceMac::CMSampleBufferFromPixelBuffer):
2404         * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.h:
2405         * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:
2406         (WebCore::ScreenDisplayCaptureSourceMac::sampleBufferFromPixelBuffer):
2407         (WebCore::ScreenDisplayCaptureSourceMac::frameAvailable):
2408         * platform/mock/MockRealtimeAudioSource.cpp:
2409         (WebCore::MockRealtimeAudioSource::startProducingData):
2410         (WebCore::MockRealtimeAudioSource::stopProducingData):
2411         (WebCore::MockRealtimeAudioSource::elapsedTime):
2412         (WebCore::MockRealtimeAudioSource::tick):
2413         (WebCore::MockRealtimeAudioSource::delaySamples):
2414         * platform/mock/MockRealtimeAudioSource.h:
2415         (WebCore::MockRealtimeAudioSource::render):
2416         * platform/mock/MockRealtimeVideoSource.cpp:
2417         (WebCore::MockRealtimeVideoSource::startProducingData):
2418         (WebCore::MockRealtimeVideoSource::stopProducingData):
2419         (WebCore::MockRealtimeVideoSource::elapsedTime):
2420         (WebCore::MockRealtimeVideoSource::drawText):
2421         (WebCore::MockRealtimeVideoSource::delaySamples):
2422         (WebCore::MockRealtimeVideoSource::generateFrame):
2423         * platform/mock/MockRealtimeVideoSource.h:
2424         * platform/network/DNSResolveQueue.cpp:
2425         (WebCore::DNSResolveQueue::DNSResolveQueue):
2426         (WebCore::DNSResolveQueue::isUsingProxy):
2427         * platform/network/DNSResolveQueue.h:
2428         * rendering/RenderBoxModelObject.cpp:
2429         (WebCore::RenderBoxModelObject::suspendAnimations):
2430         * rendering/RenderBoxModelObject.h:
2431         * rendering/RenderElement.cpp:
2432         (WebCore::RenderElement::paintFocusRing):
2433         * rendering/RenderImage.cpp:
2434         (WebCore::RenderImage::paintAreaElementFocusRing):
2435         * rendering/RenderLayerBacking.cpp:
2436         (WebCore::RenderLayerBacking::notifyAnimationStarted):
2437         (WebCore::RenderLayerBacking::suspendAnimations):
2438         * rendering/RenderLayerBacking.h:
2439         * rendering/RenderLayerCompositor.cpp:
2440         (WebCore::RenderLayerCompositor::didPaintBacking):
2441         * rendering/RenderProgress.cpp:
2442         (WebCore::RenderProgress::RenderProgress):
2443         (WebCore::RenderProgress::animationProgress const):
2444         (WebCore::RenderProgress::updateAnimationState):
2445         * rendering/RenderProgress.h:
2446         * rendering/RenderTheme.cpp:
2447         (WebCore::RenderTheme::animationDurationForProgressBar const):
2448         * rendering/RenderTheme.h:
2449         * rendering/RenderThemeGtk.cpp:
2450         (WebCore::RenderThemeGtk::animationDurationForProgressBar const):
2451         * rendering/RenderThemeGtk.h:
2452         * rendering/RenderThemeIOS.h:
2453         * rendering/RenderThemeIOS.mm:
2454         (WebCore::RenderThemeIOS::animationDurationForProgressBar const):
2455         * rendering/RenderThemeMac.h:
2456         * rendering/RenderThemeMac.mm:
2457         (WebCore::RenderThemeMac::animationDurationForProgressBar const):
2458         * svg/animation/SMILTimeContainer.cpp:
2459         (WebCore::SMILTimeContainer::SMILTimeContainer):
2460         (WebCore::SMILTimeContainer::elapsed const):
2461         (WebCore::SMILTimeContainer::isActive const):
2462         (WebCore::SMILTimeContainer::isPaused const):
2463         (WebCore::SMILTimeContainer::isStarted const):
2464         (WebCore::SMILTimeContainer::begin):
2465         (WebCore::SMILTimeContainer::pause):
2466         (WebCore::SMILTimeContainer::resume):
2467         (WebCore::SMILTimeContainer::setElapsed):
2468         (WebCore::SMILTimeContainer::timerFired):
2469         * svg/animation/SMILTimeContainer.h:
2470         * testing/Internals.cpp:
2471         (WebCore::Internals::delayMediaStreamTrackSamples):
2472         * testing/MockGamepad.cpp:
2473         (WebCore::MockGamepad::MockGamepad):
2474         (WebCore::MockGamepad::updateDetails):
2475         (WebCore::MockGamepad::setAxisValue):
2476         (WebCore::MockGamepad::setButtonValue):
2477
2478 2018-03-02  Alejandro G. Castro  <alex@igalia.com>
2479
2480         Make LibWebRTCProvider port agnostic again after r215424
2481         https://bugs.webkit.org/show_bug.cgi?id=183080
2482
2483         Reviewed by Youenn Fablet.
2484
2485         In the r215424 commit the webRTCAvailable function started to use a function from the DARWIN platform,
2486         we have moved that code to the cocoa class and created a glib implementation that will be used in the future
2487         to implement the LibWebRTCProviderGlib class.
2488
2489         No new tests, this is a refactor.
2490
2491         * Sources.txt: Add the compilation of the new file.
2492         * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: Remove the webRTCAvailable function from this file.
2493         (WebCore::LibWebRTCProvider::create): We want to use this even when LIBWEBRTC is not used.
2494         * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:
2495         (WebCore::LibWebRTCProvider::webRTCAvailable): Moved the code from the LibWebRTCProvider class.
2496         * platform/mediastream/libwebrtc/LibWebRTCProviderGlib.cpp:
2497         (WebCore::LibWebRTCProvider::webRTCAvailable): Add the glib implementation, basically true, we are always
2498         linking libwebrtc for the moment in these situations.
2499
2500 2018-03-01  Carlos Garcia Campos  <cgarcia@igalia.com>
2501
2502         REGRESSION(r222843): [HarfBuzz] Combining enclosed keycap not correctly handled
2503         https://bugs.webkit.org/show_bug.cgi?id=183246
2504
2505         Reviewed by Michael Catanzaro.
2506
2507         We are not correctly handling the combining enclosed keycap since we switched to use
2508         ComplexTextController. This is because fontForCombiningCharacterSequence() always returns the font of the first
2509         character, without checking if that font can render the whole sequence or not. Before 222843, the shaper did
2510         that check when creating the text runs. In this case the sequence was split and a different font was used for the
2511         text and the mark. This patch makes fontForCombiningCharacterSequence() try to find a suitable font for the
2512         whole sequence, first looking at the CSS fallbacks and finally at system ones. The result is much better than
2513         the old one, because we use the same font for both the text and the mark. If there isn't any font to render the
2514         mark, then we fallback to use the first character font, since we will end up rendering the missing glyph
2515         character, it's better to use the same font than the first character one.
2516
2517         Test: fast/text/combining-enclosing-keycap.html
2518
2519         * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
2520         (WebCore::FontCascade::fontForCombiningCharacterSequence const): Check if the first charatcer font can render
2521         the whole sequence, trying with fallbacks otherwise.
2522         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
2523         (WebCore::Font::canRenderCombiningCharacterSequence const): Check if the font face has glyphs for the whole
2524         sequence not just the first character.
2525
2526 2018-03-01  Carlos Garcia Campos  <cgarcia@igalia.com>
2527
2528         [FreeType] Remove FontPlatformData fallbacks
2529         https://bugs.webkit.org/show_bug.cgi?id=183210
2530
2531         Reviewed by Michael Catanzaro.
2532
2533         They are only used by FontCache::systemFallbackForCharacters() where a direct FcFontMatch provides the same
2534         or better results.
2535
2536         * platform/graphics/FontPlatformData.h: Remove fallbacks.
2537         * platform/graphics/freetype/FontCacheFreeType.cpp:
2538         (WebCore::FontCache::systemFallbackForCharacters): Use FcFontMatch() only.
2539         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
2540         (WebCore::FontPlatformData::fallbacks): Removed.
2541
2542 2018-03-01  Commit Queue  <commit-queue@webkit.org>
2543
2544         Unreviewed, rolling out r229153.
2545         https://bugs.webkit.org/show_bug.cgi?id=183274
2546
2547         it is breaking imported/w3c/web-platform-tests/service-workers
2548         /service-worker/clients-matchall-exact-controller.https.html
2549         (Requested by youenn on #webkit).
2550
2551         Reverted changeset:
2552
2553         "Clients should register to StorageProcess with their service
2554         worker registration identifier"
2555         https://bugs.webkit.org/show_bug.cgi?id=182313
2556         https://trac.webkit.org/changeset/229153
2557
2558 2018-03-01  Youenn Fablet  <youenn@apple.com>
2559
2560         Clients should register to StorageProcess with their service worker registration identifier
2561         https://bugs.webkit.org/show_bug.cgi?id=182313
2562
2563         Reviewed by Chris Dumez.
2564
2565         No observable change of behavior in regular conditions.
2566         When service worker process crashes, the service worker identifiers sent by the WebProcess might be wrong
2567         and we will not be able to retrieve the registration from these identifiers.
2568         The storage process will be able to still process correctly messages coming from the WebProcess to register clients of the registration.
2569         Otherwise, there is a chance that WebProcess clients will not be added to the SWServerRegistration.m_clientsUsingRegistration maps.
2570
2571         * dom/Document.cpp:
2572         (WebCore::Document::setServiceWorkerConnection):
2573         * workers/service/SWClientConnection.h:
2574         * workers/service/server/SWServer.cpp:
2575         (WebCore::SWServer::registerServiceWorkerClient):
2576         * workers/service/server/SWServer.h:
2577
2578 2018-03-01  Youenn Fablet  <youenn@apple.com>
2579
2580         Add API test to validate setting of service worker and cache storage directories
2581         https://bugs.webkit.org/show_bug.cgi?id=182543
2582
2583         Reviewed by Chris Dumez.
2584
2585         Covered by API tests.
2586
2587         Add getters to service worker registration directory.
2588
2589         * testing/Internals.cpp:
2590         (WebCore::Internals::serviceWorkerRegistrationDirectory):
2591         * testing/Internals.h:
2592         * testing/Internals.idl:
2593         * workers/service/SWClientConnection.h:
2594         * workers/service/server/RegistrationDatabase.h:
2595         (WebCore::RegistrationDatabase::serviceWorkerRegistrationDirectory const):
2596         * workers/service/server/RegistrationStore.h:
2597         (WebCore::RegistrationStore::serviceWorkerRegistrationDirectory const):
2598         * workers/service/server/SWServer.h:
2599         (WebCore::SWServer::serviceWorkerRegistrationDirectory const):
2600
2601 2018-03-01  Youenn Fablet  <youenn@apple.com>
2602
2603         SWServer::removeClientServiceWorkerRegistration should not log an error if there is no registration
2604         https://bugs.webkit.org/show_bug.cgi?id=183248
2605
2606         Reviewed by Chris Dumez.
2607
2608         No change of behavior.
2609         Removed the error logging.
2610         As can be seen from running api and layout tests, a web process can ask a registration to be unregistered
2611         and by the time it goes to the StorageProcess, the registration is already cleared.
2612
2613         * workers/service/server/SWServer.cpp:
2614         (WebCore::SWServer::removeClientServiceWorkerRegistration):
2615
2616 2018-03-01  Daniel Bates  <dabates@apple.com>
2617
2618         CSS ::selection stroke-color and stroke-width are not applied to selected text in text fields
2619         and ::selection:window-inactive stroke-color and stroke-width are never applied
2620         https://bugs.webkit.org/show_bug.cgi?id=183178
2621
2622         Reviewed by David Hyatt.
2623
2624         This change fixes the following two issues:
2625             1. Properties stroke-color and stroke-width are not applied to the ::selection pseudo-
2626                element of text fields.
2627             2. Properties stroke-color and stroke-width are never applied to ::selection:window-inactive
2628                pseudo elements.
2629
2630         Currently when computing the paint styles for selected text we query the cached styles for
2631         the ::selection pseudo element on the renderer. Text fields are implemented using a User Agent
2632         shadow DOM. With regards to issue (1) the renderer queried was the inner most renderer for
2633         the text in the text field. But it should have been the shadow host renderer (i.e. the renderer
2634         for the <input>). With regards to issue (2) we cannot retrieve cached styles for the
2635         ::selection pseudo element because it can be effected by a pseudo class, :window-inactive,
2636         which matches when the page is deactivated (i.e. the window is in the background as the user
2637         made another window the frontmost window). Both of these issues are fixed by making use
2638         of RenderElement::selectionPseudoStyle().
2639
2640         Tests: fast/selectors/selection-window-inactive-stroke-color.html
2641                fast/selectors/selection-window-inactive-text-shadow.html
2642                fast/selectors/text-field-selection-stroke-color.html
2643                fast/selectors/text-field-selection-text-shadow.html
2644                fast/selectors/text-field-selection-window-inactive-stroke-color.html
2645                fast/selectors/text-field-selection-window-inactive-text-shadow.html
2646
2647         * rendering/RenderText.h:
2648         (WebCore::RenderText::selectionPseudoStyle const): Add a convenience function that turns
2649         around and calls the function of the same name on its parent.
2650         * rendering/TextPaintStyle.cpp:
2651         (WebCore::computeTextSelectionPaintStyle): Modified to use RenderText::selectionPseudoStyle()
2652         instead of directly querying for the cached styles for the ::selection pseudo element.
2653
2654 2018-03-01  Per Arne Vollan  <pvollan@apple.com>
2655
2656         Scrollbar preferences are ignored when the WebContent process doesn't have access to the WindowServer.
2657         https://bugs.webkit.org/show_bug.cgi?id=183231
2658         <rdar://problem/37793457>
2659
2660         Reviewed by Brent Fulgham.
2661
2662         When the WebContent process doesn't have access to the WindowServer, the scrollbars are always of the overlay type.
2663         The notification about scrollbar preferences is never received by the WebContent process when there is no
2664         WindowServer access. This can be fixed by adding an observer of scrollbar preferences in the UI process, and
2665         notifying the WebProcess about this by sending it a message. This message should also contain the preferred
2666         scrollbar type, since the call '[NSScroller preferredScrollerStyle]' will always return the overlay style when
2667         there is no WindowServer access.
2668
2669         No new tests, covered by existing tests.
2670
2671         * WebCore.xcodeproj/project.pbxproj:
2672         * platform/mac/NSScrollerImpDetails.h:
2673         * platform/mac/NSScrollerImpDetails.mm:
2674         (WebCore::ScrollerStyle::recommendedScrollerStyle):
2675         (WebCore::ScrollerStyle::setUseOverlayScrollbars):
2676         (WebCore::recommendedScrollerStyle): Deleted.
2677         * platform/mac/ScrollAnimatorMac.mm:
2678         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
2679         (WebCore::ScrollAnimatorMac::mouseEnteredScrollbar const):
2680         (WebCore::ScrollAnimatorMac::mouseExitedScrollbar const):
2681         (WebCore::ScrollAnimatorMac::shouldScrollbarParticipateInHitTesting):
2682         * platform/mac/ScrollbarThemeMac.mm:
2683         (WebCore::ScrollbarThemeMac::registerScrollbar):
2684         (WebCore::ScrollbarThemeMac::scrollbarThickness):
2685         (WebCore::ScrollbarThemeMac::usesOverlayScrollbarsChanged):
2686
2687 2018-03-01  Myles C. Maxfield  <mmaxfield@apple.com>
2688
2689         Temporarily enable user-installed-fonts everywhere until we can stop crashing on launch
2690         https://bugs.webkit.org/show_bug.cgi?id=183255
2691
2692         Unreviewed.
2693
2694         Tests are already disabled.
2695
2696         * platform/graphics/cocoa/FontCacheCoreText.cpp:
2697
2698 2018-03-01  Basuke Suzuki  <Basuke.Suzuki@sony.com>
2699
2700         [Curl] Split DNS cache expiration and connection timeout setting.
2701         https://bugs.webkit.org/show_bug.cgi?id=182979
2702
2703         It was mis-implemented and was named ambiguous name 'enableTimeout'.
2704         Implement each feature correctly.
2705
2706         Reviewed by Per Arne Vollan.
2707
2708         * platform/network/curl/CurlContext.cpp:
2709         (WebCore::EnvironmentVariableReader::read):
2710         (WebCore::EnvironmentVariableReader::defined):
2711         (WebCore::EnvironmentVariableReader::readAs):
2712         (WebCore::EnvironmentVariableReader::sscanTemplate):
2713         (WebCore::EnvironmentVariableReader::sscanTemplate<unsigned>):
2714         (WebCore::CurlContext::CurlContext):
2715         (WebCore::safeTimeValue):
2716         (WebCore::CurlHandle::setDnsCacheTimeout):
2717         (WebCore::CurlHandle::setConnectTimeout):
2718         (WebCore::CurlHandle::setTimeout):
2719         (WebCore::CurlHandle::enableTimeout): Deleted.
2720         * platform/network/curl/CurlContext.h:
2721         (WebCore::CurlContext::dnsCacheTimeout const):
2722         (WebCore::CurlContext::connectTimeout const):
2723         * platform/network/curl/CurlRequest.cpp:
2724         (WebCore::CurlRequest::setupTransfer):
2725
2726 2018-03-01  Zalan Bujtas  <zalan@apple.com>
2727
2728         Remove RenderElement::s_noLongerAffectsParentBlock
2729         https://bugs.webkit.org/show_bug.cgi?id=183196
2730         <rdar://problem/38030797>
2731
2732         Reviewed by Antti Koivisto.
2733
2734         Remove the hack to track floating/out-of-flow changes between styleWillChange and styleDidChange.
2735
2736         Covered by existing tests.
2737
2738         * rendering/RenderBlockFlow.cpp:
2739         (WebCore::RenderBlockFlow::styleDidChange):
2740         * rendering/RenderElement.cpp:
2741         (WebCore::RenderElement::styleWillChange):
2742         (WebCore::RenderElement::noLongerAffectsParentBlock const):
2743         (WebCore::RenderElement::styleDidChange):
2744         * rendering/RenderElement.h:
2745         (WebCore::RenderElement::noLongerAffectsParentBlock const): Deleted.
2746
2747 2018-03-01  Chris Dumez  <cdumez@apple.com>
2748
2749         imported/w3c/web-platform-tests/html/browsers/windows/browsing-context.html fails with async policy delegates
2750         https://bugs.webkit.org/show_bug.cgi?id=183225
2751         <rdar://problem/38003828>
2752
2753         Reviewed by Alex Christensen.
2754
2755         Bypass navigation policy check when loading about:blank. This does not seem necessary and it would not
2756         be Web-compatible for such policy check to happen synchronously. This is because an iframe without src
2757         or src="about:blank" should load synchronously as per HTML specification.
2758
2759         Test: http/wpt/html/browsers/windows/browsing-context.html
2760
2761         * loader/PolicyChecker.cpp:
2762         (WebCore::PolicyChecker::checkNavigationPolicy):
2763
2764 2018-03-01  Christopher Reid  <chris.reid@sony.com>
2765
2766         [Curl] Linker errors in some curl files due to missing exports
2767         https://bugs.webkit.org/show_bug.cgi?id=183238
2768
2769         Reviewed by Alex Christensen.
2770
2771         No new tests, no change in behavior.
2772
2773         Adding WEBCORE_EXPORT to functions now used in WebKit.
2774
2775         * platform/network/NetworkStorageSession.h:
2776         * platform/network/curl/CookieJarDB.h:
2777         * platform/network/curl/CurlContext.h:
2778
2779 2018-03-01  Commit Queue  <commit-queue@webkit.org>
2780
2781         Unreviewed, rolling out r229130.
2782         https://bugs.webkit.org/show_bug.cgi?id=183244
2783
2784         It breaks AppleWin compilation (Requested by alexg__ on
2785         #webkit).
2786
2787         Reverted changeset:
2788
2789         "Make LibWebRTCProvider port agnostic again after r215424"
2790         https://bugs.webkit.org/show_bug.cgi?id=183080
2791         https://trac.webkit.org/changeset/229130
2792
2793 2018-03-01  Alejandro G. Castro  <alex@igalia.com>
2794
2795         Make LibWebRTCProvider port agnostic again after r215424
2796         https://bugs.webkit.org/show_bug.cgi?id=183080
2797
2798         Reviewed by Youenn Fablet.
2799
2800         In the r215424 commit the webRTCAvailable function started to use a function from the DARWIN platform,
2801         we have moved that code to the cocoa class and created a glib implementation that will be used in the future
2802         to implement the LibWebRTCProviderGlib class.
2803
2804         No new tests, this is a refactor.
2805
2806         * Sources.txt: Add the compilation of the new file.
2807         * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: Remove the webRTCAvailable function from this file.
2808         (WebCore::LibWebRTCProvider::create): We want to use this even when LIBWEBRTC is not used.
2809         * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp:
2810         (WebCore::LibWebRTCProvider::webRTCAvailable): Moved the code from the LibWebRTCProvider class.
2811         * platform/mediastream/libwebrtc/LibWebRTCProviderGlib.cpp:
2812         (WebCore::LibWebRTCProvider::webRTCAvailable): Add the glib implementation, basically true, we are always
2813         linking libwebrtc for the moment in these situations.
2814
2815 2018-03-01  Carlos Garcia Campos  <cgarcia@igalia.com>
2816
2817         [FreeType] Color emojis in WebKitGTK+ for great justice
2818         https://bugs.webkit.org/show_bug.cgi?id=183155
2819
2820         Reviewed by Michael Catanzaro.
2821
2822         Emojis are actually rendered if there's an emoji font installed in the system, but the size is so tiny that we
2823         don't see them. This is because for some reason the matrix we are getting from fontconfig contains a scale,
2824         which we don't expect. We only get the fontconfig matrix to apply rotations in case of oblique fonts, and then we
2825         always apply the scale for the computed pixel font size. Ignoring the fontconfig matrix scale fixes the issue.
2826
2827         * platform/graphics/freetype/FontCacheFreeType.cpp:
2828         (WebCore::fontWeightToFontconfigWeight): Moved here since it's now used by configurePatternForFontDescription().
2829         (WebCore::configurePatternForFontDescription): Helper function to apply the same options for fallback pattern.
2830         (WebCore::createFontConfigPatternForCharacters): Use configurePatternForFontDescription().
2831         (WebCore::findBestFontGivenFallbacks): Adopt the returned reference.
2832         (WebCore::FontCache::systemFallbackForCharacters): Clean it up.
2833         (WebCore::FontCache::createFontPlatformData): Use configurePatternForFontDescription().
2834         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
2835         (WebCore::FontPlatformData::buildScaledFont): Ignore the scale returned by fontconfig matrix.
2836
2837 2018-02-28  Philippe Normand  <pnormand@igalia.com>
2838
2839         [GStreamer] text samples no longer processed
2840         https://bugs.webkit.org/show_bug.cgi?id=183212
2841
2842         Reviewed by Xabier Rodriguez-Calvar.
2843
2844         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2845         (WebCore::MediaPlayerPrivateGStreamer::newTextSample): Refer to
2846         track stream ID instead of (potentially) manually generated track
2847         ID stored as hashmap keys.
2848
2849 2018-02-28  Tim Horton  <timothy_horton@apple.com>
2850
2851         Push WTF_PLATFORM_IOS down into preprocessor.pm instead of trying to determine it inside
2852         https://bugs.webkit.org/show_bug.cgi?id=183193
2853
2854         Reviewed by Andy Estes.
2855
2856         * DerivedSources.make:
2857         * bindings/scripts/preprocessor.pm:
2858         (applyPreprocessor):
2859         Instead of trying to discern WTF_PLATFORM_IOS inside preprocessor.pm,
2860         push it down from DerivedSources.make. Also clean up DerivedSources.make
2861         a tiny bit by adding a variable, FEATURE_AND_PLATFORM_DEFINES, which
2862         contains both FEATURE_DEFINES and WTF_PLATFORM macros if needed.
2863
2864 2018-02-28  Nan Wang  <n_wang@apple.com>
2865
2866         AX: AOM: Dispatch accessiblesetvalue event
2867         https://bugs.webkit.org/show_bug.cgi?id=183021
2868         <rdar://problem/37764242>
2869
2870         Reviewed by Chris Fleizach.
2871
2872         Accessibility events.
2873         Spec: https://wicg.github.io/aom/spec/phase2.html
2874
2875         Added a new event type AccessibleSetValueEvent. 
2876
2877         Test: accessibility/mac/AOM-event-accessiblesetvalue.html
2878
2879         * CMakeLists.txt:
2880         * DerivedSources.make:
2881         * Sources.txt:
2882         * WebCore.xcodeproj/project.pbxproj:
2883         * accessibility/AccessibilityAllInOne.cpp:
2884         * accessibility/AccessibilityNodeObject.cpp:
2885         (WebCore::AccessibilityNodeObject::canSetValueAttribute const):
2886         * accessibility/AccessibilityObject.cpp:
2887         (WebCore::AccessibilityObject::press):
2888         (WebCore::AccessibilityObject::dispatchAccessibilityEvent):
2889         (WebCore::AccessibilityObject::dispatchAccessibleSetValueEvent):
2890         * accessibility/AccessibilityObject.h:
2891         * accessibility/AccessibilityRenderObject.cpp:
2892         (WebCore::AccessibilityRenderObject::setValue):
2893         * accessibility/AccessibilityScrollbar.cpp:
2894         (WebCore::AccessibilityScrollbar::setValue):
2895         * accessibility/AccessibilitySlider.cpp:
2896         (WebCore::AccessibilitySlider::setValue):
2897         * accessibility/AccessibleSetValueEvent.cpp: Added.
2898         (WebCore::AccessibleSetValueEvent::AccessibleSetValueEvent):
2899         * accessibility/AccessibleSetValueEvent.h: Added.
2900         (WebCore::AccessibleSetValueEvent::create):
2901         (WebCore::AccessibleSetValueEvent::value const):
2902         * accessibility/AccessibleSetValueEvent.idl: Added.
2903         * dom/Element.idl:
2904         * dom/EventNames.h:
2905         * dom/EventNames.in:
2906
2907 2018-02-28  Chris Dumez  <cdumez@apple.com>
2908
2909         html/browsers/browsing-the-web/navigating-across-documents/006.html fails with async policy delegates
2910         https://bugs.webkit.org/show_bug.cgi?id=183168
2911         <rdar://problem/37951341>
2912
2913         Reviewed by Alex Christensen.
2914
2915         The test has an anchor element with both a 'click' event handler which submits a form
2916         and an href attribute. When clicking the link, as per specification, things happen in
2917         this order:
2918         1. We fire the click event at the anchor, which will execute the event handler and submit the form.
2919            Submitting the form *schedules* a navigation to 'click.html'.
2920         2. We execute the anchor activation code which *navigates* to 'href.html'. The navigation to
2921            'href' is supposed to cancel the pending navigation to 'click.html' and we should navigate
2922            to 'href.html', which is what the test asserts.
2923
2924         The issue for us is that we do not cancel pending navigations until after the navigation
2925         policy decision is made, when the provisional loads actually starts, in FrameLoader::provisionalLoadStarted().
2926         Because the policy decision for the navigation can now be made asynchronously, the NavigationScheduler
2927         timer can now fire while the decision is made and we'll submit the form, thus navigating to
2928         'click.html'.
2929
2930         To address the issue, we now cancel any pending navigations in FrameLoader::loadWithDocumentLoader(),
2931         *before* doing the policy check for the navigation.
2932
2933         Test: http/wpt/html/browsers/browsing-the-web/navigating-across-documents/006.html
2934
2935         * loader/FrameLoader.cpp:
2936         (WebCore::FrameLoader::loadWithDocumentLoader):
2937
2938 2018-02-28  John Wilander  <wilander@apple.com>
2939
2940         Add a second tier of prevalence to facilitate telemetry on very prevalent domains
2941         https://bugs.webkit.org/show_bug.cgi?id=183218
2942         <rdar://problem/37992388>
2943
2944         Reviewed by Brent Fulgham.
2945
2946         Test: http/tests/resourceLoadStatistics/classify-as-very-prevalent-based-on-mixed-statistics.html
2947
2948         * loader/ResourceLoadStatistics.cpp:
2949         (WebCore::ResourceLoadStatistics::encode const):
2950         (WebCore::ResourceLoadStatistics::decode):
2951         (WebCore::ResourceLoadStatistics::toString const):
2952         (WebCore::ResourceLoadStatistics::merge):
2953             Handling of the new boolean field isVeryPrevalentResource.
2954         * loader/ResourceLoadStatistics.h:
2955             Added the new boolean field isVeryPrevalentResource.
2956
2957 2018-02-28  Alex Christensen  <achristensen@webkit.org>
2958
2959         Reduce use of NetworkingContext in WebKit
2960         https://bugs.webkit.org/show_bug.cgi?id=183213
2961
2962         Reviewed by Brady Eidson.
2963
2964         NetworkingContext is intended to be used only with ResourceHandle, which is now only used in WebKitLegacy.
2965         Now that we don't use ResourceHandle in the WebProcess, everything that was done through the NetworkingContext
2966         can now be done a cleaner way with no change in behavior.
2967
2968         * loader/FrameLoader.cpp:
2969         (WebCore::FrameLoader::loadResourceSynchronously):
2970         * loader/LinkLoader.cpp:
2971         (WebCore::LinkLoader::loadLink):
2972         * loader/LoaderStrategy.h:
2973         * platform/network/ProxyServer.h:
2974         * platform/network/cf/ProxyServerCFNet.cpp:
2975         (WebCore::proxyServersForURL):
2976         * platform/network/curl/ProxyServerCurl.cpp:
2977         (WebCore::proxyServersForURL):
2978         * platform/network/soup/ProxyServerSoup.cpp:
2979         (WebCore::proxyServersForURL):
2980
2981 2018-02-28  Zalan Bujtas  <zalan@apple.com>
2982
2983         Remove RenderElement::s_affectsParentBlock
2984         https://bugs.webkit.org/show_bug.cgi?id=183187
2985         <rdar://problem/37961079>
2986
2987         Reviewed by Antti Koivisto.
2988
2989         Remove the hack to track floating/out-of-flow changes between styleWillChange and styleDidChange.
2990
2991         Covered by existing tests.
2992
2993         * rendering/RenderElement.cpp:
2994         (WebCore::RenderElement::styleWillChange):
2995         (WebCore::RenderElement::styleDidChange):
2996         * rendering/RenderElement.h:
2997
2998 2018-02-28  Antti Koivisto  <antti@apple.com>
2999
3000         Filter attribute selectors with selector filter
3001         https://bugs.webkit.org/show_bug.cgi?id=183200
3002
3003         Reviewed by Zalan Bujtas.
3004
3005         Currently selector filtering is done based on tags, classes and ids. We should include attributes too.
3006
3007         This patch adds filtering based on attribute name (but not content).
3008
3009         * css/SelectorFilter.cpp:
3010         (WebCore::isExcludedAttribute):
3011
3012             Ignore id, class and style attributes. First two are already handled and the last is common but is rarely
3013             used in selectors.
3014
3015         (WebCore::collectElementIdentifierHashes):
3016
3017             Collect attributes.
3018             Remove the unnecessary StyledElement casting.
3019
3020         (WebCore::collectSimpleSelectorHash):
3021
3022             Collect attribute selectors.
3023
3024         (WebCore::chooseSelectorHashesForFilter):
3025
3026             Pick attributes with high priority for the filter as it is likely a good signal.
3027
3028 2018-02-27  Sergio Villar Senin  <svillar@igalia.com>
3029
3030         [WebVR] Convert VRPlatformDisplayInfo into a class
3031         https://bugs.webkit.org/show_bug.cgi?id=183162
3032
3033         Reviewed by Žan Doberšek.
3034
3035         In preparation for further changes we're transforming the
3036         VRPlatformDisplayInfo into a class. All the members are now private
3037         and the class provides the needed getters/setters.
3038
3039         Apart from that VRDisplayCapabilityFlags is now just an unsigned and
3040         the different flags are defined in VRDisplayCapabilityFlag enum.
3041         Another cleanup was the removal of VRDisplayCapabilities.cpp as
3042         everything can be implemented in the header.
3043
3044         * Modules/webvr/VRDisplay.cpp:
3045         (WebCore::VRDisplay::VRDisplay):
3046         (WebCore::VRDisplay::isConnected const):
3047         (WebCore::VRDisplay::stageParameters const):
3048         * Modules/webvr/VRDisplayCapabilities.cpp: Removed.
3049         * Modules/webvr/VRDisplayCapabilities.h:
3050         (WebCore::VRDisplayCapabilities::hasPosition const):
3051         (WebCore::VRDisplayCapabilities::hasOrientation const):
3052         (WebCore::VRDisplayCapabilities::hasExternalDisplay const):
3053         (WebCore::VRDisplayCapabilities::canPresent const):
3054         (WebCore::VRDisplayCapabilities::maxLayer const):
3055         (WebCore::VRDisplayCapabilities::VRDisplayCapabilities):
3056         * Sources.txt:
3057         * platform/vr/VRPlatformDisplay.h:
3058         (WebCore::VRPlatformDisplayInfo::displayName const):
3059         (WebCore::VRPlatformDisplayInfo::setDisplayName):
3060         (WebCore::VRPlatformDisplayInfo::isConnected const):
3061         (WebCore::VRPlatformDisplayInfo::setIsConnected):
3062         (WebCore::VRPlatformDisplayInfo::isMounted const):
3063         (WebCore::VRPlatformDisplayInfo::setIsMounted):
3064         (WebCore::VRPlatformDisplayInfo::capabilityFlags const):
3065         (WebCore::VRPlatformDisplayInfo::setCapabilityFlags):
3066         (WebCore::VRPlatformDisplayInfo::displayIdentifier const):
3067         (WebCore::VRPlatformDisplayInfo::setDisplayIdentifier):
3068         (WebCore::VRPlatformDisplayInfo::eyeTranslation const):
3069         (WebCore::VRPlatformDisplayInfo::setEyeTranslation):
3070         (WebCore::VRPlatformDisplayInfo::eyeFieldOfView const):
3071         (WebCore::VRPlatformDisplayInfo::setEyeFieldOfView):
3072         (WebCore::VRPlatformDisplayInfo::renderSize const):
3073         (WebCore::VRPlatformDisplayInfo::setRenderSize):
3074         (WebCore::VRPlatformDisplayInfo::setPlayAreaBounds):
3075         (WebCore::VRPlatformDisplayInfo::playAreaBounds const):
3076         (WebCore::VRPlatformDisplayInfo::setSittingToStandingTransform):
3077         (WebCore::VRPlatformDisplayInfo::sittingToStandingTransform const):
3078         * platform/vr/openvr/VRPlatformDisplayOpenVR.cpp:
3079         (WebCore::VRPlatformDisplayOpenVR::VRPlatformDisplayOpenVR):
3080         (WebCore::VRPlatformDisplayOpenVR::updateEyeParameters):
3081         (WebCore::VRPlatformDisplayOpenVR::updateStageParameters):
3082
3083 2018-02-27  Commit Queue  <commit-queue@webkit.org>
3084
3085         Unreviewed, rolling out r229060.
3086         https://bugs.webkit.org/show_bug.cgi?id=183198
3087
3088         This patch causes crashes on two SVG tests (Requested by fredw
3089         on #webkit).
3090
3091         Reverted changeset:
3092
3093         "Relayout frames after AsyncFrameScrolling or FrameFlattening
3094         option is changed"
3095         https://bugs.webkit.org/show_bug.cgi?id=183081
3096         https://trac.webkit.org/changeset/229060
3097
3098 2018-02-27  Youenn Fablet  <youenn@apple.com>
3099
3100         Do not trigger a service worker match in case of document redirection if it will be already served by AppCache
3101         https://bugs.webkit.org/show_bug.cgi?id=183185
3102         <rdar://problem/37693796>
3103
3104         Reviewed by Chris Dumez.
3105
3106         Disabling service worker matching in case there is a substitute data.
3107         Otherwise there is a risk for a double load, substitute data first and the new load
3108         triggered if matching a new registration.
3109         A future fix should first do service worker registration matching and if there is no registration query appcache.
3110
3111         Test: http/tests/appcache/main-resource-redirect-with-sw.html
3112
3113         * loader/DocumentLoader.cpp:
3114         (WebCore::DocumentLoader::redirectReceived):
3115
3116 2018-02-27  Tim Horton  <timothy_horton@apple.com>
3117
3118         Ensure target triple is propagated correctly to DerivedSources.make
3119         https://bugs.webkit.org/show_bug.cgi?id=183189
3120         <rdar://problem/37959694>
3121
3122         Reviewed by Dan Bernstein.
3123
3124         If we don't propagate the target triple, we can sometimes build with
3125         the wrong options enabled.
3126
3127         * Configurations/Base.xcconfig:
3128         Mentioning LLVM_TARGET_TRIPLE_SUFFIX here is required to get it to be available to scripts.
3129
3130         * DerivedSources.make:
3131         Propagate the target triple into our compiler invocations.
3132
3133 2018-02-27  Doug Russell  <doug@getitdownonpaper.com>
3134
3135         AX: Spell check and style attributes should be optional when fetching attributed string
3136         https://bugs.webkit.org/show_bug.cgi?id=160744
3137
3138         Reviewed by Chris Fleizach.
3139
3140         The overhead of fetching a spell checked attributed string via AX API is substantial. 
3141         In some cases on the order of 7/8 of the total time spent fetching the string.
3142
3143         This change introduces the new attribute AXAttributedStringForTextMarkerRangeWithOptions which accepts an NSDictionary as it's parameter with keys "AXTextMarkerRange" (AXTextMarkerRangeRef) and "AXSpellCheck" (NSNumber(BOOL)).
3144
3145         AXAttributedStringForTextMarkerRange will remain unchanged.
3146
3147         Tests: accessibility/mac/attributed-string/attributed-string-for-range-with-options.html
3148                accessibility/mac/attributed-string/attributed-string-for-range.html
3149
3150         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3151         (AXAttributedStringAppendText):
3152         (-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:spellCheck:]):
3153         (-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
3154         (-[WebAccessibilityObjectWrapper doAXAttributedStringForRange:]):
3155         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
3156         (-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:]): Deleted.
3157
3158 2018-02-27  Daniel Bates  <dabates@apple.com>
3159
3160         Standardize terminology for marked text
3161         https://bugs.webkit.org/show_bug.cgi?id=180999
3162
3163         Reviewed by Zalan Bujtas.
3164
3165         The name MarkerSubrange is a misnomer for a data structure that associates a text subrange with a type
3166         and optional document marker. In particular, a MarkerSubrange may not always correspond to a document
3167         marker. For instance, selected text is represented using a MarkerSubrange that does not have a
3168         corresponding document marker. Let's standardize on the phrase "marked text" as the canonical way to
3169         describe these tagged text subranges.
3170
3171         * Sources.txt:
3172         * WebCore.xcodeproj/project.pbxproj:
3173         * rendering/InlineTextBox.cpp:
3174         (WebCore::InlineTextBox::localSelectionRect const):
3175         (WebCore::InlineTextBox::MarkedTextStyle::areBackgroundMarkedTextStylesEqual):
3176         (WebCore::InlineTextBox::MarkedTextStyle::areForegroundMarkedTextStylesEqual):
3177         (WebCore::InlineTextBox::MarkedTextStyle::areDecorationMarkedTextStylesEqual):
3178         (WebCore::InlineTextBox::StyledMarkedText::StyledMarkedText):
3179         (WebCore::createMarkedTextFromSelectionInBox):
3180         (WebCore::InlineTextBox::paint):
3181         (WebCore::InlineTextBox::paintPlatformDocumentMarkers):
3182         (WebCore::InlineTextBox::paintPlatformDocumentMarker):
3183         (WebCore::InlineTextBox::computeStyleForUnmarkedMarkedText const):
3184         (WebCore::InlineTextBox::resolveStyleForMarkedText):
3185         (WebCore::InlineTextBox::subdivideAndResolveStyle):
3186         (WebCore::InlineTextBox::coalesceAdjacentMarkedTexts):
3187         (WebCore::InlineTextBox::collectMarkedTextsForDraggedContent):
3188         (WebCore::InlineTextBox::collectMarkedTextsForDocumentMarkers):
3189         (WebCore::InlineTextBox::paintMarkedTexts):
3190         (WebCore::InlineTextBox::paintMarkedTextBackground):
3191         (WebCore::InlineTextBox::paintMarkedTextForeground):
3192         (WebCore::InlineTextBox::paintMarkedTextDecoration):
3193         (WebCore::InlineTextBox::paintCompositionBackground):
3194         (WebCore::InlineTextBox::MarkerSubrangeStyle::areBackgroundMarkerSubrangeStylesEqual): Deleted.
3195         (WebCore::InlineTextBox::MarkerSubrangeStyle::areForegroundMarkerSubrangeStylesEqual): Deleted.
3196         (WebCore::InlineTextBox::MarkerSubrangeStyle::areDecorationMarkerSubrangeStylesEqual): Deleted.
3197         (WebCore::InlineTextBox::StyledMarkerSubrange::StyledMarkerSubrange): Deleted.
3198         (WebCore::createMarkerSubrangeFromSelectionInBox): Deleted.
3199         (WebCore::InlineTextBox::computeStyleForUnmarkedMarkerSubrange const): Deleted.
3200         (WebCore::InlineTextBox::resolveStyleForSubrange): Deleted.
3201         (WebCore::InlineTextBox::coalesceAdjacentSubranges): Deleted.
3202         (WebCore::InlineTextBox::collectSubrangesForDraggedContent): Deleted.
3203         (WebCore::InlineTextBox::collectSubrangesForDocumentMarkers): Deleted.
3204         (WebCore::InlineTextBox::paintMarkerSubranges): Deleted.
3205         (WebCore::InlineTextBox::paintTextSubrangeBackground): Deleted.
3206         (WebCore::InlineTextBox::paintTextSubrangeForeground): Deleted.
3207         (WebCore::InlineTextBox::paintTextSubrangeDecoration): Deleted.
3208         * rendering/InlineTextBox.h:
3209         (WebCore::InlineTextBox::paintMarkedTexts):
3210         (WebCore::InlineTextBox::paintMarkerSubranges): Deleted.
3211         * rendering/MarkedText.cpp: Renamed from Source/WebCore/rendering/MarkerSubrange.cpp.
3212         (WebCore::subdivide):
3213         * rendering/MarkedText.h: Renamed from Source/WebCore/rendering/MarkerSubrange.h.
3214         (WebCore::MarkedText::MarkedText):
3215         (WebCore::MarkedText::isEmpty const):
3216         (WebCore::MarkedText::operator!= const):
3217         (WebCore::MarkedText::operator== const):
3218
3219 2018-02-27  Chris Dumez  <cdumez@apple.com>
3220
3221         Unreviewed, roll out r228430.
3222
3223         Roll out r228430 now that it is no longer needed after r228852.
3224
3225         No new tests, initial fix is still covered by WebKit.RespondToPolicyForNavigationResponseAsynchronously
3226         API test.
3227
3228         * loader/FrameLoader.cpp:
3229         (WebCore::FrameLoader::stopLoading):
3230         * loader/NavigationScheduler.cpp:
3231         (WebCore::NavigationScheduler::schedule):
3232
3233 2018-02-27  Antoine Quint  <graouts@apple.com>
3234
3235         [Web Animations] Correct implementation of pending tasks and promises
3236         https://bugs.webkit.org/show_bug.cgi?id=183161
3237
3238         Reviewed by Dean Jackson.
3239
3240         We had an incorrect implementation of the spec due to two misinterpretations.
3241
3242         The first one is about pending tasks (play and pause) which the spec says should
3243         be performed by "scheduling a task". In WebCore, this means using postTask() on a
3244         ScriptExecutionContext, such as Document. One of the big practical changes is that
3245         calling play() on an animation correctly sets its startTime to null (unresolved)
3246         immediately after the call to play() returns before setting it to a resolved value
3247         when the task is performed asynchronously. As a result, the playState is now always
3248         accurate.
3249
3250         The second one is about promises where new promises need to be created in certain
3251         situations called out by the spec. We used to call clear() on them, but this merely
3252         resets the fulfillment or rejection state of the promise, while the spec requires
3253         a different object to be returned for the promise. We now create our promises using
3254         makeUniqueRef<> when new promise objects are expected to be created.
3255
3256         This patch also corrects a few smaller bugs and spec compliant issues, called out
3257         below, related to pending tasks and promises uncovered while looking at relevant
3258         WPT tests.
3259
3260         * animation/DocumentTimeline.h: Expose the Document used to create this timeline such
3261         that it may be used by WebAnimation objects registered for this timeline when scheduling
3262         a task is required via postTask().
3263         * animation/WebAnimation.cpp:
3264         (WebCore::WebAnimation::WebAnimation):
3265         (WebCore::WebAnimation::setBindingsStartTime):
3266         (WebCore::WebAnimation::setCurrentTime):
3267         (WebCore::WebAnimation::cancel): Ensure the finished promise has not already been fulfilled
3268         before rejecting it. While the spec does not specifically call this out, a promise may not
3269         be rejected after being fulfilled, and we would hit an ASSERT if we didn't also check that
3270         it was in the correct pending state before attemping to reject it.
3271         (WebCore::WebAnimation::resetPendingTasks):
3272         (WebCore::WebAnimation::finish):
3273         (WebCore::WebAnimation::updateFinishedState):
3274         (WebCore::WebAnimation::finishNotificationSteps):
3275         (WebCore::WebAnimation::play): We used to only check for a pending pause task before canceling
3276         that task, but the spec says to check for either a pending pause or play task (ie. pending())
3277         and to cancel whichever is scheduled.
3278         (WebCore::WebAnimation::runPendingPlayTask): We were missing an assertion called out by the
3279         spec when running a pending task.
3280         (WebCore::WebAnimation::pause):
3281         (WebCore::WebAnimation::runPendingPauseTask):
3282         (WebCore::WebAnimation::updatePendingTasks): We now use postTask() on the animation's associated
3283         timeline's document to schedule pending tasks for which the criteria to run are met, ie. there
3284         is an associated timeline.
3285         * animation/WebAnimation.h:
3286
3287 2018-02-27  Wenson Hsieh  <wenson_hsieh@apple.com>
3288
3289         [Extra zoom mode] Implement additional SPI for adjusting viewport shrink-to-fit behavior
3290         https://bugs.webkit.org/show_bug.cgi?id=183100
3291         <rdar://problem/37840987>
3292
3293         Reviewed by Tim Horton.
3294
3295         Introduce new customization options to ViewportConfiguration. The first is m_forceHorizontalShrinkToFit, which
3296         (when set to true) forces the viewport to scale using shrink-to-fit heuristics, regardless of whether
3297         "shrink-to-fit=no" is specified via viewport parameters or if content width did not exceed minimum layout size.
3298         The second is m_viewSize, which reflects the true size of the viewport. See WebKit ChangeLog for more details.
3299
3300         Tests: ViewportSizingTests.ForceShrinkToFitViewportOverridesViewportParameters
3301                ViewportSizingTests.ShrinkToFitViewportWithMinimumAllowedLayoutWidth
3302
3303         * page/ViewportConfiguration.cpp:
3304         (WebCore::ViewportConfiguration::ViewportConfiguration):
3305         (WebCore::ViewportConfiguration::setMinimumLayoutSize):
3306
3307         Plumb the real size of the view alongside the minimum layout size when updating the minimum layout size.
3308
3309         (WebCore::ViewportConfiguration::setForceHorizontalShrinkToFit):
3310         (WebCore::ViewportConfiguration::shouldIgnoreHorizontalScalingConstraints const):
3311
3312         Bail early and return true if forceHorizontalShrinkToFit is set. This forces shrink-to-fit even in cases where
3313         "shrink-to-fit" is set to "no", or content dimensions don't exceed layout dimensions.
3314
3315         (WebCore::ViewportConfiguration::initialScaleFromSize const):
3316
3317         Use view dimensions rather than minimum layout dimensions when computing the initial scale. Minimum layout size
3318         is no longer always equal to the size of the view if the client has specified a minimum allowed layout width. As
3319         such, when computing the initial scale, to ensure that the content (which was laid out using the minimum layout
3320         size) fits within the real viewport, we need to divide real viewport dimensions by content dimensions.
3321
3322         (WebCore::ViewportConfiguration::minimumScale const):
3323
3324         Similarly, use view size instead of minimum layout size to compute minimum scale.
3325
3326         (WebCore::ViewportConfiguration::description const):
3327         * page/ViewportConfiguration.h:
3328
3329 2018-02-27  Wenson Hsieh  <wenson_hsieh@apple.com>
3330
3331         Unreviewed, fix the debug build after r228877.
3332
3333         In the case where CAN_DISALLOW_USER_INSTALLED_FONTS is enabled, this function doesn't return anything when
3334         allowUserInstalledFonts != AllowUserInstalledFonts::No. Fix the build by moving `return nullptr;` back out of
3335         the `#else`.
3336
3337         * platform/graphics/cocoa/FontCacheCoreText.cpp:
3338         (WebCore::installedFontMandatoryAttributes):
3339
3340 2018-02-27  Milan Crha  <mcrha@redhat.com>
3341
3342         Potential privacy issue: DNS prefetching can be re-enabled
3343         https://bugs.webkit.org/show_bug.cgi?id=182924
3344
3345         Reviewed by Michael Catanzaro.
3346
3347         * dom/Document.cpp:
3348         (WebCore::Document::parseDNSPrefetchControlHeader):
3349
3350 2018-02-26  Antoine Quint  <graouts@apple.com>
3351
3352         [Web Animations] Implement the procedure to set the target effect of an animation
3353         https://bugs.webkit.org/show_bug.cgi?id=183146
3354
3355         Reviewed by Dean Jackson.
3356
3357         We only had a partial implementation of setEffect() and we now update it to cover the entire
3358         implementation as mandated by the spec. While this doesn't yield any WPT results changes, this
3359         patch will help getting a significant number of new PASS results when we get around to implement
3360         correct support for async procedures (pending pause/play tasks and promises) in the next patch.
3361
3362         * animation/WebAnimation.cpp:
3363         (WebCore::WebAnimation::setEffect):
3364
3365 2018-02-26  Antoine Quint  <graouts@apple.com>
3366
3367         [Web Animations] Update the playState implementation
3368         https://bugs.webkit.org/show_bug.cgi?id=183145
3369
3370         Reviewed by Dean Jackson.
3371
3372         The Web Animations spec has changed since we first implemented the playState property and the "pending"
3373         enum value has been dropped since then (there is a separate "pending" property which we also implement).
3374         We update our implementation to match the latest spec text. This does not change WPT test results a lot,
3375         but this patch will help getting a significant number of new PASS results when we get around to implementing
3376         correct support for async procedures (pending pause/play tasks and promises) in a couple of patches.
3377   
3378         * animation/WebAnimation.cpp:
3379         (WebCore::WebAnimation::playState const):
3380         * animation/WebAnimation.h:
3381         * animation/WebAnimation.idl:
3382
3383 2018-02-27  Wenson Hsieh  <wenson_hsieh@apple.com>
3384
3385         Address post-review comment after r229049.
3386         https://bugs.webkit.org/show_bug.cgi?id=183142
3387
3388         Reviewed by Tim Horton.
3389
3390         Wrap a newly added string literal with ASCIILiteral.