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

Unified Diff: third_party/WebKit/Source/core/dom/Range.cpp

Issue 2783243002: Rename s_range to avoid conflicts with Blink rewrite. (Closed)
Patch Set: Address dcheng@'s feedback. Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Range.cpp
diff --git a/third_party/WebKit/Source/core/dom/Range.cpp b/third_party/WebKit/Source/core/dom/Range.cpp
index 452024df8567c1af088677d2d31139fdda3e4d33..304e806bad8f10962cec4d7f5806532a985743eb 100644
--- a/third_party/WebKit/Source/core/dom/Range.cpp
+++ b/third_party/WebKit/Source/core/dom/Range.cpp
@@ -62,15 +62,15 @@ namespace blink {
class RangeUpdateScope {
STACK_ALLOCATED();
- RangeUpdateScope(Range* range) {
+ explicit RangeUpdateScope(Range* range) {
DCHECK(range);
if (++s_scopeCount == 1) {
m_range = range;
m_oldDocument = range->ownerDocument();
#if DCHECK_IS_ON()
- s_range = range;
+ s_currentRange = range;
} else {
- DCHECK_EQ(s_range, range);
+ DCHECK_EQ(s_currentRange, range);
#endif
}
}
@@ -82,7 +82,7 @@ class RangeUpdateScope {
m_range->removeFromSelectionIfInDifferentRoot(*m_oldDocument);
m_range->updateSelectionIfAddedToSelection();
#if DCHECK_IS_ON()
- s_range = nullptr;
+ s_currentRange = nullptr;
#endif
}
@@ -90,9 +90,10 @@ class RangeUpdateScope {
static int s_scopeCount;
#if DCHECK_IS_ON()
// This raw pointer is safe because
- // - s_range has a valid pointer only if RangeUpdateScope instance is live.
+ // - s_currentRange has a valid pointer only if RangeUpdateScope instance is
+ // live.
// - RangeUpdateScope is used only in Range member functions.
- static Range* s_range;
+ static Range* s_currentRange;
#endif
Member<Range> m_range;
Member<Document> m_oldDocument;
@@ -102,7 +103,7 @@ class RangeUpdateScope {
int RangeUpdateScope::s_scopeCount = 0;
#if DCHECK_IS_ON()
-Range* RangeUpdateScope::s_range;
+Range* RangeUpdateScope::s_currentRange;
#endif
inline Range::Range(Document& ownerDocument)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698