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

Unified Diff: LayoutTests/svg/as-image/svg-as-image-object-fit-cover.html

Issue 1019813002: Use viewBox for SVG image as intrinsic size when all else fails (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated test expectations and added TODOs Created 5 years, 9 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: LayoutTests/svg/as-image/svg-as-image-object-fit-cover.html
diff --git a/LayoutTests/svg/as-image/svg-as-image-object-fit-cover.html b/LayoutTests/svg/as-image/svg-as-image-object-fit-cover.html
new file mode 100644
index 0000000000000000000000000000000000000000..1a7dee3d1fa8adb0645f0740ae01ede21fe0d243
--- /dev/null
+++ b/LayoutTests/svg/as-image/svg-as-image-object-fit-cover.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<title>
+ Test for 'object-fit: cover' on SVG image w/ aspect ratio but no
+ intrinsic size
+</title>
+<style type="text/css">
+ img {
+ object-fit: cover;
+ background: red;
+ width: 160px;
+ height: 100px;
+ }
+</style>
+<img src="data:image/svg+xml,
+ <svg xmlns='http://www.w3.org/2000/svg'
+ viewBox='0 0 16 16'>
+ <rect stroke-width='2' stroke='black'
+ x='1' y='1' width='14' height='14' fill='lime'/>
+ </svg>">

Powered by Google App Engine
This is Rietveld 408576698