mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-05 16:22:53 +00:00
Bug 1706179 - Add HTMLMetaElement.media. r=smaug
We don't use it because we don't use theme-color, but some sites are starting to rely on it (comment 4) and it is trivial to support. Differential Revision: https://phabricator.services.mozilla.com/D156667
This commit is contained in:
parent
684a24a549
commit
54e3830cb2
@ -53,9 +53,12 @@ class HTMLMetaElement final : public nsGenericHTMLElement {
|
||||
void SetScheme(const nsAString& aScheme, ErrorResult& aRv) {
|
||||
SetHTMLAttr(nsGkAtoms::scheme, aScheme, aRv);
|
||||
}
|
||||
void GetMedia(nsAString& aValue) { GetHTMLAttr(nsGkAtoms::media, aValue); }
|
||||
void SetMedia(const nsAString& aMedia, ErrorResult& aRv) {
|
||||
SetHTMLAttr(nsGkAtoms::media, aMedia, aRv);
|
||||
}
|
||||
|
||||
virtual JSObject* WrapNode(JSContext* aCx,
|
||||
JS::Handle<JSObject*> aGivenProto) override;
|
||||
JSObject* WrapNode(JSContext*, JS::Handle<JSObject*> aGivenProto) override;
|
||||
|
||||
protected:
|
||||
virtual ~HTMLMetaElement();
|
||||
|
@ -11,7 +11,7 @@
|
||||
* and create derivative works of this document.
|
||||
*/
|
||||
|
||||
// http://www.whatwg.org/specs/web-apps/current-work/#the-meta-element
|
||||
// https://html.spec.whatwg.org/#the-meta-element
|
||||
[Exposed=Window]
|
||||
interface HTMLMetaElement : HTMLElement {
|
||||
[HTMLConstructor] constructor();
|
||||
@ -22,6 +22,8 @@ interface HTMLMetaElement : HTMLElement {
|
||||
attribute DOMString httpEquiv;
|
||||
[CEReactions, SetterThrows, Pure]
|
||||
attribute DOMString content;
|
||||
[CEReactions, SetterThrows, Pure]
|
||||
attribute DOMString media;
|
||||
};
|
||||
|
||||
// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
|
||||
|
@ -674,12 +674,6 @@ prefs: [dom.security.featurePolicy.experimental.enabled:true, dom.security.featu
|
||||
[HTMLElement interface: document.createElement("noscript") must inherit property "oncontextrestored" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLMetaElement interface: attribute media]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLMetaElement interface: document.createElement("meta") must inherit property "media" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLLinkElement interface: attribute blocking]
|
||||
expected: FAIL
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user