| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 } | 164 } |
| 165 if (renderer->isText()) | 165 if (renderer->isText()) |
| 166 return !Position::nodeIsUserSelectNone(m_anchorNode) && Position(*this).
inRenderedText(); | 166 return !Position::nodeIsUserSelectNone(m_anchorNode) && Position(*this).
inRenderedText(); |
| 167 | 167 |
| 168 if (renderer->isSVG()) { | 168 if (renderer->isSVG()) { |
| 169 // We don't consider SVG elements are contenteditable except for | 169 // We don't consider SVG elements are contenteditable except for |
| 170 // associated renderer returns isText() true, e.g. RenderSVGInlineText. | 170 // associated renderer returns isText() true, e.g. RenderSVGInlineText. |
| 171 return false; | 171 return false; |
| 172 } | 172 } |
| 173 | 173 |
| 174 if (isRenderedTableElement(m_anchorNode) || editingIgnoresContent(m_anchorNo
de)) | 174 if (isRenderedHTMLTableElement(m_anchorNode) || editingIgnoresContent(m_anch
orNode)) |
| 175 return (atStartOfNode() || atEndOfNode()) && !Position::nodeIsUserSelect
None(m_anchorNode->parentNode()); | 175 return (atStartOfNode() || atEndOfNode()) && !Position::nodeIsUserSelect
None(m_anchorNode->parentNode()); |
| 176 | 176 |
| 177 if (!isHTMLHtmlElement(*m_anchorNode) && renderer->isRenderBlockFlow()) { | 177 if (!isHTMLHtmlElement(*m_anchorNode) && renderer->isRenderBlockFlow()) { |
| 178 if (toRenderBlock(renderer)->logicalHeight() || isHTMLBodyElement(*m_anc
horNode)) { | 178 if (toRenderBlock(renderer)->logicalHeight() || isHTMLBodyElement(*m_anc
horNode)) { |
| 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 |