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

Unified Diff: LayoutTests/fast/images/img-dimensions-styled.html

Issue 1299563002: HTMLImageElement width/height should updateLayout first. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Check if we're in the document. Created 5 years, 4 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/fast/images/img-dimensions-styled.html
diff --git a/LayoutTests/fast/images/img-dimensions-styled.html b/LayoutTests/fast/images/img-dimensions-styled.html
new file mode 100644
index 0000000000000000000000000000000000000000..be82e1987405e8aef57b5265d14d8fb64d52c5a3
--- /dev/null
+++ b/LayoutTests/fast/images/img-dimensions-styled.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+
+<script src="../../resources/js-test.js"></script>
+
+<style>
+ img {
+ width: 200px;
+ height: 200px;
+ }
+</style>
+
+<img id="image" src="resources/test-load.jpg" width="100" height="100">
+
+<script>
+ description("Should used styled image dimensions if available.");
+ var image = document.getElementById("image");
+ shouldBe("image.width", "200");
+ shouldBe("image.height", "200");
+ var rect = image.getBoundingClientRect();
+ shouldBe("rect.width", "200");
+ shouldBe("rect.height", "200");
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/images/img-dimensions-styled-expected.txt » ('j') | Source/core/html/HTMLImageElement.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698