| 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 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 797 } | 797 } |
| 798 | 798 |
| 799 static int boundingBoxLogicalHeight(RenderObject *o, const IntRect &rect) | 799 static int boundingBoxLogicalHeight(RenderObject *o, const IntRect &rect) |
| 800 { | 800 { |
| 801 return o->style()->isHorizontalWritingMode() ? rect.height() : rect.width(); | 801 return o->style()->isHorizontalWritingMode() ? rect.height() : rect.width(); |
| 802 } | 802 } |
| 803 | 803 |
| 804 bool Position::hasRenderedNonAnonymousDescendantsWithHeight(RenderObject* render
er) | 804 bool Position::hasRenderedNonAnonymousDescendantsWithHeight(RenderObject* render
er) |
| 805 { | 805 { |
| 806 RenderObject* stop = renderer->nextInPreOrderAfterChildren(); | 806 RenderObject* stop = renderer->nextInPreOrderAfterChildren(); |
| 807 for (RenderObject *o = renderer->firstChild(); o && o != stop; o = o->nextIn
PreOrder()) | 807 for (RenderObject *o = renderer->slowFirstChild(); o && o != stop; o = o->ne
xtInPreOrder()) |
| 808 if (o->nonPseudoNode()) { | 808 if (o->nonPseudoNode()) { |
| 809 if ((o->isText() && boundingBoxLogicalHeight(o, toRenderText(o)->lin
esBoundingBox())) | 809 if ((o->isText() && boundingBoxLogicalHeight(o, toRenderText(o)->lin
esBoundingBox())) |
| 810 || (o->isBox() && toRenderBox(o)->pixelSnappedLogicalHeight()) | 810 || (o->isBox() && toRenderBox(o)->pixelSnappedLogicalHeight()) |
| 811 || (o->isRenderInline() && isEmptyInline(o) && boundingBoxLogica
lHeight(o, toRenderInline(o)->linesBoundingBox()))) | 811 || (o->isRenderInline() && isEmptyInline(o) && boundingBoxLogica
lHeight(o, toRenderInline(o)->linesBoundingBox()))) |
| 812 return true; | 812 return true; |
| 813 } | 813 } |
| 814 return false; | 814 return false; |
| 815 } | 815 } |
| 816 | 816 |
| 817 bool Position::nodeIsUserSelectNone(Node* node) | 817 bool Position::nodeIsUserSelectNone(Node* node) |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1060 return Position(); | 1060 return Position(); |
| 1061 } | 1061 } |
| 1062 | 1062 |
| 1063 void Position::getInlineBoxAndOffset(EAffinity affinity, InlineBox*& inlineBox,
int& caretOffset) const | 1063 void Position::getInlineBoxAndOffset(EAffinity affinity, InlineBox*& inlineBox,
int& caretOffset) const |
| 1064 { | 1064 { |
| 1065 getInlineBoxAndOffset(affinity, primaryDirection(), inlineBox, caretOffset); | 1065 getInlineBoxAndOffset(affinity, primaryDirection(), inlineBox, caretOffset); |
| 1066 } | 1066 } |
| 1067 | 1067 |
| 1068 static bool isNonTextLeafChild(RenderObject* object) | 1068 static bool isNonTextLeafChild(RenderObject* object) |
| 1069 { | 1069 { |
| 1070 if (object->firstChild()) | 1070 if (object->slowFirstChild()) |
| 1071 return false; | 1071 return false; |
| 1072 if (object->isText()) | 1072 if (object->isText()) |
| 1073 return false; | 1073 return false; |
| 1074 return true; | 1074 return true; |
| 1075 } | 1075 } |
| 1076 | 1076 |
| 1077 static InlineTextBox* searchAheadForBetterMatch(RenderObject* renderer) | 1077 static InlineTextBox* searchAheadForBetterMatch(RenderObject* renderer) |
| 1078 { | 1078 { |
| 1079 RenderBlock* container = renderer->containingBlock(); | 1079 RenderBlock* container = renderer->containingBlock(); |
| 1080 RenderObject* next = renderer; | 1080 RenderObject* next = renderer; |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1360 pos.showTreeForThis(); | 1360 pos.showTreeForThis(); |
| 1361 } | 1361 } |
| 1362 | 1362 |
| 1363 void showTree(const WebCore::Position* pos) | 1363 void showTree(const WebCore::Position* pos) |
| 1364 { | 1364 { |
| 1365 if (pos) | 1365 if (pos) |
| 1366 pos->showTreeForThis(); | 1366 pos->showTreeForThis(); |
| 1367 } | 1367 } |
| 1368 | 1368 |
| 1369 #endif | 1369 #endif |
| OLD | NEW |