OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
53 GraphemeCluster, | 53 GraphemeCluster, |
54 }; | 54 }; |
55 | 55 |
56 enum class DeleteDirection { | 56 enum class DeleteDirection { |
57 Forward, | 57 Forward, |
58 Backward, | 58 Backward, |
59 }; | 59 }; |
60 | 60 |
61 class Document; | 61 class Document; |
62 class Element; | 62 class Element; |
63 class LocalFrame; | |
63 class HTMLElement; | 64 class HTMLElement; |
64 class HTMLSpanElement; | 65 class HTMLSpanElement; |
65 class Node; | 66 class Node; |
66 class Range; | 67 class Range; |
67 | 68 |
68 // This file contains a set of helper functions used by the editing commands | 69 // This file contains a set of helper functions used by the editing commands |
69 | 70 |
70 CORE_EXPORT bool needsLayoutTreeUpdate(const Position&); | 71 CORE_EXPORT bool needsLayoutTreeUpdate(const Position&); |
71 CORE_EXPORT bool needsLayoutTreeUpdate(const PositionInFlatTree&); | 72 CORE_EXPORT bool needsLayoutTreeUpdate(const PositionInFlatTree&); |
72 | 73 |
73 // ------------------------------------------------------------------------- | 74 // ------------------------------------------------------------------------- |
74 // Node | 75 // Node |
75 // ------------------------------------------------------------------------- | 76 // ------------------------------------------------------------------------- |
76 | 77 |
77 // Returns true if |node| has "user-select:contain". | 78 // Returns true if |node| has "user-select:contain". |
78 bool isUserSelectContain(const Node& /* node */); | 79 bool isUserSelectContain(const Node& /* node */); |
79 | 80 |
80 CORE_EXPORT bool hasEditableStyle(const Node&); | 81 CORE_EXPORT bool hasEditableStyle(const Node&); |
81 CORE_EXPORT bool hasRichlyEditableStyle(const Node&); | 82 CORE_EXPORT bool hasRichlyEditableStyle(const Node&); |
82 CORE_EXPORT bool isRootEditableElement(const Node&); | 83 CORE_EXPORT bool isRootEditableElement(const Node&); |
83 CORE_EXPORT Element* rootEditableElement(const Node&); | 84 CORE_EXPORT Element* rootEditableElement(const Node&); |
85 bool isSelectionInDocument(const VisibleSelectionInFlatTree&, const Document&); | |
yosin_UTC9
2017/03/21 06:49:59
Could you use |SelectionInFlatTree| instead of |Vi
hugoh_UTC2
2017/03/22 02:54:47
Yes, PendingSelection::commit has a |SelectionInFl
| |
86 bool selectionHasFocus(const LocalFrame&); | |
84 Element* rootEditableElementOf(const Position&); | 87 Element* rootEditableElementOf(const Position&); |
85 Element* rootEditableElementOf(const PositionInFlatTree&); | 88 Element* rootEditableElementOf(const PositionInFlatTree&); |
86 Element* rootEditableElementOf(const VisiblePosition&); | 89 Element* rootEditableElementOf(const VisiblePosition&); |
87 ContainerNode* rootEditableElementOrTreeScopeRootNodeOf( | 90 ContainerNode* rootEditableElementOrTreeScopeRootNodeOf( |
88 const VisibleSelection&); | 91 const VisibleSelection&); |
89 // highestEditableRoot returns the highest editable node. If the | 92 // highestEditableRoot returns the highest editable node. If the |
90 // rootEditableElement of the speicified Position is <body>, this returns the | 93 // rootEditableElement of the speicified Position is <body>, this returns the |
91 // <body>. Otherwise, this searches ancestors for the highest editable node in | 94 // <body>. Otherwise, this searches ancestors for the highest editable node in |
92 // defiance of editing boundaries. This returns a Document if designMode="on" | 95 // defiance of editing boundaries. This returns a Document if designMode="on" |
93 // and the specified Position is not in the <body>. | 96 // and the specified Position is not in the <body>. |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
426 DispatchEventResult dispatchBeforeInputDataTransfer(Node*, | 429 DispatchEventResult dispatchBeforeInputDataTransfer(Node*, |
427 InputEvent::InputType, | 430 InputEvent::InputType, |
428 DataTransfer*); | 431 DataTransfer*); |
429 | 432 |
430 InputEvent::InputType deletionInputTypeFromTextGranularity(DeleteDirection, | 433 InputEvent::InputType deletionInputTypeFromTextGranularity(DeleteDirection, |
431 TextGranularity); | 434 TextGranularity); |
432 | 435 |
433 } // namespace blink | 436 } // namespace blink |
434 | 437 |
435 #endif | 438 #endif |
OLD | NEW |