Commit 3fa141a1 authored by Philip Rogers's avatar Philip Rogers Committed by Commit Bot

Upstream and update foreignObject isolation tests

https://crrev.com/544756 ("Make <foreignObject> a stacking context")
added svg-isolation-foreign-isolation.html which had an incorrect
expectation. ForeignObject should create a stacking context [1] and
everything that creates a stacking context is an 'isolated' group [2],
so foreignObject should isolate. Our implementation is correct for html
content in foreignObject but has a bug for svg content in foreignObject.
This patch creates WPT tests for these two scenarios, and marks the svg
variant as failing.

[1] https://svgwg.org/svg2-draft/single-page.html#render-EstablishingStackingContex
[2] https://drafts.fxtf.org/compositing-2/#csscompositingrules_CSS

Bug: 1102803, 1101002
Change-Id: Ia5baceccab0be09eeec5e4682f16247a2881509b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2284631
Commit-Queue: Philip Rogers <pdr@chromium.org>
Reviewed-by: default avatarFredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#785765}
parent 3bf6be55
...@@ -256,6 +256,9 @@ crbug.com/1045668 external/wpt/css/css-sizing/aspect-ratio/abspos-008.tentative. ...@@ -256,6 +256,9 @@ crbug.com/1045668 external/wpt/css/css-sizing/aspect-ratio/abspos-008.tentative.
# It is not clear if this test is correct. https://github.com/w3c/csswg-drafts/issues/5151 # It is not clear if this test is correct. https://github.com/w3c/csswg-drafts/issues/5151
crbug.com/1045668 external/wpt/css/css-sizing/aspect-ratio/abspos-004.tentative.html [ Failure ] crbug.com/1045668 external/wpt/css/css-sizing/aspect-ratio/abspos-004.tentative.html [ Failure ]
# Incorrect blending with foreignObject and svg descendants.
crbug.com/1102803 external/wpt/svg/extensibility/foreignObject/isolation-with-svg.html [ Failure ]
# Display locking failures # Display locking failures
crbug.com/849459 fragmentation/repeating-thead-under-repeating-thead.html [ Failure ] crbug.com/849459 fragmentation/repeating-thead-under-repeating-thead.html [ Failure ]
......
<!DOCTYPE HTML>
<html>
<body>
<p>foreignObject should isolate. The test passes if you see a dark blue square.</p>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="200px" height="200px">
<rect x="0" y="0" width="200" height="200" style="fill: lime"/>
</svg>
</body>
</html>
<!DOCTYPE HTML>
<html>
<body>
<p>foreignObject should isolate. The test passes if you see a dark blue square.</p>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="200px" height="200px">
<rect x="0" y="0" width="200" height="200" style="fill: yellow"/>
<foreignObject width="200" height="200">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="200px" height="200px">
<rect x="0" y="0" width="200" height="200" style="fill: red; mix-blend-mode: difference"/>
</svg>
</foreignObject>
</svg>
</body>
</html>
<!DOCTYPE html>
<div style="width: 200px; height: 200px; background: lime; mix-blend-mode: difference"></div>
\ No newline at end of file
<!DOCTYPE html>
<title>foreignObject should create an isolated group for html descendants</title>
<meta name="assert" content="ForeignObject creates a stacking context which is an isolated group, so mix-blend-mode should not be affected by content outside the isolated group." />
<link rel="help" href="https://svgwg.org/svg2-draft/single-page.html#render-EstablishingStackingContex" />
<link rel="help" href="https://drafts.fxtf.org/compositing-2/#csscompositingrules_CSS" />
<link rel="author" title="Philip Rogers" href="mailto:pdr@chromium.org" />
<link rel="match" href="isolation-with-html-ref.html" />
<svg xmlns="http://www.w3.org/2000/svg" width="200px" height="200px">
<rect x="0" y="0" width="200" height="200" style="fill: yellow" />
<foreignObject width="200" height="200">
<div style="width: 200px; height: 200px; background: lime; mix-blend-mode: difference"></div>
</foreignObject>
</svg>
<!DOCTYPE html>
<div style="width: 200px; height: 200px; background: lime; mix-blend-mode: difference"></div>
\ No newline at end of file
<!DOCTYPE html>
<title>foreignObject should create an isolated group for svg descendants</title>
<meta name="assert" content="ForeignObject creates a stacking context which is an isolated group, so mix-blend-mode should not be affected by content outside the isolated group." />
<link rel="help" href="https://svgwg.org/svg2-draft/single-page.html#render-EstablishingStackingContex" />
<link rel="help" href="https://drafts.fxtf.org/compositing-2/#csscompositingrules_CSS" />
<link rel="author" title="Philip Rogers" href="mailto:pdr@chromium.org" />
<link rel="match" href="isolation-with-svg-ref.html" />
<svg xmlns="http://www.w3.org/2000/svg" width="200px" height="200px">
<rect x="0" y="0" width="200" height="200" style="fill: yellow" />
<foreignObject width="200" height="200">
<svg xmlns="http://www.w3.org/2000/svg" width="200px" height="200px">
<rect x="0" y="0" width="200" height="200" style="fill: lime; mix-blend-mode: difference" />
</svg>
</foreignObject>
</svg>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment