<!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 <darin@apple.com>
+
+ 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 <benjamin@webkit.org>
</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 "Settings.h"
</span><span class="cx"> #include "TextCheckerClient.h"
</span><span class="cx"> #include "TextCheckingHelper.h"
</span><ins>+#include "TextIterator.h"
</ins><span class="cx"> #include "UserGestureIndicator.h"
</span><span class="cx"> #include "VisibleUnits.h"
</span><span class="cx"> #include "htmlediting.h"
</span><span class="lines">@@ -1039,20 +1040,15 @@
</span><span class="cx"> RefPtr<Range> 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 "attachments" 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()->startContainer(exception);
- ASSERT(node == it.range()->endContainer(exception));
- int offset = it.range()->startOffset(exception);
-
</del><ins>+ Node* node = it.range()->startContainer();
+ ASSERT(node == it.range()->endContainer());
+ int offset = it.range()->startOffset();
</ins><span class="cx"> if (replacedNodeNeedsCharacter(node->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<Range> 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 "attachments" 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 "FloatQuad.h"
</span><span class="cx"> #include "LayoutRect.h"
</span><span class="cx"> #include "Path.h"
</span><del>-#include "TextIterator.h"
</del><ins>+#include "TextIteratorBehavior.h"
</ins><span class="cx"> #include "VisiblePosition.h"
</span><span class="cx"> #include "VisibleSelection.h"
</span><span class="cx"> #include <wtf/Forward.h>
</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 "SVGSVGElement.h"
</span><span class="cx"> #include "Text.h"
</span><span class="cx"> #include "TextControlInnerElements.h"
</span><ins>+#include "TextIterator.h"
</ins><span class="cx"> #include "VisibleUnits.h"
</span><span class="cx"> #include "htmlediting.h"
</span><span class="cx"> #include <wtf/StdLibExtras.h>
</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 "SimpleFontData.h"
</span><span class="cx"> #import "TextCheckerClient.h"
</span><span class="cx"> #import "TextCheckingHelper.h"
</span><del>-#import "TextIterator.h"
</del><span class="cx"> #import "VisibleUnits.h"
</span><span class="cx"> #import "WebCoreFrameView.h"
</span><span class="cx"> #import "WebCoreObjCExtras.h"
</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()->startOffset(exception);
</span><span class="cx">
</span><span class="cx"> // non-zero length means textual node, zero length means replaced node (AKA "attachments" 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->listMarkerTextForNodeAndPosition(node, VisiblePosition(it.range()->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 "Settings.h"
</span><span class="cx"> #include "StyleProperties.h"
</span><span class="cx"> #include "StyleResolver.h"
</span><ins>+#include "TextIterator.h"
</ins><span class="cx"> #include "VoidCallback.h"
</span><span class="cx"> #include "WheelEvent.h"
</span><span class="cx"> #include "XMLNSNames.h"
</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 "PlatformWheelEvent.h"
</span><span class="cx"> #include "ProcessingInstruction.h"
</span><span class="cx"> #include "ProgressEvent.h"
</span><ins>+#include "Range.h"
</ins><span class="cx"> #include "RenderBlock.h"
</span><span class="cx"> #include "RenderBox.h"
</span><span class="cx"> #include "RenderTextControl.h"
</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()) && atFirstEditingPositionForNode();
</span><span class="cx">
</span><span class="cx"> if (renderer->isRenderBlockFlow()) {
</span><del>- RenderBlock& block = toRenderBlock(*renderer);
</del><ins>+ RenderBlockFlow& block = toRenderBlockFlow(*renderer);
</ins><span class="cx"> if (block.logicalHeight() || m_anchorNode->hasTagName(bodyTag)) {
</span><span class="cx"> if (!Position::hasRenderedNonAnonymousDescendantsWithHeight(block))
</span><span class="cx"> return atFirstEditingPositionForNode() && !Position::nodeIsUserSelectNone(deprecatedNode());
</span><span class="cx"> return m_anchorNode->hasEditableStyle() && !Position::nodeIsUserSelectNone(deprecatedNode()) && atEditingBoundary();
</span><span class="cx"> }
</span><del>- } else
- return m_anchorNode->hasEditableStyle() && !Position::nodeIsUserSelectNone(deprecatedNode()) && atEditingBoundary();
</del><ins>+ return false;
+ }
</ins><span class="cx">
</span><del>- return false;
</del><ins>+ return m_anchorNode->hasEditableStyle() && !Position::nodeIsUserSelectNone(deprecatedNode()) && 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 && inSameEnclosingBlockFlowElement(deprecatedNode(), prev.deprecatedNode()) && prev.deprecatedNode()->isTextNode()) {
</span><span class="cx"> String string = toText(prev.deprecatedNode())->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) && 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()->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()->renderer()))
</span><span class="cx"> return m_start.container();
</span><span class="cx"> if (Node* child = m_start.container()->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 "TextCheckerClient.h"
</span><span class="cx"> #include "TextCheckingHelper.h"
</span><span class="cx"> #include "TextEvent.h"
</span><ins>+#include "TextIterator.h"
</ins><span class="cx"> #include "VisibleUnits.h"
</span><span class="cx"> #include "htmlediting.h"
</span><span class="cx"> #include "markup.h"
</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 "StyleProperties.h"
</span><span class="cx"> #include "StyleResolver.h"
</span><span class="cx"> #include "Text.h"
</span><ins>+#include "TextIterator.h"
</ins><span class="cx"> #include "TextNodeTraversal.h"
</span><span class="cx"> #include "VisibleUnits.h"
</span><span class="cx"> #include "htmlediting.h"
</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()) && previous.deprecatedNode()->isTextNode() && !previous.deprecatedNode()->hasTagName(brTag))
</del><ins>+ if (deprecatedIsCollapsibleWhitespace(previousVisiblePos.characterAfter()) && previous.deprecatedNode()->isTextNode() && !previous.deprecatedNode()->hasTagName(brTag))
</ins><span class="cx"> replaceTextInNodePreservingMarkers(toText(previous.deprecatedNode()), previous.deprecatedEditingOffset(), 1, nonBreakingSpaceString());
</span><del>- if (isCollapsibleWhitespace(visiblePos.characterAfter()) && position.deprecatedNode()->isTextNode() && !position.deprecatedNode()->hasTagName(brTag))
</del><ins>+ if (deprecatedIsCollapsibleWhitespace(visiblePos.characterAfter()) && position.deprecatedNode()->isTextNode() && !position.deprecatedNode()->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 "FindOptions.h"
</span><span class="cx"> #include "FrameSelection.h"
</span><span class="cx"> #include "TextChecking.h"
</span><del>-#include "TextIterator.h"
</del><ins>+#include "TextIteratorBehavior.h"
</ins><span class="cx"> #include "VisibleSelection.h"
</span><span class="cx"> #include "WritingDirection.h"
</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 "RenderText.h"
</span><span class="cx"> #include "Text.h"
</span><span class="cx"> #include "TextIterator.h"
</span><ins>+#include "htmlediting.h"
</ins><span class="cx"> #include <wtf/text/StringBuilder.h>
</span><span class="cx"> #include <wtf/unicode/CharacterNames.h>
</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 < 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 < in.length() && isCollapsibleWhitespace(in[j]))
</del><ins>+ while (j < in.length() && 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 "Frame.h"
</span><span class="cx"> #include "ReplaceSelectionCommand.h"
</span><span class="cx"> #include "SetSelectionCommand.h"
</span><ins>+#include "TextIterator.h"
</ins><span class="cx"> #include "markup.h"
</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 < str.length() && (isCollapsibleWhitespace(str[runEnd]) || str[runEnd] == '\t'))
</del><ins>+ while (runEnd < str.length() && (deprecatedIsCollapsibleWhitespace(str[runEnd]) || str[runEnd] == '\t'))
</ins><span class="cx"> ++runEnd;
</span><del>- bool addSpaceForPrevious = m_lastTextNodeEndedWithCollapsedSpace && m_lastCharacter && !isCollapsibleWhitespace(m_lastCharacter);
</del><ins>+ bool addSpaceForPrevious = m_lastTextNodeEndedWithCollapsedSpace && m_lastCharacter && !deprecatedIsCollapsibleWhitespace(m_lastCharacter);
</ins><span class="cx"> if (runEnd > 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 && !isCollapsibleWhitespace(m_lastCharacter));
</del><ins>+ bool addSpaceForCurrent = runStart || (m_lastCharacter && !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 < str.length() && !isCollapsibleWhitespace(str[runEnd]))
</del><ins>+ while (runEnd < str.length() && !deprecatedIsCollapsibleWhitespace(str[runEnd]))
</ins><span class="cx"> ++runEnd;
</span><span class="cx"> if (runStart < 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->containsReversedText() ? (m_sortedTextBoxes.isEmpty() ? 0 : m_sortedTextBoxes[0]) : renderer->firstTextBox();
</span><span class="cx"> bool needSpace = m_lastTextNodeEndedWithCollapsedSpace
</span><span class="cx"> || (m_textBox == firstTextBox && textBoxStart == runStart && runStart > 0);
</span><del>- if (needSpace && !isCollapsibleWhitespace(m_lastCharacter) && m_lastCharacter) {
</del><ins>+ if (needSpace && !deprecatedIsCollapsibleWhitespace(m_lastCharacter) && m_lastCharacter) {
</ins><span class="cx"> if (m_lastTextNode == m_node && runStart > 0 && str[runStart - 1] == ' ') {
</span><span class="cx"> unsigned spaceRunStart = runStart - 1;
</span><span class="cx"> while (spaceRunStart > 0 && 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<Range> findPlainText(const Range*, const String&, 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 "InsertParagraphSeparatorCommand.h"
</span><span class="cx"> #include "InsertTextCommand.h"
</span><span class="cx"> #include "RenderElement.h"
</span><ins>+#include "TextIterator.h"
</ins><span class="cx"> #include "VisibleUnits.h"
</span><span class="cx"> #include "htmlediting.h"
</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() > 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() > 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 "RenderElement.h"
</span><span class="cx"> #include "ShadowRoot.h"
</span><span class="cx"> #include "Text.h"
</span><ins>+#include "TextIterator.h"
</ins><span class="cx"> #include "VisibleUnits.h"
</span><span class="cx"> #include <wtf/Assertions.h>
</span><span class="cx"> #include <wtf/StdLibExtras.h>
</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<Element> createTabSpanElement(Document&);
</span><span class="cx"> PassRefPtr<Element> createTabSpanElement(Document&, PassRefPtr<Node> tabTextNode);
</span><span class="cx"> PassRefPtr<Element> createTabSpanElement(Document&, const String& tabText);
</span><span class="lines">@@ -225,26 +222,30 @@
</span><span class="cx"> Element* editableRootForPosition(const Position&, EditableType = ContentIsEditable);
</span><span class="cx"> Element* unsplittableElementForPosition(const Position&);
</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&);
</span><span class="cx">
</span><span class="cx"> Position adjustedSelectionStartForStyleComputation(const VisibleSelection&);
</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 "RenderBlock.h"
</span><span class="cx"> #include "Settings.h"
</span><span class="cx"> #include "StyleProperties.h"
</span><ins>+#include "TextIterator.h"
</ins><span class="cx"> #include "VisibleSelection.h"
</span><span class="cx"> #include "VisibleUnits.h"
</span><span class="cx"> #include "htmlediting.h"
</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 "Text.h"
</span><span class="cx"> #include "TextBreakIterator.h"
</span><span class="cx"> #include "TextControlInnerElements.h"
</span><ins>+#include "TextIterator.h"
</ins><span class="cx"> #include "TextNodeTraversal.h"
</span><span class="cx"> #include <wtf/Ref.h>
</span><span class="cx"> #include <wtf/StdLibExtras.h>
</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->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 < length; ++i) {
</span><del>- if (!(U_GET_GC_MASK(it.characterAt(i)) & U_GC_Z_MASK))
</del><ins>+ if (!(U_GET_GC_MASK(it.text()[i]) & 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 <wtf/StdLibExtras.h>
</span><span class="cx"> #include <wtf/TemporaryChange.h>
</span><span class="cx">
</span><del>-#if ENABLE(TOUCH_EVENTS)
</del><ins>+#if ENABLE(CSS_IMAGE_SET)
+#include "StyleCachedImageSet.h"
+#endif
+
</ins><span class="cx"> #if ENABLE(IOS_TOUCH_EVENTS)
</span><span class="cx"> #include "PlatformTouchEventIOS.h"
</span><del>-#else
-#include "PlatformTouchEvent.h"
</del><span class="cx"> #endif
</span><ins>+
+#if ENABLE(TOUCH_EVENTS)
</ins><span class="cx"> #include "TouchEvent.h"
</span><span class="cx"> #include "TouchList.h"
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-#if ENABLE(CSS_IMAGE_SET)
-#include "StyleCachedImageSet.h"
</del><ins>+#if ENABLE(TOUCH_EVENTS) && !ENABLE(IOS_TOUCH_EVENTS)
+#include "PlatformTouchEvent.h"
</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 <darin@apple.com>
+
+ 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 <andersca@apple.com>
</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 <WebCore/UndoStep.h>
</span><span class="cx"> #include <WebCore/UserTypingGestureIndicator.h>
</span><span class="cx"> #include <WebCore/VisibleSelection.h>
</span><ins>+#include <wtf/text/StringView.h>
</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 <darin@apple.com>
+
+ 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 <enrica@apple.com>
</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 <WebCore/WindowFeatures.h>
</span><span class="cx"> #include <stdio.h>
</span><span class="cx"> #include <wtf/NeverDestroyed.h>
</span><ins>+#include <wtf/text/StringView.h>
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(ASYNC_SCROLLING)
</span><span class="cx"> #include "RemoteScrollingCoordinatorProxy.h"
</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 <WebCore/SharedBuffer.h>
</span><span class="cx"> #include <WebCore/SubframeLoader.h>
</span><span class="cx"> #include <WebCore/SubstituteData.h>
</span><ins>+#include <WebCore/TextIterator.h>
</ins><span class="cx"> #include <WebCore/UserInputBridge.h>
</span><span class="cx"> #include <WebCore/VisiblePosition.h>
</span><span class="cx"> #include <WebCore/VisibleUnits.h>
</span></span></pre>
</div>
</div>
</body>
</html>