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