<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[42280] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/42280">42280</a></dd>
<dt>Author</dt> <dd>mitz@apple.com</dd>
<dt>Date</dt> <dd>2009-04-07 13:03:43 -0700 (Tue, 07 Apr 2009)</dd>
</dl>

<h3>Log Message</h3>
<pre>WebCore:

        Reviewed by Darin Adler.

        - fix &lt;rdar://problem/6764359&gt; Thai word selection misbehaves for the
          last sentence in the document

        Test: editing/selection/thai-word-at-document-end.html

        * editing/visible_units.cpp:
            - Added a BoundarySearchContextAvailability enum used to indicate
            whether the caller to a boundary search function may be able to provide
            additional text in the search direction and call again.
            - Added a named type for the boundary search function signature. Changed
            the signature to take a context availability parameter and a boolean
            out parameter indicating whether more context is needed to perform
            the search.
        (WebCore::previousBoundary): If the beginning of the range was reached
            but the last search wanted more context, perform the search again, this
            time indicating that there is no earlier text.
        (WebCore::nextBoundary): Similarly, in the other direction.
        (WebCore::startWordBoundary): Check whether more context may be available
            and ask for more context if needed.
        (WebCore::endWordBoundary): Ditto.
        (WebCore::previousWordPositionBoundary): Ditto.
        (WebCore::nextWordPositionBoundary): Ditto.
        (WebCore::startSentenceBoundary):  Updated signature.
        (WebCore::endSentenceBoundary): Ditto.
        (WebCore::previousSentencePositionBoundary): Ditto.
        (WebCore::nextSentencePositionBoundary): Ditto.

LayoutTests:

        Reviewed by Darin Adler.

        - test for &lt;rdar://problem/6764359&gt; Thai word selection misbehaves for the
          last sentence in the document

        * editing/selection/thai-word-at-document-end-expected.txt: Added.
        * editing/selection/thai-word-at-document-end.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkWebCoreChangeLog">trunk/WebCore/ChangeLog</a></li>
