Author: yradtsevich
Date: 2010-06-08 10:51:11 -0400 (Tue, 08 Jun 2010)
New Revision: 22638
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/util/XulRunnerVpeUtils.java
Log:
https://jira.jboss.org/browse/JBIDE-6229
Implement DnD support for selected text in VPE
- Fixed an inaccuracy in the getTextSelectionBounds method.
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/util/XulRunnerVpeUtils.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/util/XulRunnerVpeUtils.java 2010-06-08
14:42:03 UTC (rev 22637)
+++
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/util/XulRunnerVpeUtils.java 2010-06-08
14:51:11 UTC (rev 22638)
@@ -139,9 +139,12 @@
int[] height = new int[1];
accessibleTextAncestor.getRangeExtents(startOffset[0], endOffset[0],
x, y, width, height, nsIAccessibleCoordinateType.COORDTYPE_PARENT_RELATIVE);
-
- nsIDOMNode ancestorParent = queryInterface(accessibleTextAncestor,
nsIAccessNode.class)
- .getDOMNode().getParentNode();
+
+ nsIAccessible ancestorAccessibleParent
+ = queryInterface(accessibleTextAncestor, nsIAccessible.class).getParent();
+ nsIDOMNode ancestorParent
+ = queryInterface(ancestorAccessibleParent, nsIAccessNode.class).getDOMNode();
+
Rectangle ancestorParentBounds;
if (ancestorParent != null) {
ancestorParentBounds = getElementBounds(ancestorParent);