OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 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 * 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 if (m_nodeAfterPositionInAnchor) | 135 if (m_nodeAfterPositionInAnchor) |
136 return false; | 136 return false; |
137 return m_anchorNode->hasChildren() || m_offsetInAnchor >= lastOffsetForEditi
ng(m_anchorNode); | 137 return m_anchorNode->hasChildren() || m_offsetInAnchor >= lastOffsetForEditi
ng(m_anchorNode); |
138 } | 138 } |
139 | 139 |
140 bool PositionIterator::isCandidate() const | 140 bool PositionIterator::isCandidate() const |
141 { | 141 { |
142 if (!m_anchorNode) | 142 if (!m_anchorNode) |
143 return false; | 143 return false; |
144 | 144 |
145 LayoutObject* renderer = m_anchorNode->renderer(); | 145 LayoutObject* renderer = m_anchorNode->layoutObject(); |
146 if (!renderer) | 146 if (!renderer) |
147 return false; | 147 return false; |
148 | 148 |
149 if (renderer->style()->visibility() != VISIBLE) | 149 if (renderer->style()->visibility() != VISIBLE) |
150 return false; | 150 return false; |
151 | 151 |
152 if (renderer->isBR()) { | 152 if (renderer->isBR()) { |
153 // For br element, the condition | 153 // For br element, the condition |
154 // |(!m_anchorNode->hasChildren() || m_nodeAfterPositionInAnchor)| | 154 // |(!m_anchorNode->hasChildren() || m_nodeAfterPositionInAnchor)| |
155 // corresponds to the condition | 155 // corresponds to the condition |
(...skipping 23 matching lines...) Expand all Loading... |
179 if (!Position::hasRenderedNonAnonymousDescendantsWithHeight(renderer
)) | 179 if (!Position::hasRenderedNonAnonymousDescendantsWithHeight(renderer
)) |
180 return atStartOfNode() && !Position::nodeIsUserSelectNone(m_anch
orNode); | 180 return atStartOfNode() && !Position::nodeIsUserSelectNone(m_anch
orNode); |
181 return m_anchorNode->hasEditableStyle() && !Position::nodeIsUserSele
ctNone(m_anchorNode) && Position(*this).atEditingBoundary(); | 181 return m_anchorNode->hasEditableStyle() && !Position::nodeIsUserSele
ctNone(m_anchorNode) && Position(*this).atEditingBoundary(); |
182 } | 182 } |
183 } | 183 } |
184 | 184 |
185 return false; | 185 return false; |
186 } | 186 } |
187 | 187 |
188 } // namespace blink | 188 } // namespace blink |
OLD | NEW |