Author: mareshkau
Date: 2007-09-14 10:36:12 -0400 (Fri, 14 Sep 2007)
New Revision: 3631
Modified:
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerEditor.java
Log:
code adjustment
Modified:
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerEditor.java
===================================================================
---
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerEditor.java 2007-09-14
14:28:14 UTC (rev 3630)
+++
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerEditor.java 2007-09-14
14:36:12 UTC (rev 3631)
@@ -14,7 +14,6 @@
import java.util.regex.Pattern;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
@@ -498,11 +497,9 @@
* Scrools viiew to some elements
* @param element -element to which we should scroll
*/
- private void scrollToElement(nsIDOMElement element){
- nsIDOMWindow domWindow = getWebBrowser().getContentDOMWindow();
- // get element positions on visual page
- Rectangle rect=XulRunnerVpeUtils.getElementBounds(element);
- domWindow.scrollTo(rect.x-10, rect.y-10);
+ private void scrollToElement(nsIDOMElement element){
+
+ getIFlasher().scrollElementIntoView(element);
}
}
Show replies by date