⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 93935 in webkit


Ignore:
Timestamp:
Aug 26, 2011, 9:42:59 PM (15 years ago)
Author:
xji@chromium.org
Message:

Regression(91788): Bad cast in WebCore::blockWithNextLineBox
https://bugs.webkit.org/show_bug.cgi?id=66090

Reviewed by Ryosuke Niwa.

Source/WebCore:

This is more like (but not exactly) a revert of r91788.
It does not search for previous or next root inline box in different
render object, which completely eliminates the cause of this issue.
And it removes createPositionAvoidingIgnoredNode(), changed its caller
to use createLegacyEditingPosition(). createPositionAvoidingIgnoredNode
is not correct when node is a replaced element whose caretMaxOffset
could be greater than 1.

Tests: editing/selection/move-by-word-visually-crash-test-1.html

editing/selection/move-by-word-visually-crash-test-2.html
editing/selection/move-by-word-visually-crash-test-3.html
editing/selection/move-by-word-visually-crash-test-4.html

  • editing/htmlediting.cpp:
  • editing/htmlediting.h:
  • editing/visible_units.cpp:

(WebCore::previousWordBreakInBoxInsideBlockWithSameDirectionality):
(WebCore::leftmostPositionInRTLBoxInLTRBlock):
(WebCore::rightmostPositionInLTRBoxInRTLBlock):
(WebCore::nextWordBreakInBoxInsideBlockWithDifferentDirectionality):
(WebCore::appendPositionAtLogicalEndOfLine):
(WebCore::leftInlineBox):
(WebCore::rightInlineBox):

LayoutTests:

  • editing/selection/move-by-word-visually-crash-test-1-expected.txt: Added.
  • editing/selection/move-by-word-visually-crash-test-1.html: Added.
  • editing/selection/move-by-word-visually-crash-test-2-expected.txt: Added.
  • editing/selection/move-by-word-visually-crash-test-2.html: Added.
  • editing/selection/move-by-word-visually-crash-test-3-expected.txt: Added.
  • editing/selection/move-by-word-visually-crash-test-3.html: Added.
  • editing/selection/move-by-word-visually-crash-test-4-expected.txt: Added.
  • editing/selection/move-by-word-visually-crash-test-4.html: Added.
  • editing/selection/move-by-word-visually-multi-line-expected.txt:
  • editing/selection/resources/move-by-word-visually.js:

(runMoveLeftRight):

