mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-02-25 19:04:21 +03:00
Resolve relative URLs in inline CSS relative to document's base URL, rather than its content URL.
This means passing the base URL as the URL param to LibCSS's css_stylesheet_create, rather than the URL of the source of the style data.
This commit is contained in:
parent
1878bc88a9
commit
35f7f2b9f3
@ -163,7 +163,7 @@ static css_select_handler selection_handler = {
|
||||
* \param data Source data
|
||||
* \param len Length of data in bytes
|
||||
* \param charset Charset of data, or NULL if unknown
|
||||
* \param url URL of document containing data
|
||||
* \param url Base URL of document containing data
|
||||
* \param allow_quirks True to permit CSS parsing quirks
|
||||
* \return Pointer to stylesheet, or NULL on failure.
|
||||
*/
|
||||
|
@ -1338,7 +1338,7 @@ css_select_results *box_get_style(html_content *c,
|
||||
(const uint8_t *) dom_string_data(s),
|
||||
dom_string_byte_length(s),
|
||||
c->encoding,
|
||||
nsurl_access(content_get_url(&c->base)),
|
||||
nsurl_access(c->base_url),
|
||||
c->quirks != DOM_DOCUMENT_QUIRKS_MODE_NONE);
|
||||
|
||||
dom_string_unref(s);
|
||||
|
Loading…
x
Reference in New Issue
Block a user