mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 1778298 - gradient href should ignore base tag if local r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D151130
This commit is contained in:
parent
5a69613d97
commit
18bbb02fab
19
layout/reftests/svg/gradient-href-01.html
Normal file
19
layout/reftests/svg/gradient-href-01.html
Normal file
@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<base href="/"/>
|
||||
</head>
|
||||
<body bgcolor="lime">
|
||||
<svg width="100%" height="100%">
|
||||
<defs>
|
||||
<linearGradient id="b">
|
||||
<stop offset="0" stop-color="lime"/>
|
||||
<stop offset="1" stop-color="lime"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="a" xlink:href="#b"/>
|
||||
</defs>
|
||||
<rect width="100%" height="100%" fill="red"/>
|
||||
<rect width="100%" height="100%" fill="url(#a)"/>
|
||||
</svg>
|
||||
</body>
|
||||
</html>
|
@ -260,6 +260,7 @@ fuzzy-if(Android,0-18,0-600) == foreignObject-fixedpos-01.html foreignObject-dyn
|
||||
== getElementById-a-element-01.svg pass.svg
|
||||
== geometry-properties-in-css.html geometry-properties-in-css-ref.html
|
||||
|
||||
== gradient-href-01.html pass.svg
|
||||
fuzzy(0-3,0-32000) == gradient-live-01a.svg gradient-live-01-ref.svg
|
||||
fuzzy(0-3,0-32000) == gradient-live-01b.svg gradient-live-01-ref.svg
|
||||
fuzzy(0-3,0-32000) == gradient-live-01c.svg gradient-live-01-ref.svg
|
||||
|
@ -1463,10 +1463,14 @@ nsIFrame* SVGObserverUtils::GetAndObserveTemplate(
|
||||
|
||||
// Convert href to an nsIURI
|
||||
nsIContent* content = aFrame->GetContent();
|
||||
|
||||
nsCOMPtr<nsIURI> baseURI = content->GetBaseURI();
|
||||
if (nsContentUtils::IsLocalRefURL(href)) {
|
||||
baseURI = GetBaseURLForLocalRef(content, baseURI);
|
||||
}
|
||||
nsCOMPtr<nsIURI> targetURI;
|
||||
nsContentUtils::NewURIWithDocumentCharset(getter_AddRefs(targetURI), href,
|
||||
content->GetUncomposedDoc(),
|
||||
content->GetBaseURI());
|
||||
nsContentUtils::NewURIWithDocumentCharset(
|
||||
getter_AddRefs(targetURI), href, content->GetUncomposedDoc(), baseURI);
|
||||
|
||||
// There's no clear refererer policy spec about non-CSS SVG resource
|
||||
// references. Bug 1415044 to investigate which referrer we should use.
|
||||
|
Loading…
Reference in New Issue
Block a user