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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/dir-auto-insert-text-invalidation.html

Issue 1817143002: Use LocalStyleChange for text direction changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/dir-auto-insert-text-invalidation-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/dom/dir-auto-insert-text-invalidation.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/dir-auto-insert-text-invalidation.html b/third_party/WebKit/LayoutTests/fast/dom/dir-auto-insert-text-invalidation.html
new file mode 100644
index 0000000000000000000000000000000000000000..0447021fd445cb2364fcbf4c9d728ec9a636e8bd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/dom/dir-auto-insert-text-invalidation.html
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<script src="../../resources/js-test.js"></script>
+<div>
+ <div id="outerAuto" dir="auto">
+ <div id="textInsertionPoint"></div>
+ <div id="affectedByAuto"></div>
+ <div id="explicitLTR" dir="ltr">
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+ </div>
+ </div>
+</div>
+<script>
+ description("Style invalidation when inserting RTL text descendant of dir=auto");
+
+ shouldBeEqualToString("getComputedStyle(outerAuto).direction", "ltr");
+ shouldBeEqualToString("getComputedStyle(textInsertionPoint).direction", "ltr");
+ shouldBeEqualToString("getComputedStyle(affectedByAuto).direction", "ltr");
+ shouldBeEqualToString("getComputedStyle(explicitLTR).direction", "ltr");
+
+ document.body.offsetTop; // force style and layout clean.
+
+ textInsertionPoint.innerHTML = "&#x604;&#x644;";
+
+ if (window.internals)
+ shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "4");
+
+ shouldBeEqualToString("getComputedStyle(outerAuto).direction", "rtl");
+ shouldBeEqualToString("getComputedStyle(textInsertionPoint).direction", "rtl");
+ shouldBeEqualToString("getComputedStyle(affectedByAuto).direction", "rtl");
+ shouldBeEqualToString("getComputedStyle(explicitLTR).direction", "ltr");
+
+ debug("\nForcing everything back to LTR with dir attribute:\n");
+
+ document.body.offsetTop; // force style and layout clean.
+
+ textInsertionPoint.dir = "ltr";
+
+ if (window.internals)
+ shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "4");
+
+ shouldBeEqualToString("getComputedStyle(outerAuto).direction", "ltr");
+ shouldBeEqualToString("getComputedStyle(textInsertionPoint).direction", "ltr");
+ shouldBeEqualToString("getComputedStyle(affectedByAuto).direction", "ltr");
+ shouldBeEqualToString("getComputedStyle(explicitLTR).direction", "ltr");
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/dir-auto-insert-text-invalidation-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698