[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
hyatt
hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:53:35 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 2c7bb6003e04bb9ad65e116e73c84ed7b394fbd8
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Aug 22 22:02:56 2003 +0000
Fix for 3388363, copying a word in a list item copied too much. The code that checked
for the bullet would add in too much text sometimes.
Reviewed by john
* kwq/KWQKHTMLPart.mm:
(isTextFirstInListItem):
(KWQKHTMLPart::attributedString):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4881 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 7e182f0..7f98d61 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,14 @@
+2003-08-22 David Hyatt <hyatt at apple.com>
+
+ Fix for 3388363, copying a word in a list item copied too much. The code that checked
+ for the bullet would add in too much text sometimes.
+
+ Reviewed by john
+
+ * kwq/KWQKHTMLPart.mm:
+ (isTextFirstInListItem):
+ (KWQKHTMLPart::attributedString):
+
2003-08-21 Darin Adler <darin at apple.com>
* Makefile.am: Work around DLCFN issue to prevent constant churn of config.h.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 7e182f0..7f98d61 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,14 @@
+2003-08-22 David Hyatt <hyatt at apple.com>
+
+ Fix for 3388363, copying a word in a list item copied too much. The code that checked
+ for the bullet would add in too much text sometimes.
+
+ Reviewed by john
+
+ * kwq/KWQKHTMLPart.mm:
+ (isTextFirstInListItem):
+ (KWQKHTMLPart::attributedString):
+
2003-08-21 Darin Adler <darin at apple.com>
* Makefile.am: Work around DLCFN issue to prevent constant churn of config.h.
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 72df723..bb9ce6f 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -1908,12 +1908,18 @@ static ElementImpl *listParent(ElementImpl *item)
return item;
}
-static NodeImpl *inList(NodeImpl *e)
+static NodeImpl* isTextFirstInListItem(NodeImpl *e)
{
- while (e){
- if (Node(e).elementId() == ID_LI)
- return e;
- e = e->parentNode();
+ if (Node(e).nodeType() != Node::TEXT_NODE)
+ return 0;
+ NodeImpl* par = e->parentNode();
+ while (par) {
+ if (par->firstChild() != e)
+ return 0;
+ if (Node(par).elementId() == ID_LI)
+ return par;
+ e = par;
+ par = par->parentNode();
}
return 0;
}
@@ -1943,8 +1949,8 @@ NSAttributedString *KWQKHTMLPart::attributedString(NodeImpl *_startNode, int sta
// If the first item is the entire text of a list item, use the list item node as the start of the
// selection, not the text node. The user's intent was probably to select the list.
- if (n.nodeType() == Node::TEXT_NODE && startOffset == 0){
- NodeImpl *startListNode = inList(_startNode);
+ if (n.nodeType() == Node::TEXT_NODE && startOffset == 0) {
+ NodeImpl *startListNode = isTextFirstInListItem(_startNode);
if (startListNode){
_startNode = startListNode;
n = _startNode;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list