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

Unified Diff: Source/platform/text/TextBreakIterator.cpp

Issue 1277803004: Revert of Elements whose contents start with an astral Unicode symbol disappear when CSS `::first-letter` is … (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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 | « Source/platform/text/TextBreakIterator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/text/TextBreakIterator.cpp
diff --git a/Source/platform/text/TextBreakIterator.cpp b/Source/platform/text/TextBreakIterator.cpp
index 98e21342abfcef452a7e745e81df0c57c0d1edc9..648ce8b0a4d1e51f15f8993f42fae425e88f9c3e 100644
--- a/Source/platform/text/TextBreakIterator.cpp
+++ b/Source/platform/text/TextBreakIterator.cpp
@@ -50,30 +50,6 @@
return num;
}
-ClusterData countCharactersAndGraphemesInCluster(const UChar* normalizedBuffer, unsigned normalizedBufferLength, uint16_t startIndex, uint16_t endIndex)
-{
- if (startIndex > endIndex) {
- uint16_t tempIndex = startIndex;
- startIndex = endIndex;
- endIndex = tempIndex;
- }
-
- uint16_t length = endIndex - startIndex;
- ASSERT(static_cast<unsigned>(startIndex + length) <= normalizedBufferLength);
- TextBreakIterator* cursorPosIterator = cursorMovementIterator(&normalizedBuffer[startIndex], normalizedBufferLength);
-
- int cursorPos = cursorPosIterator->current();
- unsigned numGraphemes = 0;
- while (cursorPos < length) {
- cursorPos = cursorPosIterator->next();
- if (cursorPos == TextBreakDone)
- return ClusterData(numGraphemes, normalizedBufferLength);
-
- numGraphemes++;
- }
-
- return ClusterData(numGraphemes, cursorPos);
-}
static inline bool isBreakableSpace(UChar ch)
{
« no previous file with comments | « Source/platform/text/TextBreakIterator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698