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

Side by Side Diff: third_party/WebKit/Source/core/editing/VisibleSelection.h

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 VisiblePositionTemplate<Strategy> visibleStart() const { 83 VisiblePositionTemplate<Strategy> visibleStart() const {
84 return createVisiblePosition( 84 return createVisiblePosition(
85 m_start, isRange() ? TextAffinity::Downstream : affinity()); 85 m_start, isRange() ? TextAffinity::Downstream : affinity());
86 } 86 }
87 VisiblePositionTemplate<Strategy> visibleEnd() const { 87 VisiblePositionTemplate<Strategy> visibleEnd() const {
88 return createVisiblePosition( 88 return createVisiblePosition(
89 m_end, isRange() ? TextAffinity::Upstream : affinity()); 89 m_end, isRange() ? TextAffinity::Upstream : affinity());
90 } 90 }
91 VisiblePositionTemplate<Strategy> visibleBase() const { 91 VisiblePositionTemplate<Strategy> visibleBase() const {
92 return createVisiblePosition( 92 return createVisiblePosition(
93 m_base, isRange() ? (isBaseFirst() ? TextAffinity::Upstream 93 m_base,
94 : TextAffinity::Downstream) 94 isRange() ? (isBaseFirst() ? TextAffinity::Upstream
95 : affinity()); 95 : TextAffinity::Downstream)
96 : affinity());
96 } 97 }
97 VisiblePositionTemplate<Strategy> visibleExtent() const { 98 VisiblePositionTemplate<Strategy> visibleExtent() const {
98 return createVisiblePosition( 99 return createVisiblePosition(m_extent,
99 m_extent, isRange() ? (isBaseFirst() ? TextAffinity::Downstream 100 isRange()
100 : TextAffinity::Upstream) 101 ? (isBaseFirst() ? TextAffinity::Downstream
101 : affinity()); 102 : TextAffinity::Upstream)
103 : affinity());
102 } 104 }
103 105
104 bool operator==(const VisibleSelectionTemplate&) const; 106 bool operator==(const VisibleSelectionTemplate&) const;
105 bool operator!=(const VisibleSelectionTemplate& other) const { 107 bool operator!=(const VisibleSelectionTemplate& other) const {
106 return !operator==(other); 108 return !operator==(other);
107 } 109 }
108 110
109 bool isNone() const { return getSelectionType() == NoSelection; } 111 bool isNone() const { return getSelectionType() == NoSelection; }
110 bool isCaret() const { return getSelectionType() == CaretSelection; } 112 bool isCaret() const { return getSelectionType() == CaretSelection; }
111 bool isRange() const { return getSelectionType() == RangeSelection; } 113 bool isRange() const { return getSelectionType() == RangeSelection; }
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 221
220 #ifndef NDEBUG 222 #ifndef NDEBUG
221 // Outside the WebCore namespace for ease of invocation from gdb. 223 // Outside the WebCore namespace for ease of invocation from gdb.
222 void showTree(const blink::VisibleSelection&); 224 void showTree(const blink::VisibleSelection&);
223 void showTree(const blink::VisibleSelection*); 225 void showTree(const blink::VisibleSelection*);
224 void showTree(const blink::VisibleSelectionInFlatTree&); 226 void showTree(const blink::VisibleSelectionInFlatTree&);
225 void showTree(const blink::VisibleSelectionInFlatTree*); 227 void showTree(const blink::VisibleSelectionInFlatTree*);
226 #endif 228 #endif
227 229
228 #endif // VisibleSelection_h 230 #endif // VisibleSelection_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/SurroundingText.cpp ('k') | third_party/WebKit/Source/core/editing/VisibleUnits.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698