Removes 'overflow' checks from scrollIntoView(). Turns out it just wasn't necessary, and was causing a couple of problems.
Issue: 2120
Patch by: jgw
Review by: ecc
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@1899 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/src/com/google/gwt/user/client/impl/DOMImpl.java b/user/src/com/google/gwt/user/client/impl/DOMImpl.java
index a0b49bf..deed7a2 100644
--- a/user/src/com/google/gwt/user/client/impl/DOMImpl.java
+++ b/user/src/com/google/gwt/user/client/impl/DOMImpl.java
@@ -296,22 +296,17 @@
var cur = elem.parentNode;
while (cur && (cur.nodeType == 1)) {
- // body tags are implicitly scrollable
- if ((cur.style.overflow == 'auto') || (cur.style.overflow == 'scroll') ||
- (cur.tagName == 'BODY')) {
-
- if (left < cur.scrollLeft) {
- cur.scrollLeft = left;
- }
- if (left + width > cur.scrollLeft + cur.clientWidth) {
- cur.scrollLeft = (left + width) - cur.clientWidth;
- }
- if (top < cur.scrollTop) {
- cur.scrollTop = top;
- }
- if (top + height > cur.scrollTop + cur.clientHeight) {
- cur.scrollTop = (top + height) - cur.clientHeight;
- }
+ if (left < cur.scrollLeft) {
+ cur.scrollLeft = left;
+ }
+ if (left + width > cur.scrollLeft + cur.clientWidth) {
+ cur.scrollLeft = (left + width) - cur.clientWidth;
+ }
+ if (top < cur.scrollTop) {
+ cur.scrollTop = top;
+ }
+ if (top + height > cur.scrollTop + cur.clientHeight) {
+ cur.scrollTop = (top + height) - cur.clientHeight;
}
var offsetLeft = cur.offsetLeft, offsetTop = cur.offsetTop;