[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:59:48 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 814745bf1a71919fd8ece5b780a176e78c30aab9
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Oct 7 17:43:16 2003 +0000
Reviewed by Chris.
- fixed some exceptions I was seeing with my recent text change
* khtml/khtml_part.cpp:
(KHTMLPart::text): Return an empty string for a null range rather than raising an exception.
(KHTMLPart::selection): Return a null range rather than raising an exception if there is
no selection.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5143 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index b95d686..aed3cff 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,16 @@
2003-10-07 Darin Adler <darin at apple.com>
+ Reviewed by Chris.
+
+ - fixed some exceptions I was seeing with my recent text change
+
+ * khtml/khtml_part.cpp:
+ (KHTMLPart::text): Return an empty string for a null range rather than raising an exception.
+ (KHTMLPart::selection): Return a null range rather than raising an exception if there is
+ no selection.
+
+2003-10-07 Darin Adler <darin at apple.com>
+
Reviewed by Dave.
- removed code that mutates \n into a space so we can pass more W3C DOM Level 1 Core tests
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index b95d686..aed3cff 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,16 @@
2003-10-07 Darin Adler <darin at apple.com>
+ Reviewed by Chris.
+
+ - fixed some exceptions I was seeing with my recent text change
+
+ * khtml/khtml_part.cpp:
+ (KHTMLPart::text): Return an empty string for a null range rather than raising an exception.
+ (KHTMLPart::selection): Return a null range rather than raising an exception if there is
+ no selection.
+
+2003-10-07 Darin Adler <darin at apple.com>
+
Reviewed by Dave.
- removed code that mutates \n into a space so we can pass more W3C DOM Level 1 Core tests
diff --git a/WebCore/khtml/khtml_part.cpp b/WebCore/khtml/khtml_part.cpp
index e922c72..2457cdf 100644
--- a/WebCore/khtml/khtml_part.cpp
+++ b/WebCore/khtml/khtml_part.cpp
@@ -2218,10 +2218,14 @@ bool KHTMLPart::findTextNext( const QString &str, bool forward, bool caseSensiti
QString KHTMLPart::text(const DOM::Range &r) const
{
- // FIXME: This whole function should use the render tree and not the DOM tree, since elements could
- // be hidden using CSS, or additional generated content could be added. For now, we just make sure
- // text objects walk their renderers' InlineTextBox objects, so that we at least get the whitespace
- // stripped out properly and obey CSS visibility for text runs.
+ // FIXME: This whole function should use the render tree and not the DOM tree, since elements could
+ // be hidden using CSS, or additional generated content could be added. For now, we just make sure
+ // text objects walk their renderers' InlineTextBox objects, so that we at least get the whitespace
+ // stripped out properly and obey CSS visibility for text runs.
+
+ if (r.isNull())
+ return QString();
+
bool hasNewLine = true;
bool addedSpace = true;
QString text;
@@ -2391,8 +2395,10 @@ bool KHTMLPart::hasSelection() const
DOM::Range KHTMLPart::selection() const
{
DOM::Range r = document().createRange();
- r.setStart( d->m_selectionStart, d->m_startOffset );
- r.setEnd( d->m_selectionEnd, d->m_endOffset );
+ if (hasSelection()) {
+ r.setStart( d->m_selectionStart, d->m_startOffset );
+ r.setEnd( d->m_selectionEnd, d->m_endOffset );
+ }
return r;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list