<!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>[164964] trunk/Source</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/164964">164964</a></dd>
<dt>Author</dt> <dd>darin@apple.com</dd>
<dt>Date</dt> <dd>2014-03-02 18:30:37 -0800 (Sun, 02 Mar 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Streamline use of TextIterator, cutting down includes and use of soon-to-be-deleted functions
https://bugs.webkit.org/show_bug.cgi?id=129592

Reviewed by Sam Weinig.

Source/WebCore:

* WebCore.exp.in: Re-sorted this file. Not sure how it got unsorted.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::stringForVisiblePositionRange): Call TextIterator::text
instead of TextIterator::length. Also removed unneeded special case for empty string
and exception code.
(WebCore::AccessibilityObject::lengthForVisiblePositionRange): Ditto.

* accessibility/AccessibilityObject.h: Include TextIteratorBehavior.h instead of
TextIterator.h.

* accessibility/AccessibilityRenderObject.cpp: Include TextIterator.h.

* accessibility/mac/WebAccessibilityObjectWrapperBase.mm: Removed unneeded
TextIterator.h include.

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:]): Call
TextIterator::text instead of TextIterator::length.

* dom/Element.cpp: Include TextIterator.h.

* dom/Node.cpp: Include Range.h.

* dom/Position.cpp:
(WebCore::Position::isCandidate): Cast to RenderBlockFlow since that's what the
type check above does. Use a return statement instead of an else for better flow.
(WebCore::Position::leadingWhitespacePosition): Call
deprecatedIsCollapsibleWhitespace by its new name (newly deprecated).
(WebCore::Position::trailingWhitespacePosition): Ditto.

* dom/Range.cpp:
(WebCore::Range::firstNode): Added a FIXME about code that clearly does not
belong. This is something we really need to fix.

* editing/AlternativeTextController.cpp: Include TextIterator.h.
* editing/ApplyStyleCommand.cpp: Ditto.

* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::prepareWhitespaceAtPositionForSplit): Call
deprecatedIsCollapsibleWhitespace by its new name (newly deprecated).

* editing/Editor.h: Include TextIteratorBehavior.h instead of TextIterator.h.

* editing/HTMLInterchange.cpp:
(WebCore::convertHTMLTextToInterchangeFormat): Call
deprecatedIsCollapsibleWhitespace by its new name (newly deprecated).

* editing/SpellingCorrectionCommand.cpp: Include TextIterator.h.

* editing/TextIterator.h: Moved isCollapsibleWhitespace from here into
htmlediting.h and renamed it deprecatedIsCollapsibleWhitespace.

* editing/TextIterator.cpp: Call
deprecatedIsCollapsibleWhitespace by its new name (newly deprecated).

* editing/TypingCommand.cpp: Include TextIterator.h.

* editing/VisibleUnits.cpp:
(WebCore::previousBoundary): Call TextIterator::text instead of
TextIterator::length.
(WebCore::nextBoundary): Ditto.

* editing/htmlediting.cpp: Include TextIterator.h.

* editing/htmlediting.h: Removed non-helpful section comments.
Added FIXME about isWhitespace. Added deprecatedIsCollapsibleWhitespace,
formerly not deprecated and in TextIterator.h.

* editing/markup.cpp: Include TextIterator.h.

* html/HTMLTextAreaElement.cpp: Include TextIterator.h.

* page/ContextMenuController.cpp:
(WebCore::selectionContainsPossibleWord): Call TextIterator::text
instead of TextIterator::length and TextIterator::characterAt.

* page/EventHandler.cpp: Sorted conditional includes alphabetically by condition.

* platform/mac/HTMLConverter.mm:
(+[WebHTMLConverter editingAttributedStringFromRange:]): Call TextIterator::text
instead of TextIterator::length.

Source/WebKit/win:

* WebCoreSupport/WebEditorClient.cpp: Added now-needed include.

Source/WebKit2:

