| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 1599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1610 while (lastChildHasContinuation(lastParent)) | 1610 while (lastChildHasContinuation(lastParent)) |
| 1611 lastParent = endOfContinuations(lastParent->slowLastChild())->parent
(); | 1611 lastParent = endOfContinuations(lastParent->slowLastChild())->parent
(); |
| 1612 nextSibling = lastParent->nextSibling(); | 1612 nextSibling = lastParent->nextSibling(); |
| 1613 } else if (LayoutObject* ns = m_layoutObject->nextSibling()) { | 1613 } else if (LayoutObject* ns = m_layoutObject->nextSibling()) { |
| 1614 // Case 3: node has an actual next sibling | 1614 // Case 3: node has an actual next sibling |
| 1615 nextSibling = ns; | 1615 nextSibling = ns; |
| 1616 } else if (isInlineWithContinuation(m_layoutObject)) { | 1616 } else if (isInlineWithContinuation(m_layoutObject)) { |
| 1617 // Case 4: node is an inline with a continuation. Next sibling is the ne
xt sibling of the end | 1617 // Case 4: node is an inline with a continuation. Next sibling is the ne
xt sibling of the end |
| 1618 // of the continuation chain. | 1618 // of the continuation chain. |
| 1619 nextSibling = endOfContinuations(m_layoutObject)->nextSibling(); | 1619 nextSibling = endOfContinuations(m_layoutObject)->nextSibling(); |
| 1620 } else if (isInlineWithContinuation(m_layoutObject->parent())) { | 1620 } else if (m_layoutObject->parent() && isInlineWithContinuation(m_layoutObje
ct->parent())) { |
| 1621 // Case 5: node has no next sibling, and its parent is an inline with a
continuation. | 1621 // Case 5: node has no next sibling, and its parent is an inline with a
continuation. |
| 1622 LayoutObject* continuation = toLayoutInline(m_layoutObject->parent())->c
ontinuation(); | 1622 LayoutObject* continuation = toLayoutInline(m_layoutObject->parent())->c
ontinuation(); |
| 1623 | 1623 |
| 1624 if (continuation->isLayoutBlock()) { | 1624 if (continuation->isLayoutBlock()) { |
| 1625 // Case 5a: continuation is a block - in this case the block itself
is the next sibling. | 1625 // Case 5a: continuation is a block - in this case the block itself
is the next sibling. |
| 1626 nextSibling = continuation; | 1626 nextSibling = continuation; |
| 1627 } else { | 1627 } else { |
| 1628 // Case 5b: continuation is an inline - in this case the inline's fi
rst child is the next sibling. | 1628 // Case 5b: continuation is an inline - in this case the inline's fi
rst child is the next sibling. |
| 1629 nextSibling = firstChildConsideringContinuation(continuation); | 1629 nextSibling = firstChildConsideringContinuation(continuation); |
| 1630 } | 1630 } |
| (...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2523 if (label && label->layoutObject()) { | 2523 if (label && label->layoutObject()) { |
| 2524 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe
ct(); | 2524 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe
ct(); |
| 2525 result.unite(labelRect); | 2525 result.unite(labelRect); |
| 2526 } | 2526 } |
| 2527 } | 2527 } |
| 2528 | 2528 |
| 2529 return result; | 2529 return result; |
| 2530 } | 2530 } |
| 2531 | 2531 |
| 2532 } // namespace blink | 2532 } // namespace blink |
| OLD | NEW |