Author: yradtsevich
Date: 2010-06-11 04:24:03 -0400 (Fri, 11 Jun 2010)
New Revision: 22759
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/util/XulRunnerVpeUtils.java
Log:
Merged revision 22214 to trunk
https://svn.jboss.org/repos/jbosstools/branches/3.2.helios
.......
r22214 | mareshkau
https://jira.jboss.org/browse/JBIDE-6429
.......
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-11
08:12:58 UTC (rev 22758)
+++
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/util/XulRunnerVpeUtils.java 2010-06-11
08:24:03 UTC (rev 22759)
@@ -20,10 +20,6 @@
import org.mozilla.interfaces.nsIAccessibleCoordinateType;
import org.mozilla.interfaces.nsIAccessibleRetrieval;
import org.mozilla.interfaces.nsIAccessibleText;
-import org.mozilla.interfaces.nsIBoxObject;
-import org.mozilla.interfaces.nsIDOMDocument;
-import org.mozilla.interfaces.nsIDOMElement;
-import org.mozilla.interfaces.nsIDOMNSDocument;
import org.mozilla.interfaces.nsIDOMNSElement;
import org.mozilla.interfaces.nsIDOMNSHTMLElement;
import org.mozilla.interfaces.nsIDOMNode;
@@ -74,18 +70,12 @@
*/
static public Rectangle getElementBounds(nsIDOMNode domNode) {
try {
- nsIDOMElement domElement = queryInterface(domNode, nsIDOMElement.class);
-
nsIDOMNSElement htmlElement = queryInterface(domNode, nsIDOMNSElement.class);
nsIDOMNSHTMLElement domNSHTMLElement = queryInterface(domNode,
nsIDOMNSHTMLElement.class);
- nsIDOMDocument document = domElement.getOwnerDocument();
-
- nsIDOMNSDocument nsDocument = queryInterface(document, nsIDOMNSDocument.class);
- nsIBoxObject boxObject = nsDocument.getBoxObjectFor(domElement);
Rectangle rectangle = new Rectangle(findPosX(domNSHTMLElement),
findPosY(domNSHTMLElement),
- boxObject.getWidth(),
- boxObject.getHeight());
+ htmlElement.getClientWidth(),
+ htmlElement.getClientHeight());
if (BrowserPlugin.PRINT_ELEMENT_BOUNDS) {
System.out.println("getElementBounds(IDOMNode) returns "
@@ -102,10 +92,6 @@
htmlElement.getClientTop(), htmlElement
.getClientWidth(), htmlElement
.getClientHeight()));
- System.out.println("nsIBoxObject getX,getY,getWidth,getHeight"
- + new Rectangle(boxObject.getX(), boxObject.getY(),
- boxObject.getWidth(), boxObject.getHeight()));
-
}
return rectangle;