Diff
Modified: trunk/Source/WebCore/CMakeLists.txt (86853 => 86854)
--- trunk/Source/WebCore/CMakeLists.txt 2011-05-19 17:27:27 UTC (rev 86853)
+++ trunk/Source/WebCore/CMakeLists.txt 2011-05-19 17:46:09 UTC (rev 86854)
@@ -663,7 +663,6 @@
editing/InsertNodeBeforeCommand.cpp
editing/InsertParagraphSeparatorCommand.cpp
editing/InsertTextCommand.cpp
- editing/JoinTextNodesCommand.cpp
editing/MarkupAccumulator.cpp
editing/MergeIdenticalElementsCommand.cpp
editing/ModifySelectionListLevel.cpp
Modified: trunk/Source/WebCore/ChangeLog (86853 => 86854)
--- trunk/Source/WebCore/ChangeLog 2011-05-19 17:27:27 UTC (rev 86853)
+++ trunk/Source/WebCore/ChangeLog 2011-05-19 17:46:09 UTC (rev 86854)
@@ -2,6 +2,27 @@
Reviewed by Darin Adler.
+ JoinTextNodesCommand is never used
+ https://bugs.webkit.org/show_bug.cgi?id=61089
+
+ Deleted JoinTextNodesCommand because it's never used.
+
+ * CMakeLists.txt:
+ * GNUmakefile.list.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * editing/CompositeEditCommand.cpp:
+ * editing/CompositeEditCommand.h:
+ * editing/EditingAllInOne.cpp:
+ * editing/JoinTextNodesCommand.cpp: Removed.
+ * editing/JoinTextNodesCommand.h: Removed.
+
+2011-05-19 Ryosuke Niwa <[email protected]>
+
+ Reviewed by Darin Adler.
+
REGRESSION (r83322): Many crashes in Mail.app in WebCore::Node::nodeIndex
https://bugs.webkit.org/show_bug.cgi?id=61012
Modified: trunk/Source/WebCore/GNUmakefile.list.am (86853 => 86854)
--- trunk/Source/WebCore/GNUmakefile.list.am 2011-05-19 17:27:27 UTC (rev 86853)
+++ trunk/Source/WebCore/GNUmakefile.list.am 2011-05-19 17:46:09 UTC (rev 86854)
@@ -1348,8 +1348,6 @@
Source/WebCore/editing/InsertParagraphSeparatorCommand.h \
Source/WebCore/editing/InsertTextCommand.cpp \
Source/WebCore/editing/InsertTextCommand.h \
- Source/WebCore/editing/JoinTextNodesCommand.cpp \
- Source/WebCore/editing/JoinTextNodesCommand.h \
Source/WebCore/editing/markup.cpp \
Source/WebCore/editing/markup.h \
Source/WebCore/editing/MarkupAccumulator.cpp \
Modified: trunk/Source/WebCore/WebCore.gypi (86853 => 86854)
--- trunk/Source/WebCore/WebCore.gypi 2011-05-19 17:27:27 UTC (rev 86853)
+++ trunk/Source/WebCore/WebCore.gypi 2011-05-19 17:46:09 UTC (rev 86854)
@@ -2643,8 +2643,6 @@
'editing/InsertParagraphSeparatorCommand.h',
'editing/InsertTextCommand.cpp',
'editing/InsertTextCommand.h',
- 'editing/JoinTextNodesCommand.cpp',
- 'editing/JoinTextNodesCommand.h',
'editing/MarkupAccumulator.cpp',
'editing/MarkupAccumulator.h',
'editing/MergeIdenticalElementsCommand.cpp',
Modified: trunk/Source/WebCore/WebCore.pro (86853 => 86854)
--- trunk/Source/WebCore/WebCore.pro 2011-05-19 17:27:27 UTC (rev 86853)
+++ trunk/Source/WebCore/WebCore.pro 2011-05-19 17:46:09 UTC (rev 86854)
@@ -584,7 +584,6 @@
editing/InsertNodeBeforeCommand.cpp \
editing/InsertParagraphSeparatorCommand.cpp \
editing/InsertTextCommand.cpp \
- editing/JoinTextNodesCommand.cpp \
editing/markup.cpp \
editing/MarkupAccumulator.cpp \
editing/MergeIdenticalElementsCommand.cpp \
@@ -1559,7 +1558,6 @@
editing/InsertNodeBeforeCommand.h \
editing/InsertParagraphSeparatorCommand.h \
editing/InsertTextCommand.h \
- editing/JoinTextNodesCommand.h \
editing/markup.h \
editing/MergeIdenticalElementsCommand.h \
editing/ModifySelectionListLevel.h \
Modified: trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj (86853 => 86854)
--- trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj 2011-05-19 17:27:27 UTC (rev 86853)
+++ trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj 2011-05-19 17:46:09 UTC (rev 86854)
@@ -49622,62 +49622,6 @@
>
</File>
<File
- RelativePath="..\editing\JoinTextNodesCommand.cpp"
- >
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_Cairo_CFLite|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release_Cairo_CFLite|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_All|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Production|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\editing\JoinTextNodesCommand.h"
- >
- </File>
- <File
RelativePath="..\editing\markup.cpp"
>
<FileConfiguration
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (86853 => 86854)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2011-05-19 17:27:27 UTC (rev 86853)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2011-05-19 17:46:09 UTC (rev 86854)
@@ -2809,8 +2809,6 @@
93309DF0099E64920056E581 /* InsertParagraphSeparatorCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309DA1099E64910056E581 /* InsertParagraphSeparatorCommand.h */; };
93309DF1099E64920056E581 /* InsertTextCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309DA2099E64910056E581 /* InsertTextCommand.cpp */; };
93309DF2099E64920056E581 /* InsertTextCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309DA3099E64910056E581 /* InsertTextCommand.h */; };
- 93309DF3099E64920056E581 /* JoinTextNodesCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309DA4099E64910056E581 /* JoinTextNodesCommand.cpp */; };
- 93309DF4099E64920056E581 /* JoinTextNodesCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309DA5099E64910056E581 /* JoinTextNodesCommand.h */; };
93309DF7099E64920056E581 /* markup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309DA8099E64910056E581 /* markup.cpp */; };
93309DF8099E64920056E581 /* markup.h in Headers */ = {isa = PBXBuildFile; fileRef = 93309DA9099E64910056E581 /* markup.h */; settings = {ATTRIBUTES = (Private, ); }; };
93309DF9099E64920056E581 /* MergeIdenticalElementsCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93309DAA099E64910056E581 /* MergeIdenticalElementsCommand.cpp */; };
@@ -9333,8 +9331,6 @@
93309DA1099E64910056E581 /* InsertParagraphSeparatorCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InsertParagraphSeparatorCommand.h; sourceTree = "<group>"; };
93309DA2099E64910056E581 /* InsertTextCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InsertTextCommand.cpp; sourceTree = "<group>"; };
93309DA3099E64910056E581 /* InsertTextCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InsertTextCommand.h; sourceTree = "<group>"; };
- 93309DA4099E64910056E581 /* JoinTextNodesCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JoinTextNodesCommand.cpp; sourceTree = "<group>"; };
- 93309DA5099E64910056E581 /* JoinTextNodesCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JoinTextNodesCommand.h; sourceTree = "<group>"; };
93309DA8099E64910056E581 /* markup.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = markup.cpp; sourceTree = "<group>"; };
93309DA9099E64910056E581 /* markup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = markup.h; sourceTree = "<group>"; };
93309DAA099E64910056E581 /* MergeIdenticalElementsCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MergeIdenticalElementsCommand.cpp; sourceTree = "<group>"; };
@@ -15558,8 +15554,6 @@
93309DA1099E64910056E581 /* InsertParagraphSeparatorCommand.h */,
93309DA2099E64910056E581 /* InsertTextCommand.cpp */,
93309DA3099E64910056E581 /* InsertTextCommand.h */,
- 93309DA4099E64910056E581 /* JoinTextNodesCommand.cpp */,
- 93309DA5099E64910056E581 /* JoinTextNodesCommand.h */,
93309DA8099E64910056E581 /* markup.cpp */,
93309DA9099E64910056E581 /* markup.h */,
9728C3111268E4390041E89B /* MarkupAccumulator.cpp */,
@@ -21311,7 +21305,6 @@
59EE12321106082900885116 /* JNIUtility.h in Headers */,
59EE122E1106080F00885116 /* JNIUtilityPrivate.h in Headers */,
596950821321059900C3ED18 /* JobjectWrapper.h in Headers */,
- 93309DF4099E64920056E581 /* JoinTextNodesCommand.h in Headers */,
418F88050FF957AF0080F045 /* JSAbstractWorker.h in Headers */,
49EECF01105070C400099FAB /* JSArrayBuffer.h in Headers */,
49EECF1C105072F300099FAB /* JSArrayBufferView.h in Headers */,
@@ -24103,7 +24096,6 @@
59EE12301106081F00885116 /* JNIUtility.cpp in Sources */,
59EE122C1106080500885116 /* JNIUtilityPrivate.cpp in Sources */,
59695084132105A500C3ED18 /* JobjectWrapper.cpp in Sources */,
- 93309DF3099E64920056E581 /* JoinTextNodesCommand.cpp in Sources */,
418F88040FF957AE0080F045 /* JSAbstractWorker.cpp in Sources */,
49EECF00105070C400099FAB /* JSArrayBuffer.cpp in Sources */,
BC275CB311C5E85C00C9206C /* JSArrayBufferCustom.cpp in Sources */,
Modified: trunk/Source/WebCore/editing/CompositeEditCommand.cpp (86853 => 86854)
--- trunk/Source/WebCore/editing/CompositeEditCommand.cpp 2011-05-19 17:27:27 UTC (rev 86853)
+++ trunk/Source/WebCore/editing/CompositeEditCommand.cpp 2011-05-19 17:46:09 UTC (rev 86854)
@@ -43,7 +43,6 @@
#include "InsertNodeBeforeCommand.h"
#include "InsertParagraphSeparatorCommand.h"
#include "InsertTextCommand.h"
-#include "JoinTextNodesCommand.h"
#include "MergeIdenticalElementsCommand.h"
#include "Range.h"
#include "RemoveCSSPropertyCommand.h"
@@ -293,11 +292,6 @@
applyCommandToComposite(SplitTextNodeContainingElementCommand::create(text, offset));
}
-void CompositeEditCommand::joinTextNodes(PassRefPtr<Text> text1, PassRefPtr<Text> text2)
-{
- applyCommandToComposite(JoinTextNodesCommand::create(text1, text2));
-}
-
void CompositeEditCommand::inputText(const String& text, bool selectInsertedText)
{
unsigned offset = 0;
Modified: trunk/Source/WebCore/editing/CompositeEditCommand.h (86853 => 86854)
--- trunk/Source/WebCore/editing/CompositeEditCommand.h 2011-05-19 17:27:27 UTC (rev 86853)
+++ trunk/Source/WebCore/editing/CompositeEditCommand.h 2011-05-19 17:46:09 UTC (rev 86854)
@@ -66,7 +66,6 @@
void insertParagraphSeparator(bool useDefaultParagraphElement = false);
void insertLineBreak();
void insertTextIntoNode(PassRefPtr<Text>, unsigned offset, const String& text);
- void joinTextNodes(PassRefPtr<Text>, PassRefPtr<Text>);
void mergeIdenticalElements(PassRefPtr<Element>, PassRefPtr<Element>);
void rebalanceWhitespace();
void rebalanceWhitespaceAt(const Position&);
Modified: trunk/Source/WebCore/editing/EditingAllInOne.cpp (86853 => 86854)
--- trunk/Source/WebCore/editing/EditingAllInOne.cpp 2011-05-19 17:27:27 UTC (rev 86853)
+++ trunk/Source/WebCore/editing/EditingAllInOne.cpp 2011-05-19 17:46:09 UTC (rev 86854)
@@ -49,7 +49,6 @@
#include <InsertNodeBeforeCommand.cpp>
#include <InsertParagraphSeparatorCommand.cpp>
#include <InsertTextCommand.cpp>
-#include <JoinTextNodesCommand.cpp>
#include <MarkupAccumulator.cpp>
#include <MergeIdenticalElementsCommand.cpp>
#include <ModifySelectionListLevel.cpp>
Deleted: trunk/Source/WebCore/editing/JoinTextNodesCommand.cpp (86853 => 86854)
--- trunk/Source/WebCore/editing/JoinTextNodesCommand.cpp 2011-05-19 17:27:27 UTC (rev 86853)
+++ trunk/Source/WebCore/editing/JoinTextNodesCommand.cpp 2011-05-19 17:46:09 UTC (rev 86854)
@@ -1,78 +0,0 @@
-/*
- * Copyright (C) 2005, 2008 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "JoinTextNodesCommand.h"
-
-#include "Text.h"
-
-namespace WebCore {
-
-JoinTextNodesCommand::JoinTextNodesCommand(PassRefPtr<Text> text1, PassRefPtr<Text> text2)
- : SimpleEditCommand(text1->document()), m_text1(text1), m_text2(text2)
-{
- ASSERT(m_text1);
- ASSERT(m_text2);
- ASSERT(m_text1->nextSibling() == m_text2);
- ASSERT(m_text1->length() > 0);
- ASSERT(m_text2->length() > 0);
-}
-
-void JoinTextNodesCommand::doApply()
-{
- if (m_text1->nextSibling() != m_text2)
- return;
-
- ContainerNode* parent = m_text2->parentNode();
- if (!parent || !parent->rendererIsEditable())
- return;
-
- ExceptionCode ec = 0;
- m_text2->insertData(0, m_text1->data(), ec);
- if (ec)
- return;
-
- m_text1->remove(ec);
-}
-
-void JoinTextNodesCommand::doUnapply()
-{
- if (m_text1->parentNode())
- return;
-
- ContainerNode* parent = m_text2->parentNode();
- if (!parent || !parent->rendererIsEditable())
- return;
-
- ExceptionCode ec = 0;
-
- parent->insertBefore(m_text1.get(), m_text2.get(), ec);
- if (ec)
- return;
-
- m_text2->deleteData(0, m_text1->length(), ec);
-}
-
-} // namespace WebCore
Deleted: trunk/Source/WebCore/editing/JoinTextNodesCommand.h (86853 => 86854)
--- trunk/Source/WebCore/editing/JoinTextNodesCommand.h 2011-05-19 17:27:27 UTC (rev 86853)
+++ trunk/Source/WebCore/editing/JoinTextNodesCommand.h 2011-05-19 17:46:09 UTC (rev 86854)
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef JoinTextNodesCommand_h
-#define JoinTextNodesCommand_h
-
-#include "EditCommand.h"
-
-namespace WebCore {
-
-class Text;
-
-class JoinTextNodesCommand : public SimpleEditCommand {
-public:
- static PassRefPtr<JoinTextNodesCommand> create(PassRefPtr<Text> text1, PassRefPtr<Text> text2)
- {
- return adoptRef(new JoinTextNodesCommand(text1, text2));
- }
-
-private:
- JoinTextNodesCommand(PassRefPtr<Text>, PassRefPtr<Text>);
-
- virtual void doApply();
- virtual void doUnapply();
-
- RefPtr<Text> m_text1;
- RefPtr<Text> m_text2;
-};
-
-} // namespace WebCore
-
-#endif // JoinTextNodesCommand_h