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