Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1710)

Unified Diff: third_party/WebKit/LayoutTests/paint/invalidation/svg/resize-svg-invalidate-children-fixed-size-relative-child.html

Issue 2397833005: Add a test that rects with fixed-size SVGs don't get invalidated on resize of container. (Closed)
Patch Set: none Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/paint/invalidation/svg/resize-svg-invalidate-children-fixed-size-relative-child.html
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/resize-svg-invalidate-children.html b/third_party/WebKit/LayoutTests/paint/invalidation/svg/resize-svg-invalidate-children-fixed-size-relative-child.html
similarity index 51%
copy from third_party/WebKit/LayoutTests/paint/invalidation/svg/resize-svg-invalidate-children.html
copy to third_party/WebKit/LayoutTests/paint/invalidation/svg/resize-svg-invalidate-children-fixed-size-relative-child.html
index c35a512bec2ea33cbf04143cc0e34d92c0d3a421..0cefc399c88f5c6c9056ddc5c84c83dcf8d56c01 100644
--- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/resize-svg-invalidate-children.html
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/resize-svg-invalidate-children-fixed-size-relative-child.html
@@ -3,19 +3,19 @@
<script src="../../../resources/testharnessreport.js"></script>
<script src="../resources/text-based-repaint.js"></script>
<script>
-// When resizing the div that contains SVG, the SVG root element and rect resize accordingly.
-// It's necessary to invalidate the rect in this case.
-window.expectedObjectInvalidations.push("LayoutSVGRect rect");
+// Since the SVG root element has fixed size, we should not need to
+// invalidate the rect within it.
+window.expectedObjectNonInvalidations.push("LayoutSVGRect rect");
onload = runRepaintTest;
window.outputRepaintRects = false;
function repaintTest() {
- target.style.width = '200px';
- target.style.height= '200px';
+ target.style.width = '200px';
+ target.style.height= '200px';
};
</script>
<div id="target" style="width: 100px; height: 100px">
- <svg viewBox="0 0 200 200">
- <rect x="50" y="50" width="100" height="100"/>
+ <svg viewBox="0 0 200 200" width="100" height="100">
+ <rect width="100%" height="100%"/>
</svg>
</div>

Powered by Google App Engine
This is Rietveld 408576698