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

Unified Diff: LayoutTests/fast/text/international/bdo-bidi-width-expected.html

Issue 197883020: Fix handling of bidirectional override (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | « LayoutTests/fast/text/international/bdo-bidi-width.html ('k') | Source/core/rendering/RenderText.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/text/international/bdo-bidi-width-expected.html
diff --git a/LayoutTests/fast/text/international/bdo-bidi-width-expected.html b/LayoutTests/fast/text/international/bdo-bidi-width-expected.html
new file mode 100644
index 0000000000000000000000000000000000000000..5eacfd7b85fc907562016367a4be460b24dc49bb
--- /dev/null
+++ b/LayoutTests/fast/text/international/bdo-bidi-width-expected.html
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <style>
+ #test {
+ background: silver;
+ padding: 15px;
+ width: 30ex;
+ }
+ #test > div {
+ font-size: 3em;
+ background: white;
+ display: inline-block;
+ }
+ .highlight {
+ position: absolute;
+ border: 10px solid silver;
+ }
+
+ </style>
+ </head>
+ <body>
+ <section id="test">
+ <div>ااااا<bdo>کبند</bdo></div><br><br>
+ <div><bdo>کبند</bdo></div><br><br>
+ <div><bdo>کبند کبند</bdo></div><br><br>
+ <div>ااااا<bdo dir="ltr">کبند</bdo></div><br><br>
+ <div>ااااا<bdo dir="rtl">کبند</bdo></div><br><br>
+ <div>ااااا<bdo dir="auto">کبند</bdo></div>
+ </section>
+ <section>
+ <p>
+ Tests handling of <code>bdo</code> tags. The white box
+ for each line above should fully contain the text and
+ characters should not be painted on top of other
+ characters.
+ </p>
+ </section>
+ <script>
+ function createHighlightRect(rect)
+ {
+ var el = document.createElement('div');
+ el.className = 'highlight';
+ el.style.left = (rect.left - 10) + 'px';
+ el.style.top = (rect.top - 10) + 'px';
+ el.style.width = (rect.width + 5) + 'px';
+ el.style.height = (rect.height + 5) + 'px';
+ return el;
+ }
+ var testElements = document.getElementById('test').getElementsByTagName('div');
+ for (var el, i = 0; el = testElements[i]; i++) {
+ var rect = el.getBoundingClientRect();
+ document.body.appendChild(createHighlightRect(rect));
+ }
+ </script>
+ </body>
+</body>
« no previous file with comments | « LayoutTests/fast/text/international/bdo-bidi-width.html ('k') | Source/core/rendering/RenderText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698