Remove dead exception in MediaList.appendMedium
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 May 2018 03:11:30 +0000 (03:11 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 May 2018 03:11:30 +0000 (03:11 +0000)
commit8e2a2a117e54fe769c12d843e6d4eac79e59ec95
treea1b7a249b4f4310910be5cf39d990792dc9e0224
parentf8509d2d3d94ad07c4e395c63c97e3506546ac1a
Remove dead exception in MediaList.appendMedium
https://bugs.webkit.org/show_bug.cgi?id=185278

Patch by Chris Nardi <cnardi@chromium.org> on 2018-05-21
Reviewed by Chris Dumez.

Source/WebCore:

MediaList.appendMedium was able to throw an exception, but MediaQuerySet::add() always
returned true, making it impossible for that exception to be thrown. This matched the
spec, as |appendMedium| is not specified to throw an exception. Remove the dead code
surrounding the exception, and make MediaQuerySet::add() return false if the medium is
not added.

No new/modified tests as there should be no functional changes.

* css/MediaList.cpp:
(WebCore::MediaQuerySet::add):
(WebCore::MediaList::appendMedium):
* css/MediaList.h:
* css/MediaList.idl:

Source/WebKit:

Remove code pertaining to an exception being thrown by appendMedium().

* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.cpp:
(webkit_dom_media_list_append_medium):

Source/WebKitLegacy/mac:

Remove code pertaining to an exception being thrown by appendMedium().

* DOM/DOMMediaList.mm:
(-[DOMMediaList appendMedium:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232044 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/css/MediaList.cpp
Source/WebCore/css/MediaList.h
Source/WebCore/css/MediaList.idl
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.cpp
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/DOM/DOMMediaList.mm