コード例 #1
0
Maybe<nsStyleLinkElement::SheetInfo> SVGStyleElement::GetStyleSheetInfo() {
  if (!IsCSSMimeTypeAttribute(*this)) {
    return Nothing();
  }

  nsAutoString title;
  nsAutoString media;
  GetTitleAndMediaForElement(*this, title, media);

  return Some(SheetInfo{
      *OwnerDoc(),
      this,
      nullptr,
      // FIXME(bug 1459822): Why doesn't this need a principal, but
      // HTMLStyleElement does?
      nullptr,
      net::ReferrerPolicy::RP_Unset,
      // FIXME(bug 1459822): Why does this need a crossorigin attribute, but
      // HTMLStyleElement doesn't?
      AttrValueToCORSMode(GetParsedAttr(nsGkAtoms::crossorigin)),
      title,
      media,
      HasAlternateRel::No,
      IsInline::Yes,
  });
}
コード例 #2
0
CORSMode
SVGStyleElement::GetCORSMode() const
{
  return AttrValueToCORSMode(GetParsedAttr(nsGkAtoms::crossorigin));
}
コード例 #3
0
CORSMode
HTMLImageElement::GetCORSMode()
{
  return AttrValueToCORSMode(GetParsedAttr(nsGkAtoms::crossorigin));
}
コード例 #4
0
CORSMode
HTMLScriptElement::GetCORSMode() const
{
  return AttrValueToCORSMode(GetParsedAttr(nsGkAtoms::crossorigin));
}