From 7577e2a1e6a2b1c3b61cc01b3f3f18476afa05fb Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 11 Apr 2010 16:34:23 +0000 Subject: Ensure quirks mode matches when retrieving contents from cache svn path=/trunk/netsurf/; revision=10360 --- content/content.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'content/content.c') diff --git a/content/content.c b/content/content.c index 397c645e4..ba4db702c 100644 --- a/content/content.c +++ b/content/content.c @@ -972,6 +972,22 @@ uint32_t content_count_users(struct content *c) return counter - 1; /* Subtract 1 for the sentinel */ } +/** + * Determine if quirks mode matches + * + * \param c Content to consider + * \param quirks Quirks mode to match + * \return True if quirks match, false otherwise + */ +bool content_matches_quirks(struct content *c, bool quirks) +{ + /* If the content isn't CSS, we don't care about quirks */ + if (c->type != CONTENT_CSS) + return true; + + return c->quirks == quirks; +} + /** * Send a message to all users. */ -- cgit v1.2.3