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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 | 132 |
133 return 0; | 133 return 0; |
134 } | 134 } |
135 | 135 |
136 bool isEditablePosition(const Position& p, EditableType editableType, EUpdateSty
le updateStyle) | 136 bool isEditablePosition(const Position& p, EditableType editableType, EUpdateSty
le updateStyle) |
137 { | 137 { |
138 Node* node = p.parentAnchoredEquivalent().anchorNode(); | 138 Node* node = p.parentAnchoredEquivalent().anchorNode(); |
139 if (!node) | 139 if (!node) |
140 return false; | 140 return false; |
141 if (updateStyle == UpdateStyle) | 141 if (updateStyle == UpdateStyle) |
142 node->document().updateLayoutIgnorePendingStylesheets(); | 142 node->document().updateLayout(); |
143 else | 143 else |
144 ASSERT(updateStyle == DoNotUpdateStyle); | 144 ASSERT(updateStyle == DoNotUpdateStyle); |
145 | 145 |
146 return node->hasEditableStyle(editableType); | 146 return node->hasEditableStyle(editableType); |
147 } | 147 } |
148 | 148 |
149 bool isAtUnsplittableElement(const Position& pos) | 149 bool isAtUnsplittableElement(const Position& pos) |
150 { | 150 { |
151 Node* node = pos.deprecatedNode(); | 151 Node* node = pos.deprecatedNode(); |
152 return node == editableRootForPosition(pos); | 152 return node == editableRootForPosition(pos); |
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
926 // if the selection starts just before a paragraph break, skip over it | 926 // if the selection starts just before a paragraph break, skip over it |
927 if (isEndOfParagraph(visiblePosition)) | 927 if (isEndOfParagraph(visiblePosition)) |
928 return visiblePosition.next().deepEquivalent().downstream(); | 928 return visiblePosition.next().deepEquivalent().downstream(); |
929 | 929 |
930 // otherwise, make sure to be at the start of the first selected node, | 930 // otherwise, make sure to be at the start of the first selected node, |
931 // instead of possibly at the end of the last node before the selection | 931 // instead of possibly at the end of the last node before the selection |
932 return visiblePosition.deepEquivalent().downstream(); | 932 return visiblePosition.deepEquivalent().downstream(); |
933 } | 933 } |
934 | 934 |
935 } // namespace blink | 935 } // namespace blink |
OLD | NEW |