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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script>
3 <div>
4 <div id="outerAuto" dir="auto">
5 <div id="textInsertionPoint"></div>
6 <div id="affectedByAuto"></div>
7 <div id="explicitLTR" dir="ltr">
8 <div></div>
9 <div></div>
10 <div></div>
11 <div></div>
12 </div>
13 </div>
14 </div>
15 <script>
16 description("Style invalidation when inserting RTL text descendant of dir=au to");
17
18 shouldBeEqualToString("getComputedStyle(outerAuto).direction", "ltr");
19 shouldBeEqualToString("getComputedStyle(textInsertionPoint).direction", "ltr ");
20 shouldBeEqualToString("getComputedStyle(affectedByAuto).direction", "ltr");
21 shouldBeEqualToString("getComputedStyle(explicitLTR).direction", "ltr");
22
23 document.body.offsetTop; // force style and layout clean.
24
25 textInsertionPoint.innerHTML = "&#x604;&#x644;";
26
27 if (window.internals)
28 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "4");
29
30 shouldBeEqualToString("getComputedStyle(outerAuto).direction", "rtl");
31 shouldBeEqualToString("getComputedStyle(textInsertionPoint).direction", "rtl ");
32 shouldBeEqualToString("getComputedStyle(affectedByAuto).direction", "rtl");
33 shouldBeEqualToString("getComputedStyle(explicitLTR).direction", "ltr");
34
35 debug("\nForcing everything back to LTR with dir attribute:\n");
36
37 document.body.offsetTop; // force style and layout clean.
38
39 textInsertionPoint.dir = "ltr";
40
41 if (window.internals)
42 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "4");
43
44 shouldBeEqualToString("getComputedStyle(outerAuto).direction", "ltr");
45 shouldBeEqualToString("getComputedStyle(textInsertionPoint).direction", "ltr ");
46 shouldBeEqualToString("getComputedStyle(affectedByAuto).direction", "ltr");
47 shouldBeEqualToString("getComputedStyle(explicitLTR).direction", "ltr");
48 </script>
OLDNEW
« 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