Permalink
Browse files

Making getters and setters

  • Loading branch information...
paavininanda committed Jul 2, 2018
1 parent 16bdf92 commit 5f77b60c3a3696eab17d7433932698dc5e6a8cfd
Showing with 45 additions and 4 deletions.
  1. +35 −0 components/script/dom/htmlsourceelement.rs
  2. +10 −4 components/script/dom/webidls/HTMLSourceElement.webidl
@@ -3,9 +3,11 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::Bindings::HTMLSourceElementBinding;
use dom::bindings::codegen::Bindings::HTMLSourceElementBinding::HTMLSourceElementMethods;
use dom::bindings::codegen::Bindings::NodeBinding::NodeBinding::NodeMethods;
use dom::bindings::inheritance::Castable;
use dom::bindings::root::DomRoot;
use dom::bindings::str::DOMString;
use dom::document::Document;
use dom::htmlelement::HTMLElement;
use dom::htmlmediaelement::HTMLMediaElement;
@@ -53,3 +55,36 @@ impl VirtualMethods for HTMLSourceElement {
}
}
}
impl HTMLSourceElementMethods for HTMLSourceElement {
// https://html.spec.whatwg.org/multipage/#dom-source-src
make_getter!(Src, "src");
// https://html.spec.whatwg.org/multipage/#dom-source-src
make_setter!(SetSrc, "src");
// https://html.spec.whatwg.org/multipage/#dom-source-type
make_getter!(Type, "type");
// https://html.spec.whatwg.org/multipage/#dom-source-type
make_setter!(SetType, "type");
// https://html.spec.whatwg.org/multipage/#dom-source-srcset
make_getter!(Srcset, "srcset");
// https://html.spec.whatwg.org/multipage/#dom-source-srcset
make_setter!(SetSrcset, "srcset");
// https://html.spec.whatwg.org/multipage/#dom-source-sizes
make_getter!(Sizes, "sizes");
// https://html.spec.whatwg.org/multipage/#dom-source-sizes
make_setter!(SetSizes, "sizes");
// https://html.spec.whatwg.org/multipage/#dom-source-media
make_getter!(Media, "media");
// https://html.spec.whatwg.org/multipage/#dom-source-media
make_setter!(SetMedia, "media");
}
@@ -5,8 +5,14 @@
// https://html.spec.whatwg.org/multipage/#htmlsourceelement
[HTMLConstructor]
interface HTMLSourceElement : HTMLElement {
// [CEReactions]
// attribute DOMString src;
// [CEReactions]
// attribute DOMString type;
[CEReactions]
attribute DOMString src;
[CEReactions]
attribute DOMString type;
[CEReactions]
attribute DOMString srcset;
[CEReactions]
attribute DOMString sizes;
[CEReactions]
attribute DOMString media;
};

1 comment on commit 5f77b60

@taskcluster

This comment has been minimized.

taskcluster bot commented on 5f77b60 Jul 3, 2018

Submitting the task to Taskcluster failed. Details

You do not have sufficient scopes. You are missing the following scopes:

{
  "AnyOf": [
    {
      "AnyOf": [
        "queue:create-task:highest:aws-provisioner-v1/servo-docker-worker",
        "queue:create-task:very-high:aws-provisioner-v1/servo-docker-worker",
        "queue:create-task:high:aws-provisioner-v1/servo-docker-worker",
        "queue:create-task:medium:aws-provisioner-v1/servo-docker-worker",
        "queue:create-task:low:aws-provisioner-v1/servo-docker-worker",
        "queue:create-task:very-low:aws-provisioner-v1/servo-docker-worker",
        "queue:create-task:lowest:aws-provisioner-v1/servo-docker-worker"
      ]
    },
    {
      "AnyOf": [
        "queue:create-task:aws-provisioner-v1/servo-docker-worker",
        {
          "AllOf": [
            "queue:define-task:aws-provisioner-v1/servo-docker-worker",
            "queue:task-group-id:taskcluster-github/CoPvRtI7RnGfwFjERXUGJw",
            "queue:schedule-task:taskcluster-github/CoPvRtI7RnGfwFjERXUGJw/CoPvRtI7RnGfwFjERXUGJw"
          ]
        }
      ]
    }
  ]
}

You have the scopes:

[
  "assume:project:taskcluster:mozilla-github-repository",
  "assume:repo:github.com/servo/servo:pull-request",
  "notify:email:*",
  "notify:irc-channel:*",
  "notify:irc-user:*",
  "queue:create-task:aws-provisioner-v1/github-worker",
  "queue:create-task:aws-provisioner-v1/github-worker-windows",
  "queue:create-task:aws-provisioner-v1/servo",
  "queue:create-task:aws-provisioner-v1/win2012r2",
  "queue:route:garbage.*",
  "queue:route:index.garbage.*",
  "queue:route:notify.email.*",
  "queue:route:notify.irc-channel.*",
  "queue:route:notify.irc-user.*",
  "queue:scheduler-id:taskcluster-github",
  "secrets:get:garbage/*",
  "secrets:set:garbage/*"
]

This request requires you to satisfy this scope expression:

{
  "AllOf": [
    {
      "AnyOf": [
        {
          "AllOf": [
            "queue:scheduler-id:taskcluster-github",
            {
              "AnyOf": [
                "queue:create-task:highest:aws-provisioner-v1/servo-docker-worker",
                "queue:create-task:very-high:aws-provisioner-v1/servo-docker-worker",
                "queue:create-task:high:aws-provisioner-v1/servo-docker-worker",
                "queue:create-task:medium:aws-provisioner-v1/servo-docker-worker",
                "queue:create-task:low:aws-provisioner-v1/servo-docker-worker",
                "queue:create-task:very-low:aws-provisioner-v1/servo-docker-worker",
                "queue:create-task:lowest:aws-provisioner-v1/servo-docker-worker"
              ]
            }
          ]
        },
        {
          "AnyOf": [
            "queue:create-task:aws-provisioner-v1/servo-docker-worker",
            {
              "AllOf": [
                "queue:define-task:aws-provisioner-v1/servo-docker-worker",
                "queue:task-group-id:taskcluster-github/CoPvRtI7RnGfwFjERXUGJw",
                "queue:schedule-task:taskcluster-github/CoPvRtI7RnGfwFjERXUGJw/CoPvRtI7RnGfwFjERXUGJw"
              ]
            }
          ]
        }
      ]
    }
  ]
}

  • method: createTask
  • errorCode: InsufficientScopes
  • statusCode: 403
  • time: 2018-07-03T19:08:03.403Z
Please sign in to comment.