[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9
eric at webkit.org
eric at webkit.org
Thu Feb 4 21:32:31 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 77570fa52dbbc865397612a98f175066ba8836c0
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Jan 29 18:32:33 2010 +0000
2010-01-29 Tony Chang <tony at chromium.org>
Reviewed by Darin Adler.
Add gdb helper methods for Ranges like we have for VisibleSelections.
https://bugs.webkit.org/show_bug.cgi?id=34308
No new tests, these are only for debugging.
* dom/Position.cpp:
(WebCore::Position::showTreeForThis):
* dom/Range.cpp:
(showTree):
* dom/Range.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54071 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 0852b35..40211e9 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-01-29 Tony Chang <tony at chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Add gdb helper methods for Ranges like we have for VisibleSelections.
+ https://bugs.webkit.org/show_bug.cgi?id=34308
+
+ No new tests, these are only for debugging.
+
+ * dom/Position.cpp:
+ (WebCore::Position::showTreeForThis):
+ * dom/Range.cpp:
+ (showTree):
+ * dom/Range.h:
+
2010-01-29 Drew Wilson <atwilson at chromium.org>
Reviewed by Adam Barth.
diff --git a/WebCore/dom/Position.cpp b/WebCore/dom/Position.cpp
index f2a7830..0126835 100644
--- a/WebCore/dom/Position.cpp
+++ b/WebCore/dom/Position.cpp
@@ -1176,8 +1176,10 @@ void Position::formatForDebugger(char* buffer, unsigned length) const
void Position::showTreeForThis() const
{
- if (node())
+ if (node()) {
node()->showTreeForThis();
+ fprintf(stderr, "offset: %d\n", m_offset);
+ }
}
#endif
diff --git a/WebCore/dom/Range.cpp b/WebCore/dom/Range.cpp
index 96130d0..52d1785 100644
--- a/WebCore/dom/Range.cpp
+++ b/WebCore/dom/Range.cpp
@@ -1930,3 +1930,17 @@ void Range::getBorderAndTextQuads(Vector<FloatQuad>& quads) const
}
} // namespace WebCore
+
+#ifndef NDEBUG
+
+void showTree(const WebCore::Range* range)
+{
+ if (range && range->boundaryPointsValid()) {
+ WebCore::Position start = range->startPosition();
+ WebCore::Position end = range->endPosition();
+ start.node()->showTreeAndMark(start.node(), "S", end.node(), "E");
+ fprintf(stderr, "start offset: %d, end offset: %d\n", start.deprecatedEditingOffset(), end.deprecatedEditingOffset());
+ }
+}
+
+#endif
diff --git a/WebCore/dom/Range.h b/WebCore/dom/Range.h
index 583f9f0..fd0f66a 100644
--- a/WebCore/dom/Range.h
+++ b/WebCore/dom/Range.h
@@ -158,4 +158,9 @@ inline bool operator!=(const Range& a, const Range& b) { return !(a == b); }
} // namespace
+#ifndef NDEBUG
+// Outside the WebCore namespace for ease of invocation from gdb.
+void showTree(const WebCore::Range*);
+#endif
+
#endif
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list