changeset 1036:67b97eb893e2

Backed out changeset c6643233a1c9 RT-21567: Revert fix for RT-16011 (PGNode.dispose) since it broke all scrollable controls
author kcr
date Tue, 15 May 2012 13:02:28 -0700
parents c9ad5e531998
children aeec67bbcaa2 eeee1fb48d84
files javafx-ui-common/src/com/sun/javafx/scene/DirtyBits.java javafx-ui-common/src/javafx/scene/Node.java javafx-ui-common/test/unit/javafx/scene/NodeTest.java test-stub-toolkit/src/com/sun/javafx/pgstub/StubNode.java
diffstat 4 files changed, 1 insertions(+), 43 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-common/src/com/sun/javafx/scene/DirtyBits.java	Tue May 15 16:37:29 2012 +0200
+++ b/javafx-ui-common/src/com/sun/javafx/scene/DirtyBits.java	Tue May 15 13:02:28 2012 -0700
@@ -36,7 +36,6 @@
     NODE_TRANSFORM,
     NODE_BOUNDS,
     NODE_VISIBLE,
-    NODE_TREE_VISIBLE,
     NODE_DEPTH_TEST,
     NODE_BLENDMODE,
     NODE_CSS,
--- a/javafx-ui-common/src/javafx/scene/Node.java	Tue May 15 16:37:29 2012 +0200
+++ b/javafx-ui-common/src/javafx/scene/Node.java	Tue May 15 13:02:28 2012 -0700
@@ -514,10 +514,6 @@
                                   ? null
                                   : Blend.impl_getToolkitMode(mode));
         }
-
-        if (impl_isDirty(DirtyBits.NODE_TREE_VISIBLE) && !treeVisible) {
-            peer.dispose();
-        }
     }
 
     /*************************************************************************
@@ -712,7 +708,6 @@
                     if (getClip() != null) {
                         getClip().setScene(_scene);
                     }
-                    updateTreeVisible();
                     updateCanReceiveFocus();
                     if (isFocusTraversable()) {
                         if (oldScene != null) {
@@ -6429,8 +6424,7 @@
     }
 
     private void updateTreeVisible() {
-        setTreeVisible(isVisible() && ((getParent() != null && getParent().impl_isTreeVisible()) ||
-                (getScene() != null && getScene().getRoot() == this)));
+        setTreeVisible(isVisible() && ((getParent() == null) || getParent().impl_isTreeVisible()));
     }
 
     private boolean treeVisible;
@@ -6442,7 +6436,6 @@
             updateCanReceiveFocus();
             focusSetDirty(getScene());
             ((TreeVisiblePropertyReadOnly)treeVisibleProperty()).invalidate();
-            impl_setDirty(DirtyBits.NODE_TREE_VISIBLE);
         }
     }
 
--- a/javafx-ui-common/test/unit/javafx/scene/NodeTest.java	Tue May 15 16:37:29 2012 +0200
+++ b/javafx-ui-common/test/unit/javafx/scene/NodeTest.java	Tue May 15 13:02:28 2012 -0700
@@ -986,33 +986,4 @@
         assertEquals("", node.styleProperty().get());
         assertEquals("", node.getStyle());
     }
-
-    @Test
-    public void testNode_treeVisible() {
-        final Node n = new Rectangle();
-        Group g = new Group();
-        Scene s = new Scene(g);
-        assertTrue(g.impl_isTreeVisible());
-        assertFalse(n.impl_isTreeVisible());
-
-        g.getChildren().add(n);
-        assertTrue(n.impl_isTreeVisible());
-
-        g.getChildren().clear();
-        assertTrue(g.impl_isTreeVisible());
-        assertFalse(n.impl_isTreeVisible());
-
-        s.setRoot(new Group());
-        assertFalse(g.impl_isTreeVisible());
-
-        g.getChildren().add(n);
-        s.setRoot(g);
-        assertTrue(g.impl_isTreeVisible());
-        assertTrue(n.impl_isTreeVisible());
-
-        g.setVisible(false);
-        assertFalse(g.impl_isTreeVisible());
-        assertFalse(n.impl_isTreeVisible());
-    }
-
 }
--- a/test-stub-toolkit/src/com/sun/javafx/pgstub/StubNode.java	Tue May 15 16:37:29 2012 +0200
+++ b/test-stub-toolkit/src/com/sun/javafx/pgstub/StubNode.java	Tue May 15 13:02:28 2012 -0700
@@ -107,9 +107,4 @@
     public void effectChanged() {
         // ignore
     }
-
-    @Override
-    public void dispose() {
-        // ignore
-    }
 }