mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 07:15:46 +00:00
Bug 1325878: Don't hardode nsMediaList in dom::StyleSheet. r=xidorn
MozReview-Commit-ID: IynF1NFUSLf Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This commit is contained in:
parent
75a86d5f3c
commit
6ec12dc4f5
@ -41,11 +41,18 @@ public:
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(MediaList)
|
||||
|
||||
/**
|
||||
* Creates a MediaList backed by the StyleBackendType of the document.
|
||||
* Creates a MediaList backed by the given StyleBackendType.
|
||||
*/
|
||||
static already_AddRefed<MediaList> Create(StyleBackendType,
|
||||
const nsAString& aMedia);
|
||||
|
||||
/**
|
||||
* Creates a MediaList backed by the given StyleBackendType.
|
||||
*/
|
||||
static already_AddRefed<MediaList> Create(StyleBackendType aBackendType) {
|
||||
return Create(aBackendType, nsString());
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a MediaList backed by the StyleBackendType of the document.
|
||||
*/
|
||||
|
@ -14,7 +14,6 @@
|
||||
#include "mozilla/CSSStyleSheet.h"
|
||||
|
||||
#include "mozAutoDocUpdate.h"
|
||||
#include "nsMediaList.h"
|
||||
#include "NullPrincipal.h"
|
||||
|
||||
namespace mozilla {
|
||||
@ -692,7 +691,7 @@ dom::MediaList*
|
||||
StyleSheet::Media()
|
||||
{
|
||||
if (!mMedia) {
|
||||
mMedia = new nsMediaList();
|
||||
mMedia = dom::MediaList::Create(mType);
|
||||
mMedia->SetStyleSheet(this);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user