changeset 891:ad3052307c0f

Removed a redundant check.
author Jorge Arellano Cid <jcid@dillo.org>
date Sun, 01 Feb 2009 15:54:18 -0300
parents 69abb432b88c
children 6a892184d498
files src/html.cc
diffstat 1 files changed, 5 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/html.cc	Sun Feb 01 15:46:08 2009 -0300
+++ b/src/html.cc	Sun Feb 01 15:54:18 2009 -0300
@@ -2822,6 +2822,9 @@
  * Parse the LINK element (Only CSS stylesheets by now).
  * (If it either hits or misses, is not relevant here; that's up to the
  *  cache functions)
+ *
+ * TODO: How will we know when to use "handheld"? Ask the html->bw->ui for
+ * screen dimensions, or a dillorc preference.
  */
 static void Html_tag_open_link(DilloHtml *html, const char *tag, int tagsize)
 {
@@ -2832,8 +2835,6 @@
    //MSG("Html_tag_open_link(): %s\n", tag_str);
    //dFree(tag_str);
 
-   /* Remote stylesheets enabled? */
-   dReturn_if_fail (prefs.load_stylesheets);
    /* When viewing suspicious HTML email, don't load LINK */
    dReturn_if (URL_FLAGS(html->base_url) & URL_SpamSafe);
 
@@ -2842,12 +2843,8 @@
       BUG_MSG("the LINK element must be inside the HEAD section\n");
       return;
    }
-
-   /* TODO: How will we know when to use "handheld"? Ask the html->bw->ui for
-      screen dimensions, or a dillorc preference. */
-
-   if (!prefs.load_stylesheets)
-      return;
+   /* Remote stylesheets enabled? */
+   dReturn_if_fail (prefs.load_stylesheets);
 
    /* CSS stylesheet link */
    if (!(attrbuf = a_Html_get_attr(html, tag, tagsize, "rel")) ||