2d058afa883064c90329e3b8b63e8b14ea9e6ba3
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2017-09-26  Zan Dobersek  <zdobersek@igalia.com>
2
3         [EME] Add ClearKey support for persistent session data load and removal
4         https://bugs.webkit.org/show_bug.cgi?id=177442
5
6         Reviewed by Xabier Rodriguez-Calvar.
7
8         Implement the session data load and removal for persistent sessions
9         in the ClearKey implementation of the CDMInstance interface.
10
11         CDMInstanceClearKey::loadSession() finds data for the specified session
12         name, if any, and constructs a corresponding KeyStatusVector object that
13         holds information about all known keys associated with this session before
14         dispatching the LoadSessionCallback asynchronously.
15
16         CDMInstanceClearKey::removeSessionData() similarly finds the session data,
17         if any, and then removes it from the state tracker. The key data is still
18         reused to construct the KeyStatusVector object that holds information
19         about all the keys that were stored for this session. The key information
20         is also embedded in the 'license release' JSON message. Both key status
21         vector and message are then used in the RemoveSessionDataCallback dispatch
22         that is again done asynchronously.
23
24         No new tests -- affected tests have their baselines updated.
25
26         * platform/encryptedmedia/clearkey/CDMClearKey.cpp:
27         (WebCore::CDMInstanceClearKey::loadSession):
28         (WebCore::CDMInstanceClearKey::removeSessionData):
29
30 2017-09-26  Ms2ger  <Ms2ger@igalia.com>
31
32         Update compressedTexImage3D to match the signature in the specification.
33         https://bugs.webkit.org/show_bug.cgi?id=177431
34
35         Reviewed by Sam Weinig.
36
37         No new tests: not much point in adding tests now; this method doesn't
38         do anything anyway.
39
40         * html/canvas/WebGL2RenderingContext.cpp:
41         (WebCore::WebGL2RenderingContext::compressedTexImage3D):
42         * html/canvas/WebGL2RenderingContext.h:
43         * html/canvas/WebGL2RenderingContext.idl:
44
45 2017-09-25  Timothy Horton  <timothy_horton@apple.com>
46
47         Fix the macOS WebCore CMake build
48
49         * PlatformMac.cmake:
50
51 2017-09-25  Alex Christensen  <achristensen@webkit.org>
52
53         Make PolicyAction an encodable enum class
54         https://bugs.webkit.org/show_bug.cgi?id=177480
55
56         Reviewed by Antti Koivisto.
57
58         * loader/DocumentLoader.cpp:
59         (WebCore::DocumentLoader::responseReceived):
60         (WebCore::DocumentLoader::continueAfterContentPolicy):
61         * loader/FrameLoaderTypes.h:
62         * loader/PolicyChecker.cpp:
63         (WebCore::PolicyChecker::checkNavigationPolicy):
64         (WebCore::PolicyChecker::checkNewWindowPolicy):
65
66 2017-09-25  Timothy Horton  <timothy_horton@apple.com>
67
68         Fix the macOS WebCore CMake build
69
70         * PlatformMac.cmake:
71
72 2017-09-25  Frederik Riedel  <riedel@apple.com>
73
74         Expose way to set values of classified form controls as {Legacy WebKit, WebKit} SPI
75         https://bugs.webkit.org/show_bug.cgi?id=174394
76         <rdar://problem/33183504>
77
78         Reviewed by Ryosuke Niwa.
79
80         * WebCore.xcodeproj/project.pbxproj:
81         * editing/ios/AutofillElements.cpp: Added.
82         (WebCore::isAutofillableElement): Returns true if the element is of type text or email.
83         (WebCore::nextAutofillableElement): Returns the next focusable element that is autofillable.
84         (WebCore::previousAutofillableElement): Returns the previous focusable element that is autofillable.
85         (WebCore::AutofillElements::computeAutofillElements): Computes the autofill elements (username & password)
86         for a given input element.
87         (WebCore::AutofillElements::autofill): Fills the credentials into the pair of username/password elements.
88         * editing/ios/AutofillElements.h: Added.
89
90 2017-09-25  Devin Rousso  <webkit@devinrousso.com>
91
92         Web Inspector: move Console.addInspectedNode to DOM.setInspectedNode
93         https://bugs.webkit.org/show_bug.cgi?id=176827
94
95         Reviewed by Joseph Pecoraro.
96
97         Tests: http/tests/inspector/dom/cross-domain-inspected-node-access.html
98                inspector/dom/setInspectedNode.html
99
100         * inspector/InspectorDOMAgent.h:
101         * inspector/InspectorDOMAgent.cpp:
102         (WebCore::InspectorDOMAgent::setInspectedNode):
103
104         * inspector/PageConsoleAgent.h:
105         * inspector/PageConsoleAgent.cpp:
106         (WebCore::PageConsoleAgent::addInspectedNode): Deleted.
107
108         * inspector/WorkerConsoleAgent.h:
109         * inspector/WorkerConsoleAgent.cpp:
110         (WebCore::WorkerConsoleAgent::addInspectedNode): Deleted.
111
112 2017-09-25  Sam Weinig  <sam@webkit.org>
113
114         [WebIDL] Factor out IsExceptionOr check from toJS/toJSNewlyCreated signature
115         https://bugs.webkit.org/show_bug.cgi?id=177457
116
117         Reviewed by Youenn Fablet.
118
119         Add new type, IsExceptionOr, that factors out the previously repeated logic of determining
120         if a type is an ExceptionOr template type.
121
122         * bindings/js/JSDOMConvertBase.h:
123         (WebCore::toJS):
124         (WebCore::toJSNewlyCreated):
125
126 2017-09-25  Basuke Suzuki  <Basuke.Suzuki@sony.com>
127
128         [Curl] Refactor and improve methods in the CurlHandle
129         https://bugs.webkit.org/show_bug.cgi?id=177373
130
131         Reviewed by Alex Christensen.
132
133         * platform/network/curl/CurlContext.cpp:
134         (WebCore::CurlShareHandle::~CurlShareHandle):
135         (WebCore::CurlMultiHandle::~CurlMultiHandle):
136         (WebCore::CurlHandle::~CurlHandle):
137         (WebCore::CurlHandle::initialize):
138         (WebCore::CurlHandle::pause):
139         (WebCore::CurlHandle::setUrl):
140         (WebCore::CurlHandle::appendRequestHeaders):
141         (WebCore::CurlHandle::appendRequestHeader):
142         (WebCore::CurlHandle::removeRequestHeader):
143         (WebCore::CurlHandle::enableRequestHeaders):
144         (WebCore::CurlHandle::getContentLength):
145         (WebCore::CurlHandle::getNetworkLoadMetrics):
146         (WebCore::CurlHandle::errorDescription const): Deleted.
147         (WebCore::CurlHandle::clearUrl): Deleted.
148         (WebCore::CurlHandle::getContentLenghtDownload): Deleted.
149         (WebCore::CurlHandle::getTimes): Deleted.
150         * platform/network/curl/CurlContext.h:
151         (WebCore::CurlHandle::privateData const): Deleted.
152         (WebCore::CurlHandle::setPrivateData): Deleted.
153         (WebCore::CurlHandle::url const): Deleted.
154         * platform/network/curl/CurlDownload.cpp:
155         (WebCore::CurlDownload::setupRequest):
156         * platform/network/curl/CurlSSLVerifier.cpp:
157         (WebCore::CurlSSLVerifier::certVerifyCallback):
158         * platform/network/curl/ResourceHandleCurlDelegate.cpp:
159         (WebCore::ResourceHandleCurlDelegate::setupRequest):
160         (WebCore::ResourceHandleCurlDelegate::setupPUT):
161         (WebCore::ResourceHandleCurlDelegate::getNetworkLoadMetrics):
162         (WebCore::ResourceHandleCurlDelegate::didReceiveHeader):
163
164 2017-09-25  Youenn Fablet  <youenn@apple.com>
165
166         WebRTC video does not resume receiving when switching back to Safari 11 on iOS
167         https://bugs.webkit.org/show_bug.cgi?id=175472
168         <rdar://problem/33860863>
169
170         Reviewed by Darin Adler.
171
172         Test: webrtc/video-interruption.html and manual testing.
173
174         Using new SetActive method from libwebrtc encoder/decoder to enable/disable them based on interuptions.
175         For that purpose, LibWebRTCProvider is now storing the peer connection factory and keeping track of the encoder/decoder factories.
176         LibWebRTCProvider is then notified by WebPage when backgrounded/foregrounded.
177
178         * WebCore.xcodeproj/project.pbxproj:
179         * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
180         (WebCore::staticFactoryAndThreads):
181         (WebCore::initializePeerConnectionFactoryAndThreads):
182         (WebCore::LibWebRTCProvider::factory):
183         (WebCore::LibWebRTCProvider::setPeerConnectionFactory):
184         (WebCore::LibWebRTCProvider::createPeerConnection):
185         (WebCore::LibWebRTCProvider::setActive):
186         (WebCore::LibWebRTCProvider::webRTCAvailable):
187         (WebCore::LibWebRTCProvider::mayResumePlayback): Deleted.
188         (WebCore::LibWebRTCProvider::suspendPlayback): Deleted.
189         * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
190         * platform/mediastream/libwebrtc/VideoToolBoxDecoderFactory.cpp: Copied from Source/WebCore/platform/mediastream/libwebrtc/VideoToolBoxEncoderFactory.cpp.
191         (WebCore::VideoToolboxVideoDecoderFactory::setActive):
192         (WebCore::VideoToolboxVideoDecoderFactory::CreateVideoDecoder):
193         (WebCore::VideoToolboxVideoDecoderFactory::DestroyVideoDecoder):
194         * platform/mediastream/libwebrtc/VideoToolBoxDecoderFactory.h: Copied from Source/WebCore/platform/mediastream/libwebrtc/VideoToolBoxEncoderFactory.h.
195         * platform/mediastream/libwebrtc/VideoToolBoxEncoderFactory.cpp:
196         (WebCore::VideoToolboxVideoEncoderFactory::setActive):
197         (WebCore::VideoToolboxVideoEncoderFactory::CreateSupportedVideoEncoder):
198         (WebCore::VideoToolboxVideoEncoderFactory::DestroyVideoEncoder):
199         * platform/mediastream/libwebrtc/VideoToolBoxEncoderFactory.h:
200         * testing/Internals.cpp:
201         (WebCore::Internals::resetToConsistentState):
202         * testing/MockLibWebRTCPeerConnection.cpp:
203         (WebCore::useRealRTCPeerConnectionFactory):
204         (WebCore::useMockRTCPeerConnectionFactory):
205         * testing/MockLibWebRTCPeerConnection.h:
206
207 2017-09-25  Sam Weinig  <sam@webkit.org>
208
209         Remove unused EditorClient functions
210         https://bugs.webkit.org/show_bug.cgi?id=177463
211
212         Reviewed by Alex Christensen.
213
214         Remove unused EditorClient functions.
215
216         * loader/EmptyClients.cpp:
217         * page/EditorClient.h:
218
219 2017-09-25  Per Arne Vollan  <pvollan@apple.com>
220
221         Crash in WebCore::TreeScope::documentScope
222         https://bugs.webkit.org/show_bug.cgi?id=176159
223
224         Reviewed by Ryosuke Niwa.
225
226         When all children are replaced with a new node in ContainerNode::replaceAllChildren,
227         the treescope of the new node should be set after the call to willRemoveChildren,
228         since this call can fire events, and execute JS code, which might change the treescope
229         of the container node.
230
231         Test: fast/dom/crash-moving-subtree-between-documents.html
232
233         * dom/ContainerNode.cpp:
234         (WebCore::ContainerNode::replaceAllChildren):
235
236 2017-09-25  Alex Christensen  <achristensen@webkit.org>
237
238         Make Attribute an enum class
239         https://bugs.webkit.org/show_bug.cgi?id=177414
240
241         Reviewed by Yusuke Suzuki.
242
243         No change in behavior.
244
245         * bindings/js/JSDOMGlobalObject.cpp:
246         (WebCore::JSDOMGlobalObject::addBuiltinGlobals):
247         * bindings/js/JSDOMMapLike.cpp:
248         (WebCore::initializeBackingMap):
249         (WebCore::createBackingMap):
250         * bindings/js/JSDOMWindowBase.cpp:
251         (WebCore::JSDOMWindowBase::finishCreation):
252         * bindings/js/JSDOMWindowCustom.cpp:
253         (WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess):
254         (WebCore::JSDOMWindow::getOwnPropertySlot):
255         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
256         * bindings/js/JSDOMWindowProperties.cpp:
257         (WebCore::jsDOMWindowPropertiesGetOwnPropertySlotNamedItemGetter):
258         * bindings/js/JSImageDataCustom.cpp:
259         (WebCore::toJSNewlyCreated):
260         * bindings/js/JSLocationCustom.cpp:
261         (WebCore::getOwnPropertySlotCommon):
262         * bindings/js/JSPluginElementFunctions.cpp:
263         (WebCore::pluginElementCustomGetOwnPropertySlot):
264         * bindings/scripts/CodeGeneratorJS.pm:
265         (GenerateIndexedGetter):
266         (GenerateNamedGetter):
267         (GetJSCAttributesForAttribute):
268         (GeneratePropertiesHashTable):
269         (addUnscopableProperties):
270         (GenerateImplementation):
271         (GenerateCallbackImplementationContent):
272         (GenerateHashTableValueArray):
273         (GenerateConstructorHelperMethods):
274         (ComputeFunctionSpecial):
275         * bindings/scripts/test/JS/JSInterfaceName.cpp:
276         (WebCore::JSInterfaceNameConstructor::initializeProperties):
277         * bindings/scripts/test/JS/JSMapLike.cpp:
278         (WebCore::JSMapLikeConstructor::initializeProperties):
279         (WebCore::JSMapLikePrototype::finishCreation):
280         * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
281         (WebCore::JSReadOnlyMapLikeConstructor::initializeProperties):
282         (WebCore::JSReadOnlyMapLikePrototype::finishCreation):
283         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
284         (WebCore::JSTestActiveDOMObjectConstructor::initializeProperties):
285         * bindings/scripts/test/JS/JSTestCEReactions.cpp:
286         (WebCore::JSTestCEReactionsConstructor::initializeProperties):
287         * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
288         (WebCore::JSTestCEReactionsStringifierConstructor::initializeProperties):
289         * bindings/scripts/test/JS/JSTestCallTracer.cpp:
290         (WebCore::JSTestCallTracerConstructor::initializeProperties):
291         * bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
292         (WebCore::JSTestCallbackInterfaceConstructor::initializeProperties):
293         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
294         (WebCore::JSTestClassWithJSBuiltinConstructorConstructor::initializeProperties):
295         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
296         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::initializeProperties):
297         (WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor):
298         * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
299         (WebCore::JSTestDOMJITConstructor::initializeProperties):
300         * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
301         (WebCore::JSTestEnabledBySettingConstructor::initializeProperties):
302         (WebCore::JSTestEnabledBySetting::finishCreation):
303         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
304         (WebCore::JSTestEventConstructorConstructor::initializeProperties):
305         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
306         (WebCore::JSTestEventTargetConstructor::initializeProperties):
307         (WebCore::JSTestEventTarget::getOwnPropertySlot):
308         (WebCore::JSTestEventTarget::getOwnPropertySlotByIndex):
309         * bindings/scripts/test/JS/JSTestException.cpp:
310         (WebCore::JSTestExceptionConstructor::initializeProperties):
311         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
312         (WebCore::JSTestGenerateIsReachableConstructor::initializeProperties):
313         * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
314         (WebCore::JSTestGlobalObjectConstructor::initializeProperties):
315         (WebCore::JSTestGlobalObject::finishCreation):
316         * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
317         (WebCore::JSTestIndexedSetterNoIdentifierConstructor::initializeProperties):
318         (WebCore::JSTestIndexedSetterNoIdentifier::getOwnPropertySlot):
319         (WebCore::JSTestIndexedSetterNoIdentifier::getOwnPropertySlotByIndex):
320         * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
321         (WebCore::JSTestIndexedSetterThrowingExceptionConstructor::initializeProperties):
322         (WebCore::JSTestIndexedSetterThrowingException::getOwnPropertySlot):
323         (WebCore::JSTestIndexedSetterThrowingException::getOwnPropertySlotByIndex):
324         * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
325         (WebCore::JSTestIndexedSetterWithIdentifierConstructor::initializeProperties):
326         (WebCore::JSTestIndexedSetterWithIdentifier::getOwnPropertySlot):
327         (WebCore::JSTestIndexedSetterWithIdentifier::getOwnPropertySlotByIndex):
328         * bindings/scripts/test/JS/JSTestInterface.cpp:
329         (WebCore::JSTestInterfaceConstructor::initializeProperties):
330         * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
331         (WebCore::JSTestInterfaceLeadingUnderscoreConstructor::initializeProperties):
332         * bindings/scripts/test/JS/JSTestIterable.cpp:
333         (WebCore::JSTestIterableConstructor::initializeProperties):
334         (WebCore::JSTestIterablePrototype::finishCreation):
335         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
336         (WebCore::JSTestJSBuiltinConstructorConstructor::initializeProperties):
337         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
338         (WebCore::JSTestMediaQueryListListenerConstructor::initializeProperties):
339         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
340         (WebCore::JSTestNamedAndIndexedSetterNoIdentifierConstructor::initializeProperties):
341         (WebCore::JSTestNamedAndIndexedSetterNoIdentifier::getOwnPropertySlot):
342         (WebCore::JSTestNamedAndIndexedSetterNoIdentifier::getOwnPropertySlotByIndex):
343         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
344         (WebCore::JSTestNamedAndIndexedSetterThrowingExceptionConstructor::initializeProperties):
345         (WebCore::JSTestNamedAndIndexedSetterThrowingException::getOwnPropertySlot):
346         (WebCore::JSTestNamedAndIndexedSetterThrowingException::getOwnPropertySlotByIndex):
347         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
348         (WebCore::JSTestNamedAndIndexedSetterWithIdentifierConstructor::initializeProperties):
349         (WebCore::JSTestNamedAndIndexedSetterWithIdentifier::getOwnPropertySlot):
350         (WebCore::JSTestNamedAndIndexedSetterWithIdentifier::getOwnPropertySlotByIndex):
351         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
352         (WebCore::JSTestNamedConstructorConstructor::initializeProperties):
353         (WebCore::JSTestNamedConstructorNamedConstructor::initializeProperties):
354         * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
355         (WebCore::JSTestNamedDeleterNoIdentifierConstructor::initializeProperties):
356         (WebCore::JSTestNamedDeleterNoIdentifier::getOwnPropertySlot):
357         (WebCore::JSTestNamedDeleterNoIdentifier::getOwnPropertySlotByIndex):
358         * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
359         (WebCore::JSTestNamedDeleterThrowingExceptionConstructor::initializeProperties):
360         (WebCore::JSTestNamedDeleterThrowingException::getOwnPropertySlot):
361         (WebCore::JSTestNamedDeleterThrowingException::getOwnPropertySlotByIndex):
362         * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
363         (WebCore::JSTestNamedDeleterWithIdentifierConstructor::initializeProperties):
364         (WebCore::JSTestNamedDeleterWithIdentifier::getOwnPropertySlot):
365         (WebCore::JSTestNamedDeleterWithIdentifier::getOwnPropertySlotByIndex):
366         * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
367         (WebCore::JSTestNamedDeleterWithIndexedGetterConstructor::initializeProperties):
368         (WebCore::JSTestNamedDeleterWithIndexedGetter::getOwnPropertySlot):
369         (WebCore::JSTestNamedDeleterWithIndexedGetter::getOwnPropertySlotByIndex):
370         * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
371         (WebCore::JSTestNamedGetterCallWithConstructor::initializeProperties):
372         (WebCore::JSTestNamedGetterCallWith::getOwnPropertySlot):
373         (WebCore::JSTestNamedGetterCallWith::getOwnPropertySlotByIndex):
374         * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
375         (WebCore::JSTestNamedGetterNoIdentifierConstructor::initializeProperties):
376         (WebCore::JSTestNamedGetterNoIdentifier::getOwnPropertySlot):
377         (WebCore::JSTestNamedGetterNoIdentifier::getOwnPropertySlotByIndex):
378         * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
379         (WebCore::JSTestNamedGetterWithIdentifierConstructor::initializeProperties):
380         (WebCore::JSTestNamedGetterWithIdentifier::getOwnPropertySlot):
381         (WebCore::JSTestNamedGetterWithIdentifier::getOwnPropertySlotByIndex):
382         * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
383         (WebCore::JSTestNamedSetterNoIdentifierConstructor::initializeProperties):
384         (WebCore::JSTestNamedSetterNoIdentifier::getOwnPropertySlot):
385         (WebCore::JSTestNamedSetterNoIdentifier::getOwnPropertySlotByIndex):
386         * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
387         (WebCore::JSTestNamedSetterThrowingExceptionConstructor::initializeProperties):
388         (WebCore::JSTestNamedSetterThrowingException::getOwnPropertySlot):
389         (WebCore::JSTestNamedSetterThrowingException::getOwnPropertySlotByIndex):
390         * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
391         (WebCore::JSTestNamedSetterWithIdentifierConstructor::initializeProperties):
392         (WebCore::JSTestNamedSetterWithIdentifier::getOwnPropertySlot):
393         (WebCore::JSTestNamedSetterWithIdentifier::getOwnPropertySlotByIndex):
394         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
395         (WebCore::JSTestNamedSetterWithIndexedGetterConstructor::initializeProperties):
396         (WebCore::JSTestNamedSetterWithIndexedGetter::getOwnPropertySlot):
397         (WebCore::JSTestNamedSetterWithIndexedGetter::getOwnPropertySlotByIndex):
398         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
399         (WebCore::JSTestNamedSetterWithIndexedGetterAndSetterConstructor::initializeProperties):
400         (WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::getOwnPropertySlot):
401         (WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::getOwnPropertySlotByIndex):
402         * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
403         (WebCore::JSTestNamedSetterWithOverrideBuiltinsConstructor::initializeProperties):
404         (WebCore::JSTestNamedSetterWithOverrideBuiltins::getOwnPropertySlot):
405         (WebCore::JSTestNamedSetterWithOverrideBuiltins::getOwnPropertySlotByIndex):
406         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
407         (WebCore::JSTestNamedSetterWithUnforgablePropertiesConstructor::initializeProperties):
408         (WebCore::JSTestNamedSetterWithUnforgableProperties::getOwnPropertySlot):
409         (WebCore::JSTestNamedSetterWithUnforgableProperties::getOwnPropertySlotByIndex):
410         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
411         (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructor::initializeProperties):
412         (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::getOwnPropertySlot):
413         (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::getOwnPropertySlotByIndex):
414         * bindings/scripts/test/JS/JSTestNode.cpp:
415         (WebCore::JSTestNodeConstructor::initializeProperties):
416         (WebCore::JSTestNodePrototype::finishCreation):
417         * bindings/scripts/test/JS/JSTestObj.cpp:
418         (WebCore::JSTestObjConstructor::initializeProperties):
419         (WebCore::JSTestObjPrototype::finishCreation):
420         (WebCore::JSTestObj::getOwnPropertySlot):
421         (WebCore::JSTestObj::getOwnPropertySlotByIndex):
422         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
423         (WebCore::JSTestOverloadedConstructorsConstructor::initializeProperties):
424         * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
425         (WebCore::JSTestOverloadedConstructorsWithSequenceConstructor::initializeProperties):
426         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
427         (WebCore::JSTestOverrideBuiltinsConstructor::initializeProperties):
428         (WebCore::JSTestOverrideBuiltins::getOwnPropertySlot):
429         (WebCore::JSTestOverrideBuiltins::getOwnPropertySlotByIndex):
430         * bindings/scripts/test/JS/JSTestPluginInterface.cpp:
431         (WebCore::JSTestPluginInterfaceConstructor::initializeProperties):
432         * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
433         (WebCore::JSTestPromiseRejectionEventConstructor::initializeProperties):
434         * bindings/scripts/test/JS/JSTestSerialization.cpp:
435         (WebCore::JSTestSerializationConstructor::initializeProperties):
436         * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp:
437         (WebCore::JSTestSerializationIndirectInheritanceConstructor::initializeProperties):
438         * bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
439         (WebCore::JSTestSerializationInheritConstructor::initializeProperties):
440         * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
441         (WebCore::JSTestSerializationInheritFinalConstructor::initializeProperties):
442         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
443         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::initializeProperties):
444         * bindings/scripts/test/JS/JSTestStringifier.cpp:
445         (WebCore::JSTestStringifierConstructor::initializeProperties):
446         * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
447         (WebCore::JSTestStringifierAnonymousOperationConstructor::initializeProperties):
448         * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
449         (WebCore::JSTestStringifierNamedOperationConstructor::initializeProperties):
450         * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
451         (WebCore::JSTestStringifierOperationImplementedAsConstructor::initializeProperties):
452         * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
453         (WebCore::JSTestStringifierOperationNamedToStringConstructor::initializeProperties):
454         * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
455         (WebCore::JSTestStringifierReadOnlyAttributeConstructor::initializeProperties):
456         * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
457         (WebCore::JSTestStringifierReadWriteAttributeConstructor::initializeProperties):
458         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
459         (WebCore::JSTestTypedefsConstructor::initializeProperties):
460         * bridge/runtime_array.cpp:
461         (JSC::RuntimeArray::getOwnPropertySlot):
462         (JSC::RuntimeArray::getOwnPropertySlotByIndex):
463         * bridge/runtime_method.cpp:
464         (JSC::RuntimeMethod::getOwnPropertySlot):
465         * bridge/runtime_object.cpp:
466         (JSC::Bindings::RuntimeObject::getOwnPropertySlot):
467         * html/HTMLMediaElement.cpp:
468         (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):
469
470 2017-09-25  Alex Christensen  <achristensen@webkit.org>
471
472         Stop using PolicyCallback
473         https://bugs.webkit.org/show_bug.cgi?id=176088
474
475         Reviewed by Andy Estes.
476
477         This is what lambdas are for. No change in behavior.
478         Cancelling the callback is now the responsibility of the FrameLoaderClient, to whom we have given the lambda.
479         That is why there are changes in WebKit and WebKitLegacy where the FrameLoaderClient::cancelPolicyCheck finds the lambda it has stored.
480
481         * CMakeLists.txt:
482         * WebCore.xcodeproj/project.pbxproj:
483         * loader/DocumentLoader.cpp:
484         * loader/FrameLoader.cpp:
485         * loader/FrameLoaderClient.h:
486         * loader/PolicyCallback.cpp: Removed.
487         * loader/PolicyCallback.h: Removed.
488         * loader/PolicyChecker.cpp:
489         (WebCore::PolicyChecker::checkNavigationPolicy):
490         (WebCore::PolicyChecker::checkNewWindowPolicy):
491         (WebCore::PolicyChecker::stopCheck):
492         (WebCore::PolicyChecker::continueAfterNavigationPolicy): Deleted.
493         * loader/PolicyChecker.h:
494         (WebCore::PolicyChecker::setSuggestedFilename): Deleted.
495
496 2017-09-25  Youenn Fablet  <youenn@apple.com>
497
498         MediaStreamTrack.getSettings should compute its deviceId/groupId like enumerateDevices
499         https://bugs.webkit.org/show_bug.cgi?id=177433
500
501         Reviewed by Jer Noble.
502
503         Covered by improved test.
504
505         Hash the deviceId returned by getSettings as done by enumerateDevices/getUserMedia.
506         Do the same thing for groupId.
507         Make sure mock sources have their deviceId set consistently with mock devices.
508
509         * Modules/mediastream/MediaStreamTrack.cpp:
510         (WebCore::MediaStreamTrack::getSettings const):
511         * Modules/mediastream/MediaStreamTrack.h:
512         * Modules/mediastream/MediaStreamTrack.idl:
513         * platform/mediastream/mac/MockRealtimeAudioSourceMac.h:
514         * platform/mediastream/mac/MockRealtimeAudioSourceMac.mm:
515         (WebCore::MockRealtimeAudioSource::create):
516         (WebCore::MockRealtimeAudioSourceMac::MockRealtimeAudioSourceMac):
517         * platform/mediastream/mac/MockRealtimeVideoSourceMac.h:
518         * platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:
519         (WebCore::MockRealtimeVideoSource::create):
520         (WebCore::MockRealtimeVideoSourceMac::MockRealtimeVideoSourceMac):
521         * platform/mock/MockRealtimeAudioSource.cpp:
522         (WebCore::MockRealtimeAudioSource::create):
523         (WebCore::MockRealtimeAudioSource::createMuted):
524         (WebCore::MockRealtimeAudioSource::MockRealtimeAudioSource):
525         * platform/mock/MockRealtimeAudioSource.h:
526         * platform/mock/MockRealtimeVideoSource.cpp:
527         (WebCore::MockRealtimeVideoSource::create):
528         (WebCore::MockRealtimeVideoSource::createMuted):
529         (WebCore::MockRealtimeVideoSource::MockRealtimeVideoSource):
530         * platform/mock/MockRealtimeVideoSource.h:
531
532 2017-09-25  Chris Dumez  <cdumez@apple.com>
533
534         Make StoredCredentials an enum class and rename its header
535         https://bugs.webkit.org/show_bug.cgi?id=177455
536
537         Reviewed by Youenn Fablet.
538
539         Make StoredCredentials an enum class and rename its header for clarity. This was error-prone because 0 meant
540         "allow" and and 1 meant "do not allow". It was trivial to convert it to a boolean by mistake and get the
541         opposite behavior.
542
543         * WebCore.xcodeproj/project.pbxproj:
544         * css/StyleRuleImport.cpp:
545         (WebCore::StyleRuleImport::requestStyleSheet):
546         * loader/CrossOriginAccessControl.cpp:
547         (WebCore::updateRequestForAccessControl):
548         (WebCore::createAccessControlPreflightRequest):
549         (WebCore::passesAccessControlCheck):
550         (WebCore::validatePreflightResponse):
551         * loader/CrossOriginAccessControl.h:
552         * loader/CrossOriginPreflightChecker.cpp:
553         (WebCore::CrossOriginPreflightChecker::validatePreflightResponse):
554         (WebCore::CrossOriginPreflightChecker::doPreflight):
555         * loader/CrossOriginPreflightResultCache.cpp:
556         (WebCore::CrossOriginPreflightResultCacheItem::allowsRequest const):
557         (WebCore::CrossOriginPreflightResultCache::canSkipPreflight):
558         * loader/CrossOriginPreflightResultCache.h:
559         (WebCore::CrossOriginPreflightResultCacheItem::CrossOriginPreflightResultCacheItem):
560         * loader/DocumentLoader.cpp:
561         (WebCore::DocumentLoader::startLoadingMainResource):
562         * loader/DocumentThreadableLoader.cpp:
563         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
564         (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest):
565         (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest):
566         (WebCore::DocumentThreadableLoader::redirectReceived):
567         (WebCore::DocumentThreadableLoader::preflightSuccess):
568         (WebCore::DocumentThreadableLoader::loadRequest):
569         * loader/FrameLoader.cpp:
570         (WebCore::FrameLoader::loadResourceSynchronously):
571         * loader/FrameLoader.h:
572         * loader/LoaderStrategy.h:
573         * loader/MediaResourceLoader.cpp:
574         (WebCore::MediaResourceLoader::requestResource):
575         * loader/NetscapePlugInStreamLoader.cpp:
576         (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
577         * loader/ResourceLoader.cpp:
578         (WebCore::ResourceLoader::shouldUseCredentialStorage):
579         (WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
580         * loader/ResourceLoaderOptions.h:
581         (WebCore::ResourceLoaderOptions::ResourceLoaderOptions):
582         * loader/SubresourceLoader.cpp:
583         (WebCore::SubresourceLoader::checkResponseCrossOriginAccessControl):
584         (WebCore::SubresourceLoader::checkRedirectionCrossOriginAccessControl):
585         * loader/ThreadableLoader.cpp:
586         (WebCore::ThreadableLoaderOptions::isolatedCopy const):
587         * loader/cache/CachedResource.cpp:
588         (WebCore::CachedResource::loadFrom):
589         * loader/cache/CachedResourceLoader.cpp:
590         (WebCore::CachedResourceLoader::defaultCachedResourceOptions):
591         * loader/cache/CachedResourceRequest.cpp:
592         (WebCore::CachedResourceRequest::setAsPotentiallyCrossOrigin):
593         (WebCore::CachedResourceRequest::updateForAccessControl):
594         * loader/icon/IconLoader.cpp:
595         (WebCore::IconLoader::startLoading):
596         * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
597         (WebCore::WebCoreAVCFResourceLoader::startLoading):
598         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
599         (WebCore::WebCoreAVFResourceLoader::startLoading):
600         * platform/network/BlobRegistryImpl.cpp:
601         (WebCore::loadBlobResourceSynchronously):
602         * platform/network/ResourceHandle.cpp:
603         (WebCore::ResourceHandle::loadResourceSynchronously):
604         * platform/network/ResourceHandle.h:
605         * platform/network/StoredCredentialsPolicy.h: Renamed from Source/WebCore/platform/network/ResourceHandleTypes.h.
606         * platform/network/cf/ResourceHandleCFNet.cpp:
607         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
608         * platform/network/curl/ResourceHandleCurl.cpp:
609         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
610         * platform/network/mac/ResourceHandleMac.mm:
611         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
612         * platform/network/soup/ResourceHandleSoup.cpp:
613         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
614         * style/StylePendingResources.cpp:
615         (WebCore::Style::loadPendingImage):
616         * xml/XSLTProcessorLibxslt.cpp:
617         (WebCore::docLoaderFunc):
618         * xml/parser/XMLDocumentParserLibxml2.cpp:
619         (WebCore::openFunc):
620
621 2017-09-25  Sam Weinig  <sam@webkit.org>
622
623         Remove unnecessary userVisibleString EditorClient function
624         https://bugs.webkit.org/show_bug.cgi?id=177456
625
626         Reviewed by Dan Bernstein.
627
628         The implementation of userVisibleString has been in WebCore for sometime (in WebCoreNSURLExtras)
629         so there is no need to call through the EditorClient, just for it to call back to WebCore.
630
631         * editing/Editor.h:
632
633             Keep userVisibleString helper function but make it static, as it no longer needs
634             any state. It is useful to have this helper, so non-ObjC code in Editor can get a
635             userVisibleString.
636
637         * editing/cocoa/EditorCocoa.mm:
638         (WebCore::Editor::userVisibleString):
639
640             Call through to the WebCoreNSURLExtras implementation.
641
642         * editing/mac/EditorMac.mm:
643         (WebCore::Editor::plainTextFromPasteboard):
644         (WebCore::Editor::writeImageToPasteboard):
645         (WebCore::Editor::userVisibleString): Deleted.
646         * editing/mac/WebContentReaderMac.mm:
647         (WebCore::WebContentReader::readFilenames):
648
649             Replace client calls with direct calls.
650
651         * loader/EmptyClients.cpp:
652         * page/EditorClient.h:
653
654             Remove client function.
655
656         * testing/Internals.mm:
657         (WebCore::Internals::userVisibleString):
658
659             Replace client call with direct call.
660
661 2017-09-25  Timothy Horton  <timothy_horton@apple.com>
662
663         Fix the build with <attachment> disabled
664
665         * editing/mac/WebContentReaderMac.mm:
666
667 2017-09-25  Per Arne Vollan  <pvollan@apple.com>
668
669         Unreviewed Windows build fix.
670
671         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
672         (WebCore::InbandTextTrackPrivateAVCF::readNativeSampleBuffer):
673
674 2017-09-25  Commit Queue  <commit-queue@webkit.org>
675
676         Unreviewed, rolling out r222455.
677         https://bugs.webkit.org/show_bug.cgi?id=177460
678
679         broke iOS build (Requested by alexchristensen on #webkit).
680
681         Reverted changeset:
682
683         "Add WKContentRuleList notify action type"
684         https://bugs.webkit.org/show_bug.cgi?id=177013
685         http://trac.webkit.org/changeset/222455
686
687 2017-09-25  Carlos Alberto Lopez Perez  <clopez@igalia.com>
688
689         Building release with -DLOG_DISABLED=0 fails
690         https://bugs.webkit.org/show_bug.cgi?id=177441
691
692         Reviewed by Michael Catanzaro.
693
694         No new tests, it is a build fix.
695
696         * Modules/indexeddb/IDBKeyPath.cpp:
697         * Modules/indexeddb/IDBKeyPath.h:
698
699 2017-09-25  Brent Fulgham  <bfulgham@apple.com>
700
701         Switch back to partitioning (rather than blocking) prevalent origins without interaction
702         https://bugs.webkit.org/show_bug.cgi?id=177452
703         <rdar://problem/34632618>
704
705         Reviewed by Chris Dumez.
706
707         Temporarily revert to "partition-only" behavior, due to site compatibility issues with
708         full blocking.
709
710         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
711         (WebCore::NetworkStorageSession::setPrevalentDomainsToPartitionOrBlockCookies):
712
713 2017-09-25  Alex Christensen  <achristensen@webkit.org>
714
715         Separate form submission from PolicyChecker infrastructure
716         https://bugs.webkit.org/show_bug.cgi?id=177396
717
718         Reviewed by Geoffrey Garen.
719
720         We used PolicyChecker for WillSubmitForm even though we just need a completion handler
721         with no parameters.  That is what lambdas and WTF::Functions are for.
722
723         No change in behavior.
724
725         * loader/EmptyClients.cpp:
726         (WebCore::EmptyFrameLoaderClient::dispatchWillSubmitForm):
727         * loader/FrameLoader.cpp:
728         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
729         (WebCore::FrameLoader::continueLoadAfterWillSubmitForm): Deleted.
730         * loader/FrameLoader.h:
731         * loader/FrameLoaderClient.h:
732         * loader/PolicyChecker.cpp:
733         (WebCore::PolicyChecker::continueLoadAfterWillSubmitForm): Deleted.
734         * loader/PolicyChecker.h:
735
736 2017-09-25  Alex Christensen  <achristensen@webkit.org>
737
738         Add WKContentRuleList notify action type
739         https://bugs.webkit.org/show_bug.cgi?id=177013
740         <rdar://problem/31073936>
741
742         Reviewed by Darin Adler.
743
744         Covered by new API tests.
745
746         * contentextensions/ContentExtensionActions.h:
747         (WebCore::ContentExtensions::hasStringArgument):
748         * contentextensions/ContentExtensionCompiler.cpp:
749         (WebCore::ContentExtensions::resolvePendingDisplayNoneActions):
750         (WebCore::ContentExtensions::serializeActions):
751         * contentextensions/ContentExtensionError.cpp:
752         (WebCore::ContentExtensions::contentExtensionErrorCategory):
753         * contentextensions/ContentExtensionError.h:
754         * contentextensions/ContentExtensionParser.cpp:
755         (WebCore::ContentExtensions::loadAction):
756         * contentextensions/ContentExtensionRule.cpp:
757         (WebCore::ContentExtensions::Action::deserialize):
758         (WebCore::ContentExtensions::Action::deserializeType):
759         (WebCore::ContentExtensions::Action::serializedLength):
760         * contentextensions/ContentExtensionRule.h:
761         (WebCore::ContentExtensions::Action::Action):
762         * contentextensions/ContentExtensionsBackend.cpp:
763         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
764         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForPingLoad):
765         (WebCore::ContentExtensions::applyBlockedStatusToRequest):
766         * loader/FrameLoader.cpp:
767         (WebCore::FrameLoader::loadResourceSynchronously):
768         * loader/PingLoader.cpp:
769         (WebCore::processContentExtensionRulesForLoad):
770         * loader/ResourceLoader.cpp:
771         (WebCore::ResourceLoader::willSendRequestInternal):
772         * loader/cache/CachedResourceLoader.cpp:
773         (WebCore::CachedResourceLoader::requestResource):
774         * loader/cache/CachedResourceRequest.cpp:
775         (WebCore::CachedResourceRequest::applyBlockedStatus):
776         * loader/cache/CachedResourceRequest.h:
777         * page/ChromeClient.h:
778
779 2017-09-25  Sam Weinig  <sam@webkit.org>
780
781         [WebIDL] Remove GetterMayThrowException
782         https://bugs.webkit.org/show_bug.cgi?id=177422
783
784         Reviewed by Youenn Fablet.
785
786         * bindings/js/JSDOMConvertBase.h:
787         (WebCore::toJSNewlyCreated):
788         (WebCore::toJS):
789
790             Add overloads of toJS and toJSNewlyCreated that take ThrowScopes and a value that
791             is not an ExceptionOr (keeping the existing overloads that take an ExceptionOr).
792             This allows NativeToJSValue to not need to know of a conversion can throw, as the
793             c++ type system will now make the determination for it.
794
795         * bindings/scripts/CodeGeneratorJS.pm:
796         (GenerateSerializerDefinition):
797         (NativeToJSValueUsingReferences):
798         (NativeToJSValueUsingPointers):
799         (NativeToJSValue):
800
801             Always assume an exception can be thrown for attributes now that the converters will
802             do the right thing based on whether the value is an ExceptionOr or not. Also, remove 
803             $suppressExceptionCheck and $excludeNullability, they were never being set.
804
805         * bindings/scripts/IDLAttributes.json:
806
807             Remove GetterMayThrowException from the list of supported extended attributes.
808
809         * Modules/indexeddb/IDBRequest.idl:
810         * Modules/mediasource/SourceBuffer.idl:
811         * Modules/webdatabase/SQLResultSet.idl:
812         * bindings/scripts/test/TestObj.idl:
813         * bindings/scripts/test/TestTypedefs.idl:
814         * dom/Document.idl:
815         * html/HTMLInputElement.idl:
816         * page/DOMWindow.idl:
817         * page/History.idl:
818         * svg/SVGLength.idl:
819         * xml/XMLHttpRequest.idl:
820         * xml/XPathResult.idl:
821         
822             Remove GetterMayThrowException extended attribute from IDL files.
823
824         * bindings/scripts/test/JS/JSMapLike.cpp:
825         * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
826         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
827         * bindings/scripts/test/JS/JSTestCEReactions.cpp:
828         * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
829         * bindings/scripts/test/JS/JSTestCallTracer.cpp:
830         * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
831         * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
832         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
833         * bindings/scripts/test/JS/JSTestException.cpp:
834         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
835         * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
836         * bindings/scripts/test/JS/JSTestInterface.cpp:
837         * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
838         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
839         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
840         * bindings/scripts/test/JS/JSTestNode.cpp:
841         * bindings/scripts/test/JS/JSTestObj.cpp:
842         * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
843         * bindings/scripts/test/JS/JSTestSerialization.cpp:
844         * bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
845         * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
846         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
847         * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
848         * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
849         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
850
851             Update test results.
852
853 2017-09-25  Timothy Horton  <timothy_horton@apple.com>
854
855         Make progress on getting Mac CMake building again
856         https://bugs.webkit.org/show_bug.cgi?id=177443
857
858         Unreviewed, just "fixing" the build.
859
860         * PlatformMac.cmake:
861         Add some missing files and include paths.
862
863 2017-09-25  Ms2ger  <Ms2ger@igalia.com>
864
865         Update waitSync and the TIMEOUT_IGNORED constant to use signed integers.
866         https://bugs.webkit.org/show_bug.cgi?id=177239
867
868         Reviewed by Žan Doberšek.
869
870         This matches the specification.
871
872         Test: fast/canvas/webgl/webgl2/constants.html
873
874         * html/canvas/WebGL2RenderingContext.cpp:
875         (WebCore::WebGL2RenderingContext::waitSync):
876         * html/canvas/WebGL2RenderingContext.h:
877         * html/canvas/WebGL2RenderingContext.idl:
878
879 2017-09-25  Nael Ouedraogo  <nael.ouedraogo@crf.canon.fr>
880
881         Align Media Source Extension IDL with spec
882         https://bugs.webkit.org/show_bug.cgi?id=177369
883
884         Reviewed by Sam Weinig.
885
886         Align IDL as per specification:
887          - https://www.w3.org/TR/media-source/
888
889         * Modules/mediasource/AudioTrackMediaSource.idl:
890         * Modules/mediasource/SourceBuffer.idl:
891         * Modules/mediasource/TextTrackMediaSource.idl:
892         * Modules/mediasource/VideoTrackMediaSource.idl:
893
894 2017-09-25  Manuel Rego Casasnovas  <rego@igalia.com>
895
896         [css-grid] Small refactoring adding RenderGrid::contentAlignment()
897         https://bugs.webkit.org/show_bug.cgi?id=177130
898
899         Reviewed by Sergio Villar Senin.
900
901         As a follow-up of r221931, this patch does a small refactoring
902         adding a new method RenderGrid::contentAlignment()
903         that is used from RenderGrid and GridTrackSizingAlgorithm.
904
905         No new tests, no change of behavior.
906
907         * rendering/GridTrackSizingAlgorithm.cpp:
908         (WebCore::GridTrackSizingAlgorithm::stretchAutoTracks):
909         * rendering/RenderGrid.cpp:
910         (WebCore::contentAlignmentNormalBehaviorGrid):
911         (WebCore::RenderGrid::contentAlignment const):
912         (WebCore::RenderGrid::computeContentPositionAndDistributionOffset const):
913         (WebCore::RenderGrid::contentAlignmentNormalBehaviorGrid): Deleted.
914         * rendering/RenderGrid.h:
915         * rendering/style/RenderStyle.cpp:
916         (WebCore::resolvedContentAlignment):
917         (WebCore::RenderStyle::resolvedAlignContent const):
918         (WebCore::RenderStyle::resolvedJustifyContent const):
919         * rendering/style/RenderStyle.h:
920
921 2017-09-25  Manuel Rego Casasnovas  <rego@igalia.com>
922
923         [css-grid] fit-content() tracks shouldn't stretch
924         https://bugs.webkit.org/show_bug.cgi?id=177300
925
926         Reviewed by Sergio Villar Senin.
927
928         The spec is pretty clear regarding this
929         (https://drafts.csswg.org/css-grid/#algo-stretch):
930           "This step sizes expands tracks that have an auto max track sizing
931            function by dividing any remaining positive, definite free space
932            equally amongst them."
933
934         The fit-content() tracks don't have an auto max track sizing function,
935         so they shouldn't be considered in this step of the algorithm.
936
937         The patch modifies GridTrackSizingAlgorithm::initializeTrackSizes()
938         so it doesn't consider fit-content() tracks as auto sized ones
939         (which are the ones later stretched in the last step of the algorithm).
940
941         Test: imported/w3c/web-platform-tests/css/css-grid-1/alignment/grid-fit-content-tracks-dont-stretch-001.html
942
943         * rendering/GridTrackSizingAlgorithm.cpp:
944         (WebCore::GridTrackSizingAlgorithm::initializeTrackSizes):
945         (WebCore::GridTrackSizingAlgorithm::stretchAutoTracks):
946         (WebCore::GridTrackSizingAlgorithm::setup):
947         (WebCore::GridTrackSizingAlgorithm::reset):
948         * rendering/GridTrackSizingAlgorithm.h:
949
950 2017-09-24  Antti Koivisto  <antti@apple.com>
951
952         Remove CSS regions related fields from RenderStyle
953         https://bugs.webkit.org/show_bug.cgi?id=177415
954
955         Reviewed by Sam Weinig.
956
957         * css/CSSPrimitiveValueMappings.h:
958         (WebCore::CSSPrimitiveValue::operator RegionFragment const): Deleted.
959         * css/StyleResolver.cpp:
960         (WebCore::StyleResolver::adjustRenderStyle):
961         * rendering/RenderBlock.cpp:
962         (WebCore::RenderBlock::avoidsFloats const): Deleted.
963         * rendering/RenderBlock.h:
964         * rendering/RenderBlockFlow.cpp:
965         (WebCore::RenderBlockFlow::hasNextPage const):
966         * rendering/RenderLayer.cpp:
967         (WebCore::RenderLayer::calculateClipRects const):
968         * rendering/style/RenderStyle.cpp:
969         (WebCore::RenderStyle::changeRequiresLayout const):
970         * rendering/style/RenderStyle.h:
971         (WebCore::pseudoElementRendererIsNeeded):
972         (WebCore::RenderStyle::hasFlowInto const): Deleted.
973         (WebCore::RenderStyle::flowThread const): Deleted.
974         (WebCore::RenderStyle::hasFlowFrom const): Deleted.
975         (WebCore::RenderStyle::regionThread const): Deleted.
976         (WebCore::RenderStyle::regionFragment const): Deleted.
977         (WebCore::RenderStyle::setFlowThread): Deleted.
978         (WebCore::RenderStyle::setRegionThread): Deleted.
979         (WebCore::RenderStyle::setRegionFragment): Deleted.
980         (WebCore::RenderStyle::initialFlowThread): Deleted.
981         (WebCore::RenderStyle::initialRegionThread): Deleted.
982         (WebCore::RenderStyle::initialRegionFragment): Deleted.
983         * rendering/style/RenderStyleConstants.h:
984         * rendering/style/StyleRareNonInheritedData.cpp:
985         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
986         (WebCore::StyleRareNonInheritedData::operator== const):
987         * rendering/style/StyleRareNonInheritedData.h:
988
989 2017-09-24  Joanmarie Diggs  <jdiggs@igalia.com>
990
991         [ATK] Object attributes are missing for ARIA live region roles
992         https://bugs.webkit.org/show_bug.cgi?id=171174
993
994         Reviewed by Chris Fleizach.
995
996         Expose the values of aria-live, aria-atomic, and aria-relevant via AtkObject
997         attributes on live region elements and their descendants. In order to accomplish
998         exposure on descendants, add AccessibilityObject::ariaLiveRegionAncestor(). Add an
999         optional argument, excludeIfOff, to AccessibilityObject::isInsideARIALiveRegion()
1000         and AccessibilityObject::supportsARIALiveRegion(). This is needed because we need
1001         to expose live region properties via ATK even in the case where the live region
1002         is disabled/off, but supportsARIALiveRegion() deliberately checks if the live
1003         region is enabled.
1004
1005         Tests: accessibility/aria-liveregion-marquee-default.html
1006                accessibility/aria-liveregions-attributes.html
1007
1008         * accessibility/AccessibilityObject.cpp:
1009         (WebCore::AccessibilityObject::isInsideARIALiveRegion const):
1010         (WebCore::AccessibilityObject::ariaLiveRegionAncestor const):
1011         (WebCore::AccessibilityObject::supportsARIALiveRegion const):
1012         * accessibility/AccessibilityObject.h:
1013         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1014         (webkitAccessibleGetAttributes):
1015
1016 2017-09-23  Youenn Fablet  <youenn@apple.com>
1017
1018         Remove SetterMayThrowException
1019         https://bugs.webkit.org/show_bug.cgi?id=177408
1020
1021         Reviewed by Sam Weinig.
1022
1023         No change of behavior.
1024
1025         Updating IDLs to remove SetterMayThrowException as it is no longer needed.
1026         Updating AttributeSetter to compute the return type using Functor.
1027
1028         * Modules/indexeddb/IDBIndex.idl:
1029         * Modules/indexeddb/IDBObjectStore.idl:
1030         * Modules/mediasource/MediaSource.idl:
1031         * Modules/mediasource/SourceBuffer.idl:
1032         * Modules/mediastream/RTCDataChannel.idl:
1033         * Modules/webaudio/AnalyserNode.idl:
1034         * Modules/webaudio/AudioNode.idl:
1035         * Modules/webaudio/ConvolverNode.idl:
1036         * Modules/webaudio/OscillatorNode.idl:
1037         * Modules/websockets/WebSocket.idl:
1038         * bindings/js/JSDOMAttribute.h:
1039         (WebCore::AttributeSetter::call):
1040         (WebCore::AttributeSetter<ExceptionOr<void>>::call): Deleted.
1041         (WebCore::AttributeSetter<void>::call): Deleted.
1042         * bindings/scripts/CodeGeneratorJS.pm:
1043         (GenerateAttributeSetterBodyDefinition):
1044         * bindings/scripts/IDLAttributes.json:
1045         * bindings/scripts/test/JS/JSTestCEReactions.cpp:
1046         * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
1047         * bindings/scripts/test/JS/JSTestCallTracer.cpp:
1048         * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
1049         * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
1050         * bindings/scripts/test/JS/JSTestInterface.cpp:
1051         * bindings/scripts/test/JS/JSTestNode.cpp:
1052         * bindings/scripts/test/JS/JSTestObj.cpp:
1053         * bindings/scripts/test/JS/JSTestSerialization.cpp:
1054         * bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
1055         * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
1056         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1057         * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
1058         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1059         * bindings/scripts/test/TestObj.idl:
1060         * bindings/scripts/test/TestTypedefs.idl:
1061         * css/CSSRule.idl:
1062         * css/CSSStyleDeclaration.idl:
1063         * css/DeprecatedCSSOMValue.idl:
1064         * css/FontFace.idl:
1065         * css/MediaList.idl:
1066         * dom/Document.idl:
1067         * dom/Element.idl:
1068         * dom/Node.idl:
1069         * dom/ShadowRoot.idl:
1070         * html/DOMURL.idl:
1071         * html/HTMLElement.idl:
1072         * html/HTMLInputElement.idl:
1073         * html/HTMLMarqueeElement.idl:
1074         * html/HTMLMediaElement.idl:
1075         * html/HTMLOptionsCollection.idl:
1076         * html/HTMLSelectElement.idl:
1077         * html/HTMLTableElement.idl:
1078         * html/HTMLTextAreaElement.idl:
1079         * html/MediaController.idl:
1080         * html/track/VTTCue.idl:
1081         * html/track/VTTRegion.idl:
1082         * page/History.idl:
1083         * page/Location.idl:
1084         * svg/SVGAltGlyphElement.idl:
1085         * svg/SVGAngle.idl:
1086         * svg/SVGAnimatedBoolean.idl:
1087         * svg/SVGAnimatedEnumeration.idl:
1088         * svg/SVGAnimatedInteger.idl:
1089         * svg/SVGAnimatedNumber.idl:
1090         * svg/SVGAnimatedString.idl:
1091         * svg/SVGLength.idl:
1092         * svg/SVGMatrix.idl:
1093         * svg/SVGNumber.idl:
1094         * svg/SVGPoint.idl:
1095         * svg/SVGPreserveAspectRatio.idl:
1096         * svg/SVGRect.idl:
1097         * svg/SVGViewSpec.idl:
1098         * xml/XMLHttpRequest.idl:
1099
1100 2017-09-23  Said Abou-Hallawa  <sabouhallawa@apple.com>
1101
1102         Images may render partial frames even after loading all the encoded data
1103         https://bugs.webkit.org/show_bug.cgi?id=177406
1104
1105         Reviewed by Simon Fraser.
1106
1107         Because we do not want to block the main thread waiting for the image decoding
1108         thread to terminate, we let the decoding thread finish its work even it will
1109         be thrown away. If a new decoding thread is created and the SynchronizedFixedQueue
1110         is reopened, the terminating decoding thread might have the chance to process
1111         a new frame request. After it finishes decoding it, it realize that it is
1112         terminating so it will drop the decoded frame to the floor. So the new request
1113         was not processed by the new thread and because it was processed by the
1114         terminating thread, nothing will be reported to the BitmapImage object and
1115         the renderer will not be repainted.
1116
1117         The fix is to create a new SynchronizedFixedQueue every time a decoding 
1118         thread is created. This will guarantee that the terminating thread won't
1119         have access to the new frame request and will shut down after being notified
1120         by the old SynchronizedFixedQueue that it has been closed.
1121
1122         * platform/graphics/ImageFrameCache.cpp:
1123         (WebCore::ImageFrameCache::frameRequestQueue):
1124         (WebCore::ImageFrameCache::startAsyncDecodingQueue):
1125         (WebCore::ImageFrameCache::requestFrameAsyncDecodingAtIndex):
1126         (WebCore::ImageFrameCache::stopAsyncDecodingQueue):
1127         * platform/graphics/ImageFrameCache.h:
1128
1129 2017-09-22  Zalan Bujtas  <zalan@apple.com>
1130
1131         WeakPtrFactory should populate m_ref lazily.
1132         https://bugs.webkit.org/show_bug.cgi?id=177375
1133
1134         Reviewed by Geoffrey Garen.
1135
1136         * Modules/encryptedmedia/CDM.cpp:
1137         (WebCore::CDM::CDM):
1138         * Modules/encryptedmedia/CDM.h:
1139         (WebCore::CDM::createWeakPtr):
1140         * Modules/encryptedmedia/MediaKeySession.cpp:
1141         (WebCore::MediaKeySession::MediaKeySession):
1142         (WebCore::MediaKeySession::generateRequest):
1143         (WebCore::MediaKeySession::load):
1144         (WebCore::MediaKeySession::update):
1145         (WebCore::MediaKeySession::close):
1146         (WebCore::MediaKeySession::remove):
1147         * Modules/encryptedmedia/MediaKeys.cpp:
1148         (WebCore::MediaKeys::MediaKeys):
1149         (WebCore::MediaKeys::createSession):
1150         * Modules/mediastream/MediaDevices.cpp:
1151         (WebCore::MediaDevices::MediaDevices):
1152         * Modules/mediastream/MediaDevices.h:
1153         (WebCore::MediaDevices::createWeakPtr):
1154         * Modules/mediastream/MediaStreamTrack.cpp:
1155         (WebCore::MediaStreamTrack::MediaStreamTrack):
1156         * Modules/mediastream/MediaStreamTrack.h:
1157         (WebCore::MediaStreamTrack::createWeakPtr):
1158         * accessibility/AccessibilityRenderObject.cpp:
1159         (WebCore::AccessibilityRenderObject::AccessibilityRenderObject):
1160         * accessibility/AccessibilityRenderObject.h:
1161         (WebCore::AccessibilityRenderObject::createWeakPtr):
1162         * animation/WebAnimation.cpp:
1163         (WebCore::WebAnimation::WebAnimation):
1164         * animation/WebAnimation.h:
1165         * css/FontFace.cpp:
1166         (WebCore::FontFace::FontFace):
1167         (WebCore::FontFace::createWeakPtr):
1168         (WebCore::FontFace::createWeakPtr const): Deleted.
1169         * css/FontFace.h:
1170         * css/StyleSheetContents.h:
1171         * dom/DataTransferItemList.cpp:
1172         (WebCore::DataTransferItemList::DataTransferItemList):
1173         (WebCore::DataTransferItemList::add):
1174         (WebCore::DataTransferItemList::ensureItems const):
1175         (WebCore::DataTransferItemList::didSetStringData):
1176         * dom/Document.cpp:
1177         (WebCore::Document::postTask):
1178         * dom/Document.h:
1179         (WebCore::Document::createWeakPtr):
1180         * html/HTMLMediaElement.cpp:
1181         (WebCore::HTMLMediaElement::HTMLMediaElement):
1182         * html/HTMLMediaElement.h:
1183         (WebCore::HTMLMediaElement::createWeakPtr):
1184         * html/HTMLPictureElement.h:
1185         * html/parser/HTMLResourcePreloader.h:
1186         (WebCore::HTMLResourcePreloader::HTMLResourcePreloader):
1187         (WebCore::HTMLResourcePreloader::createWeakPtr):
1188         * loader/LinkLoader.cpp:
1189         (WebCore::LinkLoader::LinkLoader):
1190         * loader/LinkLoader.h:
1191         (WebCore::LinkLoader::createWeakPtr):
1192         * loader/MediaResourceLoader.cpp:
1193         (WebCore::MediaResourceLoader::MediaResourceLoader):
1194         * loader/MediaResourceLoader.h:
1195         * page/DOMWindow.cpp:
1196         (WebCore::DOMWindow::DOMWindow):
1197         * page/DOMWindow.h:
1198         * platform/GenericTaskQueue.cpp:
1199         (WebCore::TaskDispatcher<Timer>::TaskDispatcher):
1200         (WebCore::TaskDispatcher<Timer>::postTask):
1201         * platform/GenericTaskQueue.h:
1202         (WebCore::GenericTaskQueue::GenericTaskQueue):
1203         (WebCore::GenericTaskQueue::enqueueTask):
1204         * platform/ScrollableArea.h:
1205         (WebCore::ScrollableArea::createWeakPtr):
1206         * platform/Scrollbar.cpp:
1207         (WebCore::Scrollbar::Scrollbar):
1208         * platform/Scrollbar.h:
1209         (WebCore::Scrollbar::createWeakPtr):
1210         * platform/Widget.h:
1211         (WebCore::Widget::createWeakPtr):
1212         * platform/audio/mac/AudioHardwareListenerMac.cpp:
1213         (WebCore::AudioHardwareListenerMac::AudioHardwareListenerMac):
1214         * platform/graphics/FontCascade.cpp:
1215         (WebCore::FontCascade::FontCascade):
1216         * platform/graphics/FontCascade.h:
1217         (WebCore::FontCascade::createWeakPtr const):
1218         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1219         (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
1220         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1221         (WebCore::MediaPlayerPrivateAVFoundation::createWeakPtr):
1222         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
1223         (WebCore::CDMSessionAVFoundationObjC::createWeakPtr):
1224         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
1225         (WebCore::CDMSessionAVFoundationObjC::CDMSessionAVFoundationObjC):
1226         * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
1227         (WebCore::CDMSessionAVStreamSession::CDMSessionAVStreamSession):
1228         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1229         (WebCore::MediaPlayerPrivateAVFoundationObjC::createWeakPtr):
1230         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1231         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
1232         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1233         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::createWeakPtr):
1234         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1235         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
1236         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::sizeWillChangeAtTime):
1237         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
1238         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
1239         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC):
1240         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
1241         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1242         (WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
1243         (WebCore::SourceBufferPrivateAVFObjC::append):
1244         (WebCore::SourceBufferPrivateAVFObjC::abort):
1245         * platform/graphics/cv/TextureCacheCV.mm:
1246         (WebCore::TextureCacheCV::TextureCacheCV):
1247         (WebCore::TextureCacheCV::textureFromImage):
1248         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
1249         (WebCore::DisplayRefreshMonitorMac::DisplayRefreshMonitorMac):
1250         (WebCore::DisplayRefreshMonitorMac::displayLinkFired):
1251         * platform/ios/RemoteCommandListenerIOS.h:
1252         (WebCore::RemoteCommandListenerIOS::createWeakPtr):
1253         * platform/ios/RemoteCommandListenerIOS.mm:
1254         (WebCore::RemoteCommandListenerIOS::RemoteCommandListenerIOS):
1255         * platform/mac/RemoteCommandListenerMac.h:
1256         (WebCore::RemoteCommandListenerMac::createWeakPtr):
1257         * platform/mediastream/MediaStreamPrivate.cpp:
1258         (WebCore::MediaStreamPrivate::MediaStreamPrivate):
1259         * platform/mediastream/MediaStreamPrivate.h:
1260         (WebCore::MediaStreamPrivate::createWeakPtr):
1261         * platform/mediastream/RealtimeMediaSource.cpp:
1262         (WebCore::RealtimeMediaSource::RealtimeMediaSource):
1263         * platform/mediastream/RealtimeMediaSource.h:
1264         * platform/mock/MockMediaEndpoint.cpp:
1265         (WebCore::MockMediaEndpoint::MockMediaEndpoint):
1266         (WebCore::MockMediaEndpoint::generateDtlsInfo):
1267         * rendering/RenderMultiColumnSpannerPlaceholder.cpp:
1268         (WebCore::RenderMultiColumnSpannerPlaceholder::RenderMultiColumnSpannerPlaceholder):
1269         * rendering/RenderMultiColumnSpannerPlaceholder.h:
1270         * rendering/RenderView.cpp:
1271         (WebCore::RenderView::RenderView):
1272         * rendering/RenderView.h:
1273         * rendering/RenderWidget.cpp:
1274         (WebCore::RenderWidget::RenderWidget):
1275         * rendering/RenderWidget.h:
1276         (WebCore::RenderWidget::createWeakPtr):
1277         * rendering/RootInlineBox.cpp:
1278         (WebCore::RootInlineBox::RootInlineBox):
1279         * rendering/RootInlineBox.h:
1280         (WebCore::RootInlineBox::createWeakPtr):
1281         * svg/SVGPathElement.cpp:
1282         (WebCore::SVGPathElement::SVGPathElement):
1283         * svg/SVGPathElement.h:
1284         * svg/properties/SVGMatrixTearOff.h:
1285         * testing/MockCDMFactory.cpp:
1286         (WebCore::MockCDMFactory::MockCDMFactory):
1287         (WebCore::MockCDMFactory::createCDM):
1288         (WebCore::MockCDM::MockCDM):
1289         (WebCore::MockCDM::createInstance):
1290         (WebCore::m_weakPtrFactory): Deleted.
1291
1292 2017-09-22  Tim Horton  <timothy_horton@apple.com>
1293
1294         Add env() as an alias of constant()
1295         https://bugs.webkit.org/show_bug.cgi?id=177371
1296
1297         Reviewed by Simon Fraser.
1298
1299         * css/CSSValueKeywords.in:
1300         * css/CSSVariableData.cpp:
1301         (WebCore::CSSVariableData::checkVariablesForCyclesWithRange const):
1302         (WebCore::CSSVariableData::resolveTokenRange const):
1303         * css/parser/CSSVariableParser.cpp:
1304         (WebCore::classifyBlock):
1305         Add env() as an alias of constant() everywhere it is mentioned.
1306
1307 2017-09-22  Basuke Suzuki  <Basuke.Suzuki@sony.com>
1308
1309         [Curl] Use didReceiveBuffer instead of didReceiveData
1310         https://bugs.webkit.org/show_bug.cgi?id=177260
1311
1312         Reviewed by Alex Christensen.
1313
1314         * platform/network/curl/CurlCacheEntry.cpp:
1315         (WebCore::CurlCacheEntry::readCachedData):
1316         * platform/network/curl/MultipartHandle.cpp:
1317         (WebCore::MultipartHandle::didReceiveData):
1318         * platform/network/curl/ResourceHandleCurlDelegate.cpp:
1319         (WebCore::ResourceHandleCurlDelegate::didReceiveContentData):
1320         (WebCore::ResourceHandleCurlDelegate::handleDataURL):
1321         (WebCore::ResourceHandleCurlDelegate::didReceiveData):
1322         (WebCore::ResourceHandleCurlDelegate::didReceiveDataCallback):
1323         * platform/network/curl/ResourceHandleCurlDelegate.h:
1324
1325 2017-09-22  John Wilander  <wilander@apple.com>
1326
1327         Non-prevalent resources should be allowed access to existing cookies in a third-party context
1328         https://bugs.webkit.org/show_bug.cgi?id=177336
1329         <rdar://problem/34578257>
1330
1331         Reviewed by Brent Fulgham.
1332
1333         No new tests. I will update existing tests and add at least
1334         one new test in a follow-up patch,
1335         see https://bugs.webkit.org/show_bug.cgi?id=177337. Need to
1336         land this to meet submission deadline and fix the regression.
1337
1338         This patch restructures what is communicated to the network process,
1339         from two vectors - with user interaction and without user interaction -
1340         to three vectors - to partition, to block, to neither partition nor block.
1341         The previous two vectors did not allow proper categorization into which
1342         domains should be partitioned, blocked, or left alone. That was the cause
1343         of the regression where non-prevalent third-party domains erroneously had
1344         their cookies blocked when they should fall back to the old behavior of
1345         access but no new cookies allowed to be set.
1346
1347         * loader/ResourceLoadStatistics.cpp:
1348         (WebCore::ResourceLoadStatistics::toString const):
1349         (WebCore::ResourceLoadStatistics::merge):
1350         * loader/ResourceLoadStatistics.h:
1351         * platform/network/NetworkStorageSession.h:
1352         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
1353         (WebCore::NetworkStorageSession::shouldPartitionCookies const):
1354         (WebCore::NetworkStorageSession::shouldBlockThirdPartyCookies const):
1355         (WebCore::NetworkStorageSession::shouldBlockCookies const):
1356         (WebCore::NetworkStorageSession::setPrevalentDomainsToPartitionOrBlockCookies):
1357         (WebCore::NetworkStorageSession::removePrevalentDomains):
1358         (WebCore::NetworkStorageSession::shouldAllowThirdPartyCookies const): Deleted.
1359         (WebCore::NetworkStorageSession::setPrevalentDomainsWithAndWithoutInteraction): Deleted.
1360         * platform/network/mac/CookieJarMac.mm:
1361         (WebCore::cookiesInBlockedForURL):
1362         (WebCore::cookiesForURL):
1363
1364 2017-09-22  Fujii Hironori  <Hironori.Fujii@sony.com>
1365
1366         [CMake][Win] EventTargetInterfaces.h are generated twice
1367         https://bugs.webkit.org/show_bug.cgi?id=177286
1368
1369         Reviewed by Brent Fulgham.
1370
1371         EventTargetInterfaces.h are generated twice in both
1372         WebCoreDerivedSources.vcxproj and WebCore.vcxproj. This causes
1373         unnecessary recompilation in CMake VisualStudio build.
1374
1375         WebCore target already has a dependency to WebCoreDerivedSources
1376         target by calling add_dependencies. WebCore target doesn't need to
1377         generate it.
1378
1379         * CMakeLists.txt: Don't ADD_SOURCE_WEBCORE_DERIVED_DEPENDENCIES with EventTargetInterfaces.h.
1380
1381 2017-09-22  Antti Koivisto  <antti@apple.com>
1382
1383         Add asserts against layout time render tree mutations
1384         https://bugs.webkit.org/show_bug.cgi?id=177361
1385
1386         Reviewed by Zalan Bujtas.
1387
1388         We don't have any mutations left. Add asserts.
1389
1390         * rendering/RenderElement.cpp:
1391         (WebCore::RenderElement::insertChildInternal):
1392         (WebCore::RenderElement::removeChildInternal):
1393
1394 2017-09-22  Chris Dumez  <cdumez@apple.com>
1395
1396         Use high resolution timestamp for event time
1397         https://bugs.webkit.org/show_bug.cgi?id=154246
1398         <rdar://problem/34333304>
1399
1400         Reviewed by Ryosuke Niwa.
1401
1402         Have event.timeStamp return a DOMHighResTimeStamp instead of a DOMResTimeStamp. It now
1403         has better precision, is monotonic and is relative to PerformanceTiming.navigationStart.
1404
1405         This is as per:
1406         - https://dom.spec.whatwg.org/#interface-event
1407
1408         Chrome, Firefox and Edge all already ship this so the compatibility risk should be low.
1409
1410         Also use WallTime / MonotonicTime instead of double type for clarity.
1411
1412         Test: imported/w3c/web-platform-tests/dom/events/Event-timestamp-high-resolution.html
1413
1414         * WebCore.xcodeproj/project.pbxproj:
1415         * dom/DOMHighResTimeStamp.h: Copied from Source/WebKit/Shared/WebTouchEvent.cpp.
1416         * dom/Element.cpp:
1417         (WebCore::Element::dispatchMouseForceWillBegin):
1418         * dom/Event.cpp:
1419         (WebCore::Event::Event):
1420         (WebCore::Event::timeStampForBindings const):
1421         * dom/Event.h:
1422         (WebCore::Event::timeStamp const):
1423         * dom/Event.idl:
1424         * dom/KeyboardEvent.cpp:
1425         (WebCore::KeyboardEvent::KeyboardEvent):
1426         * dom/MouseEvent.cpp:
1427         (WebCore::MouseEvent::create):
1428         (WebCore::MouseEvent::MouseEvent):
1429         * dom/MouseEvent.h:
1430         * dom/MouseRelatedEvent.cpp:
1431         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
1432         * dom/MouseRelatedEvent.h:
1433         * dom/SimulatedClick.cpp:
1434         * dom/TouchEvent.cpp:
1435         (WebCore::TouchEvent::TouchEvent):
1436         * dom/UIEvent.cpp:
1437         (WebCore::UIEvent::UIEvent):
1438         * dom/UIEvent.h:
1439         * dom/UIEventWithKeyState.h:
1440         (WebCore::UIEventWithKeyState::UIEventWithKeyState):
1441         * dom/WheelEvent.cpp:
1442         (WebCore::WheelEvent::WheelEvent):
1443         * html/TypeAhead.cpp:
1444         (WebCore::TypeAhead::TypeAhead):
1445         (WebCore::TypeAhead::handleEvent):
1446         * html/TypeAhead.h:
1447         * page/AutoscrollController.cpp:
1448         (WebCore::AutoscrollController::AutoscrollController):
1449         (WebCore::AutoscrollController::updateDragAndDrop):
1450         (WebCore::AutoscrollController::autoscrollTimerFired):
1451         * page/AutoscrollController.h:
1452         * page/ContextMenuController.cpp:
1453         (WebCore::ContextMenuController::showContextMenuAt):
1454         * page/DragController.cpp:
1455         (WebCore::createMouseEvent):
1456         * page/EventHandler.cpp:
1457         (WebCore::EventHandler::dispatchDragEvent):
1458         (WebCore::EventHandler::sendContextMenuEventForKey):
1459         (WebCore::EventHandler::fakeMouseMoveEventTimerFired):
1460         * page/EventHandler.h:
1461         * page/Performance.cpp:
1462         (WebCore::Performance::now const):
1463         (WebCore::Performance::relativeTimeFromTimeOriginInReducedResolution const):
1464         * page/Performance.h:
1465         * page/ios/EventHandlerIOS.mm:
1466         (WebCore::EventHandler::tryToBeginDataInteractionAtPoint):
1467         * page/win/EventHandlerWin.cpp:
1468         * platform/PlatformEvent.h:
1469         (WebCore::PlatformEvent::timestamp const):
1470         (WebCore::PlatformEvent::PlatformEvent):
1471         * platform/PlatformKeyboardEvent.h:
1472         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1473         * platform/PlatformMouseEvent.h:
1474         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
1475         * platform/PlatformWheelEvent.h:
1476         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1477         * platform/cocoa/ScrollController.mm:
1478         (WebCore::ScrollController::handleWheelEvent):
1479         * platform/glib/EventHandlerGLib.cpp:
1480         * platform/gtk/ScrollAnimatorGtk.cpp:
1481         (WebCore::ScrollAnimatorGtk::computeVelocity):
1482         (WebCore::ScrollAnimatorGtk::handleWheelEvent):
1483         * platform/ios/PlatformEventFactoryIOS.mm:
1484         (WebCore::PlatformMouseEventBuilder::PlatformMouseEventBuilder):
1485         (WebCore::PlatformWheelEventBuilder::PlatformWheelEventBuilder):
1486         (WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder):
1487         (WebCore::PlatformTouchEventBuilder::PlatformTouchEventBuilder):
1488         * platform/mac/PlatformEventFactoryMac.h:
1489         * platform/mac/PlatformEventFactoryMac.mm:
1490         (WebCore::eventTimeStampSince1970):
1491
1492 2017-09-22  Nael Ouedraogo  <nael.ouedraogo@crf.canon.fr>
1493
1494         [GTK] HTMLMediaElement resize event not fired when video size changes
1495         https://bugs.webkit.org/show_bug.cgi?id=174582
1496
1497         Reviewed by Xabier Rodriguez-Calvar.
1498
1499         Modify AppendPipeline to notify MediaPlayerPrivateGStreamerMSE that a track is detected
1500         not only for the initial track detection but also for subsequent in particular when the
1501         video size has changed.
1502
1503         Update test expectation for new passing tests.
1504
1505         * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
1506         (WebCore::AppendPipeline::appsinkCapsChanged):
1507         (WebCore::AppendPipeline::connectDemuxerSrcPadToAppsink):
1508         * platform/graphics/gstreamer/mse/AppendPipeline.h:
1509         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
1510         (WebCore::MediaPlayerPrivateGStreamerMSE::trackDetected):
1511         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:
1512         * platform/graphics/gstreamer/mse/PlaybackPipeline.cpp:
1513         (WebCore::PlaybackPipeline::reattachTrack):
1514         * platform/graphics/gstreamer/mse/PlaybackPipeline.h:
1515
1516 2017-09-22  Ms2ger  <Ms2ger@igalia.com>
1517
1518         [GTK] Couple of pasteboard related tests are failing after r222228
1519         https://bugs.webkit.org/show_bug.cgi?id=177295
1520
1521         Reviewed by Michael Catanzaro.
1522
1523         Call writeToClipboard() from Pasteboard::writeString() on GTK.
1524
1525         When writePasteboard was replaced by commitToPasteboard in r222228,
1526         the call to writeToClipboard() did not make it into the
1527         platform-neutral code. This attempts to find another place in the
1528         GTK-specific code to make the call.
1529
1530         Tests: editing/pasteboard/copy-without-selection.html
1531                editing/pasteboard/pasting-empty-html-falls-back-to-text.html
1532
1533         * platform/gtk/PasteboardGtk.cpp:
1534         (WebCore::Pasteboard::writeString):
1535
1536 2017-09-21  Brent Fulgham  <bfulgham@apple.com>
1537
1538         REGRESSION (r221017): iCloud mail logs me out after looking at a few messages
1539         https://bugs.webkit.org/show_bug.cgi?id=177328
1540
1541         Reviewed by Daniel Bates.
1542         <rdar://problem/34288629>
1543
1544         Reviewed by Dan Bates.
1545
1546         This site was triggering a log-out because the page was loading insecure images. We don't treat that as a security
1547         issue for deciding to display mixed content since it can only affect pixels on screen, not trigger a change in
1548         program logic or persistent storage.
1549
1550         Consequently, we can correct thsi compatibility problem without relaxing the security fix by not blocking Secure cookies
1551         when we have merely displayed mixed content (i.e., encountered 'Inactive' mixed content), as opposed to executing mixed
1552         content (i.e., loaded 'Active' mixed content).
1553
1554         * Modules/geolocation/Geolocation.cpp:
1555         (WebCore::Geolocation::shouldBlockGeolocationRequests): Revise for new API.
1556         * dom/SecurityContext.h:
1557         (WebCore::SecurityContext::foundMixedContent const): Change to return an OptionSet of
1558         mixed content types.
1559         (WebCore::SecurityContext::setFoundMixedContent): Accept an enum stating the type of mixed content found.
1560         * loader/CookieJar.cpp:
1561         (WebCore::cookies): Only block Secure cookies for Active mixed content.
1562         (WebCore::cookieRequestHeaderFieldValue): Ditto.
1563         * loader/MixedContentChecker.cpp:
1564         (WebCore::MixedContentChecker::canDisplayInsecureContent const): Mark the context as having found 'Inactive'
1565         mixed content.
1566         (WebCore::MixedContentChecker::canRunInsecureContent const): Mark the context as having found 'Active'
1567         mixed content.
1568
1569 2017-09-21  Simon Fraser  <simon.fraser@apple.com>
1570
1571         Clean up RenderLayer z-order traversal code
1572         https://bugs.webkit.org/show_bug.cgi?id=177325
1573
1574         Reviewed by Zalan Bujtas.
1575
1576         Remove isStackingContainer() checks before accessing posZOrderList() or negZOrderList();
1577         we already have assertions in place to ensure that only stacking containers have non-null lists.
1578
1579         Use more auto.
1580
1581         No behavior change.
1582
1583         * rendering/RenderLayer.cpp:
1584         (WebCore::RenderLayer::update3DTransformedDescendantStatus):
1585         (WebCore::RenderLayer::calculateClipRects const):
1586         * rendering/RenderLayerBacking.cpp:
1587         (WebCore::traverseVisibleNonCompositedDescendantLayers):
1588         * rendering/RenderLayerCompositor.cpp:
1589         (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
1590         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1591         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
1592         (WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
1593         (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):
1594         (WebCore::RenderLayerCompositor::recursiveRepaintLayer):
1595         (WebCore::RenderLayerCompositor::layerHas3DContent const):
1596         * rendering/RenderTreeAsText.cpp:
1597         (WebCore::writeLayers):
1598
1599 2017-09-21  Per Arne Vollan  <pvollan@apple.com>
1600
1601         Unreviewed Windows build fix after r222360.
1602
1603         * PlatformWin.cmake:
1604
1605 2017-09-21  Youenn Fablet  <youenn@apple.com>
1606
1607         Remove the need for SetterMayThrowException
1608         https://bugs.webkit.org/show_bug.cgi?id=177099
1609
1610         Reviewed by Sam Weinig.
1611
1612         No change of behavior.
1613         Introducing AttributeSetter to handle exception raising attribute setters,
1614         based on the C++ class method instead of SetterMayThrowException.
1615         A follow-up patch should remove SetterMayThrowException from the IDLs
1616
1617         * bindings/js/JSDOMAttribute.h:
1618         (WebCore::AttributeSetter<ExceptionOr<void>>::call):
1619         (WebCore::AttributeSetter<void>::call):
1620         * bindings/scripts/CodeGeneratorJS.pm:
1621         (GenerateAttributeSetterBodyDefinition):
1622         * bindings/scripts/test/JS/JSTestCEReactions.cpp:
1623         * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
1624         * bindings/scripts/test/JS/JSTestCallTracer.cpp:
1625         * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
1626         * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
1627         * bindings/scripts/test/JS/JSTestInterface.cpp:
1628         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
1629         * bindings/scripts/test/JS/JSTestNode.cpp:
1630         * bindings/scripts/test/JS/JSTestObj.cpp:
1631         * bindings/scripts/test/JS/JSTestSerialization.cpp:
1632         * bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
1633         * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
1634         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1635         * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
1636         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1637
1638 2017-09-21  Ryosuke Niwa  <rniwa@webkit.org>
1639
1640         DataTransfer.items should contain text/html and text/uri-list
1641         https://bugs.webkit.org/show_bug.cgi?id=176772
1642         <rdar://problem/34386899>
1643
1644         Reviewed by Darin Adler.
1645
1646         Expose text/html and text/uri-list in dataTransfer.items.
1647
1648         Tests: editing/pasteboard/datatransfer-items-copy-html.html
1649                editing/pasteboard/datatransfer-items-copy-url.html
1650
1651         * dom/DataTransferItemList.cpp:
1652         (WebCore::isSupportedType): Added both MIME types.
1653         (WebCore::DataTransferItemList::add): Fixed the bug that new data transfer item was using
1654         the original type string instead of the lowercased one.
1655
1656 2017-09-21  Per Arne Vollan  <pvollan@apple.com>
1657
1658         [Win] Compile error, PALHeaderDetection.h not found.
1659         https://bugs.webkit.org/show_bug.cgi?id=177309
1660
1661         Reviewed by Brent Fulgham.
1662
1663         Copy PAL header files to WebCore forwarding headers folder.
1664
1665         * PlatformWin.cmake:
1666
1667 2017-09-21  Joseph Pecoraro  <pecoraro@apple.com>
1668
1669         Web Inspector: Remove support for CSS Regions
1670         https://bugs.webkit.org/show_bug.cgi?id=177287
1671
1672         Reviewed by Matt Baker.
1673
1674         * inspector/InspectorCSSAgent.cpp:
1675         (WebCore::InspectorCSSAgent::getNamedFlowCollection): Deleted.
1676         * inspector/InspectorCSSAgent.h:
1677         * inspector/InspectorOverlay.cpp:
1678         (WebCore::buildRendererHighlight):
1679         (WebCore::buildNodeHighlight):
1680         (WebCore::InspectorOverlay::getHighlight const):
1681         (WebCore::buildArrayForRendererFragments):
1682         (WebCore::buildQuadObjectForCSSRegionContentClip): Deleted.
1683         * inspector/InspectorOverlayPage.js:
1684         (_createElementTitle):
1685         (_drawElementTitle):
1686         (_drawFragmentHighlight):
1687         (drawNodeHighlight):
1688         (_drawRegionNumber): Deleted.
1689         (_quadMidPoint): Deleted.
1690         (_drawRegionLink): Deleted.
1691         (_drawRegionsHighlight): Deleted.
1692
1693 2017-09-21  Antti Koivisto  <antti@apple.com>
1694
1695         Remove some more code from RenderFlowThread
1696         https://bugs.webkit.org/show_bug.cgi?id=177320
1697
1698         Reviewed by David Hyatt.
1699
1700         More dead code related to named flows.
1701
1702         * rendering/RenderFlowThread.cpp:
1703         (WebCore::RenderFlowThread::RenderFlowThread):
1704         (WebCore::RenderFlowThread::invalidateRegions):
1705         (WebCore::RenderFlowThread::layout):
1706         (WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
1707         (WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
1708         (WebCore::RenderFlowThread::addForcedRegionBreak):
1709         (WebCore::RenderFlowThread::offsetFromLogicalTopOfFirstRegion const):
1710         (WebCore::RenderFlowThread::hasCachedOffsetFromLogicalTopOfFirstRegion const): Deleted.
1711         (WebCore::RenderFlowThread::cachedOffsetFromLogicalTopOfFirstRegion const): Deleted.
1712         (WebCore::RenderFlowThread::setOffsetFromLogicalTopOfFirstRegion): Deleted.
1713         (WebCore::RenderFlowThread::clearOffsetFromLogicalTopOfFirstRegion): Deleted.
1714         (WebCore::RenderFlowThread::currentActiveRenderBox const): Deleted.
1715         (WebCore::RenderFlowThread::pushFlowThreadLayoutState): Deleted.
1716         (WebCore::RenderFlowThread::popFlowThreadLayoutState): Deleted.
1717         * rendering/RenderFlowThread.h:
1718
1719 2017-09-21  Chris Dumez  <cdumez@apple.com>
1720
1721         eventInitDict parameter to GamepadEvent constructor should be optional
1722         https://bugs.webkit.org/show_bug.cgi?id=177308
1723
1724         Reviewed by Sam Weinig.
1725
1726         eventInitDict parameter to GamepadEvent constructor should be optional to match Firefox
1727         and Chrome. Having such dictionary parameter is also not valid Web IDL:
1728         """
1729         If the type of an argument is a dictionary type (or a union type that has a dictionary as one
1730         of its flattened member types), and that dictionary type and its ancestors have no required
1731         members, and the argument is either the final argument or is followed only by optional arguments,
1732         then the argument must be specified as optional. Such arguments are always considered to have a
1733         default value of an empty dictionary, unless otherwise specified.
1734         """
1735
1736         Test: gamepad/gamepad-event.html
1737
1738         * Modules/gamepad/GamepadEvent.idl:
1739
1740 2017-09-21  Brian Burg  <bburg@apple.com>
1741
1742         Web Inspector: keyboard shortcut for "Reload page from origin" doesn't match Safari, and doesn't work
1743         https://bugs.webkit.org/show_bug.cgi?id=177010
1744         <rdar://problem/33134548>
1745
1746         Reviewed by Joseph Pecoraro.
1747
1748         Use "reload from origin" nomenclature instead of "reload ignoring cache".
1749
1750         * inspector/InspectorPageAgent.cpp:
1751         (WebCore::InspectorPageAgent::reload):
1752         * inspector/InspectorPageAgent.h:
1753
1754 2017-09-21  Antti Koivisto  <antti@apple.com>
1755
1756         Remove RenderNamedFlowFragment
1757         https://bugs.webkit.org/show_bug.cgi?id=177299
1758
1759         Reviewed by David Hyatt.
1760
1761         Remove the remaining named flow rendering code.
1762
1763         The feature is already disabled, no functional changes.
1764
1765         * WebCore.xcodeproj/project.pbxproj:
1766         * rendering/RenderBlock.cpp:
1767         (WebCore::RenderBlock::paint):
1768         (WebCore::RenderBlock::selectionGaps):
1769         (WebCore::RenderBlock::nodeAtPoint):
1770         * rendering/RenderBlockFlow.cpp:
1771         (WebCore::RenderBlockFlow::insertedIntoTree):
1772         (WebCore::RenderBlockFlow::willBeDestroyed):
1773         (WebCore::RenderBlockFlow::layoutBlock):
1774         (WebCore::RenderBlockFlow::styleDidChange):
1775         (WebCore::RenderBlockFlow::updateLogicalHeight):
1776         (WebCore::RenderBlockFlow::positionForPoint):
1777         (WebCore::RenderBlockFlow::createRenderNamedFlowFragmentIfNeeded): Deleted.
1778         (WebCore::RenderBlockFlow::canHaveChildren const): Deleted.
1779         (WebCore::RenderBlockFlow::canHaveGeneratedChildren const): Deleted.
1780         (WebCore::RenderBlockFlow::namedFlowFragmentNeedsUpdate const): Deleted.
1781         (WebCore::RenderBlockFlow::setRenderNamedFlowFragment): Deleted.
1782         * rendering/RenderBlockFlow.h:
1783         (WebCore::RenderBlockFlow::RenderBlockFlowRareData::RenderBlockFlowRareData):
1784         (WebCore::RenderBlockFlow::renderNamedFlowFragment const): Deleted.
1785         (WebCore::RenderElement::isRenderNamedFlowFragmentContainer const): Deleted.
1786         * rendering/RenderBox.cpp:
1787         (WebCore::RenderBox::nodeAtPoint):
1788         (WebCore::RenderBox::paintBoxDecorations):
1789         (WebCore::RenderBox::pushContentsClip):
1790         (WebCore::RenderBox::mapLocalToContainer const):
1791         (WebCore::RenderBox::isUnsplittableForPagination const):
1792         (WebCore::RenderBox::overflowRectForPaintRejection const):
1793         * rendering/RenderBox.h:
1794         * rendering/RenderBoxModelObject.cpp:
1795         (WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
1796         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1797         * rendering/RenderBoxModelObject.h:
1798         * rendering/RenderElement.h:
1799         (WebCore::RenderElement::generatingElement const):
1800         * rendering/RenderFlowThread.cpp:
1801         (WebCore::RenderFlowThread::RenderFlowThread):
1802         (WebCore::RenderFlowThread::invalidateRegions):
1803         (WebCore::RenderFlowThread::validateRegions):
1804         (WebCore::RenderFlowThread::layout):
1805         (WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent const):
1806         (WebCore::RenderFlowThread::clearRenderBoxRegionInfoAndCustomStyle):
1807         (WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
1808         (WebCore::RenderFlowThread::addForcedRegionBreak):
1809         (WebCore::RenderFlowThread::hasCompositingRegionDescendant const): Deleted.
1810         (WebCore::RenderFlowThread::getLayerListForRegion const): Deleted.
1811         (WebCore::RenderFlowThread::regionForCompositedLayer const): Deleted.
1812         (WebCore::RenderFlowThread::cachedRegionForCompositedLayer const): Deleted.
1813         (WebCore::RenderFlowThread::updateLayerToRegionMappings): Deleted.
1814         (WebCore::RenderFlowThread::updateAllLayerToRegionMappings): Deleted.
1815         (WebCore::RenderFlowThread::collectsGraphicsLayersUnderRegions const): Deleted.
1816         (WebCore::RenderFlowThread::isAutoLogicalHeightRegionsCountConsistent const): Deleted.
1817         (WebCore::RenderFlowThread::initializeRegionsComputedAutoHeight): Deleted.
1818         (WebCore::RenderFlowThread::markAutoLogicalHeightRegionsForLayout): Deleted.
1819         (WebCore::RenderFlowThread::incrementAutoLogicalHeightRegions): Deleted.
1820         (WebCore::RenderFlowThread::decrementAutoLogicalHeightRegions): Deleted.
1821         * rendering/RenderFlowThread.h:
1822         * rendering/RenderLayer.cpp:
1823         (WebCore::RenderLayer::updateLayerPositions):
1824         (WebCore::expandClipRectForDescendantsAndReflection):
1825         (WebCore::RenderLayer::paintLayer):
1826         (WebCore::RenderLayer::paintLayerContents):
1827         (WebCore::RenderLayer::paintList):
1828         (WebCore::isHitCandidate):
1829         (WebCore::RenderLayer::hitTestLayer):
1830         (WebCore::RenderLayer::hitTestList):
1831         (WebCore::RenderLayer::calculateClipRects const):
1832         (WebCore::expandClipRectForRegionAndReflection): Deleted.
1833         (WebCore::RenderLayer::isFlowThreadCollectingGraphicsLayersUnderRegions const): Deleted.
1834         (WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer const): Deleted.
1835         * rendering/RenderLayer.h:
1836         * rendering/RenderLayerBacking.cpp:
1837         (WebCore::RenderLayerBacking::shouldClipCompositedBounds const):
1838         (WebCore::RenderLayerBacking::computeParentGraphicsLayerRect const):
1839         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer const):
1840         (WebCore::RenderLayerBacking::adjustAncestorCompositingBoundsForFlowThread const): Deleted.
1841         * rendering/RenderLayerBacking.h:
1842         * rendering/RenderLayerCompositor.cpp:
1843         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1844         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
1845         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason const):
1846         (WebCore::RenderLayerCompositor::styleChangeMayAffectIndirectCompositingReasons):
1847         (WebCore::RenderLayerCompositor::requiresCompositingForPosition const):
1848         (WebCore::RenderLayerCompositor::computeRegionCompositingRequirements): Deleted.
1849         (WebCore::RenderLayerCompositor::rebuildRegionCompositingLayerTree): Deleted.
1850         * rendering/RenderLayerCompositor.h:
1851         * rendering/RenderNamedFlowFragment.cpp: Removed.
1852         * rendering/RenderNamedFlowFragment.h: Removed.
1853         * rendering/RenderObject.cpp:
1854         (WebCore::RenderObject::containerForRepaint const):
1855         (WebCore::RenderObject::fixedPositionedWithNamedFlowContainingBlock const): Deleted.
1856         (WebCore::hasFixedPosInNamedFlowContainingBlock): Deleted.
1857         (WebCore::RenderObject::currentRenderNamedFlowFragment const): Deleted.
1858         * rendering/RenderObject.h:
1859         (WebCore::RenderObject::isRenderRegion const):
1860         (WebCore::RenderObject::isAnonymousBlock const):
1861         (WebCore::RenderObject::isRenderNamedFlowFragment const): Deleted.
1862         * rendering/RenderRegion.cpp:
1863         * rendering/RenderRegion.h:
1864         (WebCore::RenderRegion::hasAutoLogicalHeight const): Deleted.
1865         * rendering/RenderReplaced.cpp:
1866         (WebCore::RenderReplaced::shouldPaint):
1867         * rendering/RenderTable.cpp:
1868         (WebCore::RenderTable::overflowClipRect):
1869         (WebCore::RenderTable::nodeAtPoint):
1870         * rendering/RenderTableSection.cpp:
1871         (WebCore::RenderTableSection::nodeAtPoint):
1872         * rendering/RenderTreeAsText.cpp:
1873         (WebCore::writeLayers):
1874         * rendering/RenderView.cpp:
1875         (WebCore::RenderView::layout):
1876         (WebCore::RenderView::pushLayoutState):
1877         (WebCore::RenderView::pushLayoutStateForPaginationIfNeeded):
1878         (WebCore::RenderView::layoutContentInAutoLogicalHeightRegions): Deleted.
1879         (WebCore::RenderView::checkTwoPassLayoutForAutoHeightRegions const): Deleted.
1880         (WebCore::RenderView::pushLayoutStateForCurrentFlowThread): Deleted.
1881         (WebCore::RenderView::popLayoutStateForCurrentFlowThread): Deleted.
1882         * rendering/RenderView.h:
1883         * rendering/RootInlineBox.cpp:
1884         (WebCore::RootInlineBox::paint):
1885         * rendering/svg/RenderSVGRoot.cpp:
1886         (WebCore::RenderSVGRoot::paintReplaced):
1887
1888 2017-09-21  Alex Christensen  <achristensen@webkit.org>
1889
1890         Fix all builds after r222325
1891
1892         * loader/DocumentLoader.h:
1893         WebKit needs this, too.
1894
1895 2017-09-21  Yoshiaki Jitsukawa  <Yoshiaki.Jitsukawa@sony.com>
1896
1897         [PAL] Move MediaTimeAVFoundation into PAL
1898         https://bugs.webkit.org/show_bug.cgi?id=177222
1899
1900         Reviewed by Myles C. Maxfield.
1901
1902         No new tests. No change in behavior..
1903
1904         * Configurations/WebCore.unexp:
1905         * PlatformAppleWin.cmake:
1906         * WebCore.xcodeproj/project.pbxproj:
1907         * platform/audio/mac/AudioSampleDataSource.mm:
1908         (WebCore::AudioSampleDataSource::pushSamples):
1909         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
1910         (WebCore::AudioSourceProviderAVFObjC::process):
1911         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
1912         (WebCore::InbandTextTrackPrivateAVF::readNativeSampleBuffer):
1913         * platform/graphics/avfoundation/MediaSampleAVFObjC.h:
1914         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
1915         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1916         (WebCore::MediaPlayerPrivateAVFoundationCF::platformDuration const):
1917         (WebCore::MediaPlayerPrivateAVFoundationCF::currentMediaTime const):
1918         (WebCore::MediaPlayerPrivateAVFoundationCF::platformBufferedTimeRanges const):
1919         (WebCore::MediaPlayerPrivateAVFoundationCF::platformMinTimeSeekable const):
1920         (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeSeekable const):
1921         (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeLoaded const):
1922         (WebCore::AVFWrapper::seekToTime):
1923         (WebCore::AVFWrapper::legibleOutputCallback):
1924         (WebCore::AVFWrapper::createImageForTimeInRect):
1925         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
1926         (WebCore::ImageDecoderAVFObjC::readSampleMetadata):
1927         (WebCore::ImageDecoderAVFObjC::storeSampleBuffer):
1928         (WebCore::ImageDecoderAVFObjC::createFrameImageAtIndex):
1929         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1930         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration const):
1931         (WebCore::MediaPlayerPrivateAVFoundationObjC::currentMediaTime const):
1932         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime):
1933         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformBufferedTimeRanges const):
1934         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMinTimeSeekable const):
1935         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeSeekable const):
1936         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeLoaded const):
1937         (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
1938         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
1939         (-[WebCoreAVFMovieObserver legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:]):
1940         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1941         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
1942         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentMediaTime const):
1943         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
1944         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationChanged):
1945         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::sizeWillChangeAtTime):
1946         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
1947         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::calculateTimelineOffset):
1948         * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
1949         (WebCore::MediaSampleAVFObjC::presentationTime const):
1950         (WebCore::MediaSampleAVFObjC::outputPresentationTime const):
1951         (WebCore::MediaSampleAVFObjC::decodeTime const):
1952         (WebCore::MediaSampleAVFObjC::duration const):
1953         (WebCore::MediaSampleAVFObjC::outputDuration const):
1954         (WebCore::MediaSampleAVFObjC::offsetTimestampsBy):
1955         (WebCore::MediaSampleAVFObjC::setTimestamps):
1956         (WebCore::MediaSampleAVFObjC::divide):
1957         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1958         (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
1959         * platform/graphics/cocoa/WebCoreDecompressionSession.mm:
1960         (WebCore::WebCoreDecompressionSession::handleDecompressionOutput):
1961         (WebCore::WebCoreDecompressionSession::automaticDequeue):
1962         (WebCore::WebCoreDecompressionSession::enqueueDecodedSample):
1963         (WebCore::WebCoreDecompressionSession::imageForTime):
1964         * platform/mac/PlatformClockCM.mm:
1965         (PlatformClockCM::setCurrentMediaTime):
1966         (PlatformClockCM::currentMediaTime const):
1967         * platform/mac/PlaybackSessionInterfaceMac.mm:
1968         (WebCore::timeRangesToArray):
1969         * platform/mac/VideoFullscreenInterfaceMac.mm:
1970         * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
1971         * platform/mediastream/mac/MockRealtimeAudioSourceMac.mm:
1972         (WebCore::MockRealtimeAudioSourceMac::emitSampleBuffers):
1973         * platform/mediastream/mac/RealtimeIncomingAudioSource.cpp:
1974         (WebCore::RealtimeIncomingAudioSource::OnData):
1975         * platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm:
1976
1977 2017-09-21  Alex Christensen  <achristensen@webkit.org>
1978
1979         Fix ASAN build after r222306
1980         https://bugs.webkit.org/show_bug.cgi?id=177255
1981
1982         * loader/DocumentLoader.cpp:
1983         (WebCore::DocumentLoader::setCustomHeaderFields):
1984         * loader/DocumentLoader.h:
1985         (WebCore::DocumentLoader::setCustomHeaderFields): Deleted.
1986         Moving a Vector of a type requires more than just a forward declaration of the type, but only in ASAN builds.  Weird.
1987
1988 2017-09-21  Zhifei FANG  <facetothefate@gmail.com>
1989
1990         In regular block layout, the width of a child's margin box should always be equal to that of its containing block
1991         Merge from Blink https://bugs.chromium.org/p/chromium/issues/detail?id=708751
1992         https://bugs.webkit.org/show_bug.cgi?id=176620
1993
1994         Reviewed by Zalan Bujtas.
1995
1996         Test: fast/block/over-constrained-auto-margin.html
1997
1998         * rendering/RenderBox.cpp:
1999         (WebCore::RenderBox::computeLogicalWidthInRegion const):
2000
2001 2017-09-21  Javier Fernandez  <jfernandez@igalia.com>
2002
2003         Unpredictable selection when dragging out of float elements children of in-flow block-level box
2004         https://bugs.webkit.org/show_bug.cgi?id=176096
2005
2006         Reviewed by David Hyatt.
2007
2008         In order to improve Selection across float elements we need to
2009         consider them as HitTest candidates.  Additionally, since
2010         out-of-flow elements must not affect how in-flow elements are
2011         rendered we have to deal with some special cases when implementing
2012         the positionForPoint logic.
2013
2014         This patch addresses the issues caused by the fact that an in-flow
2015         box's logicalBottom does not consider the out-of-flow children, as
2016         they don't affect its height. Hence, we should add the lowest float
2017         logical bottom to figure out the box the point is actually hitting.
2018
2019         Tests: editing/selection/select-out-of-floated-non-editable-01.html
2020                editing/selection/select-out-of-floated-non-editable-02.html
2021                editing/selection/select-out-of-floated-non-editable-03.html
2022                editing/selection/select-out-of-floated-non-editable-04.html
2023                editing/selection/select-out-of-floated-non-editable-05.html
2024                editing/selection/select-out-of-floated-non-editable-06.html
2025                editing/selection/select-out-of-floated-non-editable-07.html
2026                editing/selection/select-out-of-floated-non-editable-08.html
2027                editing/selection/select-out-of-floated-non-editable-09.html
2028                editing/selection/select-out-of-floated-non-editable-10.html
2029                editing/selection/select-out-of-floated-non-editable-11.html
2030                editing/selection/select-out-of-floated-non-editable-12.html
2031
2032         * rendering/RenderBlock.cpp:
2033         (WebCore::isChildHitTestCandidate):
2034         (WebCore::RenderBlock::positionForPoint):
2035
2036 2017-09-21  Zan Dobersek  <zdobersek@igalia.com>
2037
2038         [WebCrypto] Support Elliptic Curve P-521
2039         https://bugs.webkit.org/show_bug.cgi?id=169231
2040         <rdar://problem/30881703>
2041
2042         Reviewed by Jiewen Tan.
2043
2044         Add support for the P-521 elliptic curve to the CryptoKeyEC class, but
2045         allow the underlying platform-specific implementations to opt out of
2046         supporting this feature.
2047
2048         This is achieved with the platformSupportedCurve() static function that
2049         each platform has to implement, returning true if the passed-in curve
2050         type is supported. The function is called at each CryptoKeyEC entrypoint,
2051         that is in each static function that could generate a new CryptoKeyEC
2052         object. These functions return a NotSupportedError exception in case the
2053         platformSupportedCurve() call returns false.
2054
2055         While the libgcrypt-based implementation will support P-521 curves in
2056         the near future, the CommonCrypto-based implementation might not. The use
2057         of platformSupportedCurve() ensures that the implementations that don't
2058         support EC P-521 continue to return the NotSupportedError exception at
2059         these entrypoints, instead of the OperationError exception that's returned
2060         when the platform-specific extensions of these entrypoints fail due to the
2061         specified elliptic curve not being supported.
2062
2063         Both libgcrypt-based and CommonCrypto-based implementations mark P-256 and
2064         P-384 curves as supported. Switch statements handling NamedCurve values
2065         must now also handle the NamedCurve::P521 value, but both implementations
2066         treat that as an unreachable case since support is not indicated in
2067         platformSupportedCurve(), and all CryptoKeyEC operations should have
2068         returned with an NotSupportedError exception before entering
2069         platform-specific code. The common CryptoKeyEC constructor similarly asserts
2070         that the specified curve is supported by the underlying implementation.
2071
2072         CryptoAlgorithmECDSA is modified to now also support 'ES512' as the algorithm
2073         identifier, matching it against the 'P-521' curve value.
2074
2075         No new tests -- tests covering EC P-521 already exist, but no platform
2076         runs them yet due to missing implementations.
2077
2078         * crypto/algorithms/CryptoAlgorithmECDSA.cpp:
2079         (WebCore::CryptoAlgorithmECDSA::importKey):
2080         * crypto/gcrypt/CryptoKeyECGCrypt.cpp:
2081         (WebCore::curveName):
2082         (WebCore::curveIdentifier):
2083         (WebCore::curveSize):
2084         (WebCore::curveUncompressedFieldElementSize):
2085         (WebCore::CryptoKeyEC::platformSupportedCurve):
2086         * crypto/keys/CryptoKeyEC.cpp:
2087         (WebCore::toNamedCurve):
2088         (WebCore::CryptoKeyEC::CryptoKeyEC):
2089         (WebCore::CryptoKeyEC::generatePair):
2090         (WebCore::CryptoKeyEC::importRaw):
2091         (WebCore::CryptoKeyEC::importJwk):
2092         (WebCore::CryptoKeyEC::importSpki):
2093         (WebCore::CryptoKeyEC::importPkcs8):
2094         (WebCore::CryptoKeyEC::exportJwk const):
2095         (WebCore::CryptoKeyEC::namedCurveString const):
2096         (WebCore::CryptoKeyEC::algorithm const):
2097         * crypto/keys/CryptoKeyEC.h:
2098         * crypto/mac/CryptoKeyECMac.cpp:
2099         (WebCore::doesUncompressedPointMatchNamedCurve):
2100         (WebCore::doesFieldElementMatchNamedCurve):
2101         (WebCore::getKeySizeFromNamedCurve):
2102         (WebCore::CryptoKeyEC::platformSupportedCurve):
2103         (WebCore::getOID):
2104
2105 2017-09-20  Antti Koivisto  <antti@apple.com>
2106
2107         inspector/dom/content-node-region-info.html and inspector/dom/content-flow tests crashing
2108         https://bugs.webkit.org/show_bug.cgi?id=177249
2109         <rdar://problem/34559968>
2110
2111         Unreviewed.
2112
2113         * inspector/InspectorCSSAgent.cpp:
2114         (WebCore::InspectorCSSAgent::getNamedFlowCollection):
2115
2116             Fix crashing by adding a few lines of removed code back.
2117
2118 2017-09-20  Zalan Bujtas  <zalan@apple.com>
2119
2120         Remove redundant SelectionSubtreeData functions.
2121         https://bugs.webkit.org/show_bug.cgi?id=177288
2122
2123         Reviewed by Simon Fraser.
2124
2125         No change in functionality.
2126
2127         * rendering/SelectionSubtreeRoot.h:
2128         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::SelectionSubtreeData):
2129         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionEndPos const):
2130         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionClear const): Deleted.
2131         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionStart): Deleted.
2132         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionStartPos): Deleted.
2133         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionEnd): Deleted.
2134         (WebCore::SelectionSubtreeRoot::SelectionSubtreeData::setSelectionEndPos): Deleted.
2135         (): Deleted.
2136
2137 2017-09-20  Alex Christensen  <achristensen@webkit.org>
2138
2139         Add infrastructure for adding custom headers to requests per website
2140         https://bugs.webkit.org/show_bug.cgi?id=177255
2141
2142         Reviewed by Geoffrey Garen.
2143
2144         Covered by API tests.
2145
2146         * CMakeLists.txt:
2147         * WebCore.xcodeproj/project.pbxproj:
2148         * loader/DocumentLoader.cpp:
2149         * loader/DocumentLoader.h:
2150         (WebCore::DocumentLoader::setCustomHeaderFields):
2151         * loader/HTTPHeaderField.cpp: Added.
2152         (WebCore::RFC7230::isTokenCharacter):
2153         (WebCore::RFC7230::isDelimiter):
2154         (WebCore::RFC7230::isVisibleCharacter):
2155         (WebCore::RFC7230::isWhitespace):
2156         (WebCore::RFC7230::isInRange):
2157         (WebCore::RFC7230::isOBSText):
2158         (WebCore::RFC7230::isQuotedTextCharacter):
2159         (WebCore::RFC7230::isQuotedPairSecondOctet):
2160         (WebCore::RFC7230::isCommentText):
2161         (WebCore::RFC7230::isValidName):
2162         (WebCore::RFC7230::isValidValue):
2163         (WebCore::HTTPHeaderField::HTTPHeaderField):
2164         * loader/HTTPHeaderField.h: Added.
2165         (WebCore::HTTPHeaderField::encode const):
2166         (WebCore::HTTPHeaderField::decode):
2167
2168 2017-09-20  Said Abou-Hallawa  <sabouhallawa@apple.com>
2169
2170         REGRESSION(r191731): SVGPatternElement can only reference another SVGPatternElement in the same SVG document
2171         https://bugs.webkit.org/show_bug.cgi?id=176221
2172
2173         Reviewed by Tim Horton.
2174
2175         According to the specs:
2176
2177         https://www.w3.org/TR/SVG11/filters.html#FilterElementHrefAttribute
2178         https://www.w3.org/TR/SVG11/pservers.html#LinearGradientElementHrefAttribute
2179         https://www.w3.org/TR/SVG11/pservers.html#RadialGradientElementHrefAttribute
2180         https://www.w3.org/TR/SVG11/pservers.html#PatternElementHrefAttribute
2181
2182         The xlink:href attribute of the SVG filter, gradient and pattern elements
2183         must reference another element within the current SVG of the same type.
2184
2185         In r191731, the code of SVGPatternElement::collectPatternAttributes() was
2186         removed and replaced by RenderSVGResourcePattern::collectPatternAttributes()
2187         to avoid cyclic reference in the pattern element. The problem is the old
2188         code used to check whether the referenced element is<SVGPatternElement>
2189         before casting it. This code was not copied to the new function. So we
2190         now allow the SVGPatternElement to reference any SVG resource element.
2191
2192         To fix this issue, we need to prevent SVGResources from chaining an incorrect
2193         type of element to the SVG filter, gradient and pattern elements.
2194
2195         We also need to use the SVGResources for getting the referenced element
2196         when collecting the attributes for the gradient elements. SVGResources solves
2197         the cyclic referencing issue so there is no need to repeat the same code
2198         in many places. Also, from now on the SVGResources will have valid linked
2199         resource only. So casting the referenced element should always be valid.
2200
2201         Tests: svg/custom/pattern-invalid-content-inheritance.svg
2202
2203         * rendering/svg/RenderSVGResourcePattern.cpp:
2204         (WebCore::RenderSVGResourcePattern::collectPatternAttributes const): Asserts
2205         the linkedResource is of type RenderSVGResourcePattern.
2206         * rendering/svg/SVGResources.cpp:
2207         (WebCore::SVGResources::SVGResources):
2208         (WebCore::isChainableResource): Ensure that an SVG resource can reference
2209         only an SVG resource with the valid type.
2210         (WebCore::SVGResources::buildCachedResources):
2211         * rendering/svg/SVGResources.h:
2212
2213 2017-09-20  Daniel Bates  <dabates@apple.com>
2214
2215         Spelling and grammar dots should not overlap
2216         https://bugs.webkit.org/show_bug.cgi?id=177265
2217         <rdar://problem/34556424>
2218
2219         Reviewed by David Hyatt.
2220
2221         A line may contain both spelling and grammar errors such that these errors overlap.
2222         For example, "to mooof or not to mooof.". It is more pleasing aesthetically to
2223         paint spelling and grammar dots such that they do not overlap. This also matches
2224         AppKit's behavior.
2225
2226         A side benefit of this change is that it adds support infrastructure towards
2227         implementing the CSS Pseudo-Elements Module Level 4 pseudo elements ::spelling-error
2228         and ::grammar-error (see <https://bugs.webkit.org/show_bug.cgi?id=175784>).
2229         It will also make it straightforward to add ::inactive-selection and allow us
2230         to make ::selection conform to CSS Pseudo-Elements Module Level 4.
2231
2232         * CMakeLists.txt: Add file MarkerSubrange.cpp.
2233         * WebCore.xcodeproj/project.pbxproj: Add files MarkerSubrange.{cpp, h}.
2234         * rendering/InlineTextBox.cpp:
2235         (WebCore::InlineTextBox::paintDocumentMarker): Modified to take a const MarkerSubrange&
2236         instead of a RenderedDocumentMarker&.
2237         (WebCore::InlineTextBox::paintTextMatchMarker): Modified to take a const MarkerSubrange&
2238         instead of a RenderedDocumentMarker& and take a boolean as to whether the text match is active.
2239         (WebCore::InlineTextBox::paintDocumentMarkers): Collect the subranges that need to be
2240         painted, subdivide them preserving only the frontmost subrange when two or more subranges
2241         overlap and paint the resulting subranges.
2242         (WebCore::lineStyleForMarkerType): Deleted; converted to a lambda function inlined
2243         in paintDocumentMarker() as this is the only place we made use of this function.
2244         * rendering/InlineTextBox.h:
2245         * rendering/MarkerSubrange.cpp: Added.
2246         (WebCore::subdivide): Subdivides the specified list of subranges and returns a list of non-overlapping
2247         subranges in paint order. The implementation of subdivide() is derived from an algorithm that
2248         Said Abou-Hallawa came up with.
2249         * rendering/MarkerSubrange.h: Added.
2250         (WebCore::MarkerSubrange::MarkerSubrange):
2251
2252 2017-09-20  Alex Christensen  <achristensen@webkit.org>
2253
2254         Remove ActionType::CSSDisplayNoneStyleSheet
2255         https://bugs.webkit.org/show_bug.cgi?id=177275
2256
2257         Reviewed by Andy Estes.
2258
2259         It not a real action type anyways.  It was a fake action type
2260         that stored a String indicating which ContentRuleLists had not triggered
2261         an ignore-previous-rules action, so we should apply the default stylesheet,
2262         which is the css-display-none selectors that match everything.
2263
2264         No change in behaviour.  Covered by existing tests.
2265
2266         * contentextensions/ContentExtensionActions.h:
2267         * contentextensions/ContentExtensionCompiler.cpp:
2268         (WebCore::ContentExtensions::serializeActions):
2269         * contentextensions/ContentExtensionRule.cpp:
2270         (WebCore::ContentExtensions::Action::deserialize):
2271         (WebCore::ContentExtensions::Action::deserializeType):
2272         (WebCore::ContentExtensions::Action::serializedLength):
2273         * contentextensions/ContentExtensionRule.h:
2274         (WebCore::ContentExtensions::Action::Action):
2275         * contentextensions/ContentExtensionsBackend.cpp:
2276         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad const):
2277         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
2278         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForPingLoad):
2279         * contentextensions/ContentExtensionsBackend.h:
2280         * page/DOMWindow.cpp:
2281         (WebCore::DOMWindow::open):
2282         * page/UserContentProvider.cpp:
2283         (WebCore::UserContentProvider::actionsForResourceLoad):
2284         * page/UserContentProvider.h:
2285
2286 2017-09-20  Zalan Bujtas  <zalan@apple.com>
2287
2288         FloatingObject should not hold a raw pointer to RootInlineBox.
2289         https://bugs.webkit.org/show_bug.cgi?id=177266
2290
2291         Reviewed by Simon Fraser.
2292
2293         FloatingObject and RootInlineBox objects' lifetimes are very much independent from each other.
2294
2295         Not testable.
2296
2297         * rendering/FloatingObjects.cpp:
2298         (WebCore::FloatingObjects::clearLineBoxTreePointers):
2299         * rendering/FloatingObjects.h:
2300         (WebCore::FloatingObject::originatingLine const):
2301         (WebCore::FloatingObject::clearOriginatingLine):
2302         (WebCore::FloatingObject::setOriginatingLine):
2303         * rendering/RenderBlockFlow.cpp:
2304         (WebCore::RenderBlockFlow::removeFloatingObject):
2305         * rendering/RenderBlockLineLayout.cpp:
2306         (WebCore::RenderBlockFlow::appendFloatingObjectToLastLine):
2307         (WebCore::RenderBlockFlow::reattachCleanLineFloats):
2308         (WebCore::RenderBlockFlow::determineStartPosition):
2309         * rendering/RootInlineBox.cpp:
2310         (WebCore::RootInlineBox::RootInlineBox):
2311         * rendering/RootInlineBox.h:
2312         (WebCore::RootInlineBox::createWeakPtr):
2313
2314 2017-09-20  Chris Dumez  <cdumez@apple.com>
2315
2316         Drop legacy DOMError type
2317         https://bugs.webkit.org/show_bug.cgi?id=177207
2318
2319         Reviewed by Eric Carlson.
2320
2321         Drop legacy DOMError type. It has been removed from the Web standards,
2322         is no longer used by our implementation and was not exposed to the
2323         Web in WebKit (i.e. marked as [NoInterfaceObject]).
2324
2325         * CMakeLists.txt:
2326         * DerivedSources.cpp:
2327         * DerivedSources.make:
2328         * Modules/mediastream/MediaEndpointSessionDescription.h:
2329         * WebCore.xcodeproj/project.pbxproj:
2330         * bindings/js/JSDOMPromiseDeferred.cpp:
2331         * dom/DOMAllInOne.cpp:
2332         * dom/DOMError.cpp: Removed.
2333         * dom/DOMError.h: Removed.
2334         * dom/DOMError.idl: Removed.
2335         * platform/mock/RTCNotifiersMock.cpp:
2336
2337 2017-09-20  Commit Queue  <commit-queue@webkit.org>
2338
2339         Unreviewed, rolling out r222254.
2340         https://bugs.webkit.org/show_bug.cgi?id=177267
2341
2342         Caused fast/images/animated-gif-webkit-transform.html to time
2343         out, and possible perf regression (Requested by smfr on
2344         #webkit).
2345
2346         Reverted changeset:
2347
2348         "Simplify compositing layer updating"
2349         https://bugs.webkit.org/show_bug.cgi?id=176196
2350         http://trac.webkit.org/changeset/222254
2351
2352 2017-09-20  Alex Christensen  <achristensen@webkit.org>
2353
2354         Remove ActionType::InvalidAction
2355         https://bugs.webkit.org/show_bug.cgi?id=177262
2356
2357         Reviewed by Tim Horton.
2358
2359         This was needed before r213322 because we needed to have a default constructor.
2360         With all these cool new C++14/17 types, we don't need this any more.
2361
2362         No change in behaviour.
2363
2364         * contentextensions/ContentExtensionActions.h:
2365         * contentextensions/ContentExtensionCompiler.cpp:
2366         (WebCore::ContentExtensions::serializeActions):
2367         * contentextensions/ContentExtensionRule.cpp:
2368         (WebCore::ContentExtensions::Action::deserialize):
2369         (WebCore::ContentExtensions::Action::deserializeType):
2370         (WebCore::ContentExtensions::Action::serializedLength):
2371         * contentextensions/ContentExtensionRule.h:
2372         * contentextensions/ContentExtensionsBackend.cpp:
2373         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
2374         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForPingLoad):
2375
2376 2017-09-20  Daniel Bates  <dabates@apple.com>
2377
2378         RenderedDocumentMarker.h should include DocumentMarker.h
2379         https://bugs.webkit.org/show_bug.cgi?id=177263
2380
2381         Reviewed by Andy Estes.
2382
2383         RenderedDocumentMarker extends DocumentMarker. RenderedDocumentMarker.h should
2384         include DocumentMarker.h. Otherwise, both DocumentMarker.h and RenderedDocumentMarker.h
2385         must be explicitly included.
2386
2387         * dom/RenderedDocumentMarker.h:
2388         * rendering/RenderText.cpp:
2389         * testing/Internals.cpp:
2390
2391 2017-09-20  Alex Christensen  <achristensen@webkit.org>
2392
2393         Clean up content extensions code in preparation for more actions with string arguments
2394         https://bugs.webkit.org/show_bug.cgi?id=177258
2395
2396         Reviewed by Tim Horton.
2397
2398         No change in behaviour.  Covered by existing tests.
2399
2400         * contentextensions/ContentExtensionCompiler.cpp:
2401         (WebCore::ContentExtensions::serializeString):
2402         (WebCore::ContentExtensions::resolvePendingDisplayNoneActions):
2403         (WebCore::ContentExtensions::serializeActions):
2404         (WebCore::ContentExtensions::serializeSelector): Deleted.
2405         * contentextensions/ContentExtensionParser.cpp:
2406         (WebCore::ContentExtensions::loadAction):
2407         (WebCore::ContentExtensions::loadRule):
2408         * contentextensions/ContentExtensionRule.cpp:
2409         (WebCore::ContentExtensions::deserializeString):
2410         (WebCore::ContentExtensions::Action::deserialize):
2411         (WebCore::ContentExtensions::Action::deserializeType):
2412         (WebCore::ContentExtensions::Action::serializedLength):
2413         * contentextensions/ContentExtensionRule.h:
2414         (WebCore::ContentExtensions::Action::Action):
2415
2416 2017-09-20  Joanmarie Diggs  <jdiggs@igalia.com>
2417
2418         [ATK] atk_table_get_n_rows() and atk_table_get_n_columns() should return values of aria-rowcount and aria-colcount, if present
2419         https://bugs.webkit.org/show_bug.cgi?id=171172
2420
2421         Reviewed by Chris Fleizach.
2422
2423         Modify webKitAccessibleTableGetNColumns() and webkitAccessibleTableGetNRows()
2424         to prefer the ARIA value over the DOM-based value.
2425
2426         No new tests needed: We already have coverage through aria-table-attributes.html.
2427         Platform expectations for this test were updated.
2428
2429         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
2430         (webkitAccessibleTableGetNColumns):
2431         (webkitAccessibleTableGetNRows):
2432
2433 2017-09-20  Youenn Fablet  <youenn@apple.com>
2434
2435         Rename CacheStorage to DOMCacheStorage
2436         https://bugs.webkit.org/show_bug.cgi?id=177025
2437
2438         Reviewed by Chris Dumez.
2439
2440         No change of behavior, just renaming CacheStorage class and files to DOMCacheStorage.
2441
2442         * CMakeLists.txt:
2443         * DerivedSources.make:
2444         * Modules/cache/DOMCacheStorage.cpp: Renamed from Source/WebCore/Modules/cache/CacheStorage.cpp.
2445         (WebCore::DOMCacheStorage::DOMCacheStorage):
2446         (WebCore::DOMCacheStorage::origin const):
2447         (WebCore::doSequentialMatch):
2448         (WebCore::startSequentialMatch):
2449         (WebCore::copyCaches):
2450         (WebCore::DOMCacheStorage::match):
2451         (WebCore::DOMCacheStorage::has):
2452         (WebCore::DOMCacheStorage::retrieveCaches):
2453         (WebCore::logConsolePersistencyError):
2454         (WebCore::DOMCacheStorage::open):
2455         (WebCore::DOMCacheStorage::remove):
2456         (WebCore::DOMCacheStorage::keys):
2457         (WebCore::DOMCacheStorage::stop):
2458         (WebCore::DOMCacheStorage::activeDOMObjectName const):
2459         (WebCore::DOMCacheStorage::canSuspendForDocumentSuspension const):
2460         * Modules/cache/DOMCacheStorage.h: Renamed from Source/WebCore/Modules/cache/CacheStorage.h.
2461         (WebCore::DOMCacheStorage::create):
2462         * Modules/cache/DOMCacheStorage.idl: Renamed from Source/WebCore/Modules/cache/CacheStorage.idl.
2463         * Modules/cache/DOMWindowCaches.cpp:
2464         (WebCore::DOMWindowCaches::caches):
2465         (WebCore::DOMWindowCaches::caches const):
2466         * Modules/cache/DOMWindowCaches.h:
2467         * Modules/cache/DOMWindowCaches.idl:
2468         * Modules/cache/WorkerGlobalScopeCaches.cpp:
2469         (WebCore::WorkerGlobalScopeCaches::caches):
2470         (WebCore::WorkerGlobalScopeCaches::caches const):
2471         * Modules/cache/WorkerGlobalScopeCaches.h:
2472         * Modules/cache/WorkerGlobalScopeCaches.idl:
2473         * WebCore.xcodeproj/project.pbxproj:
2474
2475 2017-09-20  Eric Carlson  <eric.carlson@apple.com>
2476
2477         Switch PeerConnection to release logging
2478         https://bugs.webkit.org/show_bug.cgi?id=177193
2479         <rdar://problem/34529014>
2480
2481         Reviewed by Youenn Fablet.
2482
2483         * Modules/mediastream/PeerConnectionBackend.cpp:
2484         (WebCore::PeerConnectionBackend::PeerConnectionBackend):
2485         (WebCore::PeerConnectionBackend::createOfferSucceeded):
2486         (WebCore::PeerConnectionBackend::createOfferFailed):
2487         (WebCore::PeerConnectionBackend::createAnswerSucceeded):
2488         (WebCore::PeerConnectionBackend::createAnswerFailed):
2489         (WebCore::PeerConnectionBackend::setLocalDescriptionSucceeded):
2490         (WebCore::PeerConnectionBackend::setLocalDescriptionFailed):
2491         (WebCore::PeerConnectionBackend::setRemoteDescriptionSucceeded):
2492         (WebCore::PeerConnectionBackend::setRemoteDescriptionFailed):
2493         (WebCore::PeerConnectionBackend::addIceCandidateSucceeded):
2494         (WebCore::PeerConnectionBackend::addIceCandidateFailed):
2495         (WebCore::PeerConnectionBackend::newICECandidate):
2496         (WebCore::PeerConnectionBackend::doneGatheringCandidates):
2497         (WebCore::PeerConnectionBackend::logChannel const):
2498         * Modules/mediastream/PeerConnectionBackend.h:
2499         (WebCore::PeerConnectionBackend::PeerConnectionBackend): Deleted.
2500
2501         * Modules/mediastream/RTCPeerConnection.cpp:
2502         (WebCore::RTCPeerConnection::RTCPeerConnection):
2503         (WebCore::RTCPeerConnection::~RTCPeerConnection):
2504         (WebCore::RTCPeerConnection::addTrack):
2505         (WebCore::RTCPeerConnection::removeTrack):
2506         (WebCore::RTCPeerConnection::addTransceiver):
2507         (WebCore::RTCPeerConnection::queuedCreateOffer):
2508         (WebCore::RTCPeerConnection::queuedCreateAnswer):
2509         (WebCore::RTCPeerConnection::queuedSetLocalDescription):
2510         (WebCore::RTCPeerConnection::queuedSetRemoteDescription):
2511         (WebCore::RTCPeerConnection::queuedAddIceCandidate):
2512         (WebCore::RTCPeerConnection::initializeConfiguration):
2513         (WebCore::RTCPeerConnection::setConfiguration):
2514         (WebCore::RTCPeerConnection::createDataChannel):
2515         (WebCore::RTCPeerConnection::setSignalingState):
2516         (WebCore::RTCPeerConnection::updateIceGatheringState):
2517         (WebCore::RTCPeerConnection::updateIceConnectionState):
2518         (WebCore::RTCPeerConnection::updateConnectionState):
2519         (WebCore::RTCPeerConnection::replaceTrack):
2520         (WebCore::RTCPeerConnection::dispatchEvent):
2521         (WebCore::RTCPeerConnection::logChannel const):
2522         (WebCore::rtcIceGatheringStateToString): Deleted.
2523         (WebCore::rtcIceConnectionStateToString): Deleted.
2524         * Modules/mediastream/RTCPeerConnection.h:
2525
2526         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
2527         (WebCore::LibWebRTCMediaEndpoint::LibWebRTCMediaEndpoint):
2528         (WebCore::LibWebRTCMediaEndpoint::OnStatsDelivered):
2529         (WebCore::LibWebRTCMediaEndpoint::startLoggingStats):
2530         (WebCore::LibWebRTCMediaEndpoint::logChannel const):
2531         (WebCore::LibWebRTCMediaEndpoint::statsLogInterval const):
2532         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
2533         (PAL::LogArgument<webrtc::RTCStats>::toString):
2534
2535         * platform/mediastream/RTCIceConnectionState.h:
2536         (PAL::LogArgument<WebCore::RTCIceConnectionState>::toString):
2537
2538         * platform/mediastream/RTCIceGatheringState.h:
2539         (PAL::LogArgument<WebCore::RTCIceGatheringState>::toString):
2540
2541         * platform/mediastream/RTCPeerConnectionState.h:
2542         (PAL::LogArgument<WebCore::RTCPeerConnectionState>::toString):
2543
2544         * platform/mediastream/RTCSignalingState.h:
2545         (PAL::LogArgument<WebCore::RTCSignalingState>::toString):
2546
2547 2017-09-20  Chris Dumez  <cdumez@apple.com>
2548
2549         Video errors should be instances of Error
2550         https://bugs.webkit.org/show_bug.cgi?id=174573
2551         <rdar://problem/34445494>
2552
2553         Reviewed by Youenn Fablet.
2554
2555         Video errors should be instances of DOMException and Error as per:
2556         - https://html.spec.whatwg.org/multipage/media.html#reject-pending-play-promises
2557         - https://html.spec.whatwg.org/multipage/media.html#loading-the-media-resource:reject-pending-play-promises-2
2558         - https://html.spec.whatwg.org/multipage/media.html#loading-the-media-resource:reject-pending-play-promises-3
2559         - https://html.spec.whatwg.org/multipage/media.html#playing-the-media-resource:reject-pending-play-promises-3
2560         - https://html.spec.whatwg.org/multipage/media.html#playing-the-media-resource:reject-pending-play-promises
2561
2562         No new tests, extended existing test.
2563
2564         * html/HTMLMediaElement.cpp:
2565         (WebCore::HTMLMediaElement::rejectPendingPlayPromises):
2566         (WebCore::HTMLMediaElement::noneSupported):
2567         (WebCore::HTMLMediaElement::cancelPendingEventsAndCallbacks):
2568         (WebCore::HTMLMediaElement::pauseInternal):
2569         * html/HTMLMediaElement.h:
2570
2571 2017-09-20  Basuke Suzuki  <Basuke.Suzuki@sony.com>
2572
2573         [Curl] improve the implementation of FormDataStream
2574         https://bugs.webkit.org/show_bug.cgi?id=177111
2575
2576         Reviewed by Alex Christensen.
2577
2578         * platform/network/curl/FormDataStreamCurl.cpp:
2579         (WebCore::FormDataStream::read):
2580         (WebCore::FormDataStream::hasMoreElements const):
2581         * platform/network/curl/FormDataStreamCurl.h:
2582         (WebCore::FormDataStream::setHTTPBody):
2583         (WebCore::FormDataStream::FormDataStream): Deleted.
2584         * platform/network/curl/ResourceHandleCurlDelegate.cpp:
2585         (WebCore::ResourceHandleCurlDelegate::ResourceHandleCurlDelegate):
2586         (WebCore::ResourceHandleCurlDelegate::prepareSendData):
2587         (WebCore::ResourceHandleCurlDelegate::didFinish):
2588         (WebCore::ResourceHandleCurlDelegate::didFail):
2589         (WebCore::ResourceHandleCurlDelegate::setupFormData):
2590         * platform/network/curl/ResourceHandleCurlDelegate.h:
2591
2592 2017-09-20  Miguel Gomez  <magomez@igalia.com>
2593
2594         [GTK] Completely garbled display in GMail
2595         https://bugs.webkit.org/show_bug.cgi?id=168964
2596
2597         Reviewed by Carlos Garcia Campos.
2598
2599         Do not try to decode images that are bigger than 32768 pixels, as cairo won't be able to render them,
2600         and they will break the rendering of the rest of the page.
2601
2602         Covered by existent tests.
2603
2604         * platform/graphics/ImageBackingStore.h:
2605         (WebCore::ImageBackingStore::isOverSize):
2606
2607 2017-09-20  Antti Koivisto  <antti@apple.com>
2608
2609         Remove RenderNamedFlowThread and FlowThreadController
2610         https://bugs.webkit.org/show_bug.cgi?id=177229
2611
2612         Reviewed by Andreas Kling.
2613
2614         Get rid of some parts of the rendering code for CSS Regions.
2615
2616         The feature is disabled, no functional changes.
2617
2618         * WebCore.xcodeproj/project.pbxproj:
2619         * rendering/FlowThreadController.cpp: Removed.
2620         * rendering/FlowThreadController.h: Removed.
2621         * rendering/RenderBlock.cpp:
2622         (WebCore::RenderBlock::paintObject):
2623         (WebCore::canComputeRegionRangeForBox):
2624         (WebCore::RenderBlock::childBoxIsUnsplittableForFragmentation const):
2625         * rendering/RenderBlockFlow.cpp:
2626         (WebCore::RenderBlockFlow::determineLogicalLeftPositionForChild):
2627         (WebCore::RenderBlockFlow::applyBeforeBreak):
2628         (WebCore::RenderBlockFlow::applyAfterBreak):
2629         (WebCore::RenderBlockFlow::logicalHeightForChildForFragmentation const):
2630         * rendering/RenderBlockLineLayout.cpp:
2631         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
2632         * rendering/RenderBox.cpp:
2633         (WebCore::RenderBox::borderBoxRectInRegion const):
2634         (WebCore::RenderBox::scroll):
2635         (WebCore::RenderBox::renderBoxRegionInfo const):
2636         (WebCore::RenderBox::computeReplacedLogicalHeightUsing const):
2637         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned const):
2638         (WebCore::RenderBox::containingBlockLogicalHeightForPositioned const):
2639         * rendering/RenderBoxModelObject.cpp:
2640         (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent const):
2641         * rendering/RenderElement.cpp:
2642         (WebCore::RenderElement::willBeDestroyed):
2643         (WebCore::RenderElement::hoverAncestor const):
2644         * rendering/RenderFlowThread.cpp:
2645         (WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent const):
2646         (WebCore::RenderFlowThread::incrementAutoLogicalHeightRegions):
2647         (WebCore::RenderFlowThread::decrementAutoLogicalHeightRegions):
2648         (WebCore::RenderFlowThread::addRegionsOverflowFromChild):
2649         * rendering/RenderInline.cpp:
2650         (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
2651         * rendering/RenderLayer.cpp:
2652         (WebCore::RenderLayer::paintLayerContents):
2653         (WebCore::RenderLayer::hitTestLayer):
2654         (WebCore::RenderLayer::calculateClipRects const):
2655         (WebCore::RenderLayer::paintFixedLayersInNamedFlows): Deleted.
2656         (WebCore::RenderLayer::hitTestFixedLayersInNamedFlows): Deleted.
2657         * rendering/RenderLayer.h:
2658         * rendering/RenderLayerCompositor.cpp:
2659         (WebCore::RenderLayerCompositor::updateCompositingLayers):
2660         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2661         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
2662         (WebCore::RenderLayerCompositor::computeCompositingRequirementsForNamedFlowFixed): Deleted.
2663         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTreeForNamedFlowFixed): Deleted.
2664         * rendering/RenderLayerCompositor.h:
2665         * rendering/RenderNamedFlowFragment.cpp:
2666         (WebCore::RenderNamedFlowFragment::checkRegionStyle):
2667         (WebCore::RenderNamedFlowFragment::namedFlowThread const): Deleted.
2668         * rendering/RenderNamedFlowFragment.h:
2669         * rendering/RenderNamedFlowThread.cpp: Removed.
2670         * rendering/RenderNamedFlowThread.h: Removed.
2671         * rendering/RenderObject.cpp:
2672         (WebCore::RenderObject::selectionRoot const):
2673         (WebCore::RenderObject::offsetParent const):
2674         (WebCore::RenderObject::currentRenderNamedFlowFragment const):
2675         * rendering/RenderObject.h:
2676         (WebCore::RenderObject::isRenderGrid const):
2677         (WebCore::RenderObject::isRenderNamedFlowThread const): Deleted.
2678         * rendering/RenderRegion.cpp:
2679         (WebCore::RenderRegion::RenderRegion):
2680         (WebCore::RenderRegion::attachRegion):
2681         * rendering/RenderRegion.h:
2682         (WebCore::RenderRegion::parentNamedFlowThread const): Deleted.
2683         * rendering/RenderTreeAsText.cpp:
2684         (WebCore::writeLayers):
2685         (WebCore::writeRenderRegionList): Deleted.
2686         (WebCore::writeRenderNamedFlowThreads): Deleted.
2687         * rendering/RenderView.cpp:
2688         (WebCore::RenderView::layoutContent):
2689         (WebCore::RenderView::layoutContentInAutoLogicalHeightRegions):
2690         (WebCore::RenderView::layout):
2691         (WebCore::RenderView::selectionBounds const):
2692         (WebCore::RenderView::repaintSelection const):
2693         (WebCore::RenderView::setSelection):
2694         (WebCore::RenderView::updateSelectionForSubtrees):
2695         (WebCore::RenderView::styleDidChange):
2696         (WebCore::RenderView::checkTwoPassLayoutForAutoHeightRegions const):
2697         (WebCore::RenderView::pushLayoutStateForCurrentFlowThread):
2698         (WebCore::RenderView::popLayoutStateForCurrentFlowThread):
2699         (WebCore::RenderView::layoutContentToComputeOverflowInRegions): Deleted.
2700         (WebCore::RenderView::splitSelectionBetweenSubtrees): Deleted.
2701         (WebCore::RenderView::hasRenderNamedFlowThreads const): Deleted.
2702         (WebCore::RenderView::flowThreadController): Deleted.
2703         * rendering/RenderView.h:
2704         * rendering/SelectionSubtreeRoot.cpp:
2705         (WebCore::SelectionSubtreeRoot::adjustForVisibleSelection): Deleted.
2706         * rendering/SelectionSubtreeRoot.h:
2707         (WebCore::SelectionSubtreeRoot::setSelectionData):
2708
2709 2017-09-20  Antti Koivisto  <antti@apple.com>
2710
2711         Remove DOM and styling support for CSS Regions
2712         https://bugs.webkit.org/show_bug.cgi?id=177221
2713
2714         Reviewed by Andreas Kling.
2715
2716         This patch removes all CSS Regions (aka "named flow") related code excluding rendering.
2717
2718         The feature is already disabled so no functional changes.
2719
2720         * CMakeLists.txt:
2721         * Configurations/FeatureDefines.xcconfig:
2722         * DerivedSources.make:
2723         * WebCore.xcodeproj/project.pbxproj:
2724         * bindings/js/JSCSSRuleCustom.cpp:
2725         (WebCore::toJSNewlyCreated):
2726         * css/CSSComputedStyleDeclaration.cpp:
2727         (WebCore::contentToCSSValue):
2728         (WebCore::ComputedStyleExtractor::propertyValue):
2729         (WebCore::convertToRegionBreak): Deleted.
2730         * css/CSSPrimitiveValueMappings.h:
2731         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2732         (WebCore::CSSPrimitiveValue::operator BreakBetween const):
2733         * css/CSSProperties.json:
2734         * css/CSSRule.cpp:
2735         * css/CSSRule.h:
2736         * css/CSSRule.idl:
2737         * css/ElementRuleCollector.cpp:
2738         (WebCore::ElementRuleCollector::matchAuthorRules):
2739         (WebCore::ElementRuleCollector::matchUserRules):
2740         (WebCore::ElementRuleCollector::collectMatchingRulesForRegion): Deleted.
2741         * css/ElementRuleCollector.h:
2742         (WebCore::ElementRuleCollector::setSameOriginOnly):
2743         (WebCore::ElementRuleCollector::setRegionForStyling): Deleted.
2744         * css/InspectorCSSOMWrappers.cpp:
2745         (WebCore::InspectorCSSOMWrappers::collect):
2746         * css/RuleSet.cpp:
2747         (WebCore::determinePropertyWhitelistType):
2748         (WebCore::RuleData::RuleData):
2749         (WebCore::RuleSet::addChildRules):
2750         (WebCore::RuleSet::shrinkToFit):
2751         (WebCore::RuleSet::addRegionRule): Deleted.
2752         * css/RuleSet.h:
2753         (WebCore::RuleSet:: const):
2754         (WebCore::RuleSet::regionSelectorsAndRuleSets const): Deleted.
2755         * css/StyleBuilderConverter.h:
2756         (WebCore::StyleBuilderConverter::convertRegionBreakBetween): Deleted.
2757         (WebCore::StyleBuilderConverter::convertRegionBreakInside): Deleted.
2758         * css/StyleProperties.cpp:
2759         * css/StyleResolver.cpp:
2760         (WebCore::StyleResolver::State::clear):
2761         (WebCore::StyleResolver::State::State):
2762         (WebCore::StyleResolver::styleForElement):
2763         (WebCore::StyleResolver::CascadedProperties::addMatch):
2764         (WebCore::StyleResolver::checkRegionStyle): Deleted.
2765         (WebCore::isValidRegionStyleProperty): Deleted.
2766         * css/StyleResolver.h:
2767         (WebCore::StyleResolver::State::regionForStyling const): Deleted.
2768         (WebCore::checkRegionSelector): Deleted.
2769         * css/StyleRule.cpp:
2770         (WebCore::StyleRuleBase::destroy):
2771         (WebCore::StyleRuleBase::copy const):
2772         (WebCore::StyleRuleBase::createCSSOMWrapper const):
2773         (WebCore::StyleRuleRegion::StyleRuleRegion): Deleted.
2774         * css/StyleRule.h:
2775         (WebCore::StyleRuleBase::isStyleRule const):
2776         (WebCore::StyleRuleBase::isRegionRule const): Deleted.
2777         * css/StyleSheetContents.cpp:
2778         (WebCore::traverseSubresourcesInRules):
2779         * css/WebKitCSSRegionRule.cpp: Removed.
2780         * css/WebKitCSSRegionRule.h: Removed.
2781         * css/WebKitCSSRegionRule.idl: Removed.
2782         * css/parser/CSSAtRuleID.cpp:
2783         (WebCore::cssAtRuleID):
2784         * css/parser/CSSAtRuleID.h:
2785         * css/parser/CSSParserFastPaths.cpp:
2786         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
2787         (WebCore::CSSParserFastPaths::isKeywordPropertyID):
2788         * css/parser/CSSParserImpl.cpp:
2789         (WebCore::CSSParserImpl::consumeAtRule):
2790         (WebCore::CSSParserImpl::consumeRegionRule): Deleted.
2791         * css/parser/CSSParserImpl.h:
2792         * css/parser/CSSPropertyParser.cpp:
2793         (WebCore::isLegacyBreakProperty):
2794         (WebCore::CSSPropertyParser::parseSingleValue):
2795         (WebCore::mapFromLegacyBreakProperty):
2796         (WebCore::CSSPropertyParser::consumeLegacyBreakProperty):
2797         (WebCore::consumeFlowProperty): Deleted.
2798         (WebCore::mapFromRegionBreakBetween): Deleted.
2799         * dom/ContainerNode.cpp:
2800         (WebCore::destroyRenderTreeIfNeeded):
2801         * dom/DOMNamedFlowCollection.cpp: Removed.
2802         * dom/DOMNamedFlowCollection.h: Removed.
2803         * dom/DOMNamedFlowCollection.idl: Removed.
2804         * dom/Document.cpp:
2805         (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
2806         (WebCore::Document::webkitGetNamedFlows): Deleted.
2807         (WebCore::Document::namedFlows): Deleted.
2808         * dom/Document.h:
2809         * dom/Document.idl:
2810         * dom/Element.cpp:
2811         (WebCore::Element::~Element):
2812         (WebCore::Element::clearStyleDerivedDataBeforeDetachingRenderer):
2813         (WebCore::Element::unregisterNamedFlowContentElement): Deleted.
2814         (WebCore::Element::setIsNamedFlowContentElement): Deleted.
2815         (WebCore::Element::clearIsNamedFlowContentElement): Deleted.
2816         (WebCore::Element::rareDataIsNamedFlowContentElement const): Deleted.
2817         (WebCore::Element::setRegionOversetState): Deleted.
2818         (WebCore::Element::regionOversetState const): Deleted.
2819         (WebCore::Element::renderNamedFlowFragment const): Deleted.
2820         (WebCore::Element::shouldMoveToFlowThread const): Deleted.
2821         (WebCore::Element::webkitRegionOverset const): Deleted.
2822         (WebCore::Element::webkitGetRegionFlowRanges const): Deleted.
2823         * dom/Element.h:
2824         (WebCore::Element::isNamedFlowContentElement const): Deleted.
2825         * dom/Element.idl:
2826         * dom/ElementRareData.cpp:
2827         * dom/ElementRareData.h:
2828         (WebCore::ElementRareData::ElementRareData):
2829         (WebCore::ElementRareData::regionOversetState const): Deleted.
2830         (WebCore::ElementRareData::setRegionOversetState): Deleted.
2831         (WebCore::ElementRareData::isNamedFlowContentElement const): Deleted.
2832         (WebCore::ElementRareData::setIsNamedFlowContentElement): Deleted.
2833         * dom/EventTargetFactory.in:
2834         * dom/NamedFlowCollection.cpp: Removed.
2835         * dom/NamedFlowCollection.h: Removed.
2836         * dom/PseudoElement.h:
2837         * dom/WebKitNamedFlow.cpp: Removed.
2838         * dom/WebKitNamedFlow.h: Removed.
2839         * dom/WebKitNamedFlow.idl: Removed.
2840         * inspector/InspectorCSSAgent.cpp:
2841         (WebCore::InspectorCSSAgent::resetNonPersistentData):
2842         (WebCore::ChangeRegionOversetTask::ChangeRegionOversetTask): Deleted.
2843         (WebCore::ChangeRegionOversetTask::scheduleFor): Deleted.
2844         (WebCore::ChangeRegionOversetTask::unschedule): Deleted.
2845         (WebCore::ChangeRegionOversetTask::reset): Deleted.
2846         (WebCore::ChangeRegionOversetTask::timerFired): Deleted.
2847         (WebCore::InspectorCSSAgent::didCreateNamedFlow): Deleted.
2848         (WebCore::InspectorCSSAgent::willRemoveNamedFlow): Deleted.
2849         (WebCore::InspectorCSSAgent::didChangeRegionOverset): Deleted.
2850         (WebCore::InspectorCSSAgent::regionOversetChanged): Deleted.
2851         (WebCore::InspectorCSSAgent::didRegisterNamedFlowContentElement): Deleted.
2852         (WebCore::InspectorCSSAgent::didUnregisterNamedFlowContentElement): Deleted.
2853         (WebCore::InspectorCSSAgent::getNamedFlowCollection): Deleted.
2854         (WebCore::InspectorCSSAgent::documentNodeWithRequestedFlowsId): Deleted.
2855         (WebCore::InspectorCSSAgent::buildArrayForRegions): Deleted.
2856         (WebCore::InspectorCSSAgent::buildObjectForNamedFlow): Deleted.
2857         * inspector/InspectorCSSAgent.h:
2858         * inspector/InspectorInstrumentation.cpp:
2859         (WebCore::InspectorInstrumentation::didCreateNamedFlowImpl): Deleted.
2860         (WebCore::InspectorInstrumentation::willRemoveNamedFlowImpl): Deleted.
2861         (WebCore::InspectorInstrumentation::didChangeRegionOversetImpl): Deleted.
2862         (WebCore::InspectorInstrumentation::didRegisterNamedFlowContentElementImpl): Deleted.
2863         (WebCore::InspectorInstrumentation::didUnregisterNamedFlowContentElementImpl): Deleted.
2864         * inspector/InspectorOverlay.cpp:
2865         (WebCore::buildRendererHighlight):
2866         (WebCore::buildObjectForElementData):
2867         (WebCore::buildObjectForRegion): Deleted.
2868         (WebCore::buildObjectForFlowRegions): Deleted.
2869         * page/EventHandler.cpp:
2870         (WebCore::handleWheelEventInAppropriateEnclosingBox):
2871         * rendering/FlowThreadController.cpp:
2872         (WebCore::FlowThreadController::ensureRenderFlowThreadWithName): Deleted.
2873         * rendering/FlowThreadController.h:
2874         * rendering/RegionOversetState.h: Removed.
2875         * rendering/RenderBlockFlow.cpp:
2876         (WebCore::RenderBlockFlow::applyBeforeBreak):
2877         (WebCore::RenderBlockFlow::applyAfterBreak):
2878         * rendering/RenderNamedFlowFragment.cpp:
2879         (WebCore::RenderNamedFlowFragment::getRanges const):
2880         (WebCore::RenderNamedFlowFragment::layoutBlock):
2881         (WebCore::RenderNamedFlowFragment::checkRegionStyle):
2882         (WebCore::RenderNamedFlowFragment::computeStyleInRegion const):
2883         (WebCore::RenderNamedFlowFragment::setRegionObjectsRegionStyle):
2884         (WebCore::RenderNamedFlowFragment::setRegionOversetState): Deleted.
2885         (WebCore::RenderNamedFlowFragment::regionOversetState const): Deleted.
2886         (WebCore::RenderNamedFlowFragment::updateOversetState): Deleted.
2887         * rendering/RenderNamedFlowFragment.h:
2888         * rendering/RenderNamedFlowThread.cpp:
2889         (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
2890         (WebCore::RenderNamedFlowThread::clearContentElements):
2891         (WebCore::RenderNamedFlowThread::registerNamedFlowContentElement):
2892         (WebCore::RenderNamedFlowThread::unregisterNamedFlowContentElement):
2893         (WebCore::RenderNamedFlowThread::hasContentElement const):
2894         (WebCore::RenderNamedFlowThread::flowThreadName const):
2895         (WebCore::RenderNamedFlowThread::dispatchRegionOversetChangeEventIfNeeded):
2896         (WebCore::RenderNamedFlowThread::regionOversetChangeEventTimerFired):
2897         (WebCore::RenderNamedFlowThread::setMarkForDestruction):
2898         (WebCore::RenderNamedFlowThread::resetMarkForDestruction):
2899         (WebCore::RenderNamedFlowThread::isMarkedForDestruction const):
2900         (WebCore::nextNodeInsideContentElement):
2901         * rendering/RenderNamedFlowThread.h:
2902         * rendering/RenderRegion.cpp:
2903         (WebCore::RenderRegion::installFlowThread):
2904         * rendering/style/RenderStyleConstants.h:
2905         * rendering/style/WillChangeData.cpp:
2906         (WebCore::WillChangeData::propertyCreatesStackingContext):
2907         * style/RenderTreePosition.cpp:
2908         (WebCore::RenderTreePosition::previousSiblingRenderer const):
2909         (WebCore::RenderTreePosition::nextSiblingRenderer const):
2910         (WebCore::RenderTreePosition::insertionPositionForFlowThread): Deleted.
2911         (WebCore::RenderTreePosition::isRendererReparented): Deleted.
2912         * style/RenderTreePosition.h:
2913         (WebCore::RenderTreePosition::RenderTreePosition):
2914         * style/RenderTreeUpdater.cpp:
2915         (WebCore::RenderTreeUpdater::updateElementRenderer):
2916         (WebCore::RenderTreeUpdater::createRenderer):
2917         (WebCore::RenderTreeUpdater::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded):
2918         (WebCore::registerElementForFlowThreadIfNeeded): Deleted.
2919         * style/RenderTreeUpdaterGeneratedContent.cpp:
2920         (WebCore::createContentRenderers):
2921         * style/StyleChange.cpp:
2922         (WebCore::Style::determineChange):
2923         * style/StyleTreeResolver.cpp:
2924         (WebCore::Style::TreeResolver::styleForElement):
2925         (WebCore::Style::affectsRenderedSubtree):
2926         * svg/SVGElement.cpp:
2927         (WebCore::SVGElement::shouldMoveToFlowThread const): Deleted.
2928         * svg/SVGElement.h:
2929
2930 2017-09-20  Ms2ger  <Ms2ger@igalia.com>
2931
2932         Add bindings for optional arguments to some WebGL2 methods.
2933         https://bugs.webkit.org/show_bug.cgi?id=177067
2934
2935         Reviewed by Antti Koivisto.
2936
2937         Add bindings for optional arguments to some WebGL2 methods.
2938
2939         No new tests: not much point in adding tests now; these methods don't
2940         do anything anyway.
2941
2942         * html/canvas/WebGL2RenderingContext.cpp:
2943         (WebCore::WebGL2RenderingContext::uniform1uiv):
2944         (WebCore::WebGL2RenderingContext::uniform2uiv):
2945         (WebCore::WebGL2RenderingContext::uniform3uiv):
2946         (WebCore::WebGL2RenderingContext::uniform4uiv):
2947         (WebCore::WebGL2RenderingContext::uniformMatrix2x3fv):
2948         (WebCore::WebGL2RenderingContext::uniformMatrix3x2fv):
2949         (WebCore::WebGL2RenderingContext::uniformMatrix2x4fv):
2950         (WebCore::WebGL2RenderingContext::uniformMatrix4x2fv):
2951         (WebCore::WebGL2RenderingContext::uniformMatrix3x4fv):
2952         (WebCore::WebGL2RenderingContext::uniformMatrix4x3fv):
2953         (WebCore::WebGL2RenderingContext::clearBufferiv):
2954         (WebCore::WebGL2RenderingContext::clearBufferuiv):
2955         (WebCore::WebGL2RenderingContext::clearBufferfv):
2956         * html/canvas/WebGL2RenderingContext.h:
2957         * html/canvas/WebGL2RenderingContext.idl:
2958
2959 2017-09-19  Ryosuke Niwa  <rniwa@webkit.org>
2960
2961         On Mac, dataTransfer claims to contain URL list when dropping files
2962         https://bugs.webkit.org/show_bug.cgi?id=177219
2963
2964         Reviewed by Wenson Hsieh.
2965
2966         Fixed the bug by removing code which was specifically adding local filenames as URLs in "text/uri-list"
2967         when pasting or dropping files. Neither Chrome nor Firefox exhibit this behavior, and exposing local
2968         filenames reveal sensitive information such as username.
2969
2970         Test: editing/pasteboard/datatransfer-types-dropping-text-file.html
2971
2972         * platform/mac/PasteboardMac.mm:
2973         (WebCore::Pasteboard::readString):
2974         (WebCore::addHTMLClipboardTypesForCocoaType):
2975         (WebCore::absoluteURLsFromPasteboard): Deleted.
2976
2977 2017-09-19  Simon Fraser  <simon.fraser@apple.com>
2978
2979         Simplify compositing layer updating
2980         https://bugs.webkit.org/show_bug.cgi?id=176196
2981
2982         Reviewed by Zalan Bujtas.
2983
2984         Remove compositing layer updating from the updateLayerPositions() code path, which
2985         was problematic because it wasn't pre-order. Instead, just rely on post-layout
2986         compositing updates, which now need to do geometry updates. Micro benchmarking shows
2987         this to be no slower.
2988
2989         We can remove the 'OnHitTest' update type, since we always ensure that layout is updated
2990         before hit testing now.
2991
2992         Also remove a code path that could trigger updateGeometry() during a style change, and
2993         in response to images loads, which were bad because layout may not be up-to-date at this time.
2994
2995         Tested by existing compositing tests. Rebaselined two tests after confirming they are progressions.
2996
2997         * rendering/RenderLayer.cpp:
2998         (WebCore::RenderLayer::updateLayerPositions):
2999         (WebCore::RenderLayer::hitTestLayer):
3000         (WebCore::RenderLayer::calculateClipRects const):
3001         * rendering/RenderLayer.h:
3002         * rendering/RenderLayerBacking.cpp:
3003         (WebCore::RenderLayerBacking::updateGeometry):
3004         (WebCore::RenderLayerBacking::contentChanged):
3005         (WebCore::RenderLayerBacking::updateAfterLayout): Deleted.
3006         * rendering/RenderLayerBacking.h:
3007         * rendering/RenderLayerCompositor.cpp:
3008         (WebCore::RenderLayerCompositor::updateCompositingLayers):
3009         (WebCore::RenderLayerCompositor::layerStyleChanged):
3010         (WebCore::operator<<):
3011         * rendering/RenderLayerCompositor.h:
3012
3013 2017-09-19  Simon Fraser  <simon.fraser@apple.com>
3014
3015         Do more math in terms of FloatSizes and FloatPoints
3016         https://bugs.webkit.org/show_bug.cgi?id=177217
3017
3018         Reviewed by Zalan Bujtas.
3019         
3020         Add operator/(const FloatSize&, const FloatSize&), GraphicsContext::translate(const FloatPoint&),
3021         FloatRect.scale(FloatSize) and AffineTransform::translate(const FloatSize&)
3022         and use them in lots of places to do math in terms of points and sizes.
3023
3024         * html/canvas/CanvasRenderingContext2D.cpp:
3025         (WebCore::CanvasRenderingContext2D::drawImage):
3026         (WebCore::CanvasRenderingContext2D::fullCanvasCompositedDrawImage):
3027         (WebCore::CanvasRenderingContext2D::drawTextInternal):
3028         * page/mac/TextIndicatorWindow.mm:
3029         (-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]):
3030         * platform/Theme.cpp:
3031         (WebCore::Theme::drawNamedImage const):
3032         * platform/graphics/CrossfadeGeneratedImage.cpp:
3033         (WebCore::drawCrossfadeSubimage):
3034         (WebCore::CrossfadeGeneratedImage::draw):
3035         * platform/graphics/FloatRect.h:
3036         (WebCore::FloatRect::center const):
3037         (WebCore::FloatRect::scale):
3038         * platform/graphics/FloatSize.h:
3039         (WebCore::operator/):
3040         * platform/graphics/GradientImage.cpp:
3041         (WebCore::GradientImage::draw):
3042         * platform/graphics/GraphicsContext.cpp:
3043         (WebCore::GraphicsContext::scaleFactorForDrawing const):
3044         * platform/graphics/GraphicsContext.h:
3045         (WebCore::GraphicsContext::translate):
3046         * platform/graphics/Image.cpp:
3047         (WebCore::Image::drawTiled):
3048         * platform/graphics/ImageBuffer.cpp:
3049         (WebCore::ImageBuffer::clampedSize):
3050         (WebCore::ImageBuffer::createCompatibleBuffer):
3051         * platform/graphics/LayoutSize.h:
3052         * platform/graphics/NamedImageGeneratedImage.cpp:
3053         (WebCore::NamedImageGeneratedImage::draw):
3054         * platform/graphics/Path.cpp:
3055         (WebCore::Path::addRoundedRect):
3056         * platform/graphics/cg/ImageBufferCG.cpp:
3057         (WebCore::ImageBuffer::createCompatibleBuffer):
3058         * platform/graphics/cg/PDFDocumentImage.cpp:
3059         (WebCore::transformContextForPainting):
3060         (WebCore::applyRotationForPainting):
3061         (WebCore::PDFDocumentImage::drawPDFPage):
3062         * platform/graphics/filters/FETile.cpp:
3063         (WebCore::FETile::platformApplySoftware):
3064         * platform/graphics/transforms/AffineTransform.cpp:
3065         (WebCore::AffineTransform::translate):
3066         (WebCore::makeMapBetweenRects):
3067         * platform/graphics/transforms/AffineTransform.h:
3068         * platform/mac/ScrollbarThemeMac.mm:
3069         (WebCore::ScrollbarThemeMac::paint):
3070         * platform/mac/ThemeMac.mm:
3071         (WebCore::paintToggleButton):
3072         (WebCore::paintButton):
3073         (WebCore::paintStepper):
3074         * rendering/FilterEffectRenderer.cpp:
3075         (WebCore::FilterEffectRendererHelper::beginFilterEffect):
3076         * rendering/RenderBoxModelObject.cpp:
3077         (WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
3078         (WebCore::RenderBoxModelObject::paintBoxShadow):
3079         * rendering/RenderEmbeddedObject.cpp:
3080         (WebCore::RenderEmbeddedObject::getReplacementTextGeometry const):
3081         * rendering/RenderLayer.cpp:
3082         (WebCore::RenderLayer::calculateClipRects const):
3083         * rendering/RenderLayerBacking.cpp:
3084         (WebCore::RenderLayerBacking::paintContents):
3085         * rendering/RenderLayerCompositor.cpp:
3086         (WebCore::paintScrollbar):
3087         (WebCore::RenderLayerCompositor::paintContents):
3088         * rendering/RenderMediaControls.cpp:
3089         (WebCore::getUnzoomedRectAndAdjustCurrentContext):
3090         * rendering/RenderThemeMac.mm:
3091         (WebCore::RenderThemeMac::paintMenuList):
3092         (WebCore::RenderThemeMac::paintSliderThumb):
3093         (WebCore::RenderThemeMac::paintSearchField):
3094         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
3095         (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
3096         (WebCore::RenderThemeMac::paintImageControlsButton):
3097         * rendering/svg/RenderSVGForeignObject.cpp:
3098         (WebCore::RenderSVGForeignObject::RenderSVGForeignObject):
3099         (WebCore::RenderSVGForeignObject::localToParentTransform const):
3100         * rendering/svg/RenderSVGForeignObject.h:
3101         * rendering/svg/RenderSVGResourceClipper.cpp:
3102         (WebCore::RenderSVGResourceClipper::pathOnlyClipping):
3103         (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
3104         (WebCore::RenderSVGResourceClipper::hitTestClipContent):
3105         (WebCore::RenderSVGResourceClipper::resourceBoundingBox):
3106         * rendering/svg/RenderSVGResourceGradient.cpp:
3107         (WebCore::clipToTextMask):
3108         (WebCore::RenderSVGResourceGradient::applyResource):
3109         * rendering/svg/RenderSVGResourceMarker.cpp:
3110         (WebCore::RenderSVGResourceMarker::markerTransformation const):
3111         (WebCore::RenderSVGResourceMarker::markerContentTransformation const):
3112         * rendering/svg/RenderSVGResourceMasker.cpp:
3113         (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
3114         (WebCore::RenderSVGResourceMasker::resourceBoundingBox):
3115         * rendering/svg/RenderSVGResourcePattern.cpp:
3116         (WebCore::RenderSVGResourcePattern::buildPattern):
3117         (WebCore::RenderSVGResourcePattern::createTileImage const):
3118         * rendering/svg/RenderSVGTransformableContainer.cpp:
3119         (WebCore::RenderSVGTransformableContainer::calculateLocalTransform):
3120         * rendering/svg/SVGRenderingContext.cpp:
3121         (WebCore::SVGRenderingContext::createImageBuffer):
3122         (WebCore::SVGRenderingContext::bufferForeground):
3123         * svg/SVGAnimateMotionElement.cpp:
3124         (WebCore::SVGAnimateMotionElement::buildTransformForProgress):
3125         * svg/SVGSVGElement.cpp:
3126         (WebCore::SVGSVGElement::localCoordinateSpaceTransform const):
3127         * svg/graphics/SVGImage.cpp:
3128         (WebCore::SVGImage::draw):
3129
3130 2017-09-19  Chris Dumez  <cdumez@apple.com>
3131
3132         IDBRequest and IDBTransaction error properties should be DOMExceptions
3133         https://bugs.webkit.org/show_bug.cgi?id=177201
3134
3135         Reviewed by Alex Christensen.
3136
3137         IDBRequest and IDBTransaction error properties should be DOMExceptions:
3138         - https://w3c.github.io/IndexedDB/#idbrequest
3139         - https://w3c.github.io/IndexedDB/#transaction
3140
3141         Previously, we used a DOMError type, which is obsolete.
3142
3143         No new tests, rebaselined existing test.
3144
3145         * Modules/indexeddb/IDBOpenDBRequest.cpp:
3146         (WebCore::IDBOpenDBRequest::onError):
3147         (WebCore::IDBOpenDBRequest::fireErrorAfterVersionChangeCompletion):
3148         * Modules/indexeddb/IDBRequest.cpp:
3149         (WebCore:: const):
3150         (WebCore::IDBRequest::uncaughtExceptionInEventHandler):
3151         (WebCore::IDBRequest::onError):
3152         * Modules/indexeddb/IDBRequest.h:
3153         * Modules/indexeddb/IDBRequest.idl:
3154         * Modules/indexeddb/IDBTransaction.cpp:
3155         (WebCore::IDBTransaction::error const):
3156         (WebCore::IDBTransaction::abortDueToFailedRequest):
3157         (WebCore::IDBTransaction::didCreateIndexOnServer):
3158         (WebCore::IDBTransaction::connectionClosedFromServer):
3159         * Modules/indexeddb/IDBTransaction.h:
3160         * Modules/indexeddb/IDBTransaction.idl:
3161         * Modules/indexeddb/shared/IDBError.cpp:
3162         (WebCore::IDBError::toDOMException const):
3163         * Modules/indexeddb/shared/IDBError.h:
3164
3165 2017-09-19  Daewoong Jang  <daewoong.jang@naverlabs.com>
3166
3167         [Curl] Fix r222147
3168         https://bugs.webkit.org/show_bug.cgi?id=177128
3169
3170         Reviewed by Alex Christensen.
3171
3172         * platform/network/curl/CurlSSLHandle.h:
3173         * platform/network/curl/CurlSSLVerifier.cpp:
3174         (WebCore::CurlSSLVerifier::certVerifyCallback):
3175         * platform/network/curl/CurlSSLVerifier.h:
3176
3177 2017-09-19  Simon Fraser  <simon.fraser@apple.com>
3178
3179         Image subclasses should support is<> and downcast<>
3180         https://bugs.webkit.org/show_bug.cgi?id=177209
3181
3182         Reviewed by Tim Horton.
3183
3184         Add SPECIALIZE_TYPE_TRAITS_IMAGE() for Image subclasses.
3185
3186         Also use #pragma once in these headers.
3187
3188         * platform/graphics/CrossfadeGeneratedImage.h:
3189         * platform/graphics/GeneratedImage.h:
3190         * platform/graphics/GradientImage.h:
3191         * platform/graphics/Image.h:
3192         * platform/graphics/NamedImageGeneratedImage.h:
3193
3194 2017-09-19  Wenson Hsieh  <wenson_hsieh@apple.com>
3195
3196         REGRESSION (r215613): Incorrect corners clipping with border-radius
3197         https://bugs.webkit.org/show_bug.cgi?id=176498
3198         <rdar://problem/34112607>
3199
3200         Reviewed by Tim Horton.
3201
3202         http://trac.webkit.org/r215613 introduced an optimization to bail out of repainting borders if the invalidated
3203         rect to paint is fully contained within the inner rounded rect of the border. However, due to issues with
3204         coordinate and intersection math in RoundedRect::contains() and ellipseContainsPoint(), this causes
3205         RenderBoxModelObject::paintBorder to return early even in circumstances where the border requires a repaint.
3206         This patch fixes the contains() helper in RoundedRect and adds a new API test suite for RoundedRect that covers
3207         these changes.
3208
3209         Test: WebCore.RoundedRectContainsRect
3210
3211         * platform/graphics/GeometryUtilities.cpp:
3212         (WebCore::ellipseContainsPoint):
3213
3214         This function attempts to return early if the Manhattan distance of the transformed point is less than the
3215         radius of the circle that results from applying the same transformation to the ellipse. However, this bails and
3216         returns true if `x + y <= R`, but this means that if x and y are negative, we'll always end up returning true.
3217         We fix this by adding the absolute values instead, so the check becomes: |x| + |y| <= R.
3218
3219         * platform/graphics/RoundedRect.cpp:
3220         (WebCore::RoundedRect::contains const):
3221
3222         Before this patch, otherRect's upper left location was being used to hit-test against the ellipses formed from
3223         each of the 4 corners of the rounded rect. Instead, this should use (x, y), (maxX, y), (x, maxY), (maxX, maxY)
3224         for the top left, top right, bottom left, and bottom right corners, respectively.
3225
3226         Additionally, the checks for the bottom left and bottom right to determine whether the rect corner should be
3227         checked for intersection against the ellipse's corner are incorrect. In the bottom left corner, the check for
3228         `otherRect.maxX() >= center.x()` should instead be `otherRect.x() <= center.x()`, and the check for
3229         `otherRect.x() <= center.x()` should instead be `otherRect.maxX() >= center.x()`.
3230
3231         * platform/graphics/RoundedRect.h:
3232
3233 2017-09-19  Alexey Proskuryakov  <ap@apple.com>
3234
3235         Layering violation in Editor::createFragment
3236         https://bugs.webkit.org/show_bug.cgi?id=176123
3237
3238         Reviewed by Darin Adler.
3239
3240         * WebCore.xcodeproj/project.pbxproj:
3241         * editing/cocoa/WebArchiveResourceFromNSAttributedString.h: Added.
3242         * editing/cocoa/WebArchiveResourceFromNSAttributedString.mm: Added.
3243         Added a wrapper class for ArchiveResource, suitable for use as a WebResourceHandler.
3244
3245         * editing/cocoa/WebArchiveResourceWebResourceHandler.h: Added.
3246         * editing/cocoa/WebArchiveResourceWebResourceHandler.mm: Added.
3247         Objects of this class can be passed as "WebResourceHandler", and created instances
3248         of the above class.
3249
3250         * editing/cocoa/WebContentReaderCocoa.mm:
3251         (WebCore::attributesForAttributedStringConversion):
3252         (WebCore::createFragment):
3253         On newer OS versions, don't use WebKitLegacy to convert NSAttributedString to a
3254         document fragment. We now only use system frameworks to convert the attributed
3255         string to HTML source, and parse HTML into a fragment directly in WebCore.
3256
3257         * platform/URL.h: Exported fakeURLWithRelativePart.
3258
3259 2017-09-19  Youenn Fablet  <youenn@apple.com>
3260
3261         Allow WTF::map to use any class that is iterable and has a size getter
3262         https://bugs.webkit.org/show_bug.cgi?id=177026
3263
3264         Reviewed by Darin Adler.
3265
3266         No change of behavior.
3267         Using WTF::map to go from maps to vectors.
3268
3269         * loader/appcache/ApplicationCacheHost.cpp:
3270         (WebCore::ApplicationCacheHost::resourceList):
3271         * page/DOMWindow.cpp:
3272         (WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
3273
3274 2017-09-19  Eric Carlson  <eric.carlson@apple.com>
3275
3276         Quiet media player private logging
3277         https://bugs.webkit.org/show_bug.cgi?id=177199
3278
3279         Reviewed by Jer Noble.
3280
3281         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3282         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
3283
3284 2017-09-19  Alex Christensen  <achristensen@webkit.org>
3285
3286         Allow modern decoding of Vectors
3287         https://bugs.webkit.org/show_bug.cgi?id=177102
3288
3289         Reviewed by Andy Estes.
3290
3291         * Modules/cache/DOMCacheEngine.h:
3292         (WebCore::DOMCacheEngine::CacheInfos::decode):
3293         (WebCore::DOMCacheEngine::CacheIdentifierOperationResult::decode):
3294         * Modules/indexeddb/IDBDatabaseIdentifier.cpp:
3295         (WebCore::IDBDatabaseIdentifier::IDBDatabaseIdentifier):
3296         * Modules/indexeddb/IDBDatabaseIdentifier.h:
3297         (WebCore::IDBDatabaseIdentifier::decode):
3298         * Modules/indexeddb/IDBFactory.cpp:
3299         (WebCore::IDBFactory::openInternal):
3300         (WebCore::IDBFactory::deleteDatabase):
3301         * Modules/indexeddb/IDBGetAllResult.h:
3302         (WebCore::IDBGetAllResult::decode):
3303         * Modules/indexeddb/IDBGetResult.h:
3304         (WebCore::IDBGetResult::decode):
3305         * Modules/indexeddb/IDBKeyData.h:
3306         (WebCore::IDBKeyData::decode):
3307         * Modules/indexeddb/IDBKeyRangeData.h:
3308         (WebCore::IDBKeyRangeData::decode):
3309         * Modules/indexeddb/IDBValue.h:
3310         (WebCore::IDBValue::decode):
3311         * Modules/indexeddb/shared/IDBError.h:
3312         * Modules/indexeddb/shared/IDBIterateCursorData.h:
3313         (WebCore::IDBIterateCursorData::decode):
3314         * Modules/indexeddb/shared/IDBRequestData.h:
3315         (WebCore::IDBRequestData::decode):
3316         * Modules/indexeddb/shared/IDBResultData.h:
3317         (WebCore::IDBResultData::decode):
3318         * page/SecurityOriginData.h:
3319         (WebCore::SecurityOriginData::decode):
3320         * platform/Cookie.h:
3321         (WebCore::Cookie::decode):
3322         * platform/mediastream/MediaConstraints.h:
3323         (WebCore::MediaTrackConstraintSetMap::decode):
3324         * platform/network/FormData.h:
3325         (WebCore::FormDataElement::decode):
3326         * workers/service/ServiceWorkerJobData.h:
3327         (WebCore::ServiceWorkerJobData::decode):
3328         * workers/service/ServiceWorkerRegistrationData.h:
3329         (WebCore::ServiceWorkerRegistrationData::decode):
3330         * workers/service/ServiceWorkerRegistrationKey.h:
3331         (WebCore::ServiceWorkerRegistrationKey::decode):
3332
3333 2017-09-19  Ryosuke Niwa  <rniwa@webkit.org>
3334
3335         On iOS, getData can't get text set by setData during copy event
3336         https://bugs.webkit.org/show_bug.cgi?id=176980
3337         <rdar://problem/34453915>
3338
3339         Reviewed by Darin Adler.
3340
3341         The bug was caused by iOS port not implementing Pasteboard::createPrivate(). Rather than implementing this in iOS,
3342         replace its use for copy & paste events by StaticPasteboard Wenson added for input events. This makes read-write
3343         pasteboard platform agnostic and paves the way to make writing to pasteboard in a single IPC in WebKit2.
3344
3345         Also fixed a bug that iOS port's Pasteboard::types returned the list of all supported types instead of ones
3346         actually present in the pasteboard.
3347
3348         This patch also adds a vector of types to StaticPasteboard to maintain the type order.
3349
3350         Tests: editing/pasteboard/dataTransfer-types-is-initially-empty-on-copy.html
3351                editing/pasteboard/dataTransfer-types-pasting-plaintext.html
3352
3353         * dom/DataTransfer.cpp:
3354         (WebCore::DataTransfer::createForCopyAndPaste): Make StaticPasteboard instead of a private pasteboard.
3355         (WebCore::DataTransfer::createForInputEvent):
3356         * editing/Editor.cpp:
3357         (WebCore::dispatchClipboardEvent): Call newly added commitToPasteboard on StaticPasteboard.
3358         * platform/Pasteboard.h:
3359         (WebCore::Pasteboard::isStatic const):
3360         * platform/PasteboardStrategy.h:
3361         * platform/StaticPasteboard.cpp:
3362         (WebCore::StaticPasteboard::create): Deleted.
3363         (WebCore::StaticPasteboard::StaticPasteboard):
3364         (WebCore::StaticPasteboard::hasData):
3365         (WebCore::StaticPasteboard::types): Deleted. Now simply returns m_type.
3366         (WebCore::StaticPasteboard::readString): Added.
3367         (WebCore::StaticPasteboard::writeString): Added.
3368         (WebCore::StaticPasteboard::clear): Added.
3369         (WebCore::StaticPasteboard::commitToPasteboard): Added.
3370         (isType): Added.
3371         * platform/StaticPasteboard.h:
3372         (WebCore::Pasteboard::isStatic const): Added.
3373         * platform/gtk/PasteboardGtk.cpp:
3374         (WebCore::Pasteboard::createPrivate): Deleted.
3375         (WebCore::Pasteboard::writePasteboard): Deleted.
3376         * platform/ios/PasteboardIOS.mm:
3377         (WebCore::Pasteboard::createPrivate): Deleted.
3378         (WebCore::Pasteboard::writePasteboard): Deleted.
3379         (WebCore::addHTMLClipboardTypesForCocoaType):
3380         (WebCore::Pasteboard::types): Return the actual list of types in the pasteboard.
3381         * platform/mac/PasteboardMac.mm:
3382         (WebCore::Pasteboard::createPrivate): Deleted.
3383         (WebCore::Pasteboard::writePasteboard): Deleted.
3384         * platform/win/PasteboardWin.cpp:
3385         (WebCore::Pasteboard::createPrivate): Deleted.
3386         (WebCore::Pasteboard::writePasteboard): Deleted.
3387         * platform/wpe/PasteboardWPE.cpp:
3388         (WebCore::Pasteboard::createPrivate): Deleted.
3389         (WebCore::Pasteboard::writePasteboard): Deleted.
3390
3391 2017-09-19  Zalan Bujtas  <zalan@apple.com>
3392
3393         AXObjectCache::performDeferredCacheUpdate is called recursively through FrameView::layout. 
3394         https://bugs.webkit.org/show_bug.cgi?id=176218
3395         <rdar://problem/34205612>
3396
3397         Reviewed by Simon Fraser.
3398
3399         There are certain cases when we might re-enter performDeferredCacheUpdate through recursive
3400         layout calls (see webkit.org/b/177176) and mutate m_deferredTextChangedList multiple times.
3401
3402         Test: accessibility/crash-table-recursive-layout.html
3403
3404         * accessibility/AXObjectCache.cpp:
3405         (WebCore::AXObjectCache::performDeferredCacheUpdate):
3406         * accessibility/AXObjectCache.h:
3407
3408 2017-09-19  Jer Noble  <jer.noble@apple.com>
3409
3410         [Cocoa] Add an ImageDecoder subclass backed by AVFoundation
3411         https://bugs.webkit.org/show_bug.cgi?id=176825
3412
3413         Reviewed by Eric Carlson.
3414
3415         Add a new concrete subclass of ImageDecoder which uses AVFoundation to parse and decode
3416         image data.
3417
3418         AVFoundation APIs require prior knowledge of the media data's mime type to determine whether
3419         the media data is decodable, so the mime type information must be passed through from the
3420         CachedResource -> CachedImage -> ImageFrameCache -> ImageSource so as to be available when
3421         creating the ImageDecoder:
3422
3423         (Drive-by fix: the createFrameImageAtIndex() method will mutate internal state, so make it
3424         non-const.)
3425
3426         * loader/cache/CachedImage.h:
3427         * loader/cache/CachedResource.h:
3428         (WebCore::CachedResource::mimeType const):
3429         * platform/cf/CoreMediaSoftLink.cpp:
3430         * platform/cf/CoreMediaSoftLink.h:
3431         * platform/cocoa/VideoToolboxSoftLink.cpp:
3432         * platform/cocoa/VideoToolboxSoftLink.h:
3433         * platform/graphics/Image.cpp:
3434         (WebCore::Image::mimeType const):
3435         (WebCore::Image::expectedContentSize const):
3436         * platform/graphics/Image.h:
3437         * platform/graphics/ImageDecoder.cpp:
3438         (WebCore::ImageDecoder::create):
3439         * platform/graphics/ImageDecoder.h:
3440         (WebCore::ImageDecoder::setExpectedContentSize):
3441         * platform/graphics/ImageFrameCache.cpp:
3442         (WebCore::ImageFrameCache::mimeType const):
3443         * platform/graphics/ImageFrameCache.h:
3444         * platform/graphics/ImageObserver.h:
3445         * platform/graphics/ImageSource.cpp:
3446         (WebCore::ImageSource::ensureDecoderAvailable):
3447         * platform/graphics/cg/ImageDecoderCG.cpp:
3448         (WebCore::ImageDecoderCG::createFrameImageAtIndex):
3449         * platform/graphics/cg/ImageDecoderCG.h:
3450
3451         Add the new class, ImageDecoderAVFObjC:
3452
3453         AVFoundation expects to load all the media data for an AVURLAsset itself. To map between the
3454         provided SharedData and AVURLAsset's requirements, create a delegate object
3455         WebCoreSharedBufferResourceLoaderDelegate, which responds to requests from the AVURLAsset by
3456         extracting data from the SharedData object. Ensure AVURLAsset doesn't load any data outside
3457         this delegate by passing the AVURLAssetReferenceRestrictionsKey /
3458         AVAssetReferenceRestrictionForbidAll key and value in the AVURLAsset creation options.
3459
3460         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h: Added.
3461         (WebCore::ImageDecoderAVFObjC::create):
3462         (WebCore::ImageDecoderAVFObjC::mimeType const):
3463         (WebCore::ImageDecoderAVFObjC::RotationProperties::isIdentity const):
3464         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm: Added.
3465         (SOFT_LINK_CONSTANT):
3466         (-[WebCoreSharedBufferResourceLoaderDelegate initWithParent:]):
3467         (-[WebCoreSharedBufferResourceLoaderDelegate setExpectedContentSize:]):
3468         (-[WebCoreSharedBufferResourceLoaderDelegate updateData:complete:]):
3469         (-[WebCoreSharedBufferResourceLoaderDelegate canFulfillRequest:]):
3470         (-[WebCoreSharedBufferResourceLoaderDelegate enqueueRequest:]):
3471         (-[WebCoreSharedBufferResourceLoaderDelegate fulfillPendingRequests]):
3472         (-[WebCoreSharedBufferResourceLoaderDelegate fulfillRequest:]):
3473         (-[WebCoreSharedBufferResourceLoaderDelegate resourceLoader:shouldWaitForLoadingOfRequestedResource:]):
3474         (-[WebCoreSharedBufferResourceLoaderDelegate resourceLoader:didCancelLoadingRequest:]):
3475         (WebCore::customSchemeURL):
3476         (WebCore::imageDecoderAssetOptions):
3477         (WebCore::transformToRotationProperties):
3478         (WebCore::ImageDecoderAVFObjC::ImageDecoderAVFObjC):
3479         (WebCore::ImageDecoderAVFObjC::canDecodeType):
3480         (WebCore::ImageDecoderAVFObjC::firstEnabledTrack):
3481         (WebCore::ImageDecoderAVFObjC::readSampleMetadata): Parses the media data using AVSampleCursor to walk
3482             the media sample table, extracting frame presentation time, decode time, and duration.
3483         (WebCore::ImageDecoderAVFObjC::readTrackMetadata): Reads the affine transform and size information from
3484             the AVAssetTrack, and transforms the transform into a rotation value.
3485         (WebCore::ImageDecoderAVFObjC::storeSampleBuffer): Decompress the incoming sample data, optionally rotate
3486             the output, and store the results in the sample data vector.
3487         (WebCore::ImageDecoderAVFObjC::advanceCursor): Wrap around the end of the sample table.
3488         (WebCore::ImageDecoderAVFObjC::setTrack): Reset all sample and track metadata.
3489         (WebCore::ImageDecoderAVFObjC::encodedDataStatus const): Retrieve from sample data.
3490         (WebCore::ImageDecoderAVFObjC::frameCount const): Ditto.
3491         (WebCore::ImageDecoderAVFObjC::repetitionCount const): Ditto.
3492         (WebCore::ImageDecoderAVFObjC::uti const): Ditto.
3493         (WebCore::ImageDecoderAVFObjC::filenameExtension const): Ditto.
3494         (WebCore::ImageDecoderAVFObjC::frameSizeAtIndex const): Ditto.
3495         (WebCore::ImageDecoderAVFObjC::frameIsCompleteAtIndex const): Ditto.
3496         (WebCore::ImageDecoderAVFObjC::frameOrientationAtIndex const): Ditto.
3497         (WebCore::ImageDecoderAVFObjC::frameDurationAtIndex const): Ditto.
3498         (WebCore::ImageDecoderAVFObjC::frameHasAlphaAtIndex const): Ditto.
3499         (WebCore::ImageDecoderAVFObjC::frameAllowSubsamplingAtIndex const): Ditto.
3500         (WebCore::ImageDecoderAVFObjC::frameBytesAtIndex const): Ditto.
3501         (WebCore::ImageDecoderAVFObjC::createFrameImageAtIndex): If the sample data has already been
3502             decompressed, return it. Otherwise, walk through the sample table decompressing frames
3503             until the desired frame is decoded.
3504         (WebCore::ImageDecoderAVFObjC::setData):
3505         (WebCore::ImageDecoderAVFObjC::clearFrameBufferCache):
3506
3507         Modify WebCoreDecompressionSession so that it can emit frames which have been converted from
3508         YUV -> RGB as part of the decode operation. Also, add a synchronous decoding operation
3509         method, for use in ImageDecoderAVFObjC.
3510
3511         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3512         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureDecompressionSession):
3513         * platform/graphics/cocoa/WebCoreDecompressionSession.h:
3514         (WebCore::WebCoreDecompressionSession::createOpenGL):
3515         (WebCore::WebCoreDecompressionSession::createRGB):
3516         * platform/graphics/cocoa/WebCoreDecompressionSession.mm:
3517         (WebCore::WebCoreDecompressionSession::WebCoreDecompressionSession):
3518         (WebCore::WebCoreDecompressionSession::ensureDecompressionSessionForSample):
3519         (WebCore::WebCoreDecompressionSession::decodeSample):
3520         (WebCore::WebCoreDecompressionSession::decodeSampleSync):
3521
3522         Other changes:
3523
3524         * WebCore.xcodeproj/project.pbxproj: Add new files to project.
3525         * platform/cocoa/VideoToolboxSoftLink.cpp: Add newly referenced methods.
3526         * platform/cocoa/VideoToolboxSoftLink.h: Ditto.
3527
3528
3529 2017-09-19  Basuke Suzuki  <Basuke.Suzuki@sony.com>
3530
3531         [Curl] Move Authentication related tasks into AuthenticationChallenge class
3532         https://bugs.webkit.org/show_bug.cgi?id=177105
3533
3534         Currently those codes are in ResourceHandle or related companion. It will
3535         be reused with NetworkLoadTask so that it should be separated from them.
3536
3537         Reviewed by Alex Christensen.
3538
3539         * platform/Curl.cmake:
3540         * platform/network/curl/AuthenticationChallenge.h:
3541         (WebCore::AuthenticationChallenge::AuthenticationChallenge): Deleted.
3542         (WebCore::AuthenticationChallenge::authenticationClient const): Deleted.
3543         (WebCore::AuthenticationChallenge::setAuthenticationClient): Deleted.
3544         * platform/network/curl/AuthenticationChallengeCurl.cpp: Added.
3545         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
3546         (WebCore::AuthenticationChallenge::protectionSpaceServerTypeFromURI):
3547         (WebCore::AuthenticationChallenge::protectionSpaceFromHandle):
3548         (WebCore::AuthenticationChallenge::removeLeadingAndTrailingQuotes):
3549         * platform/network/curl/ResourceHandleCurlDelegate.cpp:
3550         (WebCore::ResourceHandleCurlDelegate::didReceiveAllHeaders):
3551         (WebCore::ResourceHandleCurlDelegate::didReceiveHeader):
3552         (WebCore::removeLeadingAndTrailingQuotes): Deleted.
3553         (WebCore::ResourceHandleCurlDelegate::getProtectionSpace): Deleted.
3554         * platform/network/curl/ResourceHandleCurlDelegate.h:
3555
3556 2017-09-19  Zalan Bujtas  <zalan@apple.com>
3557
3558         Do not mutate RenderText content during layout.
3559         https://bugs.webkit.org/show_bug.cgi?id=176219
3560         <rdar://problem/34205724>
3561
3562         Reviewed by David Hyatt.
3563
3564         Update combined text when the style/content change as opposed to lazily, during layout.
3565         -content mutation during layout might make the inline tree go out of sync.
3566
3567         Test: fast/text/international/dynamic-text-combine-crash.html
3568
3569         * rendering/RenderBlockFlow.cpp:
3570         (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths const):
3571         * rendering/RenderCombineText.cpp:
3572         (WebCore::RenderCombineText::styleDidChange):
3573         (WebCore::RenderCombineText::setRenderedText):
3574         (WebCore::RenderCombineText::combineTextIfNeeded):
3575         (WebCore::RenderCombineText::combineText): Deleted.
3576         * rendering/RenderCombineText.h:
3577         * rendering/RenderText.h:
3578         * rendering/line/BreakingContext.h:
3579         (WebCore::BreakingContext::handleText):
3580         * rendering/line/LineBreaker.cpp:
3581         (WebCore::LineBreaker::skipLeadingWhitespace):
3582
3583 2017-09-15  Wenson Hsieh  <wenson_hsieh@apple.com>
3584
3585         createMarkupInternal should protect its pointer to the Range's common ancestor
3586         https://bugs.webkit.org/show_bug.cgi?id=177033
3587         <rdar://problem/34265390>
3588
3589         Reviewed by Tim Horton.
3590
3591         Adds basic safeguarding to codepaths hit while executing an outdent command.
3592
3593         Test: editing/execCommand/outdent-with-media-query-listener-in-iframe.html
3594
3595         * editing/IndentOutdentCommand.cpp:
3596         (WebCore::IndentOutdentCommand::outdentRegion):
3597
3598         Avoid an infinite loop if endOfCurrentParagraph is a null position.
3599
3600         * editing/markup.cpp:
3601         (WebCore::createMarkupInternal):
3602
3603         Protect the raw pointer to the Range's common ancestor node.
3604
3605 2017-09-19  Ryan Haddad  <ryanhaddad@apple.com>
3606
3607         Unreviewed, rolling out r222217 and r222214.
3608         This change introduced two LayoutTest failures.
3609         https://bugs.webkit.org/show_bug.cgi?id=177026
3610
3611         * rendering/RenderBlockFlow.cpp:
3612         (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths const):
3613         * rendering/RenderCombineText.cpp:
3614         (WebCore::RenderCombineText::styleDidChange):
3615         (WebCore::RenderCombineText::setRenderedText):
3616         (WebCore::RenderCombineText::combineText):
3617         (WebCore::RenderCombineText::combineTextIfNeeded): Deleted.
3618         * rendering/RenderCombineText.h:
3619         * rendering/RenderText.cpp:
3620         * rendering/RenderText.h:
3621         * rendering/line/BreakingContext.h:
3622         (WebCore::BreakingContext::handleText):
3623         * rendering/line/LineBreaker.cpp:
3624         (WebCore::LineBreaker::skipLeadingWhitespace):
3625
3626 2017-09-19  Zalan Bujtas  <zalan@apple.com>
3627
3628         Attempt to fix Linux build.
3629
3630         * rendering/RenderText.cpp:
3631
3632 2017-09-19  Zalan Bujtas  <zalan@apple.com>
3633
3634         Do not mutate RenderText content during layout.
3635         https://bugs.webkit.org/show_bug.cgi?id=176219
3636         <rdar://problem/34205724>
3637
3638         Reviewed by David Hyatt.
3639
3640         Update combined text when the style/content change as opposed to lazily, during layout.
3641         -content mutation during layout might make the inline tree go out of sync.
3642
3643         Test: fast/text/international/dynamic-text-combine-crash.html
3644
3645         * rendering/RenderBlockFlow.cpp:
3646         (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths const):
3647         * rendering/RenderCombineText.cpp:
3648         (WebCore::RenderCombineText::styleDidChange):
3649         (WebCore::RenderCombineText::setRenderedText):
3650         (WebCore::RenderCombineText::combineTextIfNeeded):
3651         (WebCore::RenderCombineText::combineText): Deleted.
3652         * rendering/RenderCombineText.h:
3653         * rendering/RenderText.h:
3654         * rendering/line/BreakingContext.h:
3655         (WebCore::BreakingContext::handleText):
3656         * rendering/line/LineBreaker.cpp:
3657         (WebCore::LineBreaker::skipLeadingWhitespace):
3658
3659 2017-09-19  Nael Ouedraogo  <nael.ouedraogo@crf.canon.fr>
3660
3661         [GTK] The binding code of Media Source Extension of AudioTrack, VideoTrack and TextTrack is not generated
3662         https://bugs.webkit.org/show_bug.cgi?id=174620
3663
3664         Reviewed by Michael Catanzaro.
3665
3666         Add AudioTrackMediaSource, VideoTrackMediaSource and TextTrackMediaSource IDL files in CMakeLists. Fix WPT test
3667         that checks MSE interfaces. This test failed since webm is not supported for MSE in GTK port. PR already merged
3668         in WPT repository.
3669
3670         Remove skipped test that is now passing in TestExpectation. Modify expected file for GTK (same as mac).
3671
3672         * CMakeLists.txt:
3673
3674 2017-09-18  Carlos Garcia Campos  <cgarcia@igalia.com>
3675
3676         [Harfbuzz] adjustSelectionRectForComplexText() should also pass the character range when shaping
3677         https://bugs.webkit.org/show_bug.cgi?id=177049
3678
3679         Reviewed by Michael Catanzaro.
3680
3681         Now that the shaper support receiving a range we should use that also in
3682         adjustSelectionRectForComplexText(). This will ensure consistent results with
3683         getGlyphsAndAdvancesForComplexText().
3684
3685         * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
3686         (WebCore::FontCascade::adjustSelectionRectForComplexText const):
3687
3688 2017-09-19  Dean Jackson  <dino@apple.com>
3689
3690         [WebGL] VideoTextureCopierCV doesn't correctly restore vertex attribute state
3691         https://bugs.webkit.org/show_bug.cgi?id=176771
3692         <rdar://problem/34386621>
3693
3694         Reviewed by Antoine Quint.
3695
3696         The OpenGL context in VideoTextureCopierCV wasn't being restored to
3697         the state it had before rendering a video to a texture. Specifically
3698         the vertex attribute values were never recorded by the state saver.
3699
3700         Update the existing test of VideoTextureCopierCV so that it is
3701         explicitly doing something different from the WebCore code, which
3702         means that state will have to be correctly restored for the test
3703         to pass.
3704
3705         * platform/graphics/cv/VideoTextureCopierCV.cpp:
3706         (WebCore::VideoTextureCopierCV::copyVideoTextureToPlatformTexture): Make sure
3707         to record the vertex attribute state once we know the location of the position attribute.
3708         (WebCore::VideoTextureCopierCV::GC3DStateSaver::GC3DStateSaver):
3709         (WebCore::VideoTextureCopierCV::GC3DStateSaver::~GC3DStateSaver):
3710         (WebCore::VideoTextureCopierCV::GC3DStateSaver::saveVertexAttribState): Save all the
3711         applicable vertex attribute state information.
3712         * platform/graphics/cv/VideoTextureCopierCV.h: GC3DStateSaver can use a reference
3713         to the GC3D rather than a pointer.
3714
3715 2017-09-19  Dean Jackson  <dino@apple.com>
3716
3717         [WebGL] accelerated texImage2D for video doesn't respect flipY
3718         https://bugs.webkit.org/show_bug.cgi?id=176491
3719         <rdar://problem/33833511>
3720
3721         Reviewed by Jer Noble.
3722
3723         (Take 3 - this was rolled out due to a test failure)
3724
3725         Previously, if UNPACK_FLIP_Y_WEBGL was set to true, we'd either fall
3726         back to software or fail to upload texture data. Fix this by intercepting
3727         the texImage2D call, checking the orientation of the video, and running
3728         a small shader program to flip it if necessary.
3729
3730         While there, implement UNPACK_PREMULTIPLY_ALPHA_WEBGL as well, although
3731         none of our media decoders support video with alpha, so unfortunately
3732         this will have no visible change.
3733
3734         Tests: fast/canvas/webgl/texImage2D-video-flipY-false.html
3735                fast/canvas/webgl/texImage2D-video-flipY-true.html
3736
3737         * platform/cocoa/CoreVideoSoftLink.cpp: Add link to CVOpenGL(ES)TextureGetCleanTexCoords,
3738         which is used to check the orientation of the source video.
3739         * platform/cocoa/CoreVideoSoftLink.h:
3740
3741         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3742         (WebCore::MediaPlayerPrivateAVFoundationObjC::copyVideoTextureToPlatformTexture): We can
3743         now handle flipped or premultiplied requests.
3744         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3745         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::copyVideoTextureToPlatformTexture): Ditto.
3746
3747         * platform/graphics/cv/VideoTextureCopierCV.cpp:
3748         (WebCore::VideoTextureCopierCV::VideoTextureCopierCV): Rename readFramebuffer to
3749         simply framebuffer.
3750         (WebCore::VideoTextureCopierCV::~VideoTextureCopierCV): Delete the program and buffer
3751         if they were created.
3752         (WebCore::VideoTextureCopierCV::initializeContextObjects): Sets up the shader program
3753         and the vertex buffer for drawing. Also records the location of the uniforms.
3754         (WebCore::VideoTextureCopierCV::copyVideoTextureToPlatformTexture): Create a new
3755         framebuffer object, and render the video texture into that framebuffer using a
3756         shader that can flip the coordinates.
3757         (WebCore::VideoTextureCopierCV::GC3DStateSaver::GC3DStateSaver): Helper to restore
3758         the state of the user's GraphicsContext3D while we're intercepting calls.
3759         (WebCore::VideoTextureCopierCV::GC3DStateSaver::~GC3DStateSaver):
3760         * platform/graphics/cv/VideoTextureCopierCV.h:
3761
3762         * platform/graphics/GraphicsContext3D.h: Add two new entry points, for direct shader
3763         compilation and attribute access. This avoids going through ANGLE.
3764         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
3765         (WebCore::GraphicsContext3D::compileShader):
3766         (WebCore::GraphicsContext3D::compileShaderDirect):
3767         (WebCore::GraphicsContext3D::getAttribLocationDirect):
3768
3769 2017-09-18  Said Abou-Hallawa  <sabouhallawa@apple.com>
3770
3771         Make ImageFrame::duration() return Seconds instead of float
3772         https://bugs.webkit.org/show_bug.cgi?id=177103
3773
3774         Reviewed by Simon Fraser.
3775
3776         ScalableImageDecoder stores milliseconds for the duration of its ImageFrames.
3777         But ImageFrameCache store seconds for the duration of its ImageFrames.
3778         To fix this issue use Seconds for the ImageFrame duration.
3779
3780         * platform/graphics/BitmapImage.h:
3781         * platform/graphics/ImageDecoder.h:
3782         * platform/graphics/ImageFrame.h:
3783         (WebCore::ImageFrame::setDuration):
3784         (WebCore::ImageFrame::duration const):
3785         * platform/graphics/ImageFrameCache.cpp:
3786         (WebCore::ImageFrameCache::frameDurationAtIndex):
3787         * platform/graphics/ImageFrameCache.h:
3788         * platform/graphics/ImageSource.h:
3789         (WebCore::ImageSource::frameDurationAtIndex):
3790         * platform/graphics/cg/ImageDecoderCG.cpp:
3791         (WebCore::ImageDecoderCG::frameDurationAtIndex const):
3792         * platform/graphics/cg/ImageDecoderCG.h:
3793         * platform/image-decoders/ScalableImageDecoder.cpp:
3794         (WebCore::ScalableImageDecoder::frameDurationAtIndex const):
3795         * platform/image-decoders/ScalableImageDecoder.h:
3796         * platform/image-decoders/gif/GIFImageDecoder.cpp:
3797         (WebCore::GIFImageDecoder::frameComplete):
3798         * platform/image-decoders/png/PNGImageDecoder.cpp:
3799         (WebCore::PNGImageDecoder::readChunks):
3800         (WebCore::PNGImageDecoder::frameHeader): Deleted.
3801         (WebCore::PNGImageDecoder::init): Deleted.
3802         (WebCore::PNGImageDecoder::clearFrameBufferCache): Deleted.
3803         (WebCore::PNGImageDecoder::initFrameBuffer): Deleted.
3804         (WebCore::PNGImageDecoder::frameComplete): Deleted.
3805         (WebCore::PNGImageDecoder::processingStart): Deleted.
3806         (WebCore::PNGImageDecoder::processingFinish): Deleted.
3807         (WebCore::PNGImageDecoder::fallbackNotAnimated): Deleted.
3808
3809 2017-09-18  Per Arne Vollan  <pvollan@apple.com>
3810
3811         [Win] Compile error in InbandTextTrackPrivateAVCF::readNativeSampleBuffer.
3812         https://bugs.webkit.org/show_bug.cgi?id=177108
3813
3814         Reviewed by Brent Fulgham.
3815
3816         The InbandTextTrackPrivateAVF::m_sampleInputBuffer is private and not accessible in this method.
3817  
3818         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
3819
3820 2017-09-18  Tim Horton  <timothy_horton@apple.com>
3821
3822         Support min() and max() in calc()
3823         https://bugs.webkit.org/show_bug.cgi?id=167000
3824         <rdar://problem/30153481>
3825
3826         Reviewed by David Hyatt.
3827         Patch originally by Myles Maxfield.
3828
3829         Add two new toplevel functions to CSS, min() and max(), which take an
3830         arbirary number of arguments and resolve to the minimum and maximum of
3831         the resolved value of the arguments, respectively. It is also possible
3832         to use min() and max() inside calc(), and to use calc()-like math
3833         inside min() and max().
3834
3835         * css/CSSCalculationValue.cpp:
3836         (WebCore::determineCategory):
3837         min and max operators don't use determineCategory; we have a specific
3838         implementation for them in createMinOrMax.
3839
3840         (WebCore::resolvedTypeForMinOrMax):
3841         The spec says that min() and max() should be marked as invalid if they
3842         have values of more than one type, but that percentages should resolve
3843         against the destination type before making this determination. So,
3844         if the destination type is length, percent turns into percent-length,
3845         and similarly for number.
3846
3847         (WebCore::isIntegerResult):
3848         Add an n-way implementation of isIntegerResult.
3849
3850         (WebCore::isSamePair):
3851         (WebCore::CSSCalcOperation::createMinOrMax): Create a min() or max()
3852         operation, as long as the types of arguments are all the same. Allow
3853         lengths to upgrade the whole operation to percent-length, and numbers
3854         to percent-number, which will cause us to use CalculationValue and friends
3855         in order to do proper resolution of all of the parameters instead of
3856         just comparing their numeric values.
3857
3858         (WebCore::CSSCalcOperation::createCalcExpression):
3859         (WebCore::CSSCalcOperation::doubleValue):
3860         (WebCore::CSSCalcOperation::computeLengthPx):
3861         (WebCore::CSSCalcOperation::customCSSText):
3862         (WebCore::CSSCalcOperation::primitiveType):
3863         (WebCore::CSSCalcOperation::CSSCalcOperation):
3864         (WebCore::CSSCalcOperation::evaluate):
3865         (WebCore::CSSCalcOperation::evaluateOperator):
3866         Adapt to child counts greater than two.
3867
3868         (WebCore::CSSCalcOperation::buildCssText):
3869         Add support for min() and max().
3870
3871         (WebCore::CSSCalcExpressionNodeParser::parseCalc):
3872         parseCalc now accepts a CSSValueID parameter indicating which calc function
3873         it should parse (calc, webkit-calc, min, or max), and delegates to either
3874         parseValueExpression or parseMinMaxExpression.
3875
3876         (WebCore::CSSCalcExpressionNodeParser::operatorValue):
3877         (WebCore::CSSCalcExpressionNodeParser::parseValue):
3878         If min() or max() are found while parsing a value (i.e. nested inside
3879         either calc or themselves), use parseMinMaxExpression on that subtree.
3880
3881         (WebCore::CSSCalcExpressionNodeParser::parseValueTerm):
3882         (WebCore::CSSCalcExpressionNodeParser::parseValueMultiplicativeExpression):
3883         (WebCore::CSSCalcExpressionNodeParser::parseAdditiveValueExpression):
3884         Adjust to the CSSCalcBinaryOperation->CSSCalcOperation rename.
3885
3886         (WebCore::CSSCalcExpressionNodeParser::parseMinMaxExpression):
3887         Added. Parse an arbitrary number of comma-and-whitespace-separated children.
3888
3889         (WebCore::createBlendHalf):
3890         Adjust to the CSSCalcBinaryOperation->CSSCalcOperation rename.
3891
3892         (WebCore::createCSS):
3893         Build the CSSCalcOperation for the platform-independent min and max operations.
3894
3895         (WebCore::CSSCalcValue::create):
3896         Pass the function being parsed and the destination calc category for the
3897         property being parsed for into create, and then into the parser so that
3898         it can know which function it is parsing for, and what kind of result it
3899         needs (as previously mentioned above in resolvedTypeForMinOrMax).
3900
3901         * css/CSSCalculationValue.h:
3902         * css/CSSValueKeywords.in:
3903         Add min and max functions as CSS keywords.
3904
3905         * css/StyleBuilderConverter.h:
3906         (WebCore::StyleBuilderConverter::convertLength):
3907         (WebCore::StyleBuilderConverter::convertTo100PercentMinusLength):
3908         * platform/Length.cpp:
3909         (WebCore::convertTo100PercentMinusLength):
3910         Adapt to the CalcExpressionOperation constructor taking a vector of
3911         arguments instead of two.
3912
3913         * css/parser/CSSPropertyParserHelpers.cpp:
3914         (WebCore::CSSPropertyParserHelpers::CalcParser::CalcParser):
3915         Store and pass the specific function being parsed down into CSSCalcValue.
3916
3917         (WebCore::CSSPropertyParserHelpers::consumeInteger):
3918         (WebCore::CSSPropertyParserHelpers::consumePositiveIntegerRaw):
3919         (WebCore::CSSPropertyParserHelpers::consumeNumberRaw):
3920         (WebCore::CSSPropertyParserHelpers::consumeNumber):
3921         (WebCore::CSSPropertyParserHelpers::consumeFontWeightNumber):
3922         (WebCore::CSSPropertyParserHelpers::consumeLength):
3923         (WebCore::CSSPropertyParserHelpers::consumePercent):
3924         (WebCore::CSSPropertyParserHelpers::consumeLengthOrPercent):
3925         (WebCore::CSSPropertyParserHelpers::consumeAngle):
3926         (WebCore::CSSPropertyParserHelpers::consumeTime):
3927         Pass the destination type into each calc parser.
3928
3929         * platform/CalculationValue.cpp:
3930         (WebCore::CalcExpressionOperation::evaluate const):
3931         (WebCore::CalcExpressionOperation::operator== const):
3932         (WebCore::CalcExpressionOperation::dump const):
3933         (WebCore::operator<<):
3934         (WebCore::CalcExpressionBinaryOperation::evaluate const): Deleted.
3935         (WebCore::CalcExpressionBinaryOperation::operator== const): Deleted.
3936         (WebCore::CalcExpressionBinaryOperation::dump const): Deleted.
3937         * platform/CalculationValue.h:
3938         (WebCore::CalcExpressionOperation::CalcExpressionOperation):
3939         (WebCore::operator==):
3940         (WebCore::toCalcExpressionOperation):
3941         (WebCore::CalcExpressionBinaryOperation::CalcExpressionBinaryOperation): Deleted.
3942         (WebCore::toCalcExpressionBinaryOperation): Deleted.
3943         Adjust to the CSSCalcBinaryOperation->CSSCalcOperation rename.
3944         Adjust to having n>2 children.
3945         Support min() and max() operators in various places.
3946         
3947
3948 2017-09-18  Basuke Suzuki  <Basuke.Suzuki@sony.com>
3949
3950         [Curl] Move error generation task into ResourceError
3951         https://bugs.webkit.org/show_bug.cgi?id=176963
3952
3953         Reviewed by Alex Christensen.
3954
3955         * platform/Curl.cmake:
3956         * platform/network/curl/CurlContext.cpp:
3957         (WebCore::CurlHandle::errorDescription):
3958         (WebCore::CurlHandle::errorDescription const):
3959         * platform/network/curl/CurlContext.h:
3960         * platform/network/curl/ResourceError.h:
3961         (WebCore::ResourceError::setSslErrors):
3962         (WebCore::ResourceError::hasSSLConnectError const): Deleted.
3963         (WebCore::ResourceError::doPlatformIsolatedCopy): Deleted.
3964         * platform/network/curl/ResourceErrorCurl.cpp: Added.
3965         (WebCore::ResourceError::httpError):
3966         (WebCore::ResourceError::sslError):
3967         (WebCore::ResourceError::hasSSLConnectError const):
3968         (WebCore::ResourceError::doPlatformIsolatedCopy):
3969         (WebCore::ResourceError::platformCompare):
3970         * platform/network/curl/ResourceHandleCurlDelegate.cpp:
3971         (WebCore::ResourceHandleCurlDelegate::notifyFail):
3972         (WebCore::ResourceHandleCurlDelegate::didFail):
3973         * platform/network/curl/ResourceHandleCurlDelegate.h:
3974
3975 2017-09-18  Ryan Haddad  <ryanhaddad@apple.com>
3976
3977         Unreviewed, rolling out r222170.
3978
3979         The API test added with this change is failing.
3980
3981         Reverted chang