Unreviewed build fix after r206830
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2016-10-05  Brent Fulgham  <bfulgham@apple.com>
2
3         Unreviewed build fix after r206830
4
5         * platform/graphics/win/FontPlatformDataWin.cpp: Add missing include
6         when building with Direct2D.
7
8 2016-10-05  Brent Fulgham  <bfulgham@apple.com>
9
10         [Win][Direct2D] Disable some CoreGraphics and CoreAnimation-based logic when building for D2D
11         https://bugs.webkit.org/show_bug.cgi?id=162977
12
13         Reviewed by Alex Christensen.
14
15         Currently the Direct2D implementation does not support some of the accelerated compositing
16         features that require CoreAnimation. During this bring-up, we want to disable these routines
17         so that we can build and run in (mostly) unaccelerated drawing.
18
19         This patch mostly consists of adding "#if USE(CG)" and "#if USE(CA)" to files that are
20         specific to those implementations.
21
22         This change should have no impact on non-Direct2D ports.
23
24         No change in behavior for active ports.
25
26         * config.h: Turn of CG when building in Direct2D.
27         * css/CSSFontFaceSource.cpp:
28         * loader/cache/CachedFont.cpp:
29         * loader/cache/CachedSVGFont.cpp:
30         * page/CaptionUserPreferencesMediaAF.cpp:
31         * page/win/FrameCGWin.cpp:
32         * page/win/FrameDirect2D.cpp: Added.
33         * platform/graphics/Font.cpp:
34         * platform/graphics/FontCache.cpp:
35         * platform/graphics/FontPlatformData.cpp:
36         * platform/graphics/GraphicsContext.h:
37         * platform/graphics/Image.cpp:
38         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
39         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
40         * platform/graphics/ca/GraphicsLayerCA.cpp:
41         * platform/graphics/ca/PlatformCALayer.cpp:
42         * platform/graphics/ca/TileController.cpp:
43         * platform/graphics/ca/TileGrid.cpp:
44         * platform/graphics/ca/TileGrid.h:
45         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
46         * platform/graphics/ca/win/LayerChangesFlusher.cpp:
47         * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
48         * platform/graphics/ca/win/PlatformCAAnimationWin.h:
49         * platform/graphics/ca/win/PlatformCAFiltersWin.cpp:
50         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
51         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
52         * platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp:
53         * platform/graphics/ca/win/WebTiledBackingLayerWin.cpp:
54         * platform/graphics/cg/GradientCG.cpp:
55         * platform/graphics/cg/GraphicsContextCG.cpp:
56         * platform/graphics/cg/ImageBufferCG.cpp:
57         * platform/graphics/cg/ImageBufferDataCG.cpp:
58         * platform/graphics/cg/PDFDocumentImage.cpp:
59         * platform/graphics/cg/PatternCG.cpp:
60         * platform/graphics/cg/SubimageCacheWithTimer.cpp:
61         * platform/graphics/win/FontCGWin.cpp:
62         * platform/graphics/win/FontPlatformDataCGWin.cpp:
63         * platform/graphics/win/GlyphPageTreeNodeCGWin.cpp:
64         * platform/graphics/win/GlyphPageTreeNodeDirect2D.cpp:
65         * platform/graphics/win/GradientDirect2D.cpp:
66         * platform/graphics/win/PathDirect2D.cpp: Fix a few build problems I didn't notice
67         while building without Direct2D active.
68         * platform/graphics/win/SimpleFontDataCGWin.cpp:
69         * platform/graphics/win/SimpleFontDataWin.cpp:
70         * platform/win/DragImageCGWin.cpp:
71         * platform/win/DragImageDirect2D.cpp: Added.
72         * rendering/RenderMediaControls.cpp:
73
74 2016-10-05  Chris Dumez  <cdumez@apple.com>
75
76         KeyboardEvent.getModifierState() should support "CapsLock" modifier
77         https://bugs.webkit.org/show_bug.cgi?id=162861
78
79         Reviewed by Darin Adler.
80
81         Add support for "CapsLock" modifier on Mac / iOS for KeyboardEvent's
82         getModifierState() API, as per:
83         - https://w3c.github.io/uievents/#dom-keyboardevent-getmodifierstate
84
85         No new tests, updated existing test.
86
87         * dom/KeyboardEvent.cpp:
88         (WebCore::KeyboardEvent::KeyboardEvent):
89         (WebCore::KeyboardEvent::getModifierState):
90         * dom/KeyboardEvent.h:
91         * platform/PlatformEvent.h:
92         * platform/ios/PlatformEventFactoryIOS.mm:
93         (WebCore::modifiersForEvent):
94         * platform/mac/PlatformEventFactoryMac.mm:
95         (WebCore::keyIdentifierForKeyEvent):
96
97 2016-10-05  Michael Catanzaro  <mcatanzaro@igalia.com>
98
99         [GTK] Improve OS X UA quirk
100         https://bugs.webkit.org/show_bug.cgi?id=162613
101
102         Reviewed by Carlos Garcia Campos.
103
104         Include OS X version number in user agent, like Safari does.
105
106         * platform/gtk/UserAgentGtk.cpp:
107         (WebCore::buildUserAgentString):
108
109 2016-10-05  Michael Catanzaro  <mcatanzaro@igalia.com>
110
111         [GTK] Improve comment in platformVersionForUAString
112         https://bugs.webkit.org/show_bug.cgi?id=162612
113
114         Reviewed by Carlos Garcia Campos.
115
116         * platform/gtk/UserAgentGtk.cpp:
117         (WebCore::platformVersionForUAString):
118
119 2016-10-05  Zalan Bujtas  <zalan@apple.com>
120
121         Missing quotation mark when <q> gets reparented.
122         https://bugs.webkit.org/show_bug.cgi?id=162940
123
124         Reviewed by Darin Adler.
125
126         When an opening RenderQuote gets removed due to some change in the render tree,
127         we notify the closing RenderQuote so that it can update its content (") accordingly (and vice versa).
128         However when the same RenderQuote is added back to the render tree (aka reparenting), we fail to
129         let the other RenderQuote know about it and its content becomes stale.  
130         This patch ensures that when either the opening or closing part of the quotation mark gets reparented,
131         we inform the other, corresponding opening/closing renderer about it.
132
133         Test: fast/css-generated-content/missing-quotes-with-dynamic-content.html
134
135         * dom/PseudoElement.cpp:
136         (WebCore::PseudoElement::didAttachRenderers):
137         * rendering/RenderQuote.cpp:
138         (WebCore::RenderQuote::insertedIntoTree):
139         * rendering/RenderQuote.h:
140
141 2016-10-05  Alex Christensen  <achristensen@webkit.org>
142
143         URLParser should correctly strip unnecessary 0's in IPv6 addresses
144         https://bugs.webkit.org/show_bug.cgi?id=162979
145
146         Reviewed by Brady Eidson.
147
148         Covered by new API tests.
149
150         * platform/URLParser.cpp:
151         (WebCore::URLParser::parseIPv6Host):
152         Strip leading 0's and any 0's before the last 0 if the value is 0.
153
154 2016-10-05  Alex Christensen  <achristensen@webkit.org>
155
156         UTF-8 encode queries of nonspecial and websocket schemes
157         https://bugs.webkit.org/show_bug.cgi?id=162956
158
159         Reviewed by Geoffrey Garen and Brady Eidson.
160
161         The URL spec says in the query state:
162         'If url is not special or url's scheme is either "ws" or "wss", set encoding to UTF-8.'
163         This should be determined as soon as we are done parsing the scheme.
164         
165         Covered by new API tests.
166         This also fixes tests like fast/loader/javascript-url-encoding-2.html when URLParser is enabled.
167
168         * platform/URLParser.cpp:
169         (WebCore::isValidSchemeCharacter):
170         Renamed Scheme to ValidScheme so I can use Scheme as the name of an enum class in the same namespace.
171         (WebCore::isSpecial):
172         (WebCore::scheme):
173         Separate functionality so we can have different behavior for different sets of
174         ws and wss schemes, special, and non-special schemes.
175         (WebCore::URLParser::copyURLPartsUntil):
176         (WebCore::URLParser::parse):
177         Set isUTF8Encoding to true when we finish parsing the scheme if the scheme is ws, wss, or non-special,
178         according to spec.  This also matches existing behavior.  This way we will already know whether to go
179         into UTF8Query or NonUTF8Query state when we see a '?'.
180         (WebCore::isSpecialScheme): Deleted.
181
182 2016-10-05  Alex Christensen  <achristensen@webkit.org>
183
184         Prepare to enable URLParser
185         https://bugs.webkit.org/show_bug.cgi?id=162974
186
187         Reviewed by Brady Eidson.
188
189         * platform/URL.cpp:
190         (WebCore::URL::serialize):
191         When we enable the URLParser, this attempt to make serialized URLs more spec compliant
192         won't be needed any more.
193
194 2016-10-05  Brent Fulgham  <bfulgham@apple.com>
195
196         [Win][Direct2D] Add initial D2D Path and Gradient implementation
197         https://bugs.webkit.org/show_bug.cgi?id=162923
198
199         Reviewed by Alex Christensen.
200
201         This patch lands a set of new files that implements initial Path
202         and Gradient features on Windows using Direct2D.
203
204         No new tests until complete backend lands.
205
206         * platform/graphics/Gradient.h:
207         * platform/graphics/Path.cpp:
208         * platform/graphics/Path.h:
209         * platform/graphics/win/GradientDirect2D.cpp: Added.
210         * platform/graphics/win/PathDirect2D.cpp: Added.
211
212 2016-10-05  Romain Bellessort  <romain.bellessort@crf.canon.fr>
213
214         [Readable Streams API] Align function names with spec
215         https://bugs.webkit.org/show_bug.cgi?id=162967
216
217         Reviewed by Darin Adler.
218
219         Align function names with spec. Behaviour was already in line with spec, but previous function names had
220         sometimes been preserved to track the changes more easily. This led to some inconsistencies (for instance,
221         enqueueInReadableStream was still used even though it works on a controller instead of a stream) and it
222         also made it more difficult to compare spec and implementation.
223
224         No change in behaviour.
225
226         * Modules/fetch/FetchInternals.js:
227         (consumeStream): Updated with new function names.
228         * Modules/fetch/FetchResponse.js:
229         (clone): Updated with new function names.
230         * Modules/streams/ReadableStream.js:
231         (tee): Updated with new function names.
232         * Modules/streams/ReadableStreamDefaultController.js:
233         (enqueue): Updated with new function names.
234         (error): Updated with new function names.
235         * Modules/streams/ReadableStreamDefaultReader.js:
236         (read): Updated with new function names.
237         * Modules/streams/ReadableStreamInternals.js:
238         (privateInitializeReadableStreamDefaultController): Updated with new function names.
239         (readableStreamDefaultControllerError): Updated with new function names.
240         (readableStreamTee): Updated with new function names.
241         (readableStreamTeePullFunction): Updated with new function names.
242         (readableStreamTeeBranch2CancelFunction): Updated with new function names.
243         (readableStreamError): Updated with new function names.
244         (readableStreamCancel): Updated with new function names.
245         (readableStreamDefaultControllerPull): Updated with new function names.
246         (readableStreamDefaultControllerClose): Updated with new function names.
247         (readableStreamClose): Updated with new function names.
248         (readableStreamDefaultControllerEnqueue): Updated with new function names.
249         (readableStreamDefaultReaderRead): Updated with new function names.
250
251 2016-10-05  Chris Dumez  <cdumez@apple.com>
252
253         [Bindings] Declare dictionary / enumeration template specializations in the header
254         https://bugs.webkit.org/show_bug.cgi?id=162929
255
256         Reviewed by Darin Adler.
257
258         Declare dictionary / enumeration template specializations in the header
259         so that:
260         - They can be used from custom bindings code.
261         - Dictionaries / enumerations can be used to their own IDL files to
262           share them (Bug 162912).
263
264         No new tests, rebaselined bindings tests.
265
266         * WebCore.xcodeproj/project.pbxproj:
267         * bindings/generic/IDLTypes.h:
268         * bindings/js/JSDOMConvert.h:
269         * bindings/scripts/CodeGeneratorJS.pm:
270         (GenerateInterface):
271         (GenerateEnumerationImplementationContent):
272         (GenerateEnumerationHeaderContent):
273         (GenerateDictionaryHeaderContent):
274         (GenerateHeader):
275         (GenerateCallbackHeader):
276         (GenerateCallbackImplementation):
277         (GenerateDefaultValue): Deleted.
278         (GenerateDictionaryImplementationContent): Deleted.
279         (GenerateParametersCheck): Deleted.
280         * bindings/scripts/test/JS/JSTestObj.cpp:
281         * bindings/scripts/test/JS/JSTestObj.h:
282
283 2016-10-05  Zan Dobersek  <zdobersek@igalia.com>
284
285         Rename ENABLE_ENCRYPTED_MEDIA_V2 to ENABLE_LEGACY_ENCRYPTED_MEDIA
286         https://bugs.webkit.org/show_bug.cgi?id=162903
287
288         Reviewed by Alex Christensen.
289
290         Rename build guards for the remaining implementation of the legacy EME API
291         to ENABLE_LEGACY_ENCRYPTED_MEDIA. This will allow for the future implementation
292         of the near-finished API to be guarded with the simple ENABLE_ENCRYPTED_MEDIA guards.
293
294         No new tests -- no change in behavior.
295
296         * CMakeLists.txt:
297         * Configurations/FeatureDefines.xcconfig:
298         * DerivedSources.cpp:
299         * DerivedSources.make:
300         * Modules/encryptedmedia/CDM.cpp:
301         * Modules/encryptedmedia/CDM.h:
302         * Modules/encryptedmedia/CDMPrivate.h:
303         * Modules/encryptedmedia/CDMPrivateClearKey.cpp:
304         * Modules/encryptedmedia/CDMPrivateClearKey.h:
305         * Modules/encryptedmedia/CDMPrivateMediaPlayer.cpp:
306         * Modules/encryptedmedia/CDMPrivateMediaPlayer.h:
307         * Modules/encryptedmedia/CDMSessionClearKey.cpp:
308         * Modules/encryptedmedia/CDMSessionClearKey.h:
309         * Modules/encryptedmedia/MediaKeyMessageEvent.cpp:
310         * Modules/encryptedmedia/MediaKeyMessageEvent.h:
311         * Modules/encryptedmedia/MediaKeyMessageEvent.idl:
312         * Modules/encryptedmedia/MediaKeyNeededEvent.cpp:
313         * Modules/encryptedmedia/MediaKeyNeededEvent.h:
314         * Modules/encryptedmedia/MediaKeyNeededEvent.idl:
315         * Modules/encryptedmedia/MediaKeySession.cpp:
316         * Modules/encryptedmedia/MediaKeySession.h:
317         * Modules/encryptedmedia/MediaKeySession.idl:
318         * Modules/encryptedmedia/MediaKeys.cpp:
319         * Modules/encryptedmedia/MediaKeys.h:
320         * Modules/encryptedmedia/MediaKeys.idl:
321         * bindings/js/JSDictionary.cpp:
322         * bindings/js/JSDictionary.h:
323         * dom/Element.idl:
324         * dom/EventNames.in:
325         * dom/EventTargetFactory.in:
326         * html/HTMLMediaElement.cpp:
327         (WebCore::HTMLMediaElement::~HTMLMediaElement):
328         (WebCore::HTMLMediaElement::webkitGenerateKeyRequest):
329         (WebCore::HTMLMediaElement::webkitAddKey):
330         * html/HTMLMediaElement.h:
331         * html/HTMLMediaElement.idl:
332         * html/MediaError.h:
333         * html/MediaError.idl:
334         * html/MediaKeyError.h:
335         * html/MediaKeyError.idl:
336         * page/Settings.h:
337         * platform/graphics/CDMSession.h:
338         * platform/graphics/MediaPlayer.cpp:
339         * platform/graphics/MediaPlayer.h:
340         * platform/graphics/MediaPlayerPrivate.h:
341         * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.h:
342         * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
343         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
344         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
345         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
346         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h:
347         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
348         (WebCore::MediaPlayerPrivateAVFoundationCF::supportsKeySystem):
349         (WebCore::AVFWrapper::shouldWaitForLoadingOfResource):
350         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
351         * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.h:
352         * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
353         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
354         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
355         * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.h:
356         * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
357         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
358         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
359         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
360         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
361         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsKeySystem):
362         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
363         (WebCore::playerKVOProperties):
364         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
365         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
366         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
367         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
368         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
369         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
370         (WebCore::SourceBufferPrivateAVFObjC::willProvideContentKeyRequestInitializationDataForTrackID):
371         (WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID):
372         * testing/Internals.cpp:
373         * testing/Internals.h:
374         * testing/Internals.idl:
375         * testing/MockCDM.cpp:
376         * testing/MockCDM.h:
377
378 2016-10-05  Daniel Bates  <dabates@apple.com>
379
380         Do not follow redirects when sending violation report
381         https://bugs.webkit.org/show_bug.cgi?id=162520
382         <rdar://problem/27957639>
383
384         Reviewed by Alex Christensen.
385
386         Do not follow redirects when sending a Content Security Policy or XSS Auditor violation report
387         as redirects can be used to forward report details to a third-party.
388
389         This changes makes WebKit more closely conform to the reporting requirements in section Reporting
390         of the Content Security Level 2 standard: <https://w3c.github.io/webappsec-csp/2/#violation-reports>
391         (Editor's Draft, 25 April 2016).
392
393         Tests: http/tests/security/contentSecurityPolicy/report-blocked-uri-and-do-not-follow-redirect-when-sending-report.php
394                http/tests/security/xssAuditor/report-script-tag-and-do-not-follow-redirect-when-sending-report.html
395                http/tests/security/xssAuditor/report-script-tag-full-block-and-do-not-follow-redirect-when-sending-report.html
396
397         * loader/LoaderStrategy.h: Modified createPingHandle() to take a boolean, shouldFollowRedirects,
398         whether to follow redirect responses for a ping request.
399         * loader/PingLoader.cpp:
400         (WebCore::PingLoader::loadImage): Pass ShouldFollowRedirects::Yes to PingLoader::startPingLoad to
401         keep our current behavior.
402         (WebCore::PingLoader::sendPing): Ditto. Note our current behavior of following redirects matches
403         the behavior described in the section "Hyperlink auditing" of the HTML standard:
404         <https://html.spec.whatwg.org/multipage/semantics.html#hyperlink-auditing> (23 September 2016).
405         (WebCore::PingLoader::sendViolationReport): Pass ShouldFollowRedirects::No to PingLoader::startPingLoad
406         so that we do not follow redirects when sending a violation report.
407         (WebCore::PingLoader::startPingLoad): Modified to take argument shouldFollowRedirects whether to
408         follow redirect responses for a ping request.
409         * loader/PingLoader.h:
410         * platform/network/PingHandle.h: Add boolean m_shouldFollowRedirects. I grouped this boolean with
411         the existing boolean, m_shouldUseCredentialStorage, as opposed to appending to the end of the class
412         definition to avoid increasing object size as clang will coalesces the two bools into a single
413         machine word. Override ResourceHandleClient::willSendRequest() and ResourceHandleClient::willSendRequestAsync()
414         to follow a redirect, if applicable. 
415
416 2016-10-05  Carlos Garcia Campos  <cgarcia@igalia.com>
417
418         [SOUP] Move global TLS errors handling from ResourceHandle to SoupNetworkSession
419         https://bugs.webkit.org/show_bug.cgi?id=162910
420
421         Reviewed by Alex Christensen.
422
423         So that it will be shared with network session code. Also remove setHostAllowsAnyHTTPSCertificate() that we have
424         never actually used.
425
426         * platform/network/ResourceHandle.h:
427         * platform/network/soup/ResourceHandleSoup.cpp:
428         (WebCore::tlsErrorsChangedCallback): Use SoupNetworkSession::checkTLSErrors().
429         * platform/network/soup/SoupNetworkSession.cpp:
430         (WebCore::HostTLSCertificateSet::add):
431         (WebCore::HostTLSCertificateSet::contains):
432         (WebCore::HostTLSCertificateSet::computeCertificateHash):
433         (WebCore::clientCertificates):
434         (WebCore::SoupNetworkSession::setShouldIgnoreTLSErrors):
435         (WebCore::SoupNetworkSession::checkTLSErrors):
436         (WebCore::SoupNetworkSession::allowSpecificHTTPSCertificateForHost):
437         * platform/network/soup/SoupNetworkSession.h:
438
439 2016-10-05  Carlos Garcia Campos  <cgarcia@igalia.com>
440
441         [SOUP] Move request HTTP body handling to ResourceRequestSoup and simplify it
442         https://bugs.webkit.org/show_bug.cgi?id=162891
443
444         Reviewed by Michael Catanzaro.
445
446         We are currently adding the HTTP body to the message in ResourceHandleSoup, but we could do it as part of the
447         ResourceRequest::updateSoupMessage() method, since the HTTP body is indeed part of the request. The code can be
448         also simplified, especially the handling of files, by using SharedBuffer that already mmaps the file when
449         possible, instead of using GMappedFile API.
450
451         * platform/SharedBuffer.h: Add createSoupBuffer() method.
452         * platform/network/soup/ResourceHandleSoup.cpp:
453         (WebCore::createSoupMessageForHandleAndRequest):
454         (WebCore::milisecondsSinceRequest): Deleted.
455         (WebCore::ResourceHandle::didStartRequest): Deleted.
456         (WebCore::startingCallback): Deleted.
457         (WebCore::networkEventCallback): Deleted.
458         (WebCore::ResourceHandle::start): Deleted.
459         (WebCore::ResourceHandle::releaseForDownload): Deleted.
460         (WebCore::ResourceHandle::timeoutFired): Deleted.
461         * platform/network/soup/ResourceRequest.h:
462         * platform/network/soup/ResourceRequestSoup.cpp:
463         (WebCore::appendEncodedBlobItemToSoupMessageBody): Helper method to append the blob to the request message body.
464         (WebCore::ResourceRequest::updateSoupMessageBody): Add HTTPBody to the request message body.
465         (WebCore::ResourceRequest::updateSoupMessage): Call updateSoupMessageBody() to also update the body.
466         * platform/soup/SharedBufferSoup.cpp:
467         (WebCore::SharedBuffer::createSoupBuffer): Returns a new SoupBuffer for the SharedBuffer.
468
469 2016-10-04  Chris Dumez  <cdumez@apple.com>
470
471         Implement KeyboardEvent.code from the UI Event spec
472         https://bugs.webkit.org/show_bug.cgi?id=149584
473
474         Reviewed by Darin Adler.
475
476         Add support for Keyboard.code attribute:
477         - https://w3c.github.io/uievents/#dom-keyboardevent-code
478         - https://w3c.github.io/uievents-code/
479
480         The feature is only enabled on Mac for now as the implementation is
481         platform-specific and Mac only.
482
483         Test: fast/events/keyboardevent-code.html
484
485         * dom/KeyboardEvent.cpp:
486         (WebCore::KeyboardEvent::KeyboardEvent):
487         * dom/KeyboardEvent.h:
488         * dom/KeyboardEvent.idl:
489         * platform/PlatformKeyboardEvent.h:
490         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
491         (WebCore::PlatformKeyboardEvent::code):
492         (WebCore::PlatformKeyboardEvent::unmodifiedText): Deleted.
493         * platform/mac/PlatformEventFactoryMac.h:
494         * platform/mac/PlatformEventFactoryMac.mm:
495         (WebCore::codeForKeyEvent):
496         (WebCore::keyIdentifierForKeyEvent):
497         * replay/SerializationMethods.cpp:
498         (JSC::EncodingTraits<PlatformKeyboardEvent>::encodeValue):
499         (JSC::EncodingTraits<PlatformKeyboardEvent>::decodeValue):
500
501 2016-10-04  Said Abou-Hallawa  <sabouhallawa@apple.com>
502
503         The dragged image should be the current frame only of the animated image
504         https://bugs.webkit.org/show_bug.cgi?id=162109
505
506         Reviewed by Tim Horton.
507
508         Instead of creating an NSImage with all the frames for the dragImage,
509         create an NSImage with the current frame only.
510
511         * dom/DataTransferMac.mm:
512         (WebCore::DataTransfer::createDragImage): Call snapshotNSImage() to create the dragImage.
513         * editing/cocoa/HTMLConverter.mm:
514         (fileWrapperForElement):  Call the Image function with its new name.
515         * platform/graphics/BitmapImage.h:
516         * platform/graphics/Image.h:
517         (WebCore::Image::nsImage): Rename getNSImage() to nsImage().
518         (WebCore::Image::snapshotNSImage): Returns the NSImage of the current frame.
519         (WebCore::Image::tiffRepresentation): Rename getTIFFRepresentation() to tiffRepresentation().
520         (WebCore::Image::getNSImage): Deleted.
521         (WebCore::Image::getTIFFRepresentation): Deleted.
522         * platform/graphics/mac/ImageMac.mm:
523         (WebCore::BitmapImage::tiffRepresentation): Rename getTIFFRepresentation() to tiffRepresentation().
524         (WebCore::BitmapImage::nsImage): Rename getNSImage() to nsImage().
525         (WebCore::BitmapImage::snapshotNSImage): Returns the NSImage of the current frame.
526         (WebCore::BitmapImage::getTIFFRepresentation): Deleted.
527         (WebCore::BitmapImage::getNSImage): Deleted.
528         * platform/mac/CursorMac.mm:
529         (WebCore::createCustomCursor): Call snapshotNSImage() since the cursor does not animate anyway.
530         * platform/mac/DragImageMac.mm:
531         (WebCore::createDragImageFromImage): Use snapshotNSImage() for the dragImage.
532         * platform/mac/PasteboardMac.mm:
533         (WebCore::Pasteboard::write): Call the Image function with its new name.
534
535 2016-10-04  Andy Estes  <aestes@apple.com>
536
537         [iOS] Crash in WebResourceLoaderQuickLookDelegate when the client cancels the navigation to a QuickLook resource
538         https://bugs.webkit.org/show_bug.cgi?id=162950
539         <rdar://problem/23759114>
540
541         Reviewed by Brady Eidson.
542
543         When we receive data from QLPreviewConverter for the first time, we call
544         ResourceLoader::didReceiveResponse() with the preview NSURLResponse from QuickLook. If the
545         client decides to cancel this navigation in decidePolicyForResponse(),
546         WebResourceLoaderQuickLookDelegate will end up with a null _resourceLoader after
547         didReceiveResponse() returns. This change adds null checks in the methods that use
548         _resourceLoader after calling -_sendDidReceiveResponseIfNecessary.
549
550         New API test: QuickLook.CancelNavigationAfterResponse
551
552         * platform/network/ios/QuickLook.mm:
553         (-[WebResourceLoaderQuickLookDelegate connection:didReceiveDataArray:]): Changed to only
554         call ResourceLoader::didReceiveDataArray() if _resourceLoader is non-null.
555         (-[WebResourceLoaderQuickLookDelegate connection:didReceiveData:lengthReceived:]): Ditto for
556         ResourceLoader::didReceiveData().
557         (-[WebResourceLoaderQuickLookDelegate connection:didFailWithError:]): Ditto for
558         ResourceLoader::didFail().
559
560 2016-10-04  Chris Dumez  <cdumez@apple.com>
561
562         Add support for KeyboardEvent.isComposing attribute
563         https://bugs.webkit.org/show_bug.cgi?id=162921
564
565         Reviewed by Darin Adler.
566
567         Add support for KeyboardEvent.isComposing attribute:
568         - https://www.w3.org/TR/uievents/#dom-keyboardevent-iscomposing
569         - https://www.w3.org/TR/uievents/#ref-for-dom-keyboardevent-iscomposing-3
570
571         Manual test: https://jsfiddle.net/ay92sr08/9/
572
573         No new tests, extended existing tests.
574
575         * dom/KeyboardEvent.cpp:
576         (WebCore::KeyboardEvent::KeyboardEvent):
577         * dom/KeyboardEvent.h:
578         * dom/KeyboardEvent.idl:
579
580 2016-10-03  Ryosuke Niwa  <rniwa@webkit.org>
581
582         ShadowRoot interface should have elementFromPoint
583         https://bugs.webkit.org/show_bug.cgi?id=162882
584
585         Reviewed by Chris Dumez.
586
587         Add elementFromPoint to ShadowRoot's prototype as specified at:
588         https://www.w3.org/TR/shadow-dom/#extensions-to-the-documentorshadowroot-mixin
589         with changes proposed at https://github.com/w3c/csswg-drafts/issues/556
590
591         Added TreeScope::retargetToScope which implements 
592
593         This patch also factors DocumentOrShadowRoot.idl out of Document and ShadowRoot interfaces to better match
594         the latest DOM specification: https://dom.spec.whatwg.org/#mixin-documentorshadowroot
595
596         Test: fast/shadow-dom/Document-prototype-elementFromPoint.html
597
598         * CMakeLists.txt:
599         * DerivedSources.make:
600         * WebCore.xcodeproj/project.pbxproj:
601         * dom/Document.cpp:
602         (WebCore::Document::nodeFromPoint): Moved to TreeScope.
603         (WebCore::Document::elementFromPoint): Moved to TreeScope.
604         * dom/Document.h:
605         * dom/Document.idl: Moved elementFromPoint and activeElement to DocumentOrShadowRoot.idl.
606         * dom/DocumentOrShadowRoot.idl: Added.
607         * dom/EventPath.cpp:
608         (WebCore::RelatedNodeRetargeter::checkConsistency): Use newly added TreeScope::retargetToScope.
609         * dom/ShadowRoot.idl: Moved activeElement to DocumentOrShadowRoot.idl.
610         * dom/TreeScope.cpp:
611         (WebCore::TreeScope::retargetToScope): Added. Implements https://dom.spec.whatwg.org/#retarget efficiently.
612         Instead of checking whether A (node) is a shadow-including inclusive ancestor of B (this scope) at each
613         parent, find the lowest ancestor which contains both A and B, and return the self-inclusive ancestor of B
614         in that tree. To find the lowest common ancestor in O(n), traverse all ancestors of A and B separately and
615         do a top-down traversal. The last tree scope in which A's ancestor and B's ancestor match is the lowest
616         common ancestor.
617         (WebCore::TreeScope::nodeFromPoint): Moved from Document.
618         (WebCore::TreeScope::elementFromPoint): Moved from Document. Use retargetToScope and parentInComposedTree
619         instead of parentNode and ancestorInThisScope to match the semantics proposed in
620         https://github.com/w3c/csswg-drafts/issues/556
621         * dom/TreeScope.h:
622
623 2016-10-04  Myles C. Maxfield  <mmaxfield@apple.com>
624
625         font-family: cursive should map to KaiTi in Chinese
626         https://bugs.webkit.org/show_bug.cgi?id=162889
627         <rdar://problem/28363547>
628
629         Reviewed by Tim Horton.
630
631         According to Bobby Tung, this is a better mapping. Previously, we were
632         relying on the system fallback mechanism. However, an explicit mapping
633         is more robust.
634
635         Test: fast/text/cursive-zh.html
636
637         * page/cocoa/SettingsCocoa.mm:
638         (WebCore::Settings::initializeDefaultFontFamilies):
639
640 2016-10-04  Alex Christensen  <achristensen@webkit.org>
641
642         URLParser: query-only URLs relative to file URLs should just add a query
643         https://bugs.webkit.org/show_bug.cgi?id=162888
644
645         Reviewed by Tim Horton.
646
647         Covered by new API tests.
648
649         * platform/URLParser.cpp:
650         (WebCore::URLParser::parse):
651         Like bug 206749 but with queries instead of fragments.
652
653 2016-10-04  Alex Christensen  <achristensen@webkit.org>
654
655         URLParser should match URL::parse and other browsers when parsing a URL containing only scheme://
656         https://bugs.webkit.org/show_bug.cgi?id=162909
657
658         Reviewed by Tim Horton.
659
660         If there's no host in this case we shouldn't fail, but rather make a valid URL with the // in the path.
661         This matches Chrome, Firefox, and Safari's behavior.
662         Covered by API tests.
663
664         * platform/URLParser.cpp:
665         (WebCore::URLParser::parse):
666
667 2016-10-04  Brent Fulgham  <bfulgham@apple.com>
668
669         Unreviewed build fix after r206773.
670
671         Exclude Direct2D definitions when building for normal CG Windows.
672
673         * platform/graphics/GraphicsContext.h:
674
675 2016-10-04  Yusuke Suzuki  <utatane.tea@gmail.com>
676
677         [DOMJIT] Introduce DOMJIT::GetterSetter to tell JIT information
678         https://bugs.webkit.org/show_bug.cgi?id=162916
679
680         Reviewed by Filip Pizlo.
681
682         * ForwardingHeaders/domjit/DOMJITGetterSetter.h: Added.
683         * PlatformEfl.cmake:
684         * PlatformGTK.cmake:
685         * PlatformMac.cmake:
686         * PlatformWin.cmake:
687
688 2016-10-04  Chris Dumez  <cdumez@apple.com>
689
690         Return null when window.open() is popup blocked
691         https://bugs.webkit.org/show_bug.cgi?id=162897
692
693         Reviewed by Michael Catanzaro.
694
695         The return value of window.open() when the popup is blocked should be null:
696         - https://github.com/whatwg/html/pull/1854
697         - https://github.com/whatwg/html/issues/1851
698
699         Firefox / Edge return null.
700
701         No new tests, rebaselined existing tests.
702
703         * bindings/js/JSDOMWindowCustom.cpp:
704         (WebCore::JSDOMWindow::open):
705
706 2016-10-04  Chris Dumez  <cdumez@apple.com>
707
708         [Web IDL] Add support for dictionary inheritance
709         https://bugs.webkit.org/show_bug.cgi?id=162907
710
711         Reviewed by Sam Weinig.
712
713         Add support for dictionary inheritance to our Web IDL parser and
714         bindings generator. Leverage this new support for EventTarget's
715         EventListenerOptions / AddEventListenerOptions dictionaries, in
716         order to match the DOM specification:
717         - https://dom.spec.whatwg.org/#interface-eventtarget
718
719         Also update the bindings generator to convert the dictionary
720         members in lexicographical order, as per:
721         - https://heycam.github.io/webidl/#es-dictionary (Step 5.1)
722
723         No new tests, rebaselined bindings tests.
724
725         * bindings/scripts/CodeGenerator.pm:
726         (GetDictionaryByName):
727         * bindings/scripts/CodeGeneratorJS.pm:
728         (GenerateDictionaryImplementationContent):
729         * bindings/scripts/IDLParser.pm:
730         (parseDictionary):
731         * bindings/scripts/test/JS/JSTestObj.cpp:
732         (WebCore::convertDictionary<TestObj::Dictionary>):
733         (WebCore::convertDictionary<TestObj::DictionaryThatShouldNotTolerateNull>):
734         (WebCore::convertDictionary<TestObj::DictionaryThatShouldTolerateNull>):
735         (WebCore::convertDictionary<AlternateDictionaryName>):
736         (WebCore::convertDictionary<TestObj::ParentDictionary>):
737         (WebCore::convertDictionary<TestObj::ChildDictionary>):
738         * bindings/scripts/test/TestObj.idl:
739         * dom/EventTarget.idl:
740
741 2016-10-04  Brent Fulgham  <bfulgham@apple.com>
742
743         [Win][Direct2D] Add initial D2D GraphicsContext implementation
744         https://bugs.webkit.org/show_bug.cgi?id=162917
745
746         Reviewed by Dean Jackson.
747
748         This patch lands a set of new files that implement the GraphicsContext
749         features on Windows using Direct2D.
750
751         No new tests until complete backend lands.
752
753         * platform/graphics/Color.h: Add new casting operator.
754         * platform/graphics/FloatSize.h: Ditto.
755         * platform/graphics/GraphicsContext.cpp: Update for Direct2D
756         implementation.
757         * platform/graphics/GraphicsContext.h:
758         * platform/graphics/win/ColorDirect2D.cpp:
759         (WebCore::Color::operator D2D1_VECTOR_4F): Added.
760         * platform/graphics/win/GraphicsContextCGWin.cpp: Add compiler
761         guard to avoid building when using Direct2D.
762         * platform/graphics/win/GraphicsContextDirect2D.cpp: Added.
763         * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h: Added.
764         * platform/graphics/win/GraphicsContextWin.cpp: Update for Direct2D
765         includes.
766         * platform/graphics/win/TransformationMatrixDirect2D.cpp: Fix comment.
767
768 2016-10-04  Carlos Garcia Campos  <cgarcia@igalia.com>
769
770         [SOUP] Remove SSLPolicyFlags from SoupNetworkSession
771         https://bugs.webkit.org/show_bug.cgi?id=162906
772
773         Reviewed by Michael Catanzaro.
774
775         All soup based ports are setting SSLUseSystemCAFile flag unconditionally, so we can just use that when creating
776         the session like we do for all other construct parameters.
777
778         * platform/network/soup/SoupNetworkSession.cpp:
779         (WebCore::SoupNetworkSession::createTestingSession):
780         (WebCore::SoupNetworkSession::setupLogger):
781         (WebCore::SoupNetworkSession::SoupNetworkSession): Deleted.
782         (WebCore::SoupNetworkSession::clearOldSoupCache): Deleted.
783         (WebCore::SoupNetworkSession::setHTTPProxy): Deleted.
784         * platform/network/soup/SoupNetworkSession.h:
785         (WebCore::SoupNetworkSession::soupSession): Deleted.
786
787 2016-10-04  Wenson Hsieh  <wenson_hsieh@apple.com>
788
789         Media controls are displayed in the incorrect state momentarily after switching between tabs playing media
790         https://bugs.webkit.org/show_bug.cgi?id=162766
791         <rdar://problem/28533523>
792
793         Reviewed by Jer Noble.
794
795         When showing Now Playing controls for a media session, we should first set up the Now Playing info and
796         playback state before telling MediaRemote to make the session visible. This is WebKit work in ensuring that
797         when switching Now Playing sessions by switching tabs, we do not first display an invalid Now Playing state
798         before updating to the expected state.
799
800         Adds 2 new WebKit API tests in NowPlayingControlsTests: NowPlayingControlsHideAfterShowingClearsInfo and
801         NowPlayingControlsClearInfoAfterSessionIsNoLongerValid.
802
803         * platform/audio/PlatformMediaSessionManager.h:
804         (WebCore::PlatformMediaSessionManager::lastUpdatedNowPlayingTitle):
805         (WebCore::PlatformMediaSessionManager::lastUpdatedNowPlayingDuration):
806         (WebCore::PlatformMediaSessionManager::lastUpdatedNowPlayingElapsedTime):
807         (WebCore::PlatformMediaSessionManager::hasActiveNowPlayingSession): Deleted.
808         * platform/audio/mac/MediaSessionManagerMac.h:
809         * platform/audio/mac/MediaSessionManagerMac.mm:
810         (WebCore::MediaSessionManagerMac::updateNowPlayingInfo):
811
812 2016-10-04  Youenn Fablet  <youenn@apple.com>
813
814         [Fetch API] ReadableStream should be errored with TypeError values
815         https://bugs.webkit.org/show_bug.cgi?id=162895
816
817         Reviewed by Alex Christensen.
818
819         Test: imported/w3c/web-platform-tests/fetch/api/basic/error-after-response.html
820
821         * Modules/fetch/FetchResponse.cpp:
822         (WebCore::FetchResponse::BodyLoader::didFail): Removing FIXME.
823         * bindings/js/ReadableStreamDefaultController.h:
824         (WebCore::ReadableStreamDefaultController::error<String>): Erroring with TypeError values.
825
826 2016-10-03  Chris Dumez  <cdumez@apple.com>
827
828         Bindings do not throw a TypeError if a required dictionary member is missing
829         https://bugs.webkit.org/show_bug.cgi?id=162734
830
831         Reviewed by Geoffrey Garen.
832
833         Bindings should throw a TypeError if a required dictionary member is missing.
834         For example, if there is a "required long id" member in a dictionary that is
835         missing, our bindings would prevously pass 0 to the implementation instead
836         of throwing a TypeError.
837
838         Relevant specification:
839         - https://heycam.github.io/webidl/#es-dictionary
840
841         I aligned our bindings generator implementation with the specification,
842         except for the support for dictionary inheritance that is still missing
843         and will be addressed in a follow-up patch.
844
845         No new tests, I rebaselined the bindings tests and this is already covered
846         by fast/events/touch/touch-constructor.html on iOS.
847
848         * bindings/js/JSCustomElementRegistryCustom.cpp:
849         (WebCore::JSCustomElementRegistry::define):
850         * bindings/js/JSDOMConvert.h:
851         (WebCore::convert): Deleted.
852         (WebCore::Converter<bool>::convert): Deleted.
853         (WebCore::Converter<String>::convert): Deleted.
854         (WebCore::Converter<IDLDOMString>::convert): Deleted.
855         (WebCore::Converter<IDLUSVString>::convert): Deleted.
856         (WebCore::Converter<JSC::JSValue>::convert): Deleted.
857         (WebCore::Converter<int8_t>::convert): Deleted.
858         (WebCore::Converter<uint8_t>::convert): Deleted.
859         * bindings/scripts/CodeGeneratorJS.pm:
860         (GenerateDictionaryImplementationContent):
861         * bindings/scripts/test/JS/JSTestObj.cpp:
862         (WebCore::convertDictionary<TestObj::Dictionary>):
863         (WebCore::convertDictionary<TestObj::DictionaryThatShouldNotTolerateNull>):
864         (WebCore::convertDictionary<TestObj::DictionaryThatShouldTolerateNull>):
865         (WebCore::convertDictionary<AlternateDictionaryName>):
866
867 2016-10-03  Zalan Bujtas  <zalan@apple.com>
868
869         [ListItems] Render tree should be all clean by the end of FrameView::layout().
870         https://bugs.webkit.org/show_bug.cgi?id=162832
871
872         Reviewed by Simon Fraser.
873
874         List item markers are inserted into the tree during layout, right before laying out
875         the list item (that's a big FIXME). At this point we already know what part of the tree
876         needs to be laid out. Inserting a list item marker does not expand this dirty area.
877         However whenever we insert a new renderer into the tree, we call setNeedsLayout on the contining block chain.
878         In certain cases (floating renderers), it could potentially trigger some unintentional markings
879         and we return from FrameView::layout() with a dirty subtree.
880
881         This patch preemptively marks the list item and its marker dirty so that
882         when the marker is getting inserted into the tree, we stop the marking at the parent.
883
884         Not testable.
885
886         * rendering/RenderListItem.cpp:
887         (WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded):
888
889 2016-10-03  Myles C. Maxfield  <mmaxfield@apple.com>
890
891         Implement rendering of font-variation-settings
892         https://bugs.webkit.org/show_bug.cgi?id=162782
893
894         Reviewed by Zalan Bujtas.
895
896         (Re-landing after fixing tests.)
897
898         Because the heavy lifting for font-variation-settings is done by CoreText, 
899         this patch is fairly minimal. It simply hooks up the CSS property to CoreText. 
900
901         There is an existing bug in CoreText where variations inside fonts do not 
902         survive the addition of a cascade list. Therefore, FontPlatformData::ctFont() 
903         needs to work around this (conditionally) by resupplying the variation at 
904         the same time as the cascade list. The CoreText bug is <rdar://problem/28449441>. 
905
906         Tests: fast/text/variations/duplicate.html
907                fast/text/variations/exist.html
908                fast/text/variations/inheritance.html
909                fast/text/variations/order.html
910                fast/text/variations/outofbounds.html
911
912         * platform/graphics/FontCache.h:
913         * platform/graphics/cocoa/FontCacheCoreText.cpp:
914         (WebCore::preparePlatformFont):
915         (WebCore::fontWithFamily):
916         (WebCore::FontCache::createFontPlatformData):
917         (WebCore::FontCache::systemFallbackForCharacters):
918         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
919         (WebCore::cascadeToLastResortAttributesDictionary):
920         (WebCore::cascadeToLastResortAndVariationsFontDescriptor):
921         (WebCore::FontPlatformData::ctFont):
922         (WebCore::cascadeToLastResortFontDescriptor): Deleted.
923         * platform/graphics/mac/FontCustomPlatformData.cpp:
924         (WebCore::FontCustomPlatformData::fontPlatformData):
925         * rendering/RenderThemeIOS.mm:
926         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
927
928 2016-10-03  Alex Christensen  <achristensen@webkit.org>
929
930         URLParser should strip tabs at all locations
931         https://bugs.webkit.org/show_bug.cgi?id=162836
932
933         Reviewed by Geoffrey Garen.
934
935         Covered by adding tabs to each location of each API test
936         except tests that test the encoding of surrogate pairs,
937         because inserting a tab between the pairs changes the encoding.
938
939         * platform/URLParser.cpp:
940         (WebCore::URLParser::takesTwoAdvancesUntilEnd):
941         (WebCore::URLParser::parse):
942         (WebCore::URLParser::parseIPv4Number):
943         (WebCore::URLParser::parseIPv4Host):
944         * platform/URLParser.h:
945
946 2016-10-03  Antti Koivisto  <antti@apple.com>
947
948         Remove Document::elementSheet()
949         https://bugs.webkit.org/show_bug.cgi?id=162876
950
951         Reviewed by Andreas Kling.
952
953         This is a Document owned stylesheet that exists as a context for parsing element inline style.
954         It never contains any rules and is generally confusing.
955
956         This patch removes the requirement for a stylesheet to be present for CSSParser to operate in
957         the correct context. Inline style is now parsed without stylesheet and a context object is
958         passed instead.
959
960         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
961         (WebCore::root):
962         * bindings/js/JSCSSStyleDeclarationCustom.h:
963         (WebCore::root): Deleted.
964         * css/PropertySetCSSStyleDeclaration.cpp:
965         (WebCore::PropertySetCSSStyleDeclaration::setCssText):
966         (WebCore::PropertySetCSSStyleDeclaration::setProperty):
967         (WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal):
968         (WebCore::PropertySetCSSStyleDeclaration::cssParserContext):
969         (WebCore::StyleRuleCSSStyleDeclaration::parentStyleSheet):
970         (WebCore::StyleRuleCSSStyleDeclaration::cssParserContext):
971         (WebCore::InlineCSSStyleDeclaration::parentStyleSheet):
972         (WebCore::InlineCSSStyleDeclaration::cssParserContext):
973         * css/PropertySetCSSStyleDeclaration.h:
974         (WebCore::PropertySetCSSStyleDeclaration::didMutate): Deleted.
975         * css/StyleProperties.cpp:
976         (WebCore::MutableStyleProperties::setProperty):
977         (WebCore::MutableStyleProperties::setCustomProperty):
978         (WebCore::MutableStyleProperties::parseDeclaration):
979         * css/parser/CSSParser.cpp:
980         (WebCore::CSSParser::parseValue):
981         (WebCore::CSSParser::parseCustomPropertyValue):
982         (WebCore::CSSParser::parseInlineStyleDeclaration):
983         * css/parser/CSSParser.h:
984         * css/parser/CSSParserImpl.cpp:
985         (WebCore::CSSParserImpl::parseInlineStyleDeclaration):
986         * dom/Document.cpp:
987         (WebCore::Document::~Document):
988         (WebCore::Document::updateBaseURL):
989         (WebCore::Document::usesStyleBasedEditability):
990         (WebCore::Document::setHasElementUsingStyleBasedEditability):
991         (WebCore::Document::elementSheet): Deleted.
992         * dom/Document.h:
993         * dom/StyledElement.cpp:
994         (WebCore::StyledElement::setInlineStyleFromString):
995         (WebCore::StyledElement::invalidateStyleAttribute):
996
997             The usesStyleBasedEditability bit used to be set via the elementSheet. Instead check for it after inline style mutations.
998
999         (WebCore::StyledElement::setInlineStyleProperty):
1000         (WebCore::StyledElement::addPropertyToPresentationAttributeStyle):
1001         * dom/StyledElement.h:
1002         (WebCore::StyledElement::invalidateStyleAttribute): Deleted.
1003         * inspector/InspectorStyleSheet.cpp:
1004         (WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges):
1005         * svg/SVGAnimateElementBase.cpp:
1006         (WebCore::applyCSSPropertyToTarget):
1007
1008 2016-10-03  Brent Fulgham  <bfulgham@apple.com>
1009
1010         Avoid null dereference when changing focus in design mode.
1011         https://bugs.webkit.org/show_bug.cgi?id=162877
1012         <rdar://problem/28061261>
1013
1014         Reviewed by Chris Dumez.
1015
1016         The bare m_frame pointer in DOMWindow can be cleared when setting focus to a new element. Check
1017         that the m_frame pointer is non-null before using it after calling a routine that could
1018         clear the pointer value.
1019
1020         Test: fast/frames/iframe-focus-crash.html
1021
1022         * page/DOMWindow.cpp:
1023         (WebCore::DOMWindow::focus): Check that the pointer is still non-null after setting the
1024         current focused element to nullptr.
1025
1026 2016-10-03  Chris Dumez  <cdumez@apple.com>
1027
1028         Add support for KeyboardEvent.key attribute
1029         https://bugs.webkit.org/show_bug.cgi?id=36267
1030
1031         Reviewed by Darin Adler.
1032
1033         Add support for KeyboardEvent.key attribute:
1034         - https://w3c.github.io/uievents/#dom-keyboardevent-key
1035
1036         This is behind a compile time flag that is only enabled on Mac and
1037         iOS and the implementation is still missing for other platforms.
1038
1039         Test: fast/events/keyboardevent-key.html
1040
1041         * dom/KeyboardEvent.cpp:
1042         (WebCore::KeyboardEvent::KeyboardEvent):
1043         * dom/KeyboardEvent.h:
1044         * dom/KeyboardEvent.idl:
1045         * platform/PlatformKeyboardEvent.h:
1046         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1047         (WebCore::PlatformKeyboardEvent::key):
1048         * platform/cocoa/KeyEventCocoa.h:
1049         * platform/cocoa/KeyEventCocoa.mm:
1050         (WebCore::keyForCharCode):
1051         * platform/ios/PlatformEventFactoryIOS.h:
1052         * platform/ios/PlatformEventFactoryIOS.mm:
1053         (WebCore::keyForKeyEvent):
1054         (WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder):
1055         * platform/mac/PlatformEventFactoryMac.h:
1056         * platform/mac/PlatformEventFactoryMac.mm:
1057         (WebCore::keyForKeyEvent):
1058         (WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder):
1059         (WebCore::PlatformWheelEventBuilder::PlatformWheelEventBuilder): Deleted.
1060         * replay/SerializationMethods.cpp:
1061         (JSC::EncodingTraits<PlatformKeyboardEvent>::encodeValue):
1062         (JSC::EncodingTraits<PlatformKeyboardEvent>::decodeValue):
1063
1064 2016-10-03  Chris Dumez  <cdumez@apple.com>
1065
1066         Add support for KeyboardEvent.key attribute
1067         https://bugs.webkit.org/show_bug.cgi?id=36267
1068
1069         Reviewed by Darin Adler.
1070
1071         Add support for KeyboardEvent.key attribute:
1072         - https://w3c.github.io/uievents/#dom-keyboardevent-key
1073
1074         This is behind a compile time flag that is only enabled on Mac and
1075         iOS and the implementation is still missing for other platforms.
1076
1077         Test: fast/events/keyboardevent-key.html
1078
1079         * dom/KeyboardEvent.cpp:
1080         (WebCore::KeyboardEvent::KeyboardEvent):
1081         * dom/KeyboardEvent.h:
1082         * dom/KeyboardEvent.idl:
1083         * platform/PlatformKeyboardEvent.h:
1084         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1085         (WebCore::PlatformKeyboardEvent::key):
1086         * platform/cocoa/KeyEventCocoa.h:
1087         * platform/cocoa/KeyEventCocoa.mm:
1088         (WebCore::keyForCharCode):
1089         * platform/ios/PlatformEventFactoryIOS.h:
1090         * platform/ios/PlatformEventFactoryIOS.mm:
1091         (WebCore::keyForKeyEvent):
1092         (WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder):
1093         * platform/mac/PlatformEventFactoryMac.h:
1094         * platform/mac/PlatformEventFactoryMac.mm:
1095         (WebCore::keyForKeyEvent):
1096         (WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder):
1097         (WebCore::PlatformWheelEventBuilder::PlatformWheelEventBuilder): Deleted.
1098         * replay/SerializationMethods.cpp:
1099         (JSC::EncodingTraits<PlatformKeyboardEvent>::encodeValue):
1100         (JSC::EncodingTraits<PlatformKeyboardEvent>::decodeValue):
1101
1102 2016-10-03  Alex Christensen  <achristensen@webkit.org>
1103
1104         URLParser: fragment-only URLs relative to file URLs should just add a fragment
1105         https://bugs.webkit.org/show_bug.cgi?id=162871
1106
1107         Reviewed by Geoffrey Garen.
1108
1109         Covered by new API tests.
1110
1111         * platform/URLParser.cpp:
1112         (WebCore::URLParser::parse):
1113         Instead of adding ///# after copying the base URL to the query, just add an #.
1114
1115 2016-10-03  Antoine Quint  <graouts@apple.com>
1116
1117         [Modern Media Controls] LayoutItem and Button classes
1118         https://bugs.webkit.org/show_bug.cgi?id=162868
1119         <rdar://problem/28590166>
1120
1121         Reviewed by Dean Jackson.
1122
1123         We introduce the new Button class and its parent class LayoutItem. We will subclass Button
1124         a lot in coming patches, as it provides a way to create a button and provide a delegate to
1125         respond to UI events via the `uiDelegate` property. A Button extends a LayoutItem, another
1126         class that we'll subclass heavily in coming patches, which is simply a LayoutNode with a
1127         `layoutDelegate` which allows to set the node's `layoutTraits`, a bit-mask allowing to
1128         specify layout attributes such as the platform and playback styles. 
1129
1130         Tests: media/modern-media-controls/button/button.html
1131                media/modern-media-controls/layout-item/layout-item.html
1132
1133         * Modules/modern-media-controls/controls/button.css: Added.
1134         (button):
1135         * Modules/modern-media-controls/controls/button.js: Added.
1136         (Button):
1137         (Button.prototype.get enabled):
1138         (Button.prototype.set enabled):
1139         (Button.prototype.handleEvent):
1140         (Button.prototype._handleUIEvent):
1141         * Modules/modern-media-controls/controls/layout-item.js: Added.
1142         (LayoutItem.prototype.get layoutTraits):
1143         (LayoutItem):
1144
1145 2016-10-03  Andy Estes  <aestes@apple.com>
1146
1147         ASSERTION FAILED: url.containsOnlyASCII() in WebCore::checkEncodedString() when parsing an invalid CSS cursor URL
1148         https://bugs.webkit.org/show_bug.cgi?id=162763
1149         <rdar://problem/28572758>
1150
1151         Reviewed by Youenn Fablet.
1152
1153         CSSCursorImageValue copies the URL of its underlying CSSImageValue by using the
1154         ParsedURLString URL constructor on the String returned by CSSImageValue::url(). While
1155         CSSImageValues were always being constructed from a URL implicitly converted to a String,
1156         nothing ensured that the URL was valid. For invalid URLs, URL::string() returns the string
1157         it was constructed with, which might still represent a relative URL or contain non-ASCII
1158         characters, violating the preconditions of the ParsedURLString URL constructor and causing
1159         an assertion to fail in Debug builds.
1160
1161         Fix this by having CSSImageValue store its image URL using a WebCore::URL rather than a
1162         String. CSSCursorImageValue can then copy this URL instead of attempting to re-parse a
1163         possibly-invalid URL string.
1164
1165         Test: fast/css/cursor-with-invalid-url.html
1166
1167         * css/CSSCursorImageValue.cpp:
1168         (WebCore::CSSCursorImageValue::CSSCursorImageValue): Copied m_imageValue.url() into
1169         m_originalURL instead of using the ParsedURLString URL constructor, since
1170         CSSImageValue::url() now returns a WebCore::URL.
1171         (WebCore::CSSCursorImageValue::loadImage): Created a URL from cursorElement->href() by
1172         calling Document::completeURL().
1173         * css/CSSImageValue.cpp:
1174         (WebCore::CSSImageValue::CSSImageValue): Changed to take a URL&& instead of a const String&.
1175         (WebCore::CSSImageValue::loadImage): Stopped calling Document::completeURL(), since m_url is
1176         now a WebCore::URL.
1177         * css/CSSImageValue.h: Changed url() to return a const URL&, and changed m_url to be a URL.
1178         * html/HTMLBodyElement.cpp:
1179         (WebCore::HTMLBodyElement::collectStyleForPresentationAttribute): Removed a call to
1180         URL::string().
1181         * html/HTMLTableElement.cpp:
1182         (WebCore::HTMLTableElement::collectStyleForPresentationAttribute): Ditto.
1183         * html/HTMLTablePartElement.cpp:
1184         (WebCore::HTMLTablePartElement::collectStyleForPresentationAttribute): Ditto.
1185
1186 2016-10-03  Zalan Bujtas  <zalan@apple.com>
1187
1188         Log an error to stderr when FrameView::layout() fails to clean all the renderers.
1189         https://bugs.webkit.org/show_bug.cgi?id=162835
1190
1191         Reviewed by Simon Fraser.
1192
1193         We've come across multiple layout/painting bugs caused by renderers left dirty
1194         after FrameView::layout(). This patch helps catching such issues early.
1195         Once all the blocking bugs are fixed (webkit.org/b/162835), logging should be replaced with ASSERT(). 
1196
1197         Not testable.
1198
1199         * page/FrameView.cpp:
1200         (WebCore::RenderTreeNeedsLayoutChecker::~RenderTreeNeedsLayoutChecker):
1201         (WebCore::FrameView::layout):
1202
1203 2016-10-03  Brent Fulgham  <bfulgham@apple.com>
1204
1205         [Win][Direct2D] Add D2D Bitmap Image handling code
1206         https://bugs.webkit.org/show_bug.cgi?id=162761
1207
1208         Reviewed by Dean Jackson.
1209
1210         This patch lands a set of new files that implement
1211         Image and BitmapImage features on Windows using
1212         Direct2D.
1213
1214         The desired ID2D1RenderTarget handle is needed by the
1215         image decoder so that it can load the resulting bitmap
1216         into the GPU.
1217
1218         No new tests until complete backend lands.
1219
1220         * platform/graphics/BitmapImage.cpp:
1221         (WebCore::BitmapImage::draw): Tell the Direct2D image decoder
1222         which render target to use.
1223         * platform/graphics/BitmapImage.h:
1224         * platform/graphics/ImageBuffer.cpp:
1225         * platform/graphics/ImageBuffer.h:
1226         * platform/graphics/ImageBufferData.h:
1227         * platform/graphics/ImageFrameCache.cpp:
1228         (WebCore::ImageFrameCache::setRenderTarget): Added.
1229         * platform/graphics/ImageFrameCache.h:
1230         (WebCore::ImageFrameCache::decoder): Added.
1231         * platform/graphics/ImageSource.cpp:
1232         * platform/graphics/ImageSource.h:
1233         (WebCore::ImageSource::setRenderTarget):
1234         * platform/graphics/win/ImageBufferDataDirect2D.cpp: Added.
1235         * platform/graphics/win/ImageBufferDataDirect2D.h: Added.
1236         * platform/graphics/win/ImageBufferDirect2D.cpp: Added.
1237         * platform/graphics/win/ImageCGWin.cpp:
1238         * platform/graphics/win/ImageDecoderDirect2D.cpp: Added.
1239         * platform/graphics/win/ImageDecoderDirect2D.h: Added.
1240         * platform/graphics/win/ImageDirect2D.cpp: Added.
1241         * platform/graphics/win/NativeImageDirect2D.cpp: Added.
1242
1243 2016-10-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1244
1245         [SOUP] Remove unused methods toSoupMessage from ResourceRequest/Response
1246         https://bugs.webkit.org/show_bug.cgi?id=162867
1247
1248         Reviewed by Sergio Villar Senin.
1249
1250         * platform/network/soup/ResourceRequest.h:
1251         * platform/network/soup/ResourceRequestSoup.cpp:
1252         (WebCore::ResourceRequest::updateSoupMessage):
1253         (WebCore::ResourceRequest::updateFromSoupMessage): Deleted.
1254         * platform/network/soup/ResourceResponse.h:
1255         * platform/network/soup/ResourceResponseSoup.cpp:
1256         (WebCore::ResourceResponse::updateFromSoupMessage): Deleted.
1257
1258 2016-10-03  Youenn Fablet  <youenn@apple.com>
1259
1260         Remove FetchBody::m_isEmpty
1261         https://bugs.webkit.org/show_bug.cgi?id=162857
1262
1263         Reviewed by Alex Christensen.
1264
1265         No change of behavior.
1266
1267         Moving handling of null bodies in FetchBodyOwner, by having an Optional<FetchBody> in FetchBodyOwner.
1268         Moving storage of m_contentType in FetchBodyOwner.
1269
1270         Moving header storage from FetchResponse/FetchRequest to FetchBodyOwner, as it helps updating m_contentType.
1271
1272         * Modules/fetch/FetchBody.cpp: removing m_isEmpty and m_contentType.
1273         (WebCore::FetchBody::extract): Computes the default content-type which is stored in FetchBodyOwner.
1274         (WebCore::FetchBody::blob):
1275         (WebCore::FetchBody::consume):
1276         (WebCore::FetchBody::consumeAsStream):
1277         (WebCore::FetchBody::loadingSucceeded):
1278         (WebCore::FetchBody::bodyForInternalRequest):
1279         (WebCore::FetchBody::clone):
1280         * Modules/fetch/FetchBody.h:
1281         (WebCore::FetchBody::loadingBody):
1282         (WebCore::FetchBody::FetchBody):
1283         * Modules/fetch/FetchBodyOwner.cpp:
1284         (WebCore::FetchBodyOwner::FetchBodyOwner):
1285         (WebCore::FetchBodyOwner::stop):
1286         (WebCore::FetchBodyOwner::arrayBuffer):
1287         (WebCore::FetchBodyOwner::blob):
1288         (WebCore::FetchBodyOwner::cloneBody): Needs to clone m_contentType as well.
1289         (WebCore::FetchBodyOwner::extractBody):
1290         (WebCore::FetchBodyOwner::updateContentType):
1291         (WebCore::FetchBodyOwner::consumeOnceLoadingFinished):
1292         (WebCore::FetchBodyOwner::formData):
1293         (WebCore::FetchBodyOwner::json):
1294         (WebCore::FetchBodyOwner::text):
1295         (WebCore::FetchBodyOwner::loadBlob):
1296         (WebCore::FetchBodyOwner::blobLoadingSucceeded):
1297         (WebCore::FetchBodyOwner::blobLoadingFailed):
1298         (WebCore::FetchBodyOwner::finishBlobLoading):
1299         * Modules/fetch/FetchBodyOwner.h:
1300         (WebCore::FetchBodyOwner::body):
1301         (WebCore::FetchBodyOwner::isBodyNull):
1302         * Modules/fetch/FetchRequest.cpp:
1303         (WebCore::FetchRequest::setBody):
1304         (WebCore::FetchRequest::internalRequest):
1305         (WebCore::FetchRequest::clone):
1306         * Modules/fetch/FetchRequest.h:
1307         (WebCore::FetchRequest::FetchRequest):
1308         * Modules/fetch/FetchResponse.cpp:
1309         (WebCore::FetchResponse::initializeWith):
1310         (WebCore::FetchResponse::FetchResponse):
1311         (WebCore::FetchResponse::cloneForJS):
1312         (WebCore::FetchResponse::fetch):
1313         (WebCore::FetchResponse::BodyLoader::didSucceed):
1314         (WebCore::FetchResponse::BodyLoader::didReceiveResponse):
1315         (WebCore::FetchResponse::BodyLoader::start):
1316         (WebCore::FetchResponse::createReadableStreamSource):
1317         * Modules/fetch/FetchResponse.h:
1318
1319 2016-10-03  Andy Estes  <aestes@apple.com>
1320
1321         ASSERTION FAILED: result in WebCore::CSSParser::parseURI
1322         https://bugs.webkit.org/show_bug.cgi?id=141638
1323         <rdar://problem/27709952>
1324
1325         Reviewed by Andreas Kling.
1326
1327         CSSParser::parseURIInternal() failed to parse unquoted URLs with Unicode escape sequences
1328         greater than 0xFF, even when the destination character type was multi-byte. Fixed by
1329         checking the size of DestCharacterType instead of SrcCharacterType.
1330
1331         Updated fast/css/url-with-multi-byte-unicode-escape.html to test for an unquoted URL.
1332
1333         * css/parser/CSSParser.cpp:
1334         (WebCore::CSSParser::parseURIInternal): For code points greater than 0xFF, only returned
1335         false if sizeof(DestCharacterType) == 1.
1336
1337 2016-10-03  Alex Christensen  <achristensen@webkit.org>
1338
1339         URLParser: empty relative URLs should not copy fragment from the base URL
1340         https://bugs.webkit.org/show_bug.cgi?id=162864
1341
1342         Reviewed by Chris Dumez.
1343
1344         Covered by new API tests.
1345
1346         * platform/URL.cpp:
1347         (WebCore::URL::removeFragmentIdentifier):
1348         Optimize removing fragments, now that it happens more often. We don't need to reparse, 
1349         because the result will always be equal to just a substring when removing the fragment at the end.
1350         * platform/URLParser.cpp:
1351         (WebCore::URLParser::copyASCIIStringUntil):
1352         (WebCore::URLParser::copyURLPartsUntil):
1353         (WebCore::containsOnlyC0ControlOrSpace):
1354         (WebCore::URLParser::URLParser):
1355         (WebCore::URLParser::parse):
1356         * platform/URLParser.h:
1357         Because we are not copying the fragment, we can simplify and remove some unreachable code.
1358
1359 2016-10-03  Chris Dumez  <cdumez@apple.com>
1360
1361         td.scope should only return known values
1362         https://bugs.webkit.org/show_bug.cgi?id=162755
1363
1364         Reviewed by Sam Weinig.
1365
1366         td.scope should only return known values:
1367         - https://html.spec.whatwg.org/#dom-th-scope
1368
1369         Firefox conforms to the specification.
1370
1371         No new tests, rebaselined existing test.
1372
1373         * html/HTMLTableCellElement.cpp:
1374         (WebCore::HTMLTableCellElement::scope):
1375
1376 2016-10-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1377
1378         [SOUP] Simplify AuthenticationChallenge
1379         https://bugs.webkit.org/show_bug.cgi?id=162784
1380
1381         Reviewed by Alex Christensen.
1382
1383         We don't really need to keep references to the SoupSession and SoupMessage in AuthenticationChallenge, the
1384         SoupNetworkSession callback already forwards the challenge to the right ResourceHandle.
1385
1386         * platform/network/soup/AuthenticationChallenge.h:
1387         (WebCore::AuthenticationChallenge::authenticationClient):
1388         (WebCore::AuthenticationChallenge::soupSession): Deleted.
1389         (WebCore::AuthenticationChallenge::soupMessage): Deleted.
1390         * platform/network/soup/AuthenticationChallengeSoup.cpp:
1391         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
1392         (WebCore::AuthenticationChallenge::platformCompare):
1393         * platform/network/soup/ResourceHandleSoup.cpp:
1394         (WebCore::ResourceHandle::continueDidReceiveAuthenticationChallenge):
1395         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
1396         (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
1397         (WebCore::ResourceHandle::receivedCredential):
1398         (WebCore::ResourceHandle::receivedCancellation):
1399         * platform/network/soup/SoupNetworkSession.cpp:
1400         (WebCore::authenticateCallback):
1401
1402 2016-10-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1403
1404         [SOUP] Cleanup persistent credential storage code
1405         https://bugs.webkit.org/show_bug.cgi?id=162777
1406
1407         Reviewed by Alex Christensen.
1408
1409         We have this feature behind ENABLE_CREDENTIAL_STORAGE flag, which is confusing, because we use credential
1410         storage unconditionally and this is only about persistent storage. Also the flag assumes libsecret is available,
1411         and since it's only used by GTK sometimes we use GTK ifdefs instead of CREDENTIAL_STORAGE. So, I think we should
1412         use USE(LIBSECRET) instead, and reduce a bit the ifdefs in common soup code. Another problem is that current
1413         implementation is always used, while it should depend on the current network storage session and never used in
1414         ephemeral sessions. This patch moves the code from CredentialBackingStore to NetworkStorageSessionSoup and
1415         modernizes a bit.
1416
1417         * PlatformGTK.cmake: Remove CredentialBackingStore.cpp.
1418         * platform/gtk/GRefPtrGtk.cpp: Use USE(LIBSECRET)
1419         * platform/gtk/GRefPtrGtk.h:
1420         * platform/network/NetworkStorageSession.h:
1421         * platform/network/ResourceHandleInternal.h:
1422         * platform/network/gtk/CredentialBackingStore.cpp: Removed.
1423         * platform/network/gtk/CredentialBackingStore.h: Removed.
1424         * platform/network/soup/NetworkStorageSessionSoup.cpp:
1425         (WebCore::NetworkStorageSession::~NetworkStorageSession):
1426         (WebCore::schemeFromProtectionSpaceServerType):
1427         (WebCore::authTypeFromProtectionSpaceAuthenticationScheme):
1428         (WebCore::NetworkStorageSession::getCredentialFromPersistentStorage):
1429         (WebCore::NetworkStorageSession::saveCredentialToPersistentStorage):
1430         (WebCore::NetworkStorageSession::ensurePrivateBrowsingSession): Deleted.
1431         (WebCore::NetworkStorageSession::switchToNewTestingSession): Deleted.
1432         * platform/network/soup/ResourceHandleSoup.cpp:
1433         (WebCore::gotHeadersCallback):
1434         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
1435         (WebCore::ResourceHandle::receivedCredential):
1436         (WebCore::ResourceHandle::continueDidReceiveAuthenticationChallenge): Deleted.
1437         (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential): Deleted.
1438         (WebCore::ResourceHandle::receivedCancellation): Deleted.
1439
1440 2016-10-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1441
1442         Unreviewed. Fix the build with coordinated graphics enabled after r206712.
1443
1444         * page/scrolling/ScrollingStateTree.cpp:
1445         (WebCore::ScrollingStateTree::attachNode):
1446
1447 2016-10-02  Chris Dumez  <cdumez@apple.com>
1448
1449         Add support for KeyboardEvent.getModifierState() operation
1450         https://bugs.webkit.org/show_bug.cgi?id=162855
1451
1452         Reviewed by Darin Adler.
1453
1454         Add support for KeyboardEvent.getModifierState() operation:
1455         - https://w3c.github.io/uievents/#dom-keyboardevent-getmodifierstate
1456
1457         Test: fast/events/constructors/keyboard-event-getModifierState.html
1458
1459         * dom/KeyboardEvent.cpp:
1460         (WebCore::KeyboardEvent::getModifierState):
1461         * dom/KeyboardEvent.idl:
1462
1463 2016-10-02  Chris Dumez  <cdumez@apple.com>
1464
1465         Add support for KeyboardEvent.repeat attribute
1466         https://bugs.webkit.org/show_bug.cgi?id=162854
1467
1468         Reviewed by Darin Adler.
1469
1470         Add support for KeyboardEvent.repeat attribute:
1471         - https://w3c.github.io/uievents/#dom-keyboardevent-repeat
1472
1473         No new tests, extended existing test.
1474
1475         * dom/KeyboardEvent.cpp:
1476         (WebCore::KeyboardEvent::KeyboardEvent):
1477         * dom/KeyboardEvent.h:
1478         * dom/KeyboardEvent.idl:
1479
1480 2016-10-02  Darin Adler  <darin@apple.com>
1481
1482         Rename ExceptionCode-based exception handling to "legacy"
1483         https://bugs.webkit.org/show_bug.cgi?id=162859
1484
1485         Reviewed by Chris Dumez.
1486
1487         RaisesException is now MayThrowLegacyException.
1488
1489         A follow-up patch soon will add MayThrowException for the new style,
1490         where we use ExceptionOr<> as the return type instead of an ExceptionCode
1491         out argument.
1492
1493         * bindings/scripts/CodeGeneratorJS.pm:
1494         Removed the quotation marks from the syntax object->{PropertyName} so the
1495         renaming script could handle it. Tweaked various comments and logic for clarity.
1496         Changed to use the perl "x if y" syntax for brevity in many places.
1497         Renamed with the script and by hand. Added code to skip including the same header
1498         in both the implementation file and the header, just to make generated bindings
1499         slightly smaller and faster to compile. Used "using" instead of "typedef".
1500
1501         * bindings/scripts/IDLAttributes.txt: Updated from old names to new ones.
1502
1503         * Modules/applepay/ApplePaySession.idl:
1504         * Modules/encryptedmedia/MediaKeySession.idl:
1505         * Modules/encryptedmedia/MediaKeys.idl:
1506         * Modules/fetch/FetchHeaders.idl:
1507         * Modules/fetch/FetchRequest.idl:
1508         * Modules/fetch/FetchResponse.idl:
1509         * Modules/indexeddb/IDBCursor.idl:
1510         * Modules/indexeddb/IDBDatabase.idl:
1511         * Modules/indexeddb/IDBFactory.idl:
1512         * Modules/indexeddb/IDBIndex.idl:
1513         * Modules/indexeddb/IDBKeyRange.idl:
1514         * Modules/indexeddb/IDBObjectStore.idl:
1515         * Modules/indexeddb/IDBRequest.idl:
1516         * Modules/indexeddb/IDBTransaction.idl:
1517         * Modules/mediasource/MediaSource.idl:
1518         * Modules/mediasource/SourceBuffer.idl:
1519         * Modules/mediastream/MediaDevices.idl:
1520         * Modules/mediastream/RTCDTMFSender.idl:
1521         * Modules/mediastream/RTCDataChannel.idl:
1522         * Modules/mediastream/RTCIceCandidate.idl:
1523         * Modules/mediastream/RTCPeerConnection.idl:
1524         * Modules/mediastream/RTCRtpSender.idl:
1525         * Modules/mediastream/RTCSessionDescription.idl:
1526         * Modules/navigatorcontentutils/NavigatorContentUtils.idl:
1527         * Modules/notifications/NotificationCenter.idl:
1528         * Modules/webaudio/AnalyserNode.idl:
1529         * Modules/webaudio/AudioBuffer.idl:
1530         * Modules/webaudio/AudioBufferSourceNode.idl:
1531         * Modules/webaudio/AudioContext.idl:
1532         * Modules/webaudio/AudioNode.idl:
1533         * Modules/webaudio/ConvolverNode.idl:
1534         * Modules/webaudio/OfflineAudioContext.idl:
1535         * Modules/webaudio/OscillatorNode.idl:
1536         * Modules/webdatabase/DOMWindowWebDatabase.idl:
1537         * Modules/webdatabase/SQLResultSet.idl:
1538         * Modules/websockets/WebSocket.idl:
1539         * bindings/scripts/test/TestImplements.idl:
1540         * bindings/scripts/test/TestInterface.idl:
1541         * bindings/scripts/test/TestNamedConstructor.idl:
1542         * bindings/scripts/test/TestNondeterministic.idl:
1543         * bindings/scripts/test/TestObj.idl:
1544         * bindings/scripts/test/TestSupplemental.idl:
1545         * bindings/scripts/test/TestTypedefs.idl:
1546         * css/CSSCharsetRule.idl:
1547         * css/CSSMediaRule.idl:
1548         * css/CSSPrimitiveValue.idl:
1549         * css/CSSRule.idl:
1550         * css/CSSStyleDeclaration.idl:
1551         * css/CSSStyleSheet.idl:
1552         * css/CSSSupportsRule.idl:
1553         * css/CSSValue.idl:
1554         * css/FontFace.idl:
1555         * css/FontFaceSet.idl:
1556         * css/MediaList.idl:
1557         * css/WebKitCSSMatrix.idl:
1558         * dom/CharacterData.idl:
1559         * dom/ChildNode.idl:
1560         * dom/CustomElementRegistry.idl:
1561         * dom/DataTransferItemList.idl:
1562         * dom/Document.idl:
1563         * dom/Element.idl:
1564         * dom/EventTarget.idl:
1565         * dom/MessagePort.idl:
1566         * dom/MutationObserver.idl:
1567         * dom/NamedNodeMap.idl:
1568         * dom/Node.idl:
1569         * dom/ParentNode.idl:
1570         * dom/Range.idl:
1571         * dom/ShadowRoot.idl:
1572         * dom/Text.idl:
1573         * fileapi/FileReader.idl:
1574         * fileapi/FileReaderSync.idl:
1575         * html/DOMTokenList.idl:
1576         * html/DOMURL.idl:
1577         * html/HTMLCanvasElement.idl:
1578         * html/HTMLElement.idl:
1579         * html/HTMLEmbedElement.idl:
1580         * html/HTMLFrameElement.idl:
1581         * html/HTMLIFrameElement.idl:
1582         * html/HTMLInputElement.idl:
1583         * html/HTMLMarqueeElement.idl:
1584         * html/HTMLMediaElement.idl:
1585         * html/HTMLObjectElement.idl:
1586         * html/HTMLOptionElement.idl:
1587         * html/HTMLOptionsCollection.idl:
1588         * html/HTMLProgressElement.idl:
1589         * html/HTMLSelectElement.idl:
1590         * html/HTMLTableElement.idl:
1591         * html/HTMLTableRowElement.idl:
1592         * html/HTMLTableSectionElement.idl:
1593         * html/HTMLTextAreaElement.idl:
1594         * html/HTMLVideoElement.idl:
1595         * html/ImageData.idl:
1596         * html/MediaController.idl:
1597         * html/TimeRanges.idl:
1598         * html/URLUtils.idl:
1599         * html/canvas/CanvasGradient.idl:
1600         * html/canvas/CanvasPath.idl:
1601         * html/canvas/CanvasRenderingContext2D.idl:
1602         * html/canvas/OESVertexArrayObject.idl:
1603         * html/canvas/WebGLRenderingContextBase.idl:
1604         * html/track/DataCue.idl:
1605         * html/track/TextTrack.idl:
1606         * html/track/TextTrackCue.idl:
1607         * html/track/VTTCue.idl:
1608         * html/track/VTTRegion.idl:
1609         * loader/appcache/DOMApplicationCache.idl:
1610         * page/Crypto.idl:
1611         * page/DOMSelection.idl:
1612         * page/DOMWindow.idl:
1613         * page/EventSource.idl:
1614         * page/History.idl:
1615         * page/Location.idl:
1616         * page/Performance.idl:
1617         * page/UserMessageHandler.idl:
1618         * page/WindowOrWorkerGlobalScope.idl:
1619         * storage/Storage.idl:
1620         * svg/SVGAltGlyphElement.idl:
1621         * svg/SVGAngle.idl:
1622         * svg/SVGAnimatedBoolean.idl:
1623         * svg/SVGAnimatedEnumeration.idl:
1624         * svg/SVGAnimatedInteger.idl:
1625         * svg/SVGAnimatedNumber.idl:
1626         * svg/SVGAnimatedString.idl:
1627         * svg/SVGAnimationElement.idl:
1628         * svg/SVGColor.idl:
1629         * svg/SVGGlyphRefElement.idl:
1630         * svg/SVGGraphicsElement.idl:
1631         * svg/SVGLength.idl:
1632         * svg/SVGLengthList.idl:
1633         * svg/SVGMatrix.idl:
1634         * svg/SVGNumberList.idl:
1635         * svg/SVGPaint.idl:
1636         * svg/SVGPathSegList.idl:
1637         * svg/SVGPointList.idl:
1638         * svg/SVGPreserveAspectRatio.idl:
1639         * svg/SVGStringList.idl:
1640         * svg/SVGStyleElement.idl:
1641         * svg/SVGTextContentElement.idl:
1642         * svg/SVGTransformList.idl:
1643         * svg/SVGViewSpec.idl:
1644         * testing/InternalSettings.idl:
1645         * testing/Internals.idl:
1646         * workers/DedicatedWorkerGlobalScope.idl:
1647         * workers/Worker.idl:
1648         * xml/DOMParser.idl:
1649         * xml/XMLHttpRequest.idl:
1650         * xml/XPathEvaluator.idl:
1651         * xml/XPathExpression.idl:
1652         * xml/XPathResult.idl:
1653         Allowed the rename script to rename the exception-related extended attributes.
1654
1655         * bindings/scripts/test/JS/JSInterfaceName.cpp:
1656         * bindings/scripts/test/JS/JSInterfaceName.h:
1657         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1658         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
1659         * bindings/scripts/test/JS/JSTestCallback.cpp:
1660         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
1661         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h:
1662         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
1663         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
1664         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1665         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
1666         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1667         * bindings/scripts/test/JS/JSTestEventConstructor.h:
1668         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1669         * bindings/scripts/test/JS/JSTestEventTarget.h:
1670         * bindings/scripts/test/JS/JSTestException.cpp:
1671         * bindings/scripts/test/JS/JSTestException.h:
1672         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1673         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
1674         * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
1675         * bindings/scripts/test/JS/JSTestGlobalObject.h:
1676         * bindings/scripts/test/JS/JSTestInterface.cpp:
1677         * bindings/scripts/test/JS/JSTestInterface.h:
1678         * bindings/scripts/test/JS/JSTestIterable.cpp:
1679         * bindings/scripts/test/JS/JSTestIterable.h:
1680         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
1681         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
1682         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1683         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
1684         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1685         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
1686         * bindings/scripts/test/JS/JSTestNode.cpp:
1687         * bindings/scripts/test/JS/JSTestNode.h:
1688         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1689         * bindings/scripts/test/JS/JSTestNondeterministic.h:
1690         * bindings/scripts/test/JS/JSTestObj.cpp:
1691         * bindings/scripts/test/JS/JSTestObj.h:
1692         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1693         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
1694         * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
1695         * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.h:
1696         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
1697         * bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
1698         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1699         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
1700         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1701         * bindings/scripts/test/JS/JSTestTypedefs.h:
1702         * bindings/scripts/test/JS/JSattribute.cpp:
1703         * bindings/scripts/test/JS/JSattribute.h:
1704         * bindings/scripts/test/JS/JSreadonly.cpp:
1705         * bindings/scripts/test/JS/JSreadonly.h:
1706         Regenerated.
1707
1708
1709 2016-10-02  Wenson Hsieh  <wenson_hsieh@apple.com>
1710
1711         Media controls for Soundcloud easily falls out of sync with what's actually playing
1712         https://bugs.webkit.org/show_bug.cgi?id=162843
1713         <rdar://problem/28176874>
1714
1715         Reviewed by Beth Dakin.
1716
1717         Currently, audio elements are subject to the same main content restrictions as video elements. This is
1718         problematic on sites where audio elements are really the main content, such as soundcloud. We need a different
1719         heuristic for determining whether audio elements such as these should be allowed to show playback controls.
1720
1721         Furthermore, we currently forbid autoplaying audio from showing controls if it has user gesture restrictions
1722         (i.e. it started playing via script). This is, again, problematic on sites where audio elements are played one
1723         after another (such as on soundcloud). Even though a subsequent audio element may have been triggered via
1724         script, we might want still want to show controls for it if the user has explicitly triggered other elements on
1725         the page to begin playing. However, if the user has not gestured on any media in the page, we still should not
1726         show controls for audio elements that begin playing via script.
1727
1728         Adds two new unit tests to TestWebKitAPI simulating audio playback behavior on soundcloud.
1729
1730         * html/MediaElementSession.cpp:
1731         (WebCore::MediaElementSession::removeBehaviorRestriction):
1732         (WebCore::MediaElementSession::canShowControlsManager):
1733         (WebCore::MediaElementSession::allowsPlaybackControlsForAutoplayingAudio):
1734         * html/MediaElementSession.h:
1735         * page/Page.h:
1736         (WebCore::Page::allowsPlaybackControlsForAutoplayingAudio):
1737         (WebCore::Page::setAllowsPlaybackControlsForAutoplayingAudio):
1738
1739 2016-10-02  Ryan Haddad  <ryanhaddad@apple.com>
1740
1741         Unreviewed, rolling out r206683.
1742
1743         This change caused API test WebKit2.FindMatches to fail on
1744         Mac.
1745
1746         Reverted changeset:
1747
1748         "The dragged image should be the current frame only of the
1749         animated image"
1750         https://bugs.webkit.org/show_bug.cgi?id=162109
1751         http://trac.webkit.org/changeset/206683
1752
1753 2016-10-02  Chris Dumez  <cdumez@apple.com>
1754
1755         Unreviewed, rolling out r206692 and r206718.
1756
1757         Seems to have caused >200 failures on Sierra
1758
1759         Reverted changesets:
1760
1761         "Implement rendering of font-variation-settings"
1762         https://bugs.webkit.org/show_bug.cgi?id=162782
1763         http://trac.webkit.org/changeset/206692
1764
1765         "Tried to fix the build after r206692."
1766         http://trac.webkit.org/changeset/206718
1767
1768 2016-10-02  Dan Bernstein  <mitz@apple.com>
1769
1770         Tried to fix the build after r206692.
1771
1772         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1773         (WebCore::cascadeToLastResortAndVariationsFontDescriptor):
1774
1775 2016-10-02  Commit Queue  <commit-queue@webkit.org>
1776
1777         Unreviewed, rolling out r206716.
1778         https://bugs.webkit.org/show_bug.cgi?id=162858
1779
1780         It is breaking Mac CMake Debug build (Requested by youenn on
1781         #webkit).
1782
1783         Reverted changeset:
1784
1785         "[Fetch API] Forbid redirection to non-HTTP(s) URL in non-
1786         navigation mode."
1787         https://bugs.webkit.org/show_bug.cgi?id=162785
1788         http://trac.webkit.org/changeset/206716
1789
1790 2016-10-02  Youenn Fablet  <youenn@apple.com>
1791
1792         [Fetch API] Forbid redirection to non-HTTP(s) URL in non-navigation mode.
1793         https://bugs.webkit.org/show_bug.cgi?id=162785
1794
1795         Reviewed by Alex Christensen.
1796
1797         Covered by rebased and existing tests.
1798
1799         Ensuring non-HTTP redirection URLs are not followed at DocumentThreadableLoader level for fetch API only.
1800         This should be applied to all clients at some point, but there is still some uncertainty for data URLs.
1801
1802         Did some refactoring to better separate the case of security checks in case of regular request or redirected request.
1803         This allows in particular to handle more clearly the case of data URLs which are allowed in all modes for regular requests.
1804         But they are not allowed for same-origin redirected requests.
1805
1806         * WebCore.xcodeproj/project.pbxproj:
1807         * loader/DocumentThreadableLoader.cpp:
1808         (WebCore::reportRedirectionWithBadScheme): Reporting bad scheme redirection error.
1809         (WebCore::DocumentThreadableLoader::redirectReceived): Checking that redirection URLs are HTTP(s) in case of Fetch API.
1810         * loader/SubresourceLoader.cpp:
1811         (WebCore::SubresourceLoader::willSendRequestInternal):
1812         * loader/cache/CachedResourceLoader.cpp:
1813         (WebCore::CachedResourceLoader::requestImage):
1814         (WebCore::CachedResourceLoader::checkInsecureContent):
1815         (WebCore::CachedResourceLoader::allowedByContentSecurityPolicy):
1816         (WebCore::isSameOriginDataURL):
1817         (WebCore::CachedResourceLoader::canRequest):
1818         (WebCore::CachedResourceLoader::canRequestAfterRedirection):
1819         (WebCore::CachedResourceLoader::canRequestInContentDispositionAttachmentSandbox):
1820         (WebCore::CachedResourceLoader::requestResource):
1821         * loader/cache/CachedResourceLoader.h:
1822
1823 2016-10-01  Simon Fraser  <simon.fraser@apple.com>
1824
1825         Support transitions/animations of background-position with right/bottom-relative values
1826         https://bugs.webkit.org/show_bug.cgi?id=162048
1827
1828         Reviewed by Dean Jackson.
1829         
1830         Make transitions between "background-position: 10px 20px" and "background-position: right 10px bottom 20px"
1831         work. We do this by by converting "right 10px" to "calc(100% - 10px)" when blending.
1832         
1833         Also improve logging of calculated lengths, and better animation logging for FillLayer properties.
1834
1835         Test: transitions/background-position-transitions.html
1836
1837         * page/animation/CSSPropertyAnimation.cpp:
1838         (WebCore::FillLayerAnimationPropertyWrapperBase::FillLayerAnimationPropertyWrapperBase): Keep the propertyID
1839         around so logging can use it.
1840         (WebCore::FillLayerAnimationPropertyWrapperBase::property):
1841         (WebCore::FillLayerPropertyWrapperGetter::FillLayerPropertyWrapperGetter):
1842         (WebCore::FillLayerPropertyWrapperGetter::value):
1843         (WebCore::FillLayerPropertyWrapper::FillLayerPropertyWrapper):
1844         (WebCore::createCalculatedLength):
1845         (WebCore::FillLayerPositionPropertyWrapper::FillLayerPositionPropertyWrapper):
1846         (WebCore::FillLayerRefCountedPropertyWrapper::FillLayerRefCountedPropertyWrapper):
1847         (WebCore::FillLayerStyleImagePropertyWrapper::FillLayerStyleImagePropertyWrapper):
1848         (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper):
1849         (WebCore::CSSPropertyAnimation::blendProperties): Blend then log, so that the logging
1850         can show the result.
1851         * platform/CalculationValue.cpp:
1852         (WebCore::CalcExpressionNumber::dump):
1853         (WebCore::CalcExpressionBinaryOperation::dump):
1854         (WebCore::CalcExpressionLength::dump):
1855         (WebCore::CalcExpressionBlendLength::dump):
1856         (WebCore::operator<<):
1857         * platform/CalculationValue.h:
1858         * platform/Length.cpp:
1859         (WebCore::operator<<):
1860
1861 2016-10-01  Simon Fraser  <simon.fraser@apple.com>
1862
1863         Bad cast when CSS position programmatically changed from -webkit-sticky to fixed
1864         https://bugs.webkit.org/show_bug.cgi?id=160826
1865
1866         Reviewed by Zalan Bujtas.
1867         
1868         If a scrolling state tree node changed type (e.g. from sticky to fixed), we'd fail
1869         to recreate the node so keep a node with the wrong type.
1870         
1871         Fix by destroying the node and making a new one with a new ID in this case. The
1872         new ID is necessary to ensure that the scrolling tree is updated.
1873
1874         Test: fast/scrolling/sticky-to-fixed.html
1875
1876         * page/scrolling/ScrollingStateTree.cpp:
1877         (WebCore::ScrollingStateTree::nodeTypeAndParentMatch):
1878         (WebCore::ScrollingStateTree::attachNode):
1879         (WebCore::ScrollingStateTree::stateNodeForID):
1880         * page/scrolling/ScrollingStateTree.h:
1881
1882 2016-10-01  Youenn Fablet  <youenn@apple.com>
1883
1884         removing FetchBoyd::m_type
1885
1886         Remove FetchBody::m_type
1887         https://bugs.webkit.org/show_bug.cgi?id=162841
1888
1889         Reviewed by Sam Weinig.
1890
1891         No change of behavior.
1892
1893         Removing FetchBody::m_type and using m_data in lieu.
1894         Introducing temporarily FetchBody::m_isEmpty to handle the case of null bodies.
1895         Null body handling should be moved to FetchBodyOwner in a follow-up patch.
1896
1897         * Modules/fetch/FetchBody.cpp:
1898         (WebCore::FetchBody::FetchBody):
1899         (WebCore::FetchBody::extract):
1900         (WebCore::FetchBody::arrayBuffer):
1901         (WebCore::FetchBody::blob):
1902         (WebCore::FetchBody::json):
1903         (WebCore::FetchBody::text):
1904         (WebCore::FetchBody::consumeOnceLoadingFinished):
1905         (WebCore::FetchBody::consume):
1906         (WebCore::FetchBody::consumeAsStream):
1907         (WebCore::FetchBody::loadingSucceeded):
1908         (WebCore::FetchBody::bodyForInternalRequest):
1909         (WebCore::FetchBody::clone):
1910         (WebCore::FetchBody::consumeText): Deleted.
1911         (WebCore::FetchBody::consumeBlob): Deleted.
1912         * Modules/fetch/FetchBody.h:
1913         (WebCore::FetchBody::isEmpty):
1914         (WebCore::FetchBody::isBlob):
1915         (WebCore::FetchBody::isFormData):
1916         (WebCore::FetchBody::isArrayBuffer):
1917         (WebCore::FetchBody::isArrayBufferView):
1918         (WebCore::FetchBody::isURLSearchParams):
1919         (WebCore::FetchBody::isText):
1920         (WebCore::FetchBody::FetchBody):
1921         (WebCore::FetchBody::setContentType): Deleted.
1922         (WebCore::FetchBody::urlSearchParamsBody): Deleted.
1923         * Modules/fetch/FetchBodyOwner.cpp:
1924         (WebCore::FetchBodyOwner::consumeOnceLoadingFinished):
1925         (WebCore::FetchBodyOwner::blobLoadingSucceeded):
1926         (WebCore::FetchBodyOwner::finishBlobLoading): Deleted.
1927         * Modules/fetch/FetchBodyOwner.h:
1928         (WebCore::FetchBodyOwner::body): Deleted.
1929         * Modules/fetch/FetchRequest.cpp:
1930         (WebCore::FetchRequest::setBody):
1931         * Modules/fetch/FetchResponse.cpp:
1932         (WebCore::FetchResponse::fetch):
1933         (WebCore::FetchResponse::BodyLoader::didSucceed):
1934         (WebCore::FetchResponse::consume):
1935         (WebCore::FetchResponse::consumeBodyAsStream):
1936         (WebCore::FetchResponse::createReadableStreamSource):
1937         (WebCore::FetchResponse::finishConsumingStream): Deleted.
1938         * Modules/fetch/FetchResponse.h:
1939
1940 2016-09-30  David Kilzer  <ddkilzer@apple.com>
1941
1942         REGRESSION (r203424): WebCore::ImageBuffer::createCompatibleBuffer() in ImageBufferCG.cpp over-releases CGColorSpaceRef objects
1943         <https://webkit.org/b/162823>
1944         <rdar://problem/27723268>
1945
1946         Reviewed by Joseph Pecoraro.
1947
1948         Code is covered by existing tests, but no crashes have been
1949         observed in practice.  May require running one test multiple
1950         times to reproduce.
1951
1952         * platform/graphics/cg/ImageBufferCG.cpp:
1953         (WebCore::ImageBuffer::createCompatibleBuffer): Don't use
1954         adoptCF() when the function doesn't return a +1 retained
1955         CGColorSpaceRef.
1956
1957 2016-09-30  Joonghun Park  <jh718.park@samsung.com>
1958
1959         [EFL] Fix build break since r206661. Unreviewed
1960         https://bugs.webkit.org/show_bug.cgi?id=162825
1961
1962         No new tests, no new behaviours.
1963
1964         * rendering/RenderLayer.cpp:
1965         (WebCore::ClipRects::ClipRects):
1966
1967 2016-09-30  Myles C. Maxfield  <mmaxfield@apple.com>
1968
1969         Declare that our variation fonts work is in progress
1970         https://bugs.webkit.org/show_bug.cgi?id=162816
1971
1972         Reviewed by Simon Fraser.
1973
1974         * features.json:
1975
1976 2016-09-30  Myles C. Maxfield  <mmaxfield@apple.com>
1977
1978         Turn variation fonts on by default
1979         https://bugs.webkit.org/show_bug.cgi?id=162818
1980
1981         Reviewed by Simon Fraser.
1982
1983         No new tests because there is no behavior change.
1984
1985         * page/Settings.in:
1986         * testing/InternalSettings.cpp:
1987         (WebCore::InternalSettings::variationFontsEnabled):
1988
1989 2016-09-30  Myles C. Maxfield  <mmaxfield@apple.com>
1990
1991         Implement rendering of font-variation-settings
1992         https://bugs.webkit.org/show_bug.cgi?id=162782
1993
1994         Reviewed by Zalan Bujtas.
1995
1996         Because the heavy lifting for font-variation-settings is done by CoreText,
1997         this patch is fairly minimal. It simply hooks up the CSS property to CoreText.
1998
1999         There is an existing bug in CoreText where variations inside fonts do not
2000         survive the addition of a cascade list. Therefore, FontPlatformData::ctFont()
2001         needs to work around this (conditionally) by resupplying the variation at
2002         the same time as the cascade list. The CoreText bug is <rdar://problem/28449441>.
2003
2004         Tests: fast/text/variations/duplicate.html
2005                fast/text/variations/exist.html
2006                fast/text/variations/inheritance.html
2007                fast/text/variations/order.html
2008                fast/text/variations/outofbounds.html
2009
2010         * platform/graphics/FontCache.h:
2011         * platform/graphics/cocoa/FontCacheCoreText.cpp:
2012         (WebCore::preparePlatformFont):
2013         (WebCore::fontWithFamily):
2014         (WebCore::FontCache::createFontPlatformData):
2015         (WebCore::FontCache::systemFallbackForCharacters):
2016         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2017         (WebCore::cascadeToLastResortAttributesDictionary):
2018         (WebCore::cascadeToLastResortAndVariationsFontDescriptor):
2019         (WebCore::FontPlatformData::ctFont):
2020         (WebCore::cascadeToLastResortFontDescriptor): Deleted.
2021         * platform/graphics/mac/FontCustomPlatformData.cpp:
2022         (WebCore::FontCustomPlatformData::fontPlatformData):
2023         * rendering/RenderThemeIOS.mm:
2024         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
2025
2026 2016-09-29  Sam Weinig  <sam@webkit.org>
2027
2028         Add initial support for IDL union conversion
2029         https://bugs.webkit.org/show_bug.cgi?id=161576
2030
2031         Reviewed by Chris Dumez.
2032
2033         * WebCore.xcodeproj/project.pbxproj:
2034         Add IDLTypes.h
2035
2036         * bindings/generic/IDLTypes.h: Added.
2037         Add a basic type hierarchy for types defined by WebIDL and their corresponding
2038         WebCore implementation types.
2039
2040         * bindings/js/JSDOMConvert.h:
2041         (WebCore::Converter<IDLDOMString>::convert):
2042         (WebCore::Converter<IDLUSVString>::convert):
2043         Add Converters for IDLDOMString and IDLUSVString.
2044
2045         (WebCore::ConditionalConverter<typename ReturnType, typename T, bool enabled>)
2046         Add a struct to allow conditional conversion of types based on a compile boolean
2047         value. This allows the union code to work, by ensuring that code for types that don't
2048         exist doesn't get compiled.
2049
2050         (WebCore::Converter<IDLUnion>::convert):
2051         Add template meta programming based version of the WebIDL conversion algorithm. It uses
2052         introspection of the typelist to conditionally execute the parts of the algorithm that
2053         apply and relies on the compiler eliminate the dead code it produces. This initial cut
2054         doesn't implement the full algorithm, just a subset needed to see if this method will work
2055         out.
2056
2057         * bindings/js/JSDOMWrapper.h:
2058         (WebCore::isJSDOMWrapperType):
2059         Add JSDOMWrapperType to the list of well known types to allow quick checking of wrappers
2060         by the union code.
2061
2062         * bindings/js/JSNodeOrString.cpp:
2063         (WebCore::toNodeOrStringVector):
2064         Switch to new IDLUnion based converter.
2065
2066 2016-09-30  Myles C. Maxfield  <mmaxfield@apple.com>
2067
2068         Implement animation of font-variation-settings
2069         https://bugs.webkit.org/show_bug.cgi?id=162783
2070
2071         Reviewed by Simon Fraser.
2072
2073         Modify CSSPropertyAnimation to understand FontVariationSettings objects and how
2074         to interpolate them.
2075
2076         If two FontVariationSettings objects are unlike (meaning they specify different
2077         variation axes), for now the interpolation simply returns an empty object. This
2078         might change in the future, but for now, this is a reasonable place to start.
2079
2080         Because CSSPropertyAnimation interacts with RenderStyles instead of
2081         FontDescriptions, this patch adds a transparent accessor from the RenderStyle
2082         to the inner FontDescription.
2083
2084         Tests: animations/font-variation-settings-order.html
2085                animations/font-variation-settings-unlike.html
2086                animations/font-variation-settings.html
2087
2088         * page/animation/CSSPropertyAnimation.cpp:
2089         (WebCore::blendFunc):
2090         (WebCore::PropertyWrapperFontVariationSettings::PropertyWrapperFontVariationSettings):
2091         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
2092         * rendering/style/RenderStyle.cpp:
2093         (WebCore::RenderStyle::setFontVariationSettings):
2094         * rendering/style/RenderStyle.h:
2095         (WebCore::RenderStyle::fontVariationSettings):
2096
2097 2016-09-30  Antoine Quint  <graouts@apple.com>
2098
2099         [Modern Media Controls] layout nodes
2100         https://bugs.webkit.org/show_bug.cgi?id=162799
2101         <rdar://problem/28569301>
2102
2103         Reviewed by Dean Jackson.
2104
2105         Modern media controls will be using a tree of LayoutNode objects that commit to the DOM
2106         in coordinated `requestAnimationFrame()` calls to ensure all layouts are done in an efficient
2107         and coordinated manner. As a preamble, we introduced the `scheduler` singleton in
2108         https://webkit.org/b/162726 which is in charge of scheduling callbacks.
2109
2110         A LayoutNode is created by providing an Element to its constructor, or an HTML string. Not
2111         providing a parameter creates a simple <div>.
2112
2113         When we set a property on a LayoutNode, we call `markDirtyProperty(propertyName)` which keeps
2114         track of dirty properties in the `_dirtyProperties` set. When this set is non-empty, the node
2115         is marked as dirty and registered in the global `dirtyNodes` map, asking the shared scheduler
2116         that a layout is needed. When the layout is performed, all nodes in the `dirtyNodes` map are
2117         processed such that `commitProperty(propertyName)` is called to commit dirty properties for
2118         a given node to the DOM, and `layout()` is called to allow subclasses of LayoutNode to conduct
2119         custom layout logic that goes beyond committing a given property.
2120
2121         Another reason why a node may be marked as dirty is when a DOM hierarchy change is needed. A
2122         host of DOM-like methods are exposed to allow flexible manipulations of nodes, with an extra
2123         `children` property which allows wholesale change of a node's subtree with a single array
2124         property assignment. Changes to the DOM hierarchy are performed in the same scheduler callback
2125         as style properties.
2126
2127         Nodes can be marked for layout explicitly with by setting the `needsLayout` property.
2128
2129         Tests: media/modern-media-controls/layout-node/addChild.html
2130                media/modern-media-controls/layout-node/children.html
2131                media/modern-media-controls/layout-node/constructor.html
2132                media/modern-media-controls/layout-node/height.html
2133                media/modern-media-controls/layout-node/insertAfter.html
2134                media/modern-media-controls/layout-node/insertBefore.html
2135                media/modern-media-controls/layout-node/parent.html
2136                media/modern-media-controls/layout-node/remove.html
2137                media/modern-media-controls/layout-node/removeChild.html
2138                media/modern-media-controls/layout-node/subclassing.html
2139                media/modern-media-controls/layout-node/visible.html
2140                media/modern-media-controls/layout-node/width.html
2141                media/modern-media-controls/layout-node/x.html
2142                media/modern-media-controls/layout-node/y.html
2143
2144         * Modules/modern-media-controls/controls/layout-node.js: Added.
2145         (LayoutNode):
2146         (LayoutNode.prototype.get x):
2147         (LayoutNode.prototype.set x):
2148         (LayoutNode.prototype.get y):
2149         (LayoutNode.prototype.set y):
2150         (LayoutNode.prototype.get width):
2151         (LayoutNode.prototype.set width):
2152         (LayoutNode.prototype.get height):
2153         (LayoutNode.prototype.set height):
2154         (LayoutNode.prototype.get visible):
2155         (LayoutNode.prototype.set visible):
2156         (LayoutNode.prototype.get needsLayout):
2157         (LayoutNode.prototype.set needsLayout):
2158         (LayoutNode.prototype.get parent):
2159         (LayoutNode.prototype.get children):
2160         (LayoutNode.prototype.set children):
2161         (LayoutNode.prototype.addChild):
2162         (LayoutNode.prototype.insertBefore):
2163         (LayoutNode.prototype.insertAfter):
2164         (LayoutNode.prototype.removeChild):
2165         (LayoutNode.prototype.remove):
2166         (LayoutNode.prototype.markDirtyProperty):
2167         (LayoutNode.prototype.commitProperty):
2168         (LayoutNode.prototype.layout):
2169         (LayoutNode.prototype._markNodeManipulation):
2170         (LayoutNode.prototype._updateDirtyState):
2171         (LayoutNode.prototype._updateChildren):
2172         (performScheduledLayout):
2173         (elementFromString):
2174
2175 2016-09-30  Said Abou-Hallawa  <sabouhallawa@apple.com>
2176
2177         The dragged image should be the current frame only of the animated image
2178         https://bugs.webkit.org/show_bug.cgi?id=162109
2179
2180         Reviewed by Tim Horton.
2181
2182         Instead of creating an NSImage with all the frames for the dragImage,
2183         create an NSImage with the current frame only.
2184
2185         * dom/DataTransferMac.mm:
2186         (WebCore::DataTransfer::createDragImage): Call currentFrameNSImage() to create the dragImage.
2187         * editing/cocoa/HTMLConverter.mm:
2188         (fileWrapperForElement):  Call the Image function with its new name.
2189         * platform/graphics/BitmapImage.h:
2190         * platform/graphics/Image.h:
2191         (WebCore::Image::nsImage): Rename getNSImage() to nsImage().
2192         (WebCore::Image::currentFrameNSImage): Returns the NSImage of the current frame.
2193         (WebCore::Image::tiffRepresentation): Rename getTIFFRepresentation() to tiffRepresentation().
2194         (WebCore::Image::getNSImage): Deleted.
2195         (WebCore::Image::getTIFFRepresentation): Deleted.
2196         * platform/graphics/mac/ImageMac.mm:
2197         (WebCore::BitmapImage::tiffRepresentation): Rename getTIFFRepresentation() to tiffRepresentation().
2198         (WebCore::BitmapImage::nsImage): Rename getNSImage() to nsImage().
2199         (WebCore::BitmapImage::currentFrameNSImage): Returns the NSImage of the current frame.
2200         (WebCore::BitmapImage::getTIFFRepresentation): Deleted.
2201         (WebCore::BitmapImage::getNSImage): Deleted.
2202         * platform/mac/CursorMac.mm:
2203         (WebCore::createCustomCursor): Call currentFrameNSImage() since the cursor does not animate anyway.
2204         * platform/mac/DragImageMac.mm:
2205         (WebCore::createDragImageFromImage): Use currentFrameNSImage() for the dragImage.
2206         * platform/mac/PasteboardMac.mm:
2207         (WebCore::Pasteboard::write): Call the Image function with its new name.
2208
2209 2016-09-30  Chris Dumez  <cdumez@apple.com>
2210
2211         [iOS] Allow sequence<Touch> input in TouchEvent constructor
2212         https://bugs.webkit.org/show_bug.cgi?id=162806
2213         <rdar://problem/28566429>
2214
2215         Reviewed by Ryosuke Niwa.
2216
2217         Allow sequence<Touch> input in TouchEvent constructor in addition to
2218         TouchList objects. It is convenient for developers to pass arrays of
2219         Touch objects.
2220
2221         No new tests, already covered by:
2222         imported/w3c/web-platform-tests/touch-events/touch-touchevent-constructor.html
2223
2224         * bindings/js/JSDOMBinding.h:
2225         (WebCore::toRefNativeArray):
2226         (WebCore::toRefPtrNativeArray):
2227         * bindings/js/JSDictionary.cpp:
2228         (WebCore::JSDictionary::convertValue):
2229
2230 2016-09-30  Myles C. Maxfield  <mmaxfield@apple.com>
2231
2232         Parse font-variation-settings
2233         https://bugs.webkit.org/show_bug.cgi?id=162781
2234
2235         Reviewed by Simon Fraser.
2236
2237         CSS Fonts level 4 [1] details the font-variation-settings property which allows variations
2238         to be applied to fonts which accept it. The property accepts a list of key/value
2239         pairs where the keys are four-character Ascii codes and the values are floating
2240         point values. The implementation uses font-feature-settings as a model, but with one
2241         big difference: font-variation-settings can be animated. The set of variation points
2242         are animated individually.
2243
2244         This font variations work is being done behind a run-time switch, which is settable from
2245         the Safari Develop menu.
2246
2247         Now that FontDescription is growing, I'd like to do an investigation into the possibility of
2248         moving some of the rare pieces of it into their own class to reduce memory. However, upon
2249         advice, this investigation will be fairly involved and should be done in its own bug.
2250
2251         Test: fast/text/variations/getComputedStyle.html
2252
2253         * CMakeLists.txt:
2254         * WebCore.xcodeproj/project.pbxproj:
2255         * css/CSSAllInOne.cpp:
2256         * css/CSSComputedStyleDeclaration.cpp:
2257         (WebCore::ComputedStyleExtractor::propertyValue):
2258         * css/CSSFontVariationValue.cpp: Copied from Source/WebCore/platform/graphics/FontTaggedSettings.cpp.
2259         (WebCore::CSSFontVariationValue::CSSFontVariationValue):
2260         (WebCore::CSSFontVariationValue::customCSSText):
2261         (WebCore::CSSFontVariationValue::equals):
2262         * css/CSSFontVariationValue.h: Copied from Source/WebCore/platform/graphics/FontTaggedSettings.cpp.
2263         * css/CSSPropertyNames.in:
2264         * css/CSSValue.cpp:
2265         (WebCore::CSSValue::equals):
2266         (WebCore::CSSValue::cssText):
2267         (WebCore::CSSValue::destroy):
2268         * css/CSSValue.h:
2269         (WebCore::CSSValue::isFontVariationValue):
2270         (WebCore::CSSValue::isFontFeatureValue): Deleted.
2271         * css/StyleBuilderConverter.h:
2272         (WebCore::StyleBuilderConverter::convertFontVariationSettings):
2273         * css/StyleBuilderCustom.h:
2274         (WebCore::StyleBuilderCustom::applyInitialFontVariationSettings):
2275         (WebCore::StyleBuilderCustom::applyInheritFontVariationSettings):
2276         (WebCore::StyleBuilderCustom::applyInheritFontFeatureSettings): Deleted.
2277         * css/parser/CSSParser.cpp:
2278         (WebCore::CSSParserContext::CSSParserContext):
2279         (WebCore::operator==):
2280         (WebCore::CSSParser::parseValue):
2281         (WebCore::CSSParser::parseFontFeatureSettings):
2282         (WebCore::CSSParser::parseFontVariationTag):
2283         (WebCore::CSSParser::parseFontVariationSettings):
2284         * css/parser/CSSParser.h:
2285         * css/parser/CSSParserMode.h:
2286         * platform/graphics/FontCache.h:
2287         (WebCore::FontDescriptionKey::FontDescriptionKey):
2288         (WebCore::FontDescriptionKey::operator==):
2289         (WebCore::FontDescriptionKey::computeHash):
2290         * platform/graphics/FontDescription.cpp:
2291         * platform/graphics/FontDescription.h:
2292         (WebCore::FontDescription::variationSettings):
2293         (WebCore::FontDescription::setVariationSettings):
2294         (WebCore::FontDescription::operator==):
2295         (WebCore::FontDescription::featureSettings): Deleted.
2296         (WebCore::FontDescription::setFeatureSettings): Deleted.
2297         * platform/graphics/FontTaggedSettings.cpp:
2298         (WebCore::FontVariationSettings::hash):
2299         (WebCore::operator<<):
2300         * platform/graphics/FontTaggedSettings.h:
2301
2302 2016-09-30  Myles C. Maxfield  <mmaxfield@apple.com>
2303
2304         Followup patch to r206664
2305         https://bugs.webkit.org/show_bug.cgi?id=162774
2306
2307         Unreviewed.
2308
2309         No new tests because there is no behavior change.
2310
2311         * platform/graphics/FontTaggedSettings.h:
2312         (WebCore::FourCharacterTagHashTraits::isDeletedValue): Deleted.
2313
2314 2016-09-30  Myles C. Maxfield  <mmaxfield@apple.com>
2315
2316         Fix fast/text/trak-optimizeLegibility.html
2317         https://bugs.webkit.org/show_bug.cgi?id=162779
2318
2319         Reviewed by Simon Fraser.
2320
2321         I accidentally created this test to allow an unnecessary delta
2322         in the width comparison. This covered the fact that the fonts
2323         were not being selected correctly in our testing code. Update the
2324         font selection code to work with system fonts correctly and
2325         update the test to not use a delta when performing width
2326         comparisons.
2327
2328         Test: fast/text/trak-optimizeLegibility.html
2329
2330         * platform/graphics/cocoa/FontCacheCoreText.cpp:
2331         (WebCore::isSystemFont):
2332         (WebCore::platformFontLookupWithFamily):
2333
2334 2016-09-30  Myles C. Maxfield  <mmaxfield@apple.com>
2335
2336         Create runtime flag for variation font work
2337         https://bugs.webkit.org/show_bug.cgi?id=162780
2338
2339         Reviewed by Alex Christensen.
2340
2341         No new tests because there is no behavior change.
2342
2343         Variation font work should be behind a runtime flag.
2344
2345         * page/Settings.in:
2346         * testing/InternalSettings.cpp:
2347         (WebCore::InternalSettings::Backup::Backup):
2348         (WebCore::InternalSettings::Backup::restoreTo):
2349         (WebCore::InternalSettings::variationFontsEnabled):
2350         (WebCore::InternalSettings::setVariationFontsEnabled):
2351         * testing/InternalSettings.h:
2352         * testing/InternalSettings.idl:
2353
2354 2016-09-30  Myles C. Maxfield  <mmaxfield@apple.com>
2355
2356         Templatize internal FontFeatureSettings class for variation font support
2357         https://bugs.webkit.org/show_bug.cgi?id=162774
2358
2359         Reviewed by Alex Christensen.
2360
2361         Font features and font variations are similar in that they are identified
2362         by four-character tags and an associated value. However, the value is an
2363         int for font features and is a float for font variations. In order to
2364         simplify code, we can use the same class for both, and use a template
2365         argument to distinguish between the two. Then, typedefs can be used to
2366         name them.
2367
2368         No new tests because there is no behavior change.
2369
2370         * WebCore.xcodeproj/project.pbxproj: Rename FontFeatureSettings.{cpp,h}
2371         to FontTaggedSettings.{cpp,h}
2372         * css/CSSComputedStyleDeclaration.cpp:
2373         (WebCore::ComputedStyleExtractor::propertyValue):
2374         * css/CSSFontFace.h:
2375         * css/CSSFontFaceSource.h:
2376         * css/CSSFontFeatureValue.cpp:
2377         (WebCore::CSSFontFeatureValue::CSSFontFeatureValue):
2378         * css/CSSFontFeatureValue.h:
2379         * css/FontFace.cpp:
2380         (WebCore::FontFace::featureSettings):
2381         * css/parser/CSSParser.cpp:
2382         (WebCore::CSSParser::parseFontFeatureTag):
2383         * loader/cache/CachedFont.h:
2384         * platform/graphics/FontDescription.h:
2385         * platform/graphics/FontFeatureSettings.cpp:
2386         (WebCore::FontFeature::FontFeature): Deleted.
2387         (WebCore::FontFeature::operator==): Deleted.
2388         (WebCore::FontFeature::operator<): Deleted.
2389         (WebCore::FontFeatureSettings::insert): Deleted.
2390         (WebCore::FontFeatureSettings::hash): Deleted.
2391         * platform/graphics/FontFeatureSettings.h: Removed.
2392         (WebCore::fontFeatureTag): Deleted.
2393         (WebCore::FontFeatureTagHash::hash): Deleted.
2394         (WebCore::FontFeatureTagHash::equal): Deleted.
2395         (WebCore::FontFeatureTagHashTraits::constructDeletedValue): Deleted.
2396         (WebCore::FontFeatureTagHashTraits::isDeletedValue): Deleted.
2397         (WebCore::FontFeature::operator!=): Deleted.
2398         (WebCore::FontFeature::tag): Deleted.
2399         (WebCore::FontFeature::value): Deleted.
2400         (WebCore::FontFeature::enabled): Deleted.
2401         (WebCore::FontFeatureSettings::operator==): Deleted.
2402         (WebCore::FontFeatureSettings::operator!=): Deleted.
2403         (WebCore::FontFeatureSettings::size): Deleted.
2404         (WebCore::FontFeatureSettings::operator[]): Deleted.
2405         (WebCore::FontFeatureSettings::at): Deleted.
2406         (WebCore::FontFeatureSettings::begin): Deleted.
2407         (WebCore::FontFeatureSettings::end): Deleted.
2408         * platform/graphics/FontTaggedSettings.cpp: Renamed from Source/WebCore/platform/graphics/FontFeatureSettings.cpp.
2409         (WebCore::FontFeatureSettings::hash):
2410         * platform/graphics/FontTaggedSettings.h: Added.
2411         (WebCore::fontFeatureTag):
2412         (WebCore::FourCharacterTagHash::hash):
2413         (WebCore::FourCharacterTagHash::equal):
2414         (WebCore::FourCharacterTagHashTraits::constructDeletedValue):
2415         (WebCore::FourCharacterTagHashTraits::isDeletedValue):
2416         (WebCore::FontTaggedSetting::operator!=):
2417         (WebCore::FontTaggedSetting::tag):
2418         (WebCore::FontTaggedSetting::value):
2419         (WebCore::FontTaggedSetting::enabled):
2420         (WebCore::FontTaggedSetting<T>::FontTaggedSetting):
2421         (WebCore::=):
2422         (WebCore::FontTaggedSetting<T>::operator<):
2423         (WebCore::FontTaggedSettings::operator==):
2424         (WebCore::FontTaggedSettings::operator!=):
2425         (WebCore::FontTaggedSettings::isEmpty):
2426         (WebCore::FontTaggedSettings::size):
2427         (WebCore::FontTaggedSettings::operator[]):
2428         (WebCore::FontTaggedSettings::at):
2429         (WebCore::FontTaggedSettings::begin):
2430         (WebCore::FontTaggedSettings::end):
2431         (WebCore::FontTaggedSettings<T>::insert):
2432         * platform/graphics/cocoa/FontCacheCoreText.cpp:
2433         (WebCore::tagEquals):
2434         (WebCore::appendOpenTypeFeature):
2435         * platform/graphics/mac/FontCustomPlatformData.h:
2436
2437 2016-09-30  Chris Dumez  <cdumez@apple.com>
2438
2439         Fragment serialization should always use 'xml:' prefix for attributes in XML namespace
2440         https://bugs.webkit.org/show_bug.cgi?id=162803
2441
2442         Reviewed by Sam Weinig.
2443
2444         Fragment serialization should always use 'xml:' prefix for attributes in XML namespace:
2445         - https://html.spec.whatwg.org/#serialising-html-fragments
2446         """
2447         If the attribute is in the XML namespace
2448         -> The attribute's serialized name is the string "xml:" followed by the attribute's local name.
2449         """
2450
2451         - https://www.w3.org/TR/DOM-Parsing/#dfn-concept-xml-serialization-algorithm
2452         """
2453         If ns is the XML namespace, then let qualified name be the concatenation of the string "xml:"
2454         and the value of node's localName.
2455         """
2456
2457         Firefox complies with the specification.
2458
2459         No new tests, rebaselined existing test.
2460
2461         * editing/MarkupAccumulator.cpp:
2462         (WebCore::MarkupAccumulator::appendAttribute):
2463
2464 2016-09-30  Zalan Bujtas  <zalan@apple.com>
2465
2466         Unreviewed, rolling out r206611.
2467
2468         Scroll perf did not recover.
2469
2470         Reverted changeset:
2471
2472         "Unreviewed, rolling out r206483."
2473         https://bugs.webkit.org/show_bug.cgi?id=162750
2474         http://trac.webkit.org/changeset/206611
2475
2476 2016-09-30  Zalan Bujtas  <zalan@apple.com>
2477
2478         Remove ClipRects's custom refcounting.
2479         https://bugs.webkit.org/show_bug.cgi?id=162798
2480
2481         Reviewed by Simon Fraser.
2482
2483         It's safer to use RefCounted<>. 
2484
2485         No change in functionality.
2486
2487         * rendering/RenderLayer.cpp:
2488         (WebCore::ClipRects::ClipRects):
2489         (WebCore::ClipRectsCache::getClipRects):
2490         (WebCore::ClipRectsCache::setClipRects):
2491         (WebCore::ClipRectsCache::getIndex):
2492         (WebCore::RenderLayer::updateClipRects):
2493         (WebCore::ClipRects::ref): Deleted.
2494         (WebCore::ClipRects::deref): Deleted.
2495
2496 2016-09-30  Chris Dumez  <cdumez@apple.com>
2497
2498         FileSaver.js does not work in WebKit
2499         https://bugs.webkit.org/show_bug.cgi?id=162788
2500
2501         Reviewed by Sam Weinig.
2502
2503         FileSaver.js does not work in WebKit:
2504         - https://eligrey.com/demos/FileSaver.js/
2505
2506         It works in Firefox and Chrome, but in WebKit, we were getting a
2507         "Synthetic clicks on anchors that have a download attribute are
2508         ignored." warning. We were too strict in restricting synthetic clicks.
2509         We now allow synthetic clicks as long as they are triggered by a user
2510         gesture.
2511
2512         Test: fast/dom/HTMLAnchorElement/anchor-download-user-triggered-synthetic-click.html
2513
2514         * html/HTMLAnchorElement.cpp:
2515         (WebCore::HTMLAnchorElement::handleClick):
2516
2517 2016-09-30  Joseph Pecoraro  <pecoraro@apple.com>
2518
2519         Breakpoints on blank lines or comments don't break
2520         https://bugs.webkit.org/show_bug.cgi?id=9885
2521         <rdar://problem/6134406>
2522
2523         Reviewed by Mark Lam.
2524
2525         Tests: inspector/debugger/breakpoints/resolved-dump-all-pause-locations.html
2526                inspector/debugger/breakpoints/resolved-dump-each-line.html
2527
2528         * bindings/js/CachedScriptSourceProvider.h:
2529         (WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider):
2530
2531 2016-09-30  Joseph Pecoraro  <pecoraro@apple.com>
2532
2533         Web Inspector: Stepping out of a function finishes the line that called it.
2534         https://bugs.webkit.org/show_bug.cgi?id=155325
2535         <rdar://problem/25094578>
2536
2537         Reviewed by Mark Lam.
2538
2539         Tests: inspector/debugger/stepping/stepInto.html
2540                inspector/debugger/stepping/stepOut.html
2541                inspector/debugger/stepping/stepOver.html
2542                inspector/debugger/stepping/stepping-arrow-functions.html
2543                inspector/debugger/stepping/stepping-classes.html
2544                inspector/debugger/stepping/stepping-control-flow.html
2545                inspector/debugger/stepping/stepping-function-calls.html
2546                inspector/debugger/stepping/stepping-function-default-parameters.html
2547                inspector/debugger/stepping/stepping-literal-construction.html
2548                inspector/debugger/stepping/stepping-loops.html
2549                inspector/debugger/stepping/stepping-misc.html
2550                inspector/debugger/stepping/stepping-switch.html
2551                inspector/debugger/stepping/stepping-template-string.html
2552                inspector/debugger/stepping/stepping-try-catch-finally.html
2553
2554         * inspector/InspectorDOMDebuggerAgent.h:
2555         * inspector/InspectorDOMDebuggerAgent.cpp:
2556         (WebCore::InspectorDOMDebuggerAgent::stepInto): Deleted.
2557         Setting this state in step-into does not make sense since we do not
2558         know when the debugger resumes and won't know when to clear it.
2559
2560 2016-09-30  Alex Christensen  <achristensen@webkit.org>
2561
2562         Fix off-by-one error in URLParser::parseIPv4Host
2563         https://bugs.webkit.org/show_bug.cgi?id=162789
2564
2565         Reviewed by Tim Horton.
2566
2567         The spec says "If any but the last item in numbers is greater than 255, return failure."
2568         This means check up to size - 1, not size - 2.
2569
2570         Covered by a new API test.
2571
2572         * platform/URLParser.cpp:
2573         (WebCore::URLParser::parseIPv4Host):
2574
2575 2016-09-30  Alex Christensen  <achristensen@webkit.org>
2576
2577         URLParser: parsing a URL with an empty host and a colon should fail
2578         https://bugs.webkit.org/show_bug.cgi?id=162795
2579
2580         Reviewed by Tim Horton.
2581
2582         Covered by new API tests.
2583
2584         * platform/URLParser.cpp:
2585         (WebCore::URLParser::parseHostAndPort):
2586
2587 2016-09-30  Alex Christensen  <achristensen@webkit.org>
2588
2589         URLParser: handle syntax violations in non-UTF-8 encoded queries
2590         https://bugs.webkit.org/show_bug.cgi?id=162770
2591
2592         Reviewed by Tim Horton.
2593
2594         There is a fast path for queries of URLs that use UTF-8 encoding, which are quite common.
2595         For non-UTF-8 encoded queries, which are less common, we put the code points in a Vector<UChar>
2596         and encode them all at once.  If there is a syntax violation in the query, we need to copy the
2597         syntax-violation-free string up to the beginning of the query, then encode the query.
2598
2599         Covered by new API tests.
2600
2601         * platform/URLParser.cpp:
2602         (WebCore::URLParser::percentEncodeByte):
2603         (WebCore::URLParser::encodeQuery):
2604         (WebCore::URLParser::parse):
2605         * platform/URLParser.h:
2606
2607 2016-09-27  Anders Carlsson  <andersca@apple.com>
2608
2609         Remove a couple of unused members from PlatformKeyboardEvent
2610         https://bugs.webkit.org/show_bug.cgi?id=162641
2611
2612         Reviewed by Tim Horton.
2613
2614         * platform/PlatformKeyboardEvent.h:
2615         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2616         (WebCore::PlatformKeyboardEvent::nativeVirtualKeyCode): Deleted.
2617         (WebCore::PlatformKeyboardEvent::macCharCode): Deleted.
2618         * platform/mac/PlatformEventFactoryMac.mm:
2619         (WebCore::PlatformKeyboardEventBuilder::PlatformKeyboardEventBuilder):
2620         * replay/SerializationMethods.cpp:
2621         (JSC::EncodingTraits<PlatformKeyboardEvent>::encodeValue):
2622         (JSC::EncodingTraits<PlatformKeyboardEvent>::decodeValue):
2623
2624 2016-09-30  Antti Koivisto  <antti@apple.com>
2625
2626         Remove "rem" unit optimization for document element font size changes
2627         https://bugs.webkit.org/show_bug.cgi?id=162778
2628
2629         Reviewed by Alex Christensen.
2630
2631         We awkwardly track from the parser level if any stylesheet in a document uses any rem units. This is only used to minimally
2632         optimize a case where document element's (<html>) font size changes dynamically.
2633
2634         In practice such changes are rare. Browsing around I couldn't find a single case where this optimization got used.
2635         Even if it was used it would be of low value as a full style resolution is likely to happen anyway (as font inherits)
2636         and the only thing really saved is that we don't need to invalidate the matched properties cache.
2637
2638         * css/CSSGrammar.y.in:
2639         * css/StyleSheetContents.cpp:
2640         (WebCore::StyleSheetContents::StyleSheetContents):
2641         * css/StyleSheetContents.h:
2642         * dom/AuthorStyleSheets.cpp:
2643         (WebCore::AuthorStyleSheets::updateActiveStyleSheets):
2644         * dom/AuthorStyleSheets.h:
2645         (WebCore::AuthorStyleSheets::usesRemUnits): Deleted.
2646         (WebCore::AuthorStyleSheets::setUsesRemUnit): Deleted.
2647         * dom/Document.cpp:
2648         (WebCore::Document::recalcStyle):
2649         (WebCore::Document::updateBaseURL):
2650         * style/StyleTreeResolver.cpp:
2651         (WebCore::Style::TreeResolver::resolveElement):
2652
2653 2016-09-30  Zalan Bujtas  <zalan@apple.com>
2654
2655         RenderLayer::clipRects may return nullptr.
2656         https://bugs.webkit.org/show_bug.cgi?id=162729
2657
2658         Reviewed by Chris Dumez.
2659
2660         This patch refactors RenderLayer::updateClipRects(), parentClipRects() and backgroundClipRect()
2661         so that we don't have to rely on this seemingly unsafe line: clipRects = *parent()->clipRects(clipRectsContext);
2662         Now updateClipRects() returns the computed/cached clip rects as opposed to update and refetch them.
2663         While this patch makes the code look more readable/safer, it also eliminates cached item tripple retrievals.  
2664
2665         No change in functionality.
2666
2667         * rendering/RenderLayer.cpp:
2668         (WebCore::ClipRectsCache::getClipRects):
2669         (WebCore::ClipRectsCache::setClipRects):
2670         (WebCore::RenderLayer::updateClipRects):
2671         (WebCore::RenderLayer::clipRects):
2672         (WebCore::RenderLayer::calculateClipRects):
2673         * rendering/RenderLayer.h:
2674
2675 2016-09-30  Youenn Fablet  <youenn@apple.com>
2676
2677         Add a way to go from a RefPtr<T> to Ref<const T>
2678         https://bugs.webkit.org/show_bug.cgi?id=162683
2679
2680         Reviewed by Alex Christensen.
2681
2682         No change of behavior.
2683
2684         * Modules/fetch/FetchBody.cpp:
2685         (WebCore::FetchBody::extract):
2686
2687 2016-09-30  Said Abou-Hallawa  <sabouhallawa@apple.com>
2688
2689         Unreviewed, fix 32-bit build.
2690
2691         * loader/cache/CachedImage.cpp:
2692         (WebCore::CachedImage::decodedSizeChanged):
2693
2694 2016-09-30  Youenn Fablet  <youenn@apple.com>
2695
2696         FetchBody should use UTF8Encoding to encode text data
2697         https://bugs.webkit.org/show_bug.cgi?id=162775
2698
2699         Reviewed by Sam Weinig.
2700
2701         Covered by added tests.
2702
2703         Removing unnecesary vector allocation when extracting UTF8 bytes from a Request/Response text/URLSearchParams body.
2704         Making use of UTF8Encoding for consistency with  the upload code path.
2705
2706         * Modules/fetch/FetchBody.cpp:
2707         (WebCore::FetchBody::consumeAsStream):
2708         (WebCore::FetchBody::consumeText):
2709         (WebCore::extractBytesFromText): Deleted.
2710
2711 2016-09-30  Said Abou-Hallawa  <sabouhallawa@apple.com>
2712
2713         Change the MemoryCache and CachedResource adjustSize functions to take a long argument
2714         https://bugs.webkit.org/show_bug.cgi?id=162708
2715         <rdar://problem/28555702>
2716
2717         Reviewed by Brent Fulgham.
2718
2719         Because the MemoryCache stores the size of the cached memory in unsigned,
2720         two problems my happen when reporting a change in the size of the memory:
2721         
2722         1. Signed integer overflow -- which can happen because MemoryCache::adjustSize()
2723            takes a signed integer argument. If the allocated or the freed memory size is
2724            larger than the maximum of a signed integer, an overflow will happen.
2725            For the image caching code, this can be seen where the unsigned decodedSize
2726            is casted to an integer before passing it to ImageObserver::decodedSizeChanged().
2727
2728         2. Unsigned integer overflow -- which can happen if the new allocated memory
2729            size plus the currentSize exceeds the maximum of unsigned.
2730            This can be seen in MemoryCache::adjustSize() where we add delta to m_liveSize
2731            or m_deadSize without checking whether this addition will overflow or not. We
2732            do not assert for overflow although we assert for underflow.
2733            
2734         The fix for these two problems can be the following:
2735         
2736         1. Make all the adjustSize functions all the way till MemoryCache::adjustSize()
2737            take a signed long integer argument.
2738            
2739         2. Do not create a NativeImagePtr for an ImageFrame if its frameBytes plus the
2740            ImageFrameCache::decodedSize() will exceed the maximum of an unsigned integer.
2741
2742         * loader/cache/CachedImage.cpp:
2743         (WebCore::CachedImage::decodedSizeChanged): Change the argument to be long. No overflow will happen when casting the argument from unsigned to long.
2744         * loader/cache/CachedImage.h:
2745         * loader/cache/CachedResource.cpp: 
2746         (WebCore::CachedResource::setDecodedSize): Use long integer casting when calling MemoryCache::adjustSize().
2747         (WebCore::CachedResource::setEncodedSize): Ditto.
2748         * loader/cache/MemoryCache.cpp:
2749         (WebCore::MemoryCache::MemoryCache): Add as static assert to ensure sizeof(long long) can hold any unsigned or its negation.
2750         (WebCore::MemoryCache::revalidationSucceeded): Use long integer casting when calling MemoryCache::adjustSize().
2751         (WebCore::MemoryCache::remove): Ditto.
2752         (WebCore::MemoryCache::adjustSize): Change the function argument to long integer. No overflow will happen when casting the argument from unsigned to long.
2753         * loader/cache/MemoryCache.h:
2754         * platform/graphics/ImageFrameCache.cpp:
2755         (WebCore::ImageFrameCache::destroyIncompleteDecodedData): Call a function with its new name.
2756         (WebCore::ImageFrameCache::decodedSizeChanged): Change the function argument to long integer. No overflow will happen when casting the argument from unsigned to long.
2757         (WebCore::ImageFrameCache::decodedSizeIncreased): Use long integer casting when calling decodedSizeChanged().
2758         (WebCore::ImageFrameCache::decodedSizeDecreased): Ditto.
2759         (WebCore::ImageFrameCache::decodedSizeReset): Ditto.
2760         (WebCore::ImageFrameCache::didDecodeProperties): Ditto.
2761         (WebCore::ImageFrameCache::frameAtIndex): Do not create the NativeImage if adding its frameByes to the MemoryCache will cause numerical overflow.
2762         (WebCore::ImageFrameCache::decodedSizeIncremented): Deleted. This function is renamed decodedSizeIncreased().
2763         (WebCore::ImageFrameCache::decodedSizeDecremented): Deleted. This function is renamed decodedSizeDecreased().
2764         * platform/graphics/ImageFrameCache.h:
2765         * platform/graphics/ImageObserver.h:
2766         * platform/graphics/IntSize.h:
2767         (WebCore::IntSize::unclampedArea): Returns the area of an IntSize in size_t.
2768         * platform/graphics/cg/PDFDocumentImage.cpp:
2769         (WebCore::PDFDocumentImage::decodedSizeChanged): Use long integer casting when calling ImageObserver::decodedSizeChanged().
2770
2771 2016-09-30  Chris Dumez  <cdumez@apple.com>
2772
2773         Add support for ImageData.data attribute
2774         https://bugs.webkit.org/show_bug.cgi?id=162767
2775
2776         Reviewed by Sam Weinig.
2777
2778         Add support for ImageData.data attribute:
2779         - https://html.spec.whatwg.org/#imagedata
2780
2781         Firefox already supports it.
2782
2783         No new tests, updated existing tests.
2784
2785         * html/ImageData.idl:
2786
2787 2016-09-30  Youenn Fablet  <youenn@apple.com>
2788
2789         DumpRenderTree crashed in com.apple.WebCore: WTF::Optional<WebCore::FetchBodyOwner::BlobLoader>::operator bool const + 12
2790         https://bugs.webkit.org/show_bug.cgi?id=162483
2791
2792         Reviewed by Alex Christensen.
2793
2794         Test: fetch/closing-while-fetching-blob.html
2795         No change of behavior.
2796
2797         * Modules/fetch/FetchBodyOwner.cpp:
2798         (WebCore::FetchBodyOwner::stop): Asserting m_blobLoader is null (meaning that unsetPendingActivity was done)
2799         only in case FetchBodyOwner has no risk being destroyed.
2800
2801 2016-09-30  Youenn Fablet  <youennf@gmail.com>
2802
2803         [Fetch API] Add support for URLSearchParams body
2804         https://bugs.webkit.org/show_bug.cgi?id=162667
2805
2806         Reviewed by Alex Christensen.
2807
2808         Tests: imported/w3c/web-platform-tests/fetch/api/basic/request-upload-worker.html
2809                imported/w3c/web-platform-tests/fetch/api/basic/request-upload.html
2810
2811         * Modules/fetch/FetchBody.cpp:
2812         (WebCore::extractBytesFromText): Moving to a static function that should be moved to a String method.
2813         (WebCore::FetchBody::FetchBody): Adding constructor for URLSearchParams.
2814         (WebCore::FetchBody::extract): Adding URLSearchParams body initialization.
2815         (WebCore::FetchBody::consume): Consuming URLSearchParams bodies.
2816         (WebCore::FetchBody::consumeAsStream): Ditto.
2817         (WebCore::FetchBody::consumeText): Updated to take a parameter to handle both text and URLSearchParams bodies.
2818         (WebCore::FetchBody::bodyForInternalRequest): Add URLSearchParams body upload.
2819         (WebCore::FetchBody::clone): Add URLSearchParams body cloning
2820         * Modules/fetch/FetchBody.h:
2821         (WebCore::FetchBody::urlSearchParamsBody):
2822         * html/URLSearchParams.cpp:
2823         (WebCore::URLSearchParams::toString):
2824         * html/URLSearchParams.h:
2825
2826 2016-09-29  Simon Fraser  <simon.fraser@apple.com>
2827
2828         Re-order the arguments to drawPattern() functions
2829         https://bugs.webkit.org/show_bug.cgi?id=162772
2830
2831         Reviewed by Zalan Bujtas.
2832         
2833         Re-order the arguments to have the destination rect come near the front,
2834         leaving CompositeOperator and BlendMode hanging out at the back like
2835         other drawing functions.
2836
2837         No behavior change.
2838
2839         * platform/graphics/BitmapImage.cpp:
2840         (WebCore::BitmapImage::drawPattern):
2841         * platform/graphics/BitmapImage.h:
2842         * platform/graphics/CrossfadeGeneratedImage.cpp:
2843         (WebCore::CrossfadeGeneratedImage::drawPattern):
2844         * platform/graphics/CrossfadeGeneratedImage.h:
2845         * platform/graphics/GeneratedImage.h:
2846         * platform/graphics/GradientImage.cpp:
2847         (WebCore::GradientImage::drawPattern):
2848         * platform/graphics/GradientImage.h:
2849         * platform/graphics/GraphicsContext.h:
2850         * platform/graphics/Image.cpp:
2851         (WebCore::Image::drawTiled):
2852         * platform/graphics/Image.h:
2853         * platform/graphics/ImageBuffer.h:
2854         * platform/graphics/NamedImageGeneratedImage.cpp:
2855         (WebCore::NamedImageGeneratedImage::drawPattern):
2856         * platform/graphics/NamedImageGeneratedImage.h:
2857         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2858         (WebCore::GraphicsContext::drawPattern):
2859         * platform/graphics/cairo/ImageBufferCairo.cpp:
2860         (WebCore::ImageBuffer::drawPattern):
2861         * platform/graphics/cairo/ImageCairo.cpp:
2862         (WebCore::Image::drawPattern):
2863         * platform/graphics/cg/GraphicsContextCG.cpp:
2864         (WebCore::GraphicsContext::drawPattern):
2865         * platform/graphics/cg/ImageBufferCG.cpp:
2866         (WebCore::ImageBuffer::drawPattern):
2867         * platform/graphics/cg/ImageCG.cpp: This file can probably be removed and the code moved, since the
2868         code is almost the same as the cairo code, and not platform-specific.
2869         (WebCore::Image::drawPattern):
2870         * platform/graphics/displaylists/DisplayListItems.cpp:
2871         (WebCore::DisplayList::DrawPattern::DrawPattern):
2872         (WebCore::DisplayList::DrawPattern::apply):
2873         * platform/graphics/displaylists/DisplayListItems.h:
2874         (WebCore::DisplayList::DrawPattern::create):
2875         * platform/graphics/displaylists/DisplayListRecorder.cpp:
2876         (WebCore::DisplayList::Recorder::drawPattern):
2877         * platform/graphics/displaylists/DisplayListRecorder.h:
2878         * svg/graphics/SVGImage.cpp:
2879         (WebCore::SVGImage::drawPatternForContainer):
2880         * svg/graphics/SVGImageForContainer.cpp:
2881         (WebCore::SVGImageForContainer::drawPattern):
2882         * svg/graphics/SVGImageForContainer.h:
2883
2884 2016-09-29  Chris Dumez  <cdumez@apple.com>
2885
2886         Add support for download attribute on area elements
2887         https://bugs.webkit.org/show_bug.cgi?id=162765
2888
2889         Reviewed by Brent Fulgham.
2890
2891         Add support for download attribute on area elements:
2892         - https://html.spec.whatwg.org/#htmlanchorelement
2893
2894         Because HTMLAreaElement inherits from HTMLAnchorElement on native side,
2895         and because HTMLAnchorElement already supports the download attribute,
2896         all that was needed was to add the download attribute to
2897         HTMLAreaElement.idl file.
2898
2899         Test: http/tests/download/area-download.html
2900
2901         * html/HTMLAreaElement.idl:
2902
2903 2016-09-29  Ryosuke Niwa  <rniwa@webkit.org>
2904
2905         Editor::findStringAndScrollToVisible is unused
2906         https://bugs.webkit.org/show_bug.cgi?id=162762
2907
2908         Reviewed by Simon Fraser.
2909
2910         Deleted the unused function.
2911
2912         * editing/Editor.cpp:
2913         (WebCore::Editor::findStringAndScrollToVisible): Deleted.
2914         * editing/Editor.h:
2915
2916 2016-09-29  Jiewen Tan  <jiewen_tan@apple.com>
2917
2918         Expose CryptoKey to web workers
2919         https://bugs.webkit.org/show_bug.cgi?id=162640
2920         <rdar://problem/28182204>
2921
2922         Reviewed by Brent Fulgham.
2923
2924         Tests: crypto/workers/aes-postMessage-worker.html
2925                crypto/workers/hmac-postMessage-worker.html
2926                crypto/workers/hrsa-postMessage-worker.html
2927                crypto/workers/multiple-postMessage-worker.html
2928                crypto/workers/rsa-postMessage-worker.html
2929
2930         * crypto/CryptoKey.idl:
2931         * crypto/SerializedCryptoKeyWrap.h:
2932         * crypto/mac/SerializedCryptoKeyWrapMac.mm:
2933         (WebCore::deleteDefaultWebCryptoMasterKey):
2934         Add a way to delete the default web crypto master key such that we can test
2935         these APIs and cleanup.
2936         * workers/WorkerGlobalScope.cpp:
2937         (WebCore::WorkerGlobalScope::wrapCryptoKey):
2938         (WebCore::WorkerGlobalScope::unwrapCryptoKey):
2939         * workers/WorkerGlobalScope.h:
2940
2941 2016-09-29  Nan Wang  <n_wang@apple.com>
2942
2943         AX: iOS: Tapping <input> in Safari zooms in a bit when page has max scale = 1
2944         https://bugs.webkit.org/show_bug.cgi?id=162471
2945
2946         Reviewed by Simon Fraser.
2947
2948         If the author has defined a maximum scale, we should honor that when keyboard focus moves
2949         to a text field, instead of using the forceAlwaysUserScalableMaximumScale.
2950
2951         Tests: fast/forms/ios/user-scalable-does-not-scale-for-keyboard-focus-with-author-defined-scale.html
2952                fast/forms/ios/user-scalable-does-not-scale-for-keyboard-focus-with-user-scalable-no.html
2953                fast/forms/ios/user-scalable-scales-for-keyboard-focus-with-no-author-defined-scale.html
2954
2955         * page/ViewportConfiguration.cpp:
2956         (WebCore::ViewportConfiguration::allowsUserScaling):
2957         (WebCore::ViewportConfiguration::allowsUserScalingIgnoringAlwaysScalable):
2958         (WebCore::ViewportConfiguration::allowsUserScalingIgnoringForceAlwaysScaling): Deleted.
2959         * page/ViewportConfiguration.h:
2960         (WebCore::ViewportConfiguration::maximumScaleIgnoringAlwaysScalable):
2961         (WebCore::ViewportConfiguration::maximumScale): Deleted.
2962
2963 2016-09-29  Alex Christensen  <achristensen@webkit.org>
2964
2965         Fix syntax violation handling in IPv4 address parsing
2966         https://bugs.webkit.org/show_bug.cgi?id=162756
2967
2968         Reviewed by Tim Horton.
2969
2970         When we are parsing the up to 4 numbers in an IPv4 address, if we find a syntax violation 
2971         (the canonicalized address would be different than the input string) then wait to report
2972         it until we have determined that this is a valid IPv4 address that will be canonicalized.
2973         If it is not a valid IPv4 address, then we will just treat the characters as the host, and
2974         that could be no syntax violation.
2975
2976         Covered by a new API test and existing API tests.
2977
2978         * platform/URLParser.cpp:
2979         (WebCore::URLParser::URLParser):
2980         (WebCore::URLParser::parseIPv4Number):
2981         (WebCore::URLParser::parseIPv4Host):
2982         * platform/URLParser.h:
2983
2984 2016-09-29  Chris Dumez  <cdumez@apple.com>
2985
2986         Fix post-landing nits after r206561.
2987         https://bugs.webkit.org/show_bug.cgi?id=162659
2988
2989         Reviewed by Alex Christensen.
2990
2991         Uses more StringViews and constness.
2992
2993         * dom/SecurityContext.cpp:
2994         (WebCore::SecurityContext::isSupportedSandboxPolicy):
2995         * dom/SecurityContext.h:
2996         * html/DOMTokenList.cpp:
2997         (WebCore::DOMTokenList::DOMTokenList):
2998         (WebCore::DOMTokenList::supports):
2999         * html/DOMTokenList.h:
3000         (WebCore::DOMTokenList::DOMTokenList):
3001         * html/HTMLAnchorElement.cpp:
3002         (WebCore::HTMLAnchorElement::relList):
3003         * html/HTMLIFrameElement.cpp:
3004         (WebCore::HTMLIFrameElement::sandbox):
3005         * html/HTMLLinkElement.cpp:
3006         (WebCore::HTMLLinkElement::relList):
3007         * html/LinkRelAttribute.cpp:
3008         (WebCore::LinkRelAttribute::isSupported):
3009         * html/LinkRelAttribute.h:
3010
3011 2016-09-29  Alex Christensen  <achristensen@webkit.org>
3012
3013         URLParser should correctly parse ports with leading 0's
3014         https://bugs.webkit.org/show_bug.cgi?id=162752
3015
3016         * platform/URLParser.cpp:
3017         (WebCore::URLParser::parsePort):
3018         Followup.  Remove branches based on Geoffrey's feedback.
3019
3020 2016-09-29  Alex Christensen  <achristensen@webkit.org>
3021
3022         URLParser should correctly parse ports with leading 0's
3023         https://bugs.webkit.org/show_bug.cgi?id=162752
3024
3025         Reviewed by Tim Horton.
3026
3027         Covered by new API tests.
3028
3029         * platform/URLParser.cpp:
3030         (WebCore::URLParser::parsePort):
3031
3032 2016-09-29  Commit Queue  <commit-queue@webkit.org>
3033
3034         Unreviewed, rolling out r206483.
3035         https://bugs.webkit.org/show_bug.cgi?id=162750
3036
3037         May have caused iOS perf regression (Requested by smfr on
3038         #webkit).
3039
3040         Reverted changeset:
3041
3042         "REGRESSION (r204552): Yelp carousel animation is not smooth."
3043         https://bugs.webkit.org/show_bug.cgi?id=162632
3044         http://trac.webkit.org/changeset/206483
3045
3046 2016-09-29  Alex Christensen  <achristensen@webkit.org>
3047
3048         URLParser: make parsing invalid IPv4 addresses more robust and correct
3049         https://bugs.webkit.org/show_bug.cgi?id=162746
3050
3051         Reviewed by Tim Horton.
3052
3053         If parsing an IPv4 address fails, the characters are just treated as a regular domain.
3054
3055         Covered by new API tests.
3056
3057         * platform/URLParser.cpp:
3058         (WebCore::URLParser::parseIPv4Number):
3059         (WebCore::URLParser::parseIPv4Host):
3060
3061 2016-09-29  Alex Christensen  <achristensen@webkit.org>
3062
3063         URLParser: IPv6 addresses followed by a colon are invalid
3064         https://bugs.webkit.org/show_bug.cgi?id=162747
3065
3066         Reviewed by Tim Horton.
3067
3068         Covered by new API tests.
3069
3070         * platform/URLParser.cpp:
3071         (WebCore::URLParser::parseIPv6Host):
3072
3073 2016-09-29  Antoine Quint  <graouts@apple.com>
3074
3075         [Modern Media Controls] scheduler for layout nodes
3076         https://bugs.webkit.org/show_bug.cgi?id=162726
3077         <rdar://problem/28543043>
3078
3079         Reviewed by Dean Jackson.
3080
3081         For the work on the modern media controls we will be using a tree of LayoutNode objects that will
3082         commit to the DOM in coordinated `requestAnimationFrame()` calls to ensure all layouts are done
3083         in an efficient and coordinated manner. As a preamble, we introduce a `scheduler` singleton which
3084         provides a single public method `scheduleLayout(callback)` to queue callbacks to be fired in the
3085         next `requestAnimationFrame()` callback.
3086
3087         Tests: media/modern-media-controls/scheduler/not-reentrant.html
3088                media/modern-media-controls/scheduler/single-callback-when-registered-multiple-times.html
3089
3090         * Modules/modern-media-controls/controls/scheduler.js: Added.
3091         (const.scheduler.new.prototype.scheduleLayout):
3092         (const.scheduler.new.prototype._requestFrameIfNeeded):
3093         (const.scheduler.new.prototype._frameDidFire):
3094         (const.scheduler.new.prototype._layout):
3095
3096 2016-09-28  Ryosuke Niwa  <rniwa@webkit.org>
3097
3098         Text nodes assigned to a linked slot are not clickable
3099         https://bugs.webkit.org/show_bug.cgi?id=162091
3100         <rdar://problem/28383300>
3101
3102         Reviewed by Antti Koivisto.
3103
3104         The bug was caused by updateMouseEventTargetNode adjusting the target to its parent element when
3105         the original target was a text node. Fixed the bug by using the parent element in the composed tree.
3106
3107         Also fixed the bug that the hit testing was not finding the anchor element and keeping the cursor
3108         in I-beam by traversing the composed tree instead.
3109
3110         Test: fast/shadow-dom/click-text-inside-linked-slot.html
3111
3112         * dom/Node.cpp:
3113         (WebCore::Node::enclosingLinkEventParentOrSelf): Fixed the cursor problem.
3114         * page/EventHandler.cpp:
3115         (WebCore::EventHandler::updateMouseEventTargetNode): Fixed the activation problem.
3116
3117 2016-09-29  Sam Weinig  <sam@webkit.org>
3118
3119         Allow overriding some NSURLSessionConfiguration properties on a per-NetworkProcess basis
3120         <rdar://problem/27648683>
3121         https://bugs.webkit.org/show_bug.cgi?id=162735
3122
3123         Reviewed by Dan Bernstein.
3124
3125         * platform/spi/cf/CFNetworkSPI.h:
3126         Forward declare _sourceApplicationSecondaryIdentifier and _CTDataConnectionServiceType
3127
3128 2016-09-29  Antti Koivisto  <antti@apple.com>
3129
3130         Remove addSubresourceStyleURLs functions
3131         https://bugs.webkit.org/show_bug.cgi?id=162731
3132
3133         Reviewed by Ryosuke Niwa.
3134
3135         Use the generic std::function taking traverseSubresources instead. This prevents bugs caused by the code paths
3136         not being in sync.
3137
3138         These functions are only used by the legacy webarchive code to gather URLs to locate CachedResources from the memory cache.
3139         This can be improved further by returning the cached resources themselves instead of the URLs.
3140
3141         * css/CSSFontFaceSrcValue.cpp:
3142         (WebCore::CSSFontFaceSrcValue::addSubresourceStyleURLs): Deleted.
3143         * css/CSSFontFaceSrcValue.h:
3144         * css/CSSPrimitiveValue.cpp:
3145         (WebCore::CSSPrimitiveValue::addSubresourceStyleURLs): Deleted.
3146         * css/CSSPrimitiveValue.h:
3147         * css/CSSReflectValue.cpp:
3148         (WebCore::CSSReflectValue::addSubresourceStyleURLs): Deleted.
3149         * css/CSSReflectValue.h:
3150         * css/CSSValue.cpp:
3151         (WebCore::CSSValue::addSubresourceStyleURLs): Deleted.
3152         * css/CSSValue.h:
3153         * css/CSSValueList.cpp:
3154         (WebCore::CSSValueList::addSubresourceStyleURLs): Deleted.
3155         * css/CSSValueList.h:
3156         * css/StyleProperties.cpp:
3157         (WebCore::StyleProperties::addSubresourceStyleURLs): Deleted.
3158         * css/StyleProperties.h:
3159         * css/StyleRuleImport.h:
3160         * css/StyleSheetContents.cpp:
3161         (WebCore::StyleSheetContents::traverseSubresources):
3162
3163             Fix a bug where this would miss @import rules in @imported stylesheets.
3164             Include the CachedResource for the imported stylesheet itself.
3165
3166             Tested by the test cases under LayoutTests/webarchive
3167
3168         (WebCore::StyleSheetContents::addSubresourceStyleURLs): Deleted.
3169         * css/StyleSheetContents.h:
3170         * dom/StyledElement.cpp:
3171         (WebCore::StyledElement::addSubresourceAttributeURLs):
3172         * html/HTMLLinkElement.cpp:
3173         (WebCore::HTMLLinkElement::addSubresourceAttributeURLs):
3174         * html/HTMLStyleElement.cpp:
3175         (WebCore::HTMLStyleElement::addSubresourceAttributeURLs):
3176
3177 2016-09-29  Brent Fulgham  <bfulgham@apple.com>
3178
3179         [Win][Direct2D] Add D2D Font handling code
3180         https://bugs.webkit.org/show_bug.cgi?id=162712
3181
3182         Reviewed by Brent Fulgham.
3183
3184         This patch lands a set of new files that implement 
3185
3186         No new tests until complete backend lands.
3187
3188         * platform/graphics/Font.h:
3189         * platform/graphics/FontCascade.h:
3190         (WebCore::FontCascade::syntheticObliqueAngle): Added helper function.
3191         * platform/graphics/FontPlatformData.h:
3192         (WebCore::FontPlatformData::dwFont): Added.
3193         (WebCore::FontPlatformData::dwFontFace): Ditto.
3194         * platform/graphics/GlyphBuffer.h:
3195         * platform/graphics/cocoa/FontCascadeCocoa.mm:
3196         (WebCore::FontCascade::drawGlyphs): Use helper function.
3197         * platform/graphics/win/FontCGWin.cpp:
3198         (WebCore::FontCascade::drawGlyphs): Ditto.
3199         * platform/graphics/win/FontCacheWin.cpp:
3200         (WebCore::FontCache::createFontPlatformData): Add case for Direct2D.
3201         * platform/graphics/win/FontCascadeDirect2D.cpp: Added.
3202         * platform/graphics/win/FontCustomPlatformData.cpp:
3203         (WebCore::FontCustomPlatformData::~FontCustomPlatformData): Fix whitespace.
3204         (WebCore::FontCustomPlatformData::fontPlatformData): Add Direct2D case.
3205         * platform/graphics/win/FontPlatformDataCGWin.cpp:
3206         (WebCore::FontPlatformData::FontPlatformData): Clean up C++ initializers.
3207         * platform/graphics/win/FontPlatformDataCairoWin.cpp:
3208         (WebCore::FontPlatformData::FontPlatformData): Ditto.
3209         * platform/graphics/win/FontPlatformDataDirect2D.cpp: Added.
3210         * platform/graphics/win/FontPlatformDataWin.cpp:
3211         (WebCore::FontPlatformData::FontPlatformData): Clean up C++ initializers.
3212         * platform/graphics/win/GlyphPageTreeNodeDirect2D.cpp: Added.
3213         * platform/graphics/win/SimpleFontDataDirect2D.cpp: Added.
3214         * platform/graphics/win/TextAnalyzerHelper.cpp: Added.
3215         * platform/graphics/win/TextAnalyzerHelper.h: Added.
3216
3217 2016-09-29  Alex Christensen  <achristensen@webkit.org>
3218
3219         URLParser should fail to parse unclosed IPv6 addresses
3220         https://bugs.webkit.org/show_bug.cgi?id=162715
3221
3222         Reviewed by Tim Horton.
3223
3224         Covered by new API tests.
3225
3226         * platform/URLParser.cpp:
3227         (WebCore::URLParser::parseHostAndPort):
3228
3229 2016-09-29  Alex Christensen  <achristensen@webkit.org>
3230
3231         URLParser should ignore tabs at all possible locations
3232         https://bugs.webkit.org/show_bug.cgi?id=162711
3233
3234         Reviewed by Tim Horton.
3235
3236         The URL spec says to remove all tabs and newlines before parsing a URL.
3237         To reduce passes on the URL and copies of data, I chose to just ignore them every time I increment the iterator.
3238         This is fragile, but faster.  It can be completely tested, though.  That is what this patch does.
3239
3240         Covered by an addition to the API tests that tries inserting one tab at each location of each test.
3241
3242         * platform/URLParser.cpp:
3243         (WebCore::URLParser::advance):
3244         (WebCore::URLParser::isWindowsDriveLetter):
3245         (WebCore::URLParser::appendWindowsDriveLetter):
3246         (WebCore::URLParser::isPercentEncodedDot):
3247         (WebCore::URLParser::isSingleDotPathSegment):
3248         (WebCore::URLParser::isDoubleDotPathSegment):
3249         (WebCore::URLParser::consumeSingleDotPathSegment):
3250         (WebCore::URLParser::consumeDoubleDotPathSegment):
3251         (WebCore::URLParser::checkLocalhostCodePoint):
3252         (WebCore::URLParser::isAtLocalhost):
3253         (WebCore::URLParser::isLocalhost):
3254         (WebCore::URLParser::URLParser):
3255         (WebCore::URLParser::parse):
3256         (WebCore::isPercentEncodedDot): Deleted.
3257         (WebCore::isSingleDotPathSegment): Deleted.
3258         (WebCore::isDoubleDotPathSegment): Deleted.
3259         (WebCore::consumeSingleDotPathSegment): Deleted.
3260         (WebCore::consumeDoubleDotPathSegment): Deleted.
3261         * platform/URLParser.h:
3262         (WebCore::URLParser::advance):
3263
3264 2016-09-29  Simon Fraser  <simon.fraser@apple.com>
3265
3266         Fix hit testing on display:block <svg> elements
3267         https://bugs.webkit.org/show_bug.cgi?id=162717
3268         rdar://problem/23261130
3269
3270         Reviewed by Zalan Bujtas.
3271
3272         RenderSVGRoot::nodeAtPoint() needs to test for both the HitTestBlockBackground and
3273         HitTestChildBlockBackground phases, since we only get the HitTestChildBlockBackground
3274         phase when the <svg> is a block. This is similar to code in RenderTable::nodeAtPoint(),
3275         and matches Blink code.
3276         
3277         This fixes the point dragging on http://anthonydugois.com/svg-path-builder/.
3278
3279         Test: svg/hittest/block-svg.html
3280
3281         * rendering/svg/RenderSVGRoot.cpp:
3282         (WebCore::RenderSVGRoot::nodeAtPoint):
3283
3284 2016-09-29  Chris Dumez  <cdumez@apple.com>
3285
3286         Assigning non-numeric to input.minlength should set minlength to 0
3287         https://bugs.webkit.org/show_bug.cgi?id=162727
3288
3289         Reviewed by Ryosuke Niwa.
3290
3291         There was a typo when we were updating the m_minLength member from the 'min'
3292         content attribute instead of the 'minlength' one.
3293
3294         Test: imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/minlength.html.
3295
3296         * html/HTMLInputElement.cpp:
3297         (WebCore::HTMLInputElement::parseAttribute):
3298
3299 2016-09-29  Chris Dumez  <cdumez@apple.com>
3300
3301         [Web IDL] Fix overload resolution when the distinguishing argument is a Window
3302         https://bugs.webkit.org/show_bug.cgi?id=162728
3303
3304         Reviewed by Ryosuke Niwa.
3305
3306         Fix overload resolution when the distinguishing argument is a Window.
3307         Window is special because we could have a window or a proxy to the
3308         Window (JSDOMWindowShell).
3309
3310         * bindings/scripts/CodeGeneratorJS.pm:
3311         (GenerateOverloadedFunctionOrConstructor):
3312         * bindings/scripts/test/JS/JSTestObj.cpp:
3313         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9):
3314         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
3315         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11):
3316         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod12):
3317         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod13):
3318         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
3319         * bindings/scripts/test/TestObj.idl:
3320
3321 2016-09-29  Per Arne Vollan  <pvollan@apple.com>
3322
3323         [Win] Compile fix.
3324         https://bugs.webkit.org/show_bug.cgi?id=162262
3325
3326         Reviewed by Anders Carlsson.
3327
3328         If CoreText.h is included, we will get redefinition compile errors on some older SDK
3329         versions. 
3330
3331         * platform/spi/win/CoreTextSPIWin.h:
3332
3333 2016-09-29  Carlos Garcia Campos  <cgarcia@igalia.com>
3334
3335         [SOUP] Remove WebCoreSynchronousLoader from ResourceHandleSoup
3336         https://bugs.webkit.org/show_bug.cgi?id=162723
3337
3338         Reviewed by Sergio Villar Senin.
3339
3340         Since all soup based ports switched to NetworkProcess this is dead code.
3341
3342         * platform/network/soup/ResourceHandleSoup.cpp:
3343         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
3344
3345 2016-09-29  Nan Wang  <n_wang@apple.com>
3346
3347         AX: Meter: [Mac] Content in label element should be used as AXTitle or AXDescription
3348         https://bugs.webkit.org/show_bug.cgi?id=162586
3349
3350         Reviewed by Chris Fleizach.
3351
3352         Exposed the label element's text as AXDescription for meter elements.
3353         Also refactored the code for fetching the label element's text and taken care of 
3354         the case where aria-label and aria-labelledby attributes are used on label elements. 
3355
3356         Test: accessibility/mac/meter-with-label-element.html
3357
3358         * accessibility/AccessibilityNodeObject.cpp:
3359         (WebCore::AccessibilityNodeObject::isLabelable):
3360         (WebCore::AccessibilityNodeObject::textForLabelElement):
3361         (WebCore::AccessibilityNodeObject::titleElementText):
3362         (WebCore::AccessibilityNodeObject::title):
3363         (WebCore::AccessibilityNodeObject::usesAltTagForTextComputation): Deleted.
3364         * accessibility/AccessibilityNodeObject.h:
3365         * accessibility/AccessibilityRenderObject.cpp:
3366         (WebCore::AccessibilityRenderObject::exposesTitleUIElement):
3367
3368 2016-09-29  Romain Bellessort  <romain.bellessort@crf.canon.fr>
3369
3370         [Streams API] Improve ReadableStreamDefaultController.h/cpp
3371         https://bugs.webkit.org/show_bug.cgi?id=160293
3372
3373         Reviewed by Youenn Fablet.
3374
3375         Various small improvements in ReadableStreamDefaultController code (helper methods and asserts).
3376
3377         No change in behaviour.
3378
3379         * bindings/js/ReadableStreamDefaultController.cpp:
3380         (WebCore::ReadableStreamDefaultController::isControlledReadableStreamLocked): Added an assert and updated based 
3381         on new helper methods.
3382         * bindings/js/ReadableStreamDefaultController.h:
3383         (WebCore::ReadableStreamDefaultController::close): Updated based on new helper methods.
3384         (WebCore::ReadableStreamDefaultController::error): Updated based on new helper methods.
3385         (WebCore::ReadableStreamDefaultController::enqueue): Added an assert and updated based on new helper methods.
3386         (WebCore::ReadableStreamDefaultController::jsController): New helper method.
3387         (WebCore::ReadableStreamDefaultController::globalObject): Return reference instead of pointer.
3388         (WebCore::ReadableStreamDefaultController::globalExec): New helper; return reference after performing an assert.
3389         (WebCore::ReadableStreamDefaultController::error<String>): Added an assert and updated based on new helper methods.
3390
3391 2016-09-29  Jon Davis  <jond@apple.com>
3392
3393         Added Beacon API to the Feature Status page.
3394         https://bugs.webkit.org/show_bug.cgi?id=162630
3395
3396         Reviewed by Alex Christensen.
3397
3398         * features.json:
3399
3400 2016-09-28  Chris Dumez  <cdumez@apple.com>
3401
3402         Drop first 'state' parameter to JSDOMWindow::toWrapped() / JSEventTarget::toWrapped()
3403         https://bugs.webkit.org/show_bug.cgi?id=162709
3404
3405         Reviewed by Alex Christensen.
3406
3407         Drop first 'state' parameter to JSDOMWindow::toWrapped() / JSEventTarget::toWrapped()
3408         as it is unused. This is the quickest way to allow DOMWindow / EventTarget members
3409         in IDL dictionaries. This is because the generated bindings code relies on
3410         convertWrapperType() in JSDOMConvert.h which calls toWrapped() with a single
3411         parameter. Right now, the only type that requires an ExecState for its toWrapped()
3412         is XPathNSResolver (which should likely be a callback interface rather than a
3413         regular interface).
3414
3415         * bindings/js/JSDOMWindowCustom.cpp:
3416         (WebCore::JSDOMWindow::toWrapped):
3417         * bindings/js/JSDictionary.cpp:
3418         (WebCore::JSDictionary::convertValue):
3419         * bindings/js/JSEventTargetCustom.cpp:
3420         (WebCore::JSEventTarget::toWrapped):
3421         * bindings/js/JSMessageEventCustom.cpp:
3422         (WebCore::handleInitMessageEvent):
3423         * bindings/scripts/CodeGeneratorJS.pm:
3424         (GenerateHeader):
3425         (JSValueToNative):
3426
3427 2016-09-28  Chris Dumez  <cdumez@apple.com>
3428
3429         Log console messages when the anchor download attribute is ignored
3430         https://bugs.webkit.org/show_bug.cgi?id=162703
3431
3432         Reviewed by Alex Christensen.
3433
3434         Log console messages when the anchor download attribute is ignored so
3435         that the developer can better understand what's happening.
3436
3437         No&n