| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 typedef unsigned SetSelectionOptions; | 93 typedef unsigned SetSelectionOptions; |
| 94 static inline EUserTriggered selectionOptionsToUserTriggered( | 94 static inline EUserTriggered selectionOptionsToUserTriggered( |
| 95 SetSelectionOptions options) { | 95 SetSelectionOptions options) { |
| 96 return static_cast<EUserTriggered>(options & UserTriggered); | 96 return static_cast<EUserTriggered>(options & UserTriggered); |
| 97 } | 97 } |
| 98 | 98 |
| 99 bool isAvailable() const { return lifecycleContext(); } | 99 bool isAvailable() const { return lifecycleContext(); } |
| 100 // You should not call |document()| when |!isAvailable()|. | 100 // You should not call |document()| when |!isAvailable()|. |
| 101 Document& document() const; | 101 Document& document() const; |
| 102 LocalFrame* frame() const { return m_frame; } | 102 LocalFrame* frame() const { return m_frame; } |
| 103 Element* rootEditableElement() const { | |
| 104 return computeVisibleSelectionInDOMTreeDeprecated().rootEditableElement(); | |
| 105 } | |
| 106 Element* rootEditableElementOrDocumentElement() const; | 103 Element* rootEditableElementOrDocumentElement() const; |
| 107 ContainerNode* rootEditableElementOrTreeScopeRootNode() const; | 104 ContainerNode* rootEditableElementOrTreeScopeRootNode() const; |
| 108 | 105 |
| 109 bool hasEditableStyle() const { | 106 bool hasEditableStyle() const { |
| 110 return computeVisibleSelectionInDOMTreeDeprecated().hasEditableStyle(); | 107 return computeVisibleSelectionInDOMTreeDeprecated().hasEditableStyle(); |
| 111 } | 108 } |
| 112 bool isContentEditable() const { | 109 bool isContentEditable() const { |
| 113 return computeVisibleSelectionInDOMTreeDeprecated().isContentEditable(); | 110 return computeVisibleSelectionInDOMTreeDeprecated().isContentEditable(); |
| 114 } | 111 } |
| 115 | 112 |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 | 349 |
| 353 } // namespace blink | 350 } // namespace blink |
| 354 | 351 |
| 355 #ifndef NDEBUG | 352 #ifndef NDEBUG |
| 356 // Outside the WebCore namespace for ease of invocation from gdb. | 353 // Outside the WebCore namespace for ease of invocation from gdb. |
| 357 void showTree(const blink::FrameSelection&); | 354 void showTree(const blink::FrameSelection&); |
| 358 void showTree(const blink::FrameSelection*); | 355 void showTree(const blink::FrameSelection*); |
| 359 #endif | 356 #endif |
| 360 | 357 |
| 361 #endif // FrameSelection_h | 358 #endif // FrameSelection_h |
| OLD | NEW |