changeset 2083:cb178c197204 8.0-b70

Automated merge with ssh://jpgodine@jfxsrc.us.oracle.com//javafx/8.0/MASTER/jfx/rt
author jgodinez
date Mon, 24 Dec 2012 12:30:27 -0800
parents d146d333b063 f57247ae7d1c
children 0c9420a7d2a5 2faead8d97aa
files javafx-logging/src/com/sun/javafx/logging/LoggingProxy.java javafx-logging/src/com/sun/javafx/logging/LoggingSupport.java javafx-logging/src/com/sun/javafx/logging/PlatformLogger.java javafx-logging/test/com/sun/javafx/logging/CreateButNotUse.java javafx-logging/test/com/sun/javafx/logging/ExampleUsage.java javafx-logging/test/com/sun/javafx/logging/JustImports.java javafx-logging/test/com/sun/javafx/logging/NoRefs.java javafx-logging/test/com/sun/javafx/logging/PlatformLoggerTest.java
diffstat 52 files changed, 384 insertions(+), 1415 deletions(-) [+]
line wrap: on
line diff
--- a/.classpath	Thu Dec 20 16:44:47 2012 -0800
+++ b/.classpath	Mon Dec 24 12:30:27 2012 -0800
@@ -1,16 +1,34 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
+	<classpathentry kind="src" path="decora-compiler/build/gensrc"/>
+	<classpathentry kind="src" path="decora-compiler/src"/>
+	<classpathentry kind="src" path="javafx-anim/src"/>
+	<classpathentry kind="src" path="javafx-anim/build/builders"/>
+	<classpathentry kind="src" path="javafx-anim/test/unit"/>
+	<classpathentry kind="src" path="javafx-annotation-processor/src"/>
 	<classpathentry kind="src" path="javafx-beans-dt/src"/>
 	<classpathentry kind="src" path="javafx-beans-dt/test"/>
 	<classpathentry kind="src" path="javafx-concurrent/src"/>
 	<classpathentry kind="src" path="javafx-concurrent/test"/>
 	<classpathentry kind="src" path="javafx-concurrent/build/builders"/>
+	<classpathentry kind="src" path="javafx-common/test/unit"/>
+	<classpathentry kind="src" path="javafx-common/build/builders"/>
+	<classpathentry kind="src" path="javafx-common/build/gensrc/classes"/>
+	<classpathentry kind="src" path="javafx-common/src"/>
 	<classpathentry kind="src" path="javafx-designtime/src"/>
 	<!--
 	<classpathentry kind="src" path="javafx-designtime/test"/>
 	-->
 	<classpathentry kind="src" path="javafx-fxml/src"/>
 	<classpathentry kind="src" path="javafx-fxml/test"/>
+	<classpathentry kind="src" path="javafx-geom/src"/>
+	<classpathentry kind="src" path="javafx-geom/cagsrc.double"/>
+	<classpathentry kind="src" path="javafx-geom/test"/>
+	<classpathentry kind="src" path="javafx-logging/src"/>
+	<classpathentry kind="src" path="javafx-sg-common/src"/>
+	<classpathentry kind="src" path="javafx-sg-common/test"/>
+	<classpathentry kind="src" path="javafx-sg-prism/src"/>
+	<classpathentry kind="src" path="javafx-sg-prism/test"/>
 	<classpathentry kind="src" path="javafx-ui-charts/src"/>
 	<classpathentry kind="src" path="javafx-ui-charts/build/builders"/>
 	<classpathentry kind="src" path="javafx-ui-common/src"/>
@@ -21,12 +39,12 @@
 	<classpathentry kind="src" path="javafx-ui-controls/build/builders"/>
 	<classpathentry kind="src" path="javafx-util-converter/src"/>
 	<classpathentry kind="src" path="javafx-util-converter/test"/>
-	<classpathentry kind="src" path="decora-compiler/build/gensrc"/>
-	<classpathentry kind="src" path="decora-compiler/src"/>
+	<classpathentry kind="src" path="pisces/src"/>
 	<classpathentry kind="src" path="test-stub-toolkit/src"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
 	<classpathentry kind="lib" path="../import/antlr-3.1.3/antlr-3.1.3/lib/antlr-3.1.3.jar"/>
 	<classpathentry kind="src" path="/rt-closed"/>
+	<classpathentry kind="src" path="/media"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
--- a/common.properties	Thu Dec 20 16:44:47 2012 -0800
+++ b/common.properties	Mon Dec 24 12:30:27 2012 -0800
@@ -14,14 +14,14 @@
 includes=**
 javac.debug=true
 javac.debuglevel=${jfx.javac.debuglevel}
-javac.compilerargs=
+javac.compilerargs=-XDignore.symbol.file
 javac.processorpath=\
     ${runtime.dist.root.dir}/javafx-beans/dist/javafx-beans.jar:\
     ${rt.dist.root.dir}/javafx-annotation-processor/dist/javafx-annotation-processor.jar:\
     ${javac.classpath}
 javac.deprecation=false
-javac.source=1.6
-javac.target=1.6
+javac.source=1.7
+javac.target=1.7
 javafxc.compilerargs=
 source.encoding=UTF-8
 run.jvmargs=-Djava.library.path=${jfx.sdk.rt.nativelibs.dir}
--- a/deploy/packager/build.xml	Thu Dec 20 16:44:47 2012 -0800
+++ b/deploy/packager/build.xml	Mon Dec 24 12:30:27 2012 -0800
@@ -108,13 +108,14 @@
     <target name="-do-jar-with-manifest"    depends="mymanifest"/>
     <target name="-pre-jar"                 depends="myjarstart,mymanifest"/>
     <target name="-post-jar"
-            depends="myjarendWin, myjarendMac, myjarendLinux">
+            depends="myjarendWin, myjarendMac, myjarendLinux, myjarendIOS">
         <mkdir dir="${jfx.sdk.dir}/lib"/>
         <mkdir dir="${jfx.sdk.dir}/bin"/>
         <copy tofile="${jfx.sdk.dir}/lib/ant-javafx.jar"
               file="../dist/packager.jar"/>
         <antcall target="copy-javafxpackager-Win"/>
         <antcall target="copy-javafxpackager-Mac"/>
+        <antcall target="copy-javafxpackager-Ios"/>
         <antcall target="copy-javafxpackager-Linux"/>
     </target>
 
@@ -131,6 +132,13 @@
         <chmod file="${jfx.sdk.dir}/bin/javafxpackager" perm="ugo+rx"/>
     </target>
 
+    <target name="copy-javafxpackager-Ios" if="isIOS">
+        <copy todir="${jfx.sdk.dir}/bin">
+           <fileset file="../dist/javafxpackager" />
+        </copy>
+        <chmod file="${jfx.sdk.dir}/bin/javafxpackager" perm="ugo+rx"/>
+    </target>
+
     <target name="copy-javafxpackager-Linux" if="isLinux">
         <copy todir="${jfx.sdk.dir}/bin">
            <fileset file="../dist/javafxpackager" />
@@ -359,6 +367,14 @@
       <chmod file="../dist/javafxpackager" perm="755"/>
     </target>
 
+    <target name="myjarendIOS"  if="isIOS">
+      <copy todir="../dist">
+        <fileset dir="scripts" includes="javafxpackager"/>
+        <fileset dir="dist"    includes="packager.jar"/>
+      </copy>
+      <chmod file="../dist/javafxpackager" perm="755"/>
+    </target>
+
     <target name="myjarendLinux"  if="isLinux">
       <copy todir="../dist">
         <fileset dir="scripts" includes="javafxpackager"/>
--- a/javafx-annotation-processor/nbproject/project.xml	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-annotation-processor/nbproject/project.xml	Mon Dec 24 12:30:27 2012 -0800
@@ -100,7 +100,7 @@
         <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/2">
             <compilation-unit>
                 <package-root>${src.dir}</package-root>
-                <classpath mode="compile">../javafx-beans/dist/javafx-beans.jar</classpath>
+                <classpath mode="compile">../../rt-closed/javafx-beans/dist/javafx-beans.jar</classpath>
                 <built-to>dist/javafx-annotation-processor.jar</built-to>
                 <source-level>1.5</source-level>
             </compilation-unit>
--- a/javafx-annotation-processor/src/javafx/builder/processor/BuilderProcessor.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-annotation-processor/src/javafx/builder/processor/BuilderProcessor.java	Mon Dec 24 12:30:27 2012 -0800
@@ -42,6 +42,7 @@
 import java.util.Comparator;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.PropertyResourceBundle;
@@ -71,6 +72,7 @@
 import javax.lang.model.type.PrimitiveType;
 import javax.lang.model.type.TypeKind;
 import javax.lang.model.type.TypeMirror;
+import javax.lang.model.type.WildcardType;
 import javax.lang.model.util.ElementFilter;
 import javax.lang.model.util.Elements;
 import javax.lang.model.util.Types;
@@ -418,12 +420,21 @@
         // We also consider that getters for properties that are Collections (such as List or ObservableList) are
         // effectively setters since you can replace the contents of the collection.  But if there is a setter
         // we will prefer that.
