mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 378923 - Make non-root outer-<svg> respect |overflow:visible| (overflow="visible"). r=roc
This commit is contained in:
parent
be5a9d6aef
commit
dcc3e40184
7
layout/reftests/svg/overflow-on-outer-svg-01-ref.svg
Normal file
7
layout/reftests/svg/overflow-on-outer-svg-01-ref.svg
Normal file
@ -0,0 +1,7 @@
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/licenses/publicdomain/
|
||||
-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="100" height="100" fill="blue"/>
|
||||
</svg>
|
After Width: | Height: | Size: 213 B |
11
layout/reftests/svg/overflow-on-outer-svg-01.svg
Normal file
11
layout/reftests/svg/overflow-on-outer-svg-01.svg
Normal file
@ -0,0 +1,11 @@
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/licenses/publicdomain/
|
||||
-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
style="overflow:visible;"
|
||||
width="100" height="100">
|
||||
<title>Test that we always clip root-<svg> regardless of 'overflow'</title>
|
||||
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=378923 -->
|
||||
<rect width="100%" height="100%" fill="blue"/>
|
||||
</svg>
|
After Width: | Height: | Size: 428 B |
10
layout/reftests/svg/overflow-on-outer-svg-02-ref.xhtml
Normal file
10
layout/reftests/svg/overflow-on-outer-svg-02-ref.xhtml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<body>
|
||||
<div style="background-color: blue; width: 100px; height: 100px;"></div>
|
||||
</body>
|
||||
</html>
|
16
layout/reftests/svg/overflow-on-outer-svg-02a.xhtml
Normal file
16
layout/reftests/svg/overflow-on-outer-svg-02a.xhtml
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Test that non-root outer-<svg> clips for overflow="auto"</title>
|
||||
</head>
|
||||
<body>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"
|
||||
overflow="auto">
|
||||
<rect x="-50" y="-50" width="200" height="200" fill="blue"/>
|
||||
</svg>
|
||||
</body>
|
||||
</html>
|
16
layout/reftests/svg/overflow-on-outer-svg-02b.xhtml
Normal file
16
layout/reftests/svg/overflow-on-outer-svg-02b.xhtml
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Test that non-root outer-<svg> clips for overflow="scroll"</title>
|
||||
</head>
|
||||
<body>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"
|
||||
overflow="scroll">
|
||||
<rect x="-50" y="-50" width="200" height="200" fill="blue"/>
|
||||
</svg>
|
||||
</body>
|
||||
</html>
|
16
layout/reftests/svg/overflow-on-outer-svg-02c.xhtml
Normal file
16
layout/reftests/svg/overflow-on-outer-svg-02c.xhtml
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Test that non-root outer-<svg> clips for overflow="hidden"</title>
|
||||
</head>
|
||||
<body>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"
|
||||
overflow="hidden">
|
||||
<rect x="-50" y="-50" width="200" height="200" fill="blue"/>
|
||||
</svg>
|
||||
</body>
|
||||
</html>
|
28
layout/reftests/svg/overflow-on-outer-svg-02d.xhtml
Normal file
28
layout/reftests/svg/overflow-on-outer-svg-02d.xhtml
Normal file
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||
class="reftest-wait">
|
||||
<head>
|
||||
<title>Test that non-root outer-<svg> repaints correctly changing to overflow="hidden"</title>
|
||||
<script>
|
||||
|
||||
function doTest() {
|
||||
document.getElementById("svg").setAttribute("overflow", "hidden");
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
|
||||
window.addEventListener("MozReftestInvalidate", doTest, false);
|
||||
setTimeout(doTest, 4000); // fallback for running outside reftest
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<svg id="svg" xmlns="http://www.w3.org/2000/svg" width="100" height="100"
|
||||
overflow="visible">
|
||||
<rect x="-50" y="-50" width="200" height="200" fill="blue"/>
|
||||
</svg>
|
||||
</body>
|
||||
</html>
|
10
layout/reftests/svg/overflow-on-outer-svg-03-ref.xhtml
Normal file
10
layout/reftests/svg/overflow-on-outer-svg-03-ref.xhtml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<body>
|
||||
<div style="background-color: blue; transform: translate(-50px, -50px); width: 200px; height: 200px;"></div>
|
||||
</body>
|
||||
</html>
|
16
layout/reftests/svg/overflow-on-outer-svg-03a.xhtml
Normal file
16
layout/reftests/svg/overflow-on-outer-svg-03a.xhtml
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Test that non-root outer-<svg> clips for overflow="auto"</title>
|
||||
</head>
|
||||
<body>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"
|
||||
overflow="visible">
|
||||
<rect x="-50" y="-50" width="200" height="200" fill="blue"/>
|
||||
</svg>
|
||||
</body>
|
||||
</html>
|
28
layout/reftests/svg/overflow-on-outer-svg-03b.xhtml
Normal file
28
layout/reftests/svg/overflow-on-outer-svg-03b.xhtml
Normal file
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||
class="reftest-wait">
|
||||
<head>
|
||||
<title>Test that non-root outer-<svg> repaints correctly changing to overflow="visible"</title>
|
||||
<script>
|
||||
|
||||
function doTest() {
|
||||
document.getElementById("svg").setAttribute("overflow", "visible");
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
|
||||
window.addEventListener("MozReftestInvalidate", doTest, false);
|
||||
setTimeout(doTest, 4000); // fallback for running outside reftest
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<svg id="svg" xmlns="http://www.w3.org/2000/svg" width="100" height="100"
|
||||
overflow="hidden">
|
||||
<rect x="-50" y="-50" width="200" height="200" fill="blue"/>
|
||||
</svg>
|
||||
</body>
|
||||
</html>
|
@ -216,6 +216,13 @@ skip-if(d2d) == opacity-and-gradient-02.svg opacity-and-gradient-02-ref.svg
|
||||
== opacity-and-pattern-01.svg pass.svg
|
||||
== opacity-and-transform-01.svg opacity-and-transform-01-ref.svg
|
||||
== outer-svg-border-and-padding-01.svg outer-svg-border-and-padding-01-ref.svg
|
||||
== overflow-on-outer-svg-01.svg overflow-on-outer-svg-01-ref.svg
|
||||
== overflow-on-outer-svg-02a.xhtml overflow-on-outer-svg-02-ref.xhtml
|
||||
== overflow-on-outer-svg-02b.xhtml overflow-on-outer-svg-02-ref.xhtml
|
||||
== overflow-on-outer-svg-02c.xhtml overflow-on-outer-svg-02-ref.xhtml
|
||||
== overflow-on-outer-svg-02d.xhtml overflow-on-outer-svg-02-ref.xhtml
|
||||
== overflow-on-outer-svg-03a.xhtml overflow-on-outer-svg-03-ref.xhtml
|
||||
== overflow-on-outer-svg-03b.xhtml overflow-on-outer-svg-03-ref.xhtml
|
||||
pref(svg.paint-order.enabled,true) == paint-order-01.svg paint-order-01-ref.svg
|
||||
pref(svg.paint-order.enabled,true) == paint-order-02.svg paint-order-02-ref.svg
|
||||
pref(svg.paint-order.enabled,true) == paint-order-03.svg paint-order-03-ref.svg
|
||||
|
@ -765,7 +765,13 @@ nsSVGOuterSVGFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
|
||||
DisplayBorderBackgroundOutline(aBuilder, aLists);
|
||||
|
||||
DisplayListClipState::AutoClipContainingBlockDescendantsToContentBox clip(aBuilder, this);
|
||||
// Per-spec, we always clip root-<svg> even when 'overflow' has its initial
|
||||
// value of 'visible'. See also the "visual overflow" comments in Reflow.
|
||||
DisplayListClipState::AutoSaveRestore autoSR(aBuilder);
|
||||
if (mIsRootContent ||
|
||||
StyleDisplay()->IsScrollableOverflow()) {
|
||||
autoSR.ClipContainingBlockDescendantsToContentBox(aBuilder, this);
|
||||
}
|
||||
|
||||
if ((aBuilder->IsForEventDelivery() &&
|
||||
NS_SVGDisplayListHitTestingEnabled()) ||
|
||||
|
Loading…
Reference in New Issue
Block a user