[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 13:23:44 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit c4351cc776632055edcef2e0f10d5550606e3023
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Sep 14 03:15:39 2010 +0000
2010-09-13 Mario Sanchez Prada <msanchez at igalia.com>
Reviewed by Martin Robinson.
[GTK] Code simplification needed in Atk Wrapper
https://bugs.webkit.org/show_bug.cgi?id=45687
Use TextIterator::rangeLength() to calculate endOffset
* accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
(getSelectionOffsetsForObject): Don't manually iterate over a
artificial new range but just call TextIterator::rangeLength on
the range created between the start and end positions.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67435 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 176dc9c..eb76f15 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-09-13 Mario Sanchez Prada <msanchez at igalia.com>
+
+ Reviewed by Martin Robinson.
+
+ [GTK] Code simplification needed in Atk Wrapper
+ https://bugs.webkit.org/show_bug.cgi?id=45687
+
+ Use TextIterator::rangeLength() to calculate endOffset
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (getSelectionOffsetsForObject): Don't manually iterate over a
+ artificial new range but just call TextIterator::rangeLength on
+ the range created between the start and end positions.
+
2010-09-13 Sam Weinig <sam at webkit.org>
Reviewed by Alice Liu.
diff --git a/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp b/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
index 980e16e..01dddd1 100644
--- a/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
+++ b/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
@@ -1397,20 +1397,10 @@ static void getSelectionOffsetsForObject(AccessibilityObject* coreObject, Visibl
else
nodeRangeEnd = selRange->endPosition();
- // Set preliminar values for start and end offsets
+ // Set values for start and end offsets
+ RefPtr<Range> nodeRange = Range::create(node->document(), nodeRangeStart, nodeRangeEnd);
startOffset = nodeRangeStart.offsetInContainerNode();
- endOffset = nodeRangeEnd.offsetInContainerNode();
-
- // If the end node is different then the start node, iterate over
- // those among them to build the effective value for endOffset
- if (nodeRangeStart.anchorNode() != nodeRangeEnd.anchorNode()) {
- RefPtr<Range> nodeRange = Range::create(node->document(), nodeRangeStart, positionBeforeNode(nodeRangeEnd.anchorNode()));
- for (TextIterator it(nodeRange.get()); !it.atEnd(); it.advance()) {
- RefPtr<Range> range = it.range();
- if (range->startContainer()->isTextNode())
- endOffset += range->endOffset();
- }
- }
+ endOffset = startOffset + TextIterator::rangeLength(nodeRange.get());
}
static gint webkit_accessible_text_get_n_selections(AtkText* text)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list