Commit d10c815b authored by danakj's avatar danakj Committed by Commit bot

Fix naming style of constants named in SHOUT_CASE.

One of these really wants to be an enum, and then it stays SHOUT_CASE,
the others are consts, and should be UsualConstCase.

BUG=578344

Review URL: https://codereview.chromium.org/1625763002

Cr-Commit-Position: refs/heads/master@{#371402}
parent 7767ed89
...@@ -40,8 +40,7 @@ namespace blink { ...@@ -40,8 +40,7 @@ namespace blink {
class LayoutPoint; class LayoutPoint;
// TODO(yosin) We should use capitalized name instead of |SEL_DEFAULT_AFFINITY|. const TextAffinity SelDefaultAffinity = TextAffinity::Downstream;
const TextAffinity SEL_DEFAULT_AFFINITY = TextAffinity::Downstream; // NOLINT
enum SelectionDirection { DirectionForward, DirectionBackward, DirectionRight, DirectionLeft }; enum SelectionDirection { DirectionForward, DirectionBackward, DirectionRight, DirectionLeft };
// Listener of |VisibleSelection| modification. |didChangeVisibleSelection()| // Listener of |VisibleSelection| modification. |didChangeVisibleSelection()|
...@@ -66,8 +65,8 @@ class CORE_TEMPLATE_CLASS_EXPORT VisibleSelectionTemplate { ...@@ -66,8 +65,8 @@ class CORE_TEMPLATE_CLASS_EXPORT VisibleSelectionTemplate {
public: public:
VisibleSelectionTemplate(); VisibleSelectionTemplate();
VisibleSelectionTemplate(const PositionTemplate<Strategy>&, TextAffinity, bool isDirectional = false); VisibleSelectionTemplate(const PositionTemplate<Strategy>&, TextAffinity, bool isDirectional = false);
VisibleSelectionTemplate(const PositionTemplate<Strategy>& base, const PositionTemplate<Strategy>& extent, TextAffinity = SEL_DEFAULT_AFFINITY, bool isDirectional = false); VisibleSelectionTemplate(const PositionTemplate<Strategy>& base, const PositionTemplate<Strategy>& extent, TextAffinity = SelDefaultAffinity, bool isDirectional = false);
explicit VisibleSelectionTemplate(const EphemeralRangeTemplate<Strategy>&, TextAffinity = SEL_DEFAULT_AFFINITY, bool isDirectional = false); explicit VisibleSelectionTemplate(const EphemeralRangeTemplate<Strategy>&, TextAffinity = SelDefaultAffinity, bool isDirectional = false);
explicit VisibleSelectionTemplate(const VisiblePositionTemplate<Strategy>&, bool isDirectional = false); explicit VisibleSelectionTemplate(const VisiblePositionTemplate<Strategy>&, bool isDirectional = false);
VisibleSelectionTemplate(const VisiblePositionTemplate<Strategy>&, const VisiblePositionTemplate<Strategy>&, bool isDirectional = false); VisibleSelectionTemplate(const VisiblePositionTemplate<Strategy>&, const VisiblePositionTemplate<Strategy>&, bool isDirectional = false);
......
...@@ -1384,9 +1384,9 @@ void ReplaceSelectionCommand::completeHTMLReplacement(const Position &lastPositi ...@@ -1384,9 +1384,9 @@ void ReplaceSelectionCommand::completeHTMLReplacement(const Position &lastPositi
m_endOfInsertedRange = end; m_endOfInsertedRange = end;
if (m_selectReplacement) if (m_selectReplacement)
setEndingSelection(VisibleSelection(start, end, SEL_DEFAULT_AFFINITY, endingSelection().isDirectional())); setEndingSelection(VisibleSelection(start, end, SelDefaultAffinity, endingSelection().isDirectional()));
else else
setEndingSelection(VisibleSelection(end, SEL_DEFAULT_AFFINITY, endingSelection().isDirectional())); setEndingSelection(VisibleSelection(end, SelDefaultAffinity, endingSelection().isDirectional()));
} }
void ReplaceSelectionCommand::mergeTextNodesAroundPosition(Position& position, Position& positionOnlyToBeUpdated) void ReplaceSelectionCommand::mergeTextNodesAroundPosition(Position& position, Position& positionOnlyToBeUpdated)
......
...@@ -63,10 +63,11 @@ public: ...@@ -63,10 +63,11 @@ public:
String url() const; String url() const;
bool withCredentials() const; bool withCredentials() const;
typedef short State; enum State : unsigned short {
static const State CONNECTING = 0; CONNECTING = 0,
static const State OPEN = 1; OPEN = 1,
static const State CLOSED = 2; CLOSED = 2
};
State readyState() const; State readyState() const;
......
...@@ -78,7 +78,7 @@ namespace blink { ...@@ -78,7 +78,7 @@ namespace blink {
typedef double Vector4[4]; typedef double Vector4[4];
typedef double Vector3[3]; typedef double Vector3[3];
const double SMALL_NUMBER = 1.e-8; const double SmallNumber = 1.e-8;
// inverse(original_matrix, inverse_matrix) // inverse(original_matrix, inverse_matrix)
// //
...@@ -220,7 +220,7 @@ static bool inverse(const TransformationMatrix::Matrix4& matrix, TransformationM ...@@ -220,7 +220,7 @@ static bool inverse(const TransformationMatrix::Matrix4& matrix, TransformationM
// then the inverse matrix is not unique. // then the inverse matrix is not unique.
double det = determinant4x4(matrix); double det = determinant4x4(matrix);
if (fabs(det) < SMALL_NUMBER) if (fabs(det) < SmallNumber)
return false; return false;
#if CPU(ARM64) #if CPU(ARM64)
...@@ -1449,7 +1449,7 @@ bool TransformationMatrix::isInvertible() const ...@@ -1449,7 +1449,7 @@ bool TransformationMatrix::isInvertible() const
double det = blink::determinant4x4(m_matrix); double det = blink::determinant4x4(m_matrix);
if (fabs(det) < SMALL_NUMBER) if (fabs(det) < SmallNumber)
return false; return false;
return true; return true;
......
...@@ -427,7 +427,7 @@ void WebFrameWidgetImpl::setFocus(bool enable) ...@@ -427,7 +427,7 @@ void WebFrameWidgetImpl::setFocus(bool enable)
// instead. Note that this has the side effect of moving the // instead. Note that this has the side effect of moving the
// caret back to the beginning of the text. // caret back to the beginning of the text.
Position position(element, 0); Position position(element, 0);
focusedFrame->selection().setSelection(VisibleSelection(position, SEL_DEFAULT_AFFINITY)); focusedFrame->selection().setSelection(VisibleSelection(position, SelDefaultAffinity));
} }
} }
} }
......
...@@ -2295,7 +2295,7 @@ void WebViewImpl::setFocus(bool enable) ...@@ -2295,7 +2295,7 @@ void WebViewImpl::setFocus(bool enable)
// instead. Note that this has the side effect of moving the // instead. Note that this has the side effect of moving the
// caret back to the beginning of the text. // caret back to the beginning of the text.
Position position(element, 0); Position position(element, 0);
focusedFrame->selection().setSelection(VisibleSelection(position, SEL_DEFAULT_AFFINITY)); focusedFrame->selection().setSelection(VisibleSelection(position, SelDefaultAffinity));
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment