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 selectionHasFocus(const LocalFrame&, const SelectionInFlatTree&); |
84 Element* rootEditableElementOf(const Position&); | 86 Element* rootEditableElementOf(const Position&); |
85 Element* rootEditableElementOf(const PositionInFlatTree&); | 87 Element* rootEditableElementOf(const PositionInFlatTree&); |
86 Element* rootEditableElementOf(const VisiblePosition&); | 88 Element* rootEditableElementOf(const VisiblePosition&); |
87 ContainerNode* rootEditableElementOrTreeScopeRootNodeOf(const Position&); | 89 ContainerNode* rootEditableElementOrTreeScopeRootNodeOf(const Position&); |
88 // highestEditableRoot returns the highest editable node. If the | 90 // highestEditableRoot returns the highest editable node. If the |
89 // rootEditableElement of the speicified Position is <body>, this returns the | 91 // rootEditableElement of the speicified Position is <body>, this returns the |
90 // <body>. Otherwise, this searches ancestors for the highest editable node in | 92 // <body>. Otherwise, this searches ancestors for the highest editable node in |
91 // defiance of editing boundaries. This returns a Document if designMode="on" | 93 // defiance of editing boundaries. This returns a Document if designMode="on" |
92 // and the specified Position is not in the <body>. | 94 // and the specified Position is not in the <body>. |
93 CORE_EXPORT ContainerNode* highestEditableRoot( | 95 CORE_EXPORT ContainerNode* highestEditableRoot( |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 DispatchEventResult dispatchBeforeInputDataTransfer(Node*, | 435 DispatchEventResult dispatchBeforeInputDataTransfer(Node*, |
434 InputEvent::InputType, | 436 InputEvent::InputType, |
435 DataTransfer*); | 437 DataTransfer*); |
436 | 438 |
437 InputEvent::InputType deletionInputTypeFromTextGranularity(DeleteDirection, | 439 InputEvent::InputType deletionInputTypeFromTextGranularity(DeleteDirection, |
438 TextGranularity); | 440 TextGranularity); |
439 | 441 |
440 } // namespace blink | 442 } // namespace blink |
441 | 443 |
442 #endif | 444 #endif |
OLD | NEW |