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

Side by Side Diff: third_party/WebKit/Source/core/html/parser/HTMLEntityParser.cpp

Issue 2729583004: Skip a few "using namespace" that we don't really need. (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2009 Torch Mobile, Inc. http://www.torchmobile.com/ 3 * Copyright (C) 2009 Torch Mobile, Inc. http://www.torchmobile.com/
4 * Copyright (C) 2010 Google, Inc. All Rights Reserved. 4 * Copyright (C) 2010 Google, Inc. All Rights Reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 13 matching lines...) Expand all
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28 #include "core/html/parser/HTMLEntityParser.h" 28 #include "core/html/parser/HTMLEntityParser.h"
29 29
30 #include "core/html/parser/HTMLEntitySearch.h" 30 #include "core/html/parser/HTMLEntitySearch.h"
31 #include "core/html/parser/HTMLEntityTable.h" 31 #include "core/html/parser/HTMLEntityTable.h"
32 #include "wtf/text/StringBuilder.h" 32 #include "wtf/text/StringBuilder.h"
33 33
34 using namespace WTF;
35
36 namespace blink { 34 namespace blink {
37 35
38 static const UChar windowsLatin1ExtensionArray[32] = { 36 static const UChar windowsLatin1ExtensionArray[32] = {
39 0x20AC, 0x0081, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, // 80-87 37 0x20AC, 0x0081, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, // 80-87
40 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0x008D, 0x017D, 0x008F, // 88-8F 38 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0x008D, 0x017D, 0x008F, // 88-8F
41 0x0090, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, // 90-97 39 0x0090, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, // 90-97
42 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0x009D, 0x017E, 0x0178, // 98-9F 40 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0x009D, 0x017E, 0x0178, // 98-9F
43 }; 41 };
44 42
45 static bool isAlphaNumeric(UChar cc) { 43 static bool isAlphaNumeric(UChar cc) {
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 size_t numberOfCodePoints = 300 size_t numberOfCodePoints =
303 appendUChar32ToUCharArray(search.mostRecentMatch()->firstValue, result); 301 appendUChar32ToUCharArray(search.mostRecentMatch()->firstValue, result);
304 if (!search.mostRecentMatch()->secondValue) 302 if (!search.mostRecentMatch()->secondValue)
305 return numberOfCodePoints; 303 return numberOfCodePoints;
306 return numberOfCodePoints + 304 return numberOfCodePoints +
307 appendUChar32ToUCharArray(search.mostRecentMatch()->secondValue, 305 appendUChar32ToUCharArray(search.mostRecentMatch()->secondValue,
308 result + numberOfCodePoints); 306 result + numberOfCodePoints);
309 } 307 }
310 308
311 } // namespace blink 309 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698