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