-        for (String pName : scanned.properties.keySet()) {
+        Iterator<String> it = scanned.properties.keySet().iterator();
+        while (it.hasNext()) {
+            String pName = it.next();
             TypeMirror pType = scanned.typeOf(pName);
+
             if (types.isSubtype(types.erasure(pType), rawCollectionType)) {
-                boolean added = scanned.propertiesWithSetters.add(pName);
-                if (added) {
-                    scanned.collectionProperties.add(pName);
+                if (isWildcardType(pType)) {
+                    // we ignore wildcard collections (e.g. List<? extend Color>
+                    // because there is no way to add an element to them anyway
+                    it.remove();
+                } else {
+                    boolean added = scanned.propertiesWithSetters.add(pName);
+                    if (added) {
+                        scanned.collectionProperties.add(pName);
+                    }
                 }
             }
         }
@@ -699,6 +710,20 @@
         return p;
     }
 
+    private static boolean isWildcardType(TypeMirror type) {
+        boolean result = false;
+        if (type instanceof DeclaredType) {
+            DeclaredType dType = (DeclaredType) type;
+            for (TypeMirror typeArg : dType.getTypeArguments()) {
+                if (typeArg instanceof WildcardType) {
+                    result = true;
+                    break;
+                }
+            }
+        }
+        return result;
+    }
+
     private void makeBuilder(TypeElement type, Scanned scanned, Set<String> buildablePropertyNames) throws IOException {
 
         if (false) {
--- a/javafx-concurrent/src/javafx/concurrent/Service.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-concurrent/src/javafx/concurrent/Service.java	Mon Dec 24 12:30:27 2012 -0800
@@ -28,7 +28,7 @@
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.concurrent.*;
-import com.sun.javafx.logging.PlatformLogger;
+import sun.util.logging.PlatformLogger;
 import com.sun.javafx.tk.Toolkit;
 import javafx.application.Platform;
 import javafx.beans.property.*;
--- a/javafx-logging/src/com/sun/javafx/logging/LoggingProxy.java	Thu Dec 20 16:44:47 2012 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.javafx.logging;
-
-/**
- * A proxy interface for the java.util.logging support.
- *
- * @see com.sun.javafx.logging.LoggingSupport
- */
-public interface LoggingProxy {
-    // Methods to bridge java.util.logging.Logger methods
-    public Object getLogger(String name);
-
-    public Object getLevel(Object logger);
-
-    public void setLevel(Object logger, Object newLevel);
-
-    public boolean isLoggable(Object logger, Object level);
-
-    public void log(Object logger, Object level, String msg);
-
-    public void log(Object logger, Object level, String msg, Throwable t);
-
-    public void log(Object logger, Object level, String msg, Object... params);
-
-    // Methods to bridge java.util.logging.LoggingMXBean methods
-    public java.util.List<String> getLoggerNames();
-
-    public String getLoggerLevel(String loggerName);
-
-    public void setLoggerLevel(String loggerName, String levelName);
-
-    public String getParentLoggerName(String loggerName);
-
-    // Methods to bridge Level.parse() and Level.getName() method
-    public Object parseLevel(String levelName);
-
-    public String getLevelName(Object level);
-}
--- a/javafx-logging/src/com/sun/javafx/logging/LoggingSupport.java	Thu Dec 20 16:44:47 2012 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +0,0 @@
-/*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.javafx.logging;
-
-import java.lang.reflect.Field;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-
-/**
- * Internal API to support JRE implementation to detect if the java.util.logging
- * support is available but with no dependency on the java.util.logging
- * classes.  This LoggingSupport class provides several static methods to
- * access the java.util.logging functionality that requires the caller
- * to ensure that the logging support is {@linkplain #isAvailable available}
- * before invoking it.
- *
- * @see com.sun.javafx.logging.PlatformLogger if you want to log messages even
- * if the logging support is not available
- */
-class LoggingSupport {
-    private LoggingSupport() { }
-
-    private static final LoggingProxy proxy =
-        AccessController.doPrivileged(new PrivilegedAction<LoggingProxy>() {
-            public LoggingProxy run() {
-                try {
-                    // create a LoggingProxyImpl instance when
-                    // java.util.logging classes exist
-                    Class<?> c = Class.forName("java.util.logging.LoggingProxyImpl", true, null);
-                    Field f = c.getDeclaredField("INSTANCE");
-                    f.setAccessible(true);
-                    return (LoggingProxy) f.get(null);
-                } catch (ClassNotFoundException cnf) {
-                    return null;
-                } catch (NoSuchFieldException e) {
-                    throw new AssertionError(e);
-                } catch (IllegalAccessException e) {
-                    throw new AssertionError(e);
-                }
-            }});
-
-    /**
-     * Returns true if java.util.logging support is available.
-     */
-    static boolean isAvailable() {
-        return proxy != null;
-    }
-
-    static void ensureAvailable() {
-        if (proxy == null)
-            throw new AssertionError("Should not here");
-    }
-
-    static java.util.List<String> getLoggerNames() {
-        ensureAvailable();
-        return proxy.getLoggerNames();
-    }
-
-    static String getLoggerLevel(String loggerName) {
-        ensureAvailable();
-        return proxy.getLoggerLevel(loggerName);
-    }
-
-    static void setLoggerLevel(String loggerName, String levelName) {
-        ensureAvailable();
-        proxy.setLoggerLevel(loggerName, levelName);
-    }
-
-    static String getParentLoggerName(String loggerName) {
-        ensureAvailable();
-        return proxy.getParentLoggerName(loggerName);
-    }
-
-    static Object getLogger(String name) {
-        ensureAvailable();
-        return proxy.getLogger(name);
-    }
-
-    static Object getLevel(Object logger) {
-        ensureAvailable();
-        return proxy.getLevel(logger);
-    }
-
-    static void setLevel(Object logger, Object newLevel) {
-        ensureAvailable();
-        proxy.setLevel(logger, newLevel);
-    }
-
-    static boolean isLoggable(Object logger, Object level) {
-        ensureAvailable();
-        return proxy.isLoggable(logger,level);
-    }
-
-    static void log(Object logger, Object level, String msg) {
-        ensureAvailable();
-        proxy.log(logger, level, msg);
-    }
-
-    static void log(Object logger, Object level, String msg, Throwable t) {
-        ensureAvailable();
-        proxy.log(logger, level, msg, t);
-    }
-
-    static void log(Object logger, Object level, String msg, Object... params) {
-        ensureAvailable();
-        proxy.log(logger, level, msg, params);
-    }
-
-    static Object parseLevel(String levelName) {
-        ensureAvailable();
-        return proxy.parseLevel(levelName);
-    }
-
-    static String getLevelName(Object level) {
-        ensureAvailable();
-        return proxy.getLevelName(level);
-    }
-}
--- a/javafx-logging/src/com/sun/javafx/logging/PlatformLogger.java	Thu Dec 20 16:44:47 2012 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,592 +0,0 @@
-/*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-
-package com.sun.javafx.logging;
-
-import java.lang.ref.WeakReference;
-import java.io.PrintStream;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.text.MessageFormat;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Platform logger provides an API for the JRE components to log
- * messages.  This enables the runtime components to eliminate the
- * static dependency of the logging facility and also defers the
- * java.util.logging initialization until it is enabled.
- * In addition, the PlatformLogger API can be used if the logging
- * module does not exist.
- * <p>
- * If the logging facility is not enabled, the platform loggers
- * will output log messages per the default logging configuration
- * (see below). In this implementation, it does not log the
- * the stack frame information issuing the log message.
- * <p>
- * When the logging facility is enabled (at startup or runtime),
- * the java.util.logging.Logger will be created for each platform
- * logger and all log messages will be forwarded to the Logger
- * to handle.
- * <p>
- * Logging facility is "enabled" when one of the following
- * conditions is met:
- * <ol>
- * <li>a system property "java.util.logging.config.class" or
- *    "java.util.logging.config.file" is set
- * <li>java.util.logging.LogManager or java.util.logging.Logger
- *    is referenced that will trigger the logging initialization.
- * </ol>
- * Default logging configuration:
- * <pre>
- *   global logging level = INFO
- *   handlers = java.util.logging.ConsoleHandler
- *   java.util.logging.ConsoleHandler.level = INFO
- *   java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
- * </pre>
- *
- * Limitation:
- * <JAVA_HOME>/lib/logging.properties is the system-wide logging
- * configuration defined in the specification and read in the
- * default case to configure any java.util.logging.Logger instances.
- * Platform loggers will not detect if <JAVA_HOME>/lib/logging.properties
- * is modified. In other words, unless the java.util.logging API
- * is used at runtime or the logging system properties is set,
- * the platform loggers will use the default setting described above.
- * The platform loggers are designed for JDK developers use and
- * this limitation can be workaround with setting
- * -Djava.util.logging.config.file system property.
- *
- * @since 1.7
- */
-public class PlatformLogger {
-    // Same values as java.util.logging.Level for easy mapping
-    public static final int OFF     = Integer.MAX_VALUE;
-    public static final int SEVERE  = 1000;
-    public static final int WARNING = 900;
-    public static final int INFO    = 800;
-    public static final int CONFIG  = 700;
-    public static final int FINE    = 500;
-    public static final int FINER   = 400;
-    public static final int FINEST  = 300;
-    public static final int ALL     = Integer.MIN_VALUE;
-
-    private static final int defaultLevel = INFO;
-    private static boolean loggingEnabled;
-    static {
-        /* Disable java.util.logging usage until JDK7.
-         */
-        loggingEnabled = false && AccessController.doPrivileged(
-            new PrivilegedAction<Boolean>() {
-                public Boolean run() {
-                    String cname = System.getProperty("java.util.logging.config.class");
-                    String fname = System.getProperty("java.util.logging.config.file");
-                    return (cname != null || fname != null);
-                }
-            });
-    }
-
-    public static boolean isLoggingEnabled() {
-        return loggingEnabled;
-    }
-
-    // Table of known loggers.  Maps names to PlatformLoggers.
-    private static Map<String,WeakReference<PlatformLogger>> loggers =
-        new HashMap<String,WeakReference<PlatformLogger>>();
-
-    /**
-     * Returns a PlatformLogger of a given name.
-     */
-    public static synchronized PlatformLogger getLogger(String name) {
-        PlatformLogger log = null;
-        WeakReference<PlatformLogger> ref = loggers.get(name);
-        if (ref != null) {
-            log = ref.get();
-        }
-        if (log == null) {
-            log = new PlatformLogger(name);
-            loggers.put(name, new WeakReference<PlatformLogger>(log));
-        }
-        return log;
-    }
-
-    /**
-     * Initialize java.util.logging.Logger objects for all platform loggers.
-     * This method is called from LogManager.readPrimordialConfiguration().
-     */
-    public static synchronized void redirectPlatformLoggers() {
-        if (loggingEnabled || !LoggingSupport.isAvailable()) return;
-
-        loggingEnabled = true;
-        for (Map.Entry<String, WeakReference<PlatformLogger>> entry : loggers.entrySet()) {
-            WeakReference<PlatformLogger> ref = entry.getValue();
-            PlatformLogger plog = ref.get();
-            if (plog != null) {
-                plog.newJavaLogger();
-            }
-        }
-    }
-
-    /**
-     * Creates a new JavaLogger that the platform logger uses
-     */
-    private void newJavaLogger() {
-        logger = new JavaLogger(logger.name, logger.effectiveLevel);
-    }
-
-    // logger may be replaced with a JavaLogger object
-    // when the logging facility is enabled
-    private volatile LoggerProxy logger;
-
-    private PlatformLogger(String name) {
-        if (loggingEnabled) {
-            this.logger = new JavaLogger(name);
-        } else {
-            this.logger = new LoggerProxy(name);
-        }
-    }
-
-    /**
-     * A convenience method to test if the logger is turned off.
-     * (i.e. its level is OFF).
-     */
-    public boolean isEnabled() {
-        return logger.isEnabled();
-    }
-
-    /**
-     * Gets the name for this platform logger.
-     */
-    public String getName() {
-        return logger.name;
-    }
-
-    /**
-     * Returns true if a message of the given level would actually
-     * be logged by this logger.
-     */
-    public boolean isLoggable(int level) {
-        return logger.isLoggable(level);
-    }
-
-    /**
-     * Gets the current log level.  Returns 0 if the current effective level
-     * is not set (equivalent to Logger.getLevel() returns null).
-     */
-    public int getLevel() {
-        return logger.getLevel();
-    }
-
-    /**
-     * Sets the log level.
-     */
-    public void setLevel(int newLevel) {
-        logger.setLevel(newLevel);
-    }
-
-    /**
-     * Logs a SEVERE message.
-     */
-    public void severe(String msg) {
-        logger.doLog(SEVERE, msg);
-    }
-
-    public void severe(String msg, Throwable t) {
-        logger.doLog(SEVERE, msg, t);
-    }
-
-    public void severe(String msg, Object... params) {
-        logger.doLog(SEVERE, msg, params);
-    }
-
-    /**
-     * Logs a WARNING message.
-     */
-    public void warning(String msg) {
-        logger.doLog(WARNING, msg);
-    }
-
-    public void warning(String msg, Throwable t) {
-        logger.doLog(WARNING, msg, t);
-    }
-
-    public void warning(String msg, Object... params) {
-        logger.doLog(WARNING, msg, params);
-    }
-
-    /**
-     * Logs an INFO message.
-     */
-    public void info(String msg) {
-        logger.doLog(INFO, msg);
-    }
-
-    public void info(String msg, Throwable t) {
-        logger.doLog(INFO, msg, t);
-    }
-
-    public void info(String msg, Object... params) {
-        logger.doLog(INFO, msg, params);
-    }
-
-    /**
-     * Logs a CONFIG message.
-     */
-    public void config(String msg) {
-        logger.doLog(CONFIG, msg);
-    }
-
-    public void config(String msg, Throwable t) {
-        logger.doLog(CONFIG, msg, t);
-    }
-
-    public void config(String msg, Object... params) {
-        logger.doLog(CONFIG, msg, params);
-    }
-
-    /**
-     * Logs a FINE message.
-     */
-    public void fine(String msg) {
-        logger.doLog(FINE, msg);
-    }
-
-    public void fine(String msg, Throwable t) {
-        logger.doLog(FINE, msg, t);
-    }
-
-    public void fine(String msg, Object... params) {
-        logger.doLog(FINE, msg, params);
-    }
-
-    /**
-     * Logs a FINER message.
-     */
-    public void finer(String msg) {
-        logger.doLog(FINER, msg);
-    }
-
-    public void finer(String msg, Throwable t) {
-        logger.doLog(FINER, msg, t);
-    }
-
-    public void finer(String msg, Object... params) {
-        logger.doLog(FINER, msg, params);
-    }
-
-    /**
-     * Logs a FINEST message.
-     */
-    public void finest(String msg) {
-        logger.doLog(FINEST, msg);
-    }
-
-    public void finest(String msg, Throwable t) {
-        logger.doLog(FINEST, msg, t);
-    }
-
-    public void finest(String msg, Object... params) {
-        logger.doLog(FINEST, msg, params);
-    }
-
-    /**
-     * Default platform logging support - output messages to
-     * System.err - equivalent to ConsoleHandler with SimpleFormatter.
-     */
-    static class LoggerProxy {
-        private static final PrintStream defaultStream = System.err;
-        private static final String lineSeparator = AccessController.doPrivileged(
-            new PrivilegedAction<String>() {
-                public String run() {
-                    return System.getProperty("line.separator");
-                }
-            });
-
-        final String name;
-        volatile int levelValue;
-        volatile int effectiveLevel = 0; // current effective level value
-
-        LoggerProxy(String name) {
-            this(name, defaultLevel);
-        }
-
-        LoggerProxy(String name, int level) {
-            this.name = name;
-            this.levelValue = level == 0 ? defaultLevel : level;
-        }
-
-        boolean isEnabled() {
-            return levelValue != OFF;
-        }
-
-        int getLevel() {
-            return effectiveLevel;
-        }
-
-        void setLevel(int newLevel) {
-            levelValue = newLevel;
-            effectiveLevel = newLevel;
-        }
-
-        void doLog(int level, String msg) {
-            if (level < levelValue || levelValue == OFF) {
-                return;
-            }
-            defaultStream.println(format(level, msg, null));
-        }
-
-        void doLog(int level, String msg, Throwable thrown) {
-            if (level < levelValue || levelValue == OFF) {
-                return;
-            }
-            defaultStream.println(format(level, msg, thrown));
-        }
-
-        void doLog(int level, String msg, Object... params) {
-            if (level < levelValue || levelValue == OFF) {
-                return;
-            }
-            String newMsg = formatMessage(msg, params);
-            defaultStream.println(format(level, newMsg, null));
-        }
-
-        public boolean isLoggable(int level) {
-            if (level < levelValue || levelValue == OFF) {
-                return false;
-            }
-            return true;
-        }
-
-        private static final String format = "{0,date} {0,time}";
-
-        private Object args[] = new Object[1];
-        private MessageFormat formatter;
-        private Date dat;
-
-        // Copied from java.util.logging.Formatter.formatMessage
-        private String formatMessage(String format, Object... parameters) {
-            // Do the formatting.
-            try {
-                if (parameters == null || parameters.length == 0) {
-                    // No parameters.  Just return format string.
-                    return format;
-                }
-                // Is it a java.text style format?
-                // Ideally we could match with
-                // Pattern.compile("\\{\\d").matcher(format).find())
-                // However the cost is 14% higher, so we cheaply check for
-                // 1 of the first 4 parameters
-                if (format.indexOf("{0") >= 0 || format.indexOf("{1") >=0 ||
-                            format.indexOf("{2") >=0|| format.indexOf("{3") >=0) {
-                    return java.text.MessageFormat.format(format, parameters);
-                }
-                return format;
-            } catch (Exception ex) {
-                // Formatting failed: use format string.
-                return format;
-            }
-        }
-
-        private synchronized String format(int level, String msg, Throwable thrown) {
-            StringBuffer sb = new StringBuffer();
-//            // Minimize memory allocations here.
-//            if (dat == null) {
-//                dat = new Date();
-//                formatter = new MessageFormat(format);
-//            }
-//            dat.setTime(System.currentTimeMillis());
-//            args[0] = dat;
-//            StringBuffer text = new StringBuffer();
-//            formatter.format(args, text, null);
-//            sb.append(text);
-//            sb.append(" ");
-//            sb.append(getCallerInfo());
-//            sb.append(lineSeparator);
-            sb.append(PlatformLogger.getLevelName(level));
-            sb.append(": ");
-            sb.append(getCallerInfo());
-            sb.append(" ");
-            sb.append(msg);
-            if (thrown != null) {
-                try {
-                    StringWriter sw = new StringWriter();
-                    PrintWriter pw = new PrintWriter(sw);
-                    thrown.printStackTrace(pw);
-                    pw.close();
-                    sb.append(lineSeparator);
-                    sb.append(sw.toString());
-                } catch (Exception ex) {
-                    throw new AssertionError(ex);
-                }
-            }
-
-            return sb.toString();
-        }
-
-        // Returns the caller's class and method's name; best effort
-        // if cannot infer, return the logger's name.
-        private String getCallerInfo() {
-            String sourceClassName = null;
-            String sourceMethodName = null;
-
-            StackTraceElement[] stackTrace = new Throwable().getStackTrace();
-
-            final String logClassName = "com.sun.javafx.logging.PlatformLogger";
-            boolean lookingForLogger = true;
-            for (int ix = 0; ix < stackTrace.length; ix++) {
-                // Calling getStackTraceElement directly prevents the VM
-                // from paying the cost of building the entire stack frame.
-                StackTraceElement frame = stackTrace[ix];
-                String cname = frame.getClassName();
-                if (lookingForLogger) {
-                    // Skip all frames until we have found the first logger frame.
-                    if (cname.equals(logClassName)) {
-                        lookingForLogger = false;
-                    }
-                } else {
-                    if (!cname.equals(logClassName)) {
-                        // We've found the relevant frame.
-                        sourceClassName = cname;
-                        sourceMethodName = frame.getMethodName();
-                        break;
-                    }
-                }
-            }
-
-            if (sourceClassName != null) {
-                return sourceClassName + " " + sourceMethodName;
-            } else {
-                return name;
-            }
-        }
-    }
-
-    /**
-     * JavaLogger forwards all the calls to its corresponding
-     * java.util.logging.Logger object.
-     */
-    static class JavaLogger extends LoggerProxy {
-        private static final Map<Integer, Object> levelObjects =
-            new HashMap<Integer, Object>();
-
-        static {
-            if (LoggingSupport.isAvailable()) {
-                // initialize the map to Level objects
-                getLevelObjects();
-            }
-        }
-
-        private static void getLevelObjects() {
-            // get all java.util.logging.Level objects
-            int[] levelArray = new int[] {OFF, SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST, ALL};
-            for (int l : levelArray) {
-                Object level = LoggingSupport.parseLevel(getLevelName(l));
-                levelObjects.put(l, level);
-            }
-        }
-
-        private final Object javaLogger;
-        JavaLogger(String name) {
-            this(name, 0);
-        }
-
-        JavaLogger(String name, int level) {
-            super(name, level);
-            this.javaLogger = LoggingSupport.getLogger(name);
-            if (level != 0) {
-                // level has been updated and so set the Logger's level
-                LoggingSupport.setLevel(javaLogger, levelObjects.get(level));
-            }
-        }
-
-       /**
-        * Let Logger.log() do the filtering since if the level of a
-        * platform logger is altered directly from
-        * java.util.logging.Logger.setLevel(), the levelValue will
-        * not be updated.
-        */
-        void doLog(int level, String msg) {
-            LoggingSupport.log(javaLogger, levelObjects.get(level), msg);
-        }
-
-        void doLog(int level, String msg, Throwable t) {
-            LoggingSupport.log(javaLogger, levelObjects.get(level), msg, t);
-        }
-
-        void doLog(int level, String msg, Object... params) {
-            int paramsNumber = (params != null) ? params.length : 0;
-            for (int i = 0; i < paramsNumber; i++) {
-                params[i] = String.valueOf(params[i]);
-            }
-            LoggingSupport.log(javaLogger, levelObjects.get(level), msg, params);
-        }
-
-        boolean isEnabled() {
-            Object level = LoggingSupport.getLevel(javaLogger);
-            return level == null || level.equals(levelObjects.get(OFF)) == false;
-        }
-
-        int getLevel() {
-            Object level = LoggingSupport.getLevel(javaLogger);
-            if (level != null) {
-                for (Map.Entry<Integer, Object> l : levelObjects.entrySet()) {
-                    if (level == l.getValue()) {
-                        return l.getKey();
-                    }
-                }
-            }
-            return 0;
-        }
-
-        void setLevel(int newLevel) {
-            levelValue = newLevel;
-            LoggingSupport.setLevel(javaLogger, levelObjects.get(newLevel));
-        }
-
-        public boolean isLoggable(int level) {
-            return LoggingSupport.isLoggable(javaLogger, levelObjects.get(level));
-        }
-    }
-
-    private static String getLevelName(int level) {
-        switch (level) {
-            case OFF     : return "OFF";
-            case SEVERE  : return "SEVERE";
-            case WARNING : return "WARNING";
-            case INFO    : return "INFO";
-            case CONFIG  : return "CONFIG";
-            case FINE    : return "FINE";
-            case FINER   : return "FINER";
-            case FINEST  : return "FINEST";
-            case ALL     : return "ALL";
-            default      : return "UNKNOWN";
-        }
-    }
-
-}
--- a/javafx-logging/test/com/sun/javafx/logging/CreateButNotUse.java	Thu Dec 20 16:44:47 2012 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.javafx.logging;
-import com.sun.javafx.logging.PlatformLogger;
-public class CreateButNotUse {
-    private static final int QUANTITY = 1;
-    public static void main(String[] args) {
-        PlatformLogger[] logger = new PlatformLogger[QUANTITY];
-        long beforeMem = Runtime.getRuntime().freeMemory();
-        long beforeTime, deltaTime, minTime=1000000000, maxTime=0, totalTime=0;
-        for (int i = 0; i < logger.length; i++) {
-            beforeTime = System.nanoTime();
-            logger[i] = PlatformLogger.getLogger(Integer.toString(i));
-            deltaTime = System.nanoTime() - beforeTime;
-            totalTime += deltaTime;
-            minTime = deltaTime < minTime ? deltaTime : minTime;
-            maxTime = deltaTime > maxTime ? deltaTime : maxTime;
-        }
-        System.out.println("Memory: " + (beforeMem - Runtime.getRuntime().freeMemory()));
-        System.out.println("minTime="+minTime + " maxTime="+maxTime + " avgTime="+(totalTime/logger.length));
-        logger[0].finest("foo");
-    }
-}
--- a/javafx-logging/test/com/sun/javafx/logging/ExampleUsage.java	Thu Dec 20 16:44:47 2012 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.javafx.logging;
-public class ExampleUsage {
-    /*
-     * Create a new logger -- note that you refer to them by name.
-     * PlatformLogger keeps track of these for you so you do not need to carry
-     * around references to objects.
-     */
-    private static final PlatformLogger weeLog = PlatformLogger
-            .getLogger("wee");
-    public static void main(String[] args) {
-        /*
-         * For now, we need to manually set the logging level up instead of
-         * using a config file (e.g., -Djava.util.logging.config.file=foo.txt).
-         * The reason is that we need the LoggingProxyImpl implementation in the
-         * JDK in order for PlatformLogger to integrate properly with
-         * java.util.logging.
-         * 
-         * Refer to
-         * http://download.oracle.com/javase/6/docs/api/java/util/logging
-         * /Level.html for a description of the various levels.
-         */
-        weeLog.setLevel(PlatformLogger.FINER);
-
-        /*
-         * There are a couple ways to output log messages. The first is very
-         * straightforward and you typically use it if the message you are
-         * outputting doesn't require much in the way of compute resources
-         * (e.g., you're not building up some long string and calling lots of
-         * methods to do so).
-         */
-        weeLog.finest("foo");
-
-        /*
-         * You should use this second method if the message you are going to
-         * build up is going to do a lot of work.
-         */
-        if (weeLog.isLoggable(PlatformLogger.FINE)) {
-            StringBuilder msg = new StringBuilder();
-            msg.append("Some long");
-            msg.append(" contrived message");
-            msg.append(" that I am building up.");
-            weeLog.fine(msg.toString());
-        }
-    }
-}
--- a/javafx-logging/test/com/sun/javafx/logging/JustImports.java	Thu Dec 20 16:44:47 2012 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.javafx.logging;
-/* Solely does an import and a mild reference to a static method.
- */
-import com.sun.javafx.logging.PlatformLogger;
-public class JustImports {
-    public static void main(String[] args) {
-        PlatformLogger.isLoggingEnabled();
-        System.out.println("Memory: " + Runtime.getRuntime().freeMemory());
-    }
-}
--- a/javafx-logging/test/com/sun/javafx/logging/NoRefs.java	Thu Dec 20 16:44:47 2012 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.javafx.logging;
-/* The control case.
- */
-public class NoRefs {
-    public static void main(String[] args) {
-        System.out.println("Memory: " + Runtime.getRuntime().freeMemory());
-    }
-}
--- a/javafx-logging/test/com/sun/javafx/logging/PlatformLoggerTest.java	Thu Dec 20 16:44:47 2012 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package com.sun.javafx.logging;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-/**
- */
-public class PlatformLoggerTest {
-
-    public PlatformLoggerTest() {
-    }
-
-    @Test
-    public void testGetLogger() {
-        PlatformLogger logger = PlatformLogger.getLogger("foo");
-        assertNotNull(logger);
-    }
-
-    @Test
-    public void testSevere() {
-        if (PlatformLogger.isLoggingEnabled()) PlatformLogger.getLogger("foo")
-                .severe("Bar");
-        if (PlatformLogger.isLoggingEnabled()) PlatformLogger.getLogger("foo")
-                .severe("Bat");
-    }
-}
--- a/javafx-sg-prism/src/com/sun/javafx/sg/prism/NGNode.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-sg-prism/src/com/sun/javafx/sg/prism/NGNode.java	Mon Dec 24 12:30:27 2012 -0800
@@ -24,15 +24,16 @@
  */
 package com.sun.javafx.sg.prism;
 
+import java.util.List;
 import com.sun.javafx.geom.BaseBounds;
 import com.sun.javafx.geom.Point2D;
 import com.sun.javafx.geom.RectBounds;
 import com.sun.javafx.geom.Rectangle;
 import com.sun.javafx.geom.transform.BaseTransform;
 import com.sun.javafx.geom.transform.GeneralTransform3D;
-import com.sun.javafx.sg.BaseNode;
 import com.sun.javafx.sg.BaseCacheFilter;
 import com.sun.javafx.sg.BaseEffectFilter;
+import com.sun.javafx.sg.BaseNode;
 import com.sun.javafx.sg.BaseNodeEffectInput;
 import com.sun.javafx.sg.DirtyRegionContainer;
 import com.sun.javafx.sg.NodePath;
@@ -43,24 +44,23 @@
 import com.sun.prism.RTTexture;
 import com.sun.prism.ReadbackGraphics;
 import com.sun.prism.Texture;
+import com.sun.prism.Texture.WrapMode;
 import com.sun.prism.impl.PrismSettings;
 import com.sun.prism.paint.Color;
 import com.sun.scenario.effect.Blend;
 import com.sun.scenario.effect.Effect;
+import com.sun.scenario.effect.FilterContext;
 import com.sun.scenario.effect.Filterable;
-import com.sun.scenario.effect.FilterContext;
 import com.sun.scenario.effect.ImageData;
 import com.sun.scenario.effect.impl.prism.PrDrawable;
 import com.sun.scenario.effect.impl.prism.PrEffectHelper;
 import com.sun.scenario.effect.impl.prism.PrFilterContext;
-import java.util.List;
 
-import static com.sun.javafx.logging.PulseLogger.PULSE_LOGGING_ENABLED;
-import static com.sun.javafx.logging.PulseLogger.PULSE_LOGGER;
-import com.sun.prism.Texture.WrapMode;
+import static com.sun.javafx.logging.PulseLogger.*;
 
 
 /**
+ * Basic implementation of node.
  */
 public abstract class NGNode extends BaseNode<Graphics> {
 
@@ -77,7 +77,7 @@
 
     /***************************************************************************
      *                                                                         *
-     *                     Culling Related Methods                             *
+     *                     Culling Related Methods.                            *
      *                                                                         *
      **************************************************************************/
     protected void markCullRegions(
@@ -316,7 +316,7 @@
 
     /***************************************************************************
      *                                                                         *
-     *                     Rendering Related Methods                           *
+     *                     Rendering Related Methods.                          *
      *                                                                         *
      **************************************************************************/
 
@@ -680,136 +680,20 @@
 
     protected abstract boolean hasOverlappingContents();
 
-    protected boolean cull(Rectangle clip, BaseTransform tx, GeneralTransform3D pvTx) {
-
-        if (clip == null) {
-            // we don't have a clip to check against, so don't cull
-            return false;
-        }
-
-        // quick cull based on the cached bounds being empty
-        // I do this based on the content bounds because the calculation is
-        // faster and is a necessary part of calculating the transformed bounds
-        // anyway, so might as well do it first and quit if possible
-        if (transformedBounds.isEmpty()) {
-            return true;
-        }
-
-        // If this node lies now entirely outside the clip, then we cull it
-        if (tx.isIdentity()) {
-            TEMP_BOUNDS.deriveWithNewBounds(transformedBounds);
-        } else {
-            tx.transform(transformedBounds, TEMP_BOUNDS);
-        }
-        if (pvTx != null) {
-            if (!pvTx.isIdentity()) {
-                pvTx.transform(TEMP_BOUNDS, TEMP_BOUNDS);
-            }
-        }
-        TEMP_BOUNDS.deriveWithNewBounds(TEMP_BOUNDS.getMinX(),
-                TEMP_BOUNDS.getMinY(),
-                0,
-                TEMP_BOUNDS.getMaxX(),
-                TEMP_BOUNDS.getMaxY(),
-                0);
-
-        if (TEMP_BOUNDS.disjoint(clip.x, clip.y, clip.width, clip.height)) {
-            return true;
-        }
-
-        // don't cull!
-        return false;
-    }
-
-
-
     /***************************************************************************
      *                                                                         *
-     *                       Static Helper Methods                             *
+     *                       Static Helper Methods.                            *
      *                                                                         *
      **************************************************************************/
 
-    /**
-     * Safely accumulates the {@code newRect} rectangle into an existing
-     * {@code accumulator} rectangle and returns the accumulated result.
-     * The result may be {@code null} if the existing {@code accumulator}
-     * was {@code null} and the {@code newRect} is either null or empty.
-     * If the existing {@code accumulator} was not {@code null} then it
-     * is returned, possibly augmented with the union of the bounds of the
-     * two rectangles.
-     * If a non-{@code null} result is returned then it is guaranteed to
-     * be non-empty.
-     * The result is never the same object as {@code newRect}.
-     * <p>
-     * This method provides a convenient mechanism to perform the task
-     * of accumulating rectangles used throughout various parts of
-     * scene graph management while providing workarounds for unexpected
-     * behaviors in the {@link RectBounds#add} method which sometimes
-     * produces a non-empty result from combining two empty rectangles.
-     *
-     * @param accumulator the existing accumulation of rectangle bounds
-     * @param newRect a new rectangle to accumulate
-     * @return the non-empty result of accumulation, or null if the
-     *         accumulation is still empty
-     */
-    static RectBounds accumulate(RectBounds accumulator, RectBounds newBounds) {
-        return accumulate(accumulator, newBounds, false);
-    }
-
-    /**
-     * Safely accumulates the {@code newRect} rectangle into an existing
-     * {@code accumulator} rectangle and returns the accumulated result.
-     * The result may be {@code null} if the existing {@code accumulator}
-     * was {@code null} and the {@code newRect} is either null or empty.
-     * If the existing {@code accumulator} was not {@code null} then it
-     * is returned, possibly augmented with the union of the bounds of the
-     * two rectangles.
-     * If a non-{@code null} result is returned then it is guaranteed to
-     * be non-empty.
-     * The result is never the same object as {@code newRect} if
-     * {@code newRectShareable} is false.
-     * <p>
-     * This method provides a convenient mechanism to perform the task
-     * of accumulating rectangles used throughout various parts of
-     * scene graph management while providing workarounds for unexpected
-     * behaviors in the {@link RectBounds#add} method which sometimes
-     * produces a non-empty result from combining two empty rectangles.
-     *
-     * @param accumulator the existing accumulation of rectangle bounds
-     * @param newRect a new rectangle to accumulate
-     * @param newRectShareable a boolean to indicate if the {@code newRect}
-     *        parameter can be shared by using it as the result
-     * @return the non-empty result of accumulation, or null if the
-     *         accumulation is still empty
-     */
-    static RectBounds accumulate(RectBounds accumulator,
-                               RectBounds newBounds,
-                               boolean newBoundsShareable)
-    {
-        // Manually test for positive width and height to avoid
-        // accumulation of NaN values.
-        if (newBounds != null &&
-            newBounds.getWidth() > 0 &&
-            newBounds.getHeight() > 0)
-        {
-            if (accumulator == null) {
-                accumulator = (newBoundsShareable
-                               ? newBounds
-                               : new RectBounds(newBounds));
-            } else {
-                accumulator.unionWith(newBounds);
-            }
-        }
-        return accumulator;
-    }
-
     boolean isReadbackSupported(Graphics g) {
         return ((g instanceof ReadbackGraphics) &&
                 ((ReadbackGraphics) g).canReadBack());
     }
+
     /***************************************************************************
      *                                                                         *
-     *                      Filters (Cache, Effect, etc)                       *
+     *                      Filters (Cache, Effect, etc).                      *
      *                                                                         *
      **************************************************************************/
 
@@ -862,7 +746,7 @@
         }
         
         /**
-         * Render node to cache
+         * Render node to cache.
          * @param cacheData the cache
          * @param cacheBounds cache bounds
          * @param xform transformation
@@ -889,9 +773,9 @@
                 if (xform != null) {
                     g.transform(xform);
                 }
-                if (((NGNode)node).getClipNode() != null) {
+                if (node.getClipNode() != null) {
                     ((NGNode)node).renderClip(g);
-                } else if (((NGNode)node).getEffectFilter() != null) {
+                } else if (node.getEffectFilter() != null) {
                     ((NGNode)node).renderEffect(g);
                 } else {
                     ((NGNode)node).renderContent(g);
@@ -942,7 +826,7 @@
         }
 
         /**
-         * True if we can use scrolling optimization on this node
+         * True if we can use scrolling optimization on this node.
          */
         @Override
         protected boolean impl_scrollCacheCapable() {
@@ -1007,14 +891,13 @@
         }
 
         /**
-         * Get the cache bounds
+         * Get the cache bounds.
          * @param bounds rectangle to store bounds to
          * @param xform transformation
          */
         @Override
         protected Rectangle impl_getCacheBounds(Rectangle bounds, BaseTransform xform) {
-            BaseBounds b = ((NGNode) node).getClippedBounds(TEMP_BOUNDS,
-                    xform);
+            final BaseBounds b = node.getClippedBounds(TEMP_BOUNDS, xform);
             bounds.setBounds(b);
             return bounds;
         }
--- a/javafx-sg-prism/src/com/sun/javafx/sg/prism/NGRegion.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-sg-prism/src/com/sun/javafx/sg/prism/NGRegion.java	Mon Dec 24 12:30:27 2012 -0800
@@ -52,6 +52,7 @@
 import com.sun.javafx.geom.transform.Affine2D;
 import com.sun.javafx.geom.transform.BaseTransform;
 import com.sun.javafx.geom.transform.GeneralTransform3D;
+import com.sun.javafx.logging.PulseLogger;
 import com.sun.javafx.sg.BaseEffectFilter;
 import com.sun.javafx.sg.BaseNode;
 import com.sun.javafx.sg.NodePath;
@@ -468,7 +469,7 @@
                 // RT-25013: We need to make sure that we do not use a cached image in the case of a
                 // scaled region, or things won't look right (they'll looked scaled instead of vector-resized).
                 final boolean cache = backgroundCanBeCached && g.getTransformNoClone().isTranslateOrIdentity();
-                RTTexture cached = cache ? CACHE.getImage(null, textureWidth, textureHeight, background, shape) : null;
+                RTTexture cached = cache ? CACHE.getImage(g.getAssociatedScreen(), textureWidth, textureHeight, background, shape) : null;
                 // If there is not a cached texture already, then we need to render everything
                 if (cached == null) {
                     // We will here check to see if we CAN cache the region background. If not, then
@@ -484,8 +485,10 @@
                         // Have to move the origin such that when rendering to x=0, we actually end up rendering
                         // at x=bounds.getMinX(). Otherwise anything rendered to the left of the origin would be lost
                         g.translate(-outsetShapeBounds.getMinX(), -outsetShapeBounds.getMinY());
-                        // TODO need to pass in something like GraphicsConfiguration (RT-26923)
-                        CACHE.setImage(cached, null, textureWidth, textureHeight, background, shape);
+                        CACHE.setImage(cached, old.getAssociatedScreen(), textureWidth, textureHeight, background, shape);
+                        if (PulseLogger.PULSE_LOGGING_ENABLED) {
+                            PulseLogger.PULSE_LOGGER.renderIncrementCounter("Region shape image cached");
+                        }
                     }
 
                     // We first need to draw each background fill. We don't pay any attention
@@ -554,6 +557,9 @@
                     final float srcY2 = srcY1 + textureHeight;
 
                     g.drawTexture(cached, dstX1, dstY1, dstX2, dstY2, srcX1, srcY1, srcX2, srcY2);
+                    if (PulseLogger.PULSE_LOGGING_ENABLED) {
+                        PulseLogger.PULSE_LOGGER.renderIncrementCounter("Cached Region shape image used");
+                    }
                 }
             }
 
@@ -596,7 +602,6 @@
                           textureHeight = roundUp(height) + roundUp(outsets.getTop()) + roundUp(outsets.getBottom());
 
                 // See if we have a cached representation for this region background already.
-                // TODO need to pass in something like GraphicsConfiguration (RT-26923)
                 // RT-25013: We need to make sure that we do not use a cached image in the case of a
                 // scaled region, or things won't look right (they'll looked scaled instead of vector-resized).
                 // RT_25049: Need to only use the cache for pixel aligned regions or the result
@@ -607,7 +612,7 @@
                         (width - (int)width == 0) &&
                         backgroundCanBeCached &&
                         g.getTransformNoClone().isTranslateOrIdentity();
-                RTTexture cached = cache ? CACHE.getImage(null, textureWidth, textureHeight, background) : null;
+                RTTexture cached = cache ? CACHE.getImage(g.getAssociatedScreen(), textureWidth, textureHeight, background) : null;
                 // If there is not a cached texture already, then we need to render everything
                 if (cached == null) {
                     // We will here check to see if we CAN cache the region background. If not, then
@@ -626,8 +631,10 @@
                         // at x=outsets.getLeft(). Otherwise anything rendered to the left of the origin would be lost
                         // Round up to the nearest pixel
                         g.translate(roundUp(outsets.getLeft()), roundUp(outsets.getTop()));
-                        // TODO need to pass in something like GraphicsConfiguration (RT-26923)
-                        CACHE.setImage(cached, null, textureWidth, textureHeight, background);
+                        CACHE.setImage(cached, old.getAssociatedScreen(), textureWidth, textureHeight, background);
+                        if (PulseLogger.PULSE_LOGGING_ENABLED) {
+                            PulseLogger.PULSE_LOGGER.renderIncrementCounter("Region background image cached");
+                        }
                     }
 
                     // Paint in order each BackgroundFill.
@@ -709,7 +716,12 @@
                         final float srcY1 = 0f;
                         final float srcX2 = srcX1 + textureWidth;
                         final float srcY2 = srcY1 + textureHeight;
+
                         g.drawTexture(cached, dstX1, dstY1, dstX2, dstY2, srcX1, srcY1, srcX2, srcY2);
+
+                        if (PulseLogger.PULSE_LOGGING_ENABLED) {
+                            PulseLogger.PULSE_LOGGER.renderIncrementCounter("Cached Region background image used");
+                        }
                     } else {
                         // We do 3-patch rendering, because our height is fixed (ie: the same background but at
                         // different heights will have different cached images)
@@ -744,6 +756,10 @@
                         g.drawTexture(cached, dstX1, dstY1, dstLeftX, dstY2, srcX1, srcY1, srcLeftX, srcY2);
                         g.drawTexture(cached, dstLeftX, dstY1, dstRightX, dstY2, srcLeftX, srcY1, srcRightX, srcY2);
                         g.drawTexture(cached, dstRightX, dstY1, dstX2, dstY2, srcRightX, srcY1, srcX2, srcY2);
+
+                        if (PulseLogger.PULSE_LOGGING_ENABLED) {
+                            PulseLogger.PULSE_LOGGER.renderIncrementCounter("Cached Region background image used");
+                        }
                     }
                 }
 
