URI header now returns pointers with ownership.
I've put `.release()` at most of the callsites, but this gives me something to search for when taking the next steps.
This commit is contained in:
@ -72,8 +72,8 @@ StyleEngine::StyleEngine (dw::core::Layout *layout,
|
||||
cssContext = new CssContext ();
|
||||
buildUserStyle ();
|
||||
this->layout = layout;
|
||||
this->pageUrl = pageUrl ? a_Url_dup(pageUrl) : NULL;
|
||||
this->baseUrl = baseUrl ? a_Url_dup(baseUrl) : NULL;
|
||||
this->pageUrl = pageUrl ? a_Url_dup(*pageUrl).release() : nullptr;
|
||||
this->baseUrl = baseUrl ? a_Url_dup(*baseUrl).release() : nullptr;
|
||||
importDepth = 0;
|
||||
dpmm = layout->dpiX () / 25.4; /* assume dpiX == dpiY */
|
||||
this->zoom = zoom;
|
||||
@ -531,7 +531,7 @@ void StyleEngine::apply (int i, StyleAttrs *attrs, CssPropertyList *props,
|
||||
break;
|
||||
case CSS_PROPERTY_BACKGROUND_IMAGE:
|
||||
// p->value.strVal should be absolute, so baseUrl is not needed
|
||||
imgUrl = a_Url_new (p->value.strVal, NULL);
|
||||
imgUrl = a_Url_new (p->value.strVal, NULL).release();
|
||||
break;
|
||||
case CSS_PROPERTY_BACKGROUND_POSITION:
|
||||
computeLength (&attrs->backgroundPositionX, p->value.posVal->posX,
|
||||
|
||||
Reference in New Issue
Block a user