Location:
trunk
Files:
8 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r93934 r93935  
     12011-08-26  Xiaomei Ji  <xji@chromium.org>
     2
     3        Regression(91788): Bad cast in WebCore::blockWithNextLineBox
     4        https://bugs.webkit.org/show_bug.cgi?id=66090
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        * editing/selection/move-by-word-visually-crash-test-1-expected.txt: Added.
     9        * editing/selection/move-by-word-visually-crash-test-1.html: Added.
     10        * editing/selection/move-by-word-visually-crash-test-2-expected.txt: Added.
     11        * editing/selection/move-by-word-visually-crash-test-2.html: Added.
     12        * editing/selection/move-by-word-visually-crash-test-3-expected.txt: Added.
     13        * editing/selection/move-by-word-visually-crash-test-3.html: Added.
     14        * editing/selection/move-by-word-visually-crash-test-4-expected.txt: Added.
     15        * editing/selection/move-by-word-visually-crash-test-4.html: Added.
     16        * editing/selection/move-by-word-visually-multi-line-expected.txt:
     17        * editing/selection/resources/move-by-word-visually.js:
     18        (runMoveLeftRight):
     19
    1202011-08-26  Gavin Barraclough  <barraclough@apple.com>
    221
  • trunk/LayoutTests/editing/selection/move-by-word-visually-multi-line-expected.txt

    r92223 r93935  
    88Test 2, LTR:
    99Move right by one word
    10 "abc def ghi jkl mn "[0, 4, 8, 12, 16, 18], "opq rst uvw xyz"[0, 4, 8, 12, 15]
     10"abc def ghi jkl mn "[0, 4, 8, 12, 16, 18]    FAIL expected: ["abc def ghi jkl mn "[ 0,  4,  8,  12,  16,  18, ]"opq rst uvw xyz"[ 0,  4,  8,  12,  15]
     11"abc def ghi jkl mn "[18, 18]   FAIL expected "opq rst uvw xyz"[ 0]
     12<DIV>[0, 0]   FAIL expected "opq rst uvw xyz"[ 0]
     13<DIV>[0, 0]   FAIL expected "opq rst uvw xyz"[ 0]
     14<DIV>[0, 0]   FAIL expected "opq rst uvw xyz"[ 0]
    1115Move left by one word
    12 "opq rst uvw xyz"[15, 12, 8, 4, 0], "abc def ghi jkl mn "[16, 12, 8, 4, 0]
     16"opq rst uvw xyz"[15, 12, 8, 4, 0]    FAIL expected: ["opq rst uvw xyz"[ 15,  12,  8,  4,  0, ]"abc def ghi jkl mn "[ 16,  12,  8,  4,  0]
     17"opq rst uvw xyz"[0, 0]   FAIL expected "abc def ghi jkl mn "[ 16]
     18<DIV>[0, 0]   FAIL expected "abc def ghi jkl mn "[ 16]
     19<DIV>[0, 0]   FAIL expected "abc def ghi jkl mn "[ 16]
     20<DIV>[0, 0]   FAIL expected "abc def ghi jkl mn "[ 16]
    1321Test 3, LTR:
    1422Move right by one word
     
    1826Test 4, LTR:
    1927Move right by one word
    20 "AAA AAA AAA AAA "[0, 3, 8, 11, 16], "AAA AAA AAA AAA"[0, 3, 8, 11, 15]
     28"AAA AAA AAA AAA "[0, 3, 8, 11, 16]    FAIL expected: ["AAA AAA AAA AAA "[ 0,  3,  8,  11,  16, ]"AAA AAA AAA AAA"[ 0,  3,  8,  11,  15]
     29"AAA AAA AAA AAA "[16, 16]   FAIL expected "AAA AAA AAA AAA"[ 0]
     30<DIV>[0, 0]   FAIL expected "AAA AAA AAA AAA"[ 0]
     31<DIV>[0, 0]   FAIL expected "AAA AAA AAA AAA"[ 0]
     32<DIV>[0, 0]   FAIL expected "AAA AAA AAA AAA"[ 0]
    2133Move left by one word
    22 "AAA AAA AAA AAA"[15, 11, 8, 3, 0], "AAA AAA AAA AAA "[11, 8, 3, 0]
     34"AAA AAA AAA AAA"[15, 11, 8, 3, 0]    FAIL expected: ["AAA AAA AAA AAA"[ 15,  11,  8,  3,  0, ]"AAA AAA AAA AAA "[ 11,  8,  3,  0]
     35"AAA AAA AAA AAA"[0, 0]   FAIL expected "AAA AAA AAA AAA "[ 11]
     36<DIV>[0, 0]   FAIL expected "AAA AAA AAA AAA "[ 11]
     37<DIV>[0, 0]   FAIL expected "AAA AAA AAA AAA "[ 11]
     38<DIV>[0, 0]   FAIL expected "AAA AAA AAA AAA "[ 11]
    2339Test 5, LTR:
    2440Move right by one word
     
    2844Test 6, LTR:
    2945Move right by one word
    30 " abc def AAA AAA hij AAA AAA uvw xyz "[1, 5, 9, 12, 17, 21, 25, 29, 33, 36], "AAA kj AAA mn opq AAA AAA"[0, 4, 7, 11, 14, 18, 22, 25]
     46" abc def AAA AAA hij AAA AAA uvw xyz "[1, 5, 9, 12, 17, 21, 25, 29, 33, 36]    FAIL expected: [" abc def AAA AAA hij AAA AAA uvw xyz "[ 1,  5,  9,  12,  17,  21,  25,  29,  33,  36, ]"AAA kj AAA mn opq AAA AAA"[ 0,  4,  7,  11,  14,  18,  22,  25]
     47" abc def AAA AAA hij AAA AAA uvw xyz "[36, 36]   FAIL expected "AAA kj AAA mn opq AAA AAA"[ 0]
     48<DIV>[0, 0]   FAIL expected "AAA kj AAA mn opq AAA AAA"[ 0]
     49<DIV>[0, 0]   FAIL expected "AAA kj AAA mn opq AAA AAA"[ 0]
     50<DIV>[0, 0]   FAIL expected "AAA kj AAA mn opq AAA AAA"[ 0]
    3151Move left by one word
    32 "AAA kj AAA mn opq AAA AAA"[25, 22, 18, 14, 11, 7, 4, 0], " abc def AAA AAA hij AAA AAA uvw xyz "[33, 29, 25, 21, 17, 12, 9, 5, 1]
     52"AAA kj AAA mn opq AAA AAA"[25, 22, 18, 14, 11, 7, 4, 0]    FAIL expected: ["AAA kj AAA mn opq AAA AAA"[ 25,  22,  18,  14,  11,  7,  4,  0, ]" abc def AAA AAA hij AAA AAA uvw xyz "[ 33,  29,  25,  21,  17,  12,  9,  5,  1]
     53"AAA kj AAA mn opq AAA AAA"[0, 0]   FAIL expected " abc def AAA AAA hij AAA AAA uvw xyz "[ 33]
     54<DIV>[0, 0]   FAIL expected " abc def AAA AAA hij AAA AAA uvw xyz "[ 33]
     55<DIV>[0, 0]   FAIL expected " abc def AAA AAA hij AAA AAA uvw xyz "[ 33]
     56<DIV>[0, 0]   FAIL expected " abc def AAA AAA hij AAA AAA uvw xyz "[ 33]
    3357Test 7, RTL:
    3458Move left by one word
     
    3862Test 8, RTL:
    3963Move left by one word
    40 "abc def ghi jkl mn "[0, 3, 8, 11, 16, 18], "opq rst uvw xyz"[0, 3, 8, 11, 15]
     64"abc def ghi jkl mn "[0, 3, 8, 11, 16, 18]    FAIL expected: ["abc def ghi jkl mn "[ 0,  3,  8,  11,  16,  18, ]"opq rst uvw xyz"[ 0,  3,  8,  11,  15]
     65"abc def ghi jkl mn "[18, 18]   FAIL expected "opq rst uvw xyz"[ 0]
     66<DIV>[0, 0]   FAIL expected "opq rst uvw xyz"[ 0]
     67<DIV>[0, 0]   FAIL expected "opq rst uvw xyz"[ 0]
     68<DIV>[0, 0]   FAIL expected "opq rst uvw xyz"[ 0]
    4169Move right by one word
    42 "opq rst uvw xyz"[15, 11, 8, 3, 0], "abc def ghi jkl mn "[18, 16, 11, 8, 3, 0]
     70"opq rst uvw xyz"[15, 11, 8, 3, 0]    FAIL expected: ["opq rst uvw xyz"[ 15,  11,  8,  3,  0, ]"abc def ghi jkl mn "[ 18,  16,  11,  8,  3,  0]
     71"opq rst uvw xyz"[0, 0]   FAIL expected "abc def ghi jkl mn "[ 18]
     72<DIV>[0, 0]   FAIL expected "abc def ghi jkl mn "[ 18]
     73<DIV>[0, 0]   FAIL expected "abc def ghi jkl mn "[ 18]
     74<DIV>[0, 0]   FAIL expected "abc def ghi jkl mn "[ 18]
    4375Test 9, RTL:
    4476Move left by one word
     
    4880Test 10, RTL:
    4981Move left by one word
    50 "AAA AAA AAA AAA "[0, 4, 8, 12, 16], "AAA AAA AAA AAA"[0, 4, 8, 12, 15]
     82"AAA AAA AAA AAA "[0, 4, 8, 12, 16]    FAIL expected: ["AAA AAA AAA AAA "[ 0,  4,  8,  12,  16, ]"AAA AAA AAA AAA"[ 0,  4,  8,  12,  15]
     83"AAA AAA AAA AAA "[16, 16]   FAIL expected "AAA AAA AAA AAA"[ 0]
     84<DIV>[0, 0]   FAIL expected "AAA AAA AAA AAA"[ 0]
     85<DIV>[0, 0]   FAIL expected "AAA AAA AAA AAA"[ 0]
     86<DIV>[0, 0]   FAIL expected "AAA AAA AAA AAA"[ 0]
    5187Move right by one word
    52 "AAA AAA AAA AAA"[15, 12, 8, 4, 0], "AAA AAA AAA AAA "[12, 8, 4, 0]
     88"AAA AAA AAA AAA"[15, 12, 8, 4, 0]    FAIL expected: ["AAA AAA AAA AAA"[ 15,  12,  8,  4,  0, ]"AAA AAA AAA AAA "[ 12,  8,  4,  0]
     89"AAA AAA AAA AAA"[0, 0]   FAIL expected "AAA AAA AAA AAA "[ 12]
     90<DIV>[0, 0]   FAIL expected "AAA AAA AAA AAA "[ 12]
     91<DIV>[0, 0]   FAIL expected "AAA AAA AAA AAA "[ 12]
     92<DIV>[0, 0]   FAIL expected "AAA AAA AAA AAA "[ 12]
    5393Test 11, RTL:
    5494Move left by one word
     
    5898Test 12, RTL:
    5999Move left by one word
    60 " abc def AAA AAA hij AAA AAA uvw xyz "[1, 4, 9, 13, 17, 21, 25, 29, 33, 36], "AAA kj AAA mn opq AAA AAA"[0, 4, 7, 11, 14, 18, 22, 25]
     100" abc def AAA AAA hij AAA AAA uvw xyz "[1, 4, 9, 13, 17, 21, 25, 29, 33, 36]    FAIL expected: [" abc def AAA AAA hij AAA AAA uvw xyz "[ 1,  4,  9,  13,  17,  21,  25,  29,  33,  36, ]"AAA kj AAA mn opq AAA AAA"[ 0,  4,  7,  11,  14,  18,  22,  25]
     101" abc def AAA AAA hij AAA AAA uvw xyz "[36, 36]   FAIL expected "AAA kj AAA mn opq AAA AAA"[ 0]
     102<DIV>[0, 0]   FAIL expected "AAA kj AAA mn opq AAA AAA"[ 0]
     103<DIV>[0, 0]   FAIL expected "AAA kj AAA mn opq AAA AAA"[ 0]
     104<DIV>[0, 0]   FAIL expected "AAA kj AAA mn opq AAA AAA"[ 0]
    61105Move right by one word
    62 "AAA kj AAA mn opq AAA AAA"[25, 22, 18, 14, 11, 7, 4, 0], " abc def AAA AAA hij AAA AAA uvw xyz "[36, 33, 29, 25, 21, 17, 13, 9, 4, 1]
     106"AAA kj AAA mn opq AAA AAA"[25, 22, 18, 14, 11, 7, 4, 0]    FAIL expected: ["AAA kj AAA mn opq AAA AAA"[ 25,  22,  18,  14,  11,  7,  4,  0, ]" abc def AAA AAA hij AAA AAA uvw xyz "[ 36,  33,  29,  25,  21,  17,  13,  9,  4,  1]
     107"AAA kj AAA mn opq AAA AAA"[0, 0]   FAIL expected " abc def AAA AAA hij AAA AAA uvw xyz "[ 36]
     108<DIV>[0, 0]   FAIL expected " abc def AAA AAA hij AAA AAA uvw xyz "[ 36]
     109<DIV>[0, 0]   FAIL expected " abc def AAA AAA hij AAA AAA uvw xyz "[ 36]
     110<DIV>[0, 0]   FAIL expected " abc def AAA AAA hij AAA AAA uvw xyz "[ 36]
    63111Test 13, LTR:
    64112Move right by one word
  • trunk/LayoutTests/editing/selection/resources/move-by-word-visually.js

    r91788 r93935  
    267267        }
    268268    }
    269 
    270     document.getElementById("testMoveByWord").style.display = "none";
     269    if (document.getElementById("testMoveByWord"))
     270        document.getElementById("testMoveByWord").style.display = "none";
    271271}
    272272
  • trunk/Source/WebCore/ChangeLog

    r93927 r93935  
     12011-08-26  Xiaomei Ji  <xji@chromium.org>
     2
     3        Regression(91788): Bad cast in WebCore::blockWithNextLineBox
     4        https://bugs.webkit.org/show_bug.cgi?id=66090
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        This is more like (but not exactly) a revert of r91788.
     9        It does not search for previous or next root inline box in different
     10        render object, which completely eliminates the cause of this issue.
     11        And it removes createPositionAvoidingIgnoredNode(), changed its caller
     12        to use createLegacyEditingPosition(). createPositionAvoidingIgnoredNode
     13        is not correct when node is a replaced element whose caretMaxOffset
     14        could be greater than 1.
     15
     16        Tests: editing/selection/move-by-word-visually-crash-test-1.html
     17               editing/selection/move-by-word-visually-crash-test-2.html
     18               editing/selection/move-by-word-visually-crash-test-3.html
     19               editing/selection/move-by-word-visually-crash-test-4.html
     20
     21        * editing/htmlediting.cpp:
     22        * editing/htmlediting.h:
     23        * editing/visible_units.cpp:
     24        (WebCore::previousWordBreakInBoxInsideBlockWithSameDirectionality):
     25        (WebCore::leftmostPositionInRTLBoxInLTRBlock):
     26        (WebCore::rightmostPositionInLTRBoxInRTLBlock):
     27        (WebCore::nextWordBreakInBoxInsideBlockWithDifferentDirectionality):
     28        (WebCore::appendPositionAtLogicalEndOfLine):
     29        (WebCore::leftInlineBox):
     30        (WebCore::rightInlineBox):
     31
    1322011-08-26  James Robinson  <jamesr@chromium.org>
    233
  • trunk/Source/WebCore/editing/htmlediting.cpp

    r92695 r93935  
    11381138}
    11391139
    1140 Position createPositionAvoidingIgnoredNode(Node* node, int offset)
    1141 {
    1142     if (!node)
    1143         return Position();
    1144     if (!node->isTextNode()) {
    1145         // FIXME: the pass-in offset is the caretMinOffset() or caretMaxOffset() of box.
    1146         // caretMaxOffset could be 1 for replacedElement, br, and hr.
    1147         // We should get rid of this offset checking code after we get rid of legacy editing
    1148         // position in rendering code.
    1149         if (!offset)
    1150             return positionBeforeNode(node);
    1151         ASSERT(offset == 1);
    1152         return positionAfterNode(node);
    1153     }
    1154     return Position(static_cast<Text*>(node), offset);
    1155 }
    1156 
    11571140} // namespace WebCore
  • trunk/Source/WebCore/editing/htmlediting.h

    r92695 r93935  
    143143}
    144144
    145 Position createPositionAvoidingIgnoredNode(Node*, int offset);
    146 
    147145// comparision functions on Position
    148146   
  • trunk/Source/WebCore/editing/visible_units.cpp

    r93834 r93935  
    11781178        wordBreak = previousWordBreak;
    11791179    else {
    1180         wordBreak = createPositionAvoidingIgnoredNode(box->renderer()->node(), box->caretMaxOffset());
     1180        wordBreak = createLegacyEditingPosition(box->renderer()->node(), box->caretMaxOffset());
    11811181
    11821182        // Return the rightmost word boundary of LTR box or leftmost word boundary of RTL box if
     
    12171217   
    12181218    if (previousLeaf && !previousLeaf->isLeftToRightDirection())
    1219         return createPositionAvoidingIgnoredNode(node, box->caretMaxOffset());
     1219        return createLegacyEditingPosition(node, box->caretMaxOffset());
    12201220
    12211221    if (nextLeaf && !nextLeaf->isLeftToRightDirection()) {
    12221222        if (previousLeaf)
    1223             return createPositionAvoidingIgnoredNode(previousLeaf->renderer()->node(), previousLeaf->caretMaxOffset());
     1223            return createLegacyEditingPosition(previousLeaf->renderer()->node(), previousLeaf->caretMaxOffset());
    12241224
    12251225        InlineBox* lastRTLLeaf;
     
    12281228            nextLeaf = nextLeaf->nextLeafChild();
    12291229        } while (nextLeaf && !nextLeaf->isLeftToRightDirection());
    1230         return createPositionAvoidingIgnoredNode(lastRTLLeaf->renderer()->node(), lastRTLLeaf->caretMinOffset());
    1231     }
    1232 
    1233     return createPositionAvoidingIgnoredNode(node, box->caretMinOffset());
     1230        return createLegacyEditingPosition(lastRTLLeaf->renderer()->node(), lastRTLLeaf->caretMinOffset());
     1231    }
     1232
     1233    return createLegacyEditingPosition(node, box->caretMinOffset());
    12341234}
    12351235
     
    12421242   
    12431243    if (nextLeaf && nextLeaf->isLeftToRightDirection())   
    1244         return createPositionAvoidingIgnoredNode(node, box->caretMaxOffset());
     1244        return createLegacyEditingPosition(node, box->caretMaxOffset());
    12451245
    12461246    if (previousLeaf && previousLeaf->isLeftToRightDirection()) {
    12471247        if (nextLeaf)
    1248             return createPositionAvoidingIgnoredNode(nextLeaf->renderer()->node(), nextLeaf->caretMaxOffset());
     1248            return createLegacyEditingPosition(nextLeaf->renderer()->node(), nextLeaf->caretMaxOffset());
    12491249
    12501250        InlineBox* firstLTRLeaf;
     
    12531253            previousLeaf = previousLeaf->prevLeafChild();
    12541254        } while (previousLeaf && previousLeaf->isLeftToRightDirection());
    1255         return createPositionAvoidingIgnoredNode(firstLTRLeaf->renderer()->node(), firstLTRLeaf->caretMinOffset());
    1256     }
    1257 
    1258     return createPositionAvoidingIgnoredNode(node, box->caretMinOffset());
     1255        return createLegacyEditingPosition(firstLTRLeaf->renderer()->node(), firstLTRLeaf->caretMinOffset());
     1256    }
     1257
     1258    return createLegacyEditingPosition(node, box->caretMinOffset());
    12591259}
    12601260   
     
    13021302    bool hasSeenWordBreakInThisBox = previousWordBreak.isNotNull();
    13031303    VisiblePosition wordBreak = hasSeenWordBreakInThisBox ? previousWordBreak :
    1304         createPositionAvoidingIgnoredNode(box->renderer()->node(), box->caretMinOffset());
     1304        createLegacyEditingPosition(box->renderer()->node(), box->caretMinOffset());
    13051305
    13061306    wordBreak = nextBoundary(wordBreak, nextWordPositionBoundary);
     
    13411341static void appendPositionAtLogicalEndOfLine(const InlineBox* box, WordBoundaryVector& orderedWordBoundaries)
    13421342{
    1343     VisiblePosition endOfBlock = logicalEndOfLine(createPositionAvoidingIgnoredNode(box->renderer()->node(), box->caretMaxOffset()));
     1343    VisiblePosition endOfBlock = logicalEndOfLine(createLegacyEditingPosition(box->renderer()->node(), box->caretMaxOffset()));
    13441344
    13451345    int offsetOfEndOfBlock;
     
    14731473}
    14741474
    1475 static const RenderBlock* blockWithPreviousLineBox(const RenderBlock* startingBlock)
    1476 {
    1477     for (const RenderBlock* block = startingBlock; block; block = toRenderBlock(block->previousSibling())) {
    1478         if (block->childrenInline()) {
    1479             if (block->firstRootBox())
    1480                 return block;
    1481         } else if (const RenderBlock* renderBlock = blockWithPreviousLineBox(toRenderBlock(block->lastChild())))
    1482             return renderBlock;
    1483     }
    1484     return 0;
    1485 }
    1486 
    1487 static const RootInlineBox* previousRootInlineBox(const InlineBox* box)
    1488 {
    1489     Node* node = box->renderer()->node();
    1490 
    1491     for (RenderObject* renderer = node->renderer(); renderer; renderer = renderer->parent()) {
    1492         if (renderer->isRenderBlock()) {
    1493             if (const RenderBlock* blockWithLineBoxes = blockWithPreviousLineBox(toRenderBlock(renderer->previousSibling())))
    1494                 return blockWithLineBoxes->lastRootBox();
    1495         }
    1496     }
    1497 
    1498     return 0;
    1499 }
    1500 
    1501 static const RenderBlock* blockWithNextLineBox(const RenderBlock* startingBlock)
    1502 {
    1503     for (const RenderBlock* block = startingBlock; block; block = toRenderBlock(block->nextSibling())) {
    1504         if (block->childrenInline()) {
    1505             if (block->firstRootBox())
    1506                 return block;
    1507         } else if (const RenderBlock* renderBlock = blockWithNextLineBox(toRenderBlock(block->firstChild())))
    1508             return renderBlock;
    1509     }
    1510     return 0;
    1511 }
    1512 
    1513 static const RootInlineBox* nextRootInlineBox(const InlineBox* box)
    1514 {
    1515     Node* node = box->renderer()->node();
    1516 
    1517     for (RenderObject* renderer = node->renderer(); renderer; renderer = renderer->parent()) {
    1518         if (renderer->isRenderBlock()) {
    1519             if (const RenderBlock* blockWithLineBoxes = blockWithNextLineBox(toRenderBlock(renderer->nextSibling())))
    1520                 return blockWithLineBoxes->firstRootBox();
    1521         }
    1522     }
    1523 
    1524     return 0;
    1525 }
    1526 
    15271475static const InlineBox* leftInlineBox(const InlineBox* box, TextDirection blockDirection)
    15281476{
     
    15361484        return leftLineBox->lastLeafChild();
    15371485
    1538     const RootInlineBox* leftRootInlineBox = isBlockLTR ? previousRootInlineBox(box) : nextRootInlineBox(box);
    1539     return leftRootInlineBox ? leftRootInlineBox->lastLeafChild() : 0;
     1486    return 0;
    15401487}
    15411488
     
    15511498        return rightLineBox->firstLeafChild();
    15521499
    1553     const RootInlineBox* rightRootInlineBox = isBlockLTR ? nextRootInlineBox(box) : previousRootInlineBox(box);
    1554     return rightRootInlineBox ? rightRootInlineBox->firstLeafChild() : 0;
     1500    return 0;
    15551501}
    15561502
Note: See TracChangeset for help on using the changeset viewer.