* UIProcess/WebPageProxy.cpp: Added now-needed include.
* WebProcess/WebPage/WebPage.cpp: Ditto.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityObject.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityObjecth">trunk/Source/WebCore/accessibility/AccessibilityObject.h</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityRenderObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilitymacWebAccessibilityObjectWrapperBasemm">trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm</a></li>
<li><a href="#trunkSourceWebCoreaccessibilitymacWebAccessibilityObjectWrapperMacmm">trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm</a></li>
<li><a href="#trunkSourceWebCoredomElementcpp">trunk/Source/WebCore/dom/Element.cpp</a></li>
<li><a href="#trunkSourceWebCoredomNodecpp">trunk/Source/WebCore/dom/Node.cpp</a></li>
<li><a href="#trunkSourceWebCoredomPositioncpp">trunk/Source/WebCore/dom/Position.cpp</a></li>
<li><a href="#trunkSourceWebCoredomRangecpp">trunk/Source/WebCore/dom/Range.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingAlternativeTextControllercpp">trunk/Source/WebCore/editing/AlternativeTextController.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingApplyStyleCommandcpp">trunk/Source/WebCore/editing/ApplyStyleCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingCompositeEditCommandcpp">trunk/Source/WebCore/editing/CompositeEditCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingEditorh">trunk/Source/WebCore/editing/Editor.h</a></li>
<li><a href="#trunkSourceWebCoreeditingHTMLInterchangecpp">trunk/Source/WebCore/editing/HTMLInterchange.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingSpellingCorrectionCommandcpp">trunk/Source/WebCore/editing/SpellingCorrectionCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingTextIteratorcpp">trunk/Source/WebCore/editing/TextIterator.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingTextIteratorh">trunk/Source/WebCore/editing/TextIterator.h</a></li>
<li><a href="#trunkSourceWebCoreeditingTypingCommandcpp">trunk/Source/WebCore/editing/TypingCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingVisibleUnitscpp">trunk/Source/WebCore/editing/VisibleUnits.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditinghtmleditingcpp">trunk/Source/WebCore/editing/htmlediting.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditinghtmleditingh">trunk/Source/WebCore/editing/htmlediting.h</a></li>
<li><a href="#trunkSourceWebCoreeditingmarkupcpp">trunk/Source/WebCore/editing/markup.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLTextAreaElementcpp">trunk/Source/WebCore/html/HTMLTextAreaElement.cpp</a></li>
<li><a href="#trunkSourceWebCorepageContextMenuControllercpp">trunk/Source/WebCore/page/ContextMenuController.cpp</a></li>
<li><a href="#trunkSourceWebCorepageEventHandlercpp">trunk/Source/WebCore/page/EventHandler.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformmacHTMLConvertermm">trunk/Source/WebCore/platform/mac/HTMLConverter.mm</a></li>
<li><a href="#trunkSourceWebKitwinChangeLog">trunk/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitwinWebCoreSupportWebEditorClientcpp">trunk/Source/WebKit/win/WebCoreSupport/WebEditorClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (164963 => 164964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-03-03 02:07:25 UTC (rev 164963)
+++ trunk/Source/WebCore/ChangeLog        2014-03-03 02:30:37 UTC (rev 164964)
</span><span class="lines">@@ -1,3 +1,93 @@
</span><ins>+2014-03-02  Darin Adler  &lt;darin@apple.com&gt;
+
+        Streamline use of TextIterator, cutting down includes and use of soon-to-be-deleted functions
+        https://bugs.webkit.org/show_bug.cgi?id=129592
+
+        Reviewed by Sam Weinig.
+
+        * WebCore.exp.in: Re-sorted this file. Not sure how it got unsorted.
+
+        * accessibility/AccessibilityObject.cpp:
+        (WebCore::AccessibilityObject::stringForVisiblePositionRange): Call TextIterator::text
+        instead of TextIterator::length. Also removed unneeded special case for empty string
+        and exception code.
+        (WebCore::AccessibilityObject::lengthForVisiblePositionRange): Ditto.
+
+        * accessibility/AccessibilityObject.h: Include TextIteratorBehavior.h instead of
+        TextIterator.h.
+
+        * accessibility/AccessibilityRenderObject.cpp: Include TextIterator.h.
+
+        * accessibility/mac/WebAccessibilityObjectWrapperBase.mm: Removed unneeded
+        TextIterator.h include.
+
+        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+        (-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:]): Call
+        TextIterator::text instead of TextIterator::length.
+
+        * dom/Element.cpp: Include TextIterator.h.
+
+        * dom/Node.cpp: Include Range.h.
+
+        * dom/Position.cpp:
+        (WebCore::Position::isCandidate): Cast to RenderBlockFlow since that's what the
+        type check above does. Use a return statement instead of an else for better flow.
+        (WebCore::Position::leadingWhitespacePosition): Call
+        deprecatedIsCollapsibleWhitespace by its new name (newly deprecated).
+        (WebCore::Position::trailingWhitespacePosition): Ditto.
+
+        * dom/Range.cpp:
+        (WebCore::Range::firstNode): Added a FIXME about code that clearly does not
+        belong. This is something we really need to fix.
+
+        * editing/AlternativeTextController.cpp: Include TextIterator.h.
+        * editing/ApplyStyleCommand.cpp: Ditto.
+
+        * editing/CompositeEditCommand.cpp:
+        (WebCore::CompositeEditCommand::prepareWhitespaceAtPositionForSplit): Call
+        deprecatedIsCollapsibleWhitespace by its new name (newly deprecated).
+
+        * editing/Editor.h: Include TextIteratorBehavior.h instead of TextIterator.h.
+
+        * editing/HTMLInterchange.cpp:
+        (WebCore::convertHTMLTextToInterchangeFormat): Call
+        deprecatedIsCollapsibleWhitespace by its new name (newly deprecated).
+
+        * editing/SpellingCorrectionCommand.cpp: Include TextIterator.h.
+
+        * editing/TextIterator.h: Moved isCollapsibleWhitespace from here into
+        htmlediting.h and renamed it deprecatedIsCollapsibleWhitespace.
+
+        * editing/TextIterator.cpp: Call
+        deprecatedIsCollapsibleWhitespace by its new name (newly deprecated).
+
+        * editing/TypingCommand.cpp: Include TextIterator.h.
+
+        * editing/VisibleUnits.cpp:
+        (WebCore::previousBoundary): Call TextIterator::text instead of
+        TextIterator::length.
+        (WebCore::nextBoundary): Ditto.
+
+        * editing/htmlediting.cpp: Include TextIterator.h.
+
+        * editing/htmlediting.h: Removed non-helpful section comments.
+        Added FIXME about isWhitespace. Added deprecatedIsCollapsibleWhitespace,
+        formerly not deprecated and in TextIterator.h.
+
+        * editing/markup.cpp: Include TextIterator.h.
+
+        * html/HTMLTextAreaElement.cpp: Include TextIterator.h.
+
+        * page/ContextMenuController.cpp:
+        (WebCore::selectionContainsPossibleWord): Call TextIterator::text
+        instead of TextIterator::length and TextIterator::characterAt.
+
+        * page/EventHandler.cpp: Sorted conditional includes alphabetically by condition.
+
+        * platform/mac/HTMLConverter.mm:
+        (+[WebHTMLConverter editingAttributedStringFromRange:]): Call TextIterator::text
+        instead of TextIterator::length.
+
</ins><span class="cx"> 2014-03-02  Benjamin Poulain  &lt;benjamin@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Add a fallback path for compiling the remaining attribute checkers
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (164963 => 164964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-03-03 02:07:25 UTC (rev 164963)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-03-03 02:30:37 UTC (rev 164964)
</span><span class="lines">@@ -1339,8 +1339,8 @@
</span><span class="cx"> __ZN7WebCore9FrameView6createERNS_5FrameE
</span><span class="cx"> __ZN7WebCore9HTMLNames10actionAttrE
</span><span class="cx"> __ZN7WebCore9HTMLNames10listingTagE
</span><ins>+__ZN7WebCore9HTMLNames11optgroupTagE
</ins><span class="cx"> __ZN7WebCore9HTMLNames11textareaTagE
</span><del>-__ZN7WebCore9HTMLNames11optgroupTagE
</del><span class="cx"> __ZN7WebCore9HTMLNames12disabledAttrE
</span><span class="cx"> __ZN7WebCore9HTMLNames12selectedAttrE
</span><span class="cx"> __ZN7WebCore9HTMLNames13blockquoteTagE
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (164963 => 164964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2014-03-03 02:07:25 UTC (rev 164963)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2014-03-03 02:30:37 UTC (rev 164964)
</span><span class="lines">@@ -59,6 +59,7 @@
</span><span class="cx"> #include &quot;Settings.h&quot;
</span><span class="cx"> #include &quot;TextCheckerClient.h&quot;
</span><span class="cx"> #include &quot;TextCheckingHelper.h&quot;
</span><ins>+#include &quot;TextIterator.h&quot;
</ins><span class="cx"> #include &quot;UserGestureIndicator.h&quot;
</span><span class="cx"> #include &quot;VisibleUnits.h&quot;
</span><span class="cx"> #include &quot;htmlediting.h&quot;
</span><span class="lines">@@ -1039,20 +1040,15 @@
</span><span class="cx">     RefPtr&lt;Range&gt; range = makeRange(visiblePositionRange.start, visiblePositionRange.end);
</span><span class="cx">     for (TextIterator it(range.get()); !it.atEnd(); it.advance()) {
</span><span class="cx">         // non-zero length means textual node, zero length means replaced node (AKA &quot;attachments&quot; in AX)
</span><del>-        if (it.length()) {
-            // Add a textual representation for list marker text
-            String listMarkerText = listMarkerTextForNodeAndPosition(it.node(), visiblePositionRange.start);
-            if (!listMarkerText.isEmpty())
-                builder.append(listMarkerText);
-
</del><ins>+        if (it.text().length()) {
+            // Add a textual representation for list marker text.
+            builder.append(listMarkerTextForNodeAndPosition(it.node(), visiblePositionRange.start));
</ins><span class="cx">             it.appendTextToStringBuilder(builder);
</span><span class="cx">         } else {
</span><span class="cx">             // locate the node and starting offset for this replaced range
</span><del>-            int exception = 0;
-            Node* node = it.range()-&gt;startContainer(exception);
-            ASSERT(node == it.range()-&gt;endContainer(exception));
-            int offset = it.range()-&gt;startOffset(exception);
-
</del><ins>+            Node* node = it.range()-&gt;startContainer();
+            ASSERT(node == it.range()-&gt;endContainer());
+            int offset = it.range()-&gt;startOffset();
</ins><span class="cx">             if (replacedNodeNeedsCharacter(node-&gt;childNode(offset)))
</span><span class="cx">                 builder.append(objectReplacementCharacter);
</span><span class="cx">         }
</span><span class="lines">@@ -1071,8 +1067,8 @@
</span><span class="cx">     RefPtr&lt;Range&gt; range = makeRange(visiblePositionRange.start, visiblePositionRange.end);
</span><span class="cx">     for (TextIterator it(range.get()); !it.atEnd(); it.advance()) {
</span><span class="cx">         // non-zero length means textual node, zero length means replaced node (AKA &quot;attachments&quot; in AX)
</span><del>-        if (it.length())
-            length += it.length();
</del><ins>+        if (it.text().length())
+            length += it.text().length();
</ins><span class="cx">         else {
</span><span class="cx">             // locate the node and starting offset for this replaced range
</span><span class="cx">             int exception = 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.h (164963 => 164964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityObject.h        2014-03-03 02:07:25 UTC (rev 164963)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.h        2014-03-03 02:30:37 UTC (rev 164964)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx"> #include &quot;FloatQuad.h&quot;
</span><span class="cx"> #include &quot;LayoutRect.h&quot;
</span><span class="cx"> #include &quot;Path.h&quot;
</span><del>-#include &quot;TextIterator.h&quot;
</del><ins>+#include &quot;TextIteratorBehavior.h&quot;
</ins><span class="cx"> #include &quot;VisiblePosition.h&quot;
</span><span class="cx"> #include &quot;VisibleSelection.h&quot;
</span><span class="cx"> #include &lt;wtf/Forward.h&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityRenderObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (164963 => 164964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp        2014-03-03 02:07:25 UTC (rev 164963)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp        2014-03-03 02:30:37 UTC (rev 164964)
</span><span class="lines">@@ -97,6 +97,7 @@
</span><span class="cx"> #include &quot;SVGSVGElement.h&quot;
</span><span class="cx"> #include &quot;Text.h&quot;
</span><span class="cx"> #include &quot;TextControlInnerElements.h&quot;
</span><ins>+#include &quot;TextIterator.h&quot;
</ins><span class="cx"> #include &quot;VisibleUnits.h&quot;
</span><span class="cx"> #include &quot;htmlediting.h&quot;
</span><span class="cx"> #include &lt;wtf/StdLibExtras.h&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilitymacWebAccessibilityObjectWrapperBasemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm (164963 => 164964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm        2014-03-03 02:07:25 UTC (rev 164963)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm        2014-03-03 02:30:37 UTC (rev 164964)
</span><span class="lines">@@ -66,7 +66,6 @@
</span><span class="cx"> #import &quot;SimpleFontData.h&quot;
</span><span class="cx"> #import &quot;TextCheckerClient.h&quot;
</span><span class="cx"> #import &quot;TextCheckingHelper.h&quot;
</span><del>-#import &quot;TextIterator.h&quot;
</del><span class="cx"> #import &quot;VisibleUnits.h&quot;
</span><span class="cx"> #import &quot;WebCoreFrameView.h&quot;
</span><span class="cx"> #import &quot;WebCoreObjCExtras.h&quot;
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilitymacWebAccessibilityObjectWrapperMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (164963 => 164964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm        2014-03-03 02:07:25 UTC (rev 164963)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm        2014-03-03 02:30:37 UTC (rev 164964)
</span><span class="lines">@@ -1069,7 +1069,7 @@
</span><span class="cx">         int offset = it.range()-&gt;startOffset(exception);
</span><span class="cx">         
</span><span class="cx">         // non-zero length means textual node, zero length means replaced node (AKA &quot;attachments&quot; in AX)
</span><del>-        if (it.length() != 0) {
</del><ins>+        if (it.text().length()) {
</ins><span class="cx">             // Add the text of the list marker item if necessary.
</span><span class="cx">             String listMarkerText = m_object-&gt;listMarkerTextForNodeAndPosition(node, VisiblePosition(it.range()-&gt;startPosition()));
</span><span class="cx">             if (!listMarkerText.isEmpty())
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.cpp (164963 => 164964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.cpp        2014-03-03 02:07:25 UTC (rev 164963)
+++ trunk/Source/WebCore/dom/Element.cpp        2014-03-03 02:30:37 UTC (rev 164964)
</span><span class="lines">@@ -73,6 +73,7 @@
</span><span class="cx"> #include &quot;Settings.h&quot;
</span><span class="cx"> #include &quot;StyleProperties.h&quot;
</span><span class="cx"> #include &quot;StyleResolver.h&quot;
</span><ins>+#include &quot;TextIterator.h&quot;
</ins><span class="cx"> #include &quot;VoidCallback.h&quot;
</span><span class="cx"> #include &quot;WheelEvent.h&quot;
</span><span class="cx"> #include &quot;XMLNSNames.h&quot;
</span></span></pre></div>
<a id="trunkSourceWebCoredomNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Node.cpp (164963 => 164964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Node.cpp        2014-03-03 02:07:25 UTC (rev 164963)
+++ trunk/Source/WebCore/dom/Node.cpp        2014-03-03 02:30:37 UTC (rev 164964)
</span><span class="lines">@@ -61,6 +61,7 @@
</span><span class="cx"> #include &quot;PlatformWheelEvent.h&quot;
</span><span class="cx"> #include &quot;ProcessingInstruction.h&quot;
</span><span class="cx"> #include &quot;ProgressEvent.h&quot;
</span><ins>+#include &quot;Range.h&quot;
</ins><span class="cx"> #include &quot;RenderBlock.h&quot;
</span><span class="cx"> #include &quot;RenderBox.h&quot;
</span><span class="cx"> #include &quot;RenderTextControl.h&quot;
</span></span></pre></div>
<a id="trunkSourceWebCoredomPositioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Position.cpp (164963 => 164964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Position.cpp        2014-03-03 02:07:25 UTC (rev 164963)
+++ trunk/Source/WebCore/dom/Position.cpp        2014-03-03 02:30:37 UTC (rev 164964)
</span><span class="lines">@@ -939,16 +939,16 @@
</span><span class="cx">         return !nodeIsUserSelectNone(deprecatedNode()) &amp;&amp; atFirstEditingPositionForNode();
</span><span class="cx"> 
</span><span class="cx">     if (renderer-&gt;isRenderBlockFlow()) {
</span><del>-        RenderBlock&amp; block = toRenderBlock(*renderer);
</del><ins>+        RenderBlockFlow&amp; block = toRenderBlockFlow(*renderer);
</ins><span class="cx">         if (block.logicalHeight() || m_anchorNode-&gt;hasTagName(bodyTag)) {
</span><span class="cx">             if (!Position::hasRenderedNonAnonymousDescendantsWithHeight(block))
</span><span class="cx">                 return atFirstEditingPositionForNode() &amp;&amp; !Position::nodeIsUserSelectNone(deprecatedNode());
</span><span class="cx">             return m_anchorNode-&gt;hasEditableStyle() &amp;&amp; !Position::nodeIsUserSelectNone(deprecatedNode()) &amp;&amp; atEditingBoundary();
</span><span class="cx">         }
</span><del>-    } else
-        return m_anchorNode-&gt;hasEditableStyle() &amp;&amp; !Position::nodeIsUserSelectNone(deprecatedNode()) &amp;&amp; atEditingBoundary();
</del><ins>+        return false;
+    }
</ins><span class="cx"> 
</span><del>-    return false;
</del><ins>+    return m_anchorNode-&gt;hasEditableStyle() &amp;&amp; !Position::nodeIsUserSelectNone(deprecatedNode()) &amp;&amp; atEditingBoundary();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool Position::isRenderedCharacter() const
</span><span class="lines">@@ -1068,7 +1068,7 @@
</span><span class="cx">     if (prev != *this &amp;&amp; inSameEnclosingBlockFlowElement(deprecatedNode(), prev.deprecatedNode()) &amp;&amp; prev.deprecatedNode()-&gt;isTextNode()) {
</span><span class="cx">         String string = toText(prev.deprecatedNode())-&gt;data();
</span><span class="cx">         UChar c = string[prev.deprecatedEditingOffset()];
</span><del>-        if (considerNonCollapsibleWhitespace ? (isSpaceOrNewline(c) || c == noBreakSpace) : isCollapsibleWhitespace(c))
</del><ins>+        if (considerNonCollapsibleWhitespace ? (isSpaceOrNewline(c) || c == noBreakSpace) : deprecatedIsCollapsibleWhitespace(c))
</ins><span class="cx">             if (isEditablePosition(prev))
</span><span class="cx">                 return prev;
</span><span class="cx">     }
</span><span class="lines">@@ -1087,7 +1087,7 @@
</span><span class="cx">     UChar c = v.characterAfter();
</span><span class="cx">     // The space must not be in another paragraph and it must be editable.
</span><span class="cx">     if (!isEndOfParagraph(v) &amp;&amp; v.next(CannotCrossEditingBoundary).isNotNull())
</span><del>-        if (considerNonCollapsibleWhitespace ? (isSpaceOrNewline(c) || c == noBreakSpace) : isCollapsibleWhitespace(c))
</del><ins>+        if (considerNonCollapsibleWhitespace ? (isSpaceOrNewline(c) || c == noBreakSpace) : deprecatedIsCollapsibleWhitespace(c))
</ins><span class="cx">             return *this;
</span><span class="cx">     
</span><span class="cx">     return Position();
</span></span></pre></div>
<a id="trunkSourceWebCoredomRangecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Range.cpp (164963 => 164964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Range.cpp        2014-03-03 02:07:25 UTC (rev 164963)
+++ trunk/Source/WebCore/dom/Range.cpp        2014-03-03 02:30:37 UTC (rev 164964)
</span><span class="lines">@@ -1570,6 +1570,8 @@
</span><span class="cx">         return 0;
</span><span class="cx">     if (m_start.container()-&gt;offsetInCharacters())
</span><span class="cx">         return m_start.container();
</span><ins>+    // FIXME: A renderer-based rule is completely out of place here.
+    // For one thing, the renderer could be out of date if the DOM was recently changed.
</ins><span class="cx">     if (isRendererReplacedElement(m_start.container()-&gt;renderer()))
</span><span class="cx">         return m_start.container();
</span><span class="cx">     if (Node* child = m_start.container()-&gt;childNode(m_start.offset()))
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingAlternativeTextControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/AlternativeTextController.cpp (164963 => 164964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/AlternativeTextController.cpp        2014-03-03 02:07:25 UTC (rev 164963)
+++ trunk/Source/WebCore/editing/AlternativeTextController.cpp        2014-03-03 02:30:37 UTC (rev 164964)
</span><span class="lines">@@ -41,6 +41,7 @@
</span><span class="cx"> #include &quot;TextCheckerClient.h&quot;
</span><span class="cx"> #include &quot;TextCheckingHelper.h&quot;
</span><span class="cx"> #include &quot;TextEvent.h&quot;
</span><ins>+#include &quot;TextIterator.h&quot;
</ins><span class="cx"> #include &quot;VisibleUnits.h&quot;
</span><span class="cx"> #include &quot;htmlediting.h&quot;
</span><span class="cx"> #include &quot;markup.h&quot;
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingApplyStyleCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/ApplyStyleCommand.cpp (164963 => 164964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/ApplyStyleCommand.cpp        2014-03-03 02:07:25 UTC (rev 164963)
+++ trunk/Source/WebCore/editing/ApplyStyleCommand.cpp        2014-03-03 02:30:37 UTC (rev 164964)
</span><span class="lines">@@ -43,6 +43,7 @@
</span><span class="cx"> #include &quot;StyleProperties.h&quot;
</span><span class="cx"> #include &quot;StyleResolver.h&quot;
</span><span class="cx"> #include &quot;Text.h&quot;
</span><ins>+#include &quot;TextIterator.h&quot;
</ins><span class="cx"> #include &quot;TextNodeTraversal.h&quot;
</span><span class="cx"> #include &quot;VisibleUnits.h&quot;
</span><span class="cx"> #include &quot;htmlediting.h&quot;
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingCompositeEditCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/CompositeEditCommand.cpp (164963 => 164964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/CompositeEditCommand.cpp        2014-03-03 02:07:25 UTC (rev 164963)
+++ trunk/Source/WebCore/editing/CompositeEditCommand.cpp        2014-03-03 02:30:37 UTC (rev 164964)
</span><span class="lines">@@ -773,9 +773,9 @@
</span><span class="cx">     VisiblePosition previousVisiblePos(visiblePos.previous());
</span><span class="cx">     Position previous(previousVisiblePos.deepEquivalent());
</span><span class="cx">     
</span><del>-    if (isCollapsibleWhitespace(previousVisiblePos.characterAfter()) &amp;&amp; previous.deprecatedNode()-&gt;isTextNode() &amp;&amp; !previous.deprecatedNode()-&gt;hasTagName(brTag))
</del><ins>+    if (deprecatedIsCollapsibleWhitespace(previousVisiblePos.characterAfter()) &amp;&amp; previous.deprecatedNode()-&gt;isTextNode() &amp;&amp; !previous.deprecatedNode()-&gt;hasTagName(brTag))
</ins><span class="cx">         replaceTextInNodePreservingMarkers(toText(previous.deprecatedNode()), previous.deprecatedEditingOffset(), 1, nonBreakingSpaceString());
</span><del>-    if (isCollapsibleWhitespace(visiblePos.characterAfter()) &amp;&amp; position.deprecatedNode()-&gt;isTextNode() &amp;&amp; !position.deprecatedNode()-&gt;hasTagName(brTag))
</del><ins>+    if (deprecatedIsCollapsibleWhitespace(visiblePos.characterAfter()) &amp;&amp; position.deprecatedNode()-&gt;isTextNode() &amp;&amp; !position.deprecatedNode()-&gt;hasTagName(brTag))
</ins><span class="cx">         replaceTextInNodePreservingMarkers(toText(position.deprecatedNode()), position.deprecatedEditingOffset(), 1, nonBreakingSpaceString());
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingEditorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/Editor.h (164963 => 164964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/Editor.h        2014-03-03 02:07:25 UTC (rev 164963)
+++ trunk/Source/WebCore/editing/Editor.h        2014-03-03 02:30:37 UTC (rev 164964)
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx"> #include &quot;FindOptions.h&quot;
</span><span class="cx"> #include &quot;FrameSelection.h&quot;
</span><span class="cx"> #include &quot;TextChecking.h&quot;
</span><del>-#include &quot;TextIterator.h&quot;
</del><ins>+#include &quot;TextIteratorBehavior.h&quot;
</ins><span class="cx"> #include &quot;VisibleSelection.h&quot;
</span><span class="cx"> #include &quot;WritingDirection.h&quot;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingHTMLInterchangecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/HTMLInterchange.cpp (164963 => 164964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/HTMLInterchange.cpp        2014-03-03 02:07:25 UTC (rev 164963)
+++ trunk/Source/WebCore/editing/HTMLInterchange.cpp        2014-03-03 02:30:37 UTC (rev 164964)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> #include &quot;RenderText.h&quot;
</span><span class="cx"> #include &quot;Text.h&quot;
</span><span class="cx"> #include &quot;TextIterator.h&quot;
</span><ins>+#include &quot;htmlediting.h&quot;
</ins><span class="cx"> #include &lt;wtf/text/StringBuilder.h&gt;
</span><span class="cx"> #include &lt;wtf/unicode/CharacterNames.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -50,10 +51,10 @@
</span><span class="cx">     unsigned consumed = 0;
</span><span class="cx">     while (i &lt; in.length()) {
</span><span class="cx">         consumed = 1;
</span><del>-        if (isCollapsibleWhitespace(in[i])) {
</del><ins>+        if (deprecatedIsCollapsibleWhitespace(in[i])) {
</ins><span class="cx">             // count number of adjoining spaces
</span><span class="cx">             unsigned j = i + 1;
</span><del>-            while (j &lt; in.length() &amp;&amp; isCollapsibleWhitespace(in[j]))
</del><ins>+            while (j &lt; in.length() &amp;&amp; deprecatedIsCollapsibleWhitespace(in[j]))
</ins><span class="cx">                 j++;
</span><span class="cx">             unsigned count = j - i;
</span><span class="cx">             consumed = count;
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingSpellingCorrectionCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/SpellingCorrectionCommand.cpp (164963 => 164964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/SpellingCorrectionCommand.cpp        2014-03-03 02:07:25 UTC (rev 164963)
+++ trunk/Source/WebCore/editing/SpellingCorrectionCommand.cpp        2014-03-03 02:30:37 UTC (rev 164964)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> #include &quot;Frame.h&quot;
</span><span class="cx"> #include &quot;ReplaceSelectionCommand.h&quot;
</span><span class="cx"> #include &quot;SetSelectionCommand.h&quot;
</span><ins>+#include &quot;TextIterator.h&quot;
</ins><span class="cx"> #include &quot;markup.h&quot;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingTextIteratorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/TextIterator.cpp (164963 => 164964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/TextIterator.cpp        2014-03-03 02:07:25 UTC (rev 164963)
+++ trunk/Source/WebCore/editing/TextIterator.cpp        2014-03-03 02:30:37 UTC (rev 164964)
</span><span class="lines">@@ -540,15 +540,15 @@
</span><span class="cx">         // This code aims to produce same results as handleTextBox() below so test results don't change. It does not make much logical sense.
</span><span class="cx">         unsigned runEnd = m_offset;
</span><span class="cx">         unsigned runStart = m_offset;
</span><del>-        while (runEnd &lt; str.length() &amp;&amp; (isCollapsibleWhitespace(str[runEnd]) || str[runEnd] == '\t'))
</del><ins>+        while (runEnd &lt; str.length() &amp;&amp; (deprecatedIsCollapsibleWhitespace(str[runEnd]) || str[runEnd] == '\t'))
</ins><span class="cx">             ++runEnd;
</span><del>-        bool addSpaceForPrevious = m_lastTextNodeEndedWithCollapsedSpace &amp;&amp; m_lastCharacter &amp;&amp; !isCollapsibleWhitespace(m_lastCharacter);
</del><ins>+        bool addSpaceForPrevious = m_lastTextNodeEndedWithCollapsedSpace &amp;&amp; m_lastCharacter &amp;&amp; !deprecatedIsCollapsibleWhitespace(m_lastCharacter);
</ins><span class="cx">         if (runEnd &gt; runStart || addSpaceForPrevious) {
</span><span class="cx">             if (runEnd == str.length()) {
</span><span class="cx">                 m_lastTextNodeEndedWithCollapsedSpace = true;
</span><span class="cx">                 return true;
</span><span class="cx">             }
</span><del>-            bool addSpaceForCurrent = runStart || (m_lastCharacter &amp;&amp; !isCollapsibleWhitespace(m_lastCharacter));
</del><ins>+            bool addSpaceForCurrent = runStart || (m_lastCharacter &amp;&amp; !deprecatedIsCollapsibleWhitespace(m_lastCharacter));
</ins><span class="cx">             if (addSpaceForCurrent || addSpaceForPrevious) {
</span><span class="cx">                 emitCharacter(' ', m_node, 0, runStart, runEnd);
</span><span class="cx">                 m_offset = runEnd;
</span><span class="lines">@@ -556,7 +556,7 @@
</span><span class="cx">             }
</span><span class="cx">             runStart = runEnd;
</span><span class="cx">         }
</span><del>-        while (runEnd &lt; str.length() &amp;&amp; !isCollapsibleWhitespace(str[runEnd]))
</del><ins>+        while (runEnd &lt; str.length() &amp;&amp; !deprecatedIsCollapsibleWhitespace(str[runEnd]))
</ins><span class="cx">             ++runEnd;
</span><span class="cx">         if (runStart &lt; str.length())
</span><span class="cx">             emitText(m_node, renderer, runStart, runEnd);
</span><span class="lines">@@ -614,7 +614,7 @@
</span><span class="cx">         InlineTextBox* firstTextBox = renderer-&gt;containsReversedText() ? (m_sortedTextBoxes.isEmpty() ? 0 : m_sortedTextBoxes[0]) : renderer-&gt;firstTextBox();
</span><span class="cx">         bool needSpace = m_lastTextNodeEndedWithCollapsedSpace
</span><span class="cx">             || (m_textBox == firstTextBox &amp;&amp; textBoxStart == runStart &amp;&amp; runStart &gt; 0);
</span><del>-        if (needSpace &amp;&amp; !isCollapsibleWhitespace(m_lastCharacter) &amp;&amp; m_lastCharacter) {
</del><ins>+        if (needSpace &amp;&amp; !deprecatedIsCollapsibleWhitespace(m_lastCharacter) &amp;&amp; m_lastCharacter) {
</ins><span class="cx">             if (m_lastTextNode == m_node &amp;&amp; runStart &gt; 0 &amp;&amp; str[runStart - 1] == ' ') {
</span><span class="cx">                 unsigned spaceRunStart = runStart - 1;
</span><span class="cx">                 while (spaceRunStart &gt; 0 &amp;&amp; str[spaceRunStart - 1] == ' ')
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingTextIteratorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/TextIterator.h (164963 => 164964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/TextIterator.h        2014-03-03 02:07:25 UTC (rev 164963)
+++ trunk/Source/WebCore/editing/TextIterator.h        2014-03-03 02:30:37 UTC (rev 164964)
</span><span class="lines">@@ -38,19 +38,6 @@
</span><span class="cx"> class RenderText;
</span><span class="cx"> class RenderTextFragment;
</span><span class="cx"> 
</span><del>-// FIXME: Can't really answer this question correctly without knowing the white-space mode.
-// FIXME: Move this somewhere else in the editing directory. It doesn't belong here.
-inline bool isCollapsibleWhitespace(UChar c)
-{
-    switch (c) {
-        case ' ':
-        case '\n':
-            return true;
-        default:
-            return false;
-    }
-}
-
</del><span class="cx"> String plainText(const Range*, TextIteratorBehavior = TextIteratorDefaultBehavior, bool isDisplayString = false);
</span><span class="cx"> PassRefPtr&lt;Range&gt; findPlainText(const Range*, const String&amp;, FindOptions);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingTypingCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/TypingCommand.cpp (164963 => 164964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/TypingCommand.cpp        2014-03-03 02:07:25 UTC (rev 164963)
+++ trunk/Source/WebCore/editing/TypingCommand.cpp        2014-03-03 02:30:37 UTC (rev 164964)
</span><span class="lines">@@ -37,6 +37,7 @@
</span><span class="cx"> #include &quot;InsertParagraphSeparatorCommand.h&quot;
</span><span class="cx"> #include &quot;InsertTextCommand.h&quot;
</span><span class="cx"> #include &quot;RenderElement.h&quot;
</span><ins>+#include &quot;TextIterator.h&quot;
</ins><span class="cx"> #include &quot;VisibleUnits.h&quot;
</span><span class="cx"> #include &quot;htmlediting.h&quot;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingVisibleUnitscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/VisibleUnits.cpp (164963 => 164964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/VisibleUnits.cpp        2014-03-03 02:07:25 UTC (rev 164963)
+++ trunk/Source/WebCore/editing/VisibleUnits.cpp        2014-03-03 02:30:37 UTC (rev 164964)
</span><span class="lines">@@ -531,7 +531,7 @@
</span><span class="cx">             prepend(string, it.text());
</span><span class="cx">         else {
</span><span class="cx">             // Treat bullets used in the text security mode as regular characters when looking for boundaries
</span><del>-            prependRepeatedCharacter(string, 'x', it.length());
</del><ins>+            prependRepeatedCharacter(string, 'x', it.text().length());
</ins><span class="cx">         }
</span><span class="cx">         if (string.size() &gt; suffixLength) {
</span><span class="cx">             next = searchFunction(StringView(string.data(), string.size()), string.size() - suffixLength, MayHaveMoreContext, needMoreContext);
</span><span class="lines">@@ -604,7 +604,7 @@
</span><span class="cx">             append(string, it.text());
</span><span class="cx">         else {
</span><span class="cx">             // Treat bullets used in the text security mode as regular characters when looking for boundaries
</span><del>-            appendRepeatedCharacter(string, 'x', it.length());
</del><ins>+            appendRepeatedCharacter(string, 'x', it.text().length());
</ins><span class="cx">         }
</span><span class="cx">         if (string.size() &gt; prefixLength) {
</span><span class="cx">             next = searchFunction(StringView(string.data(), string.size()), prefixLength, MayHaveMoreContext, needMoreContext);
</span></span></pre></div>
<a id="trunkSourceWebCoreeditinghtmleditingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/htmlediting.cpp (164963 => 164964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/htmlediting.cpp        2014-03-03 02:07:25 UTC (rev 164963)
+++ trunk/Source/WebCore/editing/htmlediting.cpp        2014-03-03 02:30:37 UTC (rev 164964)
</span><span class="lines">@@ -49,6 +49,7 @@
</span><span class="cx"> #include &quot;RenderElement.h&quot;
</span><span class="cx"> #include &quot;ShadowRoot.h&quot;
</span><span class="cx"> #include &quot;Text.h&quot;
</span><ins>+#include &quot;TextIterator.h&quot;
</ins><span class="cx"> #include &quot;VisibleUnits.h&quot;
</span><span class="cx"> #include &lt;wtf/Assertions.h&gt;
</span><span class="cx"> #include &lt;wtf/StdLibExtras.h&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreeditinghtmleditingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/htmlediting.h (164963 => 164964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/htmlediting.h        2014-03-03 02:07:25 UTC (rev 164963)
+++ trunk/Source/WebCore/editing/htmlediting.h        2014-03-03 02:30:37 UTC (rev 164964)
</span><span class="lines">@@ -44,7 +44,6 @@
</span><span class="cx"> class VisiblePosition;
</span><span class="cx"> class VisibleSelection;
</span><span class="cx"> 
</span><del>-
</del><span class="cx"> // This file contains a set of helper functions used by the editing commands
</span><span class="cx"> 
</span><span class="cx"> // -------------------------------------------------------------------------
</span><span class="lines">@@ -214,9 +213,7 @@
</span><span class="cx"> // -------------------------------------------------------------------------
</span><span class="cx"> // Element
</span><span class="cx"> // -------------------------------------------------------------------------
</span><del>-    
-// Functions returning Element
-    
</del><ins>+
</ins><span class="cx"> PassRefPtr&lt;Element&gt; createTabSpanElement(Document&amp;);
</span><span class="cx"> PassRefPtr&lt;Element&gt; createTabSpanElement(Document&amp;, PassRefPtr&lt;Node&gt; tabTextNode);
</span><span class="cx"> PassRefPtr&lt;Element&gt; createTabSpanElement(Document&amp;, const String&amp; tabText);
</span><span class="lines">@@ -225,26 +222,30 @@
</span><span class="cx"> Element* editableRootForPosition(const Position&amp;, EditableType = ContentIsEditable);
</span><span class="cx"> Element* unsplittableElementForPosition(const Position&amp;);
</span><span class="cx"> 
</span><del>-// Boolean functions on Element
-    
</del><span class="cx"> bool canMergeLists(Element* firstList, Element* secondList);
</span><span class="cx">     
</span><span class="cx"> // -------------------------------------------------------------------------
</span><span class="cx"> // VisibleSelection
</span><span class="cx"> // -------------------------------------------------------------------------
</span><span class="cx"> 
</span><del>-// Functions returning VisibleSelection
</del><span class="cx"> VisibleSelection selectionForParagraphIteration(const VisibleSelection&amp;);
</span><span class="cx"> 
</span><span class="cx"> Position adjustedSelectionStartForStyleComputation(const VisibleSelection&amp;);
</span><span class="cx">     
</span><ins>+// -------------------------------------------------------------------------
</ins><span class="cx"> 
</span><del>-// Miscellaneous functions on Text
</del><ins>+// FIXME: This is only one of many definitions of whitespace, so the name is not specific enough.
</ins><span class="cx"> inline bool isWhitespace(UChar c)
</span><span class="cx"> {
</span><span class="cx">     return c == noBreakSpace || c == ' ' || c == '\n' || c == '\t';
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+// FIXME: Can't really answer this question correctly without knowing the white-space mode.
+inline bool deprecatedIsCollapsibleWhitespace(UChar c)
+{
+    return c == ' ' || c == '\n';
+}
+
</ins><span class="cx"> inline bool isAmbiguousBoundaryCharacter(UChar character)
</span><span class="cx"> {
</span><span class="cx">     // These are characters that can behave as word boundaries, but can appear within words.
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingmarkupcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/markup.cpp (164963 => 164964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/markup.cpp        2014-03-03 02:07:25 UTC (rev 164963)
+++ trunk/Source/WebCore/editing/markup.cpp        2014-03-03 02:30:37 UTC (rev 164964)
</span><span class="lines">@@ -54,6 +54,7 @@
</span><span class="cx"> #include &quot;RenderBlock.h&quot;
</span><span class="cx"> #include &quot;Settings.h&quot;
</span><span class="cx"> #include &quot;StyleProperties.h&quot;
</span><ins>+#include &quot;TextIterator.h&quot;
</ins><span class="cx"> #include &quot;VisibleSelection.h&quot;
</span><span class="cx"> #include &quot;VisibleUnits.h&quot;
</span><span class="cx"> #include &quot;htmlediting.h&quot;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLTextAreaElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLTextAreaElement.cpp (164963 => 164964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLTextAreaElement.cpp        2014-03-03 02:07:25 UTC (rev 164963)
+++ trunk/Source/WebCore/html/HTMLTextAreaElement.cpp        2014-03-03 02:30:37 UTC (rev 164964)
</span><span class="lines">@@ -47,6 +47,7 @@
</span><span class="cx"> #include &quot;Text.h&quot;
</span><span class="cx"> #include &quot;TextBreakIterator.h&quot;
</span><span class="cx"> #include &quot;TextControlInnerElements.h&quot;
</span><ins>+#include &quot;TextIterator.h&quot;
</ins><span class="cx"> #include &quot;TextNodeTraversal.h&quot;
</span><span class="cx"> #include &lt;wtf/Ref.h&gt;
</span><span class="cx"> #include &lt;wtf/StdLibExtras.h&gt;
</span></span></pre></div>
<a id="trunkSourceWebCorepageContextMenuControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/ContextMenuController.cpp (164963 => 164964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/ContextMenuController.cpp        2014-03-03 02:07:25 UTC (rev 164963)
+++ trunk/Source/WebCore/page/ContextMenuController.cpp        2014-03-03 02:30:37 UTC (rev 164964)
</span><span class="lines">@@ -718,9 +718,9 @@
</span><span class="cx"> {
</span><span class="cx">     // Current algorithm: look for a character that's not just a separator.
</span><span class="cx">     for (TextIterator it(frame-&gt;selection().toNormalizedRange().get()); !it.atEnd(); it.advance()) {
</span><del>-        int length = it.length();
</del><ins>+        int length = it.text().length();
</ins><span class="cx">         for (int i = 0; i &lt; length; ++i) {
</span><del>-            if (!(U_GET_GC_MASK(it.characterAt(i)) &amp; U_GC_Z_MASK))
</del><ins>+            if (!(U_GET_GC_MASK(it.text()[i]) &amp; U_GC_Z_MASK))
</ins><span class="cx">                 return true;
</span><span class="cx">         }
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCorepageEventHandlercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/EventHandler.cpp (164963 => 164964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/EventHandler.cpp        2014-03-03 02:07:25 UTC (rev 164963)
+++ trunk/Source/WebCore/page/EventHandler.cpp        2014-03-03 02:30:37 UTC (rev 164964)
</span><span class="lines">@@ -98,18 +98,21 @@
</span><span class="cx"> #include &lt;wtf/StdLibExtras.h&gt;
</span><span class="cx"> #include &lt;wtf/TemporaryChange.h&gt;
</span><span class="cx"> 
</span><del>-#if ENABLE(TOUCH_EVENTS)
</del><ins>+#if ENABLE(CSS_IMAGE_SET)
+#include &quot;StyleCachedImageSet.h&quot;
+#endif
+
</ins><span class="cx"> #if ENABLE(IOS_TOUCH_EVENTS)
</span><span class="cx"> #include &quot;PlatformTouchEventIOS.h&quot;
</span><del>-#else
-#include &quot;PlatformTouchEvent.h&quot;
</del><span class="cx"> #endif
</span><ins>+
+#if ENABLE(TOUCH_EVENTS)
</ins><span class="cx"> #include &quot;TouchEvent.h&quot;
</span><span class="cx"> #include &quot;TouchList.h&quot;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if ENABLE(CSS_IMAGE_SET)
-#include &quot;StyleCachedImageSet.h&quot;
</del><ins>+#if ENABLE(TOUCH_EVENTS) &amp;&amp; !ENABLE(IOS_TOUCH_EVENTS)
+#include &quot;PlatformTouchEvent.h&quot;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacHTMLConvertermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/HTMLConverter.mm (164963 => 164964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/HTMLConverter.mm        2014-03-03 02:07:25 UTC (rev 164963)
+++ trunk/Source/WebCore/platform/mac/HTMLConverter.mm        2014-03-03 02:30:37 UTC (rev 164964)
</span><span class="lines">@@ -2499,7 +2499,7 @@
</span><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        int currentTextLength = it.length();
</del><ins>+        int currentTextLength = it.text().length();
</ins><span class="cx">         if (!currentTextLength)
</span><span class="cx">             continue;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/ChangeLog (164963 => 164964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/ChangeLog        2014-03-03 02:07:25 UTC (rev 164963)
+++ trunk/Source/WebKit/win/ChangeLog        2014-03-03 02:30:37 UTC (rev 164964)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2014-03-02  Darin Adler  &lt;darin@apple.com&gt;
+
+        Streamline use of TextIterator, cutting down includes and use of soon-to-be-deleted functions
+        https://bugs.webkit.org/show_bug.cgi?id=129592
+
+        Reviewed by Sam Weinig.
+
+        * WebCoreSupport/WebEditorClient.cpp: Added now-needed include.
+
</ins><span class="cx"> 2014-02-25  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Get rid of VisitedLinkStrategy
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebCoreSupportWebEditorClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebCoreSupport/WebEditorClient.cpp (164963 => 164964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebCoreSupport/WebEditorClient.cpp        2014-03-03 02:07:25 UTC (rev 164963)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebEditorClient.cpp        2014-03-03 02:30:37 UTC (rev 164964)
</span><span class="lines">@@ -47,6 +47,7 @@
</span><span class="cx"> #include &lt;WebCore/UndoStep.h&gt;
</span><span class="cx"> #include &lt;WebCore/UserTypingGestureIndicator.h&gt;
</span><span class="cx"> #include &lt;WebCore/VisibleSelection.h&gt;
</span><ins>+#include &lt;wtf/text/StringView.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> using namespace WebCore;
</span><span class="cx"> using namespace HTMLNames;
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (164963 => 164964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-03-03 02:07:25 UTC (rev 164963)
+++ trunk/Source/WebKit2/ChangeLog        2014-03-03 02:30:37 UTC (rev 164964)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2014-03-02  Darin Adler  &lt;darin@apple.com&gt;
+
+        Streamline use of TextIterator, cutting down includes and use of soon-to-be-deleted functions
+        https://bugs.webkit.org/show_bug.cgi?id=129592
+
+        Reviewed by Sam Weinig.
+
+        * UIProcess/WebPageProxy.cpp: Added now-needed include.
+        * WebProcess/WebPage/WebPage.cpp: Ditto.
+
</ins><span class="cx"> 2014-03-02  Enrica Casucci  &lt;enrica@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [iOS WebKit2] Keyboard deadlock when accepting/dismissing autocorrection.
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (164963 => 164964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-03-03 02:07:25 UTC (rev 164963)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-03-03 02:30:37 UTC (rev 164964)
</span><span class="lines">@@ -98,6 +98,7 @@
</span><span class="cx"> #include &lt;WebCore/WindowFeatures.h&gt;
</span><span class="cx"> #include &lt;stdio.h&gt;
</span><span class="cx"> #include &lt;wtf/NeverDestroyed.h&gt;
</span><ins>+#include &lt;wtf/text/StringView.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(ASYNC_SCROLLING)
</span><span class="cx"> #include &quot;RemoteScrollingCoordinatorProxy.h&quot;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (164963 => 164964)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-03-03 02:07:25 UTC (rev 164963)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-03-03 02:30:37 UTC (rev 164964)
</span><span class="lines">@@ -140,6 +140,7 @@
</span><span class="cx"> #include &lt;WebCore/SharedBuffer.h&gt;
</span><span class="cx"> #include &lt;WebCore/SubframeLoader.h&gt;
</span><span class="cx"> #include &lt;WebCore/SubstituteData.h&gt;
</span><ins>+#include &lt;WebCore/TextIterator.h&gt;
</ins><span class="cx"> #include &lt;WebCore/UserInputBridge.h&gt;
</span><span class="cx"> #include &lt;WebCore/VisiblePosition.h&gt;
</span><span class="cx"> #include &lt;WebCore/VisibleUnits.h&gt;
</span></span></pre>
</div>
</div>

</body>
</html>