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

Unified Diff: LayoutTests/fast/css/collapsed-whitespace-reattach-in-style-recalc.html

Issue 58373002: Whitespace only text nodes need to be reattached when their siblings are reattached (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated js-test include Created 7 years, 1 month 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/css/collapsed-whitespace-reattach-in-style-recalc.html
diff --git a/LayoutTests/fast/css/collapsed-whitespace-reattach-in-style-recalc.html b/LayoutTests/fast/css/collapsed-whitespace-reattach-in-style-recalc.html
new file mode 100644
index 0000000000000000000000000000000000000000..6de1508e3223cb683fb664488dfb49d6e7622b1a
--- /dev/null
+++ b/LayoutTests/fast/css/collapsed-whitespace-reattach-in-style-recalc.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+div {
+ text-align: justify;
+}
+
+.inlineBlock {
+ display: inline-block;
+}
+
+span {
+ display: block;
+}
+
+div:after {
+ content: '';
+ display: inline-block;
+ width: 100%;
+}
+
+</style>
+<script src="../../resources/js-test.js"></script>
+<script>
+description('This test ensures that we properly reattach collapsed whitespace when sibling style changes require. Test passes if the spans below are justified across the page.');
+onload = function() {
+ spans = document.getElementsByTagName("span");
+ for (var i = spans.length - 1; i >= 0; i--)
+ spans[i].classList.add('inlineBlock');
+ shouldBeGreaterThanOrEqual('spans[spans.length - 1].offsetLeft', "400");
+}
+</script>
+</head>
+<body>
+<div id="container">
+ <span>Item 1</span>
+ <span>Item 2</span>
+ <span>Item 3</span>
+</div>

Powered by Google App Engine
This is Rietveld 408576698