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

Unified Diff: third_party/WebKit/Source/core/editing/WebSubstringUtil.mm

Issue 2965323002: Avoid "using namespace blink" in global scope (Closed)
Patch Set: Use anonymous namespaces Created 3 years, 5 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 | « third_party/WebKit/Source/core/editing/BUILD.gn ('k') | 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/editing/WebSubstringUtil.mm
diff --git a/third_party/WebKit/Source/core/editing/WebSubstringUtil.mm b/third_party/WebKit/Source/core/editing/WebSubstringUtil.mm
index ca0473fbe4eeadc7d971b6f3514b6152acc75909..752ed80813f50260bc9ce50a182fd54a4351d03c 100644
--- a/third_party/WebKit/Source/core/editing/WebSubstringUtil.mm
+++ b/third_party/WebKit/Source/core/editing/WebSubstringUtil.mm
@@ -58,11 +58,12 @@
#include "public/web/WebHitTestResult.h"
#include "public/web/WebLocalFrame.h"
-using namespace blink;
+namespace blink {
+
+namespace {
-static NSAttributedString* attributedSubstringFromRange(
- const EphemeralRange& range,
- float fontScale) {
+NSAttributedString* attributedSubstringFromRange(const EphemeralRange& range,
+ float fontScale) {
NSMutableAttributedString* string = [[NSMutableAttributedString alloc] init];
NSMutableDictionary* attrs = [NSMutableDictionary dictionary];
size_t length = range.EndPosition().ComputeOffsetInContainerNode() -
@@ -149,7 +150,7 @@ WebPoint getBaselinePoint(LocalFrameView* frameView,
return stringPoint;
}
-namespace blink {
+} // namespace
NSAttributedString* WebSubstringUtil::AttributedWordAtPoint(
WebFrameWidget* frame_widget,
« no previous file with comments | « third_party/WebKit/Source/core/editing/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698