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

Side by Side Diff: Source/WebCore/platform/text/TextBoundaries.cpp

Issue 13529026: Removing a bunch of unused platform code. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix whitespace and compiler error on Mac. Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Dominik Röttsches <dominik.roettsches@access-company.com> 3 * Copyright (C) 2009 Dominik Röttsches <dominik.roettsches@access-company.com>
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 for (int i = length; i > 0; ) { 53 for (int i = length; i > 0; ) {
54 int last = i; 54 int last = i;
55 UChar32 ch; 55 UChar32 ch;
56 U16_PREV(characters, 0, i, ch); 56 U16_PREV(characters, 0, i, ch);
57 if (!requiresContextForWordBoundary(ch)) 57 if (!requiresContextForWordBoundary(ch))
58 return last; 58 return last;
59 } 59 }
60 return 0; 60 return 0;
61 } 61 }
62 62
63 #if !PLATFORM(MAC) && !PLATFORM(QT) 63 #if !PLATFORM(MAC)
64 64
65 int findNextWordFromIndex(const UChar* chars, int len, int position, bool forwar d) 65 int findNextWordFromIndex(const UChar* chars, int len, int position, bool forwar d)
66 { 66 {
67 TextBreakIterator* it = wordBreakIterator(chars, len); 67 TextBreakIterator* it = wordBreakIterator(chars, len);
68 68
69 if (forward) { 69 if (forward) {
70 position = textBreakFollowing(it, position); 70 position = textBreakFollowing(it, position);
71 while (position != TextBreakDone) { 71 while (position != TextBreakDone) {
72 // We stop searching when the character preceeding the break 72 // We stop searching when the character preceeding the break
73 // is alphanumeric. 73 // is alphanumeric.
(...skipping 21 matching lines...) Expand all
95 95
96 void findWordBoundary(const UChar* chars, int len, int position, int* start, int * end) 96 void findWordBoundary(const UChar* chars, int len, int position, int* start, int * end)
97 { 97 {
98 TextBreakIterator* it = wordBreakIterator(chars, len); 98 TextBreakIterator* it = wordBreakIterator(chars, len);
99 *end = textBreakFollowing(it, position); 99 *end = textBreakFollowing(it, position);
100 if (*end < 0) 100 if (*end < 0)
101 *end = textBreakLast(it); 101 *end = textBreakLast(it);
102 *start = textBreakPrevious(it); 102 *start = textBreakPrevious(it);
103 } 103 }
104 104
105 #endif // !PLATFORM(MAC) && !PLATFORM(QT) 105 #endif // !PLATFORM(MAC)
106 106
107 } // namespace WebCore 107 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/platform/network/ResourceRequestBase.cpp ('k') | Source/WebCore/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698