[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
kocienda
kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:29:26 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 6cb96ee8767b83e2332dc1d1f8eec475aaaaca45
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Mar 12 00:07:06 2004 +0000
Reviewed by Dave
I have clarified the concept (at least in my head)
that each edit command has an obligation to put the
selection in the right place after it is applied,
unapplied, or reapplied. Right now, each edit command
calls setStartingSelection and setEndingSelection to do
this, I made these function move the selection on
setting.
* khtml/editing/htmlediting_impl.cpp:
(EditCommandImpl::setStartingSelection)
(EditCommandImpl::setEndingSelection)
(InputTextCommandImpl::coalesce)
(InputTextCommandImpl::deleteCharacter)
(InputTextCommandImpl::execute)
* khtml/editing/htmlediting_impl.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6211 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index b19d822..5fc772f 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,6 +1,26 @@
2004-03-11 Ken Kocienda <kocienda at apple.com>
Reviewed by Dave
+
+ I have clarified the concept (at least in my head)
+ that each edit command has an obligation to put the
+ selection in the right place after it is applied,
+ unapplied, or reapplied. Right now, each edit command
+ calls setStartingSelection and setEndingSelection to do
+ this, I made these function move the selection on
+ setting.
+
+ * khtml/editing/htmlediting_impl.cpp:
+ (EditCommandImpl::setStartingSelection)
+ (EditCommandImpl::setEndingSelection)
+ (InputTextCommandImpl::coalesce)
+ (InputTextCommandImpl::deleteCharacter)
+ (InputTextCommandImpl::execute)
+ * khtml/editing/htmlediting_impl.h:
+
+2004-03-11 Ken Kocienda <kocienda at apple.com>
+
+ Reviewed by Dave
Various changes to move us forward on editing.
diff --git a/WebCore/khtml/editing/htmlediting_impl.cpp b/WebCore/khtml/editing/htmlediting_impl.cpp
index dddd702..10c1e77 100644
--- a/WebCore/khtml/editing/htmlediting_impl.cpp
+++ b/WebCore/khtml/editing/htmlediting_impl.cpp
@@ -187,6 +187,18 @@ KHTMLSelection EditCommandImpl::currentSelection() const
return m_document->part()->selection();
}
+void EditCommandImpl::setStartingSelection(const KHTMLSelection &s)
+{
+ m_startingSelection = s;
+ moveToStartingSelection();
+}
+
+void EditCommandImpl::setEndingSelection(const KHTMLSelection &s)
+{
+ m_endingSelection = s;
+ moveToEndingSelection();
+}
+
void EditCommandImpl::moveToStartingSelection()
{
ASSERT(m_document);
@@ -802,7 +814,6 @@ void InputTextCommandImpl::coalesce(const DOMString &text)
ASSERT(state() == Applied);
execute(text);
m_text += text;
- moveToEndingSelection();
}
void InputTextCommandImpl::deleteCharacter()
@@ -823,7 +834,6 @@ void InputTextCommandImpl::deleteCharacter()
ASSERT(exceptionCode == 0);
selection = KHTMLSelection(textNode, offset);
setEndingSelection(selection);
- moveToEndingSelection();
m_text = m_text.string().left(m_text.length() - 1);
}
}
@@ -842,7 +852,6 @@ void InputTextCommandImpl::execute(const DOMString &text)
insertText(textNode, selection.startOffset(), text);
selection = KHTMLSelection(selection.startNode(), selection.startOffset() + text.length());
setEndingSelection(selection);
- moveToEndingSelection();
}
//------------------------------------------------------------------------------------------
diff --git a/WebCore/khtml/editing/htmlediting_impl.h b/WebCore/khtml/editing/htmlediting_impl.h
index 21390ad..5517fd7 100644
--- a/WebCore/khtml/editing/htmlediting_impl.h
+++ b/WebCore/khtml/editing/htmlediting_impl.h
@@ -78,8 +78,8 @@ public:
ECommandState state() const { return m_state; }
void setState(ECommandState state) { m_state = state; }
- void setStartingSelection(const KHTMLSelection &s) { m_startingSelection = s; }
- void setEndingSelection(const KHTMLSelection &s) { m_endingSelection = s; }
+ void setStartingSelection(const KHTMLSelection &s);
+ void setEndingSelection(const KHTMLSelection &s);
void moveToStartingSelection();
void moveToEndingSelection();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list