OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2007 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
147 if (isHTMLBodyElement(*node)) | 147 if (isHTMLBodyElement(*node)) |
148 break; | 148 break; |
149 node = node->parentNode(); | 149 node = node->parentNode(); |
150 } | 150 } |
151 | 151 |
152 return 0; | 152 return 0; |
153 } | 153 } |
154 | 154 |
155 bool isEditablePosition(const Position& p, EditableType editableType, EUpdateSty le updateStyle) | 155 bool isEditablePosition(const Position& p, EditableType editableType, EUpdateSty le updateStyle) |
156 { | 156 { |
157 Node* node = p.deprecatedNode(); | 157 Node* node = p.parentAnchoredEquivalent().deprecatedNode(); |
Yuta Kitamura
2014/06/06 08:55:07
You should use anchorNode() instead of deprecatedN
yosin_UTC9
2014/06/06 09:26:11
Done.
| |
158 if (!node) | 158 if (!node) |
159 return false; | 159 return false; |
160 if (updateStyle == UpdateStyle) | 160 if (updateStyle == UpdateStyle) |
161 node->document().updateLayoutIgnorePendingStylesheets(); | 161 node->document().updateLayoutIgnorePendingStylesheets(); |
162 else | 162 else |
163 ASSERT(updateStyle == DoNotUpdateStyle); | 163 ASSERT(updateStyle == DoNotUpdateStyle); |
164 | 164 |
165 if (isRenderedTableElement(node)) | 165 if (isRenderedTableElement(node)) |
166 node = node->parentNode(); | 166 node = node->parentNode(); |
167 | 167 |
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1113 // if the selection starts just before a paragraph break, skip over it | 1113 // if the selection starts just before a paragraph break, skip over it |
1114 if (isEndOfParagraph(visiblePosition)) | 1114 if (isEndOfParagraph(visiblePosition)) |
1115 return visiblePosition.next().deepEquivalent().downstream(); | 1115 return visiblePosition.next().deepEquivalent().downstream(); |
1116 | 1116 |
1117 // otherwise, make sure to be at the start of the first selected node, | 1117 // otherwise, make sure to be at the start of the first selected node, |
1118 // instead of possibly at the end of the last node before the selection | 1118 // instead of possibly at the end of the last node before the selection |
1119 return visiblePosition.deepEquivalent().downstream(); | 1119 return visiblePosition.deepEquivalent().downstream(); |
1120 } | 1120 } |
1121 | 1121 |
1122 } // namespace WebCore | 1122 } // namespace WebCore |
OLD | NEW |