Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(604)

Side by Side Diff: sky/engine/core/editing/VisibleSelection.h

Issue 928393003: Remove the concept of document.documentElement (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2004 Apple Computer, 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 bool isCaret() const { return selectionType() == CaretSelection; } 82 bool isCaret() const { return selectionType() == CaretSelection; }
83 bool isRange() const { return selectionType() == RangeSelection; } 83 bool isRange() const { return selectionType() == RangeSelection; }
84 bool isCaretOrRange() const { return selectionType() != NoSelection; } 84 bool isCaretOrRange() const { return selectionType() != NoSelection; }
85 bool isNonOrphanedRange() const { return isRange() && !start().isOrphan() && !end().isOrphan(); } 85 bool isNonOrphanedRange() const { return isRange() && !start().isOrphan() && !end().isOrphan(); }
86 bool isNonOrphanedCaretOrRange() const { return isCaretOrRange() && !start() .isOrphan() && !end().isOrphan(); } 86 bool isNonOrphanedCaretOrRange() const { return isCaretOrRange() && !start() .isOrphan() && !end().isOrphan(); }
87 87
88 bool isBaseFirst() const { return m_baseIsFirst; } 88 bool isBaseFirst() const { return m_baseIsFirst; }
89 bool isDirectional() const { return m_isDirectional; } 89 bool isDirectional() const { return m_isDirectional; }
90 void setIsDirectional(bool isDirectional) { m_isDirectional = isDirectional; } 90 void setIsDirectional(bool isDirectional) { m_isDirectional = isDirectional; }
91 91
92 void appendTrailingWhitespace();
93
94 bool expandUsingGranularity(TextGranularity granularity); 92 bool expandUsingGranularity(TextGranularity granularity);
95 93
96 // We don't yet support multi-range selections, so we only ever have one ran ge to return. 94 // We don't yet support multi-range selections, so we only ever have one ran ge to return.
97 PassRefPtr<Range> firstRange() const; 95 PassRefPtr<Range> firstRange() const;
98 96
99 // FIXME: Most callers probably don't want this function, but are using it 97 // FIXME: Most callers probably don't want this function, but are using it
100 // for historical reasons. toNormalizedRange contracts the range around 98 // for historical reasons. toNormalizedRange contracts the range around
101 // text, and moves the caret upstream before returning the range. 99 // text, and moves the caret upstream before returning the range.
102 PassRefPtr<Range> toNormalizedRange() const; 100 PassRefPtr<Range> toNormalizedRange() const;
103 101
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 180
183 } // namespace blink 181 } // namespace blink
184 182
185 #ifndef NDEBUG 183 #ifndef NDEBUG
186 // Outside the WebCore namespace for ease of invocation from gdb. 184 // Outside the WebCore namespace for ease of invocation from gdb.
187 void showTree(const blink::VisibleSelection&); 185 void showTree(const blink::VisibleSelection&);
188 void showTree(const blink::VisibleSelection*); 186 void showTree(const blink::VisibleSelection*);
189 #endif 187 #endif
190 188
191 #endif // SKY_ENGINE_CORE_EDITING_VISIBLESELECTION_H_ 189 #endif // SKY_ENGINE_CORE_EDITING_VISIBLESELECTION_H_
OLDNEW
« no previous file with comments | « sky/engine/core/editing/SurroundingText.cpp ('k') | sky/engine/core/editing/VisibleSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698