Commit d4028cf1 authored by darin's avatar darin

LayoutTests:

        Reviewed by Darin.

        - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=7433
          REGRESSION (r12789): Second RTL text run on a line cannot be selected

        * fast/text/in-rendered-text-rtl-expected.checksum: Added.
        * fast/text/in-rendered-text-rtl-expected.png: Added.
        * fast/text/in-rendered-text-rtl-expected.txt: Added.
        * fast/text/in-rendered-text-rtl.html: Added.

WebCore:

        Test: fast/text/in-rendered-text-rtl.html

        Reviewed by Darin.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7433
          REGRESSION (r12789): Second RTL text run on a line cannot be selected

        * dom/dom_position.cpp:
        (WebCore::Position::inRenderedText): If the RenderText contains
        reversed text, the text boxes are not necessarily ordered by start
        position, so iterate through all of them.
        (WebCore::Position::isRenderedCharacter): Ditto.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@13045 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent f5bb3016
2006-02-27 Mitz Pettel <opendarwin.org@mitzpettel.com>
Reviewed by Darin.
- test for http://bugzilla.opendarwin.org/show_bug.cgi?id=7433
REGRESSION (r12789): Second RTL text run on a line cannot be selected
* fast/text/in-rendered-text-rtl-expected.checksum: Added.
* fast/text/in-rendered-text-rtl-expected.png: Added.
* fast/text/in-rendered-text-rtl-expected.txt: Added.
* fast/text/in-rendered-text-rtl.html: Added.
2006-02-27 David Kilzer <ddkilzer@kilzer.net>
Reviewed by Darin.
......
b38d628c0967fc2ad757f654473545ae
\ No newline at end of file
EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 3 of #text > SPAN > BODY > HTML > #document to 3 of #text > SPAN > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
layer at (0,0) size 800x600
RenderCanvas at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderBlock {P} at (0,0) size 784x36
RenderText {TEXT} at (0,0) size 53x18
text run at (0,0) width 53: "Test for "
RenderInline {I} at (0,0) size 759x36
RenderInline {A} at (0,0) size 348x18 [color=#0000EE]
RenderText {TEXT} at (53,0) size 348x18
text run at (53,0) width 348: "http://bugzilla.opendarwin.org/show_bug.cgi?id=7433"
RenderText {TEXT} at (401,0) size 759x36
text run at (401,0) width 358: " REGRESSION (r12789): Second RTL text run on a line"
text run at (0,18) width 116: "cannot be selected"
RenderText {TEXT} at (116,18) size 4x18
text run at (116,18) width 4: "."
RenderBlock {P} at (0,52) size 784x18
RenderText {TEXT} at (0,0) size 648x18
text run at (0,0) width 648: "The rightmost two words in the Hebrew text should be selectable by dragging or double-clicking them."
RenderBlock {HR} at (0,86) size 784x2 [border: (1px inset #000000)]
RenderBlock (anonymous) at (0,96) size 784x18
RenderInline {SPAN} at (0,0) size 146x18
RenderText {TEXT} at (0,0) size 146x18
text run at (0,0) width 62 RTL: "\x{5E9}\x{5EA}\x{5D4} \x{5DE}\x{5D9}\x{5E5}"
text run at (62,0) width 84 RTL: "\x{5D0}\x{5DB}\x{5DC}\x{5EA} \x{5E4}\x{5DC}\x{5E4}\x{5DC} "
RenderText {TEXT} at (0,0) size 0x0
RenderText {TEXT} at (0,0) size 0x0
RenderText {TEXT} at (0,0) size 0x0
caret: position 3 of child 0 {TEXT} of child 7 {SPAN} of child 1 {BODY} of child 0 {HTML} of document
<html>
<head>
<title></title>
<script type="text/javascript">
function test()
{
if (!window.layoutTestController)
return;
// Just click on the first (rightmost) word to get a response from the
// editing delegate.
var t = document.getElementById('t');
eventSender.mouseMoveTo(t.offsetWidth - 8, t.offsetTop + 16);
eventSender.mouseDown();
eventSender.mouseUp();
}
</script>
</head>
<body onload="test()">
<p>
Test for <i><a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=7433">http://bugzilla.opendarwin.org/show_bug.cgi?id=7433</a>
REGRESSION (r12789): Second RTL text run on a line cannot be selected</i>.
</p>
<p>
The rightmost two words in the Hebrew text should be selectable by dragging or double-clicking them.
</p>
<hr>
<span id="t">
&#x05d0;&#x05db;&#x05dc;&#x05ea &#x05e4;&#x05dc;&#x05e4;&#x05dc; &#x05e9;&#x05ea;&#x05d4; &#x05de;&#x05d9;&#x05e5
</span>
</body>
</html>
2006-02-27 Mitz Pettel <opendarwin.org@mitzpettel.com>
Test: fast/text/in-rendered-text-rtl.html
Reviewed by Darin.
- fix http://bugzilla.opendarwin.org/show_bug.cgi?id=7433
REGRESSION (r12789): Second RTL text run on a line cannot be selected
* dom/dom_position.cpp:
(WebCore::Position::inRenderedText): If the RenderText contains
reversed text, the text boxes are not necessarily ordered by start
position, so iterate through all of them.
(WebCore::Position::isRenderedCharacter): Ditto.
2006-02-27 David Kilzer <ddkilzer@kilzer.net>
Reviewed by Darin.
......
......@@ -532,7 +532,7 @@ bool Position::inRenderedText() const
RenderText *textRenderer = static_cast<RenderText *>(renderer);
for (InlineTextBox *box = textRenderer->firstTextBox(); box; box = box->nextTextBox()) {
if (offset() < box->m_start) {
if (offset() < box->m_start && !textRenderer->containsReversedText()) {
// The offset we're looking for is before this node
// this means the offset must be in content that is
// not rendered. Return false.
......@@ -556,7 +556,7 @@ bool Position::isRenderedCharacter() const
RenderText *textRenderer = static_cast<RenderText *>(renderer);
for (InlineTextBox *box = textRenderer->firstTextBox(); box; box = box->nextTextBox()) {
if (offset() < box->m_start) {
if (offset() < box->m_start && !textRenderer->containsReversedText()) {
// The offset we're looking for is before this node
// this means the offset must be in content that is
// not rendered. Return false.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment