From: Henri Sara Date: Mon, 7 Aug 2017 07:08:57 +0000 (+0300) Subject: Fix caption width rounding in Chrome (#9785) X-Git-Tag: 8.1.2~25 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=583fa0c0edc173495bb8566cefcb142eab7b7cdd;p=vaadin-framework.git Fix caption width rounding in Chrome (#9785) Otherwise, TabSheet close button may break the small theme in ReindeerThemeTest when the caption width is rounded down. --- diff --git a/client/src/main/java/com/vaadin/client/VCaption.java b/client/src/main/java/com/vaadin/client/VCaption.java index 7e8fd97d25..0ed0bc037c 100644 --- a/client/src/main/java/com/vaadin/client/VCaption.java +++ b/client/src/main/java/com/vaadin/client/VCaption.java @@ -541,10 +541,10 @@ public class VCaption extends HTML { } if (captionText != null) { int textWidth = captionText.getScrollWidth(); - if (BrowserInfo.get().isFirefox()) { + if (BrowserInfo.get().isFirefox() || BrowserInfo.get().isChrome()) { /* - * In Firefox3 the caption might require more space than the - * scrollWidth returns as scrollWidth is rounded down. + * The caption might require more space than the scrollWidth + * returns as scrollWidth is rounded down. */ int requiredWidth = WidgetUtil.getRequiredWidth(captionText); if (requiredWidth > textWidth) { diff --git a/tests/screenshots b/tests/screenshots index 7d70f6d3fa..2241145197 160000 --- a/tests/screenshots +++ b/tests/screenshots @@ -1 +1 @@ -Subproject commit 7d70f6d3fa34ae6fdbfb874994f24ba08abfe13b +Subproject commit 22411451972c80c172196361499d8403c9323c1d