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