Title: [146796] trunk/Source/WebCore
Revision
146796
Author
t...@chromium.org
Date
2013-03-25 12:16:05 -0700 (Mon, 25 Mar 2013)

Log Message

Remove TextIterator argumentless constructor
https://bugs.webkit.org/show_bug.cgi?id=113226

Reviewed by Ryosuke Niwa.

The TextIterator argumentless constructors are never used and wouldn't be useful
since you can't specify a range.

No new tests, removing dead code. There should be no behavior change.

* editing/TextIterator.cpp: Remove constructors.
* editing/TextIterator.h:
(TextIterator):
(SimplifiedBackwardsTextIterator):
(CharacterIterator):
(BackwardsCharacterIterator):
(WordAwareIterator):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (146795 => 146796)


--- trunk/Source/WebCore/ChangeLog	2013-03-25 19:05:57 UTC (rev 146795)
+++ trunk/Source/WebCore/ChangeLog	2013-03-25 19:16:05 UTC (rev 146796)
@@ -1,3 +1,23 @@
+2013-03-25  Tony Chang  <t...@chromium.org>
+
+        Remove TextIterator argumentless constructor
+        https://bugs.webkit.org/show_bug.cgi?id=113226
+
+        Reviewed by Ryosuke Niwa.
+
+        The TextIterator argumentless constructors are never used and wouldn't be useful
+        since you can't specify a range.
+
+        No new tests, removing dead code. There should be no behavior change.
+
+        * editing/TextIterator.cpp: Remove constructors.
+        * editing/TextIterator.h:
+        (TextIterator):
+        (SimplifiedBackwardsTextIterator):
+        (CharacterIterator):
+        (BackwardsCharacterIterator):
+        (WordAwareIterator):
+
 2013-03-25  Brandon Jones  <bajo...@chromium.org>
 
         Enabled canvas.getContext("webgl") on Desktop Chrome

Modified: trunk/Source/WebCore/editing/TextIterator.cpp (146795 => 146796)


--- trunk/Source/WebCore/editing/TextIterator.cpp	2013-03-25 19:05:57 UTC (rev 146795)
+++ trunk/Source/WebCore/editing/TextIterator.cpp	2013-03-25 19:16:05 UTC (rev 146796)
@@ -246,30 +246,6 @@
 
 // --------
 
-TextIterator::TextIterator()
-    : m_startContainer(0)
-    , m_startOffset(0)
-    , m_endContainer(0)
-    , m_endOffset(0)
-    , m_positionNode(0)
-    , m_textCharacters(0)
-    , m_textLength(0)
-    , m_remainingTextBox(0)
-    , m_firstLetterText(0)
-    , m_lastCharacter(0)
-    , m_sortedTextBoxesPosition(0)
-    , m_emitsCharactersBetweenAllVisiblePositions(false)
-    , m_entersTextControls(false)
-    , m_emitsTextWithoutTranscoding(false)
-    , m_emitsOriginalText(false)
-    , m_handledFirstLetter(false)
-    , m_ignoresStyleVisibility(false)
-    , m_emitsObjectReplacementCharacters(false)
-    , m_stopsOnFormControls(false)
-    , m_shouldStop(false)
-{
-}
-
 TextIterator::TextIterator(const Range* r, TextIteratorBehavior behavior)
     : m_startContainer(0)
     , m_startOffset(0)
@@ -1088,31 +1064,6 @@
 
 // --------
 
-SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator()
-    : m_node(0)
-    , m_offset(0)
-    , m_handledNode(false)
-    , m_handledChildren(false)
-    , m_startNode(0)
-    , m_startOffset(0)
-    , m_endNode(0)
-    , m_endOffset(0)
-    , m_positionNode(0)
-    , m_positionStartOffset(0)
-    , m_positionEndOffset(0)
-    , m_textCharacters(0)
-    , m_textLength(0)
-    , m_lastTextNode(0)
-    , m_lastCharacter(0)
-    , m_singleCharacterBuffer(0)
-    , m_havePassedStartNode(false)
-    , m_shouldHandleFirstLetter(false)
-    , m_stopsOnFormControls(false)
-    , m_shouldStop(false)
-    , m_emitsOriginalText(false)
-{
-}
-
 SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator(const Range* r, TextIteratorBehavior behavior)
     : m_node(0)
     , m_offset(0)
@@ -1393,13 +1344,6 @@
 
 // --------
 
-CharacterIterator::CharacterIterator()
-    : m_offset(0)
-    , m_runOffset(0)
-    , m_atBreak(true)
-{
-}
-
 CharacterIterator::CharacterIterator(const Range* r, TextIteratorBehavior behavior)
     : m_offset(0)
     , m_runOffset(0)
@@ -1499,13 +1443,6 @@
         end->endContainer(), end->endOffset());
 }
 
-BackwardsCharacterIterator::BackwardsCharacterIterator()
-    : m_offset(0)
-    , m_runOffset(0)
-    , m_atBreak(true)
-{
-}
-
 BackwardsCharacterIterator::BackwardsCharacterIterator(const Range* range, TextIteratorBehavior behavior)
     : m_offset(0)
     , m_runOffset(0)
@@ -1574,12 +1511,6 @@
 
 // --------
 
-WordAwareIterator::WordAwareIterator()
-    : m_previousText(0)
-    , m_didLookAhead(false)
-{
-}
-
 WordAwareIterator::WordAwareIterator(const Range* r)
     : m_previousText(0)
     , m_didLookAhead(true) // so we consider the first chunk from the text iterator

Modified: trunk/Source/WebCore/editing/TextIterator.h (146795 => 146796)


--- trunk/Source/WebCore/editing/TextIterator.h	2013-03-25 19:05:57 UTC (rev 146795)
+++ trunk/Source/WebCore/editing/TextIterator.h	2013-03-25 19:16:05 UTC (rev 146796)
@@ -85,9 +85,8 @@
 
 class TextIterator {
 public:
-    TextIterator();
-    ~TextIterator();
     explicit TextIterator(const Range*, TextIteratorBehavior = TextIteratorDefaultBehavior);
+    ~TextIterator();
 
     bool atEnd() const { return !m_positionNode || m_shouldStop; }
     void advance();
@@ -200,7 +199,6 @@
 // chunks so as to optimize for performance of the iteration.
 class SimplifiedBackwardsTextIterator {
 public:
-    SimplifiedBackwardsTextIterator();
     explicit SimplifiedBackwardsTextIterator(const Range*, TextIteratorBehavior = TextIteratorDefaultBehavior);
     
     bool atEnd() const { return !m_positionNode || m_shouldStop; }
@@ -269,7 +267,6 @@
 // character at a time, or faster, as needed. Useful for searching.
 class CharacterIterator {
 public:
-    CharacterIterator();
     explicit CharacterIterator(const Range*, TextIteratorBehavior = TextIteratorDefaultBehavior);
     
     void advance(int numCharacters);
@@ -294,7 +291,6 @@
     
 class BackwardsCharacterIterator {
 public:
-    BackwardsCharacterIterator();
     explicit BackwardsCharacterIterator(const Range*, TextIteratorBehavior = TextIteratorDefaultBehavior);
 
     void advance(int);
@@ -315,7 +311,6 @@
 // meaning they never end split up a word.  This is useful for spellcheck or (perhaps one day) searching.
 class WordAwareIterator {
 public:
-    WordAwareIterator();
     explicit WordAwareIterator(const Range*);
     ~WordAwareIterator();
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to