It should be possible to re-initialize a CustomEvent after it's been dispatched
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2016-08-09  Chris Dumez  <cdumez@apple.com>
2
3         It should be possible to re-initialize a CustomEvent after it's been dispatched
4         https://bugs.webkit.org/show_bug.cgi?id=160664
5
6         Reviewed by Darin Adler.
7
8         It should be possible to re-initialize a CustomEvent after it's been dispatched:
9         - https://dom.spec.whatwg.org/#dom-customevent-initcustomevent
10
11         Test: fast/events/initCustomEvent-after-dispatch.html
12
13         * dom/CustomEvent.cpp:
14         (WebCore::CustomEvent::initCustomEvent):
15
16 2016-08-09  Anders Carlsson  <andersca@apple.com>
17
18         Get rid of PluginStrategy
19         https://bugs.webkit.org/show_bug.cgi?id=160696
20
21         Reviewed by Dan Bernstein.
22
23         * WebCore.xcodeproj/project.pbxproj:
24         * loader/EmptyClients.cpp:
25         * platform/PlatformStrategies.h:
26         (WebCore::PlatformStrategies::pluginStrategy): Deleted.
27         * plugins/PluginInfoProvider.h:
28         * plugins/PluginStrategy.h: Removed.
29         (WebCore::PluginStrategy::~PluginStrategy): Deleted.
30
31 2016-08-08  Myles C. Maxfield  <mmaxfield@apple.com>
32
33         Ensure StringView lifetime is correct inside InlineTextBox
34         https://bugs.webkit.org/show_bug.cgi?id=160584
35
36         Reviewed by Darin Adler.
37
38         A TextRun contains a StringView. Previously, we had a helper function which
39         could possibly create a new string, and then create a TextRun whose StringView
40         pointed inside this new string. Then, the string would be destroyed because it
41         was on the stack.
42
43         Luckily, this is benign because this new string would always share a
44         StringImpl with the string passed into the function (and the StringView
45         would point into this StringImpl). However, relying on this is dangerous
46         and we are trying to enforce StringView lifetime checks in
47         https://bugs.webkit.org/show_bug.cgi?id=160384.
48
49         The solution is to make a helper function which returns this built string
50         so that the caller can own this built string, thereby extending its lifetime.
51         Unfortunately, this built string can't be a StringView because the same
52         mechanism must be used for text-combine, which returns originalText(), which
53         may return a built string if it is a RenderCounter. Perhaps it would be
54         valuable to migrate RenderCounter::originalText() to something else, or to
55         divorce text-combine from originalText(), but that is out of scope for this
56         patch. Similarly, hyphenation uses this same mechanism, but because the
57         hyphenated string needs to be created, we must own the string storage (so
58         StringView is incorrect here).
59
60         Another reason is for performance: StringView::substring() is faster to use
61         than String::substringSharingImpl(), since it does not allocate and destroy a
62         StringImpl on the heap. This patch migrates away from
63         String::substringSharingImpl() and onto StringView::substring().
64
65         No new tests because there is no behavior change.
66
67         * rendering/InlineTextBox.cpp:
68         (WebCore::InlineTextBox::localSelectionRect):
69         (WebCore::InlineTextBox::paint):
70         (WebCore::InlineTextBox::selectionStartEnd):
71         (WebCore::InlineTextBox::paintSelection):
72         (WebCore::InlineTextBox::hyphenatedStringForTextRun):
73         (WebCore::InlineTextBox::constructTextRun):
74         * rendering/InlineTextBox.h:
75         * rendering/RenderCombineText.cpp:
76         (WebCore::RenderCombineText::maybeGetCombinedStringForRendering):
77         (WebCore::RenderCombineText::getStringToRender): Deleted.
78         * rendering/RenderCombineText.h:
79
80 2016-08-08  Jeremy Jones  <jeremyj@apple.com>
81
82         Clear fullscreen mode state after exiting fullscreen mode to keep state in sync.
83         https://bugs.webkit.org/show_bug.cgi?id=160668
84
85         Reviewed by Jon Lee.
86
87         When exiting fullscreen while in auto picture in picture mode, fullscreen mode gets
88         out of sync, causing exit fullscreen to fail. This change updates the state 
89         to keep it correct.
90
91         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
92         (WebVideoFullscreenInterfaceAVKit::exitFullscreen):
93
94 2016-08-08  Chris Dumez  <cdumez@apple.com>
95
96         [Web IDL] We should resolve typedefs for dictionary members
97         https://bugs.webkit.org/show_bug.cgi?id=160675
98
99         Reviewed by Sam Weinig.
100
101         Resolve typedefs for dictionary member types.
102
103         Added bindings test coverage.
104
105         * bindings/scripts/IDLParser.pm:
106         (applyTypedefs):
107         * bindings/scripts/test/JS/JSTestObj.cpp:
108         (WebCore::convert<TestObj::Dictionary>):
109         * bindings/scripts/test/TestObj.idl:
110
111 2016-08-08  Anders Carlsson  <andersca@apple.com>
112
113         Fix the Windows build.
114
115         * plugins/PluginInfoProvider.h:
116
117 2016-08-08  Anders Carlsson  <andersca@apple.com>
118
119         Add a new PluginInfoProvider class, to replace PluginStrategy
120         https://bugs.webkit.org/show_bug.cgi?id=160670
121
122         Reviewed by Sam Weinig.
123
124         Add a per page PluginInfoProvider class that's going to ultimately replace the plug-in strategy.
125
126         * WebCore.xcodeproj/project.pbxproj:
127         * loader/EmptyClients.cpp:
128         (WebCore::fillWithEmptyClients):
129         * page/Page.cpp:
130         (WebCore::Page::Page):
131         (WebCore::Page::~Page):
132         (WebCore::Page::refreshPlugins):
133         (WebCore::Page::pluginData):
134         (WebCore::Page::pluginInfoProvider):
135         * page/Page.h:
136         * page/PageConfiguration.cpp:
137         * page/PageConfiguration.h:
138         * plugins/DOMPluginArray.cpp:
139         (WebCore::DOMPluginArray::refresh):
140         * plugins/DOMPluginArray.h:
141         * plugins/PluginData.cpp:
142         (WebCore::PluginData::PluginData):
143         (WebCore::PluginData::webVisiblePlugins):
144         (WebCore::PluginData::publiclyVisiblePlugins):
145         (WebCore::PluginData::initPlugins):
146         (WebCore::PluginData::refresh): Deleted.
147         * plugins/PluginData.h:
148         (WebCore::PluginData::create):
149         (WebCore::PluginData::PluginData): Deleted.
150         * plugins/PluginInfoProvider.cpp: Added.
151         (WebCore::PluginInfoProvider::~PluginInfoProvider):
152         (WebCore::PluginInfoProvider::addPage):
153         (WebCore::PluginInfoProvider::removePage):
154         * plugins/PluginInfoProvider.h: Added.
155         * replay/SerializationMethods.cpp:
156         (JSC::EncodingTraits<PluginData>::decodeValue):
157         (JSC::DeserializedPluginData::DeserializedPluginData): Deleted.
158
159 2016-08-08  John Wilander  <wilander@apple.com>
160
161         Popups opened from a sandboxed iframe should themselves be sandboxed
162         https://bugs.webkit.org/show_bug.cgi?id=134850
163         <rdar://problem/27375388>
164
165         Reviewed by Brent Fulgham.
166
167         Test: http/tests/security/window-opened-from-sandboxed-iframe-should-inherit-sandbox.html
168
169         * loader/FrameLoader.cpp:
170         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
171             Now copies the opener's frame loader effective sandbox flags to the
172             new frame loader.
173
174 2016-08-08  Chris Dumez  <cdumez@apple.com>
175
176         Align Selection API with the specification
177         https://bugs.webkit.org/show_bug.cgi?id=160663
178
179         Reviewed by Ryosuke Niwa.
180
181         Align Selection API with the specification:
182         - https://www.w3.org/TR/selection-api/#idl-def-Selection
183
184         In particular, the following changes were made:
185         - Mark parameters as non-nullable when they should be.
186         - Mark parameters as mandatory when they should be.
187         - Use "unsigned long" type for offsets instead of "long".
188
189         This aligns our behavior with Firefox and Chrome.
190
191         Note that the Node parameters to setBaseAndExtent() operation were kept
192         nullable, which does not match the specification. This is intentional
193         as I worry about compatibility risk, especially considering they are
194         still nullable in Chrome. Only Firefox marks them as non-nullable.
195
196         Test: editing/selection/bad-input.html
197
198         * dom/Position.h:
199         (WebCore::Position::LegacyEditingOffset::value):
200         (WebCore::Position::LegacyEditingOffset::LegacyEditingOffset):
201         (WebCore::createLegacyEditingPosition):
202         * page/DOMSelection.cpp:
203         (WebCore::DOMSelection::anchorOffset):
204         (WebCore::DOMSelection::focusOffset):
205         (WebCore::DOMSelection::baseOffset):
206         (WebCore::DOMSelection::extentOffset):
207         (WebCore::DOMSelection::rangeCount):
208         (WebCore::DOMSelection::collapse):
209         (WebCore::DOMSelection::setBaseAndExtent):
210         (WebCore::DOMSelection::setPosition):
211         (WebCore::DOMSelection::extend):
212         (WebCore::DOMSelection::getRangeAt):
213         (WebCore::DOMSelection::addRange):
214         (WebCore::DOMSelection::deleteFromDocument):
215         (WebCore::DOMSelection::containsNode):
216         (WebCore::DOMSelection::selectAllChildren):
217         (WebCore::DOMSelection::shadowAdjustedOffset):
218         (WebCore::DOMSelection::modify): Deleted.
219         (WebCore::DOMSelection::shadowAdjustedNode): Deleted.
220         (WebCore::DOMSelection::isValidForPosition): Deleted.
221         * page/DOMSelection.h:
222         * page/DOMSelection.idl:
223
224 2016-08-08  Chris Dumez  <cdumez@apple.com>
225
226         Regression(r204239): Caused flaky crashes under ~Database()
227         https://bugs.webkit.org/show_bug.cgi?id=160665
228         <rdar://problem/27748065>
229
230         Reviewed by Brady Eidson.
231
232         Make sure the scriptExecution context only gets ref'd / deref'd
233         on the context thread. Document / WorkerGlobalScope are not
234         ThreadSafeRefCounted.
235
236         No new tests, already covered by:
237         storage/websql/open-database-creation-callback.html
238
239         * Modules/webdatabase/Database.cpp:
240         (WebCore::Database::~Database):
241
242 2016-08-08  John Wilander  <wilander@apple.com>
243
244         Don't set document.domain to an IP address fragment
245         https://bugs.webkit.org/show_bug.cgi?id=126045
246         <rdar://problem/27331794>
247
248         Reviewed by Daniel Bates.
249
250         This patch matches the following Blink one:
251         https://chromium.googlesource.com/chromium/blink//b19a57fdb323d5a80d3a1cb0a6b343558c4237b0
252
253         IP address octets should not be treated as subdomains when setting
254         document.domain. The specs say:
255         'The domain attribute's setter must run these steps: ...
256         7. If host is not equal to effectiveDomain, then run these substeps:
257             1. If host or effectiveDomain is not a domain, then throw a
258             "SecurityError" DOMException.'
259         https://html.spec.whatwg.org/multipage/browsers.html#relaxing-the-same-origin-restriction
260         Last Updated 5 August 2016
261
262         'A host is a domain, an IPv4 address, or an IPv6 address.'
263         https://url.spec.whatwg.org/#concept-domain
264         Last Updated 28 July 2016
265
266         Test: http/tests/security/set-domain-remove-subdomain-for-ip-address.html
267
268         * dom/Document.cpp:
269         (WebCore::Document::setDomain):
270             Now checks whether the security origin is allowed to remove
271             subdomains. If not, it throws a security error.
272         * page/OriginAccessEntry.cpp:
273         (WebCore::OriginAccessEntry::OriginAccessEntry):
274             Constructor now expects an IP address setting.
275         (WebCore::OriginAccessEntry::matchesOrigin):
276             Now also checks whether the host in an IP address and returns
277             false if IP addresses aren't configured to be treated as domains.
278         * page/OriginAccessEntry.h:
279             Introduced new enum for IP address setting.
280             Constructor now expects an IP address setting.
281         (WebCore::OriginAccessEntry::ipAddressSettings):
282             New getter.
283         (WebCore::operator==):
284             Now also requires IP address settings to match.
285         * page/SecurityPolicy.cpp:
286         (WebCore::SecurityPolicy::addOriginAccessWhitelistEntry):
287             Changes to match OriginAccessEntry's new constructor.
288         (WebCore::SecurityPolicy::removeOriginAccessWhitelistEntry):
289             Changes to match OriginAccessEntry's new constructor.
290         * page/Settings.in:
291             Added a setting to allow IP address octets to be treated as
292             subdomains. This way our existing tests setting document.domain
293             still work.
294
295 2016-08-04  Anders Carlsson  <andersca@apple.com>
296
297         Remove more unused bindings code
298         https://bugs.webkit.org/show_bug.cgi?id=160568
299
300         Reviewed by Sam Weinig.
301
302         * CMakeLists.txt:
303         * DerivedSources.make:
304         * WebCore.xcodeproj/project.pbxproj:
305         * bindings/objc/DOMDocument.mm:
306         (-[DOMDocument execCommand:userInterface:]):
307         (-[DOMDocument execCommand:]):
308         (-[DOMDocument getMatchedCSSRules:pseudoElement:]):
309         * bindings/objc/DOMHTMLBaseFontElement.mm:
310         * bindings/objc/DOMHTMLCollection.mm:
311         (-[DOMHTMLCollection tags:]):
312         * bindings/objc/DOMWheelEvent.mm:
313         (-[DOMWheelEvent isHorizontal]):
314         * css/RGBColor.idl:
315         * dom/Attr.idl:
316         * dom/DOMImplementation.idl:
317         * dom/Document.h:
318         * dom/Document.idl:
319         * dom/Element.idl:
320         * dom/EventException.h: Removed.
321         (WebCore::EventException::EventException): Deleted.
322         * dom/EventException.idl: Removed.
323         * dom/KeyboardEvent.idl:
324         * dom/MessageEvent.cpp:
325         (WebCore::MessageEvent::messagePort): Deleted.
326         (WebCore::MessageEvent::initMessageEvent): Deleted.
327         * dom/MessageEvent.h:
328         * dom/MessagePort.cpp:
329         (WebCore::MessagePort::postMessage): Deleted.
330         * dom/MessagePort.h:
331         * dom/Node.idl:
332         * dom/NodeFilter.idl:
333         * dom/OverflowEvent.idl:
334         * dom/WheelEvent.h:
335         * dom/WheelEvent.idl:
336         * html/HTMLAllCollection.cpp:
337         (WebCore::HTMLAllCollection::tags):
338         * html/HTMLAllCollection.h:
339         * html/HTMLAnchorElement.idl:
340         * html/HTMLAreaElement.idl:
341         * html/HTMLBaseFontElement.cpp: Removed.
342         (WebCore::HTMLBaseFontElement::HTMLBaseFontElement): Deleted.
343         * html/HTMLBaseFontElement.h: Removed.
344         * html/HTMLBaseFontElement.idl: Removed.
345         * html/HTMLButtonElement.idl:
346         * html/HTMLCanvasElement.idl:
347         * html/HTMLCollection.cpp:
348         (WebCore::HTMLCollection::tags): Deleted.
349         * html/HTMLCollection.h:
350         * html/HTMLCollection.idl:
351         * html/HTMLElement.idl:
352         * html/HTMLFieldSetElement.idl:
353         * html/HTMLFormElement.idl:
354         * html/HTMLHyperlinkElementUtils.idl:
355         * html/HTMLIFrameElement.idl:
356         * html/HTMLImageElement.idl:
357         * html/HTMLInputElement.idl:
358         * html/HTMLLabelElement.idl:
359         * html/HTMLLegendElement.idl:
360         * html/HTMLLinkElement.idl:
361         * html/HTMLMediaElement.idl:
362         * html/HTMLObjectElement.idl:
363         * html/HTMLOptionsCollection.idl:
364         * html/HTMLSelectElement.idl:
365         * html/HTMLTableCellElement.idl:
366         * html/HTMLTextAreaElement.idl:
367         * page/DOMWindow.cpp:
368         (WebCore::DOMWindow::postMessage): Deleted.
369         * page/DOMWindow.h:
370         * workers/DedicatedWorkerGlobalScope.cpp:
371         (WebCore::DedicatedWorkerGlobalScope::postMessage): Deleted.
372         * workers/DedicatedWorkerGlobalScope.h:
373         * workers/Worker.cpp:
374         (WebCore::Worker::postMessage): Deleted.
375         * workers/Worker.h:
376
377 2016-08-08  Brady Eidson  <beidson@apple.com>
378
379         Addressing late review feedback in bug 160605
380         https://bugs.webkit.org/show_bug.cgi?id=160605
381
382         Reviewed by Darin's suggestions.
383
384         * Modules/gamepad/GamepadManager.cpp:
385         (WebCore::GamepadManager::maybeStartMonitoringGamepads):
386         (WebCore::GamepadManager::maybeStopMonitoringGamepads):
387         
388         * platform/gamepad/EmptyGamepadProvider.cpp:
389         (WebCore::EmptyGamepadProvider::startMonitoringGamepads):
390         (WebCore::EmptyGamepadProvider::stopMonitoringGamepads):
391         * platform/gamepad/EmptyGamepadProvider.h:
392         
393         * platform/gamepad/GamepadProvider.h:
394         
395         * platform/gamepad/mac/HIDGamepadProvider.cpp:
396         (WebCore::HIDGamepadProvider::startMonitoringGamepads):
397         (WebCore::HIDGamepadProvider::stopMonitoringGamepads):
398         * platform/gamepad/mac/HIDGamepadProvider.h:
399         (WebCore::HIDGamepadProvider::platformGamepads): Deleted.
400
401 2016-08-08  Chris Dumez  <cdumez@apple.com>
402
403         It should be possible to re-initialize an Event after it's been dispatched
404         https://bugs.webkit.org/show_bug.cgi?id=160651
405
406         Reviewed by Darin Adler.
407
408         Allow re-initialization of an Event that's already been dispatched, as
409         per the latest DOM specification:
410         - https://dom.spec.whatwg.org/#dom-event-initevent
411
412         Firefox already follows the specification here.
413
414         No new tests, rebaselined existing test.
415
416         Test: fast/events/initEvent-after-dispatch.html
417
418         * dom/Event.cpp:
419         (WebCore::Event::initEvent):
420         - Replace dispatched() check with isBeingDispatched() in order to
421           allow initialization of an already dispatched event but prevent
422           initialization of an event that is currently being dispatched
423           as per:
424           https://dom.spec.whatwg.org/#dom-event-initevent (step 1)
425         - Reset target to null as per:
426           https://dom.spec.whatwg.org/#concept-event-initialize (step 4)
427
428 2016-08-07  Carlos Garcia Campos  <cgarcia@igalia.com>
429
430         Unreviewed. Fix GObject DOM bindings API break after r204236.
431
432         Text.replaceWholeText was removed from DOM API.
433
434         * bindings/gobject/WebKitDOMDeprecated.cpp:
435         (webkit_dom_text_replace_whole_text):
436         * bindings/gobject/WebKitDOMDeprecated.h:
437         * bindings/gobject/WebKitDOMDeprecated.symbols:
438
439 2016-08-07  Carlos Garcia Campos  <cgarcia@igalia.com>
440
441         Unreviewed. Fix GObject DOM bindings API break after r204113.
442
443         Document.defaultCharset was removed from DOM API.
444
445         * bindings/gobject/WebKitDOMDeprecated.cpp:
446         (webkit_dom_document_get_default_charset):
447         * bindings/gobject/WebKitDOMDeprecated.h:
448         * bindings/gobject/WebKitDOMDeprecated.symbols:
449
450 2016-08-07  Chris Dumez  <cdumez@apple.com>
451
452         Node.baseURI should not be nullable
453         https://bugs.webkit.org/show_bug.cgi?id=160649
454
455         Reviewed by Darin Adler.
456
457         Node.baseURI should not be nullable as per the latest DOM specification:
458         - https://dom.spec.whatwg.org/#dom-node-baseuri
459
460         It is not nullable in Firefox. It is supposed to fallback to using the
461         document's URL. The document's URL is "about:blank" by default so
462         baseURI() now returns "about:blank" in the internal URL is null,
463         similarly to what we do for Document.URL (c.g. urlForBindings()).
464
465         No new tests, rebaselined existing test.
466
467         * dom/Node.cpp:
468         (WebCore::Node::baseURI):
469         * dom/Node.h:
470         * dom/Node.idl:
471
472 2016-08-07  Chris Dumez  <cdumez@apple.com>
473
474         Drop SVGDocument as per the SVG2 specification
475         https://bugs.webkit.org/show_bug.cgi?id=160361
476
477         Reviewed by Darin Adler.
478
479         Drop SVGDocument as per the SVG2 specification:
480         - https://www.w3.org/TR/SVG2/struct.html#InterfaceDocumentExtensions
481
482         SVGDocument has been merged into Document.
483
484         Chrome and Edge have dropped SVGDocument already, Firefox has not.
485
486         No new tests, rebaselined existing test.
487
488         * accessibility/AccessibilityRenderObject.cpp:
489         (WebCore::AccessibilityRenderObject::remoteSVGRootElement):
490         * bindings/js/JSDocumentCustom.cpp:
491         (WebCore::createNewDocumentWrapper): Deleted.
492         * bindings/js/JSXMLDocumentCustom.cpp:
493         (WebCore::toJSNewlyCreated):
494         (WebCore::toJS): Deleted.
495         * page/DOMWindow.idl:
496         * page/FrameView.cpp:
497         (WebCore::FrameView::scrollToAnchor):
498         * svg/SVGDocument.cpp:
499         (WebCore::SVGDocument::rootElement):
500         (WebCore::SVGDocument::zoomAndPanEnabled):
501         (WebCore::SVGDocument::startPan):
502         (WebCore::SVGDocument::updatePan):
503         * svg/SVGDocument.h:
504         * svg/SVGDocument.idl:
505         * svg/graphics/SVGImage.cpp:
506         (WebCore::SVGImage::rootElement):
507
508 2016-08-07  Chris Dumez  <cdumez@apple.com>
509
510         Un-expose DOMSettableTokenList
511         https://bugs.webkit.org/show_bug.cgi?id=160643
512
513         Reviewed by Darin Adler.
514
515         Un-expose DOMSettableTokenList. We merged DOMSettableTokenList into
516         DOMTokenList a while back, as per the specification. At the time, we
517         kept DOMSettableTokenList on Window, as an alias to DOMTokenList.
518         However, Firefox and Chrome dropped DOMSettableTokenList completely.
519         We now do the same as other browsers.
520
521         No new tests, rebaselined existing test.
522
523         * page/DOMWindow.idl:
524
525 2016-08-07  Andreas Kling  <akling@apple.com>
526
527         DocumentRuleSets::collectFeatures() should shrink-to-fit.
528         <https://webkit.org/b/160646>
529
530         Reviewed by Darin Adler.
531
532         We forgot to shrink-wrap the RuleFeatureSet in DocumentRuleSets
533         after collecting the document-wide features.
534
535         * css/DocumentRuleSets.cpp:
536         (WebCore::DocumentRuleSets::collectFeatures):
537
538 2016-08-06  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
539
540         Purge all uses of PassRefPtr in WebCore/Modules
541         https://bugs.webkit.org/show_bug.cgi?id=159965
542
543         Reviewed by Chris Dumez.
544
545         Final clean up in Modules directory.
546
547         No new tests, no behavior changes.
548
549         * Modules/gamepad/deprecated/GamepadList.cpp:
550         (WebCore::GamepadList::set):
551         * Modules/gamepad/deprecated/GamepadList.h:
552         * Modules/indexeddb/IDBGetResult.h:
553         (WebCore::IDBGetResult::IDBGetResult):
554         * Modules/indieui/UIRequestEvent.cpp:
555         (WebCore::UIRequestEvent::create):
556         (WebCore::UIRequestEvent::UIRequestEvent):
557         * Modules/indieui/UIRequestEvent.h:
558         (WebCore::UIRequestEvent::receiver):
559         * Modules/mediasource/MediaSourceRegistry.h:
560         * Modules/mediasource/SampleMap.cpp:
561         (WebCore::SampleMap::addSample):
562         * Modules/mediasource/SampleMap.h:
563         (WebCore::SampleMap::addRange):
564         * Modules/mediasource/SourceBuffer.cpp:
565         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
566         (WebCore::SourceBuffer::textTrackAddCue):
567         (WebCore::SourceBuffer::textTrackRemoveCue):
568         * Modules/mediasource/SourceBuffer.h:
569         * Modules/mediastream/CaptureDeviceManager.cpp:
570         (CaptureDeviceManager::bestSourcesForTypeAndConstraints):
571         * Modules/mediastream/CaptureDeviceManager.h:
572         * Modules/mediastream/MediaDevicesRequest.h:
573         * Modules/mediastream/MediaStream.cpp:
574         (WebCore::MediaStream::internalAddTrack):
575         (WebCore::MediaStream::internalRemoveTrack):
576         * Modules/mediastream/MediaStreamRegistry.h:
577         * Modules/mediastream/MediaStreamTrackEvent.cpp:
578         (WebCore::MediaStreamTrackEvent::create):
579         (WebCore::MediaStreamTrackEvent::MediaStreamTrackEvent):
580         (WebCore::MediaStreamTrackEvent::track):
581         * Modules/mediastream/MediaStreamTrackEvent.h:
582         * Modules/mediastream/MediaTrackConstraints.cpp:
583         (WebCore::MediaTrackConstraints::create):
584         (WebCore::MediaTrackConstraints::MediaTrackConstraints):
585         (WebCore::MediaTrackConstraints::optional):
586         * Modules/mediastream/MediaTrackConstraints.h:
587         * Modules/mediastream/RTCDTMFSender.cpp:
588         (WebCore::RTCDTMFSender::create):
589         (WebCore::RTCDTMFSender::RTCDTMFSender):
590         * Modules/mediastream/RTCDTMFSender.h:
591         * Modules/mediastream/RTCDataChannelEvent.cpp:
592         (WebCore::RTCDataChannelEvent::create):
593         (WebCore::RTCDataChannelEvent::RTCDataChannelEvent):
594         (WebCore::RTCDataChannelEvent::channel):
595         * Modules/mediastream/RTCDataChannelEvent.h:
596         * Modules/mediastream/RTCIceServer.h:
597         * Modules/mediastream/RTCStatsReport.h:
598         * Modules/mediastream/SourceInfo.cpp:
599         (WebCore::SourceInfo::create):
600         (WebCore::SourceInfo::SourceInfo):
601         * Modules/mediastream/SourceInfo.h:
602         * Modules/mediastream/UserMediaClient.h:
603         * Modules/mediastream/UserMediaRequest.cpp:
604         (WebCore::UserMediaRequest::UserMediaRequest):
605         (WebCore::UserMediaRequest::didCreateStream):
606         * Modules/mediastream/UserMediaRequest.h:
607         * Modules/webdatabase/Database.cpp:
608         (WebCore::Database::~Database):
609         * html/HTMLMediaElement.cpp:
610         (WebCore::HTMLMediaElement::textTrackAddCue):
611         (WebCore::HTMLMediaElement::textTrackRemoveCue):
612         * html/HTMLMediaElement.h:
613         * html/HTMLTrackElement.cpp:
614         (WebCore::HTMLTrackElement::textTrackAddCue):
615         (WebCore::HTMLTrackElement::textTrackRemoveCue):
616         * html/HTMLTrackElement.h:
617         * html/track/TextTrack.h:
618         * platform/graphics/SourceBufferPrivateClient.h:
619         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
620         (WebCore::SourceBufferPrivateAVFObjC::processCodedFrame):
621         * platform/mediastream/MediaStreamCreationClient.h:
622         * platform/mediastream/mac/AVCaptureDeviceManager.h:
623         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
624         (WebCore::AVCaptureDeviceManager::bestSourcesForTypeAndConstraints):
625         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
626         (WebCore::RealtimeMediaSourceCenterMac::validateRequestConstraints):
627         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
628         (WebCore::MockSourceBufferPrivate::didReceiveSample):
629
630 2016-08-06  Chris Dumez  <cdumez@apple.com>
631
632         a.replaceChild(a, a) should throw a HierarchyRequestError
633         https://bugs.webkit.org/show_bug.cgi?id=160640
634
635         Reviewed by Darin Adler.
636
637         a.replaceChild(a, a) should throw a HierarchyRequestError, because 'a'
638         is a host-including inclusive ancestor of 'a':
639         - https://dom.spec.whatwg.org/#concept-node-replace
640
641         However, the call is merely ignored in WebKit.
642
643         No new tests, rebaselined existing test.
644
645         * dom/ContainerNode.cpp:
646         (WebCore::ContainerNode::replaceChild):
647
648 2016-08-06  Chris Dumez  <cdumez@apple.com>
649
650         Drop legacy Text.replaceWholeText() API
651         https://bugs.webkit.org/show_bug.cgi?id=160641
652
653         Reviewed by Darin Adler.
654
655         Drop legacy Text.replaceWholeText() API, which is no longer in the
656         specification:
657         - https://dom.spec.whatwg.org/#interface-text
658
659         Firefox and Chrome already dropped support for it.
660
661         No new tests, rebaselined existing test.
662
663         * dom/Text.idl:
664
665 2016-08-06  Chris Dumez  <cdumez@apple.com>
666
667         Align Range.createContextualFragment() input validation with the specification
668         https://bugs.webkit.org/show_bug.cgi?id=160634
669
670         Reviewed by Darin Adler.
671
672         Align Range.createContextualFragment() input validation with the specification:
673         - https://w3c.github.io/DOM-Parsing/#idl-def-range-createcontextualfragment(domstring) (Step 2)
674
675         In particular, we were throwing a NOT_SUPPORTED_ERR when element had localname
676         "html" but was not in the HTML namespace. We should not throw in this case.
677
678         Firefox complies with the specification here.
679
680         No new tests, rebaselined existing test.
681
682         * dom/Range.cpp:
683         (WebCore::Range::createContextualFragment): Deleted.
684
685 2016-08-06  Chris Dumez  <cdumez@apple.com>
686
687         [Web IDL] Add support for [Unscopable] extended attribute
688         https://bugs.webkit.org/show_bug.cgi?id=160637
689
690         Reviewed by Darin Adler.
691
692         Add support for [Unscopable] extended attribute:
693         - http://heycam.github.io/webidl/#Unscopable
694
695         No new tests, rebaselined existing test.
696
697         * bindings/scripts/CodeGeneratorJS.pm:
698         (addUnscopableProperties):
699         (GenerateImplementation):
700         * bindings/scripts/IDLAttributes.txt:
701         * bindings/scripts/test/JS/JSTestObj.cpp:
702         (WebCore::JSTestObjPrototype::finishCreation):
703         * bindings/scripts/test/TestObj.idl:
704         * dom/ChildNode.idl:
705         * dom/ParentNode.idl:
706
707 2016-08-06  Darin Adler  <darin@apple.com>
708
709         Simplify valueToUSVString
710         https://bugs.webkit.org/show_bug.cgi?id=160628
711
712         Reviewed by Sam Weinig.
713
714         * bindings/js/JSDOMBinding.cpp:
715         (WebCore::isUnmatchedSurrogatePair): Deleted. This function was incorrectly named,
716         since it actually returned true if any surrogate code unit was passed.
717         (WebCore::valueToUSVString): Added a fast path for 8-bit characters that doesn't
718         bother iterating the string at all. Changed the fast path to actually check for
719         surrogate pairs. Use StringView::codePoints rather than writing our own loop that
720         does the same thing. In the slow path, use StringView::codePoints to make the logic
721         clear rather than writing out exactly what the specification says. This gets rid of
722         all the many constants the old version of the function contained.
723
724 2016-08-06  Youenn Fablet  <youenn@apple.com>
725
726         [Fetch API] Fetching with a FormData body should reject until it is implemented
727         https://bugs.webkit.org/show_bug.cgi?id=160595
728
729         Reviewed by Alex Christensen.
730
731         Covered by updated tests.
732
733         This patch ensures that fetch will throw if trying to upload something that is not supported.
734         This is the case of BufferSource (FetchBody does not yet extract it) and FormData (no upload support yet).
735
736         * Modules/fetch/FetchBody.cpp:
737         (WebCore::FetchBody::extract): Added a FIXME.
738         * Modules/fetch/FetchBodyOwner.h:
739         (WebCore::FetchBodyOwner::bodyType): Getter used by FetchResponse.
740         * Modules/fetch/FetchRequest.cpp:
741         (WebCore::FetchRequest::setBody): Throwing if given body parameter cannot be extracted by FetchBody.
742         This ensures that a fetch with a body that cannot be uploaded will fail.
743         This is the case of BufferSource which is not yet supported.
744         * Modules/fetch/FetchResponse.cpp:
745         (WebCore::FetchResponse::fetch): Rejecting fetch promise if trying to upload a FormData as it is not implemented.
746
747 2016-08-06  Youenn Fablet  <youenn@apple.com>
748
749         [Fetch API] Fetch API should strip fragment and credentials from URLs used as referrer
750         https://bugs.webkit.org/show_bug.cgi?id=160593
751
752         Reviewed by Alex Christensen.
753
754         Covered by updated tests.
755
756         Stripping of referrer value before sending a load request.
757
758         Fixing bug in workers as referrer value was overwritten by WorkerThreadableLoader.
759         The current handling of referrer values as HTTP header is not great as this may trigger unnecessary preflighting.
760         Refactoring should allow passing it as a separate parameter and setting it after preflighting as per
761         https://fetch.spec.whatwg.org/#http-network-or-cache-fetch.
762
763         Also a newly added test is failing, as SubresourceLoader is removing the referer header in case of a cross-origin redirection.
764         But none is added back.
765
766         * Modules/fetch/FetchRequest.cpp:
767         (WebCore::FetchRequest::internalRequest): Stripping referrer value.
768         * loader/WorkerThreadableLoader.cpp:
769         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge): Do not override referrer value if one is defined.
770         * page/SecurityPolicy.cpp:
771         (WebCore::SecurityPolicy::generateReferrerHeader): Adding assertion to ensure referrer value does not contain
772         credentials and/or fragment identifiers.
773
774 2016-08-05  Yusuke Suzuki  <utatane.tea@gmail.com>
775
776         [ES6] Add ScriptElement::determineScriptType
777         https://bugs.webkit.org/show_bug.cgi?id=149576
778
779         Reviewed by Ryosuke Niwa.
780
781         Change ScriptElement::isScriptTypeSupported to ScriptElement::determineScriptType.
782         And introduce ScriptType, which is either "classic" or "module".
783         And support "module" type in ScriptElement[1, 2].
784         But this patch does not contain any module tag support code.
785         This will be implemented in the subsequent patch.
786
787         [1]: https://html.spec.whatwg.org/multipage/webappapis.html#integration-with-the-javascript-module-system
788         [2]: https://html.spec.whatwg.org/multipage/scripting.html#attr-script-type
789
790         * dom/ScriptElement.cpp:
791         (WebCore::ScriptElement::determineScriptType):
792         (WebCore::ScriptElement::prepareScript):
793         (WebCore::ScriptElement::isScriptTypeSupported): Deleted.
794         * dom/ScriptElement.h:
795
796 2016-08-05  Jonathan Bedard  <jbedard@apple.com>
797
798         NULL Reference Error in ElementRuleCollector
799         https://bugs.webkit.org/show_bug.cgi?id=160362
800
801         Reviewed by Darin Adler.
802
803         No new tests, existing CSS tests cover this change.
804
805         Undefined behavior sanitizer found a reference bound to a NULL pointer.
806         The root cause of this issue was a discrepancy between whether an author style needed to be defined.  In some logic, an undefined author style was considered acceptable, but in other logic, author style was always assumed to be defined.  To fix this, a variable was added so that while author style is always defined, there is a flag indicating if this definition occurred in the constructor for use by functions which allow an undefined author style.
807
808         * css/DocumentRuleSets.cpp:
809         (WebCore::DocumentRuleSets::DocumentRuleSets): Define author style by default.
810         (WebCore::DocumentRuleSets::resetAuthorStyle): Switch author style flag.
811         * css/DocumentRuleSets.h: Added author style flag, changed authorStyle accessor to reference from pointer.
812         * css/ElementRuleCollector.cpp:
813         (WebCore::ElementRuleCollector::ElementRuleCollector): Original location of undefined behavior.
814         (WebCore::ElementRuleCollector::matchHostPseudoClassRules): Changed pointer to reference.
815         (WebCore::ElementRuleCollector::matchSlottedPseudoElementRules): Changed pointer to reference.
816         * css/PageRuleCollector.cpp:
817         (WebCore::PageRuleCollector::matchAllPageRules): Check new flag, changed pointer to reference.
818
819         * css/StyleResolver.cpp: Changed pointer to reference.
820         * dom/Document.cpp: Dito.
821         * style/AttributeChangeInvalidation.cpp: Dito.
822         * style/ClassChangeInvalidation.cpp: Dito.
823         * style/IdChangeInvalidation.cpp: Dito.
824         * style/StyleSharingResolver.cpp: Dito.
825
826 2016-08-05  Chris Dumez  <cdumez@apple.com>
827
828         DOMException should be constructible
829         https://bugs.webkit.org/show_bug.cgi?id=160626
830
831         Reviewed by Darin Adler.
832
833         DOMException should be constructible:
834         - http://heycam.github.io/webidl/#dfn-DOMException
835         - http://heycam.github.io/webidl/#es-DOMException-constructor-object
836
837         DOMException already has a constructor in Firefox and Chrome so this
838         aligns our behavior with other browsers.
839
840         Test: imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/DOMException-constructor.html
841
842         * dom/DOMCoreException.cpp:
843         (WebCore::errorCodeFromName):
844         (WebCore::DOMCoreException::create):
845         (WebCore::DOMCoreException::DOMCoreException):
846         * dom/DOMCoreException.h:
847         * dom/DOMCoreException.idl:
848         * dom/ExceptionBase.cpp:
849         (WebCore::ExceptionBase::ExceptionBase):
850         * dom/ExceptionBase.h:
851
852 2016-08-05  Chris Dumez  <cdumez@apple.com>
853
854         Align Range.insertNode() input validation with the specification
855         https://bugs.webkit.org/show_bug.cgi?id=160624
856
857         Reviewed by Sam Weinig.
858
859         Align Range.insertNode() input validation with the specification:
860         - https://dom.spec.whatwg.org/#dom-range-insertnode
861         - https://dom.spec.whatwg.org/#concept-range-insert (step 1)
862
863         In particular, if range’s start node is a ProcessingInstruction or
864         Comment node, is a Text node whose parent is null, or is node, then
865         we should throw a HierarchyRequestError.
866
867         Chrome behaves according to the specification.
868
869         No new tests, rebaselined existing test.
870
871         * dom/Range.cpp:
872         (WebCore::Range::insertNode):
873
874 2016-08-05  Chris Dumez  <cdumez@apple.com>
875
876         [Web IDL] Add support for 'any' type in dictionaries
877         https://bugs.webkit.org/show_bug.cgi?id=160511
878
879         Reviewed by Sam Weinig.
880
881         Add support for 'any' type in dictionaries. It will pass the value as
882         a JSValue to the implementation. If the member is not present, it will
883         pass jsUndefined() to the implementation.
884
885         Having 'any' support in dictionaries is a convenient workaround for
886         types we don't support yet (e.g. union types).
887
888         No new tests, updated bindings tests.
889
890         * bindings/js/JSDOMConvert.h:
891         (WebCore::Converter<JSC::JSValue>::convert):
892         * bindings/scripts/test/JS/JSTestObj.cpp:
893         (WebCore::convert<TestObj::Dictionary>):
894         * bindings/scripts/test/TestObj.idl:
895
896 2016-08-05  Chris Dumez  <cdumez@apple.com>
897
898         [Web IDL] Add support for USVString type
899         https://bugs.webkit.org/show_bug.cgi?id=160608
900
901         Reviewed by Sam Weinig.
902
903         Add support for USVString type in our bindings generator:
904         - http://heycam.github.io/webidl/#idl-USVString
905
906         Also start using USVString instead of DOMString when suitable as per
907         the following specifications:
908         - http://dom.spec.whatwg.org
909         - http://html.spec.whatwg.org
910         - http://url.spec.whatwg.org
911
912         Test: js/dom/webidl-type-mapping.html
913
914         * Modules/websockets/CloseEvent.idl:
915         * Modules/websockets/WebSocket.idl:
916         * bindings/js/JSDOMBinding.cpp:
917         (WebCore::isUnmatchedSurrogatePair):
918         (WebCore::valueToUSVString):
919         (WebCore::valueToUSVStringTreatingNullAsEmptyString):
920         (WebCore::valueToUSVStringWithUndefinedOrNullCheck):
921         * bindings/js/JSDOMBinding.h:
922         * bindings/js/JSDOMWindowCustom.cpp:
923         (WebCore::JSDOMWindow::open):
924         (WebCore::handlePostMessage):
925         * bindings/js/JSHistoryCustom.cpp:
926         (WebCore::JSHistory::pushState):
927         (WebCore::JSHistory::replaceState):
928         * bindings/js/JSMessageEventCustom.cpp:
929         (WebCore::handleInitMessageEvent):
930         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
931         (WebCore::JSWorkerGlobalScope::importScripts):
932         * bindings/scripts/CodeGenerator.pm:
933         (SkipIncludeHeader):
934         (IsStringOrEnumType):
935         (IsStringType):
936         (IsRefPtrType):
937         * bindings/scripts/CodeGeneratorJS.pm:
938         (GenerateParametersCheck):
939         (JSValueToNative):
940         (NativeToJSValue):
941         * bindings/scripts/IDLParser.pm:
942         (parseNonAnyType):
943         * dom/Document.idl:
944         * dom/ErrorEvent.idl:
945         * dom/HashChangeEvent.idl:
946         * dom/MessageEvent.idl:
947         * dom/Node.idl:
948         * html/DOMFormData.idl:
949         * html/DOMURL.idl:
950         * html/HTMLAnchorElement.idl:
951         * html/HTMLAppletElement.idl:
952         * html/HTMLAreaElement.idl:
953         * html/HTMLBaseElement.idl:
954         * html/HTMLButtonElement.idl:
955         * html/HTMLEmbedElement.idl:
956         * html/HTMLFormElement.idl:
957         * html/HTMLFrameElement.idl:
958         * html/HTMLHyperlinkElementUtils.idl:
959         * html/HTMLIFrameElement.idl:
960         * html/HTMLImageElement.idl:
961         * html/HTMLInputElement.idl:
962         * html/HTMLLinkElement.idl:
963         * html/HTMLMediaElement.idl:
964         * html/HTMLModElement.idl:
965         * html/HTMLObjectElement.idl:
966         * html/HTMLQuoteElement.idl:
967         * html/HTMLScriptElement.idl:
968         * html/HTMLSourceElement.idl:
969         * html/HTMLTrackElement.idl:
970         * html/HTMLVideoElement.idl:
971         * html/URLUtils.idl:
972         * page/DOMWindow.idl:
973         * page/EventSource.idl:
974         * page/History.idl:
975         * page/Location.idl:
976         * storage/StorageEvent.idl:
977         * testing/TypeConversions.h:
978         (WebCore::TypeConversions::testString):
979         (WebCore::TypeConversions::setTestString):
980         (WebCore::TypeConversions::testUSVString):
981         (WebCore::TypeConversions::setTestUSVString):
982         * testing/TypeConversions.idl:
983         * workers/Worker.idl:
984         * workers/WorkerGlobalScope.idl:
985
986 2016-08-05  Jeremy Jones  <jeremyj@apple.com>
987
988         revert r202466 r202546 this causes regressions in media loading with temporary redirects.
989         https://bugs.webkit.org/show_bug.cgi?id=160613
990
991         Reviewed by Jon Lee.
992
993         No new tests. Skipping two tests.
994
995         This reverts a change that attempted to fix temporary redirects with media loading.
996         The change introduced problems. Reverting this to require media stack to properly
997         handle redirects.
998
999         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1000         (WebCore::MediaPlayerPrivateAVFoundationObjC::hasSingleSecurityOrigin):
1001         * platform/network/cocoa/WebCoreNSURLSession.h:
1002         * platform/network/cocoa/WebCoreNSURLSession.mm:
1003         (-[WebCoreNSURLSession initWithResourceLoader:delegate:delegateQueue:]): Deleted.
1004         (-[WebCoreNSURLSession updateHasSingleSecurityOrigin:]): Deleted.
1005         (-[WebCoreNSURLSession dataTaskWithRequest:]): Deleted.
1006         (-[WebCoreNSURLSession dataTaskWithURL:]): Deleted.
1007         (-[WebCoreNSURLSessionDataTask resource:receivedResponse:]): Deleted.
1008         (-[WebCoreNSURLSessionDataTask resource:receivedRedirect:request:]): Deleted.
1009
1010 2016-08-05  Simon Fraser  <simon.fraser@apple.com>
1011
1012         Add a tiny bit more image logging
1013         https://bugs.webkit.org/show_bug.cgi?id=160621
1014
1015         Reviewed by Tim Horton.
1016
1017         Add logging related to image subsampling.
1018
1019         * platform/graphics/BitmapImage.cpp:
1020         (WebCore::BitmapImage::frameImageAtIndex):
1021
1022 2016-08-05  Nan Wang  <n_wang@apple.com>
1023
1024         AX: Asking for group members of radio button that has no name attribute will cause crash
1025         https://bugs.webkit.org/show_bug.cgi?id=160583
1026
1027         Reviewed by Chris Fleizach.
1028
1029         The NameToGroupMap is null when there's no name attribute on the radio buttons. Added a 
1030         check so that we don't try to get a value from a null HashSet.
1031
1032         Test: accessibility/mac/radio-button-no-name-crash.html
1033
1034         * dom/RadioButtonGroups.cpp:
1035         (WebCore::RadioButtonGroups::groupMembers):
1036
1037 2016-08-05  Brent Fulgham  <bfulgham@apple.com>
1038
1039         ASSERTION FAILED: observer in WebCore::BitmapImage::drawPattern
1040         https://bugs.webkit.org/show_bug.cgi?id=141637
1041         <rdar://problem/27709864>
1042
1043         Reviewed by Tim Horton.
1044
1045         Test: fast/images/image-source-assert.html
1046
1047         * platform/graphics/BitmapImage.cpp:
1048         (WebCore::BitmapImage::drawPattern): Remove invalid assertion.
1049
1050 2016-08-05  Simon Fraser  <simon.fraser@apple.com>
1051
1052         marquee with "truespeed" animates at > 60fps, hogging CPU
1053         https://bugs.webkit.org/show_bug.cgi?id=160609
1054
1055         Reviewed by David Hyatt.
1056         
1057         A <marquee truespeed="" scrollDelay="0"> would fire a zero-delay timer and also
1058         fail to animate, hogging CPU.
1059         
1060         Fix to cap the timer at 16ms intervals. We don't believe it's necessary to
1061         maintain web compatibility here.
1062
1063         Tested by existing tests.
1064
1065         * html/HTMLMarqueeElement.cpp:
1066         (WebCore::HTMLMarqueeElement::minimumDelay):
1067         * html/HTMLMarqueeElement.h:
1068
1069 2016-08-05  Ryan Haddad  <ryanhaddad@apple.com>
1070
1071         Unreviewed, rolling out r204181.
1072
1073         This change caused an existing LayoutTest to fail on WK1
1074
1075         Reverted changeset:
1076
1077         "Don't set document.domain to an IP address fragment"
1078         https://bugs.webkit.org/show_bug.cgi?id=126045
1079         http://trac.webkit.org/changeset/204181
1080
1081 2016-08-05  Commit Queue  <commit-queue@webkit.org>
1082
1083         Unreviewed, rolling out r204128.
1084         https://bugs.webkit.org/show_bug.cgi?id=160607
1085
1086         Solve the issue by removing the workaround for static files
1087         (Requested by jonlee_ on #webkit).
1088
1089         Reverted changeset:
1090
1091         "Temporary redirected m3u8 streaming stopped working."
1092         https://bugs.webkit.org/show_bug.cgi?id=160472
1093         http://trac.webkit.org/changeset/204128
1094
1095 2016-08-05  Brent Fulgham  <bfulgham@apple.com>
1096
1097         validity assertion fails after removing a child of an <optgroup> element
1098         https://bugs.webkit.org/show_bug.cgi?id=155720
1099         <rdar://problem/27720746>
1100
1101         Reviewed by Brent Fulgham.
1102
1103         All calls to HTMLSelectElement::setRecalcListItems also need to call HTMLSelectElement::updateValidity.
1104
1105         Test: fast/dom/HTMLSelectElement/select-remove-from-optgroup.html
1106
1107         * html/HTMLOptGroupElement.cpp:
1108         (WebCore::HTMLOptGroupElement::recalcSelectOptions): Call 'updateValidity' after 'setRecalcListItems'.
1109         * html/HTMLOptionElement.cpp:
1110         (WebCore::HTMLOptionElement::insertedInto): Ditto.
1111         * html/HTMLSelectElement.cpp:
1112         (WebCore::HTMLSelectElement::parseAttribute): Ditto.
1113
1114 2016-08-05  Ryan Haddad  <ryanhaddad@apple.com>
1115
1116         Unreviewed, rolling out r204174.
1117
1118         The test for this change is failing on WK1
1119
1120         Reverted changeset:
1121
1122         "Popups opened from a sandboxed iframe should themselves be
1123         sandboxed"
1124         https://bugs.webkit.org/show_bug.cgi?id=134850
1125         http://trac.webkit.org/changeset/204174
1126
1127 2016-08-05  John Wilander  <wilander@apple.com>
1128
1129         Don't set document.domain to an IP address fragment
1130         https://bugs.webkit.org/show_bug.cgi?id=126045
1131         <rdar://problem/27331794>
1132
1133         Reviewed by Daniel Bates.
1134
1135         This patch matches the following Blink one:
1136         https://chromium.googlesource.com/chromium/blink/+/b19a57fdb323d5a80d3a1cb0a6b343558c4237b0
1137
1138         IP address octets should not be treated as subdomains when setting
1139         document.domain. The specs say:
1140         'The domain attribute's setter must run these steps: ...
1141         7. If host is not equal to effectiveDomain, then run these substeps:
1142             1. If host or effectiveDomain is not a domain, then throw a
1143             "SecurityError" DOMException.'
1144         https://html.spec.whatwg.org/multipage/browsers.html#relaxing-the-same-origin-restriction
1145         Last Updated 5 August 2016
1146
1147         'A host is a domain, an IPv4 address, or an IPv6 address.'
1148         https://url.spec.whatwg.org/#concept-domain
1149         Last Updated 28 July 2016
1150
1151         Test: http/tests/security/set-domain-remove-subdomain-for-ip-address.html
1152
1153         * dom/Document.cpp:
1154         (WebCore::Document::setDomain):
1155             Now checks whether the security origin is allowed to remove
1156             subdomains. If not, it throws a security error.
1157         * page/OriginAccessEntry.cpp:
1158         (WebCore::OriginAccessEntry::OriginAccessEntry):
1159             Constructor now expects an IP address setting.
1160         (WebCore::OriginAccessEntry::matchesOrigin):
1161             Now also checks whether the host in an IP address and returns
1162             false if IP addresses aren't configured to be treated as domains.
1163         * page/OriginAccessEntry.h:
1164             Introduced new enum for IP address setting.
1165             Constructor now expects an IP address setting.
1166         (WebCore::OriginAccessEntry::ipAddressSettings):
1167             New getter.
1168         (WebCore::operator==):
1169             Now also requires IP address settings to match.
1170         * page/SecurityPolicy.cpp:
1171         (WebCore::SecurityPolicy::addOriginAccessWhitelistEntry):
1172             Changes to match OriginAccessEntry's new constructor.
1173         (WebCore::SecurityPolicy::removeOriginAccessWhitelistEntry):
1174             Changes to match OriginAccessEntry's new constructor.
1175         * page/Settings.in:
1176             Added a setting to allow IP address octets to be treated as
1177             subdomains. This way our existing tests setting document.domain
1178             still work.
1179
1180 2016-08-05  Chris Dumez  <cdumez@apple.com>
1181
1182         Window's named properties should be exposed on a WindowProperties object in its prototype
1183         https://bugs.webkit.org/show_bug.cgi?id=160354
1184
1185         Reviewed by Gavin Barraclough.
1186
1187         Window's named properties should be exposed on a WindowProperties object
1188         in its prototype:
1189         - http://heycam.github.io/webidl/#named-properties-object
1190
1191         Firefox and Chrome both comply with the specification. However, WebKit
1192         had no "WindowProperties" object in the Window prototype chain and the
1193         named properties are exposed on the Window object itself.
1194
1195         No new tests, rebaselined existing tests.
1196
1197         * CMakeLists.txt:
1198         * WebCore.xcodeproj/project.pbxproj:
1199         * bindings/js/JSBindingsAllInOne.cpp:
1200         * bindings/js/JSDOMWindowCustom.cpp:
1201         (WebCore::JSDOMWindow::getOwnPropertySlot):
1202         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
1203         (WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess): Deleted.
1204         (WebCore::JSDOMWindow::put): Deleted.
1205         (WebCore::JSDOMWindow::putByIndex): Deleted.
1206         (WebCore::JSDOMWindow::getEnumerableLength): Deleted.
1207         * bindings/js/JSDOMWindowProperties.cpp: Added.
1208         (WebCore::jsDOMWindowPropertiesGetOwnPropertySlotNamedItemGetter):
1209         (WebCore::JSDOMWindowProperties::getOwnPropertySlot):
1210         (WebCore::JSDOMWindowProperties::getOwnPropertySlotByIndex):
1211         * bindings/js/JSDOMWindowProperties.h: Added.
1212         (WebCore::JSDOMWindowProperties::create):
1213         (WebCore::JSDOMWindowProperties::createStructure):
1214         (WebCore::JSDOMWindowProperties::JSDOMWindowProperties):
1215         * bindings/js/JSDOMWindowShell.cpp:
1216         (WebCore::JSDOMWindowShell::setWindow):
1217
1218 2016-08-05  Brady Eidson  <beidson@apple.com>
1219
1220         Create platform/gamepad directory, and make GamepadProvider pure virtual (with a default empty implementation).
1221         https://bugs.webkit.org/show_bug.cgi?id=160599
1222
1223         Reviewed by Alex Christensen.
1224
1225         No new tests (No behavior change).
1226
1227         Except for the GamepadProvider/EmptyGamepadProvider split, this is just moving files around.
1228
1229         * CMakeLists.txt:
1230         * PlatformEfl.cmake:
1231         * PlatformGTK.cmake:
1232         * WebCore.xcodeproj/project.pbxproj:
1233         * platform/Linux.cmake:
1234
1235         * platform/gamepad.h: Removed.
1236         
1237         * platform/gamepad/EmptyGamepadProvider.cpp: 
1238         (WebCore::EmptyGamepadProvider::startMonitoringGamepads):
1239         (WebCore::EmptyGamepadProvider::stopMonitoringGamepads):
1240         (WebCore::EmptyGamepadProvider::platformGamepads):
1241         * platform/gamepad/EmptyGamepadProvider.h:
1242         
1243         * platform/gamepad/GamepadProvider.cpp: Renamed from Source/WebCore/platform/GamepadProvider.cpp.
1244         (WebCore::GamepadProvider::singleton):
1245         (WebCore::GamepadProvider::setSharedProvider):
1246         * platform/gamepad/GamepadProvider.h: Renamed from Source/WebCore/platform/GamepadProvider.h.
1247         (WebCore::GamepadProvider::~GamepadProvider):
1248         
1249         * platform/gamepad/GamepadProviderClient.h: Renamed from Source/WebCore/platform/GamepadProviderClient.h.
1250         (WebCore::GamepadProviderClient::~GamepadProviderClient):
1251         
1252         * platform/gamepad/PlatformGamepad.h: Renamed from Source/WebCore/platform/PlatformGamepad.h.
1253         (WebCore::PlatformGamepad::~PlatformGamepad):
1254         (WebCore::PlatformGamepad::id):
1255         (WebCore::PlatformGamepad::index):
1256         (WebCore::PlatformGamepad::lastUpdateTime):
1257         (WebCore::PlatformGamepad::connectTime):
1258         (WebCore::PlatformGamepad::PlatformGamepad):
1259
1260         * platform/gamepad/deprecated/Gamepads.h: Renamed from Source/WebCore/platform/Gamepads.h.
1261
1262         * platform/gamepad/efl/GamepadsEfl.cpp: Renamed from Source/WebCore/platform/efl/GamepadsEfl.cpp.
1263         (WebCore::GamepadDeviceEfl::resetFdHandler):
1264         (WebCore::GamepadDeviceEfl::deviceFile):
1265         (WebCore::GamepadDeviceEfl::GamepadDeviceEfl):
1266         (WebCore::GamepadDeviceEfl::~GamepadDeviceEfl):
1267         (WebCore::GamepadDeviceEfl::readCallback):
1268         (WebCore::GamepadsEfl::onGamePadChange):
1269         (WebCore::GamepadsEfl::GamepadsEfl):
1270         (WebCore::GamepadsEfl::~GamepadsEfl):
1271         (WebCore::GamepadsEfl::registerDevice):
1272         (WebCore::GamepadsEfl::unregisterDevice):
1273         (WebCore::GamepadsEfl::updateGamepadList):
1274         (WebCore::sampleGamepads):
1275         
1276         * platform/gamepad/glib/GamepadsGlib.cpp: Renamed from Source/WebCore/platform/glib/GamepadsGlib.cpp.
1277         (WebCore::GamepadDeviceGlib::GamepadDeviceGlib):
1278         (WebCore::GamepadDeviceGlib::~GamepadDeviceGlib):
1279         (WebCore::GamepadDeviceGlib::readCallback):
1280         (WebCore::GamepadsGlib::GamepadsGlib):
1281         (WebCore::GamepadsGlib::~GamepadsGlib):
1282         (WebCore::GamepadsGlib::registerDevice):
1283         (WebCore::GamepadsGlib::unregisterDevice):
1284         (WebCore::GamepadsGlib::updateGamepadList):
1285         (WebCore::GamepadsGlib::onUEventCallback):
1286         (WebCore::GamepadsGlib::isGamepadDevice):
1287         (WebCore::sampleGamepads):
1288         
1289         * platform/gamepad/linux/GamepadDeviceLinux.cpp: Renamed from Source/WebCore/platform/linux/GamepadDeviceLinux.cpp.
1290         (WebCore::GamepadDeviceLinux::GamepadDeviceLinux):
1291         (WebCore::GamepadDeviceLinux::~GamepadDeviceLinux):
1292         (WebCore::GamepadDeviceLinux::updateForEvent):
1293         (WebCore::GamepadDeviceLinux::normalizeAxisValue):
1294         (WebCore::GamepadDeviceLinux::normalizeButtonValue):
1295         * platform/gamepad/linux/GamepadDeviceLinux.h: Renamed from Source/WebCore/platform/linux/GamepadDeviceLinux.h.
1296         (WebCore::GamepadDeviceLinux::connected):
1297         (WebCore::GamepadDeviceLinux::id):
1298         (WebCore::GamepadDeviceLinux::timestamp):
1299         (WebCore::GamepadDeviceLinux::axesCount):
1300         (WebCore::GamepadDeviceLinux::axesData):
1301         (WebCore::GamepadDeviceLinux::buttonsCount):
1302         (WebCore::GamepadDeviceLinux::buttonsData):
1303         
1304         * platform/gamepad/mac/HIDGamepad.cpp: Renamed from Source/WebCore/platform/mac/HIDGamepad.cpp.
1305         (WebCore::HIDGamepad::HIDGamepad):
1306         (WebCore::HIDGamepad::getCurrentValueForElement):
1307         (WebCore::HIDGamepad::initElements):
1308         (WebCore::HIDGamepad::initElementsFromArray):
1309         (WebCore::HIDGamepad::maybeAddButton):
1310         (WebCore::HIDGamepad::maybeAddAxis):
1311         (WebCore::HIDGamepad::valueChanged):
1312         * platform/gamepad/mac/HIDGamepad.h: Renamed from Source/WebCore/platform/mac/HIDGamepad.h.
1313         (WebCore::HIDGamepadElement::HIDGamepadElement):
1314         (WebCore::HIDGamepadElement::~HIDGamepadElement):
1315         (WebCore::HIDGamepadElement::isButton):
1316         (WebCore::HIDGamepadElement::isAxis):
1317         (WebCore::HIDGamepadButton::HIDGamepadButton):
1318         (WebCore::HIDGamepadAxis::HIDGamepadAxis):
1319         (WebCore::HIDGamepad::hidDevice):
1320         
1321         * platform/gamepad/mac/HIDGamepadProvider.cpp: Renamed from Source/WebCore/platform/mac/HIDGamepadProvider.cpp.
1322         (WebCore::deviceMatchingDictionary):
1323         (WebCore::deviceAddedCallback):
1324         (WebCore::deviceRemovedCallback):
1325         (WebCore::deviceValuesChangedCallback):
1326         (WebCore::HIDGamepadProvider::singleton):
1327         (WebCore::HIDGamepadProvider::HIDGamepadProvider):
1328         (WebCore::HIDGamepadProvider::indexForNewlyConnectedDevice):
1329         (WebCore::HIDGamepadProvider::connectionDelayTimerFired):
1330         (WebCore::HIDGamepadProvider::openAndScheduleManager):
1331         (WebCore::HIDGamepadProvider::closeAndUnscheduleManager):
1332         (WebCore::HIDGamepadProvider::startMonitoringGamepads):
1333         (WebCore::HIDGamepadProvider::stopMonitoringGamepads):
1334         (WebCore::HIDGamepadProvider::deviceAdded):
1335         (WebCore::HIDGamepadProvider::deviceRemoved):
1336         (WebCore::HIDGamepadProvider::valuesChanged):
1337         (WebCore::HIDGamepadProvider::inputNotificationTimerFired):
1338         (WebCore::HIDGamepadProvider::removeGamepadForDevice):
1339         * platform/gamepad/mac/HIDGamepadProvider.h: Renamed from Source/WebCore/platform/mac/HIDGamepadProvider.h.
1340         (WebCore::HIDGamepadProvider::platformGamepads):
1341
1342 2016-08-05  Commit Queue  <commit-queue@webkit.org>
1343
1344         Unreviewed, rolling out r204147.
1345         https://bugs.webkit.org/show_bug.cgi?id=160602
1346
1347         Considering another implementation (Requested by eric_carlson
1348         on #webkit).
1349
1350         Reverted changeset:
1351
1352         "Add long, boolean, double, and String Media Constraint
1353         classes"
1354         https://bugs.webkit.org/show_bug.cgi?id=160524
1355         http://trac.webkit.org/changeset/204147
1356
1357 2016-08-05  John Wilander  <wilander@apple.com>
1358
1359         Popups opened from a sandboxed iframe should themselves be sandboxed
1360         https://bugs.webkit.org/show_bug.cgi?id=134850
1361         <rdar://problem/27375388>
1362
1363         Reviewed by Brent Fulgham.
1364
1365         This replicates the behavior in Chrome, Firefox, and according to the reporter
1366         also in Internet Explorer. See the Mozilla bug report:
1367         https://bugzilla.mozilla.org/show_bug.cgi?id=1037381#c1
1368
1369         Test: http/tests/security/window-opened-from-sandboxed-iframe-should-inherit-sandbox.html
1370
1371         * page/Chrome.cpp:
1372         (WebCore::Chrome::createWindow):
1373             Now copies the opener's frame loader effective sandbox flags to the new
1374             frame loader.
1375
1376 2016-08-05  Darin Adler  <darin@apple.com>
1377
1378         * DerivedSources.make: Fix all places that were using tabs instead of spaces outside
1379         the actual make rules, where tabs are required as part of make syntax.
1380
1381 2016-08-05  Youenn Fablet  <youenn@apple.com>
1382
1383         [Fetch API] SubresourceLoader::checkRedirectionCrossOriginAccessControl should not always assert in SameOrigin mode
1384         https://bugs.webkit.org/show_bug.cgi?id=160594
1385
1386         Reviewed by Alex Christensen.
1387
1388         Covered by rebased tests.
1389
1390         * loader/SubresourceLoader.cpp:
1391         (WebCore::SubresourceLoader::checkRedirectionCrossOriginAccessControl):
1392         It should not throw is mode is SameOrigin and resource is same origin.
1393
1394 2016-08-05  Youenn Fablet  <youenn@apple.com>
1395
1396         [Fetch API] Response.blob should not assert in case the created blob is empty
1397         https://bugs.webkit.org/show_bug.cgi?id=160592
1398
1399         Reviewed by Alex Christensen.
1400
1401         Covered bu updated test.
1402
1403         * Modules/fetch/FetchBodyConsumer.cpp:
1404         (WebCore::FetchBodyConsumer::takeAsBlob): Removing assertion as a response may have a body but with no data in it.
1405
1406 2016-08-05  Commit Queue  <commit-queue@webkit.org>
1407
1408         Unreviewed, rolling out r203935.
1409         https://bugs.webkit.org/show_bug.cgi?id=160596
1410
1411         looks like a 1-2% PLUM regression on iPhone 6s (Requested by
1412         kling_ on #webkit).
1413
1414         Reverted changeset:
1415
1416         "Window's named properties should be exposed on a
1417         WindowProperties object in its prototype"
1418         https://bugs.webkit.org/show_bug.cgi?id=160354
1419         http://trac.webkit.org/changeset/203935
1420
1421 2016-08-05  Youenn Fablet  <youenn@apple.com>
1422
1423         [Fetch API] Activate CSP checks
1424         https://bugs.webkit.org/show_bug.cgi?id=160445
1425
1426         Reviewed by Daniel Bates.
1427
1428         Tests: http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-insecure-fetch-in-main-frame.html
1429                http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/upgrade-insecure-fetch-in-worker.html
1430
1431         * Modules/fetch/FetchLoader.cpp:
1432         (WebCore::FetchLoader::start): Adding CSP and URL upgrade checks.
1433
1434 2016-08-05  Youenn Fablet  <youenn@apple.com>
1435
1436         DocumentThreadableLoader should report an error when getting a null CachedResource
1437         https://bugs.webkit.org/show_bug.cgi?id=160444
1438
1439         Reviewed by Alex Christensen.
1440
1441         Covered by existing and rebased tests.
1442
1443         * loader/DocumentThreadableLoader.cpp:
1444         (WebCore::DocumentThreadableLoader::loadRequest): Calling didFail with an AccessControl error if unable to have a CachedResource.
1445         The resource error type AccessControl is important as it indicates to some clients that they should not retry loading the same resource (EventSource notably).
1446         * xml/XMLHttpRequest.cpp:
1447         (WebCore::XMLHttpRequest::createRequest): Removed handling of ThreadableLoader::create returning null.
1448         This should be handled in didFail callback. This allows aligning behavior of
1449         WorkerThreadableLoaderi::MainThreadBridge and XMLHttpRequest as ThreadableLoader clients.
1450         (WebCore::XMLHttpRequest::didFail): Handle the case of didFail being called synchronously from ThreadableLoader::create.
1451         In that case, use a timer to dispatch network events asynchronously.
1452
1453 2016-08-04  Chris Dumez  <cdumez@apple.com>
1454
1455         Add support for DOMTokenList.replace()
1456         https://bugs.webkit.org/show_bug.cgi?id=160573
1457
1458         Reviewed by Alex Christensen.
1459
1460         Add support for DOMTokenList.replace():
1461         https://dom.spec.whatwg.org/#dom-domtokenlist-replace
1462
1463         No new tests, rebaselined existing tests.
1464
1465         * html/DOMTokenList.cpp:
1466         (WebCore::tokenContainsHTMLSpace):
1467         (WebCore::DOMTokenList::validateToken):
1468         (WebCore::DOMTokenList::replace):
1469         * html/DOMTokenList.h:
1470         * html/DOMTokenList.idl:
1471
1472 2016-08-04  Myles C. Maxfield  <mmaxfield@apple.com>
1473
1474         [iOS] Some videos in iBooks erroneously go fullscreen
1475         https://bugs.webkit.org/show_bug.cgi?id=160582
1476         <rdar://problem/27669831>
1477
1478         Reviewed by Jon Lee.
1479
1480         No new tests because we can't currently mock the iBooks application bundle ID.
1481
1482         * html/MediaElementSession.cpp:
1483         (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback):
1484
1485 2016-08-04  Michael Catanzaro  <mcatanzaro@igalia.com>
1486
1487         [Fontconfig] Segmentation fault in WebCore::FontCache::lastResortFallbackFont
1488         https://bugs.webkit.org/show_bug.cgi?id=141432
1489
1490         Reviewed by Myles C. Maxfield.
1491
1492         Crash more cleanly when we can't find any last resort fallback font.
1493
1494         * platform/graphics/freetype/FontCacheFreeType.cpp:
1495         (WebCore::FontCache::lastResortFallbackFont):
1496
1497 2016-08-04  Chris Dumez  <cdumez@apple.com>
1498
1499         Move insertAdjacent*() API from HTMLElement to Element
1500         https://bugs.webkit.org/show_bug.cgi?id=160567
1501
1502         Reviewed by Sam Weinig.
1503
1504         Move insertAdjacent*() API from HTMLElement to Element:
1505         - https://w3c.github.io/DOM-Parsing/#extensions-to-the-element-interface
1506         - https://dom.spec.whatwg.org/#element
1507
1508         Firefox and Chrome both have insertAdjacentHTML() on Element.
1509         Chrome has insertAdjacentText() / insertAdjacentElement() on Element as
1510         well. Firefox does not have this API at all.
1511
1512         Also align insertAdjacentHTML() with the specification so that we
1513         now throw a NO_MODIFICATION_ALLOWED_ERR if called with "beforebegin" /
1514         "afterend" on a parent-less element. This is as per:
1515         - https://w3c.github.io/DOM-Parsing/#dom-element-insertadjacenthtml
1516
1517         Previously, WebKit would just silently ignore such calls. The new
1518         behavior with consistent with both Firefox and Chrome.
1519
1520         No new tests, rebaselined existing tests.
1521
1522         * dom/Element.cpp:
1523         (WebCore::Element::insertAdjacent):
1524         (WebCore::Element::insertAdjacentElement):
1525         (WebCore::contextElementForInsertion):
1526         (WebCore::Element::insertAdjacentHTML):
1527         (WebCore::Element::insertAdjacentText):
1528         * dom/Element.h:
1529         * dom/Element.idl:
1530         * html/HTMLElement.cpp:
1531         (WebCore::HTMLElement::insertAdjacent): Deleted.
1532         (WebCore::HTMLElement::insertAdjacentElement): Deleted.
1533         (WebCore::contextElementForInsertion): Deleted.
1534         (WebCore::HTMLElement::insertAdjacentHTML): Deleted.
1535         (WebCore::HTMLElement::insertAdjacentText): Deleted.
1536         * html/HTMLElement.h:
1537         * html/HTMLElement.idl:
1538
1539 2016-08-04  Anders Carlsson  <andersca@apple.com>
1540
1541         Another build fix attempt.
1542
1543         * bindings/gobject/WebKitDOMDeprecated.cpp:
1544
1545 2016-08-04  George Ruan  <gruan@apple.com>
1546
1547         Add long, boolean, double, and String Media Constraint classes
1548         https://bugs.webkit.org/show_bug.cgi?id=160524
1549         <rdar://problem/27685132>
1550
1551         Reviewed by Eric Carlson.
1552
1553         No new tests. The current patch is untestable, but functionality
1554         will be tested in a future patch.
1555
1556         * WebCore.xcodeproj/project.pbxproj:
1557         * platform/mediastream/MediaConstraints.cpp: Added.
1558         (WebCore::BaseConstraint::create): Initializes min, max, exact, ideal
1559         value of constraint with dictionary.
1560         (WebCore::BaseConstraint::createEmptyDerivedConstraint): Factory 
1561         for all derived constraints.
1562         (WebCore::LongConstraint::create): Creates LongConstraint with name.
1563         (WebCore::LongConstraint::setMin): Sets mandatory min constraint value.
1564         (WebCore::LongConstraint::setMax): Sets mandatory max constraint value.
1565         (WebCore::LongConstraint::setExact): Sets mandatory exact constraint
1566         value.
1567         (WebCore::LongConstraint::setIdeal): Sets optional ideal constraint
1568         value.
1569         (WebCore::LongConstraint::initializeWithDictionary): Parses user input
1570         and sets min, max, exact, ideal values.
1571         (WebCore::DoubleConstraint::create): Ditto.
1572         (WebCore::DoubleConstraint::setMin): Ditto.
1573         (WebCore::DoubleConstraint::setMax): Ditto.
1574         (WebCore::DoubleConstraint::setExact): Ditto.
1575         (WebCore::DoubleConstraint::setIdeal): Ditto.
1576         (WebCore::DoubleConstraint::initializeWithDictionary): Ditto.
1577         (WebCore::BooleanConstraint::create): Ditto.
1578         (WebCore::BooleanConstraint::setExact): Ditto.
1579         (WebCore::BooleanConstraint::setIdeal): Ditto.
1580         (WebCore::BooleanConstraint::initializeWithDictionary): Ditto.
1581         (WebCore::StringConstraint::create): Ditto.
1582         (WebCore::StringConstraint::setExact): Ditto.
1583         (WebCore::StringConstraint::setIdeal): Ditto.
1584         (WebCore::StringConstraint::initializeWithDictionary): Ditto.
1585         * platform/mediastream/MediaConstraints.h: Add abstract classes
1586         BaseConstraint and NumericConstraint, and final classes
1587         DoubleConstraint, LongConstraint, BooleanConstraint, and
1588         StringConstraint.
1589         (WebCore::BaseConstraint::~BaseConstraint):
1590         (WebCore::BaseConstraint::name): Name of constraint associated with.
1591         (WebCore::BaseConstraint::BaseConstraint):
1592         (WebCore::NumericConstraint::setHasMin): Sets min constraint value.
1593         (WebCore::NumericConstraint::setHasMax): Sets max constraint value.
1594         (WebCore::NumericConstraint::setHasExact): Sets exact constraint
1595         value.
1596         (WebCore::NumericConstraint::setHasIdeal): Sets ideal constraint
1597         value.
1598         (WebCore::NumericConstraint::hasMin): Determines whether constraint
1599         has a minimum value.
1600         (WebCore::NumericConstraint::hasMax): Determines whether constraint
1601         has a maximum value.
1602         (WebCore::NumericConstraint::hasExact): Determines whether constraint
1603         has an exact value.
1604         (WebCore::NumericConstraint::NumericConstraint):
1605
1606 2016-08-04  Anders Carlsson  <andersca@apple.com>
1607
1608         Try to fix the GTK+ build.
1609
1610         * bindings/gobject/WebKitDOMDeprecated.cpp:
1611         (webkit_dom_document_get_elements_by_tag_name):
1612         (webkit_dom_document_get_elements_by_tag_name_ns):
1613         (webkit_dom_document_get_elements_by_class_name):
1614         (webkit_dom_element_get_elements_by_tag_name):
1615         (webkit_dom_element_get_elements_by_tag_name_ns):
1616         (webkit_dom_element_get_elements_by_class_name):
1617
1618 2016-08-04  Chris Dumez  <cdumez@apple.com>
1619
1620         Add support for wrapper types in dictionaries
1621         https://bugs.webkit.org/show_bug.cgi?id=160487
1622
1623         Reviewed by Sam Weinig.
1624
1625         Add support for nullable wrapper types in dictionaries.
1626         A TypeError is thrown if the conversion fails.
1627
1628         No new tests, updated bindings tests.
1629
1630         * bindings/js/JSDOMConvert.h:
1631         (WebCore::convertWrapperType):
1632         * bindings/scripts/CodeGeneratorJS.pm:
1633         (GenerateDictionaryImplementationContent):
1634         * bindings/scripts/IDLParser.pm:
1635         (parseDictionaryMember):
1636         * bindings/scripts/test/JS/JSTestObj.cpp:
1637         (WebCore::convert<TestObj::Dictionary>):
1638         * bindings/scripts/test/TestObj.idl:
1639
1640 2016-08-04  Csaba Osztrogonác  <ossy@webkit.org>
1641
1642         [Mac][cmake] Fix the build after Objective-C bindings generator removal
1643         https://bugs.webkit.org/show_bug.cgi?id=160545
1644
1645         Reviewed by Alex Christensen.
1646
1647         * CMakeLists.txt:
1648         * PlatformMac.cmake:
1649
1650 2016-08-04  Ryan Haddad  <ryanhaddad@apple.com>
1651
1652         Attempt to fix Windows build after r204134.
1653
1654         Unreviewed build fix.
1655
1656         * dom/DOMAllInOne.cpp:
1657
1658 2016-08-04  Anders Carlsson  <andersca@apple.com>
1659
1660         Remove more Objective-C specific bindings code
1661         https://bugs.webkit.org/show_bug.cgi?id=160564
1662
1663         Reviewed by Sam Weinig.
1664
1665         * CMakeLists.txt:
1666         * DerivedSources.make:
1667         * WebCore.xcodeproj/project.pbxproj:
1668         * bindings/js/JSNodeCustom.cpp:
1669         * bindings/objc/DOMDocument.mm:
1670         * bindings/objc/DOMEntity.mm:
1671         (-[DOMEntity publicId]):
1672         (-[DOMEntity systemId]):
1673         (-[DOMEntity notationName]):
1674         * bindings/objc/DOMEntityReference.mm:
1675         (kit): Deleted.
1676         * bindings/objc/DOMEntityReferenceInternal.h: Removed.
1677         * bindings/objc/DOMNodeIterator.mm:
1678         (-[DOMNodeIterator expandEntityReferences]):
1679         * bindings/objc/DOMTreeWalker.mm:
1680         (-[DOMTreeWalker expandEntityReferences]):
1681         * dom/Document.idl:
1682         * dom/Entity.h: Removed.
1683         (WebCore::Entity::publicId): Deleted.
1684         (WebCore::Entity::systemId): Deleted.
1685         (WebCore::Entity::notationName): Deleted.
1686         (WebCore::Entity::Entity): Deleted.
1687         * dom/Entity.idl: Removed.
1688         * dom/EntityReference.cpp: Removed.
1689         (WebCore::EntityReference::EntityReference): Deleted.
1690         * dom/EntityReference.h: Removed.
1691         * dom/EntityReference.idl: Removed.
1692         * dom/NodeIterator.idl:
1693         * dom/Traversal.h:
1694         (WebCore::NodeIteratorBase::expandEntityReferences): Deleted.
1695         * dom/TreeWalker.idl:
1696
1697 2016-08-04  Chris Dumez  <cdumez@apple.com>
1698
1699         Simplify overloads for HTMLSelectElement.add() / HTMLOptionsCollection.add()
1700         https://bugs.webkit.org/show_bug.cgi?id=160527
1701
1702         Reviewed by Ryosuke Niwa.
1703
1704         Simplify overloads for HTMLSelectElement.add() / HTMLOptionsCollection.add().
1705         We now have 2 overloads instead of 3 while achieving the same web-facing
1706         behavior.
1707
1708         * html/HTMLOptionsCollection.h:
1709         * html/HTMLOptionsCollection.idl:
1710         * html/HTMLSelectElement.h:
1711         (WebCore::HTMLSelectElement::add): Deleted.
1712         * html/HTMLSelectElement.idl:
1713
1714 2016-08-04  Anders Carlsson  <andersca@apple.com>
1715
1716         Move Objective-C bindings specific code into the bindings
1717         https://bugs.webkit.org/show_bug.cgi?id=160561
1718
1719         Reviewed by Tim Horton.
1720
1721         * bindings/objc/DOMDocument.mm:
1722         (-[DOMDocument createEntityReference:]):
1723         (-[DOMDocument getElementsByTagName:]):
1724         (-[DOMDocument getElementsByTagNameNS:localName:]):
1725         (-[DOMDocument getElementsByClassName:]):
1726         * bindings/objc/DOMElement.mm:
1727         (-[DOMElement getElementsByTagName:]):
1728         (-[DOMElement getElementsByTagNameNS:localName:]):
1729         (-[DOMElement getElementsByClassName:]):
1730         * css/CSSCharsetRule.idl:
1731         * dom/ContainerNode.cpp:
1732         (WebCore::ContainerNode::getElementsByTagNameForObjC): Deleted.
1733         (WebCore::ContainerNode::getElementsByTagNameNSForObjC): Deleted.
1734         (WebCore::ContainerNode::getElementsByClassNameForObjC): Deleted.
1735         * dom/ContainerNode.h:
1736         * dom/Document.cpp:
1737         (WebCore::Document::createEntityReference): Deleted.
1738         * dom/Document.h:
1739         * dom/Document.idl:
1740         * dom/Element.idl:
1741
1742 2016-08-04  Anders Carlsson  <andersca@apple.com>
1743
1744         Clean up the deprecated Objective-C binding methods
1745         https://bugs.webkit.org/show_bug.cgi?id=160558
1746
1747         Reviewed by Tim Horton.
1748
1749         Put the deprecated methods in their respective category @implementation, and
1750         simply have them call their non-deprecated counterparts.
1751
1752         * bindings/objc/DOMCSSMediaRule.mm:
1753         (-[DOMCSSMediaRule deleteRule:]):
1754         (-[DOMCSSMediaRule insertRule::]):
1755         * bindings/objc/DOMCSSPrimitiveValue.mm:
1756         (-[DOMCSSPrimitiveValue setFloatValue::]):
1757         (-[DOMCSSPrimitiveValue setStringValue::]):
1758         * bindings/objc/DOMCSSStyleDeclaration.mm:
1759         (-[DOMCSSStyleDeclaration setProperty:::]):
1760         * bindings/objc/DOMCSSStyleSheet.mm:
1761         (-[DOMCSSStyleSheet insertRule::]):
1762         * bindings/objc/DOMCharacterData.mm:
1763         (-[DOMCharacterData deleteData:length:]):
1764         (-[DOMCharacterData replaceData:length:data:]):
1765         (-[DOMCharacterData remove]):
1766         (-[DOMCharacterData substringData::]):
1767         (-[DOMCharacterData insertData::]):
1768         (-[DOMCharacterData deleteData::]):
1769         (-[DOMCharacterData replaceData:::]):
1770         * bindings/objc/DOMDocument.mm:
1771         (-[DOMDocument createProcessingInstruction::]):
1772         (-[DOMDocument importNode::]):
1773         (-[DOMDocument createElementNS::]):
1774         (-[DOMDocument createAttributeNS::]):
1775         (-[DOMDocument getElementsByTagNameNS::]):
1776         (-[DOMDocument createNodeIterator::::]):
1777         (-[DOMDocument createTreeWalker::::]):
1778         (-[DOMDocument getOverrideStyle::]):
1779         (-[DOMDocument createExpression::]):
1780         (-[DOMDocument evaluate:::::]):
1781         (-[DOMDocument getComputedStyle::]):
1782         * bindings/objc/DOMElement.mm:
1783         (-[DOMElement setAttribute::]):
1784         (-[DOMElement getAttributeNS::]):
1785         (-[DOMElement setAttributeNS:::]):
1786         (-[DOMElement removeAttributeNS::]):
1787         (-[DOMElement getElementsByTagNameNS::]):
1788         (-[DOMElement getAttributeNodeNS::]):
1789         (-[DOMElement hasAttributeNS::]):
1790         * bindings/objc/DOMEvent.mm:
1791         (-[DOMEvent stopImmediatePropagation]):
1792         (-[DOMEvent initEvent:::]):
1793         * bindings/objc/DOMHTMLSelectElement.mm:
1794         (-[DOMHTMLSelectElement remove:]):
1795         (-[DOMHTMLSelectElement add::]):
1796         * bindings/objc/DOMMouseEvent.mm:
1797         (-[DOMMouseEvent initMouseEvent:::::::::::::::]):
1798         * bindings/objc/DOMMutationEvent.mm:
1799         (-[DOMMutationEvent initMutationEvent::::::::]):
1800         * bindings/objc/DOMNamedNodeMap.mm:
1801         (-[DOMNamedNodeMap getNamedItemNS::]):
1802         (-[DOMNamedNodeMap removeNamedItemNS::]):
1803         * bindings/objc/DOMNode.mm:
1804         (-[DOMNode insertBefore::]):
1805         (-[DOMNode replaceChild::]):
1806         (-[DOMNode isSupported::]):
1807         * bindings/objc/DOMRange.mm:
1808         (-[DOMRange setStart::]):
1809         (-[DOMRange setEnd::]):
1810         (-[DOMRange compareBoundaryPoints::]):
1811         * bindings/objc/DOMUIEvent.mm:
1812         (-[DOMUIEvent initUIEvent:::::]):
1813         * bindings/objc/DOMXPathExpression.mm:
1814         (-[DOMXPathExpression evaluate:::]):
1815
1816 2016-08-04  Jeremy Jones  <jeremyj@apple.com>
1817
1818         Temporary redirected m3u8 streaming stopped working.
1819         https://bugs.webkit.org/show_bug.cgi?id=160472
1820         rdar://problem/27592694
1821
1822         Reviewed by Alex Christensen.
1823
1824         Test: http/tests/media/hls/hls-redirect.html
1825
1826         The change for https://trac.webkit.org/changeset/202466 hides knowledge of the temporary redirected URL from 
1827         WebCoreNSURLSession clients. MPEG playlists (e.g. .m3u8) can contain paths relative to the redirected URL.
1828
1829         This change exposes the redirected URL for MPEG playlists.
1830
1831         * platform/MIMETypeRegistry.cpp:
1832         (WebCore::initializeMPEGPlaylistMIMETypes): Added.
1833         (WebCore::initializeMIMETypeRegistry):
1834         (WebCore::MIMETypeRegistry::isMPEGPlaylistMIMEType): Added.
1835         * platform/MIMETypeRegistry.h:
1836         * platform/network/cocoa/WebCoreNSURLSession.mm:
1837         (-[WebCoreNSURLSessionDataTask resource:receivedResponse:]): Add MPEG playlist condition.
1838         (-[WebCoreNSURLSessionDataTask resource:receivedRedirect:request:]): Add MPEG playlist condition.
1839
1840 2016-08-04  Alex Christensen  <achristensen@webkit.org>
1841
1842         Content Blocker cannot block WebSocket connections
1843         https://bugs.webkit.org/show_bug.cgi?id=160159
1844
1845         Reviewed by Brady Eidson.
1846
1847         Tests: http/tests/websocket/tests/hybi/contentextensions/block-cookies-worker.php
1848                http/tests/websocket/tests/hybi/contentextensions/block-cookies.php
1849                http/tests/websocket/tests/hybi/contentextensions/block-worker.html
1850                http/tests/websocket/tests/hybi/contentextensions/block.html
1851                http/tests/websocket/tests/hybi/contentextensions/display-none-worker.html
1852                http/tests/websocket/tests/hybi/contentextensions/display-none.html
1853                http/tests/websocket/tests/hybi/contentextensions/upgrade-worker.html
1854                http/tests/websocket/tests/hybi/contentextensions/upgrade.html
1855
1856         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
1857         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError):
1858         (WebCore::ThreadableWebSocketChannelClientWrapper::didUpgradeURL):
1859         (WebCore::ThreadableWebSocketChannelClientWrapper::suspend):
1860         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
1861         * Modules/websockets/WebSocket.cpp:
1862         (WebCore::WebSocket::didClose):
1863         (WebCore::WebSocket::didUpgradeURL):
1864         (WebCore::WebSocket::getFramingOverhead):
1865         * Modules/websockets/WebSocket.h:
1866         
1867         Added didUpgradeURL to WebSocketChannelClient so the WebSocketChannel can tell the WebSocket
1868         that it has upgraded a ws: url to a wss: url.
1869         
1870         * Modules/websockets/WebSocketChannel.cpp:
1871         (WebCore::WebSocketChannel::~WebSocketChannel):
1872         (WebCore::WebSocketChannel::connect):
1873         
1874         If content extensions are being used, run the URL through the content extension and apply its actions
1875         before connecting the WebSocket.  This is done in WebSocketChannel instead of WebSocket like the CSP checks
1876         because we need access to the Document in order to get access to the main document's URL for if-domain and
1877         unless-domain rules, and to apply any display:none css to the Document.
1878         
1879         (WebCore::WebSocketChannel::disconnect):
1880         * Modules/websockets/WebSocketChannelClient.h:
1881         (WebCore::WebSocketChannelClient::~WebSocketChannelClient):
1882         (WebCore::WebSocketChannelClient::WebSocketChannelClient):
1883         (WebCore::WebSocketChannelClient::didConnect):
1884         (WebCore::WebSocketChannelClient::didReceiveMessage):
1885         (WebCore::WebSocketChannelClient::didReceiveBinaryData):
1886         (WebCore::WebSocketChannelClient::didReceiveMessageError):
1887         (WebCore::WebSocketChannelClient::didUpdateBufferedAmount):
1888         (WebCore::WebSocketChannelClient::didStartClosingHandshake):
1889         (WebCore::WebSocketChannelClient::didClose):
1890         
1891         Made WebSocketChannelClient purely virtual to avoid accidentally making an implementation that is missing functionality.
1892         
1893         (WebCore::WebSocketChannelClient::didUpgradeURL): Added.
1894         * Modules/websockets/WebSocketHandshake.cpp:
1895         (WebCore::WebSocketHandshake::getExpectedWebSocketAccept):
1896         (WebCore::WebSocketHandshake::WebSocketHandshake):
1897         (WebCore::WebSocketHandshake::clientOrigin):
1898         (WebCore::WebSocketHandshake::clientLocation):
1899         (WebCore::WebSocketHandshake::clientHandshakeMessage):
1900         
1901         Only put cookies on the WebSocket's handshake if we are allowed to use cookies.
1902         
1903         (WebCore::WebSocketHandshake::clientHandshakeRequest):
1904         
1905         A WebSocketHandshake always has a Document* for its ScriptExecutionContext, so I replaced m_context with 
1906         m_document and removed a suspicious-looking check for is<Document> that turned out to not be suspicious at all.
1907         
1908         (WebCore::WebSocketHandshake::reset):
1909         (WebCore::WebSocketHandshake::clearDocument):
1910         (WebCore::WebSocketHandshake::readServerHandshake):
1911         (WebCore::WebSocketHandshake::clearScriptExecutionContext): Deleted.
1912         * Modules/websockets/WebSocketHandshake.h:
1913         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
1914         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError):
1915         (WebCore::WorkerThreadableWebSocketChannel::Peer::didUpgradeURL):
1916         (WebCore::WorkerThreadableWebSocketChannel::Bridge::Bridge):
1917         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
1918         * contentextensions/ContentExtensionActions.h:
1919         
1920         Before this change we would pass a ResourceRequest as a parameter to the content extension engine.
1921         The ResourceRequest would be used to get the URL, and it would be modified by possibly disabling cookies
1922         or making the URL https.  Any display:none CSS rules added were put into the Document through the DocumentLoader.
1923         The only information it needed to return was whether the load was blocked.
1924         To make content extensions work with WebSockets, we need to pass a URL as a parameter instead of a ResourceRequest
1925         because there is no ResourceRequest with WebSockets, only a URL.  We can still put CSS rules in through the DocumentLoader,
1926         but the rest of the actions need to be returned through the return value, which is then processed by the callers.
1927         BlockedStatus is now a struct containing a set of actions to apply, and applyBlockedStatusToRequest is a helper function
1928         that applies the actions to the ResourceRequests we have at all previously existing call sites of processContentExtensionRulesForLoad.
1929         
1930         * contentextensions/ContentExtensionsBackend.cpp:
1931         (WebCore::ContentExtensions::ContentExtensionsBackend::globalDisplayNoneStyleSheet):
1932         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
1933         (WebCore::ContentExtensions::ContentExtensionsBackend::displayNoneCSSRule):
1934         (WebCore::ContentExtensions::applyBlockedStatusToRequest):
1935         * contentextensions/ContentExtensionsBackend.h:
1936         * html/HTMLMediaElement.cpp:
1937         (WebCore::HTMLMediaElement::loadResource):
1938         
1939         Here, we also only had a URL.  Before, we were making a ResourceRequest from the URL just for the content extension engine,
1940         but now we can just pass the URL.
1941         
1942         * loader/FrameLoader.cpp:
1943         (WebCore::FrameLoader::loadResourceSynchronously):
1944         * loader/PingLoader.cpp:
1945         (WebCore::processContentExtensionRulesForLoad):
1946         (WebCore::PingLoader::loadImage):
1947         (WebCore::PingLoader::sendPing):
1948         (WebCore::PingLoader::sendViolationReport):
1949         * loader/ResourceLoader.cpp:
1950         (WebCore::ResourceLoader::willSendRequestInternal):
1951         * loader/cache/CachedResourceLoader.cpp:
1952         (WebCore::CachedResourceLoader::requestResource):
1953         * page/UserContentProvider.cpp:
1954         (WebCore::contentExtensionsEnabled):
1955         (WebCore::UserContentProvider::processContentExtensionRulesForLoad):
1956         (WebCore::UserContentProvider::actionsForResourceLoad):
1957         * page/UserContentProvider.h:
1958
1959 2016-08-04  Chris Dumez  <cdumez@apple.com>
1960
1961         [[Prototype]] property of an interface object for a callback interface must be the Object.prototype object
1962         https://bugs.webkit.org/show_bug.cgi?id=160555
1963
1964         Reviewed by Geoffrey Garen.
1965
1966         [[Prototype]] property of an interface object for a callback interface
1967         must be the Object.prototype object:
1968         - http://heycam.github.io/webidl/#interface-object
1969
1970         This impacts NodeFilter, which is a callback interface.
1971
1972         No new tests, rebaselined existing test.
1973
1974         * bindings/scripts/CodeGeneratorJS.pm:
1975         (GenerateConstructorHelperMethods):
1976
1977 2016-08-04  Chris Dumez  <cdumez@apple.com>
1978
1979         Element.insertAdjacent*() should throw a SYNTAX_ERR for invalid "where" parameter
1980         https://bugs.webkit.org/show_bug.cgi?id=160514
1981
1982         Reviewed by Alex Christensen.
1983
1984         Element.insertAdjacent*() should throw a SYNTAX_ERR for invalid "where" parameter:
1985         - https://dom.spec.whatwg.org/#insert-adjacent
1986
1987         We were throwing a NOT_SUPPORTED_ERR instead.
1988
1989         No new tests, rebaselined existing tests.
1990
1991         * html/HTMLElement.cpp:
1992         (WebCore::HTMLElement::insertAdjacent):
1993
1994 2016-08-04  Alejandro G. Castro  <alex@igalia.com>
1995
1996         WebRTC: OWR: Add support for the muted state in the mediaplayer
1997         https://bugs.webkit.org/show_bug.cgi?id=160502
1998
1999         Modified the load, play and stop methods to handle the new
2000         situation where the mediaSource could be empty, until the remote
2001         side sends the information to create the receiver.
2002
2003         Reviewed by Philippe Normand.
2004
2005         No new tests, we need to upstream the owr endpoint to check this
2006         situation.
2007
2008         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:
2009         (WebCore::MediaPlayerPrivateGStreamerOwr::play): Check the muted
2010         state of the tracks if required, we do it using the new
2011         maybeHandleChangeMutedState function.
2012         (WebCore::MediaPlayerPrivateGStreamerOwr::load): Add always the
2013         observer of the track to check when it is unmuted, and we delay
2014         enabling/setting the source until the play or the unmute.
2015         (WebCore::MediaPlayerPrivateGStreamerOwr::internalLoad): Removed,
2016         we now do all in the load method.
2017         (WebCore::MediaPlayerPrivateGStreamerOwr::stop): Remove the
2018         mediasource when disabling. Removed the m_stopped state, it was
2019         there because the internalLoad was called multiple times.
2020         (WebCore::MediaPlayerPrivateGStreamerOwr::trackMutedChanged):
2021         Check the muted state and handle it, we use the new method
2022         maybeHandleChangeMutedState.
2023         (WebCore::MediaPlayerPrivateGStreamerOwr::maybeHandleChangeMutedState):
2024         Check if the track is muted or not, in case it is muted disable
2025         the the renderer and remove its mediasource. If it is not muted
2026         enable the renderer and set the mediasource.
2027         (WebCore::MediaPlayerPrivateGStreamerOwr::createVideoSink): Move
2028         the workaround for the renderer to this method when it is created.
2029         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.h:
2030         Removed internalLoad method and the m_stopped attribute used to
2031         call internalLoad multiple times.
2032
2033 2016-08-04  Youenn Fablet  <youenn@apple.com>
2034
2035         DocumentThreadableLoader should pass the fetch mode to underlying loader code
2036         https://bugs.webkit.org/show_bug.cgi?id=160399
2037
2038         Reviewed by Alex Christensen.
2039
2040         Tests: imported/w3c/web-platform-tests/fetch/api/redirect/redirect-origin-worker.html
2041                imported/w3c/web-platform-tests/fetch/api/redirect/redirect-origin.html
2042         Covered by existing and rebased tests.
2043
2044         DocumentThredableLoader was previously loading resources in NoCors mode and doing the cors checks on it own.
2045         This was duplicating code and increasing the risk of being not consistent.
2046         DocumentThreadableLoader is now passing the fetch mode given by client to underlying loader code.
2047         This allows removing some CORS checks in DocumentThreadableLoader code for redirections.
2048
2049         Updated SubresourceLoader redirection CORS checks to be on par with DocumentThreadableLoader.
2050         In particular, aligning the code with https://fetch.spec.whatwg.org/#http-redirect-fetch.
2051
2052         The error logging situation is not perfect as some errors are properly logged in the console while some others are not.
2053         For instance blockedError (due to forbidden port for instance) reason is not logged on the console.
2054
2055         * loader/DocumentThreadableLoader.cpp:
2056         (WebCore::DocumentThreadableLoader::redirectReceived): Updating redirection checking as SubresourceLoader is already doing most of the checks.
2057         (WebCore::DocumentThreadableLoader::didReceiveResponse): Removing temp hack as tainting is now computed by underlying loader code.
2058         (WebCore::DocumentThreadableLoader::loadRequest): Removing fetch mode change.
2059         * loader/SubresourceLoader.cpp:
2060         (WebCore::SubresourceLoader::willSendRequestInternal): Updating cancellation error and improve error logging.
2061         (WebCore::SubresourceLoader::checkRedirectionCrossOriginAccessControl): Improved the checks and error reporting.
2062         Tried to align as much as possible to https://fetch.spec.whatwg.org/#http-redirect-fetch.
2063         * loader/SubresourceLoader.h:
2064         * xml/XMLHttpRequest.cpp:
2065         (WebCore::XMLHttpRequest::didFail): Added an error message to the console in case of access control error.
2066
2067 2016-08-03  Chris Dumez  <cdumez@apple.com>
2068
2069         Object.getOwnPropertyNames() on NamedNodeMap fails to return named properties
2070         https://bugs.webkit.org/show_bug.cgi?id=160517
2071
2072         Reviewed by Alex Christensen.
2073
2074         Object.getOwnPropertyNames() on NamedNodeMap should return named
2075         properties' names as per:
2076         - https://dom.spec.whatwg.org/#dom-namednodemap-item
2077
2078         No new tests, rebaselined existing tests.
2079
2080         * dom/NamedNodeMap.cpp:
2081         (WebCore::NamedNodeMap::supportedPropertyNames):
2082         * dom/NamedNodeMap.h:
2083
2084 2016-08-03  Chris Dumez  <cdumez@apple.com>
2085
2086         Drop DocumentType.internalSubset attribute
2087         https://bugs.webkit.org/show_bug.cgi?id=160530
2088
2089         Reviewed by Alex Christensen.
2090
2091         Drop DocumentType.internalSubset attribute.
2092
2093         It is no longer in the DOM specification:
2094         - https://dom.spec.whatwg.org/#documenttype
2095         - https://w3c.github.io/DOM-Parsing/#xml-serializing-a-documenttype-node
2096
2097         Other browsers have already dropped it. In WebKit, it was always null
2098         anyway.
2099
2100         No new tests, rebaselined existing test.
2101
2102         * bindings/objc/DOMDocumentType.mm:
2103         (-[DOMDocumentType internalSubset]):
2104         * dom/DocumentType.h:
2105         * dom/DocumentType.idl:
2106         * dom/Node.cpp:
2107         (WebCore::Node::isEqualNode): Deleted.
2108         * editing/MarkupAccumulator.cpp:
2109         (WebCore::MarkupAccumulator::appendDocumentType): Deleted.
2110         * inspector/InspectorDOMAgent.cpp:
2111         (WebCore::InspectorDOMAgent::buildObjectForNode): Deleted.
2112
2113 2016-08-03  Chris Dumez  <cdumez@apple.com>
2114
2115         Drop legacy Document.defaultCharset attribute
2116         https://bugs.webkit.org/show_bug.cgi?id=160536
2117
2118         Reviewed by Alex Christensen.
2119
2120         Drop legacy Document.defaultCharset attribute.
2121
2122         It is no longer in the specification:
2123         - https://dom.spec.whatwg.org/#interface-document
2124
2125         Firefox and Chrome have already dropped it.
2126
2127         No new tests, rebaselined existing test.
2128
2129         * bindings/objc/DOMDocument.mm:
2130         (-[DOMDocument defaultCharset]):
2131         * dom/Document.cpp:
2132         (WebCore::Document::defaultCharsetForBindings):
2133         * dom/Document.h:
2134         * dom/Document.idl:
2135
2136 2016-08-03  Anders Carlsson  <andersca@apple.com>
2137
2138         Remove some unneeded #ifs now that the Objective-C bindings are frozen
2139         https://bugs.webkit.org/show_bug.cgi?id=160532
2140
2141         Reviewed by Tim Horton.
2142
2143         * DerivedSources.make:
2144         * Modules/mediasession/HTMLMediaElementMediaSession.idl:
2145         * Modules/mediastream/HTMLMediaElementMediaStream.idl:
2146         * WebCore.xcodeproj/project.pbxproj:
2147         * animation/DocumentAnimation.idl:
2148         * dom/ChildNode.idl:
2149         * dom/Document.idl:
2150         * dom/Element.idl:
2151         * dom/Event.idl:
2152         * dom/ParentNode.idl:
2153         * fileapi/Blob.idl:
2154         * fileapi/FileError.idl:
2155         * html/DOMSettableTokenList.h: Removed.
2156         * html/DOMSettableTokenList.idl: Removed.
2157         * html/HTMLCanvasElement.idl:
2158         * html/HTMLEmbedElement.idl:
2159         * html/HTMLFrameElement.idl:
2160         * html/HTMLIFrameElement.idl:
2161         * html/HTMLMediaElement.idl:
2162         * html/HTMLObjectElement.idl:
2163         * html/HTMLOptionsCollection.idl:
2164         * html/HTMLVideoElement.idl:
2165
2166 2016-08-03  Myles C. Maxfield  <mmaxfield@apple.com>
2167
2168         [iOS] SF-Heavy is not accessible from web content
2169         https://bugs.webkit.org/show_bug.cgi?id=160522
2170         <rdar://problem/27685273>
2171
2172         Reviewed by Simon Fraser.
2173
2174         The mappings we were using from CSS font-weight to CoreText font weight were inaccurate.
2175         Instead, these new mappings should be used.
2176
2177         Test: fast/text/system-font-weight.html
2178
2179         * platform/graphics/ios/FontCacheIOS.mm:
2180         (WebCore::systemFontModificationAttributes):
2181
2182 2016-08-03  Anders Carlsson  <andersca@apple.com>
2183
2184         Remove the Objective-C bindings generator
2185         https://bugs.webkit.org/show_bug.cgi?id=160526
2186
2187         Reviewed by Sam Weinig.
2188
2189         * DerivedSources.make:
2190         * WebCore.xcodeproj/project.pbxproj:
2191         * bindings/objc/PublicDOMInterfaces.h: Removed.
2192         * bindings/scripts/CodeGeneratorObjC.pm: Removed.
2193         * bindings/scripts/test/ObjC/DOMFloat64Array.h: Removed.
2194         * bindings/scripts/test/ObjC/DOMFloat64Array.mm: Removed.
2195         * bindings/scripts/test/ObjC/DOMFloat64ArrayInternal.h: Removed.
2196         * bindings/scripts/test/ObjC/DOMInterfaceName.h: Removed.
2197         * bindings/scripts/test/ObjC/DOMInterfaceName.mm: Removed.
2198         * bindings/scripts/test/ObjC/DOMInterfaceNameInternal.h: Removed.
2199         * bindings/scripts/test/ObjC/DOMTestActiveDOMObject.h: Removed.
2200         * bindings/scripts/test/ObjC/DOMTestActiveDOMObject.mm: Removed.
2201         * bindings/scripts/test/ObjC/DOMTestActiveDOMObjectInternal.h: Removed.
2202         * bindings/scripts/test/ObjC/DOMTestCallback.h: Removed.
2203         * bindings/scripts/test/ObjC/DOMTestCallback.mm: Removed.
2204         * bindings/scripts/test/ObjC/DOMTestCallbackFunction.h: Removed.
2205         * bindings/scripts/test/ObjC/DOMTestCallbackFunction.mm: Removed.
2206         * bindings/scripts/test/ObjC/DOMTestCallbackFunctionInternal.h: Removed.
2207         * bindings/scripts/test/ObjC/DOMTestCallbackInternal.h: Removed.
2208         * bindings/scripts/test/ObjC/DOMTestClassWithJSBuiltinConstructor.h: Removed.
2209         * bindings/scripts/test/ObjC/DOMTestClassWithJSBuiltinConstructor.mm: Removed.
2210         * bindings/scripts/test/ObjC/DOMTestClassWithJSBuiltinConstructorInternal.h: Removed.
2211         * bindings/scripts/test/ObjC/DOMTestCustomConstructorWithNoInterfaceObject.h: Removed.
2212         * bindings/scripts/test/ObjC/DOMTestCustomConstructorWithNoInterfaceObject.mm: Removed.
2213         * bindings/scripts/test/ObjC/DOMTestCustomConstructorWithNoInterfaceObjectInternal.h: Removed.
2214         * bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.h: Removed.
2215         * bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.mm: Removed.
2216         * bindings/scripts/test/ObjC/DOMTestCustomNamedGetterInternal.h: Removed.
2217         * bindings/scripts/test/ObjC/DOMTestEventConstructor.h: Removed.
2218         * bindings/scripts/test/ObjC/DOMTestEventConstructor.mm: Removed.
2219         * bindings/scripts/test/ObjC/DOMTestEventConstructorInternal.h: Removed.
2220         * bindings/scripts/test/ObjC/DOMTestEventTarget.h: Removed.
2221         * bindings/scripts/test/ObjC/DOMTestEventTarget.mm: Removed.
2222         * bindings/scripts/test/ObjC/DOMTestEventTargetInternal.h: Removed.
2223         * bindings/scripts/test/ObjC/DOMTestException.h: Removed.
2224         * bindings/scripts/test/ObjC/DOMTestException.mm: Removed.
2225         * bindings/scripts/test/ObjC/DOMTestExceptionInternal.h: Removed.
2226         * bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.h: Removed.
2227         * bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.mm: Removed.
2228         * bindings/scripts/test/ObjC/DOMTestGenerateIsReachableInternal.h: Removed.
2229         * bindings/scripts/test/ObjC/DOMTestGlobalObject.h: Removed.
2230         * bindings/scripts/test/ObjC/DOMTestGlobalObject.mm: Removed.
2231         * bindings/scripts/test/ObjC/DOMTestGlobalObjectInternal.h: Removed.
2232         * bindings/scripts/test/ObjC/DOMTestImplements.cpp: Removed.
2233         * bindings/scripts/test/ObjC/DOMTestImplements.h: Removed.
2234         * bindings/scripts/test/ObjC/DOMTestInterface.h: Removed.
2235         * bindings/scripts/test/ObjC/DOMTestInterface.mm: Removed.
2236         * bindings/scripts/test/ObjC/DOMTestInterfaceInternal.h: Removed.
2237         * bindings/scripts/test/ObjC/DOMTestIterable.h: Removed.
2238         * bindings/scripts/test/ObjC/DOMTestIterable.mm: Removed.
2239         * bindings/scripts/test/ObjC/DOMTestIterableInternal.h: Removed.
2240         * bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.h: Removed.
2241         * bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.mm: Removed.
2242         * bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructorInternal.h: Removed.
2243         * bindings/scripts/test/ObjC/DOMTestMediaQueryListListener.h: Removed.
2244         * bindings/scripts/test/ObjC/DOMTestMediaQueryListListener.mm: Removed.
2245         * bindings/scripts/test/ObjC/DOMTestMediaQueryListListenerInternal.h: Removed.
2246         * bindings/scripts/test/ObjC/DOMTestNamedConstructor.h: Removed.
2247         * bindings/scripts/test/ObjC/DOMTestNamedConstructor.mm: Removed.
2248         * bindings/scripts/test/ObjC/DOMTestNamedConstructorInternal.h: Removed.
2249         * bindings/scripts/test/ObjC/DOMTestNode.h: Removed.
2250         * bindings/scripts/test/ObjC/DOMTestNode.mm: Removed.
2251         * bindings/scripts/test/ObjC/DOMTestNodeInternal.h: Removed.
2252         * bindings/scripts/test/ObjC/DOMTestNondeterministic.h: Removed.
2253         * bindings/scripts/test/ObjC/DOMTestNondeterministic.mm: Removed.
2254         * bindings/scripts/test/ObjC/DOMTestNondeterministicInternal.h: Removed.
2255         * bindings/scripts/test/ObjC/DOMTestObj.h: Removed.
2256         * bindings/scripts/test/ObjC/DOMTestObj.mm: Removed.
2257         * bindings/scripts/test/ObjC/DOMTestObjInternal.h: Removed.
2258         * bindings/scripts/test/ObjC/DOMTestOverloadedConstructors.h: Removed.
2259         * bindings/scripts/test/ObjC/DOMTestOverloadedConstructors.mm: Removed.
2260         * bindings/scripts/test/ObjC/DOMTestOverloadedConstructorsInternal.h: Removed.
2261         * bindings/scripts/test/ObjC/DOMTestOverrideBuiltins.h: Removed.
2262         * bindings/scripts/test/ObjC/DOMTestOverrideBuiltins.mm: Removed.
2263         * bindings/scripts/test/ObjC/DOMTestOverrideBuiltinsInternal.h: Removed.
2264         * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h: Removed.
2265         * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.mm: Removed.
2266         * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterfaceInternal.h: Removed.
2267         * bindings/scripts/test/ObjC/DOMTestSupplemental.cpp: Removed.
2268         * bindings/scripts/test/ObjC/DOMTestSupplemental.h: Removed.
2269         * bindings/scripts/test/ObjC/DOMTestTypedefs.h: Removed.
2270         * bindings/scripts/test/ObjC/DOMTestTypedefs.mm: Removed.
2271         * bindings/scripts/test/ObjC/DOMTestTypedefsInternal.h: Removed.
2272         * bindings/scripts/test/ObjC/DOMattribute.h: Removed.
2273         * bindings/scripts/test/ObjC/DOMattribute.mm: Removed.
2274         * bindings/scripts/test/ObjC/DOMattributeInternal.h: Removed.
2275         * bindings/scripts/test/ObjC/DOMreadonly.h: Removed.
2276         * bindings/scripts/test/ObjC/DOMreadonly.mm: Removed.
2277         * bindings/scripts/test/ObjC/DOMreadonlyInternal.h: Removed.
2278         * bindings/scripts/test/ObjC/ObjCTestSupplemental.cpp: Removed.
2279         * bindings/scripts/test/ObjC/ObjCTestSupplemental.h: Removed.
2280
2281 2016-08-03  Anders Carlsson  <andersca@apple.com>
2282
2283         Remove dead bindings code
2284         https://bugs.webkit.org/show_bug.cgi?id=160521
2285
2286         Reviewed by Tim Horton.
2287
2288         * WebCore.xcodeproj/project.pbxproj:
2289         * bindings/objc/DOMBlob.mm:
2290         (core): Deleted.
2291         * bindings/objc/DOMBlobInternal.h:
2292         * bindings/objc/DOMCDATASection.mm:
2293         (core): Deleted.
2294         * bindings/objc/DOMCDATASectionInternal.h:
2295         * bindings/objc/DOMCSSCharsetRule.mm:
2296         (core): Deleted.
2297         (kit): Deleted.
2298         * bindings/objc/DOMCSSCharsetRuleInternal.h: Removed.
2299         * bindings/objc/DOMCSSFontFaceRule.mm:
2300         (core): Deleted.
2301         (kit): Deleted.
2302         * bindings/objc/DOMCSSFontFaceRuleInternal.h: Removed.
2303         * bindings/objc/DOMCSSImportRule.mm:
2304         (core): Deleted.
2305         (kit): Deleted.
2306         * bindings/objc/DOMCSSImportRuleInternal.h: Removed.
2307         * bindings/objc/DOMCSSMediaRule.mm:
2308         (core): Deleted.
2309         (kit): Deleted.
2310         * bindings/objc/DOMCSSMediaRuleInternal.h: Removed.
2311         * bindings/objc/DOMCSSPageRule.mm:
2312         (core): Deleted.
2313         (kit): Deleted.
2314         * bindings/objc/DOMCSSPageRuleInternal.h: Removed.
2315         * bindings/objc/DOMCSSPrimitiveValue.mm:
2316         (core): Deleted.
2317         * bindings/objc/DOMCSSPrimitiveValueInternal.h:
2318         * bindings/objc/DOMCSSRule.mm:
2319         (core): Deleted.
2320         * bindings/objc/DOMCSSRuleInternal.h:
2321         * bindings/objc/DOMCSSRuleList.mm:
2322         (core): Deleted.
2323         * bindings/objc/DOMCSSRuleListInternal.h:
2324         * bindings/objc/DOMCSSStyleRule.mm:
2325         (core): Deleted.
2326         (kit): Deleted.
2327         * bindings/objc/DOMCSSStyleRuleInternal.h: Removed.
2328         * bindings/objc/DOMCSSStyleSheet.mm:
2329         (core): Deleted.
2330         * bindings/objc/DOMCSSStyleSheetInternal.h:
2331         * bindings/objc/DOMCSSUnknownRule.mm:
2332         (core): Deleted.
2333         (kit): Deleted.
2334         * bindings/objc/DOMCSSUnknownRuleInternal.h: Removed.
2335         * bindings/objc/DOMCSSValue.mm:
2336         (core): Deleted.
2337         * bindings/objc/DOMCSSValueInternal.h:
2338         * bindings/objc/DOMCSSValueList.mm:
2339         (core): Deleted.
2340         (kit): Deleted.
2341         * bindings/objc/DOMCSSValueListInternal.h: Removed.
2342         * bindings/objc/DOMCharacterData.mm:
2343         (core): Deleted.
2344         (kit): Deleted.
2345         * bindings/objc/DOMCharacterDataInternal.h: Removed.
2346         * bindings/objc/DOMComment.mm:
2347         (core): Deleted.
2348         * bindings/objc/DOMCommentInternal.h:
2349         * bindings/objc/DOMCounter.mm:
2350         (core): Deleted.
2351         * bindings/objc/DOMCounterInternal.h:
2352         * bindings/objc/DOMDOMImplementation.mm:
2353         (core): Deleted.
2354         * bindings/objc/DOMDOMImplementationInternal.h:
2355         * bindings/objc/DOMDOMTokenList.mm:
2356         (core): Deleted.
2357         * bindings/objc/DOMDOMTokenListInternal.h:
2358         * bindings/objc/DOMEntity.mm:
2359         (core): Deleted.
2360         (kit): Deleted.
2361         * bindings/objc/DOMEntityInternal.h: Removed.
2362         * bindings/objc/DOMEntityReference.mm:
2363         (core): Deleted.
2364         * bindings/objc/DOMEntityReferenceInternal.h:
2365         * bindings/objc/DOMFile.mm:
2366         (core): Deleted.
2367         * bindings/objc/DOMFileInternal.h:
2368         * bindings/objc/DOMHTMLAnchorElement.mm:
2369         (core): Deleted.
2370         (kit): Deleted.
2371         * bindings/objc/DOMHTMLAnchorElementInternal.h: Removed.
2372         * bindings/objc/DOMHTMLAppletElement.mm:
2373         (core): Deleted.
2374         (kit): Deleted.
2375         * bindings/objc/DOMHTMLAppletElementInternal.h: Removed.
2376         * bindings/objc/DOMHTMLAreaElement.mm:
2377         (kit): Deleted.
2378         * bindings/objc/DOMHTMLAreaElementInternal.h:
2379         * bindings/objc/DOMHTMLBRElement.mm:
2380         (core): Deleted.
2381         (kit): Deleted.
2382         * bindings/objc/DOMHTMLBRElementInternal.h: Removed.
2383         * bindings/objc/DOMHTMLBaseElement.mm:
2384         (core): Deleted.
2385         (kit): Deleted.
2386         * bindings/objc/DOMHTMLBaseElementInternal.h: Removed.
2387         * bindings/objc/DOMHTMLBaseFontElement.mm:
2388         (core): Deleted.
2389         (kit): Deleted.
2390         * bindings/objc/DOMHTMLBaseFontElementInternal.h: Removed.
2391         * bindings/objc/DOMHTMLBodyElement.mm:
2392         (core): Deleted.
2393         (kit): Deleted.
2394         * bindings/objc/DOMHTMLBodyElementInternal.h: Removed.
2395         * bindings/objc/DOMHTMLButtonElement.mm:
2396         (core): Deleted.
2397         (kit): Deleted.
2398         * bindings/objc/DOMHTMLButtonElementInternal.h: Removed.
2399         * bindings/objc/DOMHTMLCanvasElement.mm:
2400         (core): Deleted.
2401         (kit): Deleted.
2402         * bindings/objc/DOMHTMLCanvasElementInternal.h: Removed.
2403         * bindings/objc/DOMHTMLCollection.mm:
2404         (core): Deleted.
2405         * bindings/objc/DOMHTMLCollectionInternal.h:
2406         * bindings/objc/DOMHTMLDListElement.mm:
2407         (core): Deleted.
2408         (kit): Deleted.
2409         * bindings/objc/DOMHTMLDListElementInternal.h: Removed.
2410         * bindings/objc/DOMHTMLDirectoryElement.mm:
2411         (core): Deleted.
2412         (kit): Deleted.
2413         * bindings/objc/DOMHTMLDirectoryElementInternal.h: Removed.
2414         * bindings/objc/DOMHTMLDivElement.mm:
2415         (core): Deleted.
2416         (kit): Deleted.
2417         * bindings/objc/DOMHTMLDivElementInternal.h: Removed.
2418         * bindings/objc/DOMHTMLEmbedElement.mm:
2419         (core): Deleted.
2420         (kit): Deleted.
2421         * bindings/objc/DOMHTMLEmbedElementInternal.h: Removed.
2422         * bindings/objc/DOMHTMLFieldSetElement.mm:
2423         (core): Deleted.
2424         (kit): Deleted.
2425         * bindings/objc/DOMHTMLFieldSetElementInternal.h: Removed.
2426         * bindings/objc/DOMHTMLFontElement.mm:
2427         (core): Deleted.
2428         (kit): Deleted.
2429         * bindings/objc/DOMHTMLFontElementInternal.h: Removed.
2430         * bindings/objc/DOMHTMLFormElement.mm:
2431         (core): Deleted.
2432         * bindings/objc/DOMHTMLFormElementInternal.h:
2433         * bindings/objc/DOMHTMLFrameElement.mm:
2434         (core): Deleted.
2435         (kit): Deleted.
2436         * bindings/objc/DOMHTMLFrameElementInternal.h: Removed.
2437         * bindings/objc/DOMHTMLFrameSetElement.mm:
2438         (core): Deleted.
2439         (kit): Deleted.
2440         * bindings/objc/DOMHTMLFrameSetElementInternal.h: Removed.
2441         * bindings/objc/DOMHTMLHRElement.mm:
2442         (core): Deleted.
2443         (kit): Deleted.
2444         * bindings/objc/DOMHTMLHRElementInternal.h: Removed.
2445         * bindings/objc/DOMHTMLHeadElement.mm:
2446         (core): Deleted.
2447         * bindings/objc/DOMHTMLHeadElementInternal.h:
2448         * bindings/objc/DOMHTMLHeadingElement.mm:
2449         (core): Deleted.
2450         (kit): Deleted.
2451         * bindings/objc/DOMHTMLHeadingElementInternal.h: Removed.
2452         * bindings/objc/DOMHTMLHtmlElement.mm:
2453         (core): Deleted.
2454         (kit): Deleted.
2455         * bindings/objc/DOMHTMLHtmlElementInternal.h: Removed.
2456         * bindings/objc/DOMHTMLIFrameElement.mm:
2457         (core): Deleted.
2458         (kit): Deleted.
2459         * bindings/objc/DOMHTMLIFrameElementInternal.h: Removed.
2460         * bindings/objc/DOMHTMLImageElement.mm:
2461         (kit): Deleted.
2462         * bindings/objc/DOMHTMLImageElementInternal.h:
2463         * bindings/objc/DOMHTMLLIElement.mm:
2464         (core): Deleted.
2465         (kit): Deleted.
2466         * bindings/objc/DOMHTMLLIElementInternal.h: Removed.
2467         * bindings/objc/DOMHTMLLabelElement.mm:
2468         (core): Deleted.
2469         (kit): Deleted.
2470         * bindings/objc/DOMHTMLLabelElementInternal.h: Removed.
2471         * bindings/objc/DOMHTMLLegendElement.mm:
2472         (core): Deleted.
2473         (kit): Deleted.
2474         * bindings/objc/DOMHTMLLegendElementInternal.h: Removed.
2475         * bindings/objc/DOMHTMLLinkElement.mm:
2476         (kit): Deleted.
2477         * bindings/objc/DOMHTMLLinkElementInternal.h:
2478         * bindings/objc/DOMHTMLMapElement.mm:
2479         (core): Deleted.
2480         (kit): Deleted.
2481         * bindings/objc/DOMHTMLMapElementInternal.h: Removed.
2482         * bindings/objc/DOMHTMLMarqueeElement.mm:
2483         (core): Deleted.
2484         (kit): Deleted.
2485         * bindings/objc/DOMHTMLMarqueeElementInternal.h: Removed.
2486         * bindings/objc/DOMHTMLMediaElement.mm:
2487         (core): Deleted.
2488         (kit): Deleted.
2489         * bindings/objc/DOMHTMLMediaElementInternal.h: Removed.
2490         * bindings/objc/DOMHTMLMenuElement.mm:
2491         (core): Deleted.
2492         (kit): Deleted.
2493         * bindings/objc/DOMHTMLMenuElementInternal.h: Removed.
2494         * bindings/objc/DOMHTMLMetaElement.mm:
2495         (core): Deleted.
2496         (kit): Deleted.
2497         * bindings/objc/DOMHTMLMetaElementInternal.h: Removed.
2498         * bindings/objc/DOMHTMLModElement.mm:
2499         (core): Deleted.
2500         (kit): Deleted.
2501         * bindings/objc/DOMHTMLModElementInternal.h: Removed.
2502         * bindings/objc/DOMHTMLOListElement.mm:
2503         (core): Deleted.
2504         (kit): Deleted.
2505         * bindings/objc/DOMHTMLOListElementInternal.h: Removed.
2506         * bindings/objc/DOMHTMLObjectElement.mm:
2507         (core): Deleted.
2508         (kit): Deleted.
2509         * bindings/objc/DOMHTMLObjectElementInternal.h: Removed.
2510         * bindings/objc/DOMHTMLOptGroupElement.mm:
2511         (core): Deleted.
2512         (kit): Deleted.
2513         * bindings/objc/DOMHTMLOptGroupElementInternal.h: Removed.
2514         * bindings/objc/DOMHTMLOptionsCollection.mm:
2515         (core): Deleted.
2516         * bindings/objc/DOMHTMLOptionsCollectionInternal.h:
2517         * bindings/objc/DOMHTMLParagraphElement.mm:
2518         (core): Deleted.
2519         (kit): Deleted.
2520         * bindings/objc/DOMHTMLParagraphElementInternal.h: Removed.
2521         * bindings/objc/DOMHTMLParamElement.mm:
2522         (core): Deleted.
2523         (kit): Deleted.
2524         * bindings/objc/DOMHTMLParamElementInternal.h: Removed.
2525         * bindings/objc/DOMHTMLPreElement.mm:
2526         (core): Deleted.
2527         (kit): Deleted.
2528         * bindings/objc/DOMHTMLPreElementInternal.h: Removed.
2529         * bindings/objc/DOMHTMLQuoteElement.mm:
2530         (core): Deleted.
2531         (kit): Deleted.
2532         * bindings/objc/DOMHTMLQuoteElementInternal.h: Removed.
2533         * bindings/objc/DOMHTMLScriptElement.mm:
2534         (core): Deleted.
2535         * bindings/objc/DOMHTMLScriptElementInternal.h:
2536         * bindings/objc/DOMHTMLSelectElement.mm:
2537         (kit): Deleted.
2538         * bindings/objc/DOMHTMLSelectElementInternal.h:
2539         * bindings/objc/DOMHTMLStyleElement.mm:
2540         (kit): Deleted.
2541         * bindings/objc/DOMHTMLStyleElementInternal.h:
2542         * bindings/objc/DOMHTMLTableColElement.mm:
2543         (kit): Deleted.
2544         * bindings/objc/DOMHTMLTableColElementInternal.h:
2545         * bindings/objc/DOMHTMLTableElement.mm:
2546         (core): Deleted.
2547         (kit): Deleted.
2548         * bindings/objc/DOMHTMLTableElementInternal.h: Removed.
2549         * bindings/objc/DOMHTMLTableRowElement.mm:
2550         (core): Deleted.
2551         (kit): Deleted.
2552         * bindings/objc/DOMHTMLTableRowElementInternal.h: Removed.
2553         * bindings/objc/DOMHTMLTitleElement.mm:
2554         (core): Deleted.
2555         (kit): Deleted.
2556         * bindings/objc/DOMHTMLTitleElementInternal.h: Removed.
2557         * bindings/objc/DOMHTMLUListElement.mm:
2558         (core): Deleted.
2559         (kit): Deleted.
2560         * bindings/objc/DOMHTMLUListElementInternal.h: Removed.
2561         * bindings/objc/DOMHTMLVideoElement.mm:
2562         (core): Deleted.
2563         (kit): Deleted.
2564         * bindings/objc/DOMHTMLVideoElementInternal.h: Removed.
2565         * bindings/objc/DOMKeyboardEvent.mm:
2566         (core): Deleted.
2567         (kit): Deleted.
2568         * bindings/objc/DOMKeyboardEventInternal.h: Removed.
2569         * bindings/objc/DOMMediaError.mm:
2570         (core): Deleted.
2571         * bindings/objc/DOMMediaErrorInternal.h:
2572         * bindings/objc/DOMMediaList.mm:
2573         (core): Deleted.
2574         * bindings/objc/DOMMediaListInternal.h:
2575         * bindings/objc/DOMMouseEvent.mm:
2576         (core): Deleted.
2577         (kit): Deleted.
2578         * bindings/objc/DOMMouseEventInternal.h: Removed.
2579         * bindings/objc/DOMMutationEvent.mm:
2580         (core): Deleted.
2581         (kit): Deleted.
2582         * bindings/objc/DOMMutationEventInternal.h: Removed.
2583         * bindings/objc/DOMNamedNodeMap.mm:
2584         (core): Deleted.
2585         * bindings/objc/DOMNamedNodeMapInternal.h:
2586         * bindings/objc/DOMNodeIterator.mm:
2587         (core): Deleted.
2588         * bindings/objc/DOMNodeIteratorInternal.h:
2589         * bindings/objc/DOMNodeList.mm:
2590         (core): Deleted.
2591         * bindings/objc/DOMNodeListInternal.h:
2592         * bindings/objc/DOMOverflowEvent.mm:
2593         (core): Deleted.
2594         (kit): Deleted.
2595         * bindings/objc/DOMOverflowEventInternal.h: Removed.
2596         * bindings/objc/DOMProgressEvent.mm:
2597         (core): Deleted.
2598         (kit): Deleted.
2599         * bindings/objc/DOMProgressEventInternal.h: Removed.
2600         * bindings/objc/DOMRGBColor.mm:
2601         (core): Deleted.
2602         * bindings/objc/DOMRGBColorInternal.h:
2603         * bindings/objc/DOMRect.mm:
2604         (core): Deleted.
2605         * bindings/objc/DOMRectInternal.h:
2606         * bindings/objc/DOMStyleSheet.mm:
2607         (core): Deleted.
2608         * bindings/objc/DOMStyleSheetInternal.h:
2609         * bindings/objc/DOMStyleSheetList.mm:
2610         (core): Deleted.
2611         * bindings/objc/DOMStyleSheetListInternal.h:
2612         * bindings/objc/DOMText.mm:
2613         (core): Deleted.
2614         * bindings/objc/DOMTextEvent.mm:
2615         (core): Deleted.
2616         (kit): Deleted.
2617         * bindings/objc/DOMTextEventInternal.h: Removed.
2618         * bindings/objc/DOMTextInternal.h:
2619         * bindings/objc/DOMTimeRanges.mm:
2620         (core): Deleted.
2621         * bindings/objc/DOMTimeRangesInternal.h:
2622         * bindings/objc/DOMTreeWalker.mm:
2623         (core): Deleted.
2624         * bindings/objc/DOMTreeWalkerInternal.h:
2625         * bindings/objc/DOMUIEvent.mm:
2626         (core): Deleted.
2627         (kit): Deleted.
2628         * bindings/objc/DOMUIEventInternal.h: Removed.
2629         * bindings/objc/DOMWheelEvent.mm:
2630         (kit): Deleted.
2631         * bindings/objc/DOMWheelEventInternal.h:
2632         * bindings/objc/DOMXPathExpression.mm:
2633         (core): Deleted.
2634         * bindings/objc/DOMXPathExpressionInternal.h:
2635
2636 2016-08-03  Eric Carlson  <eric.carlson@apple.com>
2637
2638         [Mac] Work around AVPlayer setMuted bug
2639         https://bugs.webkit.org/show_bug.cgi?id=160519
2640         <rdar://problem/27310475>
2641
2642         Reviewed by Dean Jackson.
2643
2644         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: Only override
2645         supportsMuting on iOS.
2646
2647 2016-08-03  Eric Carlson  <eric.carlson@apple.com>
2648
2649         Cleanup HTMLMediaElement track lists.
2650         https://bugs.webkit.org/show_bug.cgi?id=160470
2651
2652         Reviewed by Brent Fulgham.
2653
2654         * html/track/AudioTrack.cpp:
2655         (WebCore::AudioTrack::willRemove): Remove unnecessary ASSERT and NULL check.
2656
2657         * html/track/TextTrackList.cpp:
2658         (TextTrackList::~TextTrackList): Call clearElement so media element and client pointers are
2659         cleared.
2660
2661 2016-08-02  Ada Chan  <adachan@apple.com>
2662
2663         [Mac] media/pip-video-going-into-fullscreen.html is a flaky failure
2664         https://bugs.webkit.org/show_bug.cgi?id=160469
2665
2666         Reviewed by Eric Carlson.
2667
2668         When going from picture-in-picture directly to fullscreen, fix the issue where the
2669         presentation mode unexpectedly changes back to inline after changing to fullscreen.
2670
2671         On Mac, standard fullscreen is not handled by WebVideoFullscreenManager.
2672         When going from picture-in-picture directly to fullscreen, we call
2673         WebVideoFullscreenInterfaceMac::exitFullscreenWithoutAnimationToMode().
2674         We should update m_mode to VideoFullscreenModeStandard there to keep it in sync
2675         with the fullscreen mode in HTMLMediaElement. Otherwise, we'll inadvertently
2676         update the mode to inline when we clear the VideoFullscreenModePictureInPicture mode
2677         in -[WebVideoFullscreenInterfaceMacObjC pipDidClose:].
2678
2679         Since standard fullscreen on Mac doesn't make use of the video fullscreen layer,
2680         we need to make sure we return the video layer back to inline when the presentation
2681         mode changes to "fullscreen". We only do this on Mac because iOS does use
2682         the video fullscreen layer for standard fullscreen.
2683
2684         * Modules/mediacontrols/MediaControlsHost.cpp:
2685         (WebCore::MediaControlsHost::setPreparedToReturnVideoLayerToInline):
2686         Renamed from MediaControlsHost::setPreparedForInline to make it clear this is about
2687         whether the video layer should be inline.
2688         (WebCore::MediaControlsHost::setPreparedForInline): Deleted.
2689         * Modules/mediacontrols/MediaControlsHost.h:
2690         * Modules/mediacontrols/MediaControlsHost.idl:
2691
2692         * Modules/mediacontrols/mediaControlsApple.js:
2693         (Controller.prototype.shouldReturnVideoLayerToInline):
2694         On Mac, the video layer is inline when the presentation mode is "inline" or "fullscreen".
2695         (Controller.prototype.handlePresentationModeChange):
2696         Call shouldReturnVideoLayerToInline() to determine whether the video layer should be inline.
2697
2698         * Modules/mediacontrols/mediaControlsiOS.js:
2699         (ControllerIOS.prototype.shouldReturnVideoLayerToInline):
2700         Override this method since on iOS, the video layer is only inline when the presentation
2701         mode is "inline".
2702
2703         * html/HTMLMediaElement.cpp:
2704         (WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer):
2705         (WebCore::HTMLMediaElement::setPreparedToReturnVideoLayerToInline):
2706         (WebCore::HTMLMediaElement::setPreparedForInline): Deleted.
2707         * html/HTMLMediaElement.h:
2708
2709         * platform/mac/WebVideoFullscreenInterfaceMac.mm:
2710         (WebCore::WebVideoFullscreenInterfaceMac::enterFullscreen):
2711         Remove the assertion that the mode must be "picture-in-picture". I've run into this
2712         assertion in layout tests. Since the EnterFullscreen message is sent in a dispatch_async
2713         block in WebVideoFullscreenManager::didSetupFullscreen(), there's a chance that the
2714         fullscreen mode tracked in WebVideoFullscreenInterfaceMac has already changed to
2715         something else when WebVideoFullscreenInterfaceMac::enterFullscreen() is called.
2716         (WebCore::WebVideoFullscreenInterfaceMac::exitFullscreenWithoutAnimationToMode):
2717         If exiting to standard fullscreen, update m_mode to VideoFullscreenModeStandard.
2718
2719 2016-08-03  Youenn Fablet  <youenn@apple.com>
2720
2721         http/tests/fetch/fetch-in-worker-crash.html is sometimes crashing
2722         https://bugs.webkit.org/show_bug.cgi?id=160498
2723
2724         Reviewed by Chris Dumez.
2725
2726         Covered by http/tests/fetch/fetch-in-worker-crash.html.
2727
2728         * loader/WorkerThreadableLoader.cpp:
2729         (WebCore::WorkerThreadableLoader::MainThreadBridge::cancel): Taking a reference of the client wrapper to ensure it can be cleaned-up successfully.
2730
2731 2016-08-02  Anders Carlsson  <andersca@apple.com>
2732
2733         Freeze the last of the Objective-C bindings
2734         https://bugs.webkit.org/show_bug.cgi?id=160482
2735
2736         Reviewed by Darin Adler.
2737
2738         * WebCore.xcodeproj/project.pbxproj:
2739         * bindings/objc/DOMAttr.h: Added.
2740         * bindings/objc/DOMAttr.mm: Added.
2741         * bindings/objc/DOMAttrInternal.h: Added.
2742         * bindings/objc/DOMCDATASection.h: Added.
2743         * bindings/objc/DOMCDATASection.mm: Added.
2744         * bindings/objc/DOMCDATASectionInternal.h: Added.
2745         * bindings/objc/DOMCharacterData.h
2746         * bindings/objc/DOMCharacterData.mm: Added.
2747         * bindings/objc/DOMCharacterDataInternal.h: Added.
2748         * bindings/objc/DOMComment.h: Added.
2749         * bindings/objc/DOMComment.mm: Added.
2750         * bindings/objc/DOMCommentInternal.h: Added.
2751         * bindings/objc/DOMDOMImplementation.h: Added.
2752         * bindings/objc/DOMDOMImplementation.mm: Added.
2753         * bindings/objc/DOMDOMImplementationInternal.h: Added.
2754         * bindings/objc/DOMDocument.h: Added.
2755         * bindings/objc/DOMDocument.mm: Added.
2756         * bindings/objc/DOMDocumentFragment.h: Added.
2757         * bindings/objc/DOMDocumentFragment.mm: Added.
2758         * bindings/objc/DOMDocumentFragmentInternal.h: Added.
2759         * bindings/objc/DOMDocumentFragmentPrivate.h: Added.
2760         * bindings/objc/DOMDocumentInternal.h: Added.
2761         * bindings/objc/DOMDocumentPrivate.h: Added.
2762         * bindings/objc/DOMDocumentType.h: Added.
2763         * bindings/objc/DOMDocumentType.mm: Added.
2764         * bindings/objc/DOMDocumentTypeInternal.h: Added.
2765         * bindings/objc/DOMElement.h: Added.
2766         * bindings/objc/DOMElement.mm: Added.
2767         * bindings/objc/DOMElementInternal.h: Added.
2768         * bindings/objc/DOMEntity.h: Added.
2769         * bindings/objc/DOMEntity.mm: Added.
2770         * bindings/objc/DOMEntityInternal.h: Added.
2771         * bindings/objc/DOMEntityReference.h: Added.
2772         * bindings/objc/DOMEntityReference.mm: Added.
2773         * bindings/objc/DOMEntityReferenceInternal.h: Added.
2774         * bindings/objc/DOMNamedNodeMap.h: Added.
2775         * bindings/objc/DOMNamedNodeMap.mm: Added.
2776         * bindings/objc/DOMNamedNodeMapInternal.h: Added.
2777         * bindings/objc/DOMNode.h: Added.
2778         * bindings/objc/DOMNode.mm: Added.
2779         * bindings/objc/DOMNodeInternal.h: Added.
2780         * bindings/objc/DOMNodeList.h: Added.
2781         * bindings/objc/DOMNodeList.mm: Added.
2782         * bindings/objc/DOMNodeListInternal.h: Added.
2783         * bindings/objc/DOMNodePrivate.h: Added.
2784         * bindings/objc/DOMProcessingInstruction.h: Added.
2785         * bindings/objc/DOMProcessingInstruction.mm: Added.
2786         * bindings/objc/DOMProcessingInstructionInternal.h: Added.
2787         * bindings/objc/DOMText.h: Added.
2788         * bindings/objc/DOMText.mm: Added.
2789         * bindings/objc/DOMTextEvent.mm:
2790         * bindings/objc/DOMTextEventInternal.h:
2791         * bindings/objc/DOMTextInternal.h: Added.
2792
2793 2016-08-03  Eric Carlson  <eric.carlson@apple.com>
2794
2795         [Mac][iOS] Adopt MediaRemote "seek to playback position"
2796         https://bugs.webkit.org/show_bug.cgi?id=160405
2797         <rdar://problem/27547583>
2798
2799         Reviewed by Dean Jackson.
2800
2801         * platform/ios/RemoteCommandListenerIOS.mm:
2802         (WebCore::RemoteCommandListenerIOS::RemoteCommandListenerIOS): Fix a typo.
2803
2804 2016-08-02  Frederic Wang  <fwang@igalia.com>
2805
2806         Move determination of operator direction into DOM class and reduce relayout
2807         https://bugs.webkit.org/show_bug.cgi?id=160339
2808
2809         Reviewed by Darin Adler.
2810
2811         We move the determination of operator direction into MathMLOperatorElement. We also simplify
2812         a bit RenderMathMLFencedOperator so that the update of operator properties are done
2813         immediately in updateOperatorContent and the resolution of to LayoutUnit is implemented
2814         in leadingSpace, trailingSpace, minSize and maxSize. After that, setOperatorProperties is no
2815         longer necessary and we can remove many calls that used to update operator properties and
2816         force relayout.
2817
2818         No new tests, already covered by existing tests.
2819
2820         * mathml/MathMLInlineContainerElement.cpp:
2821         (WebCore::MathMLInlineContainerElement::childrenChanged): No need to call updateOperatorProperties.
2822         * mathml/MathMLOperatorElement.cpp: Change names from "text" to "char".
2823         (WebCore::MathMLOperatorElement::parseOperatorChar): Parse character and isVertical in this function.
2824         (WebCore::MathMLOperatorElement::operatorChar):
2825         (WebCore::MathMLOperatorElement::childrenChanged):
2826         (WebCore::MathMLOperatorElement::computeDictionaryProperty): Call operatorChar().character.
2827         (WebCore::MathMLOperatorElement::parseOperatorText): Deleted.
2828         (WebCore::MathMLOperatorElement::operatorText): Deleted.
2829         * mathml/MathMLOperatorElement.h: Use a new structure to hold both the character and direction
2830         and change names from "text" to "char".
2831         * rendering/mathml/RenderMathMLFencedOperator.cpp:
2832         (WebCore::RenderMathMLFencedOperator::updateOperatorContent): Update both the character and
2833         direction using MathMLOperatorElement::parseOperatorChar. Then set the boolean properties
2834         and leading/trailing space using the operator dictionary. minsize and maxsize are constant
2835         so we do not need to set them any more.
2836         (WebCore::RenderMathMLFencedOperator::leadingSpace): Resolve the spacing read from the
2837         dictionary to LayoutUnit. Note that it can never be negative.
2838         (WebCore::RenderMathMLFencedOperator::trailingSpace): Ditto.
2839         (WebCore::RenderMathMLFencedOperator::RenderMathMLFencedOperator): Deleted.
2840         (WebCore::RenderMathMLFencedOperator::setOperatorProperties): Deleted.
2841         * rendering/mathml/RenderMathMLFencedOperator.h: We use the new OperatorChar structure for
2842         accessors and members. We make minSize and maxSize just return the default values and delete
2843         the corresponding members. Finally, leading and trailing space are now stored as unsigned
2844         short in MathUnit.
2845         * rendering/mathml/RenderMathMLOperator.cpp:
2846         (WebCore::RenderMathMLOperator::textContent): Use the new OperatorChar structure.
2847         (WebCore::RenderMathMLOperator::isVertical): Helper function forwarding to MathMLOperatorElement.
2848         (WebCore::RenderMathMLOperator::stretchTo): Use isVertical() and remove setOperatorProperties().
2849         (WebCore::RenderMathMLOperator::resetStretchSize): Ditto.
2850         (WebCore::RenderMathMLOperator::updateMathOperator): Rename rebuildTokenContent as this is
2851         now really only used to update MathOperator and hence replace the condition on
2852         useMathOperator() with an ASSERT.
2853         (WebCore::RenderMathMLOperator::updateTokenContent): Call updateMathOperator instead of
2854         rebuildTokenContent.
2855         (WebCore::RenderMathMLOperator::verticalStretchedOperatorShift): We use isVertical().
2856         (WebCore::RenderMathMLOperator::paint): Ditto.
2857         (WebCore::RenderMathMLOperator::setOperatorProperties): Deleted. This is no longer needed.
2858         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths): Deleted.
2859         (WebCore::RenderMathMLOperator::rebuildTokenContent): Deleted. Renamed updateMathOperator.
2860         (WebCore::RenderMathMLOperator::styleDidChange): No need to call updateOperatorProperties.
2861         (WebCore::RenderMathMLOperator::updateOperatorProperties): Ditto..
2862         * rendering/mathml/RenderMathMLOperator.h: Update some declaration and remove m_isVertical.
2863         (WebCore::RenderMathMLOperator::isVertical): Deleted.
2864         * rendering/mathml/RenderMathMLRow.cpp:
2865         (WebCore::RenderMathMLRow::updateOperatorProperties): Deleted. This is no longer needed.
2866         * rendering/mathml/RenderMathMLRow.h: Ditto.
2867
2868 2016-08-02  Chris Dumez  <cdumez@apple.com>
2869
2870         Drop custom bindings code for HTMLSelectElement.remove()
2871         https://bugs.webkit.org/show_bug.cgi?id=160477
2872
2873         Reviewed by Darin Adler.
2874
2875         Drop custom bindings code for HTMLSelectElement.remove() and use
2876         overloading instead.
2877
2878         * bindings/js/JSHTMLSelectElementCustom.cpp:
2879         (WebCore::JSHTMLSelectElement::remove): Deleted.
2880         * html/HTMLSelectElement.idl:
2881
2882 2016-08-02  Chris Dumez  <cdumez@apple.com>
2883
2884         Drop custom bindings code for HTMLOptionsCollection.remove()
2885         https://bugs.webkit.org/show_bug.cgi?id=160475
2886
2887         Reviewed by Darin Adler.
2888
2889         Drop custom bindings code for HTMLOptionsCollection.remove() and use
2890         overloading instead. The overload that take an HTMLOptionElement is
2891         WebKit-specific and should probably be dropped at some point:
2892         - https://html.spec.whatwg.org/multipage/infrastructure.html#htmloptionscollection
2893
2894         This patch also fixes several bugs:
2895         - The parameter is now mandatory. This is consistent with the
2896           specification, Firefox and Chrome.
2897         - HTMLOptionsCollection.prototype.remove.length is now 1 instead of 0.
2898
2899         No new tests, rebaselined existing tests.
2900
2901         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
2902         (WebCore::JSHTMLOptionsCollection::remove): Deleted.
2903         * html/HTMLOptionsCollection.idl:
2904
2905 2016-08-02  Nan Wang  <n_wang@apple.com>
2906
2907         AX: Simulated touch events are not working on iOS
2908         https://bugs.webkit.org/show_bug.cgi?id=160395
2909         <rdar://problem/27633597>
2910
2911         Reviewed by Chris Fleizach.
2912
2913         We should mark the simulated touch as a potential tap otherwise it won't
2914         be handled on iOS. Also, we need to dispatch both touch start and touch end
2915         to mimic the real touch events. Last, added a has event listeners check,
2916         because iOS is dispatching mouse click events for elements without touch event
2917         listeners.
2918
2919         Test: accessibility/ios-simulator/press-fires-touch-events.html
2920
2921         * accessibility/AccessibilityObject.cpp:
2922         (WebCore::AccessibilityObject::press):
2923         (WebCore::AccessibilityObject::dispatchTouchEvent):
2924         * page/ios/EventHandlerIOS.mm:
2925         (WebCore::EventHandler::dispatchSimulatedTouchEvent):
2926         * platform/ios/PlatformEventFactoryIOS.mm:
2927         (WebCore::PlatformTouchEventBuilder::PlatformTouchEventBuilder):
2928
2929 2016-08-02  Benjamin Poulain  <bpoulain@apple.com>
2930
2931         Clean up some useless AtomicString atoms
2932         https://bugs.webkit.org/show_bug.cgi?id=160471
2933
2934         Reviewed by Geoffrey Garen.
2935
2936         The only uses of "commentAtom" and "textAtom" where for their
2937         respective overload of Node::nodeName().
2938         Those methods return a string, we should not keep them in the atomic
2939         string table just to hold a small String alive. They were also the only
2940         two nodes to behave that way.
2941
2942         The atom xlinkAtom was only used by createForeignAttributesMap(), which
2943         is itself only invoked once. There is no need for the symbol xlinkAtom.
2944
2945         * dom/CDATASection.cpp:
2946         (WebCore::CDATASection::nodeName):
2947         * dom/Comment.cpp:
2948         (WebCore::Comment::nodeName):
2949         * dom/Document.cpp:
2950         (WebCore::Document::nodeName):
2951         * dom/Text.cpp:
2952         (WebCore::Text::nodeName):
2953         * html/parser/HTMLTreeBuilder.cpp:
2954         (WebCore::createForeignAttributesMap):
2955
2956 2016-08-02  Anders Carlsson  <andersca@apple.com>
2957
2958         Freeze the Objective-C DOM Event and CSS bindings
2959         https://bugs.webkit.org/show_bug.cgi?id=160476
2960
2961         Reviewed by Tim Horton.
2962
2963         * DerivedSources.make:
2964         * WebCore.xcodeproj/project.pbxproj:
2965         * bindings/objc/DOMCSSCharsetRule.h: Added.
2966         * bindings/objc/DOMCSSCharsetRule.mm: Added.
2967         * bindings/objc/DOMCSSCharsetRuleInternal.h: Added.
2968         * bindings/objc/DOMCSSFontFaceRule.h: Added.
2969         * bindings/objc/DOMCSSFontFaceRule.mm: Added.
2970         * bindings/objc/DOMCSSFontFaceRuleInternal.h: Added.
2971         * bindings/objc/DOMCSSImportRule.h: Added.
2972         * bindings/objc/DOMCSSImportRule.mm: Added.
2973         * bindings/objc/DOMCSSImportRuleInternal.h: Added.
2974         * bindings/objc/DOMCSSMediaRule.h: Added.
2975         * bindings/objc/DOMCSSMediaRule.mm: Added.
2976         * bindings/objc/DOMCSSMediaRuleInternal.h: Added.
2977         * bindings/objc/DOMCSSPageRule.h: Added.
2978         * bindings/objc/DOMCSSPageRule.mm: Added.
2979         * bindings/objc/DOMCSSPageRuleInternal.h: Added.
2980         * bindings/objc/DOMCSSPrimitiveValue.h: Added.
2981         * bindings/objc/DOMCSSPrimitiveValue.mm: Added.
2982         * bindings/objc/DOMCSSPrimitiveValueInternal.h: Added.
2983         * bindings/objc/DOMCSSRule.h: Added.
2984         * bindings/objc/DOMCSSRule.mm: Added.
2985         * bindings/objc/DOMCSSRuleInternal.h: Added.
2986         * bindings/objc/DOMCSSRuleList.h: Added.
2987         * bindings/objc/DOMCSSRuleList.mm: Added.
2988         * bindings/objc/DOMCSSRuleListInternal.h: Added.
2989         * bindings/objc/DOMCSSStyleDeclaration.h: Added.
2990         * bindings/objc/DOMCSSStyleDeclaration.mm: Added.
2991         * bindings/objc/DOMCSSStyleDeclarationInternal.h: Added.
2992         * bindings/objc/DOMCSSStyleRule.h: Added.
2993         * bindings/objc/DOMCSSStyleRule.mm: Added.
2994         * bindings/objc/DOMCSSStyleRuleInternal.h: Added.
2995         * bindings/objc/DOMCSSStyleSheet.h: Added.
2996         * bindings/objc/DOMCSSStyleSheet.mm: Added.
2997         * bindings/objc/DOMCSSStyleSheetInternal.h: Added.
2998         * bindings/objc/DOMCSSUnknownRule.h: Added.
2999         * bindings/objc/DOMCSSUnknownRule.mm: Added.
3000         * bindings/objc/DOMCSSUnknownRuleInternal.h: Added.
3001         * bindings/objc/DOMCSSValue.h: Added.
3002         * bindings/objc/DOMCSSValue.mm: Added.
3003         * bindings/objc/DOMCSSValueInternal.h: Added.
3004         * bindings/objc/DOMCSSValueList.h: Added.
3005         * bindings/objc/DOMCSSValueList.mm: Added.
3006         * bindings/objc/DOMCSSValueListInternal.h: Added.
3007         * bindings/objc/DOMCounter.h: Added.
3008         * bindings/objc/DOMCounter.mm: Added.
3009         * bindings/objc/DOMCounterInternal.h: Added.
3010         * bindings/objc/DOMEvent.h: Added.
3011         * bindings/objc/DOMEvent.mm: Added.
3012         * bindings/objc/DOMEventInternal.h: Added.
3013         * bindings/objc/DOMEventListener.h: Added.
3014         * bindings/objc/DOMEventTarget.h: Added.
3015         * bindings/objc/DOMKeyboardEvent.h: Added.
3016         * bindings/objc/DOMKeyboardEvent.mm: Added.
3017         * bindings/objc/DOMKeyboardEventInternal.h: Added.
3018         * bindings/objc/DOMMouseEvent.h: Added.
3019         * bindings/objc/DOMMouseEvent.mm: Added.
3020         * bindings/objc/DOMMouseEventInternal.h: Added.
3021         * bindings/objc/DOMMutationEvent.h: Added.
3022         * bindings/objc/DOMMutationEvent.mm: Added.
3023         * bindings/objc/DOMMutationEventInternal.h: Added.
3024         * bindings/objc/DOMOverflowEvent.h: Added.
3025         * bindings/objc/DOMOverflowEvent.mm: Added.
3026         * bindings/objc/DOMOverflowEventInternal.h: Added.
3027         * bindings/objc/DOMProgressEvent.h: Added.
3028         * bindings/objc/DOMProgressEvent.mm: Added.
3029         * bindings/objc/DOMProgressEventInternal.h: Added.
3030         * bindings/objc/DOMRGBColor.h: Added.
3031         * bindings/objc/DOMRGBColor.mm: Added.
3032         * bindings/objc/DOMRGBColorInternal.h: Added.
3033         * bindings/objc/DOMRect.h: Added.
3034         * bindings/objc/DOMRect.mm: Added.
3035         * bindings/objc/DOMRectInternal.h: Added.
3036         * bindings/objc/DOMTextEvent.h: Added.
3037         * bindings/objc/DOMTextEvent.mm: Added.
3038         (-[DOMTextEvent data]):
3039         (-[DOMTextEvent initTextEvent:canBubbleArg:cancelableArg:viewArg:dataArg:]):
3040         * bindings/objc/DOMTextEventInternal.h: Added.
3041         * bindings/objc/DOMUIEvent.h: Added.
3042         * bindings/objc/DOMUIEvent.mm: Added.
3043         * bindings/objc/DOMUIEventInternal.h: Added.
3044         * bindings/objc/DOMWheelEvent.h: Added.
3045         * bindings/objc/DOMWheelEvent.mm: Added.
3046         * bindings/objc/DOMWheelEventInternal.h: Added.
3047
3048 2016-08-02  Enrica Casucci  <enrica@apple.com>
3049
3050         Allow building with content filtering disabled.
3051         https://bugs.webkit.org/show_bug.cgi?id=160454
3052
3053         Reviewed by Simon Fraser.
3054
3055         * Configurations/FeatureDefines.xcconfig:
3056         * platform/PlatformContentFilter.h:
3057         (WebCore::PlatformContentFilter::unblockRequestDeniedScript):
3058         * platform/cocoa/NetworkExtensionContentFilter.h:
3059         * platform/cocoa/NetworkExtensionContentFilter.mm:
3060         (WebCore::NetworkExtensionContentFilter::unblockHandler):
3061         * platform/cocoa/ParentalControlsContentFilter.h:
3062         * testing/MockContentFilter.h:
3063
3064 2016-08-02  Dean Jackson  <dino@apple.com>
3065
3066         Reapply fixes for webkit.org/b/159450 and webkit.org/b/157569
3067         https://bugs.webkit.org/show_bug.cgi?id=160474
3068         <rdar://problem/27668170>
3069
3070         Reviewed by Simon Fraser.
3071
3072         The fixes are behaviour we want. They just caused a regression
3073         on medium.com (reverted in http://trac.webkit.org/r203380).
3074
3075         Now that we've branched, revert the reversion (which itself
3076         was a reversion), so we can fix the actual bug:
3077         https://bugs.webkit.org/show_bug.cgi?id=160478
3078
3079         * css/CSSParser.cpp:
3080         (WebCore::CSSParser::parseValue):
3081         (WebCore::CSSParser::parseAnimationShorthand):
3082         (WebCore::CSSParser::addPropertyWithPrefixingVariant):
3083         (WebCore::CSSParser::parseTransitionShorthand):
3084         * css/CSSPropertyNames.in:
3085         * css/PropertySetCSSStyleDeclaration.cpp:
3086         (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue):
3087         (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue):
3088         (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal):
3089         (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal):
3090         * css/StyleProperties.cpp:
3091         (WebCore::MutableStyleProperties::removeShorthandProperty):
3092         (WebCore::StyleProperties::asText):
3093         (WebCore::MutableStyleProperties::removeProperty): Deleted.
3094         (WebCore::MutableStyleProperties::removePrefixedOrUnprefixedProperty): Deleted.
3095         (WebCore::MutableStyleProperties::setProperty): Deleted.
3096         (WebCore::getIndexInShorthandVectorForPrefixingVariant): Deleted.
3097         (WebCore::MutableStyleProperties::appendPrefixingVariantProperty): Deleted.
3098         (WebCore::MutableStyleProperties::setPrefixingVariantProperty): Deleted.
3099         * css/StyleProperties.h:
3100
3101 2016-08-02  Eric Carlson  <eric.carlson@apple.com>
3102
3103         Cleanup HTMLMediaElement track lists.
3104         https://bugs.webkit.org/show_bug.cgi?id=160470
3105
3106         Reviewed by David Kilzer.
3107
3108         Test: media/range-extract-contents-crash.html
3109
3110         * html/HTMLMediaElement.cpp:
3111         (WebCore::HTMLMediaElement::~HTMLMediaElement): 
3112
3113         * html/track/AudioTrack.cpp:
3114         (WebCore::AudioTrack::willRemove): ASSERT if media element is NULL.
3115
3116         * html/track/TextTrackList.cpp:
3117         (TextTrackList::clearElement): Clear track media element pointers and client.
3118         * html/track/TextTrackList.h:
3119
3120         * html/track/TrackListBase.cpp:
3121         (TrackListBase::~TrackListBase): Call clearElement.
3122         (TrackListBase::clearElement): Clear track media element pointers and client.
3123         * html/track/TrackListBase.h:
3124
3125 2016-08-02  Anders Carlsson  <andersca@apple.com>
3126
3127         Remove more Objective-C bindings that are not used
3128         https://bugs.webkit.org/show_bug.cgi?id=160473
3129
3130         Reviewed by Sam Weinig.
3131
3132         * DerivedSources.make:
3133         * WebCore.xcodeproj/project.pbxproj:
3134         * bindings/objc/DOMCSS.mm:
3135         (kitClass):
3136         * dom/Document.idl:
3137
3138 2016-08-02  Chris Dumez  <cdumez@apple.com>
3139
3140         Drop custom bindings for FormData.append()
3141         https://bugs.webkit.org/show_bug.cgi?id=160466
3142
3143         Reviewed by Sam Weinig.
3144
3145         Drop custom bindings for FormData.append(). We no longer need them now
3146         that we have proper support for overloads after r204028.
3147
3148         This patch also fixes the fact that FormData.prototype.append.length
3149         was 0 instead of 2.
3150
3151         No new tests, rebaselined existing test.
3152
3153         * bindings/js/JSDOMFormDataCustom.cpp:
3154         (WebCore::JSDOMFormData::append): Deleted.
3155         * html/DOMFormData.cpp:
3156         (WebCore::DOMFormData::append):
3157         * html/DOMFormData.h:
3158         * html/DOMFormData.idl:
3159         * html/FileInputType.cpp:
3160         (WebCore::FileInputType::appendFormData):
3161         * html/FormDataList.cpp:
3162         (WebCore::FormDataList::appendBlob):
3163         * html/FormDataList.h:
3164         (WebCore::FormDataList::Item::Item):
3165         (WebCore::FormDataList::appendBlob):
3166
3167 2016-08-02  Commit Queue  <commit-queue@webkit.org>
3168
3169         Unreviewed, rolling out r203799.
3170         https://bugs.webkit.org/show_bug.cgi?id=160467
3171
3172         Decided on a different solution (Requested by jonlee_ on
3173         #webkit).
3174
3175         Reverted changeset:
3176
3177         "Captions do not render in PiP window when element is hidden"
3178         https://bugs.webkit.org/show_bug.cgi?id=160265
3179         http://trac.webkit.org/changeset/203799
3180
3181 2016-08-02  Alex Christensen  <achristensen@webkit.org>
3182
3183         Remove unused functions in URL
3184         https://bugs.webkit.org/show_bug.cgi?id=160468
3185
3186         Reviewed by Geoffrey Garen.
3187
3188         * page/SecurityOrigin.cpp:
3189         (WebCore::SecurityOrigin::extractInnerURL):
3190         * platform/URL.cpp:
3191         (WebCore::mimeTypeFromURL):
3192         (WebCore::URL::stringCenterEllipsizedToLength):
3193         (WebCore::URL::isSafeToSendToAnotherThread): Deleted.
3194         * platform/URL.h:
3195         (WebCore::URL::operator NSString*):
3196         (WebCore::URL::innerURL): Deleted.
3197
3198 2016-08-02  Chris Dumez  <cdumez@apple.com>
3199
3200         Named / Indexed properties should be configurable
3201         https://bugs.webkit.org/show_bug.cgi?id=160457
3202
3203         Reviewed by Darin Adler.
3204
3205         Report Named / Indexed properties as being configurable to comply with
3206         the Web IDL specification:
3207         - http://heycam.github.io/webidl/#getownproperty-guts (step 1. and 2.)
3208
3209         Firefox and Chrome also report them as being configurable.
3210
3211         No new tests, rebaselined existing tests.
3212
3213         * bindings/scripts/CodeGeneratorJS.pm:
3214         (GenerateGetOwnPropertySlotBody):
3215
3216 2016-08-02  Anders Carlsson  <andersca@apple.com>
3217
3218         Remove more unused/uninstalled Objective-C DOM bindings
3219         https://bugs.webkit.org/show_bug.cgi?id=160464
3220
3221         Reviewed by Darin Adler.
3222
3223         * Configurations/WebCore.xcconfig:
3224         * DerivedSources.make:
3225         * WebCore.xcodeproj/project.pbxproj:
3226         * bindings/objc/DOMCSS.mm:
3227         (kitClass):
3228         * bindings/objc/DOMEvents.h:
3229         * bindings/objc/DOMEvents.mm:
3230         (kitClass): Deleted.
3231         * dom/Document.idl:
3232
3233 2016-08-02  Chris Dumez  <cdumez@apple.com>
3234
3235         [WebIDL] Extend new overload resolution algorithm support to constructors
3236         https://bugs.webkit.org/show_bug.cgi?id=160455
3237
3238         Reviewed by Ryosuke Niwa.
3239
3240         Extend new overload resolution algorithm support (added in r204028) to
3241         constructors as well. It was only used for operations. Remove code that
3242         is now dead from the bindings generator.
3243
3244         We now share the same code of generating the overload resolution code
3245         for operations and constructors.
3246
3247         No new tests, rebaselined existing tests.
3248
3249         * bindings/scripts/CodeGenerator.pm:
3250         (LinkOverloadedFunctions):
3251         * bindings/scripts/CodeGeneratorJS.pm:
3252         (GenerateOverloadedFunctionOrConstructor):
3253         (GenerateImplementation):
3254         (GenerateConstructorDefinitions):
3255         (GenerateConstructorDefinition):
3256         (GetFunctionLength): Deleted.
3257         (LengthOfLongestFunctionParameterList): Deleted.
3258         (GetNativeTypeForConversions): Deleted.
3259         (GetGnuVTableNameForInterface): Deleted.
3260         (GetGnuMangledNameForInterface): Deleted.
3261         (GetGnuVTableOffsetForType): Deleted.
3262         (GenerateConstructorHelperMethods): Deleted.
3263         * bindings/scripts/IDLParser.pm:
3264         (applyExtendedAttributeList): Deleted.
3265         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3266         (WebCore::JSTestOverloadedConstructorsConstructor::construct):
3267         * bindings/scripts/test/TestOverloadedConstructors.idl:
3268
3269 2016-08-02  Brady Eidson  <beidson@apple.com>
3270
3271         Removing IndexedDB WebsiteData can fail for some users.
3272         https://bugs.webkit.org/show_bug.cgi?id=160463
3273
3274         Reviewed by Alex Christensen.
3275
3276         Covered by changes to API test IndexedDB.StoreBlobThenDelete.
3277
3278         For a few months in trunk WebKit, deleting an IndexedDB using WebsiteDataStore API would only
3279         delete the "IndexedDB.sqlite3" file, but would leave the "-wal" and "-shm" files behind.
3280         
3281         We'd then fail to delete the directory itself, tricking API clients to think there are still
3282         databases in the given origin.
3283         
3284         Furthermore, the code to delete a database first checks for the existence of "IndexedDB.sqlite3"
3285         then refuses to do any further cleanup if it doesn't exist.
3286         
3287         We should just always run the entire delete procedure even if IndexedDB.sqlite does not exist.
3288         
3289         * Modules/indexeddb/server/IDBServer.cpp:
3290         (WebCore::IDBServer::removeAllDatabasesForOriginPath):
3291
3292         * platform/sql/SQLiteFileSystem.cpp:
3293         (WebCore::SQLiteFileSystem::deleteDatabaseFile):
3294
3295 2016-08-02  Alex Christensen  <achristensen@webkit.org>
3296
3297         Fix Mac CMake build.
3298
3299         * PlatformMac.cmake:
3300         Some ObjC bindings have been frozen.
3301
3302 2016-08-02  Frederic Wang  <fwang@igalia.com>
3303
3304         More cleanup of MathML operator parsing
3305         https://bugs.webkit.org/show_bug.cgi?id=160336
3306
3307         Reviewed by Darin Adler.
3308
3309         No new tests, behavior is unchanged.
3310
3311         * rendering/mathml/RenderMathMLBlock.cpp:
3312         (WebCore::parseMathMLLength): Deleted. This function is no longer used.
3313         * rendering/mathml/RenderMathMLBlock.h: Ditto.
3314         * rendering/mathml/RenderMathMLFencedOperator.h: Move some length members from
3315         RenderMathMLOperator and override the accessors. Also override useMathOperator() since it is
3316         always true for anonymous mfenced operators.
3317         * rendering/mathml/RenderMathMLOperator.cpp:
3318         (WebCore::RenderMathMLOperator::textContent): No need to ASSERT !isAnonymous since this
3319         function is overriden by RenderMathMLFencedOperator.
3320         (WebCore::RenderMathMLOperator::isInvisibleOperator): Use a temporary variable to call
3321         textContent only once.
3322         (WebCore::RenderMathMLOperator::leadingSpace): Helper function to determine the leading space.
3323         (WebCore::RenderMathMLOperator::trailingSpace): Helper function to determine the trailing space.
3324         (WebCore::RenderMathMLOperator::minSize): Helper function to determine the min space.
3325         (WebCore::RenderMathMLOperator::maxSize): Helper function to determine the max space.
3326         (WebCore::RenderMathMLOperator::setOperatorProperties): This is now only used to set m_isVertical.
3327         (WebCore::RenderMathMLOperator::stretchTo): Call maxSize and minSize when necessary.
3328         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths): Call leadingSpace and trailingSpace.
3329         (WebCore::RenderMathMLOperator::layoutBlock): Ditto.
3330         (WebCore::RenderMathMLOperator::useMathOperator): Remove the case for anonymous operators as
3331         this is now handled in the derived class.
3332         (WebCore::RenderMathMLOperator::paint): Call leadingSpace.
3333         * rendering/mathml/RenderMathMLOperator.h: Remove length members and declare helper functions
3334         to get these lengths from MathMLOperatorElement.
3335         (WebCore::RenderMathMLOperator::setLeadingSpace): Deleted. This is no longer used.
3336         (WebCore::RenderMathMLOperator::setTrailingSpace): Deleted. This is no longer used.
3337
3338 2016-08-02  Frederic Wang  <fwang@igalia.com>
3339
3340         Move parsing of operator length attributes to MathMLOperatorElement
3341         https://bugs.webkit.org/show_bug.cgi?id=160301
3342
3343         Reviewed by Darin Adler.
3344
3345         We move parsing of operator attributes lspace, rspace minsize, maxsize into the class
3346         MathMLOperatorElement. We rely on the existing MathMLElement::Length structure and expand
3347         it to handle the "infinity" case of maxsize that we always resolve as intMaxForLayoutUnit.
3348         We also improve the resolution of a negative value for minsize and maxsize since the MathML
3349         recommendation says it should be rounded up to the nearest valid value (which is zero)
3350         instead of ignoring the attribute and using the default value. This is similar to r203285
3351         for mfrac@linethickness. We also update the existing test for minsize/maxsize to take into
3352         account that change.
3353
3354         No new tests, already covered by existing tests.
3355
3356         * mathml/MathMLElement.h: Add an "Infinity" type for MathML Length.
3357         * mathml/MathMLOperatorElement.cpp:
3358         (WebCore::MathMLOperatorElement::leadingSpace): Helper function to retrieve the cached value
3359         for the lspace attribute, parse it if necessary.
3360         (WebCore::MathMLOperatorElement::trailingSpace): Ditto for rspace.
3361         (WebCore::MathMLOperatorElement::minSize): Ditto for minsize.
3362         (WebCore::MathMLOperatorElement::maxSize): Ditto for maxsize. This attribute also accepts the
3363         "infinity" value.
3364         (WebCore::MathMLOperatorElement::parseAttribute): Mark attributes dirty.
3365         * mathml/MathMLOperatorElement.h: Declare Length members and accessors.
3366         * rendering/mathml/RenderMathMLBlock.cpp:
3367         (WebCore::toUserUnits): Resolve Infinity as intMaxForLayoutUnit.
3368         * rendering/mathml/RenderMathMLOperator.cpp:
3369         (WebCore::RenderMathMLOperator::setOperatorProperties): We use toUserUnits to resolve the
3370         lengths. Negative maxsize and minsize values now fallback to 0 instead of their default
3371         values. We also remove the !isAnonymous() check since setOperatorProperties is overriden
3372         in the RenderMathMLFencedOperator class.
3373
3374 2016-08-02  Frederic Wang  <fred.wang@free.fr>
3375
3376         Unreviewed build error fix.
3377
3378         * mathml/MathMLOperatorElement.cpp:
3379         (WebCore::propertyFlagToAttributeName): Return a nullQName to avoid warnings on some platforms.
3380
3381 2016-08-02  Anders Carlsson  <andersca@apple.com>
3382
3383         Stop building Objective-C bindings that aren't exposed anywhere
3384         https://bugs.webkit.org/show_bug.cgi?id=160458
3385
3386         Reviewed by Darin Adler.
3387
3388         * DerivedSources.make:
3389         * WebCore.xcodeproj/project.pbxproj:
3390
3391 2016-08-02  Chris Dumez  <cdumez@apple.com>
3392
3393         HTMLCollection's named getter should only do 'name' attribute matching for HTMLElements
3394         https://bugs.webkit.org/show_bug.cgi?id=160456
3395
3396         Reviewed by Darin Adler.
3397
3398         HTMLCollection's named getter should only do 'name' attribute matching for HTMLElements:
3399         - https://dom.spec.whatwg.org/#dom-htmlcollection-nameditem
3400
3401         Our slow path which relies on HTMLCollection::updateNamedElementCache() does the right
3402         thing. However, we have a fast path in 
3403         CachedHTMLCollection<HTMLCollectionClass, traversalType>::namedItem() that was missing a
3404         check.
3405
3406         Firefox and Chrome both behave correctly here.
3407
3408         No new tests, rebaselined existing tests.
3409
3410         * html/CachedHTMLCollection.h:
3411         (WebCore::traversalType>::namedItem):
3412
3413 2016-08-02  Chris Dumez  <cdumez@apple.com>
3414
3415         Kill [StrictTypeChecking] IDL extended attribute
3416         https://bugs.webkit.org/show_bug.cgi?id=160382
3417
3418         Reviewed by Darin Adler.
3419
3420         Kill [StrictTypeChecking] IDL extended attribute. Its only remaining
3421         use was on DOMString parameters for a few CanvasRenderingContext2D
3422         operations in order to work around a bug in our overload resolution.
3423
3424         However, as of r204028, we implement the Web IDL overload resolution
3425         algorithm and [StrictTypeChecking] is now a no-op and is no longer
3426         needed.
3427
3428         * bindings/scripts/CodeGeneratorJS.pm:
3429         (GenerateParametersCheckExpression):
3430         * bindings/scripts/IDLAttributes.txt:
3431         * bindings/scripts/test/TestObj.idl:
3432         * bindings/scripts/test/TestTypedefs.idl:
3433         * html/canvas/CanvasRenderingContext2D.idl:
3434
3435 2016-08-02  Frederic Wang  <fwang@igalia.com>
3436
3437         Move parsing of boolean operator properties into MathMLOperatorElement
3438         https://bugs.webkit.org/show_bug.cgi?id=160190
3439
3440         Reviewed by Darin Adler.
3441
3442         No new tests, already covered by existing tests.
3443
3444         * mathml/MathMLOperatorDictionary.h: Add a bit mask with all the property flags set.
3445         * mathml/MathMLOperatorElement.cpp:
3446         (WebCore::attributeNameToPropertyFlag): helper function to map from attribute name to flag.
3447         (WebCore::MathMLOperatorElement::computeOperatorFlag): Helper function to update one
3448         bit of m_properties.flags from the corresponding boolean attribute. The default value is
3449         taken from the operator dictionary data stored in m_dictionaryProperty.flags.
3450         (WebCore::MathMLOperatorE