[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

xji at chromium.org xji at chromium.org
Sun Feb 20 23:31:07 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit 2ce4c29845dc54b9a49de2e859bd40f3873b9f8d
Author: xji at chromium.org <xji at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Jan 21 02:09:48 2011 +0000

    2011-01-20  Xiaomei Ji  <xji at chromium.org>
    
            Reviewed by Dan Bernstein.
    
            Fix regression(r71566): PDF in RTL block might messes up text directionality.
            https://bugs.webkit.org/show_bug.cgi?id=52776
    
            Test: fast/dom/52776.html
    
            * platform/text/BidiResolver.h:
            (WebCore::::checkDirectionInLowerRaiseEmbeddingLevel):
            (WebCore::::lowerExplicitEmbeddingLevel):
            (WebCore::::raiseExplicitEmbeddingLevel):
            (WebCore::::createBidiRunsForLine):
    2011-01-20  Xiaomei Ji  <xji at chromium.org>
    
            Reviewed by Dan Bernstein.
    
            Fix regression(r71566): PDF in RTL block might messes up text directionality.
            https://bugs.webkit.org/show_bug.cgi?id=52776
    
            * fast/dom/52776.html: Added.
            * platform/mac/fast/dom/52776-expected.checksum: Added.
            * platform/mac/fast/dom/52776-expected.png: Added.
            * platform/mac/fast/dom/52776-expected.txt: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76319 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index b2284dd..6a1832a 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2011-01-20  Xiaomei Ji  <xji at chromium.org>
+
+        Reviewed by Dan Bernstein.
+
+        Fix regression(r71566): PDF in RTL block might messes up text directionality.
+        https://bugs.webkit.org/show_bug.cgi?id=52776
+
+        * fast/dom/52776.html: Added.
+        * platform/mac/fast/dom/52776-expected.checksum: Added.
+        * platform/mac/fast/dom/52776-expected.png: Added.
+        * platform/mac/fast/dom/52776-expected.txt: Added.
+
 2011-01-20  Jenn Braithwaite  <jennb at chromium.org>
 
         Reviewed by Dmitry Titov.
diff --git a/LayoutTests/fast/dom/52776.html b/LayoutTests/fast/dom/52776.html
new file mode 100644
index 0000000..0b05dfc
--- /dev/null
+++ b/LayoutTests/fast/dom/52776.html
@@ -0,0 +1,120 @@
+<!DOCTYPE html>
+<html> 
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=utf-8">
+</head>
+<body>
+<div dir=rtl>
+<p>Right To Left
+
+<p>Well-formed pair of unicode bidi control characters.
+<div>&#x202b;b!&#x202c;</div>
+<div>&#x202a;b!&#x202c;</div>
+
+<p>Unpaired unicode bidi control characters.
+<div>&#x202b;b!</div>
+<div>&#x202a;b!</div>
+
+<p>Empty content inside unicode bidi control characters.
+<div>&#x202c;&#x202c;</div>
+<div>&#x202a;&#x202a;</div>
+<div>&#x202b;&#x202b;</div>
+
+<p>String inside unicode bidi control characters.
+<div contenteditable id="test">&#x202c;abc&#x202c;</div>
+<div>&#x202a;abc&#x202a;</div>
+<div>&#x202b;abc&#x202b;</div>
+
+<p>String around unicode bidi control characters.
+<div>def&#x202c;abc&#x202c;</div>
+<div>&#x202c;abc&#x202c;def</div>
+<div>xyz&#x202c;abc&#x202c;def</div>
+
+<p>Nested unicode bidi control characters.
+<div>&#x202a;&#x202a;b!&#x202c;</div>
+<div>&#x202b;&#x202b;b!&#x202c;</div>
+<div>&#x202c;&#x202c;b!&#x202c;</div>
+<div>&#x202c;1&#x202b;c!&#x202c;</div>
+
+<p>Start with different directionality characters.
+<div>12&#x202c;&#x202a;1&#x202c;&#x202b</div>
+<div>12&#x202c;&#x202a;</div>
+<div>&#x660;&#x661;&#x202c;&#x202a;</div>
+<div>&#x683;&#x684;&#x202c;&#x202a;</div>
+<div>&#x1;&#x202c;&#x202a;</div>
+<div>abc&#x202c;&#x202a;</div>
+<div>&#x5d0;&#x5d1;&#x202c;&#x202a;</div>
+</div>
+
+<div>
+<p>Left To Right
+
+<p>Well-formed pair of unicode bidi control characters.
+<div>&#x202b;b!&#x202c;</div>
+<div>&#x202a;b!&#x202c;</div>
+
+<p>Unpaired unicode bidi control characters.
+<div>&#x202b;b!</div>
+<div>&#x202a;b!</div>
+
+<p>Empty content inside unicode bidi control characters.
+<div>&#x202c;&#x202c;</div>
+<div>&#x202a;&#x202a;</div>
+<div>&#x202b;&#x202b;</div>
+
+<p>String inside unicode bidi control characters.
+<div>&#x202c;abc&#x202c;</div>
+<div>&#x202a;abc&#x202a;</div>
+<div>&#x202b;abc&#x202b;</div>
+
+<p>String around unicode bidi control characters.
+<div>def&#x202c;abc&#x202c;</div>
+<div>&#x202c;abc&#x202c;def</div>
+<div>xyz&#x202c;abc&#x202c;def</div>
+
+<p>Nested unicode bidi control characters.
+<div>&#x202a;&#x202a;b!&#x202c;</div>
+<div>&#x202b;&#x202b;b!&#x202c;</div>
+<div>&#x202c;&#x202c;b!&#x202c;</div>
+<div>&#x202c;1&#x202b;c!&#x202c;</div>
+
+<p>Start with different directionality characters.
+<div>12&#x202c;&#x202a;1&#x202c;&#x202b</div>
+<div>12&#x202c;&#x202a;</div>
+<div>&#x660;&#x661;&#x202c;&#x202a;</div>
+<div>&#x683;&#x684;&#x202c;&#x202a;</div>
+<div>&#x1;&#x202c;&#x202a;</div>
+<div>abc&#x202c;&#x202a;</div>
+<div>&#x5d0;&#x5d1;&#x202c;&#x202a;</div>
+</div>
+<ul id="console" dir=ltr></ul>
+
+
+<script> 
+ 
+    function log(str)
+    {
+        var li = document.createElement("li");
+        li.appendChild(document.createTextNode(str));
+        var console = document.getElementById("console");
+        console.appendChild(li);
+    }
+    
+    function assertEqual(message, actual, expected)
+    {
+        if (actual != expected)
+            log("\n" + message + ": Failure, actual: " + actual + "; expected: " + expected);
+        else
+            log("\n" + message + ": Success");
+    }
+            
+    var test = document.getElementById('test');
+    var sel = getSelection();
+    sel.setPosition(test,0);
+    sel.modify("move", "right", "lineBoundary");
+    sel.modify("move", "left", "character");
+    sel.modify("extend", "left", "character");
+    assertEqual("test id=test: the right-most character of rendering result of <PDF>abc<PDF> in RTL block should be c", sel.toString(), 'c');
+</script> 
+</body> 
+</html> 
diff --git a/LayoutTests/platform/mac/fast/dom/52776-expected.checksum b/LayoutTests/platform/mac/fast/dom/52776-expected.checksum
new file mode 100644
index 0000000..e274c9e
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/dom/52776-expected.checksum
@@ -0,0 +1 @@
+f402d60286ecf6584ab7e68bbb2ae3b9
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/dom/52776-expected.png b/LayoutTests/platform/mac/fast/dom/52776-expected.png
new file mode 100644
index 0000000..df90f2f
Binary files /dev/null and b/LayoutTests/platform/mac/fast/dom/52776-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/dom/52776-expected.txt b/LayoutTests/platform/mac/fast/dom/52776-expected.txt
new file mode 100644
index 0000000..0982094
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/dom/52776-expected.txt
@@ -0,0 +1,272 @@
+layer at (0,0) size 785x1724
+  RenderView at (0,0) size 785x600
+layer at (0,0) size 785x1724
+  RenderBlock {HTML} at (0,0) size 785x1724
+    RenderBody {BODY} at (8,16) size 769x1692
+      RenderBlock {DIV} at (0,0) size 769x821
+        RenderBlock {P} at (0,0) size 769x18
+          RenderText {#text} at (682,0) size 87x18
+            text run at (682,0) width 87: "Right To Left"
+        RenderBlock {P} at (0,34) size 769x18
+          RenderText {#text} at (443,0) size 326x18
+            text run at (443,0) width 4 RTL: "."
+            text run at (447,0) width 322: "Well-formed pair of unicode bidi control characters"
+        RenderBlock {DIV} at (0,68) size 769x18
+          RenderText {#text} at (756,0) size 13x18
+            text run at (756,0) width 0 RTL: "\x{202C}"
+            text run at (756,0) width 5 RTL: "!"
+            text run at (761,0) width 8: "\x{202B}b"
+        RenderBlock {DIV} at (0,86) size 769x18
+          RenderText {#text} at (756,0) size 13x18
+            text run at (756,0) width 0 RTL: "\x{202C}"
+            text run at (756,0) width 13: "\x{202A}b!"
+        RenderBlock {P} at (0,120) size 769x18
+          RenderText {#text} at (509,0) size 260x18
+            text run at (509,0) width 4 RTL: "."
+            text run at (513,0) width 256: "Unpaired unicode bidi control characters"
+        RenderBlock {DIV} at (0,154) size 769x18
+          RenderText {#text} at (756,0) size 13x18
+            text run at (756,0) width 5 RTL: "!"
+            text run at (761,0) width 8: "\x{202B}b"
+        RenderBlock {DIV} at (0,172) size 769x18
+          RenderText {#text} at (756,0) size 13x18
+            text run at (756,0) width 13: "\x{202A}b!"
+        RenderBlock {P} at (0,206) size 769x18
+          RenderText {#text} at (435,0) size 334x18
+            text run at (435,0) width 4 RTL: "."
+            text run at (439,0) width 330: "Empty content inside unicode bidi control characters"
+        RenderBlock {DIV} at (0,240) size 769x18
+          RenderText {#text} at (769,0) size 0x18
+            text run at (769,0) width 0 RTL: "\x{202C}\x{202C}"
+        RenderBlock {DIV} at (0,258) size 769x18
+          RenderText {#text} at (769,0) size 0x18
+            text run at (769,0) width 0: "\x{202A}"
+            text run at (769,0) width 0 RTL: "\x{202A}"
+        RenderBlock {DIV} at (0,276) size 769x18
+          RenderText {#text} at (769,0) size 0x18
+            text run at (769,0) width 0 RTL: "\x{202B}"
+            text run at (769,0) width 0 RTL: "\x{202B}"
+        RenderBlock {P} at (0,310) size 769x18
+          RenderText {#text} at (489,0) size 280x18
+            text run at (489,0) width 4 RTL: "."
+            text run at (493,0) width 276: "String inside unicode bidi control characters"
+        RenderBlock {DIV} at (0,344) size 769x18
+          RenderText {#text} at (747,0) size 22x18
+            text run at (747,0) width 0 RTL: "\x{202C}"
+            text run at (747,0) width 22: "\x{202C}abc"
+        RenderBlock {DIV} at (0,362) size 769x18
+          RenderText {#text} at (747,0) size 22x18
+            text run at (747,0) width 22: "\x{202A}abc"
+            text run at (769,0) width 0 RTL: "\x{202A}"
+        RenderBlock {DIV} at (0,380) size 769x18
+          RenderText {#text} at (747,0) size 22x18
+            text run at (747,0) width 22: "\x{202B}abc"
+            text run at (769,0) width 0 RTL: "\x{202B}"
+        RenderBlock {P} at (0,414) size 769x18
+          RenderText {#text} at (482,0) size 287x18
+            text run at (482,0) width 4 RTL: "."
+            text run at (486,0) width 283: "String around unicode bidi control characters"
+        RenderBlock {DIV} at (0,448) size 769x18
+          RenderText {#text} at (727,0) size 42x18
+            text run at (727,0) width 0 RTL: "\x{202C}"
+            text run at (727,0) width 42: "def\x{202C}abc"
+        RenderBlock {DIV} at (0,466) size 769x18
+          RenderText {#text} at (727,0) size 42x18
+            text run at (727,0) width 42: "\x{202C}abc\x{202C}def"
+        RenderBlock {DIV} at (0,484) size 769x18
+          RenderText {#text} at (704,0) size 65x18
+            text run at (704,0) width 65: "xyz\x{202C}abc\x{202C}def"
+        RenderBlock {P} at (0,518) size 769x18
+          RenderText {#text} at (524,0) size 245x18
+            text run at (524,0) width 4 RTL: "."
+            text run at (528,0) width 241: "Nested unicode bidi control characters"
+        RenderBlock {DIV} at (0,552) size 769x18
+          RenderText {#text} at (756,0) size 13x18
+            text run at (756,0) width 0: "\x{202A}"
+            text run at (756,0) width 0 RTL: "\x{202C}"
+            text run at (756,0) width 13: "\x{202A}b!"
+        RenderBlock {DIV} at (0,570) size 769x18
+          RenderText {#text} at (756,0) size 13x18
+            text run at (756,0) width 0 RTL: "\x{202C}"
+            text run at (756,0) width 5 RTL: "!"
+            text run at (761,0) width 8: "\x{202B}b"
+            text run at (769,0) width 0 RTL: "\x{202B}"
+        RenderBlock {DIV} at (0,588) size 769x18
+          RenderText {#text} at (756,0) size 13x18
+            text run at (756,0) width 5 RTL: "!\x{202C}"
+            text run at (761,0) width 8: "\x{202C}\x{202C}b"
+        RenderBlock {DIV} at (0,606) size 769x18
+          RenderText {#text} at (749,0) size 20x18
+            text run at (749,0) width 0 RTL: "\x{202C}"
+            text run at (749,0) width 8: "1"
+            text run at (757,0) width 5 RTL: "!"
+            text run at (762,0) width 7: "\x{202B}c"
+            text run at (769,0) width 0 RTL: "\x{202C}"
+        RenderBlock {P} at (0,640) size 769x18
+          RenderText {#text} at (494,0) size 275x18
+            text run at (494,0) width 4 RTL: "."
+            text run at (498,0) width 271: "Start with different directionality characters"
+        RenderBlock {DIV} at (0,674) size 769x18
+          RenderText {#text} at (745,0) size 24x18
+            text run at (745,0) width 0 RTL: "\x{202B}"
+            text run at (745,0) width 0 RTL: "\x{202C}"
+            text run at (745,0) width 8: "\x{202A}1"
+            text run at (753,0) width 0 RTL: "\x{202C}"
+            text run at (753,0) width 16: "12"
+        RenderBlock {DIV} at (0,692) size 769x18
+          RenderText {#text} at (753,0) size 16x18
+            text run at (753,0) width 0 RTL: "\x{202A}"
+            text run at (753,0) width 0 RTL: "\x{202C}"
+            text run at (753,0) width 16: "12"
+        RenderBlock {DIV} at (0,710) size 769x28
+          RenderText {#text} at (753,2) size 16x18
+            text run at (753,2) width 0 RTL: "\x{202A}"
+            text run at (753,2) width 0 RTL: "\x{202C}"
+            text run at (753,2) width 16: "\x{660}\x{661}"
+        RenderBlock {DIV} at (0,738) size 769x28
+          RenderText {#text} at (751,2) size 18x18
+            text run at (751,2) width 0 RTL: "\x{202A}"
+            text run at (751,2) width 18 RTL: "\x{683}\x{684}\x{202C}"
+        RenderBlock {DIV} at (0,766) size 769x18
+          RenderText {#text} at (769,0) size 0x18
+            text run at (769,0) width 0 RTL: "\x{202A}"
+            text run at (769,0) width 0 RTL: "\x{1}\x{202C}"
+        RenderBlock {DIV} at (0,784) size 769x18
+          RenderText {#text} at (747,0) size 22x18
+            text run at (747,0) width 22: "abc\x{202C}"
+            text run at (769,0) width 0 RTL: "\x{202A}"
+        RenderBlock {DIV} at (0,802) size 769x19
+          RenderText {#text} at (749,1) size 20x18
+            text run at (749,1) width 0 RTL: "\x{202A}"
+            text run at (749,1) width 20 RTL: "\x{5D0}\x{5D1}\x{202C}"
+      RenderBlock {DIV} at (0,837) size 769x821
+        RenderBlock {P} at (0,0) size 769x18
+          RenderText {#text} at (0,0) size 87x18
+            text run at (0,0) width 87: "Left To Right"
+        RenderBlock {P} at (0,34) size 769x18
+          RenderText {#text} at (0,0) size 326x18
+            text run at (0,0) width 326: "Well-formed pair of unicode bidi control characters."
+        RenderBlock {DIV} at (0,68) size 769x18
+          RenderText {#text} at (0,0) size 13x18
+            text run at (0,0) width 5 RTL: "!"
+            text run at (5,0) width 8: "\x{202B}b"
+            text run at (13,0) width 0: "\x{202C}"
+        RenderBlock {DIV} at (0,86) size 769x18
+          RenderText {#text} at (0,0) size 13x18
+            text run at (0,0) width 13: "\x{202A}b!"
+            text run at (13,0) width 0: "\x{202C}"
+        RenderBlock {P} at (0,120) size 769x18
+          RenderText {#text} at (0,0) size 260x18
+            text run at (0,0) width 260: "Unpaired unicode bidi control characters."
+        RenderBlock {DIV} at (0,154) size 769x18
+          RenderText {#text} at (0,0) size 13x18
+            text run at (0,0) width 13: "\x{202B}b!"
+        RenderBlock {DIV} at (0,172) size 769x18
+          RenderText {#text} at (0,0) size 13x18
+            text run at (0,0) width 13: "\x{202A}b!"
+        RenderBlock {P} at (0,206) size 769x18
+          RenderText {#text} at (0,0) size 334x18
+            text run at (0,0) width 334: "Empty content inside unicode bidi control characters."
+        RenderBlock {DIV} at (0,240) size 769x18
+          RenderText {#text} at (0,0) size 0x18
+            text run at (0,0) width 0: "\x{202C}\x{202C}"
+        RenderBlock {DIV} at (0,258) size 769x18
+          RenderText {#text} at (0,0) size 0x18
+            text run at (0,0) width 0: "\x{202A}"
+            text run at (0,0) width 0: "\x{202A}"
+        RenderBlock {DIV} at (0,276) size 769x18
+          RenderText {#text} at (0,0) size 0x18
+            text run at (0,0) width 0: "\x{202B}"
+            text run at (0,0) width 0 RTL: "\x{202B}"
+        RenderBlock {P} at (0,310) size 769x18
+          RenderText {#text} at (0,0) size 280x18
+            text run at (0,0) width 280: "String inside unicode bidi control characters."
+        RenderBlock {DIV} at (0,344) size 769x18
+          RenderText {#text} at (0,0) size 22x18
+            text run at (0,0) width 22: "\x{202C}abc\x{202C}"
+        RenderBlock {DIV} at (0,362) size 769x18
+          RenderText {#text} at (0,0) size 22x18
+            text run at (0,0) width 22: "\x{202A}abc"
+            text run at (22,0) width 0: "\x{202A}"
+        RenderBlock {DIV} at (0,380) size 769x18
+          RenderText {#text} at (0,0) size 22x18
+            text run at (0,0) width 22: "\x{202B}abc"
+            text run at (22,0) width 0: "\x{202B}"
+        RenderBlock {P} at (0,414) size 769x18
+          RenderText {#text} at (0,0) size 287x18
+            text run at (0,0) width 287: "String around unicode bidi control characters."
+        RenderBlock {DIV} at (0,448) size 769x18
+          RenderText {#text} at (0,0) size 42x18
+            text run at (0,0) width 42: "def\x{202C}abc\x{202C}"
+        RenderBlock {DIV} at (0,466) size 769x18
+          RenderText {#text} at (0,0) size 42x18
+            text run at (0,0) width 42: "\x{202C}abc\x{202C}def"
+        RenderBlock {DIV} at (0,484) size 769x18
+          RenderText {#text} at (0,0) size 65x18
+            text run at (0,0) width 65: "xyz\x{202C}abc\x{202C}def"
+        RenderBlock {P} at (0,518) size 769x18
+          RenderText {#text} at (0,0) size 245x18
+            text run at (0,0) width 245: "Nested unicode bidi control characters."
+        RenderBlock {DIV} at (0,552) size 769x18
+          RenderText {#text} at (0,0) size 13x18
+            text run at (0,0) width 0: "\x{202A}"
+            text run at (0,0) width 13: "\x{202A}b!"
+            text run at (13,0) width 0: "\x{202C}"
+        RenderBlock {DIV} at (0,570) size 769x18
+          RenderText {#text} at (0,0) size 13x18
+            text run at (0,0) width 5 RTL: "!"
+            text run at (5,0) width 8: "\x{202B}b"
+            text run at (13,0) width 0: "\x{202C}"
+            text run at (13,0) width 0 RTL: "\x{202B}"
+        RenderBlock {DIV} at (0,588) size 769x18
+          RenderText {#text} at (0,0) size 13x18
+            text run at (0,0) width 13: "\x{202C}\x{202C}b!\x{202C}"
+        RenderBlock {DIV} at (0,606) size 769x18
+          RenderText {#text} at (0,0) size 20x18
+            text run at (0,0) width 8: "\x{202C}1"
+            text run at (8,0) width 5 RTL: "!"
+            text run at (13,0) width 7: "\x{202B}c"
+            text run at (20,0) width 0: "\x{202C}"
+        RenderBlock {P} at (0,640) size 769x18
+          RenderText {#text} at (0,0) size 275x18
+            text run at (0,0) width 275: "Start with different directionality characters."
+        RenderBlock {DIV} at (0,674) size 769x18
+          RenderText {#text} at (0,0) size 24x18
+            text run at (0,0) width 16: "12\x{202C}"
+            text run at (16,0) width 8: "\x{202A}1"
+            text run at (24,0) width 0: "\x{202C}"
+            text run at (24,0) width 0: "\x{202B}"
+        RenderBlock {DIV} at (0,692) size 769x18
+          RenderText {#text} at (0,0) size 16x18
+            text run at (0,0) width 16: "12\x{202C}"
+            text run at (16,0) width 0: "\x{202A}"
+        RenderBlock {DIV} at (0,710) size 769x28
+          RenderText {#text} at (0,2) size 16x18
+            text run at (0,2) width 16: "\x{660}\x{661}"
+            text run at (16,2) width 0: "\x{202C}"
+            text run at (16,2) width 0: "\x{202A}"
+        RenderBlock {DIV} at (0,738) size 769x28
+          RenderText {#text} at (0,2) size 18x18
+            text run at (0,2) width 18 RTL: "\x{683}\x{684}"
+            text run at (18,2) width 0: "\x{202C}"
+            text run at (18,2) width 0: "\x{202A}"
+        RenderBlock {DIV} at (0,766) size 769x18
+          RenderText {#text} at (0,0) size 0x18
+            text run at (0,0) width 0: "\x{1}\x{202C}"
+            text run at (0,0) width 0: "\x{202A}"
+        RenderBlock {DIV} at (0,784) size 769x18
+          RenderText {#text} at (0,0) size 22x18
+            text run at (0,0) width 22: "abc\x{202C}"
+            text run at (22,0) width 0: "\x{202A}"
+        RenderBlock {DIV} at (0,802) size 769x19
+          RenderText {#text} at (0,1) size 20x18
+            text run at (0,1) width 20 RTL: "\x{5D0}\x{5D1}"
+            text run at (20,1) width 0: "\x{202C}"
+            text run at (20,1) width 0: "\x{202A}"
+      RenderBlock {UL} at (0,1674) size 769x18
+        RenderListItem {LI} at (40,0) size 729x18
+          RenderListMarker at (-17,0) size 7x18: bullet
+          RenderText {#text} at (0,0) size 705x18
+            text run at (0,0) width 705: "test id=test: the right-most character of rendering result of <PDF>abc<PDF> in RTL block should be c: Success"
+selection start: position 3 of child 0 {#text} of child 20 {DIV} of child 1 {DIV} of body
+selection end:   position 4 of child 0 {#text} of child 20 {DIV} of child 1 {DIV} of body
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index c34984c..bf4e84e 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2011-01-20  Xiaomei Ji  <xji at chromium.org>
+
+        Reviewed by Dan Bernstein.
+
+        Fix regression(r71566): PDF in RTL block might messes up text directionality.
+        https://bugs.webkit.org/show_bug.cgi?id=52776
+
+        Test: fast/dom/52776.html
+
+        * platform/text/BidiResolver.h:
+        (WebCore::::checkDirectionInLowerRaiseEmbeddingLevel):
+        (WebCore::::lowerExplicitEmbeddingLevel):
+        (WebCore::::raiseExplicitEmbeddingLevel):
+        (WebCore::::createBidiRunsForLine):
+
 2011-01-20  Beth Dakin  <bdakin at apple.com>
 
         Reviewed by Anders Carlsson.
diff --git a/Source/WebCore/platform/text/BidiResolver.h b/Source/WebCore/platform/text/BidiResolver.h
index 97b9374..8abd698 100644
--- a/Source/WebCore/platform/text/BidiResolver.h
+++ b/Source/WebCore/platform/text/BidiResolver.h
@@ -315,23 +315,13 @@ void BidiResolver<Iterator, Run>::checkDirectionInLowerRaiseEmbeddingLevel()
     using namespace WTF::Unicode;
 
     ASSERT(m_status.eor != OtherNeutral || eor.atEnd());
-    // bidi.sor ... bidi.eor ... bidi.last eor; need to append the bidi.sor-bidi.eor run or extend it through bidi.last
-    // Bidi control characters are included into BidiRun, so last direction
-    // could be one of the bidi embeddings when there are nested embeddings.
-    // For example:  "&#x202a;&#x202b;....."
-    ASSERT(m_status.last == EuropeanNumberSeparator
-        || m_status.last == EuropeanNumberTerminator
-        || m_status.last == CommonNumberSeparator
-        || m_status.last == BoundaryNeutral
-        || m_status.last == BlockSeparator
-        || m_status.last == SegmentSeparator
-        || m_status.last == WhiteSpaceNeutral
-        || m_status.last == OtherNeutral
-        || m_status.last == RightToLeftEmbedding
-        || m_status.last == LeftToRightEmbedding
-        || m_status.last == RightToLeftOverride
-        || m_status.last == LeftToRightOverride
-        || m_status.last == PopDirectionalFormat);
+    ASSERT(m_status.last != NonSpacingMark
+        && m_status.last != BoundaryNeutral
+        && m_status.last != RightToLeftEmbedding
+        && m_status.last != LeftToRightEmbedding
+        && m_status.last != RightToLeftOverride 
+        && m_status.last != LeftToRightOverride 
+        && m_status.last != PopDirectionalFormat);
     if (m_direction == OtherNeutral)
         m_direction = m_status.lastStrong == LeftToRight ? LeftToRight : RightToLeft;
 }
@@ -343,6 +333,7 @@ void BidiResolver<Iterator, Run>::lowerExplicitEmbeddingLevel(WTF::Unicode::Dire
 
     if (!emptyRun && eor != last) {
         checkDirectionInLowerRaiseEmbeddingLevel();
+        // bidi.sor ... bidi.eor ... bidi.last eor; need to append the bidi.sor-bidi.eor run or extend it through bidi.last
         if (from == LeftToRight) {
             // bidi.sor ... bidi.eor ... bidi.last L
             if (m_status.eor == EuropeanNumber) {
@@ -378,6 +369,7 @@ void BidiResolver<Iterator, Run>::raiseExplicitEmbeddingLevel(WTF::Unicode::Dire
 
     if (!emptyRun && eor != last) {
         checkDirectionInLowerRaiseEmbeddingLevel();
+        // bidi.sor ... bidi.eor ... bidi.last eor; need to append the bidi.sor-bidi.eor run or extend it through bidi.last
         if (to == LeftToRight) {
             // bidi.sor ... bidi.eor ... bidi.last L
             if (m_status.eor == EuropeanNumber) {
@@ -867,6 +859,11 @@ void BidiResolver<Iterator, Run>::createBidiRunsForLine(const Iterator& end, boo
                 break;
             case NonSpacingMark:
             case BoundaryNeutral:
+            case RightToLeftEmbedding: 
+            case LeftToRightEmbedding: 
+            case RightToLeftOverride: 
+            case LeftToRightOverride: 
+            case PopDirectionalFormat:
                 // ignore these
                 break;
             case EuropeanNumber:

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list