Bug 849422 Allow plain text document word-wrap to be turned on after the fact r=bz
This commit is contained in:
@@ -7,13 +7,16 @@
|
||||
#include "nsHtml5AttributeName.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIStringBundle.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
|
||||
// static
|
||||
nsHtml5HtmlAttributes*
|
||||
nsHtml5PlainTextUtils::NewLinkAttributes()
|
||||
{
|
||||
nsHtml5HtmlAttributes* linkAttrs = new nsHtml5HtmlAttributes(0);
|
||||
nsString* rel = new nsString(NS_LITERAL_STRING("stylesheet"));
|
||||
nsString* rel = mozilla::Preferences::GetBool("plain_text.wrap_long_lines") ?
|
||||
new nsString(NS_LITERAL_STRING("stylesheet")) :
|
||||
new nsString(NS_LITERAL_STRING("alternate stylesheet"));
|
||||
linkAttrs->addAttribute(nsHtml5AttributeName::ATTR_REL, rel);
|
||||
nsString* type = new nsString(NS_LITERAL_STRING("text/css"));
|
||||
linkAttrs->addAttribute(nsHtml5AttributeName::ATTR_TYPE, type);
|
||||
|
||||
Reference in New Issue
Block a user