6f58a85cf9efa2dbe0fc60314252e32b868a2c31
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2016-08-05  Darin Adler  <darin@apple.com>
2
3         * DerivedSources.make: Fix all places that were using tabs instead of spaces outside
4         the actual make rules, where tabs are required as part of make syntax.
5
6 2016-08-05  Youenn Fablet  <youenn@apple.com>
7
8         [Fetch API] SubresourceLoader::checkRedirectionCrossOriginAccessControl should not always assert in SameOrigin mode
9         https://bugs.webkit.org/show_bug.cgi?id=160594
10
11         Reviewed by Alex Christensen.
12
13         Covered by rebased tests.
14
15         * loader/SubresourceLoader.cpp:
16         (WebCore::SubresourceLoader::checkRedirectionCrossOriginAccessControl):
17         It should not throw is mode is SameOrigin and resource is same origin.
18
19 2016-08-05  Youenn Fablet  <youenn@apple.com>
20
21         [Fetch API] Response.blob should not assert in case the created blob is empty
22         https://bugs.webkit.org/show_bug.cgi?id=160592
23
24         Reviewed by Alex Christensen.
25
26         Covered bu updated test.
27
28         * Modules/fetch/FetchBodyConsumer.cpp:
29         (WebCore::FetchBodyConsumer::takeAsBlob): Removing assertion as a response may have a body but with no data in it.
30
31 2016-08-05  Commit Queue  <commit-queue@webkit.org>
32
33         Unreviewed, rolling out r203935.
34         https://bugs.webkit.org/show_bug.cgi?id=160596
35
36         looks like a 1-2% PLUM regression on iPhone 6s (Requested by
37         kling_ on #webkit).
38
39         Reverted changeset:
40
41         "Window's named properties should be exposed on a
42         WindowProperties object in its prototype"
43         https://bugs.webkit.org/show_bug.cgi?id=160354
44         http://trac.webkit.org/changeset/203935
45
46 2016-08-05  Youenn Fablet  <youenn@apple.com>
47
48         [Fetch API] Activate CSP checks
49         https://bugs.webkit.org/show_bug.cgi?id=160445
50
51         Reviewed by Daniel Bates.
52
53         Tests: http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-insecure-fetch-in-main-frame.html
54                http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-insecure-fetch-in-worker.html
55
56         * Modules/fetch/FetchLoader.cpp:
57         (WebCore::FetchLoader::start): Adding CSP and URL upgrade checks.
58
59 2016-08-05  Youenn Fablet  <youenn@apple.com>
60
61         DocumentThreadableLoader should report an error when getting a null CachedResource
62         https://bugs.webkit.org/show_bug.cgi?id=160444
63
64         Reviewed by Alex Christensen.
65
66         Covered by existing and rebased tests.
67
68         * loader/DocumentThreadableLoader.cpp:
69         (WebCore::DocumentThreadableLoader::loadRequest): Calling didFail with an AccessControl error if unable to have a CachedResource.
70         The resource error type AccessControl is important as it indicates to some clients that they should not retry loading the same resource (EventSource notably).
71         * xml/XMLHttpRequest.cpp:
72         (WebCore::XMLHttpRequest::createRequest): Removed handling of ThreadableLoader::create returning null.
73         This should be handled in didFail callback. This allows aligning behavior of
74         WorkerThreadableLoaderi::MainThreadBridge and XMLHttpRequest as ThreadableLoader clients.
75         (WebCore::XMLHttpRequest::didFail): Handle the case of didFail being called synchronously from ThreadableLoader::create.
76         In that case, use a timer to dispatch network events asynchronously.
77
78 2016-08-04  Chris Dumez  <cdumez@apple.com>
79
80         Add support for DOMTokenList.replace()
81         https://bugs.webkit.org/show_bug.cgi?id=160573
82
83         Reviewed by Alex Christensen.
84
85         Add support for DOMTokenList.replace():
86         https://dom.spec.whatwg.org/#dom-domtokenlist-replace
87
88         No new tests, rebaselined existing tests.
89
90         * html/DOMTokenList.cpp:
91         (WebCore::tokenContainsHTMLSpace):
92         (WebCore::DOMTokenList::validateToken):
93         (WebCore::DOMTokenList::replace):
94         * html/DOMTokenList.h:
95         * html/DOMTokenList.idl:
96
97 2016-08-04  Myles C. Maxfield  <mmaxfield@apple.com>
98
99         [iOS] Some videos in iBooks erroneously go fullscreen
100         https://bugs.webkit.org/show_bug.cgi?id=160582
101         <rdar://problem/27669831>
102
103         Reviewed by Jon Lee.
104
105         No new tests because we can't currently mock the iBooks application bundle ID.
106
107         * html/MediaElementSession.cpp:
108         (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback):
109
110 2016-08-04  Michael Catanzaro  <mcatanzaro@igalia.com>
111
112         [Fontconfig] Segmentation fault in WebCore::FontCache::lastResortFallbackFont
113         https://bugs.webkit.org/show_bug.cgi?id=141432
114
115         Reviewed by Myles C. Maxfield.
116
117         Crash more cleanly when we can't find any last resort fallback font.
118
119         * platform/graphics/freetype/FontCacheFreeType.cpp:
120         (WebCore::FontCache::lastResortFallbackFont):
121
122 2016-08-04  Chris Dumez  <cdumez@apple.com>
123
124         Move insertAdjacent*() API from HTMLElement to Element
125         https://bugs.webkit.org/show_bug.cgi?id=160567
126
127         Reviewed by Sam Weinig.
128
129         Move insertAdjacent*() API from HTMLElement to Element:
130         - https://w3c.github.io/DOM-Parsing/#extensions-to-the-element-interface
131         - https://dom.spec.whatwg.org/#element
132
133         Firefox and Chrome both have insertAdjacentHTML() on Element.
134         Chrome has insertAdjacentText() / insertAdjacentElement() on Element as
135         well. Firefox does not have this API at all.
136
137         Also align insertAdjacentHTML() with the specification so that we
138         now throw a NO_MODIFICATION_ALLOWED_ERR if called with "beforebegin" /
139         "afterend" on a parent-less element. This is as per:
140         - https://w3c.github.io/DOM-Parsing/#dom-element-insertadjacenthtml
141
142         Previously, WebKit would just silently ignore such calls. The new
143         behavior with consistent with both Firefox and Chrome.
144
145         No new tests, rebaselined existing tests.
146
147         * dom/Element.cpp:
148         (WebCore::Element::insertAdjacent):
149         (WebCore::Element::insertAdjacentElement):
150         (WebCore::contextElementForInsertion):
151         (WebCore::Element::insertAdjacentHTML):
152         (WebCore::Element::insertAdjacentText):
153         * dom/Element.h:
154         * dom/Element.idl:
155         * html/HTMLElement.cpp:
156         (WebCore::HTMLElement::insertAdjacent): Deleted.
157         (WebCore::HTMLElement::insertAdjacentElement): Deleted.
158         (WebCore::contextElementForInsertion): Deleted.
159         (WebCore::HTMLElement::insertAdjacentHTML): Deleted.
160         (WebCore::HTMLElement::insertAdjacentText): Deleted.
161         * html/HTMLElement.h:
162         * html/HTMLElement.idl:
163
164 2016-08-04  Anders Carlsson  <andersca@apple.com>
165
166         Another build fix attempt.
167
168         * bindings/gobject/WebKitDOMDeprecated.cpp:
169
170 2016-08-04  George Ruan  <gruan@apple.com>
171
172         Add long, boolean, double, and String Media Constraint classes
173         https://bugs.webkit.org/show_bug.cgi?id=160524
174         <rdar://problem/27685132>
175
176         Reviewed by Eric Carlson.
177
178         No new tests. The current patch is untestable, but functionality
179         will be tested in a future patch.
180
181         * WebCore.xcodeproj/project.pbxproj:
182         * platform/mediastream/MediaConstraints.cpp: Added.
183         (WebCore::BaseConstraint::create): Initializes min, max, exact, ideal
184         value of constraint with dictionary.
185         (WebCore::BaseConstraint::createEmptyDerivedConstraint): Factory 
186         for all derived constraints.
187         (WebCore::LongConstraint::create): Creates LongConstraint with name.
188         (WebCore::LongConstraint::setMin): Sets mandatory min constraint value.
189         (WebCore::LongConstraint::setMax): Sets mandatory max constraint value.
190         (WebCore::LongConstraint::setExact): Sets mandatory exact constraint
191         value.
192         (WebCore::LongConstraint::setIdeal): Sets optional ideal constraint
193         value.
194         (WebCore::LongConstraint::initializeWithDictionary): Parses user input
195         and sets min, max, exact, ideal values.
196         (WebCore::DoubleConstraint::create): Ditto.
197         (WebCore::DoubleConstraint::setMin): Ditto.
198         (WebCore::DoubleConstraint::setMax): Ditto.
199         (WebCore::DoubleConstraint::setExact): Ditto.
200         (WebCore::DoubleConstraint::setIdeal): Ditto.
201         (WebCore::DoubleConstraint::initializeWithDictionary): Ditto.
202         (WebCore::BooleanConstraint::create): Ditto.
203         (WebCore::BooleanConstraint::setExact): Ditto.
204         (WebCore::BooleanConstraint::setIdeal): Ditto.
205         (WebCore::BooleanConstraint::initializeWithDictionary): Ditto.
206         (WebCore::StringConstraint::create): Ditto.
207         (WebCore::StringConstraint::setExact): Ditto.
208         (WebCore::StringConstraint::setIdeal): Ditto.
209         (WebCore::StringConstraint::initializeWithDictionary): Ditto.
210         * platform/mediastream/MediaConstraints.h: Add abstract classes
211         BaseConstraint and NumericConstraint, and final classes
212         DoubleConstraint, LongConstraint, BooleanConstraint, and
213         StringConstraint.
214         (WebCore::BaseConstraint::~BaseConstraint):
215         (WebCore::BaseConstraint::name): Name of constraint associated with.
216         (WebCore::BaseConstraint::BaseConstraint):
217         (WebCore::NumericConstraint::setHasMin): Sets min constraint value.
218         (WebCore::NumericConstraint::setHasMax): Sets max constraint value.
219         (WebCore::NumericConstraint::setHasExact): Sets exact constraint
220         value.
221         (WebCore::NumericConstraint::setHasIdeal): Sets ideal constraint
222         value.
223         (WebCore::NumericConstraint::hasMin): Determines whether constraint
224         has a minimum value.
225         (WebCore::NumericConstraint::hasMax): Determines whether constraint
226         has a maximum value.
227         (WebCore::NumericConstraint::hasExact): Determines whether constraint
228         has an exact value.
229         (WebCore::NumericConstraint::NumericConstraint):
230
231 2016-08-04  Anders Carlsson  <andersca@apple.com>
232
233         Try to fix the GTK+ build.
234
235         * bindings/gobject/WebKitDOMDeprecated.cpp:
236         (webkit_dom_document_get_elements_by_tag_name):
237         (webkit_dom_document_get_elements_by_tag_name_ns):
238         (webkit_dom_document_get_elements_by_class_name):
239         (webkit_dom_element_get_elements_by_tag_name):
240         (webkit_dom_element_get_elements_by_tag_name_ns):
241         (webkit_dom_element_get_elements_by_class_name):
242
243 2016-08-04  Chris Dumez  <cdumez@apple.com>
244
245         Add support for wrapper types in dictionaries
246         https://bugs.webkit.org/show_bug.cgi?id=160487
247
248         Reviewed by Sam Weinig.
249
250         Add support for nullable wrapper types in dictionaries.
251         A TypeError is thrown if the conversion fails.
252
253         No new tests, updated bindings tests.
254
255         * bindings/js/JSDOMConvert.h:
256         (WebCore::convertWrapperType):
257         * bindings/scripts/CodeGeneratorJS.pm:
258         (GenerateDictionaryImplementationContent):
259         * bindings/scripts/IDLParser.pm:
260         (parseDictionaryMember):
261         * bindings/scripts/test/JS/JSTestObj.cpp:
262         (WebCore::convert<TestObj::Dictionary>):
263         * bindings/scripts/test/TestObj.idl:
264
265 2016-08-04  Csaba Osztrogonác  <ossy@webkit.org>
266
267         [Mac][cmake] Fix the build after Objective-C bindings generator removal
268         https://bugs.webkit.org/show_bug.cgi?id=160545
269
270         Reviewed by Alex Christensen.
271
272         * CMakeLists.txt:
273         * PlatformMac.cmake:
274
275 2016-08-04  Ryan Haddad  <ryanhaddad@apple.com>
276
277         Attempt to fix Windows build after r204134.
278
279         Unreviewed build fix.
280
281         * dom/DOMAllInOne.cpp:
282
283 2016-08-04  Anders Carlsson  <andersca@apple.com>
284
285         Remove more Objective-C specific bindings code
286         https://bugs.webkit.org/show_bug.cgi?id=160564
287
288         Reviewed by Sam Weinig.
289
290         * CMakeLists.txt:
291         * DerivedSources.make:
292         * WebCore.xcodeproj/project.pbxproj:
293         * bindings/js/JSNodeCustom.cpp:
294         * bindings/objc/DOMDocument.mm:
295         * bindings/objc/DOMEntity.mm:
296         (-[DOMEntity publicId]):
297         (-[DOMEntity systemId]):
298         (-[DOMEntity notationName]):
299         * bindings/objc/DOMEntityReference.mm:
300         (kit): Deleted.
301         * bindings/objc/DOMEntityReferenceInternal.h: Removed.
302         * bindings/objc/DOMNodeIterator.mm:
303         (-[DOMNodeIterator expandEntityReferences]):
304         * bindings/objc/DOMTreeWalker.mm:
305         (-[DOMTreeWalker expandEntityReferences]):
306         * dom/Document.idl:
307         * dom/Entity.h: Removed.
308         (WebCore::Entity::publicId): Deleted.
309         (WebCore::Entity::systemId): Deleted.
310         (WebCore::Entity::notationName): Deleted.
311         (WebCore::Entity::Entity): Deleted.
312         * dom/Entity.idl: Removed.
313         * dom/EntityReference.cpp: Removed.
314         (WebCore::EntityReference::EntityReference): Deleted.
315         * dom/EntityReference.h: Removed.
316         * dom/EntityReference.idl: Removed.
317         * dom/NodeIterator.idl:
318         * dom/Traversal.h:
319         (WebCore::NodeIteratorBase::expandEntityReferences): Deleted.
320         * dom/TreeWalker.idl:
321
322 2016-08-04  Chris Dumez  <cdumez@apple.com>
323
324         Simplify overloads for HTMLSelectElement.add() / HTMLOptionsCollection.add()
325         https://bugs.webkit.org/show_bug.cgi?id=160527
326
327         Reviewed by Ryosuke Niwa.
328
329         Simplify overloads for HTMLSelectElement.add() / HTMLOptionsCollection.add().
330         We now have 2 overloads instead of 3 while achieving the same web-facing
331         behavior.
332
333         * html/HTMLOptionsCollection.h:
334         * html/HTMLOptionsCollection.idl:
335         * html/HTMLSelectElement.h:
336         (WebCore::HTMLSelectElement::add): Deleted.
337         * html/HTMLSelectElement.idl:
338
339 2016-08-04  Anders Carlsson  <andersca@apple.com>
340
341         Move Objective-C bindings specific code into the bindings
342         https://bugs.webkit.org/show_bug.cgi?id=160561
343
344         Reviewed by Tim Horton.
345
346         * bindings/objc/DOMDocument.mm:
347         (-[DOMDocument createEntityReference:]):
348         (-[DOMDocument getElementsByTagName:]):
349         (-[DOMDocument getElementsByTagNameNS:localName:]):
350         (-[DOMDocument getElementsByClassName:]):
351         * bindings/objc/DOMElement.mm:
352         (-[DOMElement getElementsByTagName:]):
353         (-[DOMElement getElementsByTagNameNS:localName:]):
354         (-[DOMElement getElementsByClassName:]):
355         * css/CSSCharsetRule.idl:
356         * dom/ContainerNode.cpp:
357         (WebCore::ContainerNode::getElementsByTagNameForObjC): Deleted.
358         (WebCore::ContainerNode::getElementsByTagNameNSForObjC): Deleted.
359         (WebCore::ContainerNode::getElementsByClassNameForObjC): Deleted.
360         * dom/ContainerNode.h:
361         * dom/Document.cpp:
362         (WebCore::Document::createEntityReference): Deleted.
363         * dom/Document.h:
364         * dom/Document.idl:
365         * dom/Element.idl:
366
367 2016-08-04  Anders Carlsson  <andersca@apple.com>
368
369         Clean up the deprecated Objective-C binding methods
370         https://bugs.webkit.org/show_bug.cgi?id=160558
371
372         Reviewed by Tim Horton.
373
374         Put the deprecated methods in their respective category @implementation, and
375         simply have them call their non-deprecated counterparts.
376
377         * bindings/objc/DOMCSSMediaRule.mm:
378         (-[DOMCSSMediaRule deleteRule:]):
379         (-[DOMCSSMediaRule insertRule::]):
380         * bindings/objc/DOMCSSPrimitiveValue.mm:
381         (-[DOMCSSPrimitiveValue setFloatValue::]):
382         (-[DOMCSSPrimitiveValue setStringValue::]):
383         * bindings/objc/DOMCSSStyleDeclaration.mm:
384         (-[DOMCSSStyleDeclaration setProperty:::]):
385         * bindings/objc/DOMCSSStyleSheet.mm:
386         (-[DOMCSSStyleSheet insertRule::]):
387         * bindings/objc/DOMCharacterData.mm:
388         (-[DOMCharacterData deleteData:length:]):
389         (-[DOMCharacterData replaceData:length:data:]):
390         (-[DOMCharacterData remove]):
391         (-[DOMCharacterData substringData::]):
392         (-[DOMCharacterData insertData::]):
393         (-[DOMCharacterData deleteData::]):
394         (-[DOMCharacterData replaceData:::]):
395         * bindings/objc/DOMDocument.mm:
396         (-[DOMDocument createProcessingInstruction::]):
397         (-[DOMDocument importNode::]):
398         (-[DOMDocument createElementNS::]):
399         (-[DOMDocument createAttributeNS::]):
400         (-[DOMDocument getElementsByTagNameNS::]):
401         (-[DOMDocument createNodeIterator::::]):
402         (-[DOMDocument createTreeWalker::::]):
403         (-[DOMDocument getOverrideStyle::]):
404         (-[DOMDocument createExpression::]):
405         (-[DOMDocument evaluate:::::]):
406         (-[DOMDocument getComputedStyle::]):
407         * bindings/objc/DOMElement.mm:
408         (-[DOMElement setAttribute::]):
409         (-[DOMElement getAttributeNS::]):
410         (-[DOMElement setAttributeNS:::]):
411         (-[DOMElement removeAttributeNS::]):
412         (-[DOMElement getElementsByTagNameNS::]):
413         (-[DOMElement getAttributeNodeNS::]):
414         (-[DOMElement hasAttributeNS::]):
415         * bindings/objc/DOMEvent.mm:
416         (-[DOMEvent stopImmediatePropagation]):
417         (-[DOMEvent initEvent:::]):
418         * bindings/objc/DOMHTMLSelectElement.mm:
419         (-[DOMHTMLSelectElement remove:]):
420         (-[DOMHTMLSelectElement add::]):
421         * bindings/objc/DOMMouseEvent.mm:
422         (-[DOMMouseEvent initMouseEvent:::::::::::::::]):
423         * bindings/objc/DOMMutationEvent.mm:
424         (-[DOMMutationEvent initMutationEvent::::::::]):
425         * bindings/objc/DOMNamedNodeMap.mm:
426         (-[DOMNamedNodeMap getNamedItemNS::]):
427         (-[DOMNamedNodeMap removeNamedItemNS::]):
428         * bindings/objc/DOMNode.mm:
429         (-[DOMNode insertBefore::]):
430         (-[DOMNode replaceChild::]):
431         (-[DOMNode isSupported::]):
432         * bindings/objc/DOMRange.mm:
433         (-[DOMRange setStart::]):
434         (-[DOMRange setEnd::]):
435         (-[DOMRange compareBoundaryPoints::]):
436         * bindings/objc/DOMUIEvent.mm:
437         (-[DOMUIEvent initUIEvent:::::]):
438         * bindings/objc/DOMXPathExpression.mm:
439         (-[DOMXPathExpression evaluate:::]):
440
441 2016-08-04  Jeremy Jones  <jeremyj@apple.com>
442
443         Temporary redirected m3u8 streaming stopped working.
444         https://bugs.webkit.org/show_bug.cgi?id=160472
445         rdar://problem/27592694
446
447         Reviewed by Alex Christensen.
448
449         Test: http/tests/media/hls/hls-redirect.html
450
451         The change for https://trac.webkit.org/changeset/202466 hides knowledge of the temporary redirected URL from 
452         WebCoreNSURLSession clients. MPEG playlists (e.g. .m3u8) can contain paths relative to the redirected URL.
453
454         This change exposes the redirected URL for MPEG playlists.
455
456         * platform/MIMETypeRegistry.cpp:
457         (WebCore::initializeMPEGPlaylistMIMETypes): Added.
458         (WebCore::initializeMIMETypeRegistry):
459         (WebCore::MIMETypeRegistry::isMPEGPlaylistMIMEType): Added.
460         * platform/MIMETypeRegistry.h:
461         * platform/network/cocoa/WebCoreNSURLSession.mm:
462         (-[WebCoreNSURLSessionDataTask resource:receivedResponse:]): Add MPEG playlist condition.
463         (-[WebCoreNSURLSessionDataTask resource:receivedRedirect:request:]): Add MPEG playlist condition.
464
465 2016-08-04  Alex Christensen  <achristensen@webkit.org>
466
467         Content Blocker cannot block WebSocket connections
468         https://bugs.webkit.org/show_bug.cgi?id=160159
469
470         Reviewed by Brady Eidson.
471
472         Tests: http/tests/websocket/tests/hybi/contentextensions/block-cookies-worker.php
473                http/tests/websocket/tests/hybi/contentextensions/block-cookies.php
474                http/tests/websocket/tests/hybi/contentextensions/block-worker.html
475                http/tests/websocket/tests/hybi/contentextensions/block.html
476                http/tests/websocket/tests/hybi/contentextensions/display-none-worker.html
477                http/tests/websocket/tests/hybi/contentextensions/display-none.html
478                http/tests/websocket/tests/hybi/contentextensions/upgrade-worker.html
479                http/tests/websocket/tests/hybi/contentextensions/upgrade.html
480
481         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
482         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError):
483         (WebCore::ThreadableWebSocketChannelClientWrapper::didUpgradeURL):
484         (WebCore::ThreadableWebSocketChannelClientWrapper::suspend):
485         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
486         * Modules/websockets/WebSocket.cpp:
487         (WebCore::WebSocket::didClose):
488         (WebCore::WebSocket::didUpgradeURL):
489         (WebCore::WebSocket::getFramingOverhead):
490         * Modules/websockets/WebSocket.h:
491         
492         Added didUpgradeURL to WebSocketChannelClient so the WebSocketChannel can tell the WebSocket
493         that it has upgraded a ws: url to a wss: url.
494         
495         * Modules/websockets/WebSocketChannel.cpp:
496         (WebCore::WebSocketChannel::~WebSocketChannel):
497         (WebCore::WebSocketChannel::connect):
498         
499         If content extensions are being used, run the URL through the content extension and apply its actions
500         before connecting the WebSocket.  This is done in WebSocketChannel instead of WebSocket like the CSP checks
501         because we need access to the Document in order to get access to the main document's URL for if-domain and
502         unless-domain rules, and to apply any display:none css to the Document.
503         
504         (WebCore::WebSocketChannel::disconnect):
505         * Modules/websockets/WebSocketChannelClient.h:
506         (WebCore::WebSocketChannelClient::~WebSocketChannelClient):
507         (WebCore::WebSocketChannelClient::WebSocketChannelClient):
508         (WebCore::WebSocketChannelClient::didConnect):
509         (WebCore::WebSocketChannelClient::didReceiveMessage):
510         (WebCore::WebSocketChannelClient::didReceiveBinaryData):
511         (WebCore::WebSocketChannelClient::didReceiveMessageError):
512         (WebCore::WebSocketChannelClient::didUpdateBufferedAmount):
513         (WebCore::WebSocketChannelClient::didStartClosingHandshake):
514         (WebCore::WebSocketChannelClient::didClose):
515         
516         Made WebSocketChannelClient purely virtual to avoid accidentally making an implementation that is missing functionality.
517         
518         (WebCore::WebSocketChannelClient::didUpgradeURL): Added.
519         * Modules/websockets/WebSocketHandshake.cpp:
520         (WebCore::WebSocketHandshake::getExpectedWebSocketAccept):
521         (WebCore::WebSocketHandshake::WebSocketHandshake):
522         (WebCore::WebSocketHandshake::clientOrigin):
523         (WebCore::WebSocketHandshake::clientLocation):
524         (WebCore::WebSocketHandshake::clientHandshakeMessage):
525         
526         Only put cookies on the WebSocket's handshake if we are allowed to use cookies.
527         
528         (WebCore::WebSocketHandshake::clientHandshakeRequest):
529         
530         A WebSocketHandshake always has a Document* for its ScriptExecutionContext, so I replaced m_context with 
531         m_document and removed a suspicious-looking check for is<Document> that turned out to not be suspicious at all.
532         
533         (WebCore::WebSocketHandshake::reset):
534         (WebCore::WebSocketHandshake::clearDocument):
535         (WebCore::WebSocketHandshake::readServerHandshake):
536         (WebCore::WebSocketHandshake::clearScriptExecutionContext): Deleted.
537         * Modules/websockets/WebSocketHandshake.h:
538         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
539         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError):
540         (WebCore::WorkerThreadableWebSocketChannel::Peer::didUpgradeURL):
541         (WebCore::WorkerThreadableWebSocketChannel::Bridge::Bridge):
542         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
543         * contentextensions/ContentExtensionActions.h:
544         
545         Before this change we would pass a ResourceRequest as a parameter to the content extension engine.
546         The ResourceRequest would be used to get the URL, and it would be modified by possibly disabling cookies
547         or making the URL https.  Any display:none CSS rules added were put into the Document through the DocumentLoader.
548         The only information it needed to return was whether the load was blocked.
549         To make content extensions work with WebSockets, we need to pass a URL as a parameter instead of a ResourceRequest
550         because there is no ResourceRequest with WebSockets, only a URL.  We can still put CSS rules in through the DocumentLoader,
551         but the rest of the actions need to be returned through the return value, which is then processed by the callers.
552         BlockedStatus is now a struct containing a set of actions to apply, and applyBlockedStatusToRequest is a helper function
553         that applies the actions to the ResourceRequests we have at all previously existing call sites of processContentExtensionRulesForLoad.
554         
555         * contentextensions/ContentExtensionsBackend.cpp:
556         (WebCore::ContentExtensions::ContentExtensionsBackend::globalDisplayNoneStyleSheet):
557         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
558         (WebCore::ContentExtensions::ContentExtensionsBackend::displayNoneCSSRule):
559         (WebCore::ContentExtensions::applyBlockedStatusToRequest):
560         * contentextensions/ContentExtensionsBackend.h:
561         * html/HTMLMediaElement.cpp:
562         (WebCore::HTMLMediaElement::loadResource):
563         
564         Here, we also only had a URL.  Before, we were making a ResourceRequest from the URL just for the content extension engine,
565         but now we can just pass the URL.
566         
567         * loader/FrameLoader.cpp:
568         (WebCore::FrameLoader::loadResourceSynchronously):
569         * loader/PingLoader.cpp:
570         (WebCore::processContentExtensionRulesForLoad):
571         (WebCore::PingLoader::loadImage):
572         (WebCore::PingLoader::sendPing):
573         (WebCore::PingLoader::sendViolationReport):
574         * loader/ResourceLoader.cpp:
575         (WebCore::ResourceLoader::willSendRequestInternal):
576         * loader/cache/CachedResourceLoader.cpp:
577         (WebCore::CachedResourceLoader::requestResource):
578         * page/UserContentProvider.cpp:
579         (WebCore::contentExtensionsEnabled):
580         (WebCore::UserContentProvider::processContentExtensionRulesForLoad):
581         (WebCore::UserContentProvider::actionsForResourceLoad):
582         * page/UserContentProvider.h:
583
584 2016-08-04  Chris Dumez  <cdumez@apple.com>
585
586         [[Prototype]] property of an interface object for a callback interface must be the Object.prototype object
587         https://bugs.webkit.org/show_bug.cgi?id=160555
588
589         Reviewed by Geoffrey Garen.
590
591         [[Prototype]] property of an interface object for a callback interface
592         must be the Object.prototype object:
593         - http://heycam.github.io/webidl/#interface-object
594
595         This impacts NodeFilter, which is a callback interface.
596
597         No new tests, rebaselined existing test.
598
599         * bindings/scripts/CodeGeneratorJS.pm:
600         (GenerateConstructorHelperMethods):
601
602 2016-08-04  Chris Dumez  <cdumez@apple.com>
603
604         Element.insertAdjacent*() should throw a SYNTAX_ERR for invalid "where" parameter
605         https://bugs.webkit.org/show_bug.cgi?id=160514
606
607         Reviewed by Alex Christensen.
608
609         Element.insertAdjacent*() should throw a SYNTAX_ERR for invalid "where" parameter:
610         - https://dom.spec.whatwg.org/#insert-adjacent
611
612         We were throwing a NOT_SUPPORTED_ERR instead.
613
614         No new tests, rebaselined existing tests.
615
616         * html/HTMLElement.cpp:
617         (WebCore::HTMLElement::insertAdjacent):
618
619 2016-08-04  Alejandro G. Castro  <alex@igalia.com>
620
621         WebRTC: OWR: Add support for the muted state in the mediaplayer
622         https://bugs.webkit.org/show_bug.cgi?id=160502
623
624         Modified the load, play and stop methods to handle the new
625         situation where the mediaSource could be empty, until the remote
626         side sends the information to create the receiver.
627
628         Reviewed by Philippe Normand.
629
630         No new tests, we need to upstream the owr endpoint to check this
631         situation.
632
633         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:
634         (WebCore::MediaPlayerPrivateGStreamerOwr::play): Check the muted
635         state of the tracks if required, we do it using the new
636         maybeHandleChangeMutedState function.
637         (WebCore::MediaPlayerPrivateGStreamerOwr::load): Add always the
638         observer of the track to check when it is unmuted, and we delay
639         enabling/setting the source until the play or the unmute.
640         (WebCore::MediaPlayerPrivateGStreamerOwr::internalLoad): Removed,
641         we now do all in the load method.
642         (WebCore::MediaPlayerPrivateGStreamerOwr::stop): Remove the
643         mediasource when disabling. Removed the m_stopped state, it was
644         there because the internalLoad was called multiple times.
645         (WebCore::MediaPlayerPrivateGStreamerOwr::trackMutedChanged):
646         Check the muted state and handle it, we use the new method
647         maybeHandleChangeMutedState.
648         (WebCore::MediaPlayerPrivateGStreamerOwr::maybeHandleChangeMutedState):
649         Check if the track is muted or not, in case it is muted disable
650         the the renderer and remove its mediasource. If it is not muted
651         enable the renderer and set the mediasource.
652         (WebCore::MediaPlayerPrivateGStreamerOwr::createVideoSink): Move
653         the workaround for the renderer to this method when it is created.
654         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.h:
655         Removed internalLoad method and the m_stopped attribute used to
656         call internalLoad multiple times.
657
658 2016-08-04  Youenn Fablet  <youenn@apple.com>
659
660         DocumentThreadableLoader should pass the fetch mode to underlying loader code
661         https://bugs.webkit.org/show_bug.cgi?id=160399
662
663         Reviewed by Alex Christensen.
664
665         Tests: imported/w3c/web-platform-tests/fetch/api/redirect/redirect-origin-worker.html
666                imported/w3c/web-platform-tests/fetch/api/redirect/redirect-origin.html
667         Covered by existing and rebased tests.
668
669         DocumentThredableLoader was previously loading resources in NoCors mode and doing the cors checks on it own.
670         This was duplicating code and increasing the risk of being not consistent.
671         DocumentThreadableLoader is now passing the fetch mode given by client to underlying loader code.
672         This allows removing some CORS checks in DocumentThreadableLoader code for redirections.
673
674         Updated SubresourceLoader redirection CORS checks to be on par with DocumentThreadableLoader.
675         In particular, aligning the code with https://fetch.spec.whatwg.org/#http-redirect-fetch.
676
677         The error logging situation is not perfect as some errors are properly logged in the console while some others are not.
678         For instance blockedError (due to forbidden port for instance) reason is not logged on the console.
679
680         * loader/DocumentThreadableLoader.cpp:
681         (WebCore::DocumentThreadableLoader::redirectReceived): Updating redirection checking as SubresourceLoader is already doing most of the checks.
682         (WebCore::DocumentThreadableLoader::didReceiveResponse): Removing temp hack as tainting is now computed by underlying loader code.
683         (WebCore::DocumentThreadableLoader::loadRequest): Removing fetch mode change.
684         * loader/SubresourceLoader.cpp:
685         (WebCore::SubresourceLoader::willSendRequestInternal): Updating cancellation error and improve error logging.
686         (WebCore::SubresourceLoader::checkRedirectionCrossOriginAccessControl): Improved the checks and error reporting.
687         Tried to align as much as possible to https://fetch.spec.whatwg.org/#http-redirect-fetch.
688         * loader/SubresourceLoader.h:
689         * xml/XMLHttpRequest.cpp:
690         (WebCore::XMLHttpRequest::didFail): Added an error message to the console in case of access control error.
691
692 2016-08-03  Chris Dumez  <cdumez@apple.com>
693
694         Object.getOwnPropertyNames() on NamedNodeMap fails to return named properties
695         https://bugs.webkit.org/show_bug.cgi?id=160517
696
697         Reviewed by Alex Christensen.
698
699         Object.getOwnPropertyNames() on NamedNodeMap should return named
700         properties' names as per:
701         - https://dom.spec.whatwg.org/#dom-namednodemap-item
702
703         No new tests, rebaselined existing tests.
704
705         * dom/NamedNodeMap.cpp:
706         (WebCore::NamedNodeMap::supportedPropertyNames):
707         * dom/NamedNodeMap.h:
708
709 2016-08-03  Chris Dumez  <cdumez@apple.com>
710
711         Drop DocumentType.internalSubset attribute
712         https://bugs.webkit.org/show_bug.cgi?id=160530
713
714         Reviewed by Alex Christensen.
715
716         Drop DocumentType.internalSubset attribute.
717
718         It is no longer in the DOM specification:
719         - https://dom.spec.whatwg.org/#documenttype
720         - https://w3c.github.io/DOM-Parsing/#xml-serializing-a-documenttype-node
721
722         Other browsers have already dropped it. In WebKit, it was always null
723         anyway.
724
725         No new tests, rebaselined existing test.
726
727         * bindings/objc/DOMDocumentType.mm:
728         (-[DOMDocumentType internalSubset]):
729         * dom/DocumentType.h:
730         * dom/DocumentType.idl:
731         * dom/Node.cpp:
732         (WebCore::Node::isEqualNode): Deleted.
733         * editing/MarkupAccumulator.cpp:
734         (WebCore::MarkupAccumulator::appendDocumentType): Deleted.
735         * inspector/InspectorDOMAgent.cpp:
736         (WebCore::InspectorDOMAgent::buildObjectForNode): Deleted.
737
738 2016-08-03  Chris Dumez  <cdumez@apple.com>
739
740         Drop legacy Document.defaultCharset attribute
741         https://bugs.webkit.org/show_bug.cgi?id=160536
742
743         Reviewed by Alex Christensen.
744
745         Drop legacy Document.defaultCharset attribute.
746
747         It is no longer in the specification:
748         - https://dom.spec.whatwg.org/#interface-document
749
750         Firefox and Chrome have already dropped it.
751
752         No new tests, rebaselined existing test.
753
754         * bindings/objc/DOMDocument.mm:
755         (-[DOMDocument defaultCharset]):
756         * dom/Document.cpp:
757         (WebCore::Document::defaultCharsetForBindings):
758         * dom/Document.h:
759         * dom/Document.idl:
760
761 2016-08-03  Anders Carlsson  <andersca@apple.com>
762
763         Remove some unneeded #ifs now that the Objective-C bindings are frozen
764         https://bugs.webkit.org/show_bug.cgi?id=160532
765
766         Reviewed by Tim Horton.
767
768         * DerivedSources.make:
769         * Modules/mediasession/HTMLMediaElementMediaSession.idl:
770         * Modules/mediastream/HTMLMediaElementMediaStream.idl:
771         * WebCore.xcodeproj/project.pbxproj:
772         * animation/DocumentAnimation.idl:
773         * dom/ChildNode.idl:
774         * dom/Document.idl:
775         * dom/Element.idl:
776         * dom/Event.idl:
777         * dom/ParentNode.idl:
778         * fileapi/Blob.idl:
779         * fileapi/FileError.idl:
780         * html/DOMSettableTokenList.h: Removed.
781         * html/DOMSettableTokenList.idl: Removed.
782         * html/HTMLCanvasElement.idl:
783         * html/HTMLEmbedElement.idl:
784         * html/HTMLFrameElement.idl:
785         * html/HTMLIFrameElement.idl:
786         * html/HTMLMediaElement.idl:
787         * html/HTMLObjectElement.idl:
788         * html/HTMLOptionsCollection.idl:
789         * html/HTMLVideoElement.idl:
790
791 2016-08-03  Myles C. Maxfield  <mmaxfield@apple.com>
792
793         [iOS] SF-Heavy is not accessible from web content
794         https://bugs.webkit.org/show_bug.cgi?id=160522
795         <rdar://problem/27685273>
796
797         Reviewed by Simon Fraser.
798
799         The mappings we were using from CSS font-weight to CoreText font weight were inaccurate.
800         Instead, these new mappings should be used.
801
802         Test: fast/text/system-font-weight.html
803
804         * platform/graphics/ios/FontCacheIOS.mm:
805         (WebCore::systemFontModificationAttributes):
806
807 2016-08-03  Anders Carlsson  <andersca@apple.com>
808
809         Remove the Objective-C bindings generator
810         https://bugs.webkit.org/show_bug.cgi?id=160526
811
812         Reviewed by Sam Weinig.
813
814         * DerivedSources.make:
815         * WebCore.xcodeproj/project.pbxproj:
816         * bindings/objc/PublicDOMInterfaces.h: Removed.
817         * bindings/scripts/CodeGeneratorObjC.pm: Removed.
818         * bindings/scripts/test/ObjC/DOMFloat64Array.h: Removed.
819         * bindings/scripts/test/ObjC/DOMFloat64Array.mm: Removed.
820         * bindings/scripts/test/ObjC/DOMFloat64ArrayInternal.h: Removed.
821         * bindings/scripts/test/ObjC/DOMInterfaceName.h: Removed.
822         * bindings/scripts/test/ObjC/DOMInterfaceName.mm: Removed.
823         * bindings/scripts/test/ObjC/DOMInterfaceNameInternal.h: Removed.
824         * bindings/scripts/test/ObjC/DOMTestActiveDOMObject.h: Removed.
825         * bindings/scripts/test/ObjC/DOMTestActiveDOMObject.mm: Removed.
826         * bindings/scripts/test/ObjC/DOMTestActiveDOMObjectInternal.h: Removed.
827         * bindings/scripts/test/ObjC/DOMTestCallback.h: Removed.
828         * bindings/scripts/test/ObjC/DOMTestCallback.mm: Removed.
829         * bindings/scripts/test/ObjC/DOMTestCallbackFunction.h: Removed.
830         * bindings/scripts/test/ObjC/DOMTestCallbackFunction.mm: Removed.
831         * bindings/scripts/test/ObjC/DOMTestCallbackFunctionInternal.h: Removed.
832         * bindings/scripts/test/ObjC/DOMTestCallbackInternal.h: Removed.
833         * bindings/scripts/test/ObjC/DOMTestClassWithJSBuiltinConstructor.h: Removed.
834         * bindings/scripts/test/ObjC/DOMTestClassWithJSBuiltinConstructor.mm: Removed.
835         * bindings/scripts/test/ObjC/DOMTestClassWithJSBuiltinConstructorInternal.h: Removed.
836         * bindings/scripts/test/ObjC/DOMTestCustomConstructorWithNoInterfaceObject.h: Removed.
837         * bindings/scripts/test/ObjC/DOMTestCustomConstructorWithNoInterfaceObject.mm: Removed.
838         * bindings/scripts/test/ObjC/DOMTestCustomConstructorWithNoInterfaceObjectInternal.h: Removed.
839         * bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.h: Removed.
840         * bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.mm: Removed.
841         * bindings/scripts/test/ObjC/DOMTestCustomNamedGetterInternal.h: Removed.
842         * bindings/scripts/test/ObjC/DOMTestEventConstructor.h: Removed.
843         * bindings/scripts/test/ObjC/DOMTestEventConstructor.mm: Removed.
844         * bindings/scripts/test/ObjC/DOMTestEventConstructorInternal.h: Removed.
845         * bindings/scripts/test/ObjC/DOMTestEventTarget.h: Removed.
846         * bindings/scripts/test/ObjC/DOMTestEventTarget.mm: Removed.
847         * bindings/scripts/test/ObjC/DOMTestEventTargetInternal.h: Removed.
848         * bindings/scripts/test/ObjC/DOMTestException.h: Removed.
849         * bindings/scripts/test/ObjC/DOMTestException.mm: Removed.
850         * bindings/scripts/test/ObjC/DOMTestExceptionInternal.h: Removed.
851         * bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.h: Removed.
852         * bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.mm: Removed.
853         * bindings/scripts/test/ObjC/DOMTestGenerateIsReachableInternal.h: Removed.
854         * bindings/scripts/test/ObjC/DOMTestGlobalObject.h: Removed.
855         * bindings/scripts/test/ObjC/DOMTestGlobalObject.mm: Removed.
856         * bindings/scripts/test/ObjC/DOMTestGlobalObjectInternal.h: Removed.
857         * bindings/scripts/test/ObjC/DOMTestImplements.cpp: Removed.
858         * bindings/scripts/test/ObjC/DOMTestImplements.h: Removed.
859         * bindings/scripts/test/ObjC/DOMTestInterface.h: Removed.
860         * bindings/scripts/test/ObjC/DOMTestInterface.mm: Removed.
861         * bindings/scripts/test/ObjC/DOMTestInterfaceInternal.h: Removed.
862         * bindings/scripts/test/ObjC/DOMTestIterable.h: Removed.
863         * bindings/scripts/test/ObjC/DOMTestIterable.mm: Removed.
864         * bindings/scripts/test/ObjC/DOMTestIterableInternal.h: Removed.
865         * bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.h: Removed.
866         * bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.mm: Removed.
867         * bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructorInternal.h: Removed.
868         * bindings/scripts/test/ObjC/DOMTestMediaQueryListListener.h: Removed.
869         * bindings/scripts/test/ObjC/DOMTestMediaQueryListListener.mm: Removed.
870         * bindings/scripts/test/ObjC/DOMTestMediaQueryListListenerInternal.h: Removed.
871         * bindings/scripts/test/ObjC/DOMTestNamedConstructor.h: Removed.
872         * bindings/scripts/test/ObjC/DOMTestNamedConstructor.mm: Removed.
873         * bindings/scripts/test/ObjC/DOMTestNamedConstructorInternal.h: Removed.
874         * bindings/scripts/test/ObjC/DOMTestNode.h: Removed.
875         * bindings/scripts/test/ObjC/DOMTestNode.mm: Removed.
876         * bindings/scripts/test/ObjC/DOMTestNodeInternal.h: Removed.
877         * bindings/scripts/test/ObjC/DOMTestNondeterministic.h: Removed.
878         * bindings/scripts/test/ObjC/DOMTestNondeterministic.mm: Removed.
879         * bindings/scripts/test/ObjC/DOMTestNondeterministicInternal.h: Removed.
880         * bindings/scripts/test/ObjC/DOMTestObj.h: Removed.
881         * bindings/scripts/test/ObjC/DOMTestObj.mm: Removed.
882         * bindings/scripts/test/ObjC/DOMTestObjInternal.h: Removed.
883         * bindings/scripts/test/ObjC/DOMTestOverloadedConstructors.h: Removed.
884         * bindings/scripts/test/ObjC/DOMTestOverloadedConstructors.mm: Removed.
885         * bindings/scripts/test/ObjC/DOMTestOverloadedConstructorsInternal.h: Removed.
886         * bindings/scripts/test/ObjC/DOMTestOverrideBuiltins.h: Removed.
887         * bindings/scripts/test/ObjC/DOMTestOverrideBuiltins.mm: Removed.
888         * bindings/scripts/test/ObjC/DOMTestOverrideBuiltinsInternal.h: Removed.
889         * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h: Removed.
890         * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.mm: Removed.
891         * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterfaceInternal.h: Removed.
892         * bindings/scripts/test/ObjC/DOMTestSupplemental.cpp: Removed.
893         * bindings/scripts/test/ObjC/DOMTestSupplemental.h: Removed.
894         * bindings/scripts/test/ObjC/DOMTestTypedefs.h: Removed.
895         * bindings/scripts/test/ObjC/DOMTestTypedefs.mm: Removed.
896         * bindings/scripts/test/ObjC/DOMTestTypedefsInternal.h: Removed.
897         * bindings/scripts/test/ObjC/DOMattribute.h: Removed.
898         * bindings/scripts/test/ObjC/DOMattribute.mm: Removed.
899         * bindings/scripts/test/ObjC/DOMattributeInternal.h: Removed.
900         * bindings/scripts/test/ObjC/DOMreadonly.h: Removed.
901         * bindings/scripts/test/ObjC/DOMreadonly.mm: Removed.
902         * bindings/scripts/test/ObjC/DOMreadonlyInternal.h: Removed.
903         * bindings/scripts/test/ObjC/ObjCTestSupplemental.cpp: Removed.
904         * bindings/scripts/test/ObjC/ObjCTestSupplemental.h: Removed.
905
906 2016-08-03  Anders Carlsson  <andersca@apple.com>
907
908         Remove dead bindings code
909         https://bugs.webkit.org/show_bug.cgi?id=160521
910
911         Reviewed by Tim Horton.
912
913         * WebCore.xcodeproj/project.pbxproj:
914         * bindings/objc/DOMBlob.mm:
915         (core): Deleted.
916         * bindings/objc/DOMBlobInternal.h:
917         * bindings/objc/DOMCDATASection.mm:
918         (core): Deleted.
919         * bindings/objc/DOMCDATASectionInternal.h:
920         * bindings/objc/DOMCSSCharsetRule.mm:
921         (core): Deleted.
922         (kit): Deleted.
923         * bindings/objc/DOMCSSCharsetRuleInternal.h: Removed.
924         * bindings/objc/DOMCSSFontFaceRule.mm:
925         (core): Deleted.
926         (kit): Deleted.
927         * bindings/objc/DOMCSSFontFaceRuleInternal.h: Removed.
928         * bindings/objc/DOMCSSImportRule.mm:
929         (core): Deleted.
930         (kit): Deleted.
931         * bindings/objc/DOMCSSImportRuleInternal.h: Removed.
932         * bindings/objc/DOMCSSMediaRule.mm:
933         (core): Deleted.
934         (kit): Deleted.
935         * bindings/objc/DOMCSSMediaRuleInternal.h: Removed.
936         * bindings/objc/DOMCSSPageRule.mm:
937         (core): Deleted.
938         (kit): Deleted.
939         * bindings/objc/DOMCSSPageRuleInternal.h: Removed.
940         * bindings/objc/DOMCSSPrimitiveValue.mm:
941         (core): Deleted.
942         * bindings/objc/DOMCSSPrimitiveValueInternal.h:
943         * bindings/objc/DOMCSSRule.mm:
944         (core): Deleted.
945         * bindings/objc/DOMCSSRuleInternal.h:
946         * bindings/objc/DOMCSSRuleList.mm:
947         (core): Deleted.
948         * bindings/objc/DOMCSSRuleListInternal.h:
949         * bindings/objc/DOMCSSStyleRule.mm:
950         (core): Deleted.
951         (kit): Deleted.
952         * bindings/objc/DOMCSSStyleRuleInternal.h: Removed.
953         * bindings/objc/DOMCSSStyleSheet.mm:
954         (core): Deleted.
955         * bindings/objc/DOMCSSStyleSheetInternal.h:
956         * bindings/objc/DOMCSSUnknownRule.mm:
957         (core): Deleted.
958         (kit): Deleted.
959         * bindings/objc/DOMCSSUnknownRuleInternal.h: Removed.
960         * bindings/objc/DOMCSSValue.mm:
961         (core): Deleted.
962         * bindings/objc/DOMCSSValueInternal.h:
963         * bindings/objc/DOMCSSValueList.mm:
964         (core): Deleted.
965         (kit): Deleted.
966         * bindings/objc/DOMCSSValueListInternal.h: Removed.
967         * bindings/objc/DOMCharacterData.mm:
968         (core): Deleted.
969         (kit): Deleted.
970         * bindings/objc/DOMCharacterDataInternal.h: Removed.
971         * bindings/objc/DOMComment.mm:
972         (core): Deleted.
973         * bindings/objc/DOMCommentInternal.h:
974         * bindings/objc/DOMCounter.mm:
975         (core): Deleted.
976         * bindings/objc/DOMCounterInternal.h:
977         * bindings/objc/DOMDOMImplementation.mm:
978         (core): Deleted.
979         * bindings/objc/DOMDOMImplementationInternal.h:
980         * bindings/objc/DOMDOMTokenList.mm:
981         (core): Deleted.
982         * bindings/objc/DOMDOMTokenListInternal.h:
983         * bindings/objc/DOMEntity.mm:
984         (core): Deleted.
985         (kit): Deleted.
986         * bindings/objc/DOMEntityInternal.h: Removed.
987         * bindings/objc/DOMEntityReference.mm:
988         (core): Deleted.
989         * bindings/objc/DOMEntityReferenceInternal.h:
990         * bindings/objc/DOMFile.mm:
991         (core): Deleted.
992         * bindings/objc/DOMFileInternal.h:
993         * bindings/objc/DOMHTMLAnchorElement.mm:
994         (core): Deleted.
995         (kit): Deleted.
996         * bindings/objc/DOMHTMLAnchorElementInternal.h: Removed.
997         * bindings/objc/DOMHTMLAppletElement.mm:
998         (core): Deleted.
999         (kit): Deleted.
1000         * bindings/objc/DOMHTMLAppletElementInternal.h: Removed.
1001         * bindings/objc/DOMHTMLAreaElement.mm:
1002         (kit): Deleted.
1003         * bindings/objc/DOMHTMLAreaElementInternal.h:
1004         * bindings/objc/DOMHTMLBRElement.mm:
1005         (core): Deleted.
1006         (kit): Deleted.
1007         * bindings/objc/DOMHTMLBRElementInternal.h: Removed.
1008         * bindings/objc/DOMHTMLBaseElement.mm:
1009         (core): Deleted.
1010         (kit): Deleted.
1011         * bindings/objc/DOMHTMLBaseElementInternal.h: Removed.
1012         * bindings/objc/DOMHTMLBaseFontElement.mm:
1013         (core): Deleted.
1014         (kit): Deleted.
1015         * bindings/objc/DOMHTMLBaseFontElementInternal.h: Removed.
1016         * bindings/objc/DOMHTMLBodyElement.mm:
1017         (core): Deleted.
1018         (kit): Deleted.
1019         * bindings/objc/DOMHTMLBodyElementInternal.h: Removed.
1020         * bindings/objc/DOMHTMLButtonElement.mm:
1021         (core): Deleted.
1022         (kit): Deleted.
1023         * bindings/objc/DOMHTMLButtonElementInternal.h: Removed.
1024         * bindings/objc/DOMHTMLCanvasElement.mm:
1025         (core): Deleted.
1026         (kit): Deleted.
1027         * bindings/objc/DOMHTMLCanvasElementInternal.h: Removed.
1028         * bindings/objc/DOMHTMLCollection.mm:
1029         (core): Deleted.
1030         * bindings/objc/DOMHTMLCollectionInternal.h:
1031         * bindings/objc/DOMHTMLDListElement.mm:
1032         (core): Deleted.
1033         (kit): Deleted.
1034         * bindings/objc/DOMHTMLDListElementInternal.h: Removed.
1035         * bindings/objc/DOMHTMLDirectoryElement.mm:
1036         (core): Deleted.
1037         (kit): Deleted.
1038         * bindings/objc/DOMHTMLDirectoryElementInternal.h: Removed.
1039         * bindings/objc/DOMHTMLDivElement.mm:
1040         (core): Deleted.
1041         (kit): Deleted.
1042         * bindings/objc/DOMHTMLDivElementInternal.h: Removed.
1043         * bindings/objc/DOMHTMLEmbedElement.mm:
1044         (core): Deleted.
1045         (kit): Deleted.
1046         * bindings/objc/DOMHTMLEmbedElementInternal.h: Removed.
1047         * bindings/objc/DOMHTMLFieldSetElement.mm:
1048         (core): Deleted.
1049         (kit): Deleted.
1050         * bindings/objc/DOMHTMLFieldSetElementInternal.h: Removed.
1051         * bindings/objc/DOMHTMLFontElement.mm:
1052         (core): Deleted.
1053         (kit): Deleted.
1054         * bindings/objc/DOMHTMLFontElementInternal.h: Removed.
1055         * bindings/objc/DOMHTMLFormElement.mm:
1056         (core): Deleted.
1057         * bindings/objc/DOMHTMLFormElementInternal.h:
1058         * bindings/objc/DOMHTMLFrameElement.mm:
1059         (core): Deleted.
1060         (kit): Deleted.
1061         * bindings/objc/DOMHTMLFrameElementInternal.h: Removed.
1062         * bindings/objc/DOMHTMLFrameSetElement.mm:
1063         (core): Deleted.
1064         (kit): Deleted.
1065         * bindings/objc/DOMHTMLFrameSetElementInternal.h: Removed.
1066         * bindings/objc/DOMHTMLHRElement.mm:
1067         (core): Deleted.
1068         (kit): Deleted.
1069         * bindings/objc/DOMHTMLHRElementInternal.h: Removed.
1070         * bindings/objc/DOMHTMLHeadElement.mm:
1071         (core): Deleted.
1072         * bindings/objc/DOMHTMLHeadElementInternal.h:
1073         * bindings/objc/DOMHTMLHeadingElement.mm:
1074         (core): Deleted.
1075         (kit): Deleted.
1076         * bindings/objc/DOMHTMLHeadingElementInternal.h: Removed.
1077         * bindings/objc/DOMHTMLHtmlElement.mm:
1078         (core): Deleted.
1079         (kit): Deleted.
1080         * bindings/objc/DOMHTMLHtmlElementInternal.h: Removed.
1081         * bindings/objc/DOMHTMLIFrameElement.mm:
1082         (core): Deleted.
1083         (kit): Deleted.
1084         * bindings/objc/DOMHTMLIFrameElementInternal.h: Removed.
1085         * bindings/objc/DOMHTMLImageElement.mm:
1086         (kit): Deleted.
1087         * bindings/objc/DOMHTMLImageElementInternal.h:
1088         * bindings/objc/DOMHTMLLIElement.mm:
1089         (core): Deleted.
1090         (kit): Deleted.
1091         * bindings/objc/DOMHTMLLIElementInternal.h: Removed.
1092         * bindings/objc/DOMHTMLLabelElement.mm:
1093         (core): Deleted.
1094         (kit): Deleted.
1095         * bindings/objc/DOMHTMLLabelElementInternal.h: Removed.
1096         * bindings/objc/DOMHTMLLegendElement.mm:
1097         (core): Deleted.
1098         (kit): Deleted.
1099         * bindings/objc/DOMHTMLLegendElementInternal.h: Removed.
1100         * bindings/objc/DOMHTMLLinkElement.mm:
1101         (kit): Deleted.
1102         * bindings/objc/DOMHTMLLinkElementInternal.h:
1103         * bindings/objc/DOMHTMLMapElement.mm:
1104         (core): Deleted.
1105         (kit): Deleted.
1106         * bindings/objc/DOMHTMLMapElementInternal.h: Removed.
1107         * bindings/objc/DOMHTMLMarqueeElement.mm:
1108         (core): Deleted.
1109         (kit): Deleted.
1110         * bindings/objc/DOMHTMLMarqueeElementInternal.h: Removed.
1111         * bindings/objc/DOMHTMLMediaElement.mm:
1112         (core): Deleted.
1113         (kit): Deleted.
1114         * bindings/objc/DOMHTMLMediaElementInternal.h: Removed.
1115         * bindings/objc/DOMHTMLMenuElement.mm:
1116         (core): Deleted.
1117         (kit): Deleted.
1118         * bindings/objc/DOMHTMLMenuElementInternal.h: Removed.
1119         * bindings/objc/DOMHTMLMetaElement.mm:
1120         (core): Deleted.
1121         (kit): Deleted.
1122         * bindings/objc/DOMHTMLMetaElementInternal.h: Removed.
1123         * bindings/objc/DOMHTMLModElement.mm:
1124         (core): Deleted.
1125         (kit): Deleted.
1126         * bindings/objc/DOMHTMLModElementInternal.h: Removed.
1127         * bindings/objc/DOMHTMLOListElement.mm:
1128         (core): Deleted.
1129         (kit): Deleted.
1130         * bindings/objc/DOMHTMLOListElementInternal.h: Removed.
1131         * bindings/objc/DOMHTMLObjectElement.mm:
1132         (core): Deleted.
1133         (kit): Deleted.
1134         * bindings/objc/DOMHTMLObjectElementInternal.h: Removed.
1135         * bindings/objc/DOMHTMLOptGroupElement.mm:
1136         (core): Deleted.
1137         (kit): Deleted.
1138         * bindings/objc/DOMHTMLOptGroupElementInternal.h: Removed.
1139         * bindings/objc/DOMHTMLOptionsCollection.mm:
1140         (core): Deleted.
1141         * bindings/objc/DOMHTMLOptionsCollectionInternal.h:
1142         * bindings/objc/DOMHTMLParagraphElement.mm:
1143         (core): Deleted.
1144         (kit): Deleted.
1145         * bindings/objc/DOMHTMLParagraphElementInternal.h: Removed.
1146         * bindings/objc/DOMHTMLParamElement.mm:
1147         (core): Deleted.
1148         (kit): Deleted.
1149         * bindings/objc/DOMHTMLParamElementInternal.h: Removed.
1150         * bindings/objc/DOMHTMLPreElement.mm:
1151         (core): Deleted.
1152         (kit): Deleted.
1153         * bindings/objc/DOMHTMLPreElementInternal.h: Removed.
1154         * bindings/objc/DOMHTMLQuoteElement.mm:
1155         (core): Deleted.
1156         (kit): Deleted.
1157         * bindings/objc/DOMHTMLQuoteElementInternal.h: Removed.
1158         * bindings/objc/DOMHTMLScriptElement.mm:
1159         (core): Deleted.
1160         * bindings/objc/DOMHTMLScriptElementInternal.h:
1161         * bindings/objc/DOMHTMLSelectElement.mm:
1162         (kit): Deleted.
1163         * bindings/objc/DOMHTMLSelectElementInternal.h:
1164         * bindings/objc/DOMHTMLStyleElement.mm:
1165         (kit): Deleted.
1166         * bindings/objc/DOMHTMLStyleElementInternal.h:
1167         * bindings/objc/DOMHTMLTableColElement.mm:
1168         (kit): Deleted.
1169         * bindings/objc/DOMHTMLTableColElementInternal.h:
1170         * bindings/objc/DOMHTMLTableElement.mm:
1171         (core): Deleted.
1172         (kit): Deleted.
1173         * bindings/objc/DOMHTMLTableElementInternal.h: Removed.
1174         * bindings/objc/DOMHTMLTableRowElement.mm:
1175         (core): Deleted.
1176         (kit): Deleted.
1177         * bindings/objc/DOMHTMLTableRowElementInternal.h: Removed.
1178         * bindings/objc/DOMHTMLTitleElement.mm:
1179         (core): Deleted.
1180         (kit): Deleted.
1181         * bindings/objc/DOMHTMLTitleElementInternal.h: Removed.
1182         * bindings/objc/DOMHTMLUListElement.mm:
1183         (core): Deleted.
1184         (kit): Deleted.
1185         * bindings/objc/DOMHTMLUListElementInternal.h: Removed.
1186         * bindings/objc/DOMHTMLVideoElement.mm:
1187         (core): Deleted.
1188         (kit): Deleted.
1189         * bindings/objc/DOMHTMLVideoElementInternal.h: Removed.
1190         * bindings/objc/DOMKeyboardEvent.mm:
1191         (core): Deleted.
1192         (kit): Deleted.
1193         * bindings/objc/DOMKeyboardEventInternal.h: Removed.
1194         * bindings/objc/DOMMediaError.mm:
1195         (core): Deleted.
1196         * bindings/objc/DOMMediaErrorInternal.h:
1197         * bindings/objc/DOMMediaList.mm:
1198         (core): Deleted.
1199         * bindings/objc/DOMMediaListInternal.h:
1200         * bindings/objc/DOMMouseEvent.mm:
1201         (core): Deleted.
1202         (kit): Deleted.
1203         * bindings/objc/DOMMouseEventInternal.h: Removed.
1204         * bindings/objc/DOMMutationEvent.mm:
1205         (core): Deleted.
1206         (kit): Deleted.
1207         * bindings/objc/DOMMutationEventInternal.h: Removed.
1208         * bindings/objc/DOMNamedNodeMap.mm:
1209         (core): Deleted.
1210         * bindings/objc/DOMNamedNodeMapInternal.h:
1211         * bindings/objc/DOMNodeIterator.mm:
1212         (core): Deleted.
1213         * bindings/objc/DOMNodeIteratorInternal.h:
1214         * bindings/objc/DOMNodeList.mm:
1215         (core): Deleted.
1216         * bindings/objc/DOMNodeListInternal.h:
1217         * bindings/objc/DOMOverflowEvent.mm:
1218         (core): Deleted.
1219         (kit): Deleted.
1220         * bindings/objc/DOMOverflowEventInternal.h: Removed.
1221         * bindings/objc/DOMProgressEvent.mm:
1222         (core): Deleted.
1223         (kit): Deleted.
1224         * bindings/objc/DOMProgressEventInternal.h: Removed.
1225         * bindings/objc/DOMRGBColor.mm:
1226         (core): Deleted.
1227         * bindings/objc/DOMRGBColorInternal.h:
1228         * bindings/objc/DOMRect.mm:
1229         (core): Deleted.
1230         * bindings/objc/DOMRectInternal.h:
1231         * bindings/objc/DOMStyleSheet.mm:
1232         (core): Deleted.
1233         * bindings/objc/DOMStyleSheetInternal.h:
1234         * bindings/objc/DOMStyleSheetList.mm:
1235         (core): Deleted.
1236         * bindings/objc/DOMStyleSheetListInternal.h:
1237         * bindings/objc/DOMText.mm:
1238         (core): Deleted.
1239         * bindings/objc/DOMTextEvent.mm:
1240         (core): Deleted.
1241         (kit): Deleted.
1242         * bindings/objc/DOMTextEventInternal.h: Removed.
1243         * bindings/objc/DOMTextInternal.h:
1244         * bindings/objc/DOMTimeRanges.mm:
1245         (core): Deleted.
1246         * bindings/objc/DOMTimeRangesInternal.h:
1247         * bindings/objc/DOMTreeWalker.mm:
1248         (core): Deleted.
1249         * bindings/objc/DOMTreeWalkerInternal.h:
1250         * bindings/objc/DOMUIEvent.mm:
1251         (core): Deleted.
1252         (kit): Deleted.
1253         * bindings/objc/DOMUIEventInternal.h: Removed.
1254         * bindings/objc/DOMWheelEvent.mm:
1255         (kit): Deleted.
1256         * bindings/objc/DOMWheelEventInternal.h:
1257         * bindings/objc/DOMXPathExpression.mm:
1258         (core): Deleted.
1259         * bindings/objc/DOMXPathExpressionInternal.h:
1260
1261 2016-08-03  Eric Carlson  <eric.carlson@apple.com>
1262
1263         [Mac] Work around AVPlayer setMuted bug
1264         https://bugs.webkit.org/show_bug.cgi?id=160519
1265         <rdar://problem/27310475>
1266
1267         Reviewed by Dean Jackson.
1268
1269         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: Only override
1270         supportsMuting on iOS.
1271
1272 2016-08-03  Eric Carlson  <eric.carlson@apple.com>
1273
1274         Cleanup HTMLMediaElement track lists.
1275         https://bugs.webkit.org/show_bug.cgi?id=160470
1276
1277         Reviewed by Brent Fulgham.
1278
1279         * html/track/AudioTrack.cpp:
1280         (WebCore::AudioTrack::willRemove): Remove unnecessary ASSERT and NULL check.
1281
1282         * html/track/TextTrackList.cpp:
1283         (TextTrackList::~TextTrackList): Call clearElement so media element and client pointers are
1284         cleared.
1285
1286 2016-08-02  Ada Chan  <adachan@apple.com>
1287
1288         [Mac] media/pip-video-going-into-fullscreen.html is a flaky failure
1289         https://bugs.webkit.org/show_bug.cgi?id=160469
1290
1291         Reviewed by Eric Carlson.
1292
1293         When going from picture-in-picture directly to fullscreen, fix the issue where the
1294         presentation mode unexpectedly changes back to inline after changing to fullscreen.
1295
1296         On Mac, standard fullscreen is not handled by WebVideoFullscreenManager.
1297         When going from picture-in-picture directly to fullscreen, we call
1298         WebVideoFullscreenInterfaceMac::exitFullscreenWithoutAnimationToMode().
1299         We should update m_mode to VideoFullscreenModeStandard there to keep it in sync
1300         with the fullscreen mode in HTMLMediaElement. Otherwise, we'll inadvertently
1301         update the mode to inline when we clear the VideoFullscreenModePictureInPicture mode
1302         in -[WebVideoFullscreenInterfaceMacObjC pipDidClose:].
1303
1304         Since standard fullscreen on Mac doesn't make use of the video fullscreen layer,
1305         we need to make sure we return the video layer back to inline when the presentation
1306         mode changes to "fullscreen". We only do this on Mac because iOS does use
1307         the video fullscreen layer for standard fullscreen.
1308
1309         * Modules/mediacontrols/MediaControlsHost.cpp:
1310         (WebCore::MediaControlsHost::setPreparedToReturnVideoLayerToInline):
1311         Renamed from MediaControlsHost::setPreparedForInline to make it clear this is about
1312         whether the video layer should be inline.
1313         (WebCore::MediaControlsHost::setPreparedForInline): Deleted.
1314         * Modules/mediacontrols/MediaControlsHost.h:
1315         * Modules/mediacontrols/MediaControlsHost.idl:
1316
1317         * Modules/mediacontrols/mediaControlsApple.js:
1318         (Controller.prototype.shouldReturnVideoLayerToInline):
1319         On Mac, the video layer is inline when the presentation mode is "inline" or "fullscreen".
1320         (Controller.prototype.handlePresentationModeChange):
1321         Call shouldReturnVideoLayerToInline() to determine whether the video layer should be inline.
1322
1323         * Modules/mediacontrols/mediaControlsiOS.js:
1324         (ControllerIOS.prototype.shouldReturnVideoLayerToInline):
1325         Override this method since on iOS, the video layer is only inline when the presentation
1326         mode is "inline".
1327
1328         * html/HTMLMediaElement.cpp:
1329         (WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer):
1330         (WebCore::HTMLMediaElement::setPreparedToReturnVideoLayerToInline):
1331         (WebCore::HTMLMediaElement::setPreparedForInline): Deleted.
1332         * html/HTMLMediaElement.h:
1333
1334         * platform/mac/WebVideoFullscreenInterfaceMac.mm:
1335         (WebCore::WebVideoFullscreenInterfaceMac::enterFullscreen):
1336         Remove the assertion that the mode must be "picture-in-picture". I've run into this
1337         assertion in layout tests. Since the EnterFullscreen message is sent in a dispatch_async
1338         block in WebVideoFullscreenManager::didSetupFullscreen(), there's a chance that the
1339         fullscreen mode tracked in WebVideoFullscreenInterfaceMac has already changed to
1340         something else when WebVideoFullscreenInterfaceMac::enterFullscreen() is called.
1341         (WebCore::WebVideoFullscreenInterfaceMac::exitFullscreenWithoutAnimationToMode):
1342         If exiting to standard fullscreen, update m_mode to VideoFullscreenModeStandard.
1343
1344 2016-08-03  Youenn Fablet  <youenn@apple.com>
1345
1346         http/tests/fetch/fetch-in-worker-crash.html is sometimes crashing
1347         https://bugs.webkit.org/show_bug.cgi?id=160498
1348
1349         Reviewed by Chris Dumez.
1350
1351         Covered by http/tests/fetch/fetch-in-worker-crash.html.
1352
1353         * loader/WorkerThreadableLoader.cpp:
1354         (WebCore::WorkerThreadableLoader::MainThreadBridge::cancel): Taking a reference of the client wrapper to ensure it can be cleaned-up successfully.
1355
1356 2016-08-02  Anders Carlsson  <andersca@apple.com>
1357
1358         Freeze the last of the Objective-C bindings
1359         https://bugs.webkit.org/show_bug.cgi?id=160482
1360
1361         Reviewed by Darin Adler.
1362
1363         * WebCore.xcodeproj/project.pbxproj:
1364         * bindings/objc/DOMAttr.h: Added.
1365         * bindings/objc/DOMAttr.mm: Added.
1366         * bindings/objc/DOMAttrInternal.h: Added.
1367         * bindings/objc/DOMCDATASection.h: Added.
1368         * bindings/objc/DOMCDATASection.mm: Added.
1369         * bindings/objc/DOMCDATASectionInternal.h: Added.
1370         * bindings/objc/DOMCharacterData.h
1371         * bindings/objc/DOMCharacterData.mm: Added.
1372         * bindings/objc/DOMCharacterDataInternal.h: Added.
1373         * bindings/objc/DOMComment.h: Added.
1374         * bindings/objc/DOMComment.mm: Added.
1375         * bindings/objc/DOMCommentInternal.h: Added.
1376         * bindings/objc/DOMDOMImplementation.h: Added.
1377         * bindings/objc/DOMDOMImplementation.mm: Added.
1378         * bindings/objc/DOMDOMImplementationInternal.h: Added.
1379         * bindings/objc/DOMDocument.h: Added.
1380         * bindings/objc/DOMDocument.mm: Added.
1381         * bindings/objc/DOMDocumentFragment.h: Added.
1382         * bindings/objc/DOMDocumentFragment.mm: Added.
1383         * bindings/objc/DOMDocumentFragmentInternal.h: Added.
1384         * bindings/objc/DOMDocumentFragmentPrivate.h: Added.
1385         * bindings/objc/DOMDocumentInternal.h: Added.
1386         * bindings/objc/DOMDocumentPrivate.h: Added.
1387         * bindings/objc/DOMDocumentType.h: Added.
1388         * bindings/objc/DOMDocumentType.mm: Added.
1389         * bindings/objc/DOMDocumentTypeInternal.h: Added.
1390         * bindings/objc/DOMElement.h: Added.
1391         * bindings/objc/DOMElement.mm: Added.
1392         * bindings/objc/DOMElementInternal.h: Added.
1393         * bindings/objc/DOMEntity.h: Added.
1394         * bindings/objc/DOMEntity.mm: Added.
1395         * bindings/objc/DOMEntityInternal.h: Added.
1396         * bindings/objc/DOMEntityReference.h: Added.
1397         * bindings/objc/DOMEntityReference.mm: Added.
1398         * bindings/objc/DOMEntityReferenceInternal.h: Added.
1399         * bindings/objc/DOMNamedNodeMap.h: Added.
1400         * bindings/objc/DOMNamedNodeMap.mm: Added.
1401         * bindings/objc/DOMNamedNodeMapInternal.h: Added.
1402         * bindings/objc/DOMNode.h: Added.
1403         * bindings/objc/DOMNode.mm: Added.
1404         * bindings/objc/DOMNodeInternal.h: Added.
1405         * bindings/objc/DOMNodeList.h: Added.
1406         * bindings/objc/DOMNodeList.mm: Added.
1407         * bindings/objc/DOMNodeListInternal.h: Added.
1408         * bindings/objc/DOMNodePrivate.h: Added.
1409         * bindings/objc/DOMProcessingInstruction.h: Added.
1410         * bindings/objc/DOMProcessingInstruction.mm: Added.
1411         * bindings/objc/DOMProcessingInstructionInternal.h: Added.
1412         * bindings/objc/DOMText.h: Added.
1413         * bindings/objc/DOMText.mm: Added.
1414         * bindings/objc/DOMTextEvent.mm:
1415         * bindings/objc/DOMTextEventInternal.h:
1416         * bindings/objc/DOMTextInternal.h: Added.
1417
1418 2016-08-03  Eric Carlson  <eric.carlson@apple.com>
1419
1420         [Mac][iOS] Adopt MediaRemote "seek to playback position"
1421         https://bugs.webkit.org/show_bug.cgi?id=160405
1422         <rdar://problem/27547583>
1423
1424         Reviewed by Dean Jackson.
1425
1426         * platform/ios/RemoteCommandListenerIOS.mm:
1427         (WebCore::RemoteCommandListenerIOS::RemoteCommandListenerIOS): Fix a typo.
1428
1429 2016-08-02  Frederic Wang  <fwang@igalia.com>
1430
1431         Move determination of operator direction into DOM class and reduce relayout
1432         https://bugs.webkit.org/show_bug.cgi?id=160339
1433
1434         Reviewed by Darin Adler.
1435
1436         We move the determination of operator direction into MathMLOperatorElement. We also simplify
1437         a bit RenderMathMLFencedOperator so that the update of operator properties are done
1438         immediately in updateOperatorContent and the resolution of to LayoutUnit is implemented
1439         in leadingSpace, trailingSpace, minSize and maxSize. After that, setOperatorProperties is no
1440         longer necessary and we can remove many calls that used to update operator properties and
1441         force relayout.
1442
1443         No new tests, already covered by existing tests.
1444
1445         * mathml/MathMLInlineContainerElement.cpp:
1446         (WebCore::MathMLInlineContainerElement::childrenChanged): No need to call updateOperatorProperties.
1447         * mathml/MathMLOperatorElement.cpp: Change names from "text" to "char".
1448         (WebCore::MathMLOperatorElement::parseOperatorChar): Parse character and isVertical in this function.
1449         (WebCore::MathMLOperatorElement::operatorChar):
1450         (WebCore::MathMLOperatorElement::childrenChanged):
1451         (WebCore::MathMLOperatorElement::computeDictionaryProperty): Call operatorChar().character.
1452         (WebCore::MathMLOperatorElement::parseOperatorText): Deleted.
1453         (WebCore::MathMLOperatorElement::operatorText): Deleted.
1454         * mathml/MathMLOperatorElement.h: Use a new structure to hold both the character and direction
1455         and change names from "text" to "char".
1456         * rendering/mathml/RenderMathMLFencedOperator.cpp:
1457         (WebCore::RenderMathMLFencedOperator::updateOperatorContent): Update both the character and
1458         direction using MathMLOperatorElement::parseOperatorChar. Then set the boolean properties
1459         and leading/trailing space using the operator dictionary. minsize and maxsize are constant
1460         so we do not need to set them any more.
1461         (WebCore::RenderMathMLFencedOperator::leadingSpace): Resolve the spacing read from the
1462         dictionary to LayoutUnit. Note that it can never be negative.
1463         (WebCore::RenderMathMLFencedOperator::trailingSpace): Ditto.
1464         (WebCore::RenderMathMLFencedOperator::RenderMathMLFencedOperator): Deleted.
1465         (WebCore::RenderMathMLFencedOperator::setOperatorProperties): Deleted.
1466         * rendering/mathml/RenderMathMLFencedOperator.h: We use the new OperatorChar structure for
1467         accessors and members. We make minSize and maxSize just return the default values and delete
1468         the corresponding members. Finally, leading and trailing space are now stored as unsigned
1469         short in MathUnit.
1470         * rendering/mathml/RenderMathMLOperator.cpp:
1471         (WebCore::RenderMathMLOperator::textContent): Use the new OperatorChar structure.
1472         (WebCore::RenderMathMLOperator::isVertical): Helper function forwarding to MathMLOperatorElement.
1473         (WebCore::RenderMathMLOperator::stretchTo): Use isVertical() and remove setOperatorProperties().
1474         (WebCore::RenderMathMLOperator::resetStretchSize): Ditto.
1475         (WebCore::RenderMathMLOperator::updateMathOperator): Rename rebuildTokenContent as this is
1476         now really only used to update MathOperator and hence replace the condition on
1477         useMathOperator() with an ASSERT.
1478         (WebCore::RenderMathMLOperator::updateTokenContent): Call updateMathOperator instead of
1479         rebuildTokenContent.
1480         (WebCore::RenderMathMLOperator::verticalStretchedOperatorShift): We use isVertical().
1481         (WebCore::RenderMathMLOperator::paint): Ditto.
1482         (WebCore::RenderMathMLOperator::setOperatorProperties): Deleted. This is no longer needed.
1483         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths): Deleted.
1484         (WebCore::RenderMathMLOperator::rebuildTokenContent): Deleted. Renamed updateMathOperator.
1485         (WebCore::RenderMathMLOperator::styleDidChange): No need to call updateOperatorProperties.
1486         (WebCore::RenderMathMLOperator::updateOperatorProperties): Ditto..
1487         * rendering/mathml/RenderMathMLOperator.h: Update some declaration and remove m_isVertical.
1488         (WebCore::RenderMathMLOperator::isVertical): Deleted.
1489         * rendering/mathml/RenderMathMLRow.cpp:
1490         (WebCore::RenderMathMLRow::updateOperatorProperties): Deleted. This is no longer needed.
1491         * rendering/mathml/RenderMathMLRow.h: Ditto.
1492
1493 2016-08-02  Chris Dumez  <cdumez@apple.com>
1494
1495         Drop custom bindings code for HTMLSelectElement.remove()
1496         https://bugs.webkit.org/show_bug.cgi?id=160477
1497
1498         Reviewed by Darin Adler.
1499
1500         Drop custom bindings code for HTMLSelectElement.remove() and use
1501         overloading instead.
1502
1503         * bindings/js/JSHTMLSelectElementCustom.cpp:
1504         (WebCore::JSHTMLSelectElement::remove): Deleted.
1505         * html/HTMLSelectElement.idl:
1506
1507 2016-08-02  Chris Dumez  <cdumez@apple.com>
1508
1509         Drop custom bindings code for HTMLOptionsCollection.remove()
1510         https://bugs.webkit.org/show_bug.cgi?id=160475
1511
1512         Reviewed by Darin Adler.
1513
1514         Drop custom bindings code for HTMLOptionsCollection.remove() and use
1515         overloading instead. The overload that take an HTMLOptionElement is
1516         WebKit-specific and should probably be dropped at some point:
1517         - https://html.spec.whatwg.org/multipage/infrastructure.html#htmloptionscollection
1518
1519         This patch also fixes several bugs:
1520         - The parameter is now mandatory. This is consistent with the
1521           specification, Firefox and Chrome.
1522         - HTMLOptionsCollection.prototype.remove.length is now 1 instead of 0.
1523
1524         No new tests, rebaselined existing tests.
1525
1526         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
1527         (WebCore::JSHTMLOptionsCollection::remove): Deleted.
1528         * html/HTMLOptionsCollection.idl:
1529
1530 2016-08-02  Nan Wang  <n_wang@apple.com>
1531
1532         AX: Simulated touch events are not working on iOS
1533         https://bugs.webkit.org/show_bug.cgi?id=160395
1534         <rdar://problem/27633597>
1535
1536         Reviewed by Chris Fleizach.
1537
1538         We should mark the simulated touch as a potential tap otherwise it won't
1539         be handled on iOS. Also, we need to dispatch both touch start and touch end
1540         to mimic the real touch events. Last, added a has event listeners check,
1541         because iOS is dispatching mouse click events for elements without touch event
1542         listeners.
1543
1544         Test: accessibility/ios-simulator/press-fires-touch-events.html
1545
1546         * accessibility/AccessibilityObject.cpp:
1547         (WebCore::AccessibilityObject::press):
1548         (WebCore::AccessibilityObject::dispatchTouchEvent):
1549         * page/ios/EventHandlerIOS.mm:
1550         (WebCore::EventHandler::dispatchSimulatedTouchEvent):
1551         * platform/ios/PlatformEventFactoryIOS.mm:
1552         (WebCore::PlatformTouchEventBuilder::PlatformTouchEventBuilder):
1553
1554 2016-08-02  Benjamin Poulain  <bpoulain@apple.com>
1555
1556         Clean up some useless AtomicString atoms
1557         https://bugs.webkit.org/show_bug.cgi?id=160471
1558
1559         Reviewed by Geoffrey Garen.
1560
1561         The only uses of "commentAtom" and "textAtom" where for their
1562         respective overload of Node::nodeName().
1563         Those methods return a string, we should not keep them in the atomic
1564         string table just to hold a small String alive. They were also the only
1565         two nodes to behave that way.
1566
1567         The atom xlinkAtom was only used by createForeignAttributesMap(), which
1568         is itself only invoked once. There is no need for the symbol xlinkAtom.
1569
1570         * dom/CDATASection.cpp:
1571         (WebCore::CDATASection::nodeName):
1572         * dom/Comment.cpp:
1573         (WebCore::Comment::nodeName):
1574         * dom/Document.cpp:
1575         (WebCore::Document::nodeName):
1576         * dom/Text.cpp:
1577         (WebCore::Text::nodeName):
1578         * html/parser/HTMLTreeBuilder.cpp:
1579         (WebCore::createForeignAttributesMap):
1580
1581 2016-08-02  Anders Carlsson  <andersca@apple.com>
1582
1583         Freeze the Objective-C DOM Event and CSS bindings
1584         https://bugs.webkit.org/show_bug.cgi?id=160476
1585
1586         Reviewed by Tim Horton.
1587
1588         * DerivedSources.make:
1589         * WebCore.xcodeproj/project.pbxproj:
1590         * bindings/objc/DOMCSSCharsetRule.h: Added.
1591         * bindings/objc/DOMCSSCharsetRule.mm: Added.
1592         * bindings/objc/DOMCSSCharsetRuleInternal.h: Added.
1593         * bindings/objc/DOMCSSFontFaceRule.h: Added.
1594         * bindings/objc/DOMCSSFontFaceRule.mm: Added.
1595         * bindings/objc/DOMCSSFontFaceRuleInternal.h: Added.
1596         * bindings/objc/DOMCSSImportRule.h: Added.
1597         * bindings/objc/DOMCSSImportRule.mm: Added.
1598         * bindings/objc/DOMCSSImportRuleInternal.h: Added.
1599         * bindings/objc/DOMCSSMediaRule.h: Added.
1600         * bindings/objc/DOMCSSMediaRule.mm: Added.
1601         * bindings/objc/DOMCSSMediaRuleInternal.h: Added.
1602         * bindings/objc/DOMCSSPageRule.h: Added.
1603         * bindings/objc/DOMCSSPageRule.mm: Added.
1604         * bindings/objc/DOMCSSPageRuleInternal.h: Added.
1605         * bindings/objc/DOMCSSPrimitiveValue.h: Added.
1606         * bindings/objc/DOMCSSPrimitiveValue.mm: Added.
1607         * bindings/objc/DOMCSSPrimitiveValueInternal.h: Added.
1608         * bindings/objc/DOMCSSRule.h: Added.
1609         * bindings/objc/DOMCSSRule.mm: Added.
1610         * bindings/objc/DOMCSSRuleInternal.h: Added.
1611         * bindings/objc/DOMCSSRuleList.h: Added.
1612         * bindings/objc/DOMCSSRuleList.mm: Added.
1613         * bindings/objc/DOMCSSRuleListInternal.h: Added.
1614         * bindings/objc/DOMCSSStyleDeclaration.h: Added.
1615         * bindings/objc/DOMCSSStyleDeclaration.mm: Added.
1616         * bindings/objc/DOMCSSStyleDeclarationInternal.h: Added.
1617         * bindings/objc/DOMCSSStyleRule.h: Added.
1618         * bindings/objc/DOMCSSStyleRule.mm: Added.
1619         * bindings/objc/DOMCSSStyleRuleInternal.h: Added.
1620         * bindings/objc/DOMCSSStyleSheet.h: Added.
1621         * bindings/objc/DOMCSSStyleSheet.mm: Added.
1622         * bindings/objc/DOMCSSStyleSheetInternal.h: Added.
1623         * bindings/objc/DOMCSSUnknownRule.h: Added.
1624         * bindings/objc/DOMCSSUnknownRule.mm: Added.
1625         * bindings/objc/DOMCSSUnknownRuleInternal.h: Added.
1626         * bindings/objc/DOMCSSValue.h: Added.
1627         * bindings/objc/DOMCSSValue.mm: Added.
1628         * bindings/objc/DOMCSSValueInternal.h: Added.
1629         * bindings/objc/DOMCSSValueList.h: Added.
1630         * bindings/objc/DOMCSSValueList.mm: Added.
1631         * bindings/objc/DOMCSSValueListInternal.h: Added.
1632         * bindings/objc/DOMCounter.h: Added.
1633         * bindings/objc/DOMCounter.mm: Added.
1634         * bindings/objc/DOMCounterInternal.h: Added.
1635         * bindings/objc/DOMEvent.h: Added.
1636         * bindings/objc/DOMEvent.mm: Added.
1637         * bindings/objc/DOMEventInternal.h: Added.
1638         * bindings/objc/DOMEventListener.h: Added.
1639         * bindings/objc/DOMEventTarget.h: Added.
1640         * bindings/objc/DOMKeyboardEvent.h: Added.
1641         * bindings/objc/DOMKeyboardEvent.mm: Added.
1642         * bindings/objc/DOMKeyboardEventInternal.h: Added.
1643         * bindings/objc/DOMMouseEvent.h: Added.
1644         * bindings/objc/DOMMouseEvent.mm: Added.
1645         * bindings/objc/DOMMouseEventInternal.h: Added.
1646         * bindings/objc/DOMMutationEvent.h: Added.
1647         * bindings/objc/DOMMutationEvent.mm: Added.
1648         * bindings/objc/DOMMutationEventInternal.h: Added.
1649         * bindings/objc/DOMOverflowEvent.h: Added.
1650         * bindings/objc/DOMOverflowEvent.mm: Added.
1651         * bindings/objc/DOMOverflowEventInternal.h: Added.
1652         * bindings/objc/DOMProgressEvent.h: Added.
1653         * bindings/objc/DOMProgressEvent.mm: Added.
1654         * bindings/objc/DOMProgressEventInternal.h: Added.
1655         * bindings/objc/DOMRGBColor.h: Added.
1656         * bindings/objc/DOMRGBColor.mm: Added.
1657         * bindings/objc/DOMRGBColorInternal.h: Added.
1658         * bindings/objc/DOMRect.h: Added.
1659         * bindings/objc/DOMRect.mm: Added.
1660         * bindings/objc/DOMRectInternal.h: Added.
1661         * bindings/objc/DOMTextEvent.h: Added.
1662         * bindings/objc/DOMTextEvent.mm: Added.
1663         (-[DOMTextEvent data]):
1664         (-[DOMTextEvent initTextEvent:canBubbleArg:cancelableArg:viewArg:dataArg:]):
1665         * bindings/objc/DOMTextEventInternal.h: Added.
1666         * bindings/objc/DOMUIEvent.h: Added.
1667         * bindings/objc/DOMUIEvent.mm: Added.
1668         * bindings/objc/DOMUIEventInternal.h: Added.
1669         * bindings/objc/DOMWheelEvent.h: Added.
1670         * bindings/objc/DOMWheelEvent.mm: Added.
1671         * bindings/objc/DOMWheelEventInternal.h: Added.
1672
1673 2016-08-02  Enrica Casucci  <enrica@apple.com>
1674
1675         Allow building with content filtering disabled.
1676         https://bugs.webkit.org/show_bug.cgi?id=160454
1677
1678         Reviewed by Simon Fraser.
1679
1680         * Configurations/FeatureDefines.xcconfig:
1681         * platform/PlatformContentFilter.h:
1682         (WebCore::PlatformContentFilter::unblockRequestDeniedScript):
1683         * platform/cocoa/NetworkExtensionContentFilter.h:
1684         * platform/cocoa/NetworkExtensionContentFilter.mm:
1685         (WebCore::NetworkExtensionContentFilter::unblockHandler):
1686         * platform/cocoa/ParentalControlsContentFilter.h:
1687         * testing/MockContentFilter.h:
1688
1689 2016-08-02  Dean Jackson  <dino@apple.com>
1690
1691         Reapply fixes for webkit.org/b/159450 and webkit.org/b/157569
1692         https://bugs.webkit.org/show_bug.cgi?id=160474
1693         <rdar://problem/27668170>
1694
1695         Reviewed by Simon Fraser.
1696
1697         The fixes are behaviour we want. They just caused a regression
1698         on medium.com (reverted in http://trac.webkit.org/r203380).
1699
1700         Now that we've branched, revert the reversion (which itself
1701         was a reversion), so we can fix the actual bug:
1702         https://bugs.webkit.org/show_bug.cgi?id=160478
1703
1704         * css/CSSParser.cpp:
1705         (WebCore::CSSParser::parseValue):
1706         (WebCore::CSSParser::parseAnimationShorthand):
1707         (WebCore::CSSParser::addPropertyWithPrefixingVariant):
1708         (WebCore::CSSParser::parseTransitionShorthand):
1709         * css/CSSPropertyNames.in:
1710         * css/PropertySetCSSStyleDeclaration.cpp:
1711         (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue):
1712         (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue):
1713         (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal):
1714         (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal):
1715         * css/StyleProperties.cpp:
1716         (WebCore::MutableStyleProperties::removeShorthandProperty):
1717         (WebCore::StyleProperties::asText):
1718         (WebCore::MutableStyleProperties::removeProperty): Deleted.
1719         (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted.
1720         (WebCore::MutableStyleProperties::setProperty): Deleted.
1721         (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted.
1722         (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted.
1723         (WebCore::MutableStyleProperties::setPrefixingVariantProperty): Deleted.
1724         * css/StyleProperties.h:
1725
1726 2016-08-02  Eric Carlson  <eric.carlson@apple.com>
1727
1728         Cleanup HTMLMediaElement track lists.
1729         https://bugs.webkit.org/show_bug.cgi?id=160470
1730
1731         Reviewed by David Kilzer.
1732
1733         Test: media/range-extract-contents-crash.html
1734
1735         * html/HTMLMediaElement.cpp:
1736         (WebCore::HTMLMediaElement::~HTMLMediaElement): 
1737
1738         * html/track/AudioTrack.cpp:
1739         (WebCore::AudioTrack::willRemove): ASSERT if media element is NULL.
1740
1741         * html/track/TextTrackList.cpp:
1742         (TextTrackList::clearElement): Clear track media element pointers and client.
1743         * html/track/TextTrackList.h:
1744
1745         * html/track/TrackListBase.cpp:
1746         (TrackListBase::~TrackListBase): Call clearElement.
1747         (TrackListBase::clearElement): Clear track media element pointers and client.
1748         * html/track/TrackListBase.h:
1749
1750 2016-08-02  Anders Carlsson  <andersca@apple.com>
1751
1752         Remove more Objective-C bindings that are not used
1753         https://bugs.webkit.org/show_bug.cgi?id=160473
1754
1755         Reviewed by Sam Weinig.
1756
1757         * DerivedSources.make:
1758         * WebCore.xcodeproj/project.pbxproj:
1759         * bindings/objc/DOMCSS.mm:
1760         (kitClass):
1761         * dom/Document.idl:
1762
1763 2016-08-02  Chris Dumez  <cdumez@apple.com>
1764
1765         Drop custom bindings for FormData.append()
1766         https://bugs.webkit.org/show_bug.cgi?id=160466
1767
1768         Reviewed by Sam Weinig.
1769
1770         Drop custom bindings for FormData.append(). We no longer need them now
1771         that we have proper support for overloads after r204028.
1772
1773         This patch also fixes the fact that FormData.prototype.append.length
1774         was 0 instead of 2.
1775
1776         No new tests, rebaselined existing test.
1777
1778         * bindings/js/JSDOMFormDataCustom.cpp:
1779         (WebCore::JSDOMFormData::append): Deleted.
1780         * html/DOMFormData.cpp:
1781         (WebCore::DOMFormData::append):
1782         * html/DOMFormData.h:
1783         * html/DOMFormData.idl:
1784         * html/FileInputType.cpp:
1785         (WebCore::FileInputType::appendFormData):
1786         * html/FormDataList.cpp:
1787         (WebCore::FormDataList::appendBlob):
1788         * html/FormDataList.h:
1789         (WebCore::FormDataList::Item::Item):
1790         (WebCore::FormDataList::appendBlob):
1791
1792 2016-08-02  Commit Queue  <commit-queue@webkit.org>
1793
1794         Unreviewed, rolling out r203799.
1795         https://bugs.webkit.org/show_bug.cgi?id=160467
1796
1797         Decided on a different solution (Requested by jonlee_ on
1798         #webkit).
1799
1800         Reverted changeset:
1801
1802         "Captions do not render in PiP window when element is hidden"
1803         https://bugs.webkit.org/show_bug.cgi?id=160265
1804         http://trac.webkit.org/changeset/203799
1805
1806 2016-08-02  Alex Christensen  <achristensen@webkit.org>
1807
1808         Remove unused functions in URL
1809         https://bugs.webkit.org/show_bug.cgi?id=160468
1810
1811         Reviewed by Geoffrey Garen.
1812
1813         * page/SecurityOrigin.cpp:
1814         (WebCore::SecurityOrigin::extractInnerURL):
1815         * platform/URL.cpp:
1816         (WebCore::mimeTypeFromURL):
1817         (WebCore::URL::stringCenterEllipsizedToLength):
1818         (WebCore::URL::isSafeToSendToAnotherThread): Deleted.
1819         * platform/URL.h:
1820         (WebCore::URL::operator NSString*):
1821         (WebCore::URL::innerURL): Deleted.
1822
1823 2016-08-02  Chris Dumez  <cdumez@apple.com>
1824
1825         Named / Indexed properties should be configurable
1826         https://bugs.webkit.org/show_bug.cgi?id=160457
1827
1828         Reviewed by Darin Adler.
1829
1830         Report Named / Indexed properties as being configurable to comply with
1831         the Web IDL specification:
1832         - http://heycam.github.io/webidl/#getownproperty-guts (step 1. and 2.)
1833
1834         Firefox and Chrome also report them as being configurable.
1835
1836         No new tests, rebaselined existing tests.
1837
1838         * bindings/scripts/CodeGeneratorJS.pm:
1839         (GenerateGetOwnPropertySlotBody):
1840
1841 2016-08-02  Anders Carlsson  <andersca@apple.com>
1842
1843         Remove more unused/uninstalled Objective-C DOM bindings
1844         https://bugs.webkit.org/show_bug.cgi?id=160464
1845
1846         Reviewed by Darin Adler.
1847
1848         * Configurations/WebCore.xcconfig:
1849         * DerivedSources.make:
1850         * WebCore.xcodeproj/project.pbxproj:
1851         * bindings/objc/DOMCSS.mm:
1852         (kitClass):
1853         * bindings/objc/DOMEvents.h:
1854         * bindings/objc/DOMEvents.mm:
1855         (kitClass): Deleted.
1856         * dom/Document.idl:
1857
1858 2016-08-02  Chris Dumez  <cdumez@apple.com>
1859
1860         [WebIDL] Extend new overload resolution algorithm support to constructors
1861         https://bugs.webkit.org/show_bug.cgi?id=160455
1862
1863         Reviewed by Ryosuke Niwa.
1864
1865         Extend new overload resolution algorithm support (added in r204028) to
1866         constructors as well. It was only used for operations. Remove code that
1867         is now dead from the bindings generator.
1868
1869         We now share the same code of generating the overload resolution code
1870         for operations and constructors.
1871
1872         No new tests, rebaselined existing tests.
1873
1874         * bindings/scripts/CodeGenerator.pm:
1875         (LinkOverloadedFunctions):
1876         * bindings/scripts/CodeGeneratorJS.pm:
1877         (GenerateOverloadedFunctionOrConstructor):
1878         (GenerateImplementation):
1879         (GenerateConstructorDefinitions):
1880         (GenerateConstructorDefinition):
1881         (GetFunctionLength): Deleted.
1882         (LengthOfLongestFunctionParameterList): Deleted.
1883         (GetNativeTypeForConversions): Deleted.
1884         (GetGnuVTableNameForInterface): Deleted.
1885         (GetGnuMangledNameForInterface): Deleted.
1886         (GetGnuVTableOffsetForType): Deleted.
1887         (GenerateConstructorHelperMethods): Deleted.
1888         * bindings/scripts/IDLParser.pm:
1889         (applyExtendedAttributeList): Deleted.
1890         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1891         (WebCore::JSTestOverloadedConstructorsConstructor::construct):
1892         * bindings/scripts/test/TestOverloadedConstructors.idl:
1893
1894 2016-08-02  Brady Eidson  <beidson@apple.com>
1895
1896         Removing IndexedDB WebsiteData can fail for some users.
1897         https://bugs.webkit.org/show_bug.cgi?id=160463
1898
1899         Reviewed by Alex Christensen.
1900
1901         Covered by changes to API test IndexedDB.StoreBlobThenDelete.
1902
1903         For a few months in trunk WebKit, deleting an IndexedDB using WebsiteDataStore API would only
1904         delete the "IndexedDB.sqlite3" file, but would leave the "-wal" and "-shm" files behind.
1905         
1906         We'd then fail to delete the directory itself, tricking API clients to think there are still
1907         databases in the given origin.
1908         
1909         Furthermore, the code to delete a database first checks for the existence of "IndexedDB.sqlite3"
1910         then refuses to do any further cleanup if it doesn't exist.
1911         
1912         We should just always run the entire delete procedure even if IndexedDB.sqlite does not exist.
1913         
1914         * Modules/indexeddb/server/IDBServer.cpp:
1915         (WebCore::IDBServer::removeAllDatabasesForOriginPath):
1916
1917         * platform/sql/SQLiteFileSystem.cpp:
1918         (WebCore::SQLiteFileSystem::deleteDatabaseFile):
1919
1920 2016-08-02  Alex Christensen  <achristensen@webkit.org>
1921
1922         Fix Mac CMake build.
1923
1924         * PlatformMac.cmake:
1925         Some ObjC bindings have been frozen.
1926
1927 2016-08-02  Frederic Wang  <fwang@igalia.com>
1928
1929         More cleanup of MathML operator parsing
1930         https://bugs.webkit.org/show_bug.cgi?id=160336
1931
1932         Reviewed by Darin Adler.
1933
1934         No new tests, behavior is unchanged.
1935
1936         * rendering/mathml/RenderMathMLBlock.cpp:
1937         (WebCore::parseMathMLLength): Deleted. This function is no longer used.
1938         * rendering/mathml/RenderMathMLBlock.h: Ditto.
1939         * rendering/mathml/RenderMathMLFencedOperator.h: Move some length members from
1940         RenderMathMLOperator and override the accessors. Also override useMathOperator() since it is
1941         always true for anonymous mfenced operators.
1942         * rendering/mathml/RenderMathMLOperator.cpp:
1943         (WebCore::RenderMathMLOperator::textContent): No need to ASSERT !isAnonymous since this
1944         function is overriden by RenderMathMLFencedOperator.
1945         (WebCore::RenderMathMLOperator::isInvisibleOperator): Use a temporary variable to call
1946         textContent only once.
1947         (WebCore::RenderMathMLOperator::leadingSpace): Helper function to determine the leading space.
1948         (WebCore::RenderMathMLOperator::trailingSpace): Helper function to determine the trailing space.
1949         (WebCore::RenderMathMLOperator::minSize): Helper function to determine the min space.
1950         (WebCore::RenderMathMLOperator::maxSize): Helper function to determine the max space.
1951         (WebCore::RenderMathMLOperator::setOperatorProperties): This is now only used to set m_isVertical.
1952         (WebCore::RenderMathMLOperator::stretchTo): Call maxSize and minSize when necessary.
1953         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths): Call leadingSpace and trailingSpace.
1954         (WebCore::RenderMathMLOperator::layoutBlock): Ditto.
1955         (WebCore::RenderMathMLOperator::useMathOperator): Remove the case for anonymous operators as
1956         this is now handled in the derived class.
1957         (WebCore::RenderMathMLOperator::paint): Call leadingSpace.
1958         * rendering/mathml/RenderMathMLOperator.h: Remove length members and declare helper functions
1959         to get these lengths from MathMLOperatorElement.
1960         (WebCore::RenderMathMLOperator::setLeadingSpace): Deleted. This is no longer used.
1961         (WebCore::RenderMathMLOperator::setTrailingSpace): Deleted. This is no longer used.
1962
1963 2016-08-02  Frederic Wang  <fwang@igalia.com>
1964
1965         Move parsing of operator length attributes to MathMLOperatorElement
1966         https://bugs.webkit.org/show_bug.cgi?id=160301
1967
1968         Reviewed by Darin Adler.
1969
1970         We move parsing of operator attributes lspace, rspace minsize, maxsize into the class
1971         MathMLOperatorElement. We rely on the existing MathMLElement::Length structure and expand
1972         it to handle the "infinity" case of maxsize that we always resolve as intMaxForLayoutUnit.
1973         We also improve the resolution of a negative value for minsize and maxsize since the MathML
1974         recommendation says it should be rounded up to the nearest valid value (which is zero)
1975         instead of ignoring the attribute and using the default value. This is similar to r203285
1976         for mfrac@linethickness. We also update the existing test for minsize/maxsize to take into
1977         account that change.
1978
1979         No new tests, already covered by existing tests.
1980
1981         * mathml/MathMLElement.h: Add an "Infinity" type for MathML Length.
1982         * mathml/MathMLOperatorElement.cpp:
1983         (WebCore::MathMLOperatorElement::leadingSpace): Helper function to retrieve the cached value
1984         for the lspace attribute, parse it if necessary.
1985         (WebCore::MathMLOperatorElement::trailingSpace): Ditto for rspace.
1986         (WebCore::MathMLOperatorElement::minSize): Ditto for minsize.
1987         (WebCore::MathMLOperatorElement::maxSize): Ditto for maxsize. This attribute also accepts the
1988         "infinity" value.
1989         (WebCore::MathMLOperatorElement::parseAttribute): Mark attributes dirty.
1990         * mathml/MathMLOperatorElement.h: Declare Length members and accessors.
1991         * rendering/mathml/RenderMathMLBlock.cpp:
1992         (WebCore::toUserUnits): Resolve Infinity as intMaxForLayoutUnit.
1993         * rendering/mathml/RenderMathMLOperator.cpp:
1994         (WebCore::RenderMathMLOperator::setOperatorProperties): We use toUserUnits to resolve the
1995         lengths. Negative maxsize and minsize values now fallback to 0 instead of their default
1996         values. We also remove the !isAnonymous() check since setOperatorProperties is overriden
1997         in the RenderMathMLFencedOperator class.
1998
1999 2016-08-02  Frederic Wang  <fred.wang@free.fr>
2000
2001         Unreviewed build error fix.
2002
2003         * mathml/MathMLOperatorElement.cpp:
2004         (WebCore::propertyFlagToAttributeName): Return a nullQName to avoid warnings on some platforms.
2005
2006 2016-08-02  Anders Carlsson  <andersca@apple.com>
2007
2008         Stop building Objective-C bindings that aren't exposed anywhere
2009         https://bugs.webkit.org/show_bug.cgi?id=160458
2010
2011         Reviewed by Darin Adler.
2012
2013         * DerivedSources.make:
2014         * WebCore.xcodeproj/project.pbxproj:
2015
2016 2016-08-02  Chris Dumez  <cdumez@apple.com>
2017
2018         HTMLCollection's named getter should only do 'name' attribute matching for HTMLElements
2019         https://bugs.webkit.org/show_bug.cgi?id=160456
2020
2021         Reviewed by Darin Adler.
2022
2023         HTMLCollection's named getter should only do 'name' attribute matching for HTMLElements:
2024         - https://dom.spec.whatwg.org/#dom-htmlcollection-nameditem
2025
2026         Our slow path which relies on HTMLCollection::updateNamedElementCache() does the right
2027         thing. However, we have a fast path in 
2028         CachedHTMLCollection<HTMLCollectionClass, traversalType>::namedItem() that was missing a
2029         check.
2030
2031         Firefox and Chrome both behave correctly here.
2032
2033         No new tests, rebaselined existing tests.
2034
2035         * html/CachedHTMLCollection.h:
2036         (WebCore::traversalType>::namedItem):
2037
2038 2016-08-02  Chris Dumez  <cdumez@apple.com>
2039
2040         Kill [StrictTypeChecking] IDL extended attribute
2041         https://bugs.webkit.org/show_bug.cgi?id=160382
2042
2043         Reviewed by Darin Adler.
2044
2045         Kill [StrictTypeChecking] IDL extended attribute. Its only remaining
2046         use was on DOMString parameters for a few CanvasRenderingContext2D
2047         operations in order to work around a bug in our overload resolution.
2048
2049         However, as of r204028, we implement the Web IDL overload resolution
2050         algorithm and [StrictTypeChecking] is now a no-op and is no longer
2051         needed.
2052
2053         * bindings/scripts/CodeGeneratorJS.pm:
2054         (GenerateParametersCheckExpression):
2055         * bindings/scripts/IDLAttributes.txt:
2056         * bindings/scripts/test/TestObj.idl:
2057         * bindings/scripts/test/TestTypedefs.idl:
2058         * html/canvas/CanvasRenderingContext2D.idl:
2059
2060 2016-08-02  Frederic Wang  <fwang@igalia.com>
2061
2062         Move parsing of boolean operator properties into MathMLOperatorElement
2063         https://bugs.webkit.org/show_bug.cgi?id=160190
2064
2065         Reviewed by Darin Adler.
2066
2067         No new tests, already covered by existing tests.
2068
2069         * mathml/MathMLOperatorDictionary.h: Add a bit mask with all the property flags set.
2070         * mathml/MathMLOperatorElement.cpp:
2071         (WebCore::attributeNameToPropertyFlag): helper function to map from attribute name to flag.
2072         (WebCore::MathMLOperatorElement::computeOperatorFlag): Helper function to update one
2073         bit of m_properties.flags from the corresponding boolean attribute. The default value is
2074         taken from the operator dictionary data stored in m_dictionaryProperty.flags.
2075         (WebCore::MathMLOperatorElement::hasProperty): Returns whether the operator has a property,
2076         parsing it again if the corresponding attribute is dirty.
2077         (WebCore::MathMLOperatorElement::childrenChanged): Make all properties dirty.
2078         (WebCore::propertyFlagToAttributeName): helper function to map from flag to attribute name.
2079         (WebCore::MathMLOperatorElement::parseAttribute): Make all properties dirty if the form
2080         attribute changed. Make each property dirty when the corresponding attribute changed.
2081         (WebCore::MathMLOperatorElement::flags): Deleted. Replaced with the finer hasProperty function.
2082         * mathml/MathMLOperatorElement.h: Define new structure, member and functions to handle
2083         operator properties.
2084         * rendering/mathml/RenderMathMLFencedOperator.cpp:
2085         (WebCore::RenderMathMLFencedOperator::RenderMathMLFencedOperator): Move m_operatorFlags from
2086         the base class to the derived class.
2087         * rendering/mathml/RenderMathMLFencedOperator.h: Ditto.
2088         * rendering/mathml/RenderMathMLOperator.cpp:
2089         (WebCore::RenderMathMLOperator::RenderMathMLOperator): Ditto.
2090         (WebCore::RenderMathMLOperator::hasOperatorFlag): Just call hasOperatorFlag from the
2091         MathMLOperatorElement class.
2092         (WebCore::RenderMathMLOperator::setOperatorProperties): We do not initialize m_operatorFlags
2093         since it has been removed from the base class. We also do not parse attributes since this
2094         has been moved to the MathMLOperatorElement class.
2095         (WebCore::RenderMathMLOperator::setOperatorFlagFromAttribute): Deleted.
2096         (WebCore::RenderMathMLOperator::setOperatorFlagFromAttributeValue): Deleted.
2097         * rendering/mathml/RenderMathMLOperator.h: Move m_operatorFlags from the base class to the
2098         derived class, remove some parsing helper functions and update hasOperatorFlag to make it
2099         overridable.
2100
2101 2016-08-01  Anders Carlsson  <andersca@apple.com>
2102
2103         Freeze another bunch of Objective-C binding files
2104         https://bugs.webkit.org/show_bug.cgi?id=160435
2105
2106         Reviewed by Alex Christensen.
2107
2108         * DerivedSources.make:
2109         * WebCore.xcodeproj/project.pbxproj:
2110         * bindings/objc/DOMAbstractView.h: Added.
2111         * bindings/objc/DOMAbstractView.mm:
2112         * bindings/objc/DOMAbstractViewInternal.h: Added.
2113         * bindings/objc/DOMMediaList.h: Added.
2114         * bindings/objc/DOMMediaList.mm: Added.
2115         * bindings/objc/DOMMediaListInternal.h: Added.
2116         * bindings/objc/DOMNodeFilter.h: Added.
2117         * bindings/objc/DOMNodeIterator.h: Added.
2118         * bindings/objc/DOMNodeIterator.mm: Added.
2119         * bindings/objc/DOMNodeIteratorInternal.h: Added.
2120         * bindings/objc/DOMRange.h: Added.
2121         * bindings/objc/DOMRange.mm: Added.
2122         * bindings/objc/DOMRangeInternal.h: Added.
2123         * bindings/objc/DOMStyleSheet.h: Added.
2124         * bindings/objc/DOMStyleSheet.mm: Added.
2125         * bindings/objc/DOMStyleSheetInternal.h: Added.
2126         * bindings/objc/DOMStyleSheetList.h: Added.
2127         * bindings/objc/DOMStyleSheetList.mm: Added.
2128         * bindings/objc/DOMStyleSheetListInternal.h: Added.
2129         * bindings/objc/DOMTreeWalker.h: Added.
2130         * bindings/objc/DOMTreeWalker.mm: Added.
2131         * bindings/objc/DOMTreeWalkerInternal.h: Added.
2132         * bindings/objc/DOMXPathExpression.h: Added.
2133         * bindings/objc/DOMXPathExpression.mm: Added.
2134         * bindings/objc/DOMXPathExpressionInternal.h: Added.
2135         * bindings/objc/DOMXPathNSResolver.h: Added.
2136         * bindings/objc/DOMXPathResult.h: Added.
2137         * bindings/objc/DOMXPathResult.mm: Added.
2138         * bindings/objc/DOMXPathResultInternal.h: Added.
2139
2140 2016-08-02  Frederic Wang  <fwang@igalia.com>
2141
2142         [MathML] Use more auto for local variables
2143         https://bugs.webkit.org/show_bug.cgi?id=160453
2144
2145         Reviewed by Darin Adler.
2146
2147         No new tests, behavior is unchanged.
2148
2149         * mathml/MathMLElement.cpp:
2150         (WebCore::MathMLElement::colSpan):
2151         (WebCore::MathMLElement::rowSpan):
2152         (WebCore::MathMLElement::childShouldCreateRenderer):
2153         (WebCore::MathMLElement::defaultEventHandler):
2154         * mathml/MathMLSelectElement.cpp:
2155         (WebCore::MathMLSelectElement::getSelectedActionChild):
2156         (WebCore::MathMLSelectElement::getSelectedSemanticsChild):
2157         * rendering/mathml/RenderMathMLFenced.cpp:
2158         (WebCore::RenderMathMLFenced::updateFromElement):
2159
2160 2016-08-02  Ryan Haddad  <ryanhaddad@apple.com>
2161
2162         Attempt to fix build after r204014.
2163
2164         Unreviewed build fix.
2165
2166         * loader/mac/ResourceLoaderMac.mm:
2167         (WebCore::ResourceLoader::willCacheResponse):
2168
2169 2016-08-02  Chris Dumez  <cdumez@apple.com>
2170
2171         [WebIDL] Implement overload resolution algorithm
2172         https://bugs.webkit.org/show_bug.cgi?id=160394
2173
2174         Reviewed by Darin Adler.
2175
2176         Implement overload resolution algorithm:
2177         - http://heycam.github.io/webidl/#es-overloads
2178
2179         This means that our support for operation overloading in our IDL is
2180         now a lot more extensive than it used to be and is now compliant with
2181         the Web IDL specification.
2182
2183         In particular, overloading should now work for a lot more parameter
2184         types which means that:
2185         - We should be able to drop some custom bindings code in a follow-up patch.
2186         - We will be able to drop the [StrictTypeChecking] attribute which was
2187           a hack used to make overloading work for parameters of type DOMString.
2188
2189         Also, the order of the overloads in the IDL no longer impacts the
2190         generated bindings code. It used to be that you needed to put the
2191         overloads with the more specific parameter types first in order for the
2192         generated bindings code to be somewhat correct.
2193
2194         No new tests, rebaselined bindings tests.
2195
2196         * bindings/scripts/CodeGenerator.pm:
2197         (IsStringOrEnumType):
2198         * bindings/scripts/CodeGeneratorJS.pm:
2199         (IsNullableType):
2200         (StripNullable):
2201         (ComputeEffectiveOverloadSet):
2202         (AreTypesDistinguishableForOverloadResolution):
2203         (GetDistinguishingArgumentIndex):
2204         (GetOverloadThatMatches):
2205         (GenerateOverloadedFunction):
2206         * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
2207         (WebCore::jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperation):
2208         * bindings/scripts/test/JS/JSTestObj.cpp:
2209         (WebCore::jsTestObjPrototypeFunctionEnabledAtRuntimeOperation):
2210         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
2211         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1):
2212         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter):
2213         (WebCore::jsTestObjConstructorFunctionOverloadedMethod1):
2214         (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction):
2215         (WebCore::jsTestObjConstructorFunctionOverloadedMethod12): Deleted.
2216         (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Promise): Deleted.
2217         * bindings/scripts/test/TestObj.idl:
2218         * dom/EventTarget.h:
2219         * dom/EventTarget.idl:
2220         * html/HTMLOptionsCollection.h:
2221         * html/HTMLOptionsCollection.idl:
2222         * html/HTMLSelectElement.h:
2223         (WebCore::HTMLSelectElement::add):
2224         * html/HTMLSelectElement.idl:
2225
2226 2016-08-02  Myles C. Maxfield  <mmaxfield@apple.com>
2227
2228         [macOS] Guard workaround in r203314 for only OSes which need it
2229         https://bugs.webkit.org/show_bug.cgi?id=160440
2230
2231         Reviewed by Simon Fraser.
2232
2233         The workarond introduced in r203314 only needs to be applied on
2234         certain OSes.
2235
2236         No new tests because there is no behavior change.
2237
2238         * platform/text/mac/TextBoundaries.mm:
2239         (WebCore::findNextWordFromIndex):
2240
2241 2016-08-02  Youenn Fablet  <youenn@apple.com>
2242
2243         Remove CachedResourceRequest initiatingDocumentLoader
2244         https://bugs.webkit.org/show_bug.cgi?id=160449
2245
2246         Reviewed by Alex Christensen.
2247
2248         No change of behavior.
2249
2250         * loader/DocumentLoader.cpp:
2251         (WebCore::DocumentLoader::startLoadingMainResource): Removing call to setInitiator.
2252         * loader/cache/CachedResourceRequest.cpp:
2253         (WebCore::CachedResourceRequest::setInitiator): Deleted.
2254         * loader/cache/CachedResourceRequest.h:
2255         (WebCore::CachedResourceRequest::initiatingDocumentLoader): Deleted.
2256
2257 2016-07-28  Frederic Wang  <fwang@igalia.com>
2258
2259         Move parsing of the form attribute to MathMLOperatorElement
2260         https://bugs.webkit.org/show_bug.cgi?id=160239
2261
2262         Reviewed by Darin Adler.
2263
2264         We move the parsing of the mo@form attribute to the MathMLOperatorElement class. Note that
2265         when the attribute is not explicit, the form may also be guessed by searching into the
2266         operator dictionary. Hence we also start moving the determination of the default dictionary
2267         properties. Moving the actual parsing of the corresponding attributes will be done in
2268         follow-up commits.
2269
2270         No new tests, already covered by existing tests.
2271
2272         * mathml/MathMLInlineContainerElement.cpp:
2273         (WebCore::MathMLInlineContainerElement::childrenChanged): Make the form of operators dirty
2274         if its siblings have changed.
2275         * mathml/MathMLOperatorDictionary.cpp:
2276         (WebCore::MathMLOperatorDictionary::search): Merge old getEntry functions into one helper
2277         function that returns an Optional<Entry>.
2278         (WebCore::MathMLOperatorDictionary::getEntry): Deleted
2279         * mathml/MathMLOperatorDictionary.h: Declare MathMLOperatorDictionary::find.
2280         * mathml/MathMLOperatorElement.cpp:
2281         (WebCore::MathMLOperatorElement::dictionaryProperty): We determine the operator form by
2282         parsing the corresponding attribute or by using heuristics if that attribute is not
2283         specified. We also read dictionary the corresponding dictionary properties.
2284         (WebCore::MathMLOperatorElement::flags): Return the flags read from the dictionary.
2285         (WebCore::MathMLOperatorElement::defaultLeadingSpace): Return the space read from the dictionary.
2286         (WebCore::MathMLOperatorElement::defaultTrailingSpace): Return the space read from the dictionary.
2287         (WebCore::MathMLOperatorElement::childrenChanged): Make the dictionary properties dirty.
2288         (WebCore::MathMLOperatorElement::parseAttribute): Make the dictionary properties dirty when
2289         the form changes.
2290         * mathml/MathMLOperatorElement.h: New member to store dictionary properties and expose them.
2291         * rendering/mathml/RenderMathMLFencedOperator.cpp:
2292         (WebCore::RenderMathMLFencedOperator::setOperatorProperties): We implement the case specific
2293         to anonymous mfenced operators here.
2294         * rendering/mathml/RenderMathMLFencedOperator.h: Move the m_operatorForm member here and
2295         declare the overriden function setOperatorProperties.
2296         * rendering/mathml/RenderMathMLOperator.cpp:
2297         (WebCore::RenderMathMLOperator::setOperatorProperties): Simplify this code since the logic
2298         has been moved to the element classes.
2299         (WebCore::RenderMathMLOperator::setOperatorPropertiesFromOpDictEntry): Deleted.
2300         * rendering/mathml/RenderMathMLOperator.h: Remove setOperatorPropertiesFromOpDictEntry, make
2301         members accessible to RenderMathMLFencedOperator and remove m_operatorForm.
2302
2303 2016-08-02  Frederic Wang  <fwang.igalia.com>
2304
2305         Use Optional members to store parsed MathML attributes.
2306         https://bugs.webkit.org/show_bug.cgi?id=160400
2307
2308         Reviewed by Darin Adler.
2309
2310         Parsed MathML attributes are stored on the element classes using the memoize pattern to
2311         minimize the number of parsing updates. Currently, a dirty flag for each member
2312         indicate when it must be parsed again. We change this to wrap these members into an
2313         Optional<T> container instead, where a null value indicates that the member is dirty.
2314
2315         No new tests, behavior is unchanged.
2316
2317         * mathml/MathMLElement.cpp:
2318         (WebCore::MathMLElement::cachedMathMLLength):
2319         (WebCore::MathMLElement::cachedBooleanAttribute):
2320         (WebCore::MathMLElement::parseMathVariantAttribute):
2321         (WebCore::MathMLElement::specifiedDisplayStyle):
2322         (WebCore::MathMLElement::specifiedMathVariant):
2323         * mathml/MathMLElement.h:
2324         * mathml/MathMLFractionElement.cpp:
2325         (WebCore::MathMLFractionElement::lineThickness):
2326         (WebCore::MathMLFractionElement::cachedFractionAlignment):
2327         (WebCore::MathMLFractionElement::parseAttribute):
2328         * mathml/MathMLFractionElement.h:
2329         * mathml/MathMLInlineContainerElement.cpp:
2330         (WebCore::MathMLInlineContainerElement::parseAttribute):
2331         * mathml/MathMLMathElement.cpp:
2332         (WebCore::MathMLMathElement::specifiedDisplayStyle):
2333         (WebCore::MathMLMathElement::parseAttribute):
2334         * mathml/MathMLOperatorElement.cpp:
2335         (WebCore::MathMLOperatorElement::operatorText):
2336         * mathml/MathMLPaddedElement.cpp:
2337         (WebCore::MathMLPaddedElement::parseAttribute):
2338         * mathml/MathMLPaddedElement.h:
2339         * mathml/MathMLScriptsElement.cpp:
2340         (WebCore::MathMLScriptsElement::parseAttribute):
2341         * mathml/MathMLScriptsElement.h:
2342         * mathml/MathMLSpaceElement.cpp:
2343         (WebCore::MathMLSpaceElement::parseAttribute):
2344         * mathml/MathMLSpaceElement.h:
2345         * mathml/MathMLTextElement.cpp:
2346         (WebCore::MathMLTextElement::parseAttribute):
2347         * mathml/MathMLUnderOverElement.cpp:
2348         (WebCore::MathMLUnderOverElement::parseAttribute):
2349         * mathml/MathMLUnderOverElement.h:
2350         * rendering/mathml/MathMLStyle.cpp:
2351         (WebCore::MathMLStyle::resolveMathMLStyle):
2352         * rendering/mathml/MathMLStyle.h:
2353         * rendering/mathml/RenderMathMLToken.cpp:
2354         (WebCore::mathVariant):
2355         (WebCore::RenderMathMLToken::updateMathVariantGlyph):
2356
2357 2016-08-02  Youenn Fablet  <youenn@apple.com>
2358
2359         [Fetch API] Fetch promises should not reject or resolve when ActiveDOMObjects are being stopped
2360         https://bugs.webkit.org/show_bug.cgi?id=160420
2361
2362         Reviewed by Alex Christensen.
2363
2364         Test: http/tests/fetch/fetch-in-worker-crash.html
2365
2366         Promises should not be rejected when FetchResponse/FetchRequest are stopped as ActiveDOMObject.
2367
2368         * Modules/fetch/FetchBody.h:
2369         (WebCore::FetchBody::cleanConsumePromise): Allowing to nullify the promise used to consume body.
2370         * Modules/fetch/FetchBodyOwner.cpp:
2371         (WebCore::FetchBodyOwner::stop): Nullifying the body consume promise if any.
2372         * Modules/fetch/FetchResponse.cpp:
2373         (WebCore::FetchResponse::BodyLoader::stop): Nullifying the fetch promise if any.
2374
2375 2016-08-02  Youenn Fablet  <youenn@apple.com>
2376
2377         [Fetch API] Add support to ReferrerPolicy
2378         https://bugs.webkit.org/show_bug.cgi?id=160404
2379
2380         Reviewed by Alex Christensen.
2381
2382         Tests: imported/w3c/web-platform-tests/fetch/api/basic/referrer-worker.html
2383                imported/w3c/web-platform-tests/fetch/api/basic/referrer.html
2384
2385         Refactored ThreadableLoader API to take more references.
2386
2387         Updated loading code in CachedResource to take into account referrer policy, that can be set by fetch API.
2388         To enable correct handling of OriginWhenCrossOrigin policy, the computation of the cross-origin status of a request is
2389         moved from ResourceLoader to CachedResource.
2390
2391         Referrer is passed to the loading code through HTTP headers.
2392         This was triggering preflighting for Workers request as WorkerThreadableLoader was setting the referrer.
2393         It is now done in DocumentThreadableLoader::loadRequest so that preflighting is done before setting the referrer.
2394         Note that this referrer setting is only a way to pass a specific referrer value to the loading code.
2395         CachedResource code will compute the actual referer value based on the referrer policy.
2396         It might be good in the future to have a different way of conveying this information to CachedResource, maybe
2397         through CachedResourceRequest.
2398
2399         * Modules/fetch/FetchLoader.cpp:
2400         (WebCore::FetchLoader::start): Refactoring of ThreadableLoader API.
2401         * Modules/fetch/FetchRequest.cpp:
2402         (WebCore::FetchRequest::internalRequest): Setting referrer if it has a specific value.
2403         * fileapi/FileReaderLoader.cpp:
2404         (WebCore::FileReaderLoader::start): Ractoring of ThreadableLoader API.
2405         * loader/CrossOriginPreflightChecker.cpp:
2406         (WebCore::CrossOriginPreflightChecker::startPreflight): Set referrer in the preflight request if any.
2407         (WebCore::CrossOriginPreflightChecker::doPreflight): Ditto.
2408         * loader/DocumentThreadableLoader.cpp:
2409         (WebCore::DocumentThreadableLoader::loadResourceSynchronously): Refactoring of ThreadableLoader API.
2410         (WebCore::DocumentThreadableLoader::create): Ditto.
2411         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader): Ditto.
2412         (WebCore::DocumentThreadableLoader::loadRequest): Ditto.
2413         * loader/DocumentThreadableLoader.h:
2414         (WebCore::DocumentThreadableLoader::referrer): Storing referrer in case one is defined.
2415         * loader/SubresourceLoader.cpp:
2416         (WebCore::SubresourceLoader::init): Removing of cross origin computation since it is done earlier in CachedResource.
2417         * loader/ThreadableLoader.cpp:
2418         (WebCore::ThreadableLoader::create): Refactoring of ThreadableLoader API.
2419         (WebCore::ThreadableLoader::loadResourceSynchronously): Ditto.
2420         * loader/ThreadableLoader.h:
2421         * loader/ThreadableLoaderClientWrapper.h:
2422         (WebCore::ThreadableLoaderClientWrapper::create): Ditto.
2423         (WebCore::ThreadableLoaderClientWrapper::ThreadableLoaderClientWrapper): Ditto.
2424         * loader/WorkerThreadableLoader.cpp:
2425         (WebCore::WorkerThreadableLoader::WorkerThreadableLoader): Ditto.
2426         (WebCore::WorkerThreadableLoader::loadResourceSynchronously): Removing setting of referrer in header and passing
2427         it as a parameter.
2428         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge): Ditto.
2429         * loader/WorkerThreadableLoader.h:
2430         (WebCore::WorkerThreadableLoader::create): Refactoring of ThreadableLoader API.
2431         * loader/cache/CachedResource.cpp:
2432         (WebCore::addAdditionalRequestHeadersToRequest): Computation of referrer based on referrer policy.
2433         (WebCore::CachedResource::addAdditionalRequestHeaders): Ditto.
2434         (WebCore::CachedResource::load): Computation of cross origin status.
2435         (WebCore::CachedResource::varyHeaderValuesMatch):
2436         * loader/cache/CachedResource.h:
2437         (WebCore::CachedResource::options):
2438         * page/EventSource.cpp:
2439         (WebCore::EventSource::connect): Refactoring of ThreadableLoader API.
2440         * workers/WorkerScriptLoader.cpp:
2441         (WebCore::WorkerScriptLoader::loadSynchronously): Ditto.
2442         (WebCore::WorkerScriptLoader::loadAsynchronously): Ditto.
2443         * xml/XMLHttpRequest.cpp:
2444         (WebCore::XMLHttpRequest::createRequest): Ditto.
2445
2446 2016-08-02  Brady Eidson  <beidson@apple.com>
2447
2448         Refactor data passed along for a "GetRecord" request.
2449         https://bugs.webkit.org/show_bug.cgi?id=160352
2450
2451         Reviewed by Tim Horton.
2452
2453         No new tests (No behavior change).
2454
2455         Adding this new object lets us easily add new data passed along for GetRecord
2456         requests going forward.
2457
2458         * WebCore.xcodeproj/project.pbxproj:
2459         * CMakeLists.txt:
2460
2461         * Modules/indexeddb/IDBObjectStore.cpp:
2462         (WebCore::IDBObjectStore::get):
2463
2464         * Modules/indexeddb/IDBTransaction.cpp:
2465         (WebCore::IDBTransaction::requestGetRecord):
2466         (WebCore::IDBTransaction::requestIndexRecord):
2467         (WebCore::IDBTransaction::getRecordOnServer):
2468         * Modules/indexeddb/IDBTransaction.h:
2469
2470         * Modules/indexeddb/client/IDBConnectionProxy.cpp:
2471         (WebCore::IDBClient::IDBConnectionProxy::getRecord):
2472         * Modules/indexeddb/client/IDBConnectionProxy.h:
2473
2474         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
2475         (WebCore::IDBClient::IDBConnectionToServer::getRecord):
2476         * Modules/indexeddb/client/IDBConnectionToServer.h:
2477         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
2478
2479         * Modules/indexeddb/server/IDBServer.cpp:
2480         (WebCore::IDBServer::IDBServer::getRecord):
2481         * Modules/indexeddb/server/IDBServer.h:
2482
2483         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2484         (WebCore::IDBServer::UniqueIDBDatabase::getRecord):
2485         * Modules/indexeddb/server/UniqueIDBDatabase.h:
2486
2487         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
2488         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getRecord):
2489         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
2490
2491         * Modules/indexeddb/shared/IDBGetRecordData.cpp: Added.
2492         (WebCore::IDBGetRecordData::isolatedCopy):
2493         * Modules/indexeddb/shared/IDBGetRecordData.h: Added.
2494         (WebCore::IDBGetRecordData::encode):
2495         (WebCore::IDBGetRecordData::decode):
2496
2497         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
2498         (WebCore::InProcessIDBServer::getRecord):
2499         * Modules/indexeddb/shared/InProcessIDBServer.h:
2500
2501 2016-08-01  Youenn Fablet  <youenn@apple.com>
2502
2503         [Fetch API] Pass directly FetchRequest fetch options to ThreadableLoader
2504         https://bugs.webkit.org/show_bug.cgi?id=160407
2505
2506         Reviewed by Sam Weinig.
2507
2508         No change of behavior.
2509
2510         Added a ResourceLoaderOptions constructor that takes a FetchOptions as input.
2511         Removed setters and getters of ResourceLoaderOptions as it is a struct.
2512         Updated member fields accordingly.
2513
2514         Updated code accordingly.
2515         Removed explicit option setting if it is the same as the default value.
2516
2517         * Modules/fetch/FetchLoader.cpp:
2518         (WebCore::FetchLoader::start):
2519         * css/CSSFontFaceSrcValue.cpp:
2520         (WebCore::CSSFontFaceSrcValue::cachedFont):
2521         * css/CSSImageSetValue.cpp:
2522         (WebCore::CSSImageSetValue::cachedImageSet):
2523         * css/CSSImageValue.cpp:
2524         (WebCore::CSSImageValue::cachedImage):
2525         * dom/ScriptElement.cpp:
2526         (WebCore::ScriptElement::requestScript):
2527         * fileapi/FileReaderLoader.cpp:
2528         (WebCore::FileReaderLoader::start):
2529         * html/HTMLLinkElement.cpp:
2530         (WebCore::HTMLLinkElement::process):
2531         * inspector/InspectorNetworkAgent.cpp:
2532         (WebCore::InspectorNetworkAgent::loadResource):
2533         * loader/CrossOriginPreflightChecker.cpp:
2534         (WebCore::CrossOriginPreflightChecker::validatePreflightResponse):
2535         (WebCore::CrossOriginPreflightChecker::startPreflight):
2536         * loader/DocumentThreadableLoader.cpp:
2537         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
2538         (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest):
2539         (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest):
2540         (WebCore::DocumentThreadableLoader::redirectReceived):
2541         (WebCore::DocumentThreadableLoader::didReceiveResponse):
2542         (WebCore::DocumentThreadableLoader::preflightSuccess):
2543         (WebCore::DocumentThreadableLoader::loadRequest):
2544         * loader/ImageLoader.cpp:
2545         (WebCore::ImageLoader::updateFromElement):
2546         * loader/ResourceLoader.cpp:
2547         (WebCore::ResourceLoader::ResourceLoader):
2548         (WebCore::ResourceLoader::init):
2549         (WebCore::ResourceLoader::start):
2550         (WebCore::ResourceLoader::setDefersLoading):
2551         (WebCore::ResourceLoader::setDataBufferingPolicy):
2552         (WebCore::ResourceLoader::addDataOrBuffer):
2553         (WebCore::ResourceLoader::willSendRequestInternal):
2554         (WebCore::ResourceLoader::didReceiveResponse):
2555         (WebCore::ResourceLoader::didReceiveDataOrBuffer):
2556         (WebCore::ResourceLoader::didFinishLoadingOnePart):
2557         (WebCore::ResourceLoader::cleanupForError):
2558         (WebCore::ResourceLoader::shouldUseCredentialStorage):
2559         (WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
2560         * loader/ResourceLoader.h:
2561         (WebCore::ResourceLoader::shouldSendResourceLoadCallbacks):
2562         (WebCore::ResourceLoader::setSendCallbackPolicy):
2563         (WebCore::ResourceLoader::shouldSniffContent):
2564         (WebCore::ResourceLoader::shouldIncludeCertificateInfo):
2565         * loader/ResourceLoaderOptions.h:
2566         (WebCore::ResourceLoaderOptions::ResourceLoaderOptions):
2567         (WebCore::ResourceLoaderOptions::sendLoadCallbacks): Deleted.
2568         (WebCore::ResourceLoaderOptions::setSendLoadCallbacks): Deleted.
2569         (WebCore::ResourceLoaderOptions::sniffContent): Deleted.
2570         (WebCore::ResourceLoaderOptions::setSniffContent): Deleted.
2571         (WebCore::ResourceLoaderOptions::dataBufferingPolicy): Deleted.
2572         (WebCore::ResourceLoaderOptions::setDataBufferingPolicy): Deleted.
2573         (WebCore::ResourceLoaderOptions::allowCredentials): Deleted.
2574         (WebCore::ResourceLoaderOptions::setAllowCredentials): Deleted.
2575         (WebCore::ResourceLoaderOptions::securityCheck): Deleted.
2576         (WebCore::ResourceLoaderOptions::setSecurityCheck): Deleted.
2577         (WebCore::ResourceLoaderOptions::certificateInfoPolicy): Deleted.
2578         (WebCore::ResourceLoaderOptions::setCertificateInfoPolicy): Deleted.
2579         (WebCore::ResourceLoaderOptions::contentSecurityPolicyImposition): Deleted.
2580         (WebCore::ResourceLoaderOptions::setContentSecurityPolicyImposition): Deleted.
2581         (WebCore::ResourceLoaderOptions::defersLoadingPolicy): Deleted.
2582         (WebCore::ResourceLoaderOptions::setDefersLoadingPolicy): Deleted.
2583         (WebCore::ResourceLoaderOptions::cachingPolicy): Deleted.
2584         (WebCore::ResourceLoaderOptions::setCachingPolicy): Deleted.
2585         * loader/SubresourceLoader.cpp:
2586         (WebCore::SubresourceLoader::checkRedirectionCrossOriginAccessControl):
2587         * loader/TextTrackLoader.cpp:
2588         (WebCore::TextTrackLoader::load):
2589         * loader/cache/CachedRawResource.cpp:
2590         (WebCore::CachedRawResource::setDataBufferingPolicy):
2591         * loader/cache/CachedResource.cpp:
2592         (WebCore::CachedResource::load):
2593         * loader/cache/CachedResource.h:
2594         (WebCore::CachedResource::shouldSendResourceLoadCallbacks):
2595         (WebCore::CachedResource::dataBufferingPolicy):
2596         (WebCore::CachedResource::allowsCaching):
2597         * loader/cache/CachedResourceLoader.cpp:
2598         (WebCore::CachedResourceLoader::canRequest):
2599         * loader/cache/CachedResourceRequest.cpp:
2600         (WebCore::CachedResourceRequest::setAsPotentiallyCrossOrigin):
2601         * loader/cache/CachedResourceRequest.h:
2602         (WebCore::CachedResourceRequest::allowsCaching):
2603         * loader/cache/CachedResourceRequestInitiators.cpp:
2604         (WebCore::CachedResourceRequestInitiators::CachedResourceRequestInitiators):
2605         * loader/cache/CachedResourceRequestInitiators.h:
2606         * loader/mac/ResourceLoaderMac.mm:
2607         (WebCore::ResourceLoader::willCacheResponse):
2608         (WebCore::ResourceLoader::didReceiveDataArray):
2609         * page/EventSource.cpp:
2610         (WebCore::EventSource::connect):
2611         * style/StylePendingResources.cpp:
2612         (WebCore::Style::loadPendingImage):
2613         (WebCore::Style::loadPendingSVGFilters):
2614         * svg/SVGFEImageElement.cpp:
2615         (WebCore::SVGFEImageElement::requestImageResource):
2616         * svg/SVGFontFaceUriElement.cpp:
2617         (WebCore::SVGFontFaceUriElement::loadFont):
2618         * svg/SVGUseElement.cpp:
2619         (WebCore::SVGUseElement::updateExternalDocument):
2620         * workers/WorkerScriptLoader.cpp:
2621         (WebCore::WorkerScriptLoader::loadSynchronously):
2622         (WebCore::WorkerScriptLoader::loadAsynchronously):
2623         * xml/XMLHttpRequest.cpp:
2624         (WebCore::XMLHttpRequest::createRequest):
2625
2626 2016-08-01  Carlos Garcia Campos  <cgarcia@igalia.com>
2627
2628         [GTK] Move the redirected XComposite window to the web process
2629         https://bugs.webkit.org/show_bug.cgi?id=160389
2630
2631         Reviewed by Žan Doberšek.
2632
2633         Add helper methods to PlatformDisplayX11 to query X extensions supported by the display.
2634
2635         * platform/graphics/x11/PlatformDisplayX11.cpp:
2636         (WebCore::PlatformDisplayX11::supportsXComposite):
2637         (WebCore::PlatformDisplayX11::supportsXDamage):
2638         * platform/graphics/x11/PlatformDisplayX11.h:
2639
2640 2016-08-01  Andreas Kling  <akling@apple.com>
2641
2642         Shrink MediaQuerySets to fit after parsing.
2643         <https://webkit.org/b/160419>
2644
2645         Reviewed by Antti Koivisto.
2646
2647         Add shrinkToFit() helpers to MediaQuerySet and MediaQuery
2648         and call it after parsing to remove extra capacity from their
2649         internal vectors.
2650
2651         This reduces memory usage by 1.24MB on theverge.com.
2652
2653         * css/CSSParser.cpp:
2654         (WebCore::CSSParser::createMediaRule):
2655         * css/MediaList.cpp:
2656         (WebCore::MediaQuerySet::parse):
2657         (WebCore::MediaQuerySet::shrinkToFit):
2658         * css/MediaList.h:
2659         * css/MediaQuery.h:
2660         (WebCore::MediaQuery::shrinkToFit):
2661
2662 2016-08-01  Tim Horton  <timothy_horton@apple.com>
2663
2664         <attachment> action label doesn't wrap, but needs to for some localizations
2665         https://bugs.webkit.org/show_bug.cgi?id=160431
2666         <rdar://problem/27526464>
2667
2668         Reviewed by Simon Fraser.
2669
2670         Test: fast/attachment/attachment-wrapping-action.html
2671
2672         * rendering/RenderThemeIOS.mm:
2673         (WebCore::AttachmentInfo::buildWrappedLines):
2674         (WebCore::AttachmentInfo::AttachmentInfo):
2675         (WebCore::AttachmentInfo::buildTitleLines): Deleted.
2676         Rework buildTitleLines into buildWrappedLines so that we have a
2677         generic way to add lines that wrap up to N lines and then center-truncate.
2678
2679         Make use of it for the action text, and follow the same rules/width as
2680         the title text already does.
2681
2682 2016-08-01  Anders Carlsson  <andersca@apple.com>
2683
2684         Build fix.
2685
2686         * WebCore.xcodeproj/project.pbxproj:
2687
2688 2016-08-01  Anders Carlsson  <andersca@apple.com>
2689
2690         Another build fix.
2691
2692         * WebCore.xcodeproj/project.pbxproj:
2693
2694 2016-08-01  Anders Carlsson  <andersca@apple.com>
2695
2696         Freeze the last of the HTML Objective-C bindings
2697         https://bugs.webkit.org/show_bug.cgi?id=160430
2698
2699         Reviewed by Tim Horton.
2700
2701         Also, remove a bunch of form validation related methods that were never exposed/used.
2702
2703         * DerivedSources.make:
2704         * WebCore.xcodeproj/project.pbxproj:
2705         * bindings/objc/DOMBlob.h: Added.
2706         * bindings/objc/DOMBlob.mm: Added.
2707         * bindings/objc/DOMBlobInternal.h: Added.
2708         * bindings/objc/DOMDOMTokenList.h: Added.
2709         * bindings/objc/DOMDOMTokenList.mm: Added.
2710         * bindings/objc/DOMDOMTokenListInternal.h: Added.
2711         * bindings/objc/DOMFile.h: Added.
2712         * bindings/objc/DOMFile.mm: Added.
2713         * bindings/objc/DOMFileInternal.h: Added.
2714         * bindings/objc/DOMFileList.h: Added.
2715         * bindings/objc/DOMFileList.mm: Added.
2716         * bindings/objc/DOMFileListInternal.h: Added.
2717         * bindings/objc/DOMHTMLButtonElement.mm:
2718         * bindings/objc/DOMHTMLFieldSetElement.mm:
2719         * bindings/objc/DOMHTMLInputElement.mm:
2720         * bindings/objc/DOMHTMLInputElementPrivate.h:
2721         * bindings/objc/DOMHTMLObjectElement.mm:
2722         * bindings/objc/DOMHTMLSelectElement.mm:
2723         * bindings/objc/DOMHTMLTextAreaElement.mm:
2724         * bindings/objc/DOMHTMLTextAreaElementPrivate.h:
2725         * bindings/objc/DOMMediaError.h: Added.
2726         * bindings/objc/DOMMediaError.mm: Added.
2727         * bindings/objc/DOMMediaErrorInternal.h: Added.
2728         * bindings/objc/DOMTimeRanges.h: Added.
2729         * bindings/objc/DOMTimeRanges.mm: Added.
2730         * bindings/objc/DOMTimeRangesInternal.h: Added.
2731
2732 2016-08-01  Anders Carlsson  <andersca@apple.com>
2733
2734         Fix build.
2735
2736         * WebCore.xcodeproj/project.pbxproj:
2737
2738 2016-08-01  Anders Carlsson  <andersca@apple.com>
2739
2740         Freeze all the DOMHTML* Objective-C bindings
2741         https://bugs.webkit.org/show_bug.cgi?id=160424
2742
2743         Reviewed by Tim Horton.
2744
2745         * DerivedSources.make:
2746         * WebCore.xcodeproj/project.pbxproj:
2747         * bindings/objc/DOMHTMLAnchorElement.h: Added.
2748         * bindings/objc/DOMHTMLAnchorElement.mm: Added.
2749         * bindings/objc/DOMHTMLAnchorElementInternal.h: Added.
2750         * bindings/objc/DOMHTMLAppletElement.h: Added.
2751         * bindings/objc/DOMHTMLAppletElement.mm: Added.
2752         * bindings/objc/DOMHTMLAppletElementInternal.h: Added.
2753         * bindings/objc/DOMHTMLAreaElement.h: Added.
2754         * bindings/objc/DOMHTMLAreaElement.mm: Added.
2755         * bindings/objc/DOMHTMLAreaElementInternal.h: Added.
2756         * bindings/objc/DOMHTMLBRElement.h: Added.
2757         * bindings/objc/DOMHTMLBRElement.mm: Added.
2758         * bindings/objc/DOMHTMLBRElementInternal.h: Added.
2759         * bindings/objc/DOMHTMLBaseElement.h: Added.
2760         * bindings/objc/DOMHTMLBaseElement.mm: Added.
2761         * bindings/objc/DOMHTMLBaseElementInternal.h: Added.
2762         * bindings/objc/DOMHTMLBaseFontElement.h: Added.
2763         * bindings/objc/DOMHTMLBaseFontElement.mm: Added.
2764         * bindings/objc/DOMHTMLBaseFontElementInternal.h: Added.
2765         * bindings/objc/DOMHTMLBodyElement.h: Added.
2766         * bindings/objc/DOMHTMLBodyElement.mm: Added.
2767         * bindings/objc/DOMHTMLBodyElementInternal.h: Added.
2768         * bindings/objc/DOMHTMLButtonElement.h: Added.
2769         * bindings/objc/DOMHTMLButtonElement.mm: Added.
2770         * bindings/objc/DOMHTMLButtonElementInternal.h: Added.
2771         * bindings/objc/DOMHTMLCanvasElement.h: Added.
2772         * bindings/objc/DOMHTMLCanvasElement.mm: Added.
2773         * bindings/objc/DOMHTMLCanvasElementInternal.h: Added.
2774         * bindings/objc/DOMHTMLCollection.h: Added.
2775         * bindings/objc/DOMHTMLCollection.mm: Added.
2776         * bindings/objc/DOMHTMLCollectionInternal.h: Added.
2777         * bindings/objc/DOMHTMLDListElement.h: Added.
2778         * bindings/objc/DOMHTMLDListElement.mm: Added.
2779         * bindings/objc/DOMHTMLDListElementInternal.h: Added.
2780         * bindings/objc/DOMHTMLDirectoryElement.h: Added.
2781         * bindings/objc/DOMHTMLDirectoryElement.mm: Added.
2782         * bindings/objc/DOMHTMLDirectoryElementInternal.h: Added.
2783         * bindings/objc/DOMHTMLDivElement.h: Added.
2784         * bindings/objc/DOMHTMLDivElement.mm: Added.
2785         * bindings/objc/DOMHTMLDivElementInternal.h: Added.
2786         * bindings/objc/DOMHTMLDocument.h: Added.
2787         * bindings/objc/DOMHTMLDocument.mm: Added.
2788         * bindings/objc/DOMHTMLDocumentInternal.h: Added.
2789         * bindings/objc/DOMHTMLElement.h: Added.
2790         * bindings/objc/DOMHTMLElement.mm: Added.
2791         * bindings/objc/DOMHTMLElementInternal.h: Added.
2792         * bindings/objc/DOMHTMLEmbedElement.h: Added.
2793         * bindings/objc/DOMHTMLEmbedElement.mm: Added.
2794         * bindings/objc/DOMHTMLEmbedElementInternal.h: Added.
2795         * bindings/objc/DOMHTMLFieldSetElement.h: Added.
2796         * bindings/objc/DOMHTMLFieldSetElement.mm: Added.
2797         * bindings/objc/DOMHTMLFieldSetElementInternal.h: Added.
2798         * bindings/objc/DOMHTMLFontElement.h: Added.
2799         * bindings/objc/DOMHTMLFontElement.mm: Added.
2800         * bindings/objc/DOMHTMLFontElementInternal.h: Added.
2801         * bindings/objc/DOMHTMLFormElement.h: Added.
2802         * bindings/objc/DOMHTMLFormElement.mm: Added.
2803         * bindings/objc/DOMHTMLFormElementInternal.h: Added.
2804         * bindings/objc/DOMHTMLFrameElement.h: Added.
2805         * bindings/objc/DOMHTMLFrameElement.mm: Added.
2806         * bindings/objc/DOMHTMLFrameElementInternal.h: Added.
2807         * bindings/objc/DOMHTMLFrameSetElement.h: Added.
2808         * bindings/objc/DOMHTMLFrameSetElement.mm: Added.
2809         * bindings/objc/DOMHTMLFrameSetElementInternal.h: Added.
2810         * bindings/objc/DOMHTMLHRElement.h: Added.
2811         * bindings/objc/DOMHTMLHRElement.mm: Added.
2812         * bindings/objc/DOMHTMLHRElementInternal.h: Added.
2813         * bindings/objc/DOMHTMLHeadElement.h: Added.
2814         * bindings/objc/DOMHTMLHeadElement.mm: Added.
2815         * bindings/objc/DOMHTMLHeadElementInternal.h: Added.
2816         * bindings/objc/DOMHTMLHeadingElement.h: Added.
2817         * bindings/objc/DOMHTMLHeadingElement.mm: Added.
2818         * bindings/objc/DOMHTMLHeadingElementInternal.h: Added.
2819         * bindings/objc/DOMHTMLHtmlElement.h: Added.
2820         * bindings/objc/DOMHTMLHtmlElement.mm: Added.
2821         * bindings/objc/DOMHTMLHtmlElementInternal.h: Added.
2822         * bindings/objc/DOMHTMLIFrameElement.h: Added.
2823         * bindings/objc/DOMHTMLIFrameElement.mm: Added.
2824         * bindings/objc/DOMHTMLIFrameElementInternal.h: Added.
2825         * bindings/objc/DOMHTMLImageElement.h: Added.
2826         * bindings/objc/DOMHTMLImageElement.mm: Added.
2827         * bindings/objc/DOMHTMLImageElementInternal.h: Added.
2828         * bindings/objc/DOMHTMLInputElement.h: Added.
2829         * bindings/objc/DOMHTMLInputElement.mm: Added.
2830         * bindings/objc/DOMHTMLInputElementInternal.h: Added.
2831         * bindings/objc/DOMHTMLInputElementPrivate.h: Added.
2832         * bindings/objc/DOMHTMLLIElement.h: Added.
2833         * bindings/objc/DOMHTMLLIElement.mm: Added.
2834         * bindings/objc/DOMHTMLLIElementInternal.h: Added.
2835         * bindings/objc/DOMHTMLLabelElement.h: Added.
2836         * bindings/objc/DOMHTMLLabelElement.mm: Added.
2837         * bindings/objc/DOMHTMLLabelElementInternal.h: Added.
2838         * bindings/objc/DOMHTMLLegendElement.h: Added.
2839         * bindings/objc/DOMHTMLLegendElement.mm: Added.
2840         * bindings/objc/DOMHTMLLegendElementInternal.h: Added.
2841         * bindings/objc/DOMHTMLLinkElement.h: Added.
2842         * bindings/objc/DOMHTMLLinkElement.mm: Added.
2843         * bindings/objc/DOMHTMLLinkElementInternal.h: Added.
2844         * bindings/objc/DOMHTMLMapElement.h: Added.
2845         * bindings/objc/DOMHTMLMapElement.mm: Added.
2846         * bindings/objc/DOMHTMLMapElementInternal.h: Added.
2847         * bindings/objc/DOMHTMLMarqueeElement.h: Added.
2848         * bindings/objc/DOMHTMLMarqueeElement.mm: Added.
2849         * bindings/objc/DOMHTMLMarqueeElementInternal.h: Added.
2850         * bindings/objc/DOMHTMLMediaElement.h: Added.
2851         * bindings/objc/DOMHTMLMediaElement.mm: Added.
2852         * bindings/objc/DOMHTMLMediaElementInternal.h: Added.
2853         * bindings/objc/DOMHTMLMenuElement.h: Added.
2854         * bindings/objc/DOMHTMLMenuElement.mm: Added.
2855         * bindings/objc/DOMHTMLMenuElementInternal.h: Added.
2856         * bindings/objc/DOMHTMLMetaElement.h: Added.
2857         * bindings/objc/DOMHTMLMetaElement.mm: Added.
2858         * bindings/objc/DOMHTMLMetaElementInternal.h: Added.
2859         * bindings/objc/DOMHTMLModElement.h: Added.
2860         * bindings/objc/DOMHTMLModElement.mm: Added.
2861         * bindings/objc/DOMHTMLModElementInternal.h: Added.
2862         * bindings/objc/DOMHTMLOListElement.h: Added.
2863         * bindings/objc/DOMHTMLOListElement.mm: Added.
2864         * bindings/objc/DOMHTMLOListElementInternal.h: Added.
2865         * bindings/objc/DOMHTMLObjectElement.h: Added.
2866         * bindings/objc/DOMHTMLObjectElement.mm: Added.
2867         * bindings/objc/DOMHTMLObjectElementInternal.h: Added.
2868         * bindings/objc/DOMHTMLObjectElementPrivate.h: Added.
2869         * bindings/objc/DOMHTMLOptGroupElement.h: Added.
2870         * bindings/objc/DOMHTMLOptGroupElement.mm: Added.
2871         * bindings/objc/DOMHTMLOptGroupElementInternal.h: Added.
2872         * bindings/objc/DOMHTMLOptionElement.h: Added.
2873         * bindings/objc/DOMHTMLOptionElement.mm: Added.
2874         * bindings/objc/DOMHTMLOptionElementInternal.h: Added.
2875         * bindings/objc/DOMHTMLOptionsCollection.h: Added.
2876         * bindings/objc/DOMHTMLOptionsCollection.mm: Added.
2877         * bindings/objc/DOMHTMLOptionsCollectionInternal.h: Added.
2878         * bindings/objc/DOMHTMLParagraphElement.h: Added.
2879         * bindings/objc/DOMHTMLParagraphElement.mm: Added.
2880         * bindings/objc/DOMHTMLParagraphElementInternal.h: Added.
2881         * bindings/objc/DOMHTMLParamElement.h: Added.
2882         * bindings/objc/DOMHTMLParamElement.mm: Added.
2883         * bindings/objc/DOMHTMLParamElementInternal.h: Added.
2884         * bindings/objc/DOMHTMLPreElement.h: Added.
2885         * bindings/objc/DOMHTMLPreElement.mm: Added.
2886         * bindings/objc/DOMHTMLPreElementInternal.h: Added.
2887         * bindings/objc/DOMHTMLQuoteElement.h: Added.
2888         * bindings/objc/DOMHTMLQuoteElement.mm: Added.
2889         * bindings/objc/DOMHTMLQuoteElementInternal.h: Added.
2890         * bindings/objc/DOMHTMLScriptElement.h: Added.
2891         * bindings/objc/DOMHTMLScriptElement.mm: Added.
2892         * bindings/objc/DOMHTMLScriptElementInternal.h: Added.
2893         * bindings/objc/DOMHTMLSelectElement.h: Added.
2894         * bindings/objc/DOMHTMLSelectElement.mm: Added.
2895         * bindings/objc/DOMHTMLSelectElementInternal.h: Added.
2896         * bindings/objc/DOMHTMLStyleElement.h: Added.
2897         * bindings/objc/DOMHTMLStyleElement.mm: Added.
2898         * bindings/objc/DOMHTMLStyleElementInternal.h: Added.
2899         * bindings/objc/DOMHTMLTableCaptionElement.h: Added.
2900         * bindings/objc/DOMHTMLTableCaptionElement.mm: Added.
2901         * bindings/objc/DOMHTMLTableCaptionElementInternal.h: Added.
2902         * bindings/objc/DOMHTMLTableCellElement.h: Added.
2903         * bindings/objc/DOMHTMLTableCellElement.mm: Added.
2904         * bindings/objc/DOMHTMLTableCellElementInternal.h: Added.
2905         * bindings/objc/DOMHTMLTableColElement.h: Added.
2906         * bindings/objc/DOMHTMLTableColElement.mm: Added.
2907         * bindings/objc/DOMHTMLTableColElementInternal.h: Added.
2908         * bindings/objc/DOMHTMLTableElement.h: Added.
2909         * bindings/objc/DOMHTMLTableElement.mm: Added.
2910         * bindings/objc/DOMHTMLTableElementInternal.h: Added.
2911         * bindings/objc/DOMHTMLTableRowElement.h: Added.
2912         * bindings/objc/DOMHTMLTableRowElement.mm: Added.
2913         * bindings/objc/DOMHTMLTableRowElementInternal.h: Added.
2914         * bindings/objc/DOMHTMLTableSectionElement.h: Added.
2915         * bindings/objc/DOMHTMLTableSectionElement.mm: Added.
2916         * bindings/objc/DOMHTMLTableSectionElementInternal.h: Added.
2917         * bindings/objc/DOMHTMLVideoElement.h: Added.
2918         * bindings/objc/DOMHTMLVideoElement.mm: Added.
2919         * bindings/objc/DOMHTMLVideoElementInternal.h: Added.
2920
2921 2016-08-01  Antti Koivisto  <antti@apple.com>
2922
2923         REGRESSION(r198943): drop-down menu navigation on fiddlevideo.com doesn't appear on iOS, works on OS X
2924         https://bugs.webkit.org/show_bug.cgi?id=160406
2925         rdar://problem/26310261
2926
2927         Reviewed by Simon Fraser.
2928
2929         On iOS we generate synthetic mouse events from taps. Click event is generated on tap only if the move event
2930         doesn't produce visible changes to the document. This is important to make certain types of drop down menus
2931         work.
2932
2933         The information on mutations is passed via WKContentObservation side channel which is updated from varous parts
2934         of the code. Newly visible elements are detected CheckForVisibilityChangeOnRecalcStyle during style resolution.
2935         This got broken by the style refactoring because it assumes that renderer is mutated along with style computation.
2936         However mutation is now a separate step performed by RenderTreeUpdater.
2937
2938         Fix by moving CheckForVisibilityChange to RenderTreeUpdater.
2939
2940         Test: fast/content-observation/click-event-suppression-on-content-change.html
2941
2942         * style/RenderTreeUpdater.cpp:
2943         (WebCore::RenderTreeUpdater::Parent::Parent):
2944         (WebCore::RenderTreeUpdater::updateElementRenderer):
2945         (WebCore::RenderTreeUpdater::tearDownRenderer):
2946         (WebCore::elementImplicitVisibility):
2947         (WebCore::CheckForVisibilityChange::CheckForVisibilityChange):
2948         (WebCore::CheckForVisibilityChange::~CheckForVisibilityChange):
2949         * style/StyleTreeResolver.cpp:
2950         (WebCore::Style::TreeResolver::createAnimatedElementUpdate):
2951         (WebCore::Style::TreeResolver::pushParent):
2952         (WebCore::Style::TreeResolver::resolveComposedTree):
2953         (WebCore::Style::elementImplicitVisibility): Deleted.
2954         (WebCore::Style::CheckForVisibilityChangeOnRecalcStyle::CheckForVisibilityChangeOnRecalcStyle): Deleted.
2955         (WebCore::Style::CheckForVisibilityChangeOnRecalcStyle::~CheckForVisibilityChangeOnRecalcStyle): Deleted.
2956
2957 2016-08-01  Eric Carlson  <eric.carlson@apple.com>
2958
2959         [iOS] A video element that does not pause after exiting from fullscreen should be allowed to continue playing inline
2960         https://bugs.webkit.org/show_bug.cgi?id=160416
2961         <rdar://problem/27409854>
2962
2963         Reviewed by Alex Christensen.
2964
2965         * html/HTMLMediaElement.cpp:
2966         (WebCore::HTMLMediaElement::exitFullscreen): If playback normally requires fullscreen but the 
2967         element was not paused when exiting from fullscreen, set the 'playsinline' attribute so we won't
2968         force fullscreen if playback is paused and resumes, and set the 'controls' attribute so the
2969         user can control playback.
2970
2971 2016-08-01  Anders Carlsson  <andersca@apple.com>
2972
2973         Build fix.
2974
2975         * WebCore.xcodeproj/project.pbxproj:
2976
2977 2016-08-01  Eric Carlson  <eric.carlson@apple.com>
2978
2979         [Mac][iOS] Adopt MediaRemote "seek to playback position"
2980         https://bugs.webkit.org/show_bug.cgi?id=160405
2981         <rdar://problem/27547583>
2982
2983         Reviewed by Dean Jackson.
2984
2985         Test: media/remote-control-command-seek.html
2986
2987         * Modules/webaudio/AudioContext.h: Update for didReceiveRemoteControlCommand argument change.
2988
2989         * html/HTMLMediaElement.cpp:
2990         (WebCore::HTMLMediaElement::didReceiveRemoteControlCommand): Support SeekToPlaybackPositionCommand.
2991         Drive by fix, support Stop command.
2992         (WebCore::HTMLMediaElement::supportsSeeking): New.
2993         * html/HTMLMediaElement.h:
2994
2995         * platform/RemoteCommandListener.h:
2996         (WebCore::RemoteCommandListenerClient::didReceiveRemoteControlCommand): Add command argument.
2997         (WebCore::RemoteCommandListenerClient::supportsSeeking): New.
2998         (WebCore::RemoteCommandListener::updateSupportedCommands): Ditto.
2999         (WebCore::RemoteCommandListener::client): Ditto.
3000
3001         * platform/audio/PlatformMediaSession.cpp:
3002         (WebCore::PlatformMediaSession::didReceiveRemoteControlCommand): Add command argument.
3003         (WebCore::PlatformMediaSession::supportsSeeking): New, pass through to client.
3004         * platform/audio/PlatformMediaSession.h:
3005
3006         * platform/audio/PlatformMediaSessionManager.cpp:
3007         (WebCore::PlatformMediaSessionManager::setCurrentSession): Tell remote command listener to
3008         update supported commands.
3009         (WebCore::PlatformMediaSessionManager::currentSession): Make const.
3010         (WebCore::PlatformMediaSessionManager::didReceiveRemoteControlCommand): Add command argument.
3011         (WebCore::PlatformMediaSessionManager::supportsSeeking): New, pass through to session.
3012         * platform/audio/PlatformMediaSessionManager.h:
3013
3014         * platform/ios/RemoteCommandListenerIOS.h:
3015         (WebCore::RemoteCommandListenerIOS::createWeakPtr):
3016         * platform/ios/RemoteCommandListenerIOS.mm:
3017         (WebCore::RemoteCommandListenerIOS::RemoteCommandListenerIOS): Support changePlaybackPositionCommand.
3018         (WebCore::RemoteCommandListenerIOS::~RemoteCommandListenerIOS): Remove seekToTime target.
3019         (WebCore::RemoteCommandListenerIOS::updateSupportedCommands): Update changePlaybackPositionCommand.
3020
3021         * platform/mac/MediaRemoteSoftLink.cpp:
3022         * platform/mac/MediaRemoteSoftLink.h:
3023
3024         * platform/mac/RemoteCommandListenerMac.h:
3025         * platform/mac/RemoteCommandListenerMac.mm:
3026         (WebCore::RemoteCommandListenerMac::updateSupportedCommands): New, split out of constructor.
3027         (WebCore::RemoteCommandListenerMac::RemoteCommandListenerMac): Split setup logic out into
3028         updateSupportedCommands. Support MRMediaRemoteCommandSeekToPlaybackPosition. Don't assert when
3029         receiving an unsupported command, it happens. Return error when a command isn't supported or
3030         fails.
3031
3032         * testing/Internals.cpp:
3033         (WebCore::Internals::postRemoteControlCommand): Add command argument parameter. Support
3034         seektoplaybackposition.
3035         * testing/Internals.h:
3036         * testing/Internals.idl:
3037
3038 2016-08-01  Anders Carlsson  <andersca@apple.com>
3039
3040         Freeze DOMHTMLTitleElement and DOMHTMLUListElement bindings
3041         https://bugs.webkit.org/show_bug.cgi?id=160415
3042
3043         Reviewed by Sam Weinig.
3044
3045         * DerivedSources.make:
3046         * WebCore.xcodeproj/project.pbxproj:
3047         * bindings/objc/DOMHTMLTitleElement.h: Added.
3048         * bindings/objc/DOMHTMLTitleElement.mm: Added.
3049         * bindings/objc/DOMHTMLTitleElementInternal.h: Added.
3050         * bindings/objc/DOMHTMLUListElement.h: Added.
3051         * bindings/objc/DOMHTMLUListElement.mm: Added.
3052         * bindings/objc/DOMHTMLUListElementInternal.h: Added.
3053
3054 2016-08-01  Antti Koivisto  <antti@apple.com>
3055
3056         REGRESSION (r196383): Drop down CSS menus not working on cnet.com, apmex.com
3057         https://bugs.webkit.org/show_bug.cgi?id=160390
3058
3059         Reviewed by Simon Fraser.
3060
3061         The case here is that we have a rule like
3062
3063             .enableHover:hover .child { ... }
3064
3065         and the "enableHover" class is added dynamically. The class change invalidation optimization code would figure out
3066         that nothing needs to be invalidated as the class change doesn't make the rule match (since :hover doesn't match).
3067
3068         However for event driven hover to actually work the hover element needs to have its childrenAffectedByHover bit set.
3069         This bits is set when the selector match is attempted, whether it actually matches or not. Since we optimized away
3070         the style invalidation we never set the bit either.
3071
3072         Fix by treating :hover as always matching (==ignored) when collecting rules for invalidation optimization purposes.
3073         Dynamic pseudo elements are already treated this way for similar reasons.
3074
3075         Test: fast/selectors/hover-invalidation-descendant-dynamic.html
3076
3077         * css/SelectorChecker.cpp:
3078         (WebCore::SelectorChecker::checkOne):
3079
3080             Match always in CollectingRulesIgnoringVirtualPseudoElements mode (now slightly misnamed).
3081
3082             This mode is used for optimization purposes in StyleInvalidationAnalysis (which we care about here) and
3083             StyleSharingResolver. The change is fine for both.
3084
3085         * cssjit/SelectorCompiler.cpp:
3086         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsHovered):
3087
3088             Same change for the slow path selector checker.
3089
3090 2016-08-01  Darin Adler  <darin@apple.com>
3091
3092         [Cocoa] Freeze Objective-C bindings and stop autogenerating them: Step 1 - Convert a single file
3093         https://bugs.webkit.org/show_bug.cgi?id=160386
3094
3095         Reviewed by Anders Carlsson.
3096
3097         No behavior change, no tests changed. I tested this locally by putting "#error" into the
3098         files in the DerivedSources directory to make sure the build doesn't use those files even
3099         if there are stale copies still sitting there.
3100
3101         Moving the bindings from WebCore to the legacy part of WebKit is something we also want to
3102         do, but that is quite challenging to do one file at a time, so we will do that later.
3103
3104         For this first file, I did some hand edits to make the code in a the file a little less
3105         peculiar. It's still awkward to have all those JSMainThreadNullState in there; should double
3106         check that we really need them.
3107
3108         An important follow up step will be to cut down on the bindings. We have lots of bindings
3109         that are only in the Private.h header, and it would be good to find a way to cut down on those.
3110         And on iOS we would like eliminate these bindings entirely since they are not API there.
3111
3112         * DerivedSources.make: Moved HTMLTextAreaElement from a list we use for both JavaScript and
3113         Objective-C DOM bindings to a list we use only for JavaScript bindings.
3114         * WebCore.xcodeproj/project.pbxproj: Removed references to generated DOMHTMLTextAreaElement
3115         files and instead reference the checked-in copies.
3116         * bindings/objc/DOMHTMLTextAreaElement.h: Added.
3117         * bindings/objc/DOMHTMLTextAreaElement.mm: Added.
3118         * bindings/objc/DOMHTMLTextAreaElementInternal.h: Added.
3119         * bindings/objc/DOMHTMLTextAreaElementPrivate.h: Added.
3120
3121 2016-08-01  Frederic Wang  <fwang@igalia.com>
3122
3123         Introduce a RenderMathMLFencedOperator class
3124         https://bugs.webkit.org/show_bug.cgi?id=160245
3125
3126         Reviewed by Darin Adler.
3127
3128         We introduce a class to handle all the code specific to anonymous mfenced operators. In
3129         particular many members of the RenderMathMLOperator class are going to be removed while
3130         fixing bug 156537 but they may still need to stored and exposed in some way by mfenced
3131         operators.
3132
3133         No new tests, behavior is unchanged.
3134
3135         * CMakeLists.txt: Add RenderMathMLFencedOperator.
3136         * WebCore.xcodeproj/project.pbxproj: Ditto.
3137         * rendering/RenderObject.h:
3138         (WebCore::RenderObject::isRenderMathMLFencedOperator): Function to allow casting to
3139         RenderMathMLFencedOperator.
3140         * rendering/mathml/RenderMathMLFenced.cpp: Use RenderMathMLFencedOperator instead of
3141         RenderMathMLOperator and use the new name updateOperatorContent.
3142         (WebCore::RenderMathMLFenced::updateFromElement):
3143         (WebCore::RenderMathMLFenced::createMathMLOperator):
3144         (WebCore::RenderMathMLFenced::makeFences):
3145         (WebCore::RenderMathMLFenced::addChild):
3146         * rendering/mathml/RenderMathMLFenced.h: Use RenderMathMLFencedOperator instead of
3147         RenderMathMLOperator.
3148         * rendering/mathml/RenderMathMLFencedOperator.cpp: New class derived from RenderMathMLOperator
3149         (WebCore::RenderMathMLFencedOperator::RenderMathMLFencedOperator): Init form and operator
3150         flags with the specified parameters and init the text content.
3151         (WebCore::RenderMathMLFencedOperator::updateOperatorContent): We move the
3152         RenderMathMLOperator::updateTokenContent function used by anonymous operators here. It is
3153         renamed to avoid build errors due to conflicts with the other
3154         RenderMathMLOperator::updateTokenContent function.
3155         * rendering/mathml/RenderMathMLFencedOperator.h: New class for anonymous mfenced operators
3156         with getter and setter for the m_textContent. Also override RenderMathMLFencedOperator to
3157         allow casting to RenderMathMLFencedOperator.
3158         * rendering/mathml/RenderMathMLOperator.cpp:
3159         (WebCore::RenderMathMLOperator::RenderMathMLOperator): Simplify the constructors. Some
3160         initializations is moved in RenderMathMLOperator.h while other code is moved to
3161         RenderMathMLFencedOperator.
3162         (WebCore::RenderMathMLOperator::textContent): No need to handle the anonymous case here since
3163         it is handled in RenderMathMLFencedOperator.
3164         (WebCore::RenderMathMLOperator::updateTokenContent): We delete the version used for anonymous
3165         operators and move it into RenderMathMLFencedOperator.
3166         * rendering/mathml/RenderMathMLOperator.h: Make the class and some members overridable and
3167         exposed to the derived RenderMathMLFencedOperator class. We also move initialization of some
3168         members here.
3169
3170 2016-08-01  Youenn Fablet  <youennf@gmail.com>
3171
3172         Reduce the number of ResourceRequest copies in DocumentThreadableLoader
3173         https://bugs.webkit.org/show_bug.cgi?id=160338
3174
3175         Reviewed by Darin Adler.
3176
3177         No observable change of behavior.
3178
3179         Updating one of CachedResourceReques constructor to take a ResourceRequest&&.
3180         This allows reducing a ResourceRequest copy in DocumentThreadableLoader.
3181         Updating DocumentLoader and MediaResourceLoader accordingly (future optimization steps may look at making these
3182         two loaders more efficient with regards to Resource Request).
3183
3184         Updating ThreadableLoader to take a ResourceRequest&&.
3185         This allows reducing the number of copies in DocumentThreadableLoader.
3186         Updating clients of ThreadableLoader accordingly.
3187
3188         * Modules/fetch/FetchLoader.cpp:
3189         (WebCore::FetchLoader::start):
3190         * dom/Document.cpp:
3191         (WebCore::Document::didLoadResourceSynchronously):
3192         * dom/Document.h:
3193         * dom/ScriptExecutionContext.cpp:
3194         (WebCore::ScriptExecutionContext::didLoadResourceSynchronously):
3195         * dom/ScriptExecutionContext.h:
3196         * fileapi/FileReaderLoader.cpp:
3197         (WebCore::FileReaderLoader::start):
3198         * inspector/InspectorNetworkAgent.cpp:
3199         (WebCore::InspectorNetworkAgent::loadResource):
3200         * loader/DocumentLoader.cpp:
3201         (WebCore::DocumentLoader::startLoadingMainResource):
3202         * loader/DocumentThreadableLoader.cpp:
3203         (WebCore::DocumentThreadableLoader::loadResourceSynchronously):
3204         (WebCore::DocumentThreadableLoader::create):
3205         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
3206         (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest):
3207         (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest):
3208         (WebCore::DocumentThreadableLoader::redirectReceived):
3209         (WebCore::DocumentThreadableLoader::preflightSuccess):
3210         (WebCore::DocumentThreadableLoader::loadRequest):
3211         * loader/DocumentThreadableLoader.h:
3212         * loader/MediaResourceLoader.cpp:
3213         (WebCore::MediaResourceLoader::requestResource):
3214         * loader/ThreadableLoader.cpp:
3215         (WebCore::ThreadableLoader::create):
3216         (WebCore::ThreadableLoader::loadResourceSynchronously):
3217         * loader/ThreadableLoader.h:
3218         * loader/WorkerThreadableLoader.cpp:
3219         (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
3220         (WebCore::WorkerThreadableLoader::loadResourceSynchronously):
3221         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
3222         * loader/WorkerThreadableLoader.h:
3223         (WebCore::WorkerThreadableLoader::create):
3224         * loader/cache/CachedResourceRequest.cpp:
3225         (WebCore::CachedResourceRequest::CachedResourceRequest):
3226         * loader/cache/CachedResourceRequest.h:
3227         * page/EventSource.cpp:
3228         (WebCore::EventSource::connect):
3229         * workers/WorkerScriptLoader.cpp:
3230         (WebCore::WorkerScriptLoader::loadSynchronously):
3231         (WebCore::WorkerScriptLoader::loadAsynchronously):
3232         * xml/XMLHttpRequest.cpp:
3233         (WebCore::XMLHttpRequest::createRequest):
3234
3235 2016-07-31  Youenn Fablet  <youenn@apple.com>
3236
3237         Fetch Response built-ins should use @makeThisTypeError
3238         https://bugs.webkit.org/show_bug.cgi?id=160290
3239
3240         Reviewed by Darin Adler.
3241
3242         Covered by updated test.
3243
3244         Fixed type error checks.
3245         Making use of @makeThisTypeError to have the correct error message.
3246         Updating arrayBuffer, blob, json and text to return rejected promises in lieu of throwing
3247         in case the 'this' value is not q Response object.
3248
3249         * Modules/fetch/FetchResponse.js:
3250         (clone): Updated instanceof check and making use of @makeThisTypeError.
3251         (arrayBuffer): Ditto.
3252         (blob): Ditto.
3253         (formData): Ditto.
3254         (json): Ditto.
3255         (text): Ditto.
3256
3257 2016-07-31  Adrian Perez de Castro  <aperez@igalia.com>
3258
3259         [GTK] Implement missing WebCore::moveFile() using GLib functions
3260         https://bugs.webkit.org/show_bug.cgi?id=160363
3261
3262         Reviewed by Carlos Garcia Campos.
3263
3264         * platform/glib/FileSystemGlib.cpp:
3265         (WebCore::moveFile): Function added.
3266
3267 2016-07-31  Chris Dumez  <cdumez@apple.com>
3268
3269         Drop [StrictTypeChecking] in cases where it is a no-op
3270         https://bugs.webkit.org/show_bug.cgi?id=160387
3271
3272         Reviewed by Darin Adler.
3273
3274         Drop [StrictTypeChecking] in cases where it is a no-op. After r203949 & r203950,
3275         [StrictTypeChecking] only has an impact when used on operation parameters of
3276         string types and is currently used as a workaround for bugs in our overload
3277         resolution algorithm.
3278
3279         * Modules/mediastream/RTCPeerConnection.idl:
3280         * Modules/mediastream/RTCRtpSender.idl:
3281         * bindings/scripts/test/TestObj.idl:
3282         * bindings/scripts/test/TestTypedefs.idl:
3283         * html/canvas/ANGLEInstancedArrays.idl:
3284         * html/canvas/OESVertexArrayObject.idl:
3285         * html/canvas/WebGL2RenderingContext.idl:
3286         * html/canvas/WebGLDebugShaders.idl:
3287         * html/canvas/WebGLLoseContext.idl:
3288         * html/canvas/WebGLRenderingContextBase.idl:
3289         * svg/SVGAngle.idl:
3290         * svg/SVGColor.idl:
3291         * svg/SVGLength.idl:
3292         * svg/SVGLengthList.idl:
3293         * svg/SVGMatrix.idl:
3294         * svg/SVGNumberList.idl:
3295         * svg/SVGPaint.idl:
3296         * svg/SVGPathSegList.idl:
3297         * svg/SVGPoint.idl:
3298         * svg/SVGPointList.idl:
3299         * svg/SVGStringList.idl:
3300         * svg/SVGTransform.idl:
3301         * svg/SVGTransformList.idl:
3302
3303 2016-07-31  Nan Wang  <n_wang@apple.com>
3304
3305         AX: Add a check for touch event listener on iOS accessibility object
3306         https://bugs.webkit.org/show_bug.cgi?id=160388
3307
3308         Reviewed by Chris Fleizach.
3309
3310         dispatchTouchEvent() is not working correctly within AXPress() sometimes. Need to 
3311         investigate it more in the future. Now, adding a check for the touch event listener
3312         on the object's node so that iOS can handle dispatching the touch event instead.
3313
3314         Test: accessibility/ios-simulator/has-touch-event-listener.html
3315
3316         * accessibility/AccessibilityObject.h:
3317         * accessibility/ios/AccessibilityObjectIOS.mm:
3318         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
3319         (WebCore::AccessibilityObject::hasTouchEventListener):
3320         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3321         (appendStringToResult):
3322         (-[WebAccessibilityObjectWrapper _accessibilityHasTouchEventListener]):
3323         (-[WebAccessibilityObjectWrapper _accessibilityValueIsAutofilled]):
3324
3325 2016-07-30  Chris Dumez  <cdumez@apple.com>
3326
3327         Unreviewed, rebaseline bindings tests.
3328
3329         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
3330         (webkit_dom_test_obj_set_property): Deleted.
3331         (webkit_dom_test_obj_get_property): Deleted.
3332         (webkit_dom_test_obj_class_init): Deleted.
3333         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
3334         * bindings/scripts/test/JS/JSTestObj.cpp:
3335         (WebCore::jsTestObjStrictTypeCheckingAttribute): Deleted.
3336         (WebCore::jsTestObjStrictFloat): Deleted.
3337         (WebCore::setJSTestObjStrictTypeCheckingAttribute): Deleted.
3338         (WebCore::setJSTestObjStrictFloat): Deleted.
3339         * bindings/scripts/test/ObjC/DOMTestObj.h:
3340         * bindings/scripts/test/ObjC/DOMTestObj.mm:
3341         (-[DOMTestObj strictTypeCheckingAttribute]): Deleted.
3342         (-[DOMTestObj setStrictTypeCheckingAttribute:]): Deleted.
3343         (-[DOMTestObj strictFloat]): Deleted.
3344         (-[DOMTestObj setStrictFloat:]): Deleted.
3345
3346 2016-07-30  Chris Dumez  <cdumez@apple.com>
3347
3348         Enable strict type checking for Window dictionary members
3349         https://bugs.webkit.org/show_bug.cgi?id=160356
3350
3351         Reviewed by Darin Adler.
3352
3353         Enable strict type checking for Window dictionary members. Technically,
3354         we should do strict type checking of all wrapper types but this patch
3355         focuses on Window because it is common to pass a Window dictionary
3356         member to Event constructors.
3357
3358         By strict type checking, I mean that we should throw a TypeError is
3359         the value is not null/undefined and does not implement the Window
3360         interface:
3361         - http://heycam.github.io/webidl/#es-interface
3362
3363         Firefox and Chrome comply with the specification already.
3364
3365         No new tests, updated / rebaselined existing tests.
3366
3367         * bindings/js/JSDictionary.cpp:
3368         (WebCore::JSDictionary::convertValue):
3369
3370 2016-07-30  Chris Dumez  <cdumez@apple.com>
3371
3372         [WebIDL] Enable strict type checking for nullable attribute setters of wrapper types
3373         https://bugs.webkit.org/show_bug.cgi?id=160375
3374
3375         Reviewed by Darin Adler.
3376
3377         Enable strict type checking for nullable attribute setters of wrapper types:
3378         - http://heycam.github.io/webidl/#es-nullable-type
3379         - http://heycam.github.io/webidl/#es-interface
3380
3381         For such attributes, if the JS tries to assign a value that is not null /
3382         undefined and does not have the expected wrapper type, then we now throw a
3383         TypeError instead of silently converting the value to null.
3384
3385         This behavior is consistent with Chrome and Firefox. It also helps identify
3386         bugs in JavaScript code.
3387
3388         No new tests, updated existing tests.
3389
3390         * Modules/webaudio/AudioBufferSourceNode.idl:
3391         * bindings/scripts/CodeGeneratorJS.pm:
3392         (GenerateImplementation):
3393         * bindings/scripts/test/JS/JSTestObj.cpp:
3394         (WebCore::setJSTestObjTestNullableObjAttr):
3395         (WebCore::setJSTestObjMutablePoint):
3396         (WebCore::setJSTestObjImmutablePoint):
3397         * bindings/scripts/test/TestObj.idl:
3398         * dom/Document.idl:
3399         * html/HTMLTableElement.idl:
3400         * svg/SVGAngle.idl:
3401         * svg/SVGAnimatedBoolean.idl:
3402         * svg/SVGAnimatedEnumeration.idl:
3403         * svg/SVGAnimatedInteger.idl:
3404         * svg/SVGAnimatedNumber.idl:
3405         * svg/SVGLength.idl:
3406         * svg/SVGMatrix.idl:
3407         * svg/SVGNumber.idl:
3408         * svg/SVGPathSegArcAbs.idl:
3409         * svg/SVGPathSegArcRel.idl:
3410         * svg/SVGPathSegCurvetoCubicAbs.idl:
3411         * svg/SVGPathSegCurvetoCubicRel.idl:
3412         * svg/SVGPathSegCurvetoCubicSmoothAbs.idl:
3413         * svg/SVGPathSegCurvetoCubicSmoothRel.idl:
3414         * svg/SVGPathSegCurvetoQuadraticAbs.idl:
3415         * svg/SVGPathSegCurvetoQuadraticRel.idl:
3416         * svg/SVGPathSegCurvetoQuadraticSmoothAbs.idl:
3417         * svg/SVGPathSegCurvetoQuadraticSmoothRel.idl:
3418         * svg/SVGPathSegLinetoAbs.idl:
3419         * svg/SVGPathSegLinetoHorizontalAbs.idl:
3420         * svg/SVGPathSegLinetoHorizontalRel.idl:
3421         * svg/SVGPathSegLinetoRel.idl:
3422         * svg/SVGPathSegLinetoVerticalAbs.idl:
3423         * svg/SVGPathSegLinetoVerticalRel.idl:
3424         * svg/SVGPathSegMovetoAbs.idl:
3425         * svg/SVGPathSegMovetoRel.idl:
3426         * svg/SVGPoint.idl:
3427         * svg/SVGPreserveAspectRatio.idl:
3428         * svg/SVGRect.idl:
3429
3430 2016-07-30  Youenn Fablet  <youenn@apple.com>
3431
3432         Synchronous preflight should check for successful responses
3433         https://bugs.webkit.org/show_bug.cgi?id=159350
3434
3435         Reviewed by Darin Adler.
3436
3437         Test: http/tests/xmlhttprequest/access-control-preflight-not-successful.html
3438
3439         * loader/CrossOriginPreflightChecker.cpp:
3440         (WebCore::CrossOriginPreflightChecker::doPreflight): Adding successful response check for synchronous
3441         preflighting.
3442
3443 2016-07-30  Chris Dumez  <cdumez@apple.com>
3444
3445         [WebIDL] Enable strict type checking for operations' nullable parameters of wrapper types
3446         https://bugs.webkit.org/show_bug.cgi?id=160374
3447
3448         Reviewed by Youenn Fablet.
3449
3450         Enable strict type checking for operations' nullable parameters of
3451         wrapper types to comply with the Web IDL specification:
3452         - http://heycam.github.io/webidl/#es-nullable-type
3453         - http://heycam.github.io/webidl/#es-interface
3454
3455         For such parameters, if the JS passes a value that is not null /
3456         undefined and does not have the expected wrapper type, then we now
3457         throw a TypeError instead of silently converting the value to null.
3458
3459         This behavior is consistent with Chrome and Firefox. It also helps
3460         identify bugs in JavaScript code.
3461
3462         No new tests, rebaselined existing tests.
3463
3464         * bindings/scripts/CodeGeneratorJS.pm:
3465         (GenerateParametersCheck):
3466         * bindings/scripts/test/JS/JSTestObj.cpp:
3467         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapper):
3468         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperIsNull):
3469         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalXPathNSResolver):
3470         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
3471         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
3472         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
3473         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1):
3474         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2):
3475         (WebCore::jsTestObjPrototypeFunctionConvert2):
3476         (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithSequence):
3477         (WebCore::jsTestObjPrototypeFunctionConditionalMethod3): Deleted.
3478         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5): Deleted.
3479         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod): Deleted.
3480         (WebCore::jsTestObjPrototypeFunctionOrange): Deleted.
3481
3482 2016-07-29  Chris Dumez  <cdumez@apple.com>
3483
3484         Window's named properties should be exposed on a WindowProperties object in its prototype
3485         https://bugs.webkit.org/show_bug.cgi?id=160354
3486
3487         Reviewed by Gavin Barraclough.
3488
3489         Window's named properties should be exposed on a WindowProperties object
3490         in its prototype:
3491         - http://heycam.github.io/webidl/#named-properties-object
3492
3493         Firefox and Chrome both comply with the specification. However, WebKit
3494         had no "WindowProperties" object in the Window prototype chain and the
3495         named properties are exposed on the Window object itself.
3496
3497         No new tests, rebaselined existing tests.
3498
3499         * CMakeLists.txt:
3500         * WebCore.xcodeproj/project.pbxproj:
3501         * bindings/js/JSBindingsAllInOne.cpp:
3502         * bindings/js/JSDOMWindowCustom.cpp:
3503         (WebCore::JSDOMWindow::getOwnPropertySlot):
3504         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
3505         (WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess): Deleted.
3506         (WebCore::JSDOMWindow::put): Deleted.
3507         (WebCore::JSDOMWindow::putByIndex): Deleted.
3508         (WebCore::JSDOMWindow::getEnumerableLength): Deleted.
3509         * bindings/js/JSDOMWindowProperties.cpp: Added.
3510         (WebCore::jsDOMWindowPropertiesGetOwnPropertySlotNamedItemGetter):
3511         (WebCore::JSDOMWindowProperties::getOwnPropertySlot):
3512         (WebCore::JSDOMWindowProperties::getOwnPropertySlotByIndex):
3513         * bindings/js/JSDOMWindowProperties.h: Added.
3514         (WebCore::JSDOMWindowProperties::create):
3515         (WebCore::JSDOMWindowProperties::createStructure):
3516         (WebCore::JSDOMWindowProperties::JSDOMWindowProperties):
3517         * bindings/js/JSDOMWindowShell.cpp:
3518         (WebCore::JSDOMWindowShell::setWindow):
3519
3520 2016-07-29  Daniel Bates  <dabates@apple.com>
3521
3522         Crash under HTMLMediaElement::{resolve, reject}PendingPlayPromises() when playback is interrupted
3523         https://bugs.webkit.org/show_bug.cgi?id=160366
3524         <rdar://problem/27317407>
3525
3526         Reviewed by Eric Carlson.
3527
3528         Fixes a crash/assertion failure in DeferredWrapper::{resolve, rejectWithValue}() caused by a Promise
3529         being settled twice. In particular, if a system interruption occurs when media.play() is invoked
3530         the returned Promise may ultimately be settled twice upon cessation of the interruption.
3531
3532         A Promise can be settled (resolved) exactly once. When a system interruption occurs media
3533         playback is paused and resumes on cessation of the interruption. Currently we also immediately
3534         reject the Promise p retuned by media.play() if the interruption occurs during its invocation.
3535         So, when we resume playback on cessation of an interruption we try to resolve p again. But a
3536         Promise can only be resolved once and hence we violate the assertions that p has both a valid
3537         reference to a JSPromiseDeferred object and a reference to the global object of the page.
3538
3539         Tests: media/non-existent-video-playback-interrupted.html
3540                media/video-playback-interrupted.html
3541
3542         * html/HTMLMediaElement.cpp:
3543         (WebCore::HTMLMediaElement::play): Modified to reject the Promise and return immediately if
3544         playInternal() returns false.
3545         (WebCore::HTMLMediaElement::playInternal): Treat an interruption as success and return true
3546         so that HTMLMediaElement::play() adds the Promise to the end of the list of pending promises.
3547         We treat an interruption as a success because we will resume playback (assuming the media
3548         can be loaded and is well-formed) upon cessation of the interruption and therefore can either
3549         fulfill or reject the Promise object returned by media.play().
3550
3551 2016-07-29  Daniel Bates  <dabates@apple.com>
3552
3553         [iOS] HTMLMediaElement::updateVolume() calls MediaPlayer::volume() on null media player
3554         https://bugs.webkit.org/show_bug.cgi?id=160353
3555
3556         Reviewed by Eric Carlson.
3557
3558         Using testing functions HTMLMediaElement::updateVolume() can be called on a <video> element
3559         without an associated video. We should support this usage on iOS just as we do for non-iOS
3560         ports.
3561
3562         The use of testing functions to call HTMLMediaElement::updateVolume() on a <video> element
3563         without an associated video is demonstrated by the test LayoutTests/media/video-muted-after-setting-page-muted-state.html.
3564
3565         * html/HTMLMediaElement.cpp:
3566         (WebCore::HTMLMediaElement::updateVolume):
3567
3568 2016-07-29  Wenson Hsieh  <wenson_hsieh@apple.com>
3569
3570         Media controls are not displayed for some autoplaying videos at certain browser dimensions
3571         https://bugs.webkit.org/show_bug.cgi?id=160360
3572         <rdar://problem/27179484>
3573
3574         Reviewed by Myles C. Maxfield.
3575
3576         Previously, if a video's aspect ratio fell outside of the range [0.5, 1.8], we would
3577         not consider it main content and would subsequently not show media controls for it.
3578         This meant that on many websites that scale video dimensions to match the mainframe,
3579         if the mainframe is too wide (e.g. full bounds on a widescreen display) we would not
3580         consider the video to be main content. To fix this, we only consider aspect ratio to
3581         be a requirement if the video does not already take up most of the space in the
3582         mainframe.
3583
3584         Covered by two new TestWebKitAPI unit tests.
3585
3586         * html/MediaElementSession.cpp:
3587         (WebCore::isElementLargeRelativeToMainFrame):
3588         (WebCore::isElementLargeEnoughForMainContent):
3589
3590 2016-07-29  Zalan Bujtas  <zalan@apple.com>
3591
3592         Do not set negative rate on AVSampleBufferRenderSynchronizer.
3593         https://bugs.webkit.org/show_bug.cgi?id=160326
3594         <rdar://problem/27355214>
3595
3596         Reviewed by Eric Carlson.
3597
3598         Test: http/tests/media/media-source/mediasource-play-then-seek-back-with-remote-control.html
3599
3600         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3601         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setRateDouble):
3602
3603 2016-07-29  Myles C. Maxfield  <mmaxfield@apple.com>
3604
3605         Backspace key removes only the rainbow from the rainbow flag
3606         https://bugs.webkit.org/show_bug.cgi?id=160349
3607         <rdar://problem/27594995>
3608
3609         Reviewed by Dean Jackson.
3610
3611         In r203330 I added support for new emoji group candidates. I accidentally
3612         missed one of the new emoji code points.
3613
3614         Test: editing/deleting/delete-emoji.html
3615
3616         * platform/text/CharacterProperties.h:
3617         (WebCore::isEmojiGroupCandidate):
3618
3619 2016-07-29  Nan Wang  <n_wang@apple.com>
3620
3621         AX: Media controls accessibility improvement
3622         https://bugs.webkit.org/show_bug.cgi?id=160223
3623         <rdar://problem/27558003>
3624
3625         Reviewed by Eric Carlson.
3626
3627         Changes in this patch:
3628         1. Added a change observer for volume slider so that it will handle accessibility 
3629            increment/decrement functions correctly.
3630         2. Update the timer div's aria-label when time changes.
3631         3. Added a keydown handler for left/right arrow adjusting the timeline, so that the
3632            value increment/decrement in a reasonable way.
3633         4. Changed the mute button's role to checkbox since it only has on/off states.
3634
3635         Test: media/media-controls-accessibility.html
3636
3637         * Modules/mediacontrols/mediaControlsApple.js:
3638         (Controller.prototype.createControls):
3639         (Controller.prototype.updatePictureInPictureButton):
3640         (Controller.prototype.timelineStepFromVideoDuration):
3641         (Controller.prototype.incrementTimelineValue):
3642         (Controller.prototype.decrementTimelineValue):
3643         (Controller.prototype.showInlinePlaybackPlaceholderWhenSafe):
3644         (Controller.prototype.handleTimelineMouseUp):
3645         (Controller.prototype.handleTimelineKeyDown):
3646         (Controller.prototype.handleMuteButtonClicked):
3647         (Controller.prototype.handleMinButtonClicked):
3648         (Controller.prototype.handleMaxButtonClicked):
3649         (Controller.prototype.updateVideoVolume):
3650         (Controller.prototype.handleVolumeSliderInput):
3651         (Controller.prototype.handleVolumeSliderChange):
3652         (Controller.prototype.handleVolumeSliderMouseDown):
3653         (Controller.prototype.updateTime):
3654         (Controller.prototype.updateControlsWhileScrubbing):
3655         (Controller.prototype.updateVolume):
3656
3657 2016-07-29  Mark Lam  <mark.lam@apple.com>
3658
3659         Remove an unused line of code.
3660         https://bugs.webkit.org/show_bug.cgi?id=160350
3661
3662         Reviewed by Simon Fraser.
3663
3664         No new tests because there's no behavior change.  Just removing dead code.
3665
3666         SVGInlineTextBox::paintText() instantiates a local variable selectionTextRun. 
3667         Thanks to analysis by Said Abou-Hallawa, we know that selectionTextRun
3668         was introduced in https://trac.webkit.org/changeset/61393, but was later
3669         rendered unused in https://trac.webkit.org/changeset/62099 because we
3670         switched to using paintTextWithShadows() with the selectionStyle.  Hence,
3671         selectionTextRun can be removed.
3672
3673         * rendering/svg/SVGInlineTextBox.cpp:
3674         (WebCore::SVGInlineTextBox::paintText):
3675
3676 2016-07-29  Eric Carlson  <eric.carlson@apple.com>
3677
3678         Change internal AVCaptureDeviceType typedef name
3679         https://bugs.webkit.org/show_bug.cgi?id=160345
3680         <rdar://problem/27610935>
3681
3682         Reviewed by Dean Jackson.
3683
3684         * platform/mediastream/mac/AVAudioCaptureSource.mm:
3685         (WebCore::AVAudioCaptureSource::create): AVCaptureDeviceType -> AVCaptureDeviceTypedef
3686         (WebCore::AVAudioCaptureSource::AVAudioCaptureSource): Ditto.
3687
3688         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
3689         (WebCore::AVCaptureDeviceManager::captureDeviceList): Ditto.
3690         (WebCore::shouldConsiderDeviceInDeviceList): Ditto.
3691         (WebCore::AVCaptureDeviceManager::refreshCaptureDeviceList): Ditto.
3692         (WebCore::AVCaptureDeviceManager::createMediaSourceForCaptureDeviceWithConstraints): Ditto.
3693         (WebCore::AVCaptureDeviceManager::deviceConnected): Ditto.
3694         (WebCore::AVCaptureDeviceManager::deviceDisconnected): Ditto.
3695         (-[WebCoreAVCaptureDeviceManagerObserver deviceDisconnected:]): Ditto.
3696
3697         * platform/mediastream/mac/AVMediaCaptureSource.mm:
3698         (WebCore::globaVideoCaptureSerialQueue): Ditto.
3699         (WebCore::AVMediaCaptureSource::AVMediaCaptureSource): Ditto.
3700
3701         * platform/mediastream/mac/AVVideoCaptureSource.mm:
3702         (WebCore::AVVideoCaptureSource::create): Ditto.
3703         (WebCore::AVVideoCaptureSource::AVVideoCaptureSource): Ditto.
3704
3705 2016-07-28  Dean Jackson  <dino@apple.com>
3706
3707         color-gamut media query returns incorrect results
3708         https://bugs.webkit.org/show_bug.cgi?id=160166
3709         <rdar://problem/27537577>
3710
3711         Reviewed by Darin Adler.
3712
3713         While I was unable to reproduce the originator's issue,
3714         we communicated via email and it might have been related
3715         to a customized color space calibration on an external
3716         display.
3717
3718         Anyway, I took this opportunity to update to use the
3719         more appropriate API for detection on macOS Sierra.
3720
3721         Covered by the existing fast/media/mq-color-gamut.html test.
3722
3723         * platform/mac/PlatformScreenMac.mm:
3724         (WebCore::screenSupportsExtendedColor): Use NSScreen canRepresentDisplayGamut.
3725
3726 2016-07-29  George Ruan  <gruan@apple.com>
3727
3728         HTMLVideoElement with MediaStream src shows paused image when all video tracks are disabled
3729         https://bugs.webkit.org/show_bug.cgi?id=160222
3730         <rdar://problem/27557313>
3731
3732         Reviewed by Eric Carlson.
3733
3734         Tests: fast/mediastream/MediaStream-video-element-video-tracks-disabled-then-enabled.html
3735                fast/mediastream/MediaStream-video-element-video-tracks-disabled.html
3736
3737         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
3738         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
3739         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSampleBufferFromTrack): Change criteria to enqueue a
3740         Sample Buffer to the AVSampleBufferDisplayLayer to allow an initial frame to be shown.
3741         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::shouldEnqueueVideoSampleBuffer): Allow an initial frame to be shown.
3742         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::flushAndRemoveVideoSampleBuffers): Removes all buffers from the
3743         AVSampleBufferDisplayLayer.
3744         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayer): Make the AVSampleBufferDisplayLayer's background black.
3745         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayMode): Remove all buffers from the AVSampleBufferDisplayLayer
3746         when state of MediaPlayerPrivateMediaStreamAVFObjC is changed to None of PaintItBlack.
3747         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updatePausedImage): Updates paused image.
3748         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::pause): Calls updatePausedImage.
3749         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paintCurrentFrameInContext): Allow an initial frame to be painted to canvas.
3750
3751 2016-07-29  Youenn Fablet  <youenn@apple.com>
3752
3753         [Fetch API] Activate credentials mode
3754         https://bugs.webkit.org/show_bug.cgi?id=160292
3755
3756         Reviewed by Alex Christensen.
3757
3758         Covered by updated and rebased tests.
3759
3760         Previously the allowCredentials option was computed by DocumentThreadableLoader clients.
3761         This option is really similar to the credentials flag in the fetch specification and should be handled at lower levels.
3762         In the future, it might be good to retire that option.
3763
3764         In case of Omit mode, we need to explicitely disable cookies in DocumentThreadableLoader.
3765         This should be updated so that ResourceLoader does it, depending on credential flag being set or not.
3766
3767         Updated DocumentThreadableLoader clients to only use FetchOptions::Credentials.
3768         This allows to link code more easely to specification.
3769
3770         * Modules/fetch/FetchLoader.cpp:
3771         (WebCore::FetchLoader::start): Removing use of allowCredentials option. Using FetchOptions::Credentials instead.
3772         * fileapi/FileReaderLoader.cpp:
3773         (WebCore::FileReaderLoader::start): Ditto.
3774         * inspector/InspectorNetworkAgent.cpp:
3775         (WebCore::InspectorNetworkAgent::loadResource): Ditto.
3776         * loader/DocumentThreadableLoader.cpp:
3777         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader): Computing allowCredentials from FetchOptions::Credentials.
3778         (WebCore::DocumentThreadableLoader::loadRequest): Enabling cookie only if allowed to use credentials. This is in
3779         particular useful for FetchOptions::Credentials::Omit mode.
3780         * page/EventSource.cpp:
3781         (WebCore::EventSource::connect): Removing use of allowCredentials option. Using FetchOptions::Credentials instead.
3782         * workers/WorkerScriptLoader.cpp:
3783         (WebCore::WorkerScriptLoader::loadSynchronously): Ditto.
3784         (WebCore::WorkerScriptLoader::loadAsynchronously): Ditto.
3785         * xml/XMLHttpRequest.cpp: Ditto.
3786         (WebCore::XMLHttpRequest::createRequest):
3787
3788 2016-07-29  Youenn Fablet  <youenn@apple.com>
3789
3790         CrossOrigin preflight checker should compute the right Access-Control-Request-Headers value
3791         https://bugs.webkit.org/show_bug.cgi?id=160028
3792
3793         Reviewed by Alex Christensen.
3794
3795         Covered by updated test.
3796
3797         Computing Access-Control-Request-Headers value according https://fetch.spec.whatwg.org/#cors-preflight-fetch:
3798         - Remove safe headers
3799         - lowercase header names
3800         - sort lexicographically header names
3801         The only difference is that we keep separating headers with ', ' instead of ',' as per the spec.
3802         Also, some headers that might be safe are still marked as unsafe (DPR, Downlink...).
3803
3804         Moved setting of Origin header after preflighting, consistently with fetch spec.
3805
3806         * loader/CrossOriginAccessControl.cpp:
3807         (WebCore::createAccessControlPreflightRequest): Implementing new computation of Access-Control-Request-Headers.
3808         * loader/DocumentThreadableLoader.cpp:
3809         (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest): Removing call to updateRequestForAccessControl (which sets Origin header value).
3810         (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest): Adding call to updateRequestForAccessControl.
3811         (WebCore::DocumentThreadableLoader::preflightSuccess): Ditto.
3812         * platform/network/HTTPParsers.cpp:
3813         (WebCore::isCrossOriginSafeRequestHeader): Helper routine to implement https://fetch.spec.whatwg.org/#cors-safelisted-request-header.
3814         * platform/network/HTTPParsers.h:
3815
3816 2016-07-29  Frederic Wang  <fwang@igalia.com>
3817
3818         Parse the operator text on the MathMLOperatorElement class.
3819         https://bugs.webkit.org/show_bug.cgi?id=160241
3820
3821         Reviewed by Darin Adler.
3822
3823         The text of the MathML operators is important to determine form or dictionary properties and
3824         hence provide default values when no explicit attributes are privided. Since that text only
3825         depends on the MathML DOM content, it makes sense to move its parsing into
3826         MathMLOperatorElement. Anonymous operators created by the mfenced elements still need to be
3827         handled specially and this will be true for all the operator properties that can just be
3828         determined in MathMLOperatorElement. Hence in a follow-up patch we will introduce a class
3829         to move all the code specific to mfenced in a class derived from RenderMathMLOperator while
3830         we continue to move the corresponding code for non-anonymous into MathMLOperatorElement.
3831
3832         No new tests, behavior is unchanged.
3833
3834         * mathml/MathMLOperatorElement.cpp: Include header for hyphenMinus/minusSign characters.
3835         (WebCore::MathMLOperatorElement::parseOperatorText): Move that code from rebuildTokenContent
3836         (WebCore::MathMLOperatorElement::operatorText): Helper function to get the cached text.
3837         (WebCore::MathMLOperatorElement::childrenChanged): Make the cached text dirty.
3838         * mathml/MathMLOperatorElement.h: Update defitions and add a member for the operator text.
3839         * mathml/MathMLTextElement.h: Make childrenChanged overridable.
3840         * rendering/mathml/RenderMathMLOperator.cpp:
3841         (WebCore::RenderMathMLOperator::element): Helper function to cast to a MathMLOperatorElement.
3842         (WebCore::RenderMathMLOperator::textContent): Helper function to call
3843         MathMLOperatorElement::operatorText or fallback to m_textContent for anonymous operators.
3844         m_textContent and this special case can be moved into a derived class later.
3845         (WebCore::RenderMathMLOperator::setOperatorProperties): Call textContent().
3846         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths): Ditto.
3847         (WebCore::RenderMathMLOperator::rebuildTokenContent): Remove the string parameter and the
3848         parsing of the operator text.
3849         (WebCore::RenderMathMLOperator::updateTokenContent): Call textContent(). The special function
3850         for anonymous operators also parses the text content but this could be moved into a derived
3851         class later.
3852         (WebCore::RenderMathMLOperator::shouldAllowStretching): Call textContent().
3853         (WebCore::RenderMathMLOperator::useMathOperator): Ditto.
3854         (WebCore::RenderMathMLOperator::RenderMathMLOperator): No need to initialize m_textContent
3855         as it is not used anymore for non-anonymous renderers.
3856         * rendering/mathml/RenderMathMLOperator.h: Update definitions and call textContent().
3857
3858 2016-07-28  Youenn Fablet  <youenn@apple.com>
3859
3860         Binding generator should expose the visible interface name in error messages
3861         https://bugs.webkit.org/show_bug.cgi?id=160192
3862
3863         Reviewed by Darin Adler.
3864
3865         Covered by updated layout and binding tests.
3866
3867         * bindings/scripts/CodeGeneratorJS.pm:
3868         (GenerateImplementation): Using visibleInterfaceName instead of interfaceName.
3869         (GenerateFunctionCastedThis): Ditto.
3870         (GenerateParametersCheck): Ditto.
3871         (GenerateConstructorDefinition): Ditto.
3872         * bindings/scripts/test/JS/JSTestObj.cpp: Rebased.
3873         * bindings/scripts/test/TestObj.idl: Adding ConstructorCallWith to exercice change in GenerateConstructorDefinition.
3874
3875 2016-07-28  Carlos Garcia Campos  <cgarcia@igalia.com>
3876
3877         Split calculateCacheSizes in two methods
3878         https://bugs.webkit.org/show_bug.cgi?id=160237
3879
3880         Reviewed by Darin Adler.
3881
3882         Rename getVolumeFreeSizeForPath as volumeFreeSizeForPath and make it available to all platforms adding an
3883         implementation for mac.
3884
3885         * platform/FileSystem.h:
3886         * platform/efl/FileSystemEfl.cpp:
3887         (WebCore::volumeFreeSizeForPath):
3888         (WebCore::getVolumeFreeSizeForPath): Deleted.
3889         * platform/glib/FileSystemGlib.cpp:
3890         (WebCore::volumeFreeSizeForPath):
3891         (WebCore::getVolumeFreeSizeForPath): Deleted.
3892         * platform/mac/FileSystemMac.mm:
3893         (WebCore::volumeFreeSizeForPath):
3894         * platform/win/FileSystemWin.cpp:
3895         (WebCore::volumeFreeSizeForPath):
3896
3897 2016-07-28  Myles C. Maxfield  <mmaxfield@apple.com>
3898
3899         Remove deprecated SPI for video inline / fullscreen controls
3900         https://bugs.webkit.org/show_bug.cgi?id=160318
3901
3902         Reviewed by Tim Horton.
3903
3904         r203752 deprecated the SPI allowsInlineMediaPlaybackWithPlaysInlineAttribute
3905         and allowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute (in favor of
3906         inlineMediaPlaybackRequiresPlaysInlineAttribute). This patch removes the
3907         deprecated SPI symbols.
3908
3909         No new tests because there is no behavior change.
3910
3911         * page/Settings.cpp:
3912         * page/Settings.in:
3913         * testing/InternalSettings.cpp:
3914         (WebCore::InternalSettings::Backup::Backup): Deleted.
3915         (WebCore::InternalSettings::Backup::restoreTo): Deleted.
3916         (WebCore::InternalSettings::setAllowsInlineMediaPlaybackWithPlaysInlineAttribute): Deleted.
3917         (WebCore::InternalSettings::setAllowsInlineMediaPlaybackWithWebKitPlaysInlineAttribute): Deleted.
3918         * testing/InternalSettings.h:
3919         * testing/InternalSettings.idl:
3920
3921 2016-07-28  Chris Dumez  <cdumez@apple.com>
3922
3923         Add support for Element.getAttributeNames()
3924         https://bugs.webkit.org/show_bug.cgi?id=160327
3925
3926         Reviewed by Alex Christensen.
3927
3928         Add support for Element.getAttributeNames():
3929         - https://dom.spec.whatwg.org/#dom-element-getattributenames
3930
3931         Firefox already supports this, Chrome 52 does not yet.
3932
3933         Test: fast/dom/Element/getAttributeNames.html
3934
3935         * bindings/js/JSDOMBinding.h:
3936         (WebCore::JSValueTraits<AtomicString>::arrayJSValue):
3937         * dom/Element.cpp:
3938         (WebCore::Element::getAttributeNames):
3939         * dom/Element.h:
3940         * dom/Element.idl:
3941
3942 2016-07-28  Chris Dumez  <cdumez@apple.com>
3943
3944         window.open.length should be 0
3945         https://bugs.webkit.org/show_bug.cgi?id=160323
3946
3947         Reviewed by Darin Adler.
3948
3949         window.open.length should be 0 as all its parameters are optional:
3950         - https://html.spec.whatwg.org/multipage/browsers.html#the-window-object
3951
3952         It is 2 in WebKit. Firefox and Chrome agree with the specification and return 0.
3953
3954         No new tests, rebaselined existing test.
3955
3956         * bindings/js/JSDOMWindowCustom.cpp:
3957         (WebCore::JSDOMWindow::open):
3958         Minor code optimization.
3959
3960         * page/DOMWindow.idl:
3961         Update IDL to match the specification and our custom implementation.
3962         This makes us return the right "length" value.
3963
3964 2016-07-28  Chris Dumez  <cdumez@apple.com>
3965
3966         Parameters to Event.initEvent() should be mandatory
3967         https://bugs.webkit.org/show_bug.cgi?id=160320
3968
3969         Reviewed by Darin Adler.
3970
3971         Parameters to Event.initEvent() should be mandatory:
3972         - https://dom.spec.whatwg.org/#interface-event
3973
3974         Firefox agrees with the specification. Chrome does not.
3975