зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1853727 - elements that map to style and are not animated do not print correctly r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D188703
This commit is contained in:
Родитель
f030f6d0fc
Коммит
c34751a9b6
|
@ -216,7 +216,8 @@ nsresult SVGElement::CopyInnerTo(mozilla::dom::Element* aDest) {
|
|||
|
||||
// We don't map use element width/height currently. We can remove this
|
||||
// test when we do.
|
||||
if (propId != eCSSProperty_UNKNOWN) {
|
||||
if (propId != eCSSProperty_UNKNOWN &&
|
||||
lengthInfo.mValues[i].IsAnimated()) {
|
||||
dest->SMILOverrideStyle()->SetSMILValue(propId,
|
||||
lengthInfo.mValues[i]);
|
||||
}
|
||||
|
@ -245,8 +246,10 @@ nsresult SVGElement::CopyInnerTo(mozilla::dom::Element* aDest) {
|
|||
}
|
||||
if (const auto* pathSegList = GetAnimPathSegList()) {
|
||||
*dest->GetAnimPathSegList() = *pathSegList;
|
||||
dest->SMILOverrideStyle()->SetSMILValue(nsCSSPropertyID::eCSSProperty_d,
|
||||
*pathSegList);
|
||||
if (pathSegList->IsAnimating()) {
|
||||
dest->SMILOverrideStyle()->SetSMILValue(nsCSSPropertyID::eCSSProperty_d,
|
||||
*pathSegList);
|
||||
}
|
||||
}
|
||||
if (const auto* transformList = GetAnimatedTransformList()) {
|
||||
*dest->GetAnimatedTransformList(DO_ALLOCATE) = *transformList;
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
<!doctype html>
|
||||
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1853727">
|
||||
<link rel="match" href="svg-use-symbol-width-print-ref.html">
|
||||
<style>
|
||||
body { margin: 0 }
|
||||
</style>
|
||||
<!-- Should see a blue square inside the top left quarter of a purple square -->
|
||||
<svg width=200 height=200 viewbox="0 0 200 200">
|
||||
<defs>
|
||||
<symbol id="r" viewBox="0 0 200 200">
|
||||
<rect fill="blue" style="width:100px;height:100px" />
|
||||
</symbol>
|
||||
</defs>
|
||||
<rect fill="purple" style="width:100px;height:100px" />
|
||||
<use href="#r" width="100" height="100" x="0" y="0" />
|
||||
</svg>
|
Загрузка…
Ссылка в новой задаче