changeset 8774:de246bc64fc4

RT-39942: [CSS] Setting Font Size for Tooltip is not applicable
author jgiles
date Fri, 13 Feb 2015 11:05:44 +1300
parents 1001c5904e83
children 6fa7633cc1bd
files modules/graphics/src/main/java/javafx/scene/CssStyleHelper.java
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/modules/graphics/src/main/java/javafx/scene/CssStyleHelper.java	Wed Feb 11 20:42:07 2015 -0800
+++ b/modules/graphics/src/main/java/javafx/scene/CssStyleHelper.java	Fri Feb 13 11:05:44 2015 +1300
@@ -1783,8 +1783,13 @@
             // if we have a font shorthand and it is more specific than font-size, then don't use the font-size style
             if (fontShorthand != null && fontShorthand.compareTo(fontSize) < 0) {
                 fontSize = null;
+            } else if (origin == StyleOrigin.USER) {
+                // If fontSize is an inline or author-stylesheet style, use it.
+                // Otherwise, fontSize is a user-agent stylesheet style and should not override the USER style.
+                if (StyleOrigin.USER.compareTo(fontSize.getOrigin()) > 0) {
+                    fontSize = null;
+                }
             }
-
         } else if (origin != StyleOrigin.USER) {
             //
             // If we don't have a font-size, see if there is an inherited font-size.