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

Side by Side Diff: third_party/WebKit/Source/platform/text/Character.h

Issue 1916013004: Implement PotentialCustomElementName (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tkent review Created 4 years, 7 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) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 static unsigned expansionOpportunityCount(const UChar*, size_t length, TextD irection, bool& isAfterExpansion, const TextJustify); 73 static unsigned expansionOpportunityCount(const UChar*, size_t length, TextD irection, bool& isAfterExpansion, const TextJustify);
74 static unsigned expansionOpportunityCount(const TextRun& run, bool& isAfterE xpansion) 74 static unsigned expansionOpportunityCount(const TextRun& run, bool& isAfterE xpansion)
75 { 75 {
76 if (run.is8Bit()) 76 if (run.is8Bit())
77 return expansionOpportunityCount(run.characters8(), run.length(), ru n.direction(), isAfterExpansion, run.getTextJustify()); 77 return expansionOpportunityCount(run.characters8(), run.length(), ru n.direction(), isAfterExpansion, run.getTextJustify());
78 return expansionOpportunityCount(run.characters16(), run.length(), run.d irection(), isAfterExpansion, run.getTextJustify()); 78 return expansionOpportunityCount(run.characters16(), run.length(), run.d irection(), isAfterExpansion, run.getTextJustify());
79 } 79 }
80 80
81 static bool isUprightInMixedVertical(UChar32 character); 81 static bool isUprightInMixedVertical(UChar32 character);
82 82
83 // https://html.spec.whatwg.org/multipage/scripting.html#prod-potentialcusto melementname
84 static bool isPotentialCustomElementNameChar(UChar32 character);
85
83 static bool treatAsSpace(UChar32 c) 86 static bool treatAsSpace(UChar32 c)
84 { 87 {
85 return c == spaceCharacter 88 return c == spaceCharacter
86 || c == tabulationCharacter 89 || c == tabulationCharacter
87 || c == newlineCharacter 90 || c == newlineCharacter
88 || c == noBreakSpaceCharacter; 91 || c == noBreakSpaceCharacter;
89 } 92 }
90 static bool treatAsZeroWidthSpace(UChar32 c) 93 static bool treatAsZeroWidthSpace(UChar32 c)
91 { 94 {
92 return treatAsZeroWidthSpaceInComplexScript(c) 95 return treatAsZeroWidthSpaceInComplexScript(c)
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 155
153 static String normalizeSpaces(const LChar*, unsigned length); 156 static String normalizeSpaces(const LChar*, unsigned length);
154 static String normalizeSpaces(const UChar*, unsigned length); 157 static String normalizeSpaces(const UChar*, unsigned length);
155 158
156 static bool isCommonOrInheritedScript(UChar32); 159 static bool isCommonOrInheritedScript(UChar32);
157 }; 160 };
158 161
159 } // namespace blink 162 } // namespace blink
160 163
161 #endif 164 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/custom/CustomElementTest.cpp ('k') | third_party/WebKit/Source/platform/text/Character.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698