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

Side by Side Diff: third_party/WebKit/Source/core/editing/SelectionModifier.cpp

Issue 2589143003: Add 'get' prefix for Settings.in generated code. (Closed)
Patch Set: Capitalize the prefix. Created 3 years, 12 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, 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 m_selection.setBase(start); 123 m_selection.setBase(start);
124 m_selection.setExtent(end); 124 m_selection.setExtent(end);
125 } else { 125 } else {
126 m_selection.setBase(end); 126 m_selection.setBase(end);
127 m_selection.setExtent(start); 127 m_selection.setExtent(start);
128 } 128 }
129 } 129 }
130 130
131 VisiblePosition SelectionModifier::positionForPlatform(bool isGetStart) const { 131 VisiblePosition SelectionModifier::positionForPlatform(bool isGetStart) const {
132 Settings* settings = frame() ? frame()->settings() : nullptr; 132 Settings* settings = frame() ? frame()->settings() : nullptr;
133 if (settings && settings->editingBehaviorType() == EditingMacBehavior) 133 if (settings && settings->GetEditingBehaviorType() == EditingMacBehavior)
134 return isGetStart ? m_selection.visibleStart() : m_selection.visibleEnd(); 134 return isGetStart ? m_selection.visibleStart() : m_selection.visibleEnd();
135 // Linux and Windows always extend selections from the extent endpoint. 135 // Linux and Windows always extend selections from the extent endpoint.
136 // FIXME: VisibleSelection should be fixed to ensure as an invariant that 136 // FIXME: VisibleSelection should be fixed to ensure as an invariant that
137 // base/extent always point to the same nodes as start/end, but which points 137 // base/extent always point to the same nodes as start/end, but which points
138 // to which depends on the value of isBaseFirst. Then this can be changed 138 // to which depends on the value of isBaseFirst. Then this can be changed
139 // to just return m_sel.extent(). 139 // to just return m_sel.extent().
140 return m_selection.isBaseFirst() ? m_selection.visibleEnd() 140 return m_selection.isBaseFirst() ? m_selection.visibleEnd()
141 : m_selection.visibleStart(); 141 : m_selection.visibleStart();
142 } 142 }
143 143
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 862
863 return x; 863 return x;
864 } 864 }
865 865
866 DEFINE_TRACE(SelectionModifier) { 866 DEFINE_TRACE(SelectionModifier) {
867 visitor->trace(m_frame); 867 visitor->trace(m_frame);
868 visitor->trace(m_selection); 868 visitor->trace(m_selection);
869 } 869 }
870 870
871 } // namespace blink 871 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698