<li><a href="#trunkWebCoreWebCorexcodeprojprojectpbxproj">trunk/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkWebCoreeditingvisible_unitscpp">trunk/WebCore/editing/visible_units.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestseditingselectionthaiwordatdocumentendexpectedtxt">trunk/LayoutTests/editing/selection/thai-word-at-document-end-expected.txt</a></li>
<li><a href="#trunkLayoutTestseditingselectionthaiwordatdocumentendhtml">trunk/LayoutTests/editing/selection/thai-word-at-document-end.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (42279 => 42280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2009-04-07 19:51:19 UTC (rev 42279)
+++ trunk/LayoutTests/ChangeLog        2009-04-07 20:03:43 UTC (rev 42280)
</span><span class="lines">@@ -1,5 +1,15 @@
</span><span class="cx"> 2009-04-07  Dan Bernstein  &lt;mitz@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Reviewed by Darin Adler.
+
+        - test for &lt;rdar://problem/6764359&gt; Thai word selection misbehaves for the
+          last sentence in the document
+
+        * editing/selection/thai-word-at-document-end-expected.txt: Added.
+        * editing/selection/thai-word-at-document-end.html: Added.
+
+2009-04-07  Dan Bernstein  &lt;mitz@apple.com&gt;
+
</ins><span class="cx">         Reviewed by John Sullivan.
</span><span class="cx"> 
</span><span class="cx">         - test that when -webkit-line-break: after-white-space is combined with
</span></span></pre></div>
<a id="trunkLayoutTestseditingselectionthaiwordatdocumentendexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/editing/selection/thai-word-at-document-end-expected.txt (0 => 42280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/selection/thai-word-at-document-end-expected.txt                                (rev 0)
+++ trunk/LayoutTests/editing/selection/thai-word-at-document-end-expected.txt        2009-04-07 20:03:43 UTC (rev 42280)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+Test for rdar://problem/6764359 Thai word selection misbehaves for the last sentence in the document.
+
+PASS
+ความหมายของหนังสือพิมพ์ และก้าวใหม่ของอินเตอร์ไทย
</ins></span></pre></div>
<a id="trunkLayoutTestseditingselectionthaiwordatdocumentendhtml"></a>
<div class="binary"><h4>Added: trunk/LayoutTests/editing/selection/thai-word-at-document-end.html</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Property changes on: trunk/LayoutTests/editing/selection/thai-word-at-document-end.html
</span><span class="cx">___________________________________________________________________
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="trunkWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/ChangeLog (42279 => 42280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/ChangeLog        2009-04-07 19:51:19 UTC (rev 42279)
+++ trunk/WebCore/ChangeLog        2009-04-07 20:03:43 UTC (rev 42280)
</span><span class="lines">@@ -1,3 +1,34 @@
</span><ins>+2009-04-07  Dan Bernstein  &lt;mitz@apple.com&gt;
+
+        Reviewed by Darin Adler.
+
+        - fix &lt;rdar://problem/6764359&gt; Thai word selection misbehaves for the
+          last sentence in the document
+
+        Test: editing/selection/thai-word-at-document-end.html
+
+        * editing/visible_units.cpp:
+            - Added a BoundarySearchContextAvailability enum used to indicate
+            whether the caller to a boundary search function may be able to provide
+            additional text in the search direction and call again.
+            - Added a named type for the boundary search function signature. Changed
+            the signature to take a context availability parameter and a boolean
+            out parameter indicating whether more context is needed to perform
+            the search.
+        (WebCore::previousBoundary): If the beginning of the range was reached
+            but the last search wanted more context, perform the search again, this
+            time indicating that there is no earlier text.
+        (WebCore::nextBoundary): Similarly, in the other direction.
+        (WebCore::startWordBoundary): Check whether more context may be available
+            and ask for more context if needed.
+        (WebCore::endWordBoundary): Ditto.
+        (WebCore::previousWordPositionBoundary): Ditto.
+        (WebCore::nextWordPositionBoundary): Ditto.
+        (WebCore::startSentenceBoundary):  Updated signature.
+        (WebCore::endSentenceBoundary): Ditto.
+        (WebCore::previousSentencePositionBoundary): Ditto.
+        (WebCore::nextSentencePositionBoundary): Ditto.
+
</ins><span class="cx"> 2009-04-07  Geoffrey Garen  &lt;ggaren@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Rubber stamped by Sam Weinig.
</span></span></pre></div>
<a id="trunkWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/WebCore.xcodeproj/project.pbxproj (42279 => 42280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/WebCore.xcodeproj/project.pbxproj        2009-04-07 19:51:19 UTC (rev 42279)
+++ trunk/WebCore/WebCore.xcodeproj/project.pbxproj        2009-04-07 20:03:43 UTC (rev 42280)
</span><span class="lines">@@ -1956,7 +1956,7 @@
</span><span class="cx">                 935207C009BD412100F2038D /* LocalizedStringsMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 935207BF09BD412000F2038D /* LocalizedStringsMac.mm */; };
</span><span class="cx">                 9352084509BD43B900F2038D /* Language.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9352084409BD43B900F2038D /* Language.mm */; };
</span><span class="cx">                 9352087709BD453400F2038D /* CookieJar.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9352087609BD453400F2038D /* CookieJar.mm */; };
</span><del>-                9352088209BD45E900F2038D /* CookieJar.h in Headers */ = {isa = PBXBuildFile; fileRef = 9352088109BD45E900F2038D /* CookieJar.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><ins>+                9352088209BD45E900F2038D /* CookieJar.h in Headers */ = {isa = PBXBuildFile; fileRef = 9352088109BD45E900F2038D /* CookieJar.h */; };
</ins><span class="cx">                 9353676B09AED88B00D35CD6 /* ScrollViewMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9353676A09AED88B00D35CD6 /* ScrollViewMac.mm */; };
</span><span class="cx">                 935C476309AC4CE600A6AAB4 /* MouseEventWithHitTestResults.h in Headers */ = {isa = PBXBuildFile; fileRef = 935C476209AC4CE600A6AAB4 /* MouseEventWithHitTestResults.h */; };
</span><span class="cx">                 935C476809AC4D4300A6AAB4 /* PlatformKeyboardEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 935C476609AC4D4300A6AAB4 /* PlatformKeyboardEvent.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span></span></pre></div>
<a id="trunkWebCoreeditingvisible_unitscpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/editing/visible_units.cpp (42279 => 42280)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/editing/visible_units.cpp        2009-04-07 19:51:19 UTC (rev 42279)
+++ trunk/WebCore/editing/visible_units.cpp        2009-04-07 20:03:43 UTC (rev 42280)
</span><span class="lines">@@ -61,7 +61,11 @@
</span><span class="cx">     return -1;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static VisiblePosition previousBoundary(const VisiblePosition &amp;c, unsigned (*searchFunction)(const UChar *, unsigned, unsigned))
</del><ins>+enum BoundarySearchContextAvailability { DontHaveMoreContext, MayHaveMoreContext };
+
+typedef unsigned (*BoundarySearchFunction)(const UChar*, unsigned length, unsigned offset, BoundarySearchContextAvailability, bool&amp; needMoreContext);
+
+static VisiblePosition previousBoundary(const VisiblePosition&amp; c, BoundarySearchFunction searchFunction)
</ins><span class="cx"> {
</span><span class="cx">     Position pos = c.deepEquivalent();
</span><span class="cx">     Node *n = pos.node();
</span><span class="lines">@@ -113,6 +117,7 @@
</span><span class="cx">     SimplifiedBackwardsTextIterator it(searchRange.get());
</span><span class="cx">     unsigned next = 0;
</span><span class="cx">     bool inTextSecurityMode = start.node() &amp;&amp; start.node()-&gt;renderer() &amp;&amp; start.node()-&gt;renderer()-&gt;style()-&gt;textSecurity() != TSNONE;
</span><ins>+    bool needMoreContext = false;
</ins><span class="cx">     while (!it.atEnd()) {
</span><span class="cx">         // iterate to get chunks until the searchFunction returns a non-zero value.
</span><span class="cx">         if (!inTextSecurityMode) 
</span><span class="lines">@@ -123,13 +128,18 @@
</span><span class="cx">             iteratorString = iteratorString.impl()-&gt;secure('x');
</span><span class="cx">             string.prepend(iteratorString.characters(), iteratorString.length());
</span><span class="cx">         }
</span><del>-        
-        next = searchFunction(string.data(), string.size(), string.size() - suffixLength);
</del><ins>+        next = searchFunction(string.data(), string.size(), string.size() - suffixLength, MayHaveMoreContext, needMoreContext);
</ins><span class="cx">         if (next != 0)
</span><span class="cx">             break;
</span><span class="cx">         it.advance();
</span><span class="cx">     }
</span><del>-    
</del><ins>+    if (needMoreContext) {
+        // The last search returned the beginning of the buffer and asked for more context,
+        // but there is no earlier text. Force a search with what's available.
+        next = searchFunction(string.data(), string.size(), string.size() - suffixLength, DontHaveMoreContext, needMoreContext);
+        ASSERT(!needMoreContext);
+    }
+
</ins><span class="cx">     if (it.atEnd() &amp;&amp; next == 0) {
</span><span class="cx">         pos = it.range()-&gt;startPosition();
</span><span class="cx">     } else if (next != 0) {
</span><span class="lines">@@ -148,7 +158,7 @@
</span><span class="cx">     return VisiblePosition(pos, DOWNSTREAM);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static VisiblePosition nextBoundary(const VisiblePosition &amp;c, unsigned (*searchFunction)(const UChar *, unsigned, unsigned))
</del><ins>+static VisiblePosition nextBoundary(const VisiblePosition&amp; c, BoundarySearchFunction searchFunction)
</ins><span class="cx"> {
</span><span class="cx">     Position pos = c.deepEquivalent();
</span><span class="cx">     Node *n = pos.node();
</span><span class="lines">@@ -193,6 +203,7 @@
</span><span class="cx">     TextIterator it(searchRange.get(), true);
</span><span class="cx">     unsigned next = 0;
</span><span class="cx">     bool inTextSecurityMode = start.node() &amp;&amp; start.node()-&gt;renderer() &amp;&amp; start.node()-&gt;renderer()-&gt;style()-&gt;textSecurity() != TSNONE;
</span><ins>+    bool needMoreContext = false;
</ins><span class="cx">     while (!it.atEnd()) {
</span><span class="cx">         // Keep asking the iterator for chunks until the search function
</span><span class="cx">         // returns an end value not equal to the length of the string passed to it.
</span><span class="lines">@@ -204,12 +215,17 @@
</span><span class="cx">             iteratorString = iteratorString.impl()-&gt;secure('x');
</span><span class="cx">             string.append(iteratorString.characters(), iteratorString.length());
</span><span class="cx">         }
</span><del>-
-        next = searchFunction(string.data(), string.size(), prefixLength);
</del><ins>+        next = searchFunction(string.data(), string.size(), prefixLength, MayHaveMoreContext, needMoreContext);
</ins><span class="cx">         if (next != string.size())
</span><span class="cx">             break;
</span><span class="cx">         it.advance();
</span><span class="cx">     }
</span><ins>+    if (needMoreContext) {
+        // The last search returned the end of the buffer and asked for more context,
+        // but there is no further text. Force a search with what's available.
+        next = searchFunction(string.data(), string.size(), prefixLength, DontHaveMoreContext, needMoreContext);
+        ASSERT(!needMoreContext);
+    }
</ins><span class="cx">     
</span><span class="cx">     if (it.atEnd() &amp;&amp; next == string.size()) {
</span><span class="cx">         pos = it.range()-&gt;startPosition();
</span><span class="lines">@@ -233,11 +249,14 @@
</span><span class="cx"> 
</span><span class="cx"> // ---------
</span><span class="cx"> 
</span><del>-static unsigned startWordBoundary(const UChar* characters, unsigned length, unsigned offset)
</del><ins>+static unsigned startWordBoundary(const UChar* characters, unsigned length, unsigned offset, BoundarySearchContextAvailability mayHaveMoreContext, bool&amp; needMoreContext)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(offset);
</span><del>-    if (lastNonComplexContextLineBreak(characters, offset) == -1)
</del><ins>+    if (mayHaveMoreContext &amp;&amp; lastNonComplexContextLineBreak(characters, offset) == -1) {
+        needMoreContext = true;
</ins><span class="cx">         return 0;
</span><ins>+    }
+    needMoreContext = false;
</ins><span class="cx">     int start, end;
</span><span class="cx">     findWordBoundary(characters, length, offset - 1, &amp;start, &amp;end);
</span><span class="cx">     return start;
</span><span class="lines">@@ -260,11 +279,14 @@
</span><span class="cx">     return previousBoundary(p, startWordBoundary);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static unsigned endWordBoundary(const UChar* characters, unsigned length, unsigned offset)
</del><ins>+static unsigned endWordBoundary(const UChar* characters, unsigned length, unsigned offset, BoundarySearchContextAvailability mayHaveMoreContext, bool&amp; needMoreContext)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(offset &lt;= length);
</span><del>-    if (firstNonComplexContextLineBreak(characters + offset, length - offset) == static_cast&lt;int&gt;(length - offset))
</del><ins>+    if (mayHaveMoreContext &amp;&amp; firstNonComplexContextLineBreak(characters + offset, length - offset) == static_cast&lt;int&gt;(length - offset)) {
+        needMoreContext = true;
</ins><span class="cx">         return length;
</span><ins>+    }
+    needMoreContext = false;
</ins><span class="cx">     int start, end;
</span><span class="cx">     findWordBoundary(characters, length, offset, &amp;start, &amp;end);
</span><span class="cx">     return end;
</span><span class="lines">@@ -286,10 +308,13 @@
</span><span class="cx">     return nextBoundary(p, endWordBoundary);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static unsigned previousWordPositionBoundary(const UChar* characters, unsigned length, unsigned offset)
</del><ins>+static unsigned previousWordPositionBoundary(const UChar* characters, unsigned length, unsigned offset, BoundarySearchContextAvailability mayHaveMoreContext, bool&amp; needMoreContext)
</ins><span class="cx"> {
</span><del>-    if (lastNonComplexContextLineBreak(characters, offset) == -1)
</del><ins>+    if (mayHaveMoreContext &amp;&amp; lastNonComplexContextLineBreak(characters, offset) == -1) {
+        needMoreContext = true;
</ins><span class="cx">         return 0;
</span><ins>+    }
+    needMoreContext = false;
</ins><span class="cx">     return findNextWordFromIndex(characters, length, offset, false);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -299,10 +324,13 @@
</span><span class="cx">     return c.honorEditableBoundaryAtOrAfter(prev);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static unsigned nextWordPositionBoundary(const UChar* characters, unsigned length, unsigned offset)
</del><ins>+static unsigned nextWordPositionBoundary(const UChar* characters, unsigned length, unsigned offset, BoundarySearchContextAvailability mayHaveMoreContext, bool&amp; needMoreContext)
</ins><span class="cx"> {
</span><del>-    if (firstNonComplexContextLineBreak(characters + offset, length - offset) == static_cast&lt;int&gt;(length - offset))
</del><ins>+    if (mayHaveMoreContext &amp;&amp; firstNonComplexContextLineBreak(characters + offset, length - offset) == static_cast&lt;int&gt;(length - offset)) {
+        needMoreContext = true;
</ins><span class="cx">         return length;
</span><ins>+    }
+    needMoreContext = false;
</ins><span class="cx">     return findNextWordFromIndex(characters, length, offset, true);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -681,7 +709,7 @@
</span><span class="cx"> 
</span><span class="cx"> // ---------
</span><span class="cx"> 
</span><del>-static unsigned startSentenceBoundary(const UChar* characters, unsigned length, unsigned)
</del><ins>+static unsigned startSentenceBoundary(const UChar* characters, unsigned length, unsigned, BoundarySearchContextAvailability, bool&amp;)
</ins><span class="cx"> {
</span><span class="cx">     TextBreakIterator* iterator = sentenceBreakIterator(characters, length);
</span><span class="cx">     // FIXME: The following function can return -1; we don't handle that.
</span><span class="lines">@@ -693,7 +721,7 @@
</span><span class="cx">     return previousBoundary(c, startSentenceBoundary);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static unsigned endSentenceBoundary(const UChar* characters, unsigned length, unsigned)
</del><ins>+static unsigned endSentenceBoundary(const UChar* characters, unsigned length, unsigned, BoundarySearchContextAvailability, bool&amp;)
</ins><span class="cx"> {
</span><span class="cx">     TextBreakIterator* iterator = sentenceBreakIterator(characters, length);
</span><span class="cx">     return textBreakNext(iterator);
</span><span class="lines">@@ -705,7 +733,7 @@
</span><span class="cx">     return nextBoundary(c, endSentenceBoundary);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static unsigned previousSentencePositionBoundary(const UChar* characters, unsigned length, unsigned)
</del><ins>+static unsigned previousSentencePositionBoundary(const UChar* characters, unsigned length, unsigned, BoundarySearchContextAvailability, bool&amp;)
</ins><span class="cx"> {
</span><span class="cx">     // FIXME: This is identical to startSentenceBoundary. I'm pretty sure that's not right.
</span><span class="cx">     TextBreakIterator* iterator = sentenceBreakIterator(characters, length);
</span><span class="lines">@@ -719,7 +747,7 @@
</span><span class="cx">     return c.honorEditableBoundaryAtOrAfter(prev);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static unsigned nextSentencePositionBoundary(const UChar* characters, unsigned length, unsigned)
</del><ins>+static unsigned nextSentencePositionBoundary(const UChar* characters, unsigned length, unsigned, BoundarySearchContextAvailability, bool&amp;)
</ins><span class="cx"> {
</span><span class="cx">     // FIXME: This is identical to endSentenceBoundary.  This isn't right, it needs to 
</span><span class="cx">     // move to the equivlant position in the following sentence.
</span></span></pre>
</div>
</div>

</body>
</html>