| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2007 David Smith (catfish.man@gmail.com) | 4 * (C) 2007 David Smith (catfish.man@gmail.com) |
| 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. |
| 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1081 | 1081 |
| 1082 InlineTextBox* textBox = toInlineTextBox(box); | 1082 InlineTextBox* textBox = toInlineTextBox(box); |
| 1083 return Position::editingPositionOf(box->getLineLayoutItem().nonPseudoNode(),
start ? textBox->start() : textBox->start() + textBox->len()); | 1083 return Position::editingPositionOf(box->getLineLayoutItem().nonPseudoNode(),
start ? textBox->start() : textBox->start() + textBox->len()); |
| 1084 } | 1084 } |
| 1085 | 1085 |
| 1086 static inline bool isEditingBoundary(LayoutObject* ancestor, LineLayoutBox child
) | 1086 static inline bool isEditingBoundary(LayoutObject* ancestor, LineLayoutBox child
) |
| 1087 { | 1087 { |
| 1088 ASSERT(!ancestor || ancestor->nonPseudoNode()); | 1088 ASSERT(!ancestor || ancestor->nonPseudoNode()); |
| 1089 ASSERT(child && child.nonPseudoNode()); | 1089 ASSERT(child && child.nonPseudoNode()); |
| 1090 return !ancestor || !ancestor->parent() || (ancestor->hasLayer() && ancestor
->parent()->isLayoutView()) | 1090 return !ancestor || !ancestor->parent() || (ancestor->hasLayer() && ancestor
->parent()->isLayoutView()) |
| 1091 || ancestor->nonPseudoNode()->hasEditableStyle() == child.nonPseudoNode(
)->hasEditableStyle(); | 1091 || hasEditableStyle(*ancestor->nonPseudoNode()) == hasEditableStyle(*chi
ld.nonPseudoNode()); |
| 1092 } | 1092 } |
| 1093 | 1093 |
| 1094 // FIXME: This function should go on LayoutObject. | 1094 // FIXME: This function should go on LayoutObject. |
| 1095 // Then all cases in which positionForPoint recurs could call this instead to | 1095 // Then all cases in which positionForPoint recurs could call this instead to |
| 1096 // prevent crossing editable boundaries. This would require many tests. | 1096 // prevent crossing editable boundaries. This would require many tests. |
| 1097 PositionWithAffinity LayoutBlock::positionForPointRespectingEditingBoundaries(Li
neLayoutBox child, const LayoutPoint& pointInParentCoordinates) | 1097 PositionWithAffinity LayoutBlock::positionForPointRespectingEditingBoundaries(Li
neLayoutBox child, const LayoutPoint& pointInParentCoordinates) |
| 1098 { | 1098 { |
| 1099 LayoutPoint childLocation = child.location(); | 1099 LayoutPoint childLocation = child.location(); |
| 1100 if (child.isInFlowPositioned()) | 1100 if (child.isInFlowPositioned()) |
| 1101 childLocation += child.offsetForInFlowPosition(); | 1101 childLocation += child.offsetForInFlowPosition(); |
| (...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1864 for (TrackedLayoutBoxListHashSet::const_iterator it = positionedDescenda
ntSet->begin(); it != end; ++it) { | 1864 for (TrackedLayoutBoxListHashSet::const_iterator it = positionedDescenda
ntSet->begin(); it != end; ++it) { |
| 1865 LayoutBox* currBox = *it; | 1865 LayoutBox* currBox = *it; |
| 1866 ASSERT(!currBox->needsLayout()); | 1866 ASSERT(!currBox->needsLayout()); |
| 1867 } | 1867 } |
| 1868 } | 1868 } |
| 1869 } | 1869 } |
| 1870 | 1870 |
| 1871 #endif | 1871 #endif |
| 1872 | 1872 |
| 1873 } // namespace blink | 1873 } // namespace blink |
| OLD | NEW |