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

Unified Diff: LayoutTests/fast/dom/HTMLObjectElement/data-attr-reattach-recalc.html

Issue 521603002: Do not use SubtreeStyleChange for reattachment of plugin renderers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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/dom/HTMLObjectElement/data-attr-reattach-recalc.html
diff --git a/LayoutTests/fast/dom/HTMLObjectElement/data-attr-reattach-recalc.html b/LayoutTests/fast/dom/HTMLObjectElement/data-attr-reattach-recalc.html
new file mode 100644
index 0000000000000000000000000000000000000000..7b6d0defffa8faaf48c895c78518f5169c804e2b
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLObjectElement/data-attr-reattach-recalc.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<script src="../../../resources/js-test.js"></script>
+<style>
+object + div { color: green; }
esprehn 2014/09/19 04:15:07 Have we seen this in the wild?
+</style>
+<object id="obj" data="data:text/html,FAIL"><div>Fallback</div></object>
+<div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+</div>
+<script>
+description("Changing data attribute on <object> should not cause sibling subtree recalc.");
+
+if (window.testRunner)
+ testRunner.waitUntilDone();
+
+onload = function() {
+
+ obj.offsetTop; // Force recalc
+
+ obj.setAttribute("data", "data:text/html,PASS");
+
+ if (window.internals)
+ shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1");
+
+ if (window.testRunner)
+ testRunner.notifyDone();
+};
+</script>

Powered by Google App Engine
This is Rietveld 408576698