summaryrefslogtreecommitdiff
path: root/src/cssparser.hh
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2014-04-01 21:48:15 +0200
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2014-04-01 21:48:15 +0200
commitf284ce5c34cdf37854135524814bbacbd2932f25 (patch)
tree62047de8c15b27fab0caa0a9105a15dfea156c87 /src/cssparser.hh
parent4e3f41b9e5307fd951c710818687f96e8a68ca35 (diff)
resolve CSS background-image URLs relative to styleheet URL
Diffstat (limited to 'src/cssparser.hh')
-rw-r--r--src/cssparser.hh10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/cssparser.hh b/src/cssparser.hh
index 30d02eee..eb074320 100644
--- a/src/cssparser.hh
+++ b/src/cssparser.hh
@@ -15,6 +15,7 @@ class CssParser {
static const int maxStrLen = 256;
CssContext *context;
CssOrigin origin;
+ const DilloUrl *baseUrl;
const char *buf;
int buflen, bufptr;
@@ -24,7 +25,7 @@ class CssParser {
bool withinBlock;
bool spaceSeparated; /* used when parsing CSS selectors */
- CssParser(CssContext *context, CssOrigin origin,
+ CssParser(CssContext *context, CssOrigin origin, const DilloUrl *baseUrl,
const char *buf, int buflen);
int getChar();
void ungetChar();
@@ -40,7 +41,7 @@ class CssParser {
CssPropertyList * importantProps);
bool parseSimpleSelector(CssSimpleSelector *selector);
char *parseUrl();
- void parseImport(DilloHtml *html, DilloUrl *url);
+ void parseImport(DilloHtml *html);
void parseMedia();
CssSelector *parseSelector();
void parseRuleset();
@@ -48,10 +49,11 @@ class CssParser {
void ignoreStatement();
public:
- static void parseDeclarationBlock(const char *buf, int buflen,
+ static void parseDeclarationBlock(const DilloUrl *baseUrl,
+ const char *buf, int buflen,
CssPropertyList *props,
CssPropertyList *propsImortant);
- static void parse(DilloHtml *html, DilloUrl *url, CssContext *context,
+ static void parse(DilloHtml *html, const DilloUrl *baseUrl, CssContext *context,
const char *buf, int buflen, CssOrigin origin);
static const char *propertyNameString(CssPropertyName name);
};