From: Artur Signell Date: Tue, 6 Sep 2016 19:10:12 +0000 (+0300) Subject: Remove old Firefox bug workaround for which there is no test X-Git-Tag: 8.0.0.alpha1~15 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a3a84d7fb1d87e77ec2cbffdbe6978e62d5d3ab7;p=vaadin-framework.git Remove old Firefox bug workaround for which there is no test Change-Id: I97efacde11852a08ccc799e0aef4d6e23484f522 --- diff --git a/client/src/main/java/com/vaadin/client/widget/escalator/PositionFunction.java b/client/src/main/java/com/vaadin/client/widget/escalator/PositionFunction.java index b96d57c7de..91335fb635 100644 --- a/client/src/main/java/com/vaadin/client/widget/escalator/PositionFunction.java +++ b/client/src/main/java/com/vaadin/client/widget/escalator/PositionFunction.java @@ -17,7 +17,6 @@ package com.vaadin.client.widget.escalator; import com.google.gwt.dom.client.Element; -import com.google.gwt.dom.client.Style.Unit; /** * A functional interface that can be used for positioning elements in the DOM. @@ -77,24 +76,6 @@ public interface PositionFunction { } } - /** - * A position function using "left: x" and "top: y" to position elements in - * the DOM. - */ - public static class AbsolutePosition implements PositionFunction { - @Override - public void set(Element e, double x, double y) { - e.getStyle().setLeft(x, Unit.PX); - e.getStyle().setTop(y, Unit.PX); - } - - @Override - public void reset(Element e) { - e.getStyle().clearLeft(); - e.getStyle().clearTop(); - } - } - /** * Position an element in an (x,y) coordinate system in the DOM. * diff --git a/client/src/main/java/com/vaadin/client/widgets/Escalator.java b/client/src/main/java/com/vaadin/client/widgets/Escalator.java index 564496e00a..77afccdb30 100644 --- a/client/src/main/java/com/vaadin/client/widgets/Escalator.java +++ b/client/src/main/java/com/vaadin/client/widgets/Escalator.java @@ -71,7 +71,6 @@ import com.vaadin.client.widget.escalator.EscalatorUpdater; import com.vaadin.client.widget.escalator.FlyweightCell; import com.vaadin.client.widget.escalator.FlyweightRow; import com.vaadin.client.widget.escalator.PositionFunction; -import com.vaadin.client.widget.escalator.PositionFunction.AbsolutePosition; import com.vaadin.client.widget.escalator.PositionFunction.Translate3DPosition; import com.vaadin.client.widget.escalator.PositionFunction.TranslatePosition; import com.vaadin.client.widget.escalator.PositionFunction.WebkitTranslate3DPosition; @@ -846,26 +845,7 @@ public class Escalator extends Widget } position.set(headElem, -scrollLeft, 0); - - /* - * TODO [[optimize]]: cache this value in case the instanceof - * check has undesirable overhead. This could also be a - * candidate for some deferred binding magic so that e.g. - * AbsolutePosition is not even considered in permutations that - * we know support something better. That would let the compiler - * completely remove the entire condition since it knows that - * the if will never be true. - */ - if (position instanceof AbsolutePosition) { - /* - * we don't want to put "top: 0" on the footer, since it'll - * render wrong, as we already have - * "bottom: $footer-height". - */ - footElem.getStyle().setLeft(-scrollLeft, Unit.PX); - } else { - position.set(footElem, -scrollLeft, 0); - } + position.set(footElem, -scrollLeft, 0); lastScrollLeft = scrollLeft; } @@ -5757,15 +5737,6 @@ public class Escalator extends Widget } private void detectAndApplyPositionFunction() { - /* - * firefox has a bug in its translate operation, showing white space - * when adjusting the scrollbar in BodyRowContainer.paintInsertRows - */ - if (Window.Navigator.getUserAgent().contains("Firefox")) { - position = new AbsolutePosition(); - return; - } - final Style docStyle = Document.get().getBody().getStyle(); if (hasProperty(docStyle, "transform")) { if (hasProperty(docStyle, "transformStyle")) { @@ -5775,8 +5746,6 @@ public class Escalator extends Widget } } else if (hasProperty(docStyle, "webkitTransform")) { position = new WebkitTranslate3DPosition(); - } else { - position = new AbsolutePosition(); } }