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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutText.cpp

Issue 2722313007: Remove some unnecessary using namespaces and add include guards (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutSlider.cpp ('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/layout/LayoutText.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutText.cpp b/third_party/WebKit/Source/core/layout/LayoutText.cpp
index 4d231423dc8a8541287d8b72a45df5eeb74c728e..184f15f8f69943aa0ed58125c59478954be15e42 100644
--- a/third_party/WebKit/Source/core/layout/LayoutText.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutText.cpp
@@ -54,9 +54,6 @@
#include "wtf/text/StringBuffer.h"
#include "wtf/text/StringBuilder.h"
-using namespace WTF;
-using namespace Unicode;
-
namespace blink {
struct SameSizeAsLayoutText : public LayoutObject {
@@ -139,10 +136,12 @@ static void makeCapitalized(String* string, UChar previous) {
int32_t startOfWord = boundary->first();
for (endOfWord = boundary->next(); endOfWord != TextBreakDone;
startOfWord = endOfWord, endOfWord = boundary->next()) {
- if (startOfWord) // Ignore first char of previous string
- result.append(input[startOfWord - 1] == noBreakSpaceCharacter
- ? noBreakSpaceCharacter
- : toTitleCase(stringWithPrevious[startOfWord]));
+ if (startOfWord) { // Ignore first char of previous string
+ result.append(
+ input[startOfWord - 1] == noBreakSpaceCharacter
+ ? noBreakSpaceCharacter
+ : WTF::Unicode::toTitleCase(stringWithPrevious[startOfWord]));
+ }
for (int i = startOfWord + 1; i < endOfWord; i++)
result.append(input[i - 1]);
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutSlider.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698