| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2009 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 890 } | 890 } |
| 891 | 891 |
| 892 template <typename Strategy> | 892 template <typename Strategy> |
| 893 bool PositionAlgorithm<Strategy>::hasRenderedNonAnonymousDescendantsWithHeight(L
ayoutObject* layoutObject) | 893 bool PositionAlgorithm<Strategy>::hasRenderedNonAnonymousDescendantsWithHeight(L
ayoutObject* layoutObject) |
| 894 { | 894 { |
| 895 LayoutObject* stop = layoutObject->nextInPreOrderAfterChildren(); | 895 LayoutObject* stop = layoutObject->nextInPreOrderAfterChildren(); |
| 896 for (LayoutObject *o = layoutObject->slowFirstChild(); o && o != stop; o = o
->nextInPreOrder()) { | 896 for (LayoutObject *o = layoutObject->slowFirstChild(); o && o != stop; o = o
->nextInPreOrder()) { |
| 897 if (o->nonPseudoNode()) { | 897 if (o->nonPseudoNode()) { |
| 898 if ((o->isText() && boundingBoxLogicalHeight(o, toLayoutText(o)->lin
esBoundingBox())) | 898 if ((o->isText() && boundingBoxLogicalHeight(o, toLayoutText(o)->lin
esBoundingBox())) |
| 899 || (o->isBox() && toLayoutBox(o)->pixelSnappedLogicalHeight()) | 899 || (o->isBox() && toLayoutBox(o)->pixelSnappedLogicalHeight()) |
| 900 || (o->isLayoutInline() && isEmptyInline(o) && boundingBoxLogica
lHeight(o, toLayoutInline(o)->linesBoundingBox()))) | 900 || (o->isLayoutInline() && isEmptyInline(LineLayoutItem(o)) && b
oundingBoxLogicalHeight(o, toLayoutInline(o)->linesBoundingBox()))) |
| 901 return true; | 901 return true; |
| 902 } | 902 } |
| 903 } | 903 } |
| 904 return false; | 904 return false; |
| 905 } | 905 } |
| 906 | 906 |
| 907 template <typename Strategy> | 907 template <typename Strategy> |
| 908 bool PositionAlgorithm<Strategy>::nodeIsUserSelectNone(Node* node) | 908 bool PositionAlgorithm<Strategy>::nodeIsUserSelectNone(Node* node) |
| 909 { | 909 { |
| 910 return node && node->layoutObject() && !node->layoutObject()->isSelectable()
; | 910 return node && node->layoutObject() && !node->layoutObject()->isSelectable()
; |
| (...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1538 | 1538 |
| 1539 void showTree(const blink::Position* pos) | 1539 void showTree(const blink::Position* pos) |
| 1540 { | 1540 { |
| 1541 if (pos) | 1541 if (pos) |
| 1542 pos->showTreeForThis(); | 1542 pos->showTreeForThis(); |
| 1543 else | 1543 else |
| 1544 fprintf(stderr, "Cannot showTree for (nil)\n"); | 1544 fprintf(stderr, "Cannot showTree for (nil)\n"); |
| 1545 } | 1545 } |
| 1546 | 1546 |
| 1547 #endif | 1547 #endif |
| OLD | NEW |