Bug 1288084 - Expose a line number for each attribute, v2; r=wchen

This commit is contained in:
Henri Sivonen
2016-09-20 16:31:57 +02:00
parent b5d811849f
commit a6fb532484
12 changed files with 87 additions and 27 deletions

View File

@@ -15,12 +15,12 @@ nsHtml5PlainTextUtils::NewLinkAttributes()
{
nsHtml5HtmlAttributes* linkAttrs = new nsHtml5HtmlAttributes(0);
nsString* rel = new nsString(NS_LITERAL_STRING("alternate stylesheet"));
linkAttrs->addAttribute(nsHtml5AttributeName::ATTR_REL, rel);
linkAttrs->addAttribute(nsHtml5AttributeName::ATTR_REL, rel, -1);
nsString* type = new nsString(NS_LITERAL_STRING("text/css"));
linkAttrs->addAttribute(nsHtml5AttributeName::ATTR_TYPE, type);
linkAttrs->addAttribute(nsHtml5AttributeName::ATTR_TYPE, type, -1);
nsString* href = new nsString(
NS_LITERAL_STRING("resource://gre-resources/plaintext.css"));
linkAttrs->addAttribute(nsHtml5AttributeName::ATTR_HREF, href);
linkAttrs->addAttribute(nsHtml5AttributeName::ATTR_HREF, href, -1);
nsresult rv;
nsCOMPtr<nsIStringBundleService> bundleService = do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
@@ -35,6 +35,6 @@ nsHtml5PlainTextUtils::NewLinkAttributes()
}
nsString* titleCopy = new nsString(title);
linkAttrs->addAttribute(nsHtml5AttributeName::ATTR_TITLE, titleCopy);
linkAttrs->addAttribute(nsHtml5AttributeName::ATTR_TITLE, titleCopy, -1);
return linkAttrs;
}