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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
291 | 291 |
292 int comparePositions(const VisiblePosition& a, const VisiblePosition& b) { | 292 int comparePositions(const VisiblePosition& a, const VisiblePosition& b) { |
293 return comparePositions(a.deepEquivalent(), b.deepEquivalent()); | 293 return comparePositions(a.deepEquivalent(), b.deepEquivalent()); |
294 } | 294 } |
295 | 295 |
296 // TODO(editing-dev): We should implement real version which refers | 296 // TODO(editing-dev): We should implement real version which refers |
297 // "user-select" CSS property. | 297 // "user-select" CSS property. |
298 // TODO(editing-dev): We should make |SelectionAdjuster| to use this funciton | 298 // TODO(editing-dev): We should make |SelectionAdjuster| to use this funciton |
299 // instead of |isSelectionBondary()|. | 299 // instead of |isSelectionBondary()|. |
300 bool isUserSelectContain(const Node& node) { | 300 bool isUserSelectContain(const Node& node) { |
301 if (!node.layoutObject()) | |
302 return false; | |
yoichio
2017/03/21 06:48:43
We want |isUserSelectContain| independent from lay
yosin_UTC9
2017/03/21 08:48:51
Fumm... It seems we want to introduce isDisplayHid
Xiaocheng
2017/03/21 20:27:48
I'm confused.
What should be the ultimate fix to
yosin_UTC9
2017/03/22 03:19:28
Change canonicalization not to return a position i
| |
301 return isHTMLTextAreaElement(node) || isHTMLInputElement(node) || | 303 return isHTMLTextAreaElement(node) || isHTMLInputElement(node) || |
302 isHTMLSelectElement(node); | 304 isHTMLSelectElement(node); |
303 } | 305 } |
304 | 306 |
305 enum EditableLevel { Editable, RichlyEditable }; | 307 enum EditableLevel { Editable, RichlyEditable }; |
306 static bool hasEditableLevel(const Node& node, EditableLevel editableLevel) { | 308 static bool hasEditableLevel(const Node& node, EditableLevel editableLevel) { |
307 DCHECK(node.document().isActive()); | 309 DCHECK(node.document().isActive()); |
308 // TODO(editing-dev): We should have this check: | 310 // TODO(editing-dev): We should have this check: |
309 // DCHECK_GE(node.document().lifecycle().state(), | 311 // DCHECK_GE(node.document().lifecycle().state(), |
310 // DocumentLifecycle::StyleClean); | 312 // DocumentLifecycle::StyleClean); |
(...skipping 1862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2173 return InputType::DeleteWordBackward; | 2175 return InputType::DeleteWordBackward; |
2174 if (granularity == LineBoundary) | 2176 if (granularity == LineBoundary) |
2175 return InputType::DeleteLineBackward; | 2177 return InputType::DeleteLineBackward; |
2176 return InputType::DeleteContentBackward; | 2178 return InputType::DeleteContentBackward; |
2177 default: | 2179 default: |
2178 return InputType::None; | 2180 return InputType::None; |
2179 } | 2181 } |
2180 } | 2182 } |
2181 | 2183 |
2182 } // namespace blink | 2184 } // namespace blink |
OLD | NEW |