Bug 1970983 - Re-apply patch 3 from bug 1896076, which was overwritten when the cairo-quartz code was reverted in bug 1908587. a=pascalc
This is independent of the CGLayer-related issues that caused us to revert the cairo-quartz component of the cairo 1.18.0 update, and is needed to allow document-internal links to work in Save-to-PDF output, rather than pointing back to the online document. Original Revision: https://phabricator.services.mozilla.com/D253801 Differential Revision: https://phabricator.services.mozilla.com/D256854
This commit is contained in:
committed by
pchevrel@mozilla.com
parent
a85bf16ed8
commit
cca88576eb
@@ -2414,18 +2414,18 @@ _cairo_quartz_surface_link (cairo_quartz_surface_t *surface,
|
||||
in the link attributes. */
|
||||
CFURLRef url = NULL;
|
||||
CFStringRef name = NULL;
|
||||
if (link_attrs.uri && *link_attrs.uri)
|
||||
url = CFURLCreateWithBytes (NULL,
|
||||
(const UInt8 *) link_attrs.uri,
|
||||
strlen (link_attrs.uri),
|
||||
kCFStringEncodingUTF8,
|
||||
NULL);
|
||||
else if (link_attrs.dest && *link_attrs.dest)
|
||||
if (link_attrs.dest && *link_attrs.dest)
|
||||
name = CFStringCreateWithBytes (kCFAllocatorDefault,
|
||||
(const UInt8 *) link_attrs.dest,
|
||||
strlen (link_attrs.dest),
|
||||
kCFStringEncodingUTF8,
|
||||
FALSE);
|
||||
else if (link_attrs.uri && *link_attrs.uri)
|
||||
url = CFURLCreateWithBytes (NULL,
|
||||
(const UInt8 *) link_attrs.uri,
|
||||
strlen (link_attrs.uri),
|
||||
kCFStringEncodingUTF8,
|
||||
NULL);
|
||||
else /* silently ignore link that doesn't have a usable target */
|
||||
goto cleanup;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user