gecko-dev/layout/style/ServoMediaList.h
Cosmin Sabou 619e0c5b90 Backed out 3 changesets (bug 1449321, bug 1449566, bug 1449565) as per developer request.
Backed out changeset c31de7e26809 (bug 1449565)
Backed out changeset 72f9188800af (bug 1449566)
Backed out changeset 763277b299e4 (bug 1449321)

--HG--
extra : rebase_source : 212b357a3079dff30845a5f82e47b94e2d7f93cd
2018-03-28 18:10:11 +03:00

52 lines
1.5 KiB
C++

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* representation of media lists for servo backend */
#ifndef mozilla_ServoMediaList_h
#define mozilla_ServoMediaList_h
#include "mozilla/dom/MediaList.h"
#include "mozilla/ServoBindingTypes.h"
namespace mozilla {
class ServoMediaList final : public dom::MediaList
{
public:
explicit ServoMediaList(already_AddRefed<RawServoMediaList> aRawList)
: mRawList(aRawList) {}
ServoMediaList(const nsAString& aMedia, dom::CallerType);
ServoMediaList();
already_AddRefed<dom::MediaList> Clone() final;
void GetText(nsAString& aMediaText) final;
void SetText(const nsAString& aMediaText) final;
uint32_t Length() final;
void IndexedGetter(uint32_t aIndex, bool& aFound,
nsAString& aReturn) final;
bool Matches(nsPresContext*) const final;
RawServoMediaList& RawList() { return *mRawList; }
protected:
nsresult Delete(const nsAString& aOldMedium) final;
nsresult Append(const nsAString& aNewMedium) final;
void SetTextInternal(const nsAString& aMediaText, dom::CallerType);
~ServoMediaList() {}
private:
RefPtr<RawServoMediaList> mRawList;
};
} // namespace mozilla
#endif // mozilla_ServoMediaList_h