summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2015-06-19 14:22:56 +0300
committerArtur Signell <artur@vaadin.com>2015-06-24 12:09:33 +0000
commit8945b432b571d9fa076e0f8a4899adc3908ae73c (patch)
tree5a9295fb009c2555e4c7b8e3b5698720fdfaf88d /client
parentd505fc70ac3bbf13e868c227b58d82966abf2254 (diff)
downloadvaadin-framework-8945b432b571d9fa076e0f8a4899adc3908ae73c.tar.gz
vaadin-framework-8945b432b571d9fa076e0f8a4899adc3908ae73c.zip
Use computed style in more IE9 edge cases (#13359)
Change-Id: I847c9077199f46964ba8d1931e951529db6c5475
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/WidgetUtil.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/client/src/com/vaadin/client/WidgetUtil.java b/client/src/com/vaadin/client/WidgetUtil.java
index fca6fbccbc..7d4f613e4e 100644
--- a/client/src/com/vaadin/client/WidgetUtil.java
+++ b/client/src/com/vaadin/client/WidgetUtil.java
@@ -553,10 +553,11 @@ public class WidgetUtil {
double reqWidth = getRequiredWidthBoundingClientRectDouble(element);
if (BrowserInfo.get().isIE() && !BrowserInfo.get().isIE8()) {
double csWidth = getRequiredWidthComputedStyleDouble(element);
- if (csWidth > reqWidth && csWidth < (reqWidth + 1)) {
+ if (csWidth > reqWidth && csWidth <= (reqWidth + 1)) {
// IE9 rounds reqHeight to integers BUT sometimes reports wrong
// csHeight it seems, so we only use csHeight if it is within a
// rounding error
+
return csWidth;
}
}
@@ -602,10 +603,14 @@ public class WidgetUtil {
double reqHeight = getRequiredHeightBoundingClientRectDouble(element);
if (BrowserInfo.get().isIE() && !BrowserInfo.get().isIE8()) {
double csHeight = getRequiredHeightComputedStyleDouble(element);
- if (csHeight > reqHeight && csHeight < (reqHeight + 1)) {
+ if (csHeight > reqHeight && csHeight <= (reqHeight + 1)) {
// IE9 rounds reqHeight to integers BUT sometimes reports wrong
// csHeight it seems, so we only use csHeight if it is within a
// rounding error
+
+ // Although sometimes it also happens that IE9 returns an
+ // incorrectly rounded down requiredHeight and a computed height
+ // which is exactly one larger, hence the "<="...
return csHeight;
}
}