| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 { | 90 { |
| 91 if (position.isNull()) | 91 if (position.isNull()) |
| 92 return; | 92 return; |
| 93 position.getInlineBoxAndOffset(affinity, m_inlineBox, m_offset); | 93 position.getInlineBoxAndOffset(affinity, m_inlineBox, m_offset); |
| 94 if (m_inlineBox) | 94 if (m_inlineBox) |
| 95 m_layoutObject = &m_inlineBox->layoutObject(); | 95 m_layoutObject = &m_inlineBox->layoutObject(); |
| 96 else | 96 else |
| 97 m_layoutObject = layoutObjectFromPosition(position); | 97 m_layoutObject = layoutObjectFromPosition(position); |
| 98 } | 98 } |
| 99 | 99 |
| 100 RenderedPosition::RenderedPosition(const PositionInComposedTree& position, EAffi
nity affinity) |
| 101 : RenderedPosition(toPositionInDOMTree(position), affinity) |
| 102 { |
| 103 } |
| 104 |
| 100 InlineBox* RenderedPosition::prevLeafChild() const | 105 InlineBox* RenderedPosition::prevLeafChild() const |
| 101 { | 106 { |
| 102 if (m_prevLeafChild == uncachedInlineBox()) | 107 if (m_prevLeafChild == uncachedInlineBox()) |
| 103 m_prevLeafChild = m_inlineBox->prevLeafChildIgnoringLineBreak(); | 108 m_prevLeafChild = m_inlineBox->prevLeafChildIgnoringLineBreak(); |
| 104 return m_prevLeafChild; | 109 return m_prevLeafChild; |
| 105 } | 110 } |
| 106 | 111 |
| 107 InlineBox* RenderedPosition::nextLeafChild() const | 112 InlineBox* RenderedPosition::nextLeafChild() const |
| 108 { | 113 { |
| 109 if (m_nextLeafChild == uncachedInlineBox()) | 114 if (m_nextLeafChild == uncachedInlineBox()) |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 bool layoutObjectContainsPosition(LayoutObject* target, const Position& position
) | 256 bool layoutObjectContainsPosition(LayoutObject* target, const Position& position
) |
| 252 { | 257 { |
| 253 for (LayoutObject* layoutObject = layoutObjectFromPosition(position); layout
Object && layoutObject->node(); layoutObject = layoutObject->parent()) { | 258 for (LayoutObject* layoutObject = layoutObjectFromPosition(position); layout
Object && layoutObject->node(); layoutObject = layoutObject->parent()) { |
| 254 if (layoutObject == target) | 259 if (layoutObject == target) |
| 255 return true; | 260 return true; |
| 256 } | 261 } |
| 257 return false; | 262 return false; |
| 258 } | 263 } |
| 259 | 264 |
| 260 }; | 265 }; |
| OLD | NEW |