diff options
author | Artur Signell <artur@vaadin.com> | 2016-09-06 22:10:12 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2016-09-07 07:40:09 +0000 |
commit | a3a84d7fb1d87e77ec2cbffdbe6978e62d5d3ab7 (patch) | |
tree | 8b185ce3a9bc96e7f16a9b82d1695dca3fca69e0 /client | |
parent | 1d6b5a7594e8db3d86449fa8e8726d5a383293af (diff) | |
download | vaadin-framework-a3a84d7fb1d87e77ec2cbffdbe6978e62d5d3ab7.tar.gz vaadin-framework-a3a84d7fb1d87e77ec2cbffdbe6978e62d5d3ab7.zip |
Remove old Firefox bug workaround for which there is no test
Change-Id: I97efacde11852a08ccc799e0aef4d6e23484f522
Diffstat (limited to 'client')
-rw-r--r-- | client/src/main/java/com/vaadin/client/widget/escalator/PositionFunction.java | 19 | ||||
-rw-r--r-- | client/src/main/java/com/vaadin/client/widgets/Escalator.java | 33 |
2 files changed, 1 insertions, 51 deletions
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. @@ -78,24 +77,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. * * @param e 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(); } } |