--- a/javafx-sg-prism/src/com/sun/javafx/sg/prism/RegionImageCache.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-sg-prism/src/com/sun/javafx/sg/prism/RegionImageCache.java	Mon Dec 24 12:30:27 2012 -0800
@@ -33,6 +33,7 @@
 import java.util.Map;
 import java.util.concurrent.locks.ReadWriteLock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
+import com.sun.javafx.logging.PulseLogger;
 import com.sun.prism.RTTexture;
 
 /**
@@ -56,13 +57,13 @@
     // Reference queue for tracking lost soft references to images in the cache
     private ReferenceQueue<RTTexture> referenceQueue = new ReferenceQueue<RTTexture>();
 
-    public RegionImageCache() {
+    RegionImageCache() {
         this.maxPixelCount = (8 * 1024 * 1024) / 4; // 8Mb of pixels
         this.maxSingleImagePixelSize = 300 * 300;
     }
 
     /** Clear the cache */
-    public void flush() {
+    void flush() {
         lock.readLock().lock();
         try {
             map.clear();
@@ -78,25 +79,37 @@
      * @param h The image height
      * @return True if the image size is less than max
      */
-    public boolean isImageCachable(int w, int h) {
+    boolean isImageCachable(int w, int h) {
         return w > 0 && h > 0 && (w * h) < maxSingleImagePixelSize;
     }
 
     /**
      * Get the cached image for given keys
      *
-     * @param config The graphics configuration, needed if cached image is a Volatile Image. Used as part of cache key
+     * @param config The Screen used with the target Graphics. Used as part of cache key
      * @param w      The image width, used as part of cache key
      * @param h      The image height, used as part of cache key
      * @param args   Other arguments to use as part of the cache key
      * @return Returns the cached Image, or null there is no cached image for key
      */
-    public RTTexture getImage(Object config, int w, int h, Object... args) {
+    RTTexture getImage(Object config, int w, int h, Object... args) {
         lock.readLock().lock();
         try {
-            PixelCountSoftReference ref = map.get(hash(config, w, h, args));
-            // check reference has not been lost and the key truly matches, in case of false positive hash match
+            final int hash = hash(config, w, h, args);
+            PixelCountSoftReference ref = map.get(hash);
+            // Check reference has not been lost and the key truly matches, in case of false positive hash match
             if (ref != null && ref.equals(config, w, h, args)) {
+                RTTexture image = ref.get();
+                // If the image surface is lost, then we will remove it from the cache and report back
+                // to the caller that we have no cached image.
+                if (image != null && image.isSurfaceLost()) {
+                    if (PulseLogger.PULSE_LOGGING_ENABLED) {
+                        PulseLogger.PULSE_LOGGER.renderIncrementCounter("Region RTTexture surface lost");
+                    }
+                    currentPixelCount -= ref.pixelCount;
+                    map.remove(hash);
+                    return null;
+                }
                 return ref.get();
             } else {
                 return null;
@@ -110,13 +123,13 @@
      * Sets the cached image for the specified constraints.
      *
      * @param image  The image to store in cache
-     * @param config The graphics configuration, needed if cached image is a Volatile Image. Used as part of cache key
+     * @param config The Screen used with the target Graphics. Used as part of cache key
      * @param w      The image width, used as part of cache key
      * @param h      The image height, used as part of cache key
      * @param args   Other arguments to use as part of the cache key
      * @return true if the image could be cached or false if the image is too big
      */
-    public boolean setImage(RTTexture image, Object config, int w, int h, Object... args) {
+    boolean setImage(RTTexture image, Object config, int w, int h, Object... args) {
         if (!isImageCachable(w, h)) return false;
         int hash = hash(config, w, h, args);
         lock.writeLock().lock();
@@ -128,6 +141,9 @@
             }
             // clear out old
             if (ref != null) {
+                if (PulseLogger.PULSE_LOGGING_ENABLED) {
+                    PulseLogger.PULSE_LOGGER.renderIncrementCounter("Region RTTexture replaced in RegionImageCache");
+                }
                 currentPixelCount -= ref.pixelCount;
                 map.remove(hash);
             }
--- a/javafx-sg-prism/test/com/sun/javafx/sg/prism/TestGraphics.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-sg-prism/test/com/sun/javafx/sg/prism/TestGraphics.java	Mon Dec 24 12:30:27 2012 -0800
@@ -28,7 +28,6 @@
 import com.sun.glass.ui.Screen;
 import com.sun.glass.ui.View;
 import com.sun.javafx.font.FontStrike;
-import com.sun.javafx.geom.BaseBounds;
 import com.sun.javafx.geom.RectBounds;
 import com.sun.javafx.geom.Shape;
 import com.sun.javafx.geom.transform.BaseTransform;
@@ -169,6 +168,7 @@
                 @Override public boolean readPixels(Buffer pixels, int x, int y, int width, int height) { return false; }
                 @Override public boolean readPixels(Buffer pixels) { return false; }
                 @Override public boolean isVolatile() { return false; }
+                @Override public boolean isSurfaceLost() { return false; }
                 @Override public Screen getAssociatedScreen() { return null; }
                 @Override public Graphics createGraphics() {
                     return new TestGraphics();
--- a/javafx-ui-common/src/com/sun/javafx/Logging.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-ui-common/src/com/sun/javafx/Logging.java	Mon Dec 24 12:30:27 2012 -0800
@@ -25,7 +25,7 @@
 
 package com.sun.javafx;
 
-import com.sun.javafx.logging.PlatformLogger;
+import sun.util.logging.PlatformLogger;
 
 /**
  * Holds PlatformLoggers to use for logging javafx-ui-common related things.
--- a/javafx-ui-common/src/com/sun/javafx/accessible/AccessibleNode.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-ui-common/src/com/sun/javafx/accessible/AccessibleNode.java	Mon Dec 24 12:30:27 2012 -0800
@@ -25,18 +25,18 @@
 
 package com.sun.javafx.accessible;
 
+import java.util.ArrayList;
+import java.util.List;
+import javafx.geometry.Bounds;
+import javafx.scene.Node;
+import javafx.scene.Scene;
+import javafx.stage.Screen;
+import com.sun.javafx.Logging;
+import com.sun.javafx.accessible.providers.AccessibleProvider;
 import com.sun.javafx.accessible.utils.NavigateDirection;
 import com.sun.javafx.accessible.utils.PropertyIds;
 import com.sun.javafx.accessible.utils.Rect;
-import com.sun.javafx.Logging;
-import java.util.List;
-import javafx.scene.Node;
-import javafx.scene.Scene;
-import javafx.stage.Screen;
-import javafx.geometry.Bounds;
-import com.sun.javafx.logging.PlatformLogger;
-import java.util.ArrayList;
-import com.sun.javafx.accessible.providers.AccessibleProvider;
+import sun.util.logging.PlatformLogger;
 
 public class AccessibleNode implements AccessibleProvider
 {
--- a/javafx-ui-common/src/com/sun/javafx/accessible/AccessibleStage.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-ui-common/src/com/sun/javafx/accessible/AccessibleStage.java	Mon Dec 24 12:30:27 2012 -0800
@@ -25,23 +25,23 @@
 
 package com.sun.javafx.accessible;
 
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.List;
+import javafx.collections.ListChangeListener;
+import javafx.collections.ObservableList;
+import javafx.scene.Node;
+import javafx.scene.Parent;
+import javafx.scene.Scene;
+import javafx.stage.Screen;
+import javafx.stage.Stage;
+import com.sun.javafx.Logging;
+import com.sun.javafx.accessible.providers.AccessibleProvider;
+import com.sun.javafx.accessible.providers.AccessibleStageProvider;
 import com.sun.javafx.accessible.utils.NavigateDirection;
 import com.sun.javafx.accessible.utils.PropertyIds;
 import com.sun.javafx.accessible.utils.Rect;
-import com.sun.javafx.Logging;
-import com.sun.javafx.logging.PlatformLogger;
-import java.util.List;
-import java.util.ArrayList;
-import com.sun.javafx.accessible.providers.AccessibleProvider;
-import com.sun.javafx.accessible.providers.AccessibleStageProvider;
-import com.sun.javafx.accessible.providers.Accessible;
-import java.lang.reflect.Method;
-import javafx.collections.ListChangeListener;
-import javafx.collections.ListChangeListener.Change;
-import javafx.collections.ObservableList;
-import javafx.scene.* ;
-import javafx.stage.Screen;
-import javafx.stage.Stage;
+import sun.util.logging.PlatformLogger;
 /**
  *
  * Maintains the correspondence of native object to node 
--- a/javafx-ui-common/src/com/sun/javafx/css/StyleHelper.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-ui-common/src/com/sun/javafx/css/StyleHelper.java	Mon Dec 24 12:30:27 2012 -0800
@@ -33,20 +33,19 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
+import javafx.beans.property.ObjectProperty;
+import javafx.beans.property.SimpleObjectProperty;
 import javafx.beans.value.WritableValue;
 import javafx.scene.Node;
+import javafx.scene.Parent;
 import javafx.scene.text.Font;
 import javafx.scene.text.FontPosture;
 import javafx.scene.text.FontWeight;
 import com.sun.javafx.Logging;
 import com.sun.javafx.Utils;
-import com.sun.javafx.css.Origin;
 import com.sun.javafx.css.converters.FontConverter;
 import com.sun.javafx.css.parser.CSSParser;
-import com.sun.javafx.logging.PlatformLogger;
-import javafx.beans.property.ObjectProperty;
-import javafx.beans.property.SimpleObjectProperty;
-import javafx.scene.Parent;
+import sun.util.logging.PlatformLogger;
 
 /**
  * The StyleHelper is a helper class used for applying CSS information to Nodes.
--- a/javafx-ui-common/src/com/sun/javafx/css/StyleManager.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-ui-common/src/com/sun/javafx/css/StyleManager.java	Mon Dec 24 12:30:27 2012 -0800
@@ -25,49 +25,48 @@
 
 package com.sun.javafx.css;
 
-import java.awt.font.FontRenderContext;
+import java.io.FileNotFoundException;
+import java.io.FilePermission;
 import java.io.IOException;
+import java.lang.ref.Reference;
+import java.lang.ref.WeakReference;
 import java.net.MalformedURLException;
 import java.net.URI;
 import java.net.URL;
-import java.io.FilePermission;
 import java.security.AccessControlContext;
 import java.security.AccessController;
 import java.security.PermissionCollection;
+import java.security.PrivilegedAction;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
 import java.security.ProtectionDomain;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.Map.Entry;
+import java.util.WeakHashMap;
 import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
-
-import javafx.collections.FXCollections;
-import javafx.scene.Node;
-import javafx.scene.Scene;
-
-import com.sun.javafx.css.parser.CSSParser;
-import com.sun.javafx.css.StyleHelper.StyleCacheBucket;
-import com.sun.javafx.css.StyleHelper.StyleCacheKey;
-import com.sun.javafx.logging.PlatformLogger;
-import java.io.FileNotFoundException;
-import java.lang.ref.Reference;
-import java.lang.ref.WeakReference;
-import java.security.PrivilegedAction;
-import java.security.PrivilegedExceptionAction;
-import java.security.PrivilegedActionException;
-import java.util.*;
-import java.util.Map.Entry;
 import javafx.beans.value.ChangeListener;
 import javafx.beans.value.ObservableValue;
-import javafx.collections.*;
+import javafx.collections.FXCollections;
+import javafx.collections.ListChangeListener;
 import javafx.collections.ListChangeListener.Change;
+import javafx.collections.ObservableList;
+import javafx.scene.Node;
 import javafx.scene.Parent;
+import javafx.scene.Scene;
 import javafx.scene.text.Font;
 import javafx.stage.PopupWindow;
 import javafx.stage.Window;
+import com.sun.javafx.css.StyleHelper.StyleCacheBucket;
+import com.sun.javafx.css.StyleHelper.StyleCacheKey;
+import com.sun.javafx.css.parser.CSSParser;
+import sun.util.logging.PlatformLogger;
 
 /**
  * Contains the stylesheet state for a single scene. This includes both the
--- a/javafx-ui-common/src/com/sun/javafx/css/converters/EffectConverter.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-ui-common/src/com/sun/javafx/css/converters/EffectConverter.java	Mon Dec 24 12:30:27 2012 -0800
@@ -24,19 +24,15 @@
  */
 package com.sun.javafx.css.converters;
 
-import com.sun.javafx.Logging;
 import javafx.scene.effect.BlurType;
 import javafx.scene.effect.DropShadow;
 import javafx.scene.effect.Effect;
 import javafx.scene.effect.InnerShadow;
 import javafx.scene.paint.Color;
 import javafx.scene.text.Font;
-
+import com.sun.javafx.css.ParsedValue;
 import com.sun.javafx.css.Size;
 import com.sun.javafx.css.StyleConverter;
-import com.sun.javafx.css.ParsedValue;
-import com.sun.javafx.css.StyleManager;
-import com.sun.javafx.logging.PlatformLogger;
 
 public class EffectConverter extends StyleConverter<ParsedValue[], Effect> {
 
--- a/javafx-ui-common/src/com/sun/javafx/css/parser/CSSParser.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-ui-common/src/com/sun/javafx/css/parser/CSSParser.java	Mon Dec 24 12:30:27 2012 -0800
@@ -79,7 +79,7 @@
 import com.sun.javafx.css.converters.SizeConverter.SequenceConverter;
 import com.sun.javafx.css.converters.StringConverter;
 import com.sun.javafx.css.converters.URLConverter;
-import com.sun.javafx.logging.PlatformLogger;
+import sun.util.logging.PlatformLogger;
 import com.sun.javafx.scene.layout.region.BackgroundPositionConverter;
 import com.sun.javafx.scene.layout.region.BackgroundSizeConverter;
 import com.sun.javafx.scene.layout.region.BorderImageSliceConverter;
--- a/javafx-ui-common/src/com/sun/javafx/scene/traversal/ContainerTabOrder.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-ui-common/src/com/sun/javafx/scene/traversal/ContainerTabOrder.java	Mon Dec 24 12:30:27 2012 -0800
@@ -24,23 +24,15 @@
  */
 package com.sun.javafx.scene.traversal;
 
-import static com.sun.javafx.scene.traversal.Direction.DOWN;
-import static com.sun.javafx.scene.traversal.Direction.LEFT;
-import static com.sun.javafx.scene.traversal.Direction.NEXT;
-import static com.sun.javafx.scene.traversal.Direction.PREVIOUS;
-import static com.sun.javafx.scene.traversal.Direction.RIGHT;
-import static com.sun.javafx.scene.traversal.Direction.UP;
-
 import java.util.List;
-
 import javafx.geometry.Bounds;
 import javafx.scene.Group;
 import javafx.scene.Node;
 import javafx.scene.Parent;
+import com.sun.javafx.Logging;
+import sun.util.logging.PlatformLogger;
 
-import com.sun.javafx.Logging;
-import com.sun.javafx.logging.PlatformLogger;
-
+import static com.sun.javafx.scene.traversal.Direction.*;
 
 public class ContainerTabOrder implements Algorithm {
 
--- a/javafx-ui-common/src/com/sun/javafx/scene/traversal/Hueristic2D.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-ui-common/src/com/sun/javafx/scene/traversal/Hueristic2D.java	Mon Dec 24 12:30:27 2012 -0800
@@ -17,32 +17,24 @@
  * You should have received a copy of the GNU General Public License version
  * 2 along with this work; if not, write to the Free Software Foundation,
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
 package com.sun.javafx.scene.traversal;
 
-import static com.sun.javafx.scene.traversal.Direction.DOWN;
-import static com.sun.javafx.scene.traversal.Direction.LEFT;
-import static com.sun.javafx.scene.traversal.Direction.NEXT;
-import static com.sun.javafx.scene.traversal.Direction.PREVIOUS;
-import static com.sun.javafx.scene.traversal.Direction.RIGHT;
-import static com.sun.javafx.scene.traversal.Direction.UP;
-
 import java.util.List;
 import java.util.Stack;
-
+import javafx.geometry.BoundingBox;
 import javafx.geometry.Bounds;
-import javafx.geometry.BoundingBox;
 import javafx.geometry.Point2D;
 import javafx.scene.Group;
 import javafx.scene.Node;
 import javafx.scene.Parent;
+import com.sun.javafx.Logging;
+import sun.util.logging.PlatformLogger;
 
-import com.sun.javafx.Logging;
-import com.sun.javafx.logging.PlatformLogger;
+import static com.sun.javafx.scene.traversal.Direction.*;
 
 
 public class Hueristic2D implements Algorithm {
--- a/javafx-ui-common/src/com/sun/javafx/scene/traversal/TraversalEngine.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-ui-common/src/com/sun/javafx/scene/traversal/TraversalEngine.java	Mon Dec 24 12:30:27 2012 -0800
@@ -37,7 +37,7 @@
 import javafx.scene.Scene;
 
 import com.sun.javafx.Logging;
-import com.sun.javafx.logging.PlatformLogger;
+import sun.util.logging.PlatformLogger;
 import com.sun.javafx.PlatformUtil;
 
 public class TraversalEngine {
--- a/javafx-ui-common/src/com/sun/javafx/scene/traversal/WeightedClosestCorner.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-ui-common/src/com/sun/javafx/scene/traversal/WeightedClosestCorner.java	Mon Dec 24 12:30:27 2012 -0800
@@ -25,21 +25,13 @@
 
 package com.sun.javafx.scene.traversal;
 
-import static com.sun.javafx.scene.traversal.Direction.DOWN;
-import static com.sun.javafx.scene.traversal.Direction.LEFT;
-import static com.sun.javafx.scene.traversal.Direction.NEXT;
-import static com.sun.javafx.scene.traversal.Direction.PREVIOUS;
-import static com.sun.javafx.scene.traversal.Direction.UP;
-
 import java.util.List;
-
 import javafx.geometry.Bounds;
 import javafx.scene.Node;
+import com.sun.javafx.Logging;
+import sun.util.logging.PlatformLogger;
 
-import com.sun.javafx.Logging;
-import com.sun.javafx.logging.PlatformLogger;
-
-
+import static com.sun.javafx.scene.traversal.Direction.*;
 
 /**
  * First search for on-axis nodes. A node is on-axis if any part of its
--- a/javafx-ui-common/src/com/sun/javafx/tk/Toolkit.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-ui-common/src/com/sun/javafx/tk/Toolkit.java	Mon Dec 24 12:30:27 2012 -0800
@@ -45,13 +45,10 @@
 import javafx.scene.effect.BlurType;
 import javafx.scene.image.Image;
 import javafx.scene.image.WritableImage;
-import javafx.scene.input.DragEvent;
 import javafx.scene.input.Dragboard;
-import javafx.scene.input.InputMethodEvent;
 import javafx.scene.input.InputMethodRequests;
 import javafx.scene.input.KeyCode;
 import javafx.scene.input.KeyEvent;
-import javafx.scene.input.MouseEvent;
 import javafx.scene.input.TransferMode;
 import javafx.scene.paint.Color;
 import javafx.scene.paint.ImagePattern;
@@ -61,7 +58,6 @@
 import javafx.scene.paint.Stop;
 import javafx.scene.shape.PathElement;
 import javafx.scene.shape.SVGPath;
-import javafx.scene.text.Text;
 import javafx.stage.FileChooser.ExtensionFilter;
 import javafx.stage.Modality;
 import javafx.stage.StageStyle;
@@ -74,7 +70,7 @@
 import com.sun.javafx.geom.PerspectiveCameraImpl;
 import com.sun.javafx.geom.transform.BaseTransform;
 import com.sun.javafx.jmx.HighlightRegion;
-import com.sun.javafx.logging.PlatformLogger;
+import sun.util.logging.PlatformLogger;
 import com.sun.javafx.perf.PerformanceTracker;
 import com.sun.javafx.runtime.VersionInfo;
 import com.sun.javafx.runtime.async.AsyncOperation;
--- a/javafx-ui-common/src/javafx/scene/Node.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-ui-common/src/javafx/scene/Node.java	Mon Dec 24 12:30:27 2012 -0800
@@ -130,7 +130,7 @@
 import com.sun.javafx.geom.transform.NoninvertibleTransformException;
 import com.sun.javafx.jmx.MXNodeAlgorithm;
 import com.sun.javafx.jmx.MXNodeAlgorithmContext;
-import com.sun.javafx.logging.PlatformLogger;
+import sun.util.logging.PlatformLogger;
 import com.sun.javafx.perf.PerformanceTracker;
 import com.sun.javafx.scene.BoundsAccessor;
 import com.sun.javafx.scene.CSSFlags;
--- a/javafx-ui-common/src/javafx/scene/Parent.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-ui-common/src/javafx/scene/Parent.java	Mon Dec 24 12:30:27 2012 -0800
@@ -52,7 +52,7 @@
 import com.sun.javafx.geom.transform.NoninvertibleTransformException;
 import com.sun.javafx.jmx.MXNodeAlgorithm;
 import com.sun.javafx.jmx.MXNodeAlgorithmContext;
-import com.sun.javafx.logging.PlatformLogger;
+import sun.util.logging.PlatformLogger;
 import com.sun.javafx.scene.CSSFlags;
 import com.sun.javafx.scene.DirtyBits;
 import com.sun.javafx.scene.traversal.TraversalEngine;
--- a/javafx-ui-common/src/javafx/scene/Scene.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-ui-common/src/javafx/scene/Scene.java	Mon Dec 24 12:30:27 2012 -0800
@@ -94,7 +94,7 @@
 import com.sun.javafx.geom.PickRay;
 import com.sun.javafx.geom.transform.Affine2D;
 import com.sun.javafx.geom.transform.BaseTransform;
-import com.sun.javafx.logging.PlatformLogger;
+import sun.util.logging.PlatformLogger;
 import com.sun.javafx.perf.PerformanceTracker;
 import com.sun.javafx.robot.impl.FXRobotHelper;
 import com.sun.javafx.scene.CSSFlags;
--- a/javafx-ui-common/src/javafx/scene/layout/Region.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-ui-common/src/javafx/scene/layout/Region.java	Mon Dec 24 12:30:27 2012 -0800
@@ -60,7 +60,7 @@
 import com.sun.javafx.geom.BaseBounds;
 import com.sun.javafx.geom.PickRay;
 import com.sun.javafx.geom.transform.BaseTransform;
-import com.sun.javafx.logging.PlatformLogger;
+import sun.util.logging.PlatformLogger;
 import com.sun.javafx.scene.DirtyBits;
 import com.sun.javafx.sg.PGNode;
 import com.sun.javafx.sg.PGRegion;
--- a/javafx-ui-common/src/javafx/scene/text/Font.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-ui-common/src/javafx/scene/text/Font.java	Mon Dec 24 12:30:27 2012 -0800
@@ -337,7 +337,7 @@
             return null;
         }
         if (size <= 0) {
-            size = 12;
+            size = getDefaultSystemFontSize();
         }
         // Now lets parse the URL and decide if its a file,
         // or a remote URL from which we need to read.
@@ -407,7 +407,7 @@
      */
     public static Font loadFont(InputStream in, double size) {
         if (size <= 0) {
-            size = 12;
+            size = getDefaultSystemFontSize();
         }
         return Toolkit.getToolkit().getFontLoader().loadFont(in, size);
     }
--- a/javafx-ui-common/src/javafx/scene/text/Text.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-ui-common/src/javafx/scene/text/Text.java	Mon Dec 24 12:30:27 2012 -0800
@@ -36,17 +36,19 @@
 import javafx.beans.binding.ObjectBinding;
 import javafx.beans.property.BooleanProperty;
 import javafx.beans.property.DoubleProperty;
+import javafx.beans.property.DoublePropertyBase;
 import javafx.beans.property.IntegerProperty;
+import javafx.beans.property.IntegerPropertyBase;
 import javafx.beans.property.ObjectProperty;
+import javafx.beans.property.ObjectPropertyBase;
 import javafx.beans.property.ReadOnlyDoubleProperty;
 import javafx.beans.property.ReadOnlyDoubleWrapper;
 import javafx.beans.property.ReadOnlyObjectProperty;
 import javafx.beans.property.SimpleBooleanProperty;
-import javafx.beans.property.SimpleDoubleProperty;
 import javafx.beans.property.SimpleIntegerProperty;
 import javafx.beans.property.SimpleObjectProperty;
-import javafx.beans.property.SimpleStringProperty;
 import javafx.beans.property.StringProperty;
+import javafx.beans.property.StringPropertyBase;
 import javafx.beans.value.WritableValue;
 import javafx.geometry.BoundingBox;
 import javafx.geometry.Bounds;
@@ -120,7 +122,8 @@
 public class Text extends Shape {
 
     private TextLayout layout;
-    
+    private static final PathElement[] EMPTY_PATH_ELEMENT_ARRAY = new PathElement[0];
+
     /**
      * @treatAsPrivate implementation detail
      * @deprecated This is an internal API that is not intended
@@ -143,6 +146,7 @@
         InvalidationListener listener = new InvalidationListener() {
             @Override public void invalidated(Observable observable) {
                 checkSpan();
+                checkOrientation();
             }
         };
         parentProperty().addListener(listener);
@@ -181,9 +185,7 @@
         isSpan = isManaged() && getParent() instanceof TextFlow;
     }
 
-    @Deprecated
-    public void impl_transformsChanged() {
-        super.impl_transformsChanged();
+    private void checkOrientation() {
         if (!isSpan()) {
             /* Using impl_transformsChanged to detect for orientation change.
              * This can be improved if EffectiveNodeOrientation becomes a
@@ -199,6 +201,12 @@
         }
     }
 
+    @Deprecated
+    public void impl_transformsChanged() {
+        super.impl_transformsChanged();
+        checkOrientation();
+    }
+
     @Override
     public boolean isAutomaticallyMirrored() {
         return false;
@@ -403,7 +411,9 @@
 
     public final StringProperty textProperty() {
         if (text == null) {
-            text = new SimpleStringProperty(this, "text", "") {
+            text = new StringPropertyBase("") {
+                @Override public Object getBean() { return Text.this; }
+                @Override public String getName() { return "text"; }
                 @Override  public void invalidated() {
                     needsFullTextLayout();
                     setImpl_selectionStart(-1);
@@ -442,7 +452,9 @@
 
     public final DoubleProperty xProperty() {
         if (x == null) {
-            x = new SimpleDoubleProperty(this, "x") {
+            x = new DoublePropertyBase() {
+                @Override public Object getBean() { return Text.this; }
+                @Override public String getName() { return "x"; }
                 @Override public void invalidated() {
                     impl_geomChanged();
                 }
@@ -468,7 +480,9 @@
 
     public final DoubleProperty yProperty() {
         if (y == null) {
-            y = new SimpleDoubleProperty(this, "y") {
+            y = new DoublePropertyBase() {
+                @Override public Object getBean() { return Text.this; }
+                @Override public String getName() { return "y"; }
                 @Override public void invalidated() {
                     impl_geomChanged();
                 }
@@ -586,7 +600,9 @@
 
     public final DoubleProperty wrappingWidthProperty() {
         if (wrappingWidth == null) {
-            wrappingWidth = new SimpleDoubleProperty(this, "wrappingWidth") {
+            wrappingWidth = new DoublePropertyBase() {
+                @Override public Object getBean() { return Text.this; }
+                @Override public String getName() { return "wrappingWidth"; }
                 @Override public void invalidated() {
                     if (!isSpan()) {
                         TextLayout layout = getTextLayout();
@@ -1022,7 +1038,7 @@
             float y = (float)getY() - getYRendering();
             return layout.getRange(start, end, type, x, y);
         }
-        return new PathElement[0];
+        return EMPTY_PATH_ELEMENT_ARRAY;
     }
 
     /**
@@ -1519,8 +1535,9 @@
         public final ObjectProperty<TextBoundsType> boundsTypeProperty() {
             if (boundsType == null) {
                 boundsType =
-                   new SimpleObjectProperty<TextBoundsType>(Text.this, "boundsType", 
-                       DEFAULT_BOUNDS_TYPE) {
+                   new ObjectPropertyBase<TextBoundsType>(DEFAULT_BOUNDS_TYPE) {
+                       @Override public Object getBean() { return Text.this; }
+                       @Override public String getName() { return "boundsType"; }
                        @Override public void invalidated() {
                            impl_geomChanged();
                        }
@@ -1680,8 +1697,9 @@
         public final ObjectProperty<Paint> impl_selectionFillProperty() {
             if (selectionFill == null) {
                 selectionFill = 
-                    new SimpleObjectProperty<Paint>(Text.this, "impl_selectionFill",
-                                                    DEFAULT_SELECTION_FILL) {
+                    new ObjectPropertyBase<Paint>(DEFAULT_SELECTION_FILL) {
+                        @Override public Object getBean() { return Text.this; }
+                        @Override public String getName() { return "impl_selectionFill"; }
                         @Override protected void invalidated() {
                             impl_markDirty(DirtyBits.TEXT_SELECTION);
                         }
@@ -1702,7 +1720,9 @@
         public final IntegerProperty impl_selectionStartProperty() {
             if (impl_selectionStart == null) {
                 impl_selectionStart = 
-                    new SimpleIntegerProperty(Text.this, "impl_selectionStart", DEFAULT_SELECTION_START) {
+                    new IntegerPropertyBase(DEFAULT_SELECTION_START) {
+                        @Override public Object getBean() { return Text.this; }
+                        @Override public String getName() { return "impl_selectionStart"; }
                         @Override protected void invalidated() {
                             impl_markDirty(DirtyBits.TEXT_SELECTION);
                         }
@@ -1723,7 +1743,9 @@
         public final IntegerProperty impl_selectionEndProperty() {
             if (impl_selectionEnd == null) {
                 impl_selectionEnd = 
-                    new SimpleIntegerProperty(Text.this, "impl_selectionEnd", DEFAULT_SELECTION_END) {
+                    new IntegerPropertyBase(DEFAULT_SELECTION_END) {
+                        @Override public Object getBean() { return Text.this; }
+                        @Override public String getName() { return "impl_selectionEnd"; }
                         @Override protected void invalidated() {
                             impl_markDirty(DirtyBits.TEXT_SELECTION);
                         }
@@ -1751,7 +1773,7 @@
                             TextLayout layout = getTextLayout();
                             return layout.getCaretShape(pos, bias, x, y);
                         }
-                        return new PathElement[0];
+                        return EMPTY_PATH_ELEMENT_ARRAY;
                     }
                 };
                 impl_caretShape = new SimpleObjectProperty<PathElement[]>(Text.this, "impl_caretShape");
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/Logging.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/Logging.java	Mon Dec 24 12:30:27 2012 -0800
@@ -25,7 +25,7 @@
 
 package com.sun.javafx.scene.control;
 
-import com.sun.javafx.logging.PlatformLogger;
+import sun.util.logging.PlatformLogger;
 
 /**
  * Holds PlatformLoggers to use for logging javafx-ui-controls related things.
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/accessible/AccessibleCheckBox.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/accessible/AccessibleCheckBox.java	Mon Dec 24 12:30:27 2012 -0800
@@ -25,17 +25,16 @@
 
 package com.sun.javafx.scene.control.accessible;
 
+import javafx.event.ActionEvent;
+import javafx.event.EventHandler;
+import javafx.scene.control.CheckBox;
+import com.sun.javafx.Logging;
+import com.sun.javafx.accessible.providers.ToggleProvider;
+import com.sun.javafx.accessible.utils.ControlTypeIds;
 import com.sun.javafx.accessible.utils.EventIds;
-import com.sun.javafx.accessible.utils.ControlTypeIds;
 import com.sun.javafx.accessible.utils.PropertyIds;
 import com.sun.javafx.accessible.utils.ToggleState;
-import com.sun.javafx.Logging;
-import com.sun.javafx.logging.PlatformLogger;
-import com.sun.javafx.accessible.providers.ToggleProvider;
-import javafx.event.ActionEvent;
-import javafx.event.Event;
-import javafx.event.EventHandler;
-import javafx.scene.control.CheckBox;
+import sun.util.logging.PlatformLogger;
 
 public class AccessibleCheckBox extends AccessibleControl implements ToggleProvider {
     CheckBox checkBox ;
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/accessible/AccessibleControl.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/accessible/AccessibleControl.java	Mon Dec 24 12:30:27 2012 -0800
@@ -25,17 +25,15 @@
 
 package com.sun.javafx.scene.control.accessible;
 
-import com.sun.javafx.Logging;
-import com.sun.javafx.accessible.AccessibleNode;
-import com.sun.javafx.logging.PlatformLogger;
-import com.sun.javafx.accessible.utils.EventIds;
-import com.sun.javafx.accessible.providers.AccessibleProvider;
-import com.sun.javafx.accessible.utils.ProviderOptions;
-import javafx.beans.value.ObservableValue;
-import javafx.scene.control.Control;
 import javafx.beans.InvalidationListener;
 import javafx.beans.Observable;
 import javafx.beans.value.ChangeListener;
+import javafx.beans.value.ObservableValue;
+import javafx.scene.control.Control;
+import com.sun.javafx.Logging;
+import com.sun.javafx.accessible.AccessibleNode;
+import com.sun.javafx.accessible.utils.EventIds;
+import sun.util.logging.PlatformLogger;
 
 public class AccessibleControl extends AccessibleNode {
     Control control ;
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/ListCellBehavior.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/ListCellBehavior.java	Mon Dec 24 12:30:27 2012 -0800
@@ -25,11 +25,7 @@
 
 package com.sun.javafx.scene.control.behavior;
 
-import com.sun.javafx.PlatformUtil;
-import com.sun.javafx.logging.PlatformLogger;
-import com.sun.javafx.scene.control.Logging;
 import java.util.WeakHashMap;
-
 import javafx.scene.control.FocusModel;
 import javafx.scene.control.ListCell;
 import javafx.scene.control.ListView;
@@ -37,6 +33,9 @@
 import javafx.scene.control.SelectionMode;
 import javafx.scene.input.MouseButton;
 import javafx.scene.input.MouseEvent;
+import com.sun.javafx.PlatformUtil;
+import com.sun.javafx.scene.control.Logging;
+import sun.util.logging.PlatformLogger;
 
 /**
  */
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/TextAreaBehavior.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/TextAreaBehavior.java	Mon Dec 24 12:30:27 2012 -0800
@@ -225,12 +225,12 @@
 
         if (!done) {
             done = true;
-            if ("LineStart".equals(name)) skin.lineStart(false, false);
-            else if ("LineEnd".equals(name)) skin.lineEnd(false, false);
-            else if ("SelectLineStart".equals(name)) skin.lineStart(true, false);
-            else if ("SelectLineStartExtend".equals(name)) skin.lineStart(true, true);
-            else if ("SelectLineEnd".equals(name)) skin.lineEnd(true, false);
-            else if ("SelectLineEndExtend".equals(name)) skin.lineEnd(true, true);
+            if ("LineStart".equals(name)) lineStart(false, false);
+            else if ("LineEnd".equals(name)) lineEnd(false, false);
+            else if ("SelectLineStart".equals(name)) lineStart(true, false);
+            else if ("SelectLineStartExtend".equals(name)) lineStart(true, true);
+            else if ("SelectLineEnd".equals(name)) lineEnd(true, false);
+            else if ("SelectLineEndExtend".equals(name)) lineEnd(true, true);
             else if ("PreviousLine".equals(name)) skin.previousLine(false);
             else if ("NextLine".equals(name)) skin.nextLine(false);
             else if ("SelectPreviousLine".equals(name)) skin.previousLine(true);
@@ -280,6 +280,22 @@
         skin.deleteChar(previous);
     }
 
+    private void lineStart(boolean select, boolean extendSelection) {
+        if (isRTLText()) {
+            skin.toRightLineEdge(select, extendSelection);
+        } else {
+            skin.toLeftLineEdge(select, extendSelection);
+        }
+    }
+
+    private void lineEnd(boolean select, boolean extendSelection) {
+        if (isRTLText()) {
+            skin.toLeftLineEdge(select, extendSelection);
+        } else {
+            skin.toRightLineEdge(select, extendSelection);
+        }
+    }
+
     protected void scrollCharacterToVisible(int index) {
         // TODO this method should be removed when TextAreaSkin
         // TODO is refactored to no longer need it.
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/TextInputControlBehavior.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/TextInputControlBehavior.java	Mon Dec 24 12:30:27 2012 -0800
@@ -90,6 +90,7 @@
                     // Text changed, but not by user action
                     undoManager.reset();
                 }
+                invalidateBidi();
             }
         });
     }
@@ -242,19 +243,49 @@
         }
     }
 
+    private Bidi bidi = null;
+    private Boolean mixed = null;
+    private Boolean rtlText = null;
+
+    private void invalidateBidi() {
+        bidi = null;
+        mixed = null;
+        rtlText = null;
+    }
+
     private Bidi getBidi() {
-        return new Bidi(textInputControl.getText(),
-                        (textInputControl.getEffectiveNodeOrientation() == NodeOrientation.RIGHT_TO_LEFT)
+        if (bidi == null) {
+            bidi = new Bidi(textInputControl.getText(),
+                            (textInputControl.getEffectiveNodeOrientation() == NodeOrientation.RIGHT_TO_LEFT)
                                     ? Bidi.DIRECTION_DEFAULT_RIGHT_TO_LEFT
                                     : Bidi.DIRECTION_DEFAULT_LEFT_TO_RIGHT);
+        }
+        return bidi;
+    }
+
+    protected boolean isMixed() {
+        if (mixed == null) {
+            mixed = getBidi().isMixed();
+        }
+        return mixed;
+    }
+
+    protected boolean isRTLText() {
+        if (rtlText == null) {
+            Bidi bidi = getBidi();
+            rtlText =
+                (bidi.isRightToLeft() ||
+                 (isMixed() &&
+                  textInputControl.getEffectiveNodeOrientation() == NodeOrientation.RIGHT_TO_LEFT));
+        }
+        return rtlText;
     }
 
     private void nextCharacterVisually(boolean moveRight) {
-        Bidi bidi = getBidi();
-        if (bidi.isMixed()) {
+        if (isMixed()) {
             TextInputControlSkin skin = (TextInputControlSkin)textInputControl.getSkin();
             skin.nextCharacterVisually(moveRight);
-        } else if (moveRight != bidi.isRightToLeft()) {
+        } else if (moveRight != isRTLText()) {
             textInputControl.forward();
         } else {
             textInputControl.backward();
@@ -262,8 +293,7 @@
     }
 
     private void selectLeft() {
-        Bidi bidi = getBidi();
-        if (bidi.isRightToLeft() || (bidi.isMixed() && !bidi.baseIsLeftToRight())) {
+        if (isRTLText()) {
             textInputControl.selectForward();
         } else {
             textInputControl.selectBackward();
@@ -271,8 +301,7 @@
     }
 
     private void selectRight() {
-        Bidi bidi = getBidi();
-        if (bidi.isRightToLeft() || (bidi.isMixed() && !bidi.baseIsLeftToRight())) {
+        if (isRTLText()) {
             textInputControl.selectBackward();
         } else {
             textInputControl.selectForward();
@@ -397,8 +426,7 @@
     }
 
     private void selectLeftWord() {
-        Bidi bidi = getBidi();
-        if (bidi.isRightToLeft() || (bidi.isMixed() && !bidi.baseIsLeftToRight())) {
+        if (isRTLText()) {
             selectNextWord();
         } else {
             selectPreviousWord();
@@ -406,8 +434,7 @@
     }
 
     private void selectRightWord() {
-        Bidi bidi = getBidi();
-        if (bidi.isRightToLeft() || (bidi.isMixed() && !bidi.baseIsLeftToRight())) {
+        if (isRTLText()) {
             selectPreviousWord();
         } else {
             selectNextWord();
@@ -438,8 +465,7 @@
     }
 
     private void leftWord() {
-        Bidi bidi = getBidi();
-        if (bidi.isRightToLeft() || (bidi.isMixed() && !bidi.baseIsLeftToRight())) {
+        if (isRTLText()) {
             nextWord();
         } else {
             previousWord();
@@ -447,8 +473,7 @@
     }
 
     private void rightWord() {
-        Bidi bidi = getBidi();
-        if (bidi.isRightToLeft() || (bidi.isMixed() && !bidi.baseIsLeftToRight())) {
+        if (isRTLText()) {
             previousWord();
         } else {
             nextWord();
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/TreeCellBehavior.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/behavior/TreeCellBehavior.java	Mon Dec 24 12:30:27 2012 -0800
@@ -25,15 +25,19 @@
 
 package com.sun.javafx.scene.control.behavior;
 
-import com.sun.javafx.PlatformUtil;
-import com.sun.javafx.logging.PlatformLogger;
-import com.sun.javafx.scene.control.Logging;
 import java.util.WeakHashMap;
-
 import javafx.scene.Node;
-import javafx.scene.control.*;
+import javafx.scene.control.FocusModel;
+import javafx.scene.control.MultipleSelectionModel;
+import javafx.scene.control.SelectionMode;
+import javafx.scene.control.TreeCell;
+import javafx.scene.control.TreeItem;
+import javafx.scene.control.TreeView;
 import javafx.scene.input.MouseButton;
 import javafx.scene.input.MouseEvent;
+import com.sun.javafx.PlatformUtil;
+import com.sun.javafx.scene.control.Logging;
+import sun.util.logging.PlatformLogger;
 
 /**
  */
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TextAreaSkin.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TextAreaSkin.java	Mon Dec 24 12:30:27 2012 -0800
@@ -1215,14 +1215,13 @@
                   select, false);
     }
 
-    public void lineStart(boolean select, boolean extendSelection) {
-        Bounds caretBounds = caretPath.getLayoutBounds();
-        double midY = (caretBounds.getMinY() + caretBounds.getMaxY()) / 2;
-        HitInfo hit = getTextNode().impl_hitTestChar(translateCaretPosition(new Point2D(getTextLeft(), midY)));
-        positionCaret(hit, select, extendSelection);
+    public void toLeftLineEdge(boolean select, boolean extendSelection) {
+        targetCaretX = 0;
+        downLines(0, select, extendSelection);
+        targetCaretX = -1;
     }
 
-    public void lineEnd(boolean select, boolean extendSelection) {
+    public void toRightLineEdge(boolean select, boolean extendSelection) {
         targetCaretX = Double.MAX_VALUE;
         downLines(0, select, extendSelection);
         targetCaretX = -1;
--- a/javafx-ui-controls/src/javafx/scene/control/Control.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-ui-controls/src/javafx/scene/control/Control.java	Mon Dec 24 12:30:27 2012 -0800
@@ -25,32 +25,36 @@
 
 package javafx.scene.control;
 
-import com.sun.javafx.Utils;
-import com.sun.javafx.application.PlatformImpl;
-import com.sun.javafx.beans.annotations.DuplicateInBuilderProperties;
-import com.sun.javafx.css.*;
-import com.sun.javafx.css.converters.StringConverter;
-import com.sun.javafx.logging.PlatformLogger;
-import com.sun.javafx.scene.control.Logging;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
 import javafx.application.Application;
 import javafx.beans.property.ObjectProperty;
 import javafx.beans.property.ObjectPropertyBase;
 import javafx.beans.property.SimpleObjectProperty;
 import javafx.beans.property.StringProperty;
 import javafx.beans.value.WritableValue;
-import com.sun.javafx.accessible.providers.AccessibleProvider;
 import javafx.collections.ObservableList;
 import javafx.event.EventHandler;
 import javafx.geometry.Insets;
 import javafx.scene.Node;
 import javafx.scene.input.ContextMenuEvent;
 import javafx.scene.layout.Region;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
+import com.sun.javafx.Utils;
+import com.sun.javafx.accessible.providers.AccessibleProvider;
+import com.sun.javafx.application.PlatformImpl;
+import com.sun.javafx.beans.annotations.DuplicateInBuilderProperties;
+import com.sun.javafx.css.CssError;
+import com.sun.javafx.css.CssMetaData;
+import com.sun.javafx.css.PseudoClass;
+import com.sun.javafx.css.StyleManager;
+import com.sun.javafx.css.StyleableObjectProperty;
+import com.sun.javafx.css.StyleableStringProperty;
+import com.sun.javafx.css.converters.StringConverter;
+import com.sun.javafx.scene.control.Logging;
+import sun.util.logging.PlatformLogger;
 
 
 /**
--- a/javafx-ui-controls/src/javafx/scene/control/PopupControl.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-ui-controls/src/javafx/scene/control/PopupControl.java	Mon Dec 24 12:30:27 2012 -0800
@@ -24,7 +24,11 @@
  */
 package javafx.scene.control;
 
-import com.sun.javafx.Utils;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
 import javafx.application.Application;
 import javafx.beans.property.DoubleProperty;
 import javafx.beans.property.DoublePropertyBase;
@@ -38,12 +42,7 @@
 import javafx.scene.Group;
 import javafx.scene.Node;
 import javafx.stage.PopupWindow;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
+import com.sun.javafx.Utils;
 import com.sun.javafx.application.PlatformImpl;
 import com.sun.javafx.collections.TrackableObservableList;
 import com.sun.javafx.css.CssError;
@@ -53,8 +52,8 @@
 import com.sun.javafx.css.Styleable;
 import com.sun.javafx.css.StyleableStringProperty;
 import com.sun.javafx.css.converters.StringConverter;
-import com.sun.javafx.logging.PlatformLogger;
 import com.sun.javafx.scene.control.Logging;
+import sun.util.logging.PlatformLogger;
 
 /**
  * An extension of PopupWindow that allows for CSS styling.
--- a/javafx-ui-controls/src/javafx/scene/control/TableColumn.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-ui-controls/src/javafx/scene/control/TableColumn.java	Mon Dec 24 12:30:27 2012 -0800
@@ -24,7 +24,7 @@
  */
 package javafx.scene.control;
 
-import com.sun.javafx.beans.annotations.NoBuilder;
+import com.sun.javafx.beans.annotations.DuplicateInBuilderProperties;
 import com.sun.javafx.css.Styleable;
 import com.sun.javafx.css.CssMetaData;
 import com.sun.javafx.scene.control.skin.NestedTableColumnHeader;
@@ -133,7 +133,10 @@
  * @see TableCell
  * @see TablePosition
  */
-@NoBuilder  // TODO should this be here?
+@DuplicateInBuilderProperties(properties =
+        {"comparator", "contextMenu", "editable", "graphic", "id", "maxWidth",
+         "minWidth", "prefWidth", "resizable", "sortable", "sortNode",
+         "sortType", "style", "styleClass", "userdata", "text", "visible"})
 public class TableColumn<S,T> extends TableColumnBase<S,T> implements EventTarget {
     
     /***************************************************************************
--- a/javafx-ui-controls/src/javafx/scene/control/TableColumnBase.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-ui-controls/src/javafx/scene/control/TableColumnBase.java	Mon Dec 24 12:30:27 2012 -0800
@@ -24,7 +24,6 @@
  */
 package javafx.scene.control;
 
-import com.sun.javafx.beans.annotations.NoBuilder;
 import java.text.Collator;
 import java.util.Comparator;
 
@@ -90,7 +89,6 @@
  * @see TreeTableColumn
  * @see TablePositionBase
  */
-@NoBuilder  // TODO should this be here?
 public abstract class TableColumnBase<S,T> implements EventTarget {
     
     /***************************************************************************
--- a/javafx-ui-controls/src/javafx/scene/control/TreeTableColumn.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-ui-controls/src/javafx/scene/control/TreeTableColumn.java	Mon Dec 24 12:30:27 2012 -0800
@@ -24,7 +24,6 @@
  */
 package javafx.scene.control;
 
-import com.sun.javafx.beans.annotations.NoBuilder;
 import com.sun.javafx.css.Styleable;
 import com.sun.javafx.css.CssMetaData;
 import com.sun.javafx.event.EventHandlerManager;
@@ -129,7 +128,6 @@
  * @see TableCell
  * @see TablePosition
  */
-@NoBuilder  // FIXME this is only here as the builder generation fails without it 
 public class TreeTableColumn<S,T> extends TableColumnBase<TreeItem<S>,T> implements EventTarget {
     
     /***************************************************************************
--- a/javafx-ui-controls/src/javafx/scene/control/cell/PropertyValueFactory.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-ui-controls/src/javafx/scene/control/cell/PropertyValueFactory.java	Mon Dec 24 12:30:27 2012 -0800
@@ -33,7 +33,7 @@
 import javafx.scene.control.TableView;
 import javafx.util.Callback;
 
-import com.sun.javafx.logging.PlatformLogger;
+import sun.util.logging.PlatformLogger;
 import com.sun.javafx.property.PropertyReference;
 import com.sun.javafx.scene.control.Logging;
 
--- a/javafx-ui-controls/src/javafx/scene/control/cell/TreeItemPropertyValueFactory.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-ui-controls/src/javafx/scene/control/cell/TreeItemPropertyValueFactory.java	Mon Dec 24 12:30:27 2012 -0800
@@ -27,14 +27,13 @@
 import javafx.beans.property.Property;
 import javafx.beans.property.ReadOnlyObjectWrapper;
 import javafx.beans.value.ObservableValue;
-import javafx.util.Callback;
-
-import com.sun.javafx.logging.PlatformLogger;
-import com.sun.javafx.property.PropertyReference;
-import com.sun.javafx.scene.control.Logging;
 import javafx.scene.control.TreeItem;
 import javafx.scene.control.TreeTableColumn;
 import javafx.scene.control.TreeTableColumn.CellDataFeatures;
+import javafx.util.Callback;
+import com.sun.javafx.property.PropertyReference;
+import com.sun.javafx.scene.control.Logging;
+import sun.util.logging.PlatformLogger;
 
 
 /**
--- a/javafx-ui-controls/test/javafx/scene/control/ControlTest.java	Thu Dec 20 16:44:47 2012 -0800
+++ b/javafx-ui-controls/test/javafx/scene/control/ControlTest.java	Mon Dec 24 12:30:27 2012 -0800
@@ -5,21 +5,6 @@
 package javafx.scene.control;
 
 import com.sun.javafx.css.CssMetaData;
-import javafx.beans.property.BooleanProperty;
-import javafx.beans.property.DoubleProperty;
-import javafx.beans.property.ObjectProperty;
-import javafx.beans.property.SimpleBooleanProperty;
-import javafx.beans.property.SimpleDoubleProperty;
-import javafx.beans.property.SimpleObjectProperty;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
-import javafx.scene.Group;
-import javafx.scene.shape.Rectangle;
-
-import java.io.PrintStream;
-
-import com.sun.javafx.logging.PlatformLogger;
-import com.sun.javafx.scene.control.Logging;
 import java.io.File;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
@@ -27,13 +12,21 @@
 import java.net.URL;
 import java.util.Arrays;
 import java.util.List;
+import javafx.beans.property.DoubleProperty;
+import javafx.beans.property.ObjectProperty;
+import javafx.beans.property.SimpleDoubleProperty;
+import javafx.beans.property.SimpleObjectProperty;
+import javafx.beans.value.ChangeListener;
+import javafx.beans.value.ObservableValue;
 import javafx.beans.value.WritableValue;
-import javafx.geometry.Pos;
-import javafx.scene.Cursor;
+import javafx.scene.Group;
 import javafx.scene.Node;
+import javafx.scene.shape.Rectangle;
+import com.sun.javafx.scene.control.Logging;
 import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Test;
+import sun.util.logging.PlatformLogger;
 
 import static org.junit.Assert.*;