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