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