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

Unified Diff: LayoutTests/fast/text-autosizing/text-removal.html

Issue 319013003: Set multiplier to 1 on blocks with no direct text children. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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/text-autosizing/text-removal.html
diff --git a/LayoutTests/fast/text-autosizing/text-removal.html b/LayoutTests/fast/text-autosizing/text-removal.html
new file mode 100644
index 0000000000000000000000000000000000000000..2efd234a8332621afaf167729f126dbfa9bdfdeb
--- /dev/null
+++ b/LayoutTests/fast/text-autosizing/text-removal.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<meta name="viewport" content="width=800">
+<script src="../../resources/js-test.js"></script>
+<script src="resources/autosizingTest.js"></script>
+<style>
+ html {
+ font-size: 16px;
+ line-height: 16px;
+ }
+ body {
+ width: 800px;
+ margin: 0;
+ overflow-y: hidden;
+ }
+</style>
+<span id="span1">
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
+ incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
+ nostrud exercitation ullamco laboris nisiut aliquip ex ea commodo consequat.
+</span>
+<span id="span2"></span>
+<script>
+ var forceLayout1 = document.body.offsetTop;
+ var span1 = document.getElementById('span1');
+ var span2 = document.getElementById('span2');
+
+ span1.removeChild(span1.firstChild);
+ var forceLayout2 = document.body.offsetTop;
+
+ shouldBeEqualToString("window.getComputedStyle(span1).lineHeight", "16px");
+ shouldBeEqualToString("window.getComputedStyle(span2).lineHeight", "16px");
+</script>

Powered by Google App Engine
This is Rietveld 408576698