changeset 6481:c3b28058d4d3

Automated merge with ssh://jfxsrc.us.oracle.com//javafx/8u/master/jfx/rt
author kcr
date Fri, 14 Mar 2014 09:02:45 -0700
parents 7b70873c59f9 58cfa37fa986
children d2b135379e8d
files modules/fxml/src/main/java/com/sun/javafx/fxml/annotation/FXMLAnnotationProcessor.java modules/fxml/src/main/resources/META-INF/services/javax.annotation.processing.Processor modules/graphics/src/test/java/javafx/scene/RegistrationTest.java
diffstat 103 files changed, 1965 insertions(+), 2374 deletions(-) [+]
line wrap: on
line diff
--- a/apps/toys/Hello/src/main/java/hello/HelloDatePicker.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/apps/toys/Hello/src/main/java/hello/HelloDatePicker.java	Fri Mar 14 09:02:45 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
--- a/build.gradle	Wed Mar 12 09:12:18 2014 -0700
+++ b/build.gradle	Fri Mar 14 09:02:45 2014 -0700
@@ -278,7 +278,7 @@
 defineProperty("JDK_DOCS", "http://download.oracle.com/javase/7/docs/api")
 
 defineProperty("javaRuntimeVersion", System.getProperty("java.runtime.version"))
-defineProperty("javaVersion", javaRuntimeVersion.split("[_\\-]")[0])
+defineProperty("javaVersion", javaRuntimeVersion.split("-")[0])
 defineProperty("javaBuildNumber", javaRuntimeVersion.substring(javaRuntimeVersion.lastIndexOf("-b") + 2))
 
 loadProperties("$projectDir/build.properties")
@@ -663,7 +663,7 @@
                 String ver = v.substring(ib + 8, v.size() - 1);
 
                 defineProperty("jdkRuntimeVersion", ver)
-                defineProperty("jdkVersion", jdkRuntimeVersion.split("[_\\-]")[0])
+                defineProperty("jdkVersion", jdkRuntimeVersion.split("-")[0])
                 defineProperty("jdkBuildNumber", jdkRuntimeVersion.substring(jdkRuntimeVersion.lastIndexOf("-b") + 2))
             }
         }
@@ -916,16 +916,52 @@
     }
 }
 
+/**
+ * Parses a JDK version string. The string must be in one of the following
+ * two formats:
+ *
+ *     major.minor.subminor
+ * or
+ *     major.minor.subminor_update
+ *
+ * In both cases a list of 4 integers is returned, with element 3 set to
+ * 0 in the former case.
+ */
+List parseJdkVersion(String version) {
+    def arr = version.split("[_\\.]");
+    def intArr = [];
+    arr.each { s -> intArr += Integer.parseInt(s); }
+    if (intArr.size() < 4) intArr += 0;
+    return intArr;
+}
+
+/**
+ * Returns -1, 0, or 1 depending on whether JDK version "a" is less than,
+ * equal to, or grater than version "b".
+ */
+int compareJdkVersion(String a, String b) {
+    def aIntArr = parseJdkVersion(a);
+    def bIntArr = parseJdkVersion(b);
+
+    for (int i = 0; i < 4; i++) {
+        if (aIntArr[i] < bIntArr[i]) return -1;
+        if (aIntArr[i] > bIntArr[i]) return  1;
+    }
+    return 0;
+}
+
 // Task to verify the minimum level of Java needed to build JavaFX
 task verifyJava() {
     doLast {
-        if (jdkVersion != jfxBuildJdkVersion) {
-            fail("java version mismatch: ${jdkVersion} must be ${jfxBuildJdkVersion}")
-        }
-        def buildNum = Integer.parseInt(jdkBuildNumber)
-        def minBuildNum = Integer.parseInt(jfxBuildJdkBuildnumMin)
-        if (buildNum < minBuildNum) {
-            fail("java build number ($buildNum) < minimum build number ($minBuildNum)")
+        def status = compareJdkVersion(jdkVersion, jfxBuildJdkVersion);
+        if (status < 0) {
+            fail("java version mismatch: JDK version (${jdkVersion}) < minimum version (${jfxBuildJdkVersion})")
+        } else if (status == 0) {
+            def buildNum = Integer.parseInt(jdkBuildNumber)
+            def minBuildNum = Integer.parseInt(jfxBuildJdkBuildnumMin)
+            if (buildNum < minBuildNum) {
+                fail("JDK build number ($buildNum) < minimum build number ($minBuildNum)")
+            }
         }
     }
 }
--- a/modules/base/src/main/java/com/sun/javafx/PlatformUtil.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/base/src/main/java/com/sun/javafx/PlatformUtil.java	Fri Mar 14 09:02:45 2014 -0700
@@ -37,6 +37,11 @@
 
 public class PlatformUtil {
 
+    // NOTE: since this class can be initialized by application code in some
+    // cases, we must encapsulate all calls to System.getProperty("...") in
+    // a doPrivileged block except for standard JVM properties such as
+    // os.name, os.version, os.arch, java.vm.name, etc.
+
     private static final String os = System.getProperty("os.name");
     private static final String version = System.getProperty("os.version");
     private static final boolean embedded;
@@ -60,7 +65,7 @@
             doEGLCompositing = false;
     }
 
-    private static final boolean ANDROID = "android".equals(System.getProperty("javafx.platform")) || "Dalvik".equals(System.getProperty("java.vm.name"));
+    private static final boolean ANDROID = "android".equals(javafxPlatform) || "Dalvik".equals(System.getProperty("java.vm.name"));
     private static final boolean WINDOWS = os.startsWith("Windows");
     private static final boolean WINDOWS_VISTA_OR_LATER = WINDOWS && versionNumberGreaterThanOrEqualTo(6.0f);
     private static final boolean WINDOWS_7_OR_LATER = WINDOWS && versionNumberGreaterThanOrEqualTo(6.1f);
--- a/modules/builders/src/main/java/javafx/scene/ParentBuilder.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/builders/src/main/java/javafx/scene/ParentBuilder.java	Fri Mar 14 09:02:45 2014 -0700
@@ -42,23 +42,9 @@
     public void applyTo(javafx.scene.Parent x) {
         super.applyTo(x);
         int set = __set;
-        if ((set & (1 << 0)) != 0) x.setImpl_traversalEngine(this.impl_traversalEngine);
         if ((set & (1 << 1)) != 0) x.getStylesheets().addAll(this.stylesheets);
     }
     
-    private com.sun.javafx.scene.traversal.TraversalEngine impl_traversalEngine;
-    /**
-    Set the value of the {@link javafx.scene.Parent#getImpl_traversalEngine() impl_traversalEngine} property for the instance constructed by this builder.
-    @treatAsPrivate
-    @deprecated This is an internal API that is not intended for use and will be removed in the next version
-    */
-    @SuppressWarnings("unchecked") @Deprecated
-    public B impl_traversalEngine(com.sun.javafx.scene.traversal.TraversalEngine x) {
-        this.impl_traversalEngine = x;
-        __set |= 1 << 0;
-        return (B) this;
-    }
-    
     private java.util.Collection<? extends java.lang.String> stylesheets;
     /**
     Add the given items to the List of items in the {@link javafx.scene.Parent#getStylesheets() stylesheets} property for the instance constructed by this builder.
--- a/modules/builders/src/test/java/javafx/scene/Group_builder_Test.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/builders/src/test/java/javafx/scene/Group_builder_Test.java	Fri Mar 14 09:02:45 2014 -0700
@@ -45,7 +45,7 @@
 
         cfg.addProperty("autoSizeChildren", false);
         cfg.addProperty("children", Node.class, Arrays.asList(new Rectangle()));
-        cfg.addProperty("impl_traversalEngine", new TraversalEngine(new Group(), true));
+//        cfg.addProperty("impl_traversalEngine", new TraversalEngine(new Group(), true));
         cfg.addProperty("stylesheets", String.class, Arrays.asList("test.css"));
 
         return Arrays.asList(new Object[] {
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/AccordionBehavior.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/AccordionBehavior.java	Fri Mar 14 09:02:45 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, 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
@@ -30,6 +30,7 @@
 import javafx.beans.value.ObservableValue;
 import javafx.collections.ListChangeListener;
 import javafx.collections.ObservableList;
+import javafx.geometry.NodeOrientation;
 import javafx.scene.control.Accordion;
 import javafx.scene.control.FocusModel;
 import javafx.scene.control.TitledPane;
@@ -86,7 +87,12 @@
 
     @Override protected void callAction(String name) {   
         Accordion accordion = getControl();
-        if ("TraverseLeft".equals(name) || "TraverseUp".equals(name) || PAGE_UP.equals(name)) {
+        boolean rtl = (accordion.getEffectiveNodeOrientation() == NodeOrientation.RIGHT_TO_LEFT);
+
+        if (("TraverseLeft".equals(name) && !rtl) ||
+            ("TraverseRight".equals(name) && rtl) ||
+            "TraverseUp".equals(name) || PAGE_UP.equals(name)) {
+
             if (focusModel.getFocusedIndex() != -1 && accordion.getPanes().get(focusModel.getFocusedIndex()).isFocused()) {
                 focusModel.focusPrevious();
                 int next = focusModel.getFocusedIndex();
@@ -95,7 +101,10 @@
                     accordion.getPanes().get(next).setExpanded(true);
                 }
             }
-        } else if ("TraverseRight".equals(name) || "TraverseDown".equals(name) || PAGE_DOWN.equals(name)) {
+        } else if (("TraverseRight".equals(name) && !rtl) || 
+                   ("TraverseLeft".equals(name) && rtl) ||
+                   "TraverseDown".equals(name) || PAGE_DOWN.equals(name)) {
+
             if (focusModel.getFocusedIndex() != -1 && accordion.getPanes().get(focusModel.getFocusedIndex()).isFocused()) {
                 focusModel.focusNext();
                 int next = focusModel.getFocusedIndex();
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/BehaviorBase.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/BehaviorBase.java	Fri Mar 14 09:02:45 2014 -0700
@@ -30,7 +30,6 @@
 import javafx.beans.InvalidationListener;
 import javafx.beans.Observable;
 import javafx.event.EventHandler;
-import javafx.geometry.NodeOrientation;
 import javafx.scene.Node;
 import javafx.scene.control.Control;
 import javafx.scene.input.ContextMenuEvent;
@@ -248,21 +247,6 @@
         String action = null;
         if (match != null) {
             action = match.getAction();
-            // Rather than switching the result of the action lookup in this way, the preferred
-            // way to do this according to the current architecture would be to hoist the
-            // getEffectiveNodeOrientation call up into the key bindings, the same way that
-            // list-view orientation (horizontal vs. vertical) is handled in a key binding.
-            if (e.getCode() == LEFT || e.getCode() == RIGHT) {
-                if (control.getEffectiveNodeOrientation() == NodeOrientation.RIGHT_TO_LEFT) {
-                    if (match.getAction().equals("TraverseLeft")) {
-                        action = "TraverseRight";
-                    } else {
-                        if (match.getAction().equals("TraverseRight")) {
-                            action = "TraverseLeft";
-                        }
-                    }
-                }
-            }
         }
         return action;
     }
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/DateCellBehavior.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/DateCellBehavior.java	Fri Mar 14 09:02:45 2014 -0700
@@ -25,6 +25,7 @@
 
 package com.sun.javafx.scene.control.behavior;
 
+import javafx.geometry.NodeOrientation;
 import javafx.scene.Node;
 import javafx.scene.control.DateCell;
 import java.time.LocalDate;
@@ -84,6 +85,8 @@
     }
 
     @Override public void traverse(final Node node, final Direction dir) {
+        boolean rtl = (node.getEffectiveNodeOrientation() == NodeOrientation.RIGHT_TO_LEFT);
+
         switch (dir) {
           case UP:
           case DOWN:
@@ -96,8 +99,8 @@
                       switch (dir) {
                         case UP:    dpc.goToDayCell(cell, -1, WEEKS, true); break;
                         case DOWN:  dpc.goToDayCell(cell, +1, WEEKS, true); break;
-                        case LEFT:  dpc.goToDayCell(cell, -1, DAYS,  true); break;
-                        case RIGHT: dpc.goToDayCell(cell, +1, DAYS,  true); break;
+                        case LEFT:  dpc.goToDayCell(cell, rtl ? +1 : -1, DAYS,  true); break;
+                        case RIGHT: dpc.goToDayCell(cell, rtl ? -1 : +1, DAYS,  true); break;
                       }
                       return;
                   }
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/MenuButtonBehaviorBase.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/MenuButtonBehaviorBase.java	Fri Mar 14 09:02:45 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, 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
@@ -36,6 +36,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import javafx.geometry.NodeOrientation;
 import javafx.geometry.Side;
 import javafx.scene.control.MenuButton;
 import javafx.scene.input.MouseButton;
@@ -95,6 +96,16 @@
     @Override protected void callAction(String name) {
         MenuButton button = getControl();
         Side popupSide = button.getPopupSide();
+        
+        if (button.getEffectiveNodeOrientation() == NodeOrientation.RIGHT_TO_LEFT) {
+            // Swap L/R direction for RTL
+            if (popupSide == Side.LEFT) {
+                popupSide = Side.RIGHT;
+            } else if (popupSide == Side.RIGHT) {
+                popupSide = Side.LEFT;
+            }
+        }
+
         if (CLOSE_ACTION.equals(name)) {
             button.hide();
         } else if (OPEN_ACTION.equals(name)) {
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TabPaneBehavior.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TabPaneBehavior.java	Fri Mar 14 09:02:45 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2014, 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
@@ -27,6 +27,7 @@
 
 import javafx.collections.ObservableList;
 import javafx.event.Event;
+import javafx.geometry.NodeOrientation;
 import javafx.scene.Node;
 import javafx.scene.Parent;
 import javafx.scene.control.SingleSelectionModel;
@@ -68,13 +69,17 @@
     }
 
     @Override protected void callAction(String name) {
-        if ("TraverseLeft".equals(name) ||
+        boolean rtl = (getControl().getEffectiveNodeOrientation() == NodeOrientation.RIGHT_TO_LEFT);
+
+        if (("TraverseLeft".equals(name) && !rtl) ||
+            ("TraverseRight".equals(name) && rtl) ||
             "TraverseUp".equals(name)) {
             if (getControl().isFocused()) {
                 selectPreviousTab();
             }
-        } else if ("TraverseRight".equals(name)
-                || "TraverseDown".equals(name)) {
+        } else if (("TraverseRight".equals(name) && !rtl) || 
+                   ("TraverseLeft".equals(name) && rtl) ||
+                   "TraverseDown".equals(name)) {
             if (getControl().isFocused()) {
                 selectNextTab();
             }
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/ToggleButtonBehavior.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/ToggleButtonBehavior.java	Fri Mar 14 09:02:45 2014 -0700
@@ -56,6 +56,11 @@
     @Override
     protected void callAction(String name) {
         final ToggleGroup toggleGroup = getControl().getToggleGroup();
+        // A ToggleButton does not have to be in a group.
+        if (toggleGroup == null) {
+            super.callAction(name);
+            return;
+        }
         ObservableList<Toggle> toggles = toggleGroup.getToggles();
         final int currentToggleIdx = toggles.indexOf(getControl());
         switch (name) {
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TreeViewBehavior.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/behavior/TreeViewBehavior.java	Fri Mar 14 09:02:45 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, 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
@@ -30,6 +30,7 @@
 import javafx.beans.value.WeakChangeListener;
 import javafx.collections.ListChangeListener;
 import javafx.collections.WeakListChangeListener;
+import javafx.geometry.NodeOrientation;
 import javafx.scene.control.*;
 import javafx.scene.input.KeyEvent;
 import javafx.scene.input.MouseEvent;
@@ -125,6 +126,22 @@
         TREE_VIEW_BINDINGS.add(new KeyBinding(ESCAPE, "CancelEdit"));
     }
 
+    protected /*final*/ String matchActionForEvent(KeyEvent e) {
+        String action = super.matchActionForEvent(e);
+        if (getControl().getEffectiveNodeOrientation() == NodeOrientation.RIGHT_TO_LEFT) {
+            // Rather than switching the result of the action lookup in this way, the preferred
+            // way to do this according to the current architecture would be to hoist the
+            // getEffectiveNodeOrientation call up into the key bindings, the same way that ListView
+            // orientation (horizontal vs. vertical) is handled with the OrientedKeyBinding class.
+            if ("CollapseRow".equals(action) && (e.getCode() == LEFT || e.getCode() == KP_LEFT)) {
+                action = "ExpandRow";
+            } else if ("ExpandRow".equals(action) && (e.getCode() == RIGHT || e.getCode() == KP_RIGHT)) {
+                action = "CollapseRow";
+            }
+        }
+        return action;
+    }
+
     @Override protected void callAction(String name) {
         if ("SelectPreviousRow".equals(name)) selectPreviousRow();
         else if ("SelectNextRow".equals(name)) selectNextRow();
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/MenuBarSkin.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/MenuBarSkin.java	Fri Mar 14 09:02:45 2014 -0700
@@ -25,6 +25,7 @@
 
 package com.sun.javafx.scene.control.skin;
 
+import com.sun.javafx.scene.traversal.ParentTraversalEngine;
 import javafx.beans.InvalidationListener;
 import javafx.beans.Observable;
 import javafx.beans.property.ReadOnlyProperty;
@@ -83,8 +84,6 @@
     private Menu openMenu;
     private MenuBarButton openMenuButton;
     private int focusedMenuIndex = -1;
-    private TraversalEngine engine;
-    private Direction direction;
 
     private static WeakHashMap<Stage, Reference<MenuBarSkin>> systemMenuMap;
     private static List<MenuBase> wrappedDefaultMenus = new ArrayList<MenuBase>();
@@ -372,15 +371,10 @@
            acceleratorKeyCombo = KeyCombination.keyCombination("F10");
         }
         getSkinnable().getScene().getAccelerators().put(acceleratorKeyCombo, firstMenuRunnable);
-        engine = new TraversalEngine(getSkinnable(), false) {
-            @Override public boolean trav(Node node, Direction dir) {
-                direction = dir;
-                return super.trav(node,dir);
-            }
-        };
+        ParentTraversalEngine engine = new ParentTraversalEngine(getSkinnable());
         engine.addTraverseListener(this);
         getSkinnable().setImpl_traversalEngine(engine);
-        
+
         control.sceneProperty().addListener(new ChangeListener<Scene>() {
             @Override
             public void changed(ObservableValue<? extends Scene> ov, Scene t, Scene t1) {
@@ -919,13 +913,8 @@
 
     @Override
     public void onTraverse(Node node, Bounds bounds) {
-        if (direction.equals(Direction.NEXT)) {
-            if (openMenu != null) openMenu.hide();
-            focusedMenuIndex = 0;
-            new TraversalEngine(getSkinnable(), false).trav(getSkinnable(), Direction.NEXT);
-        } else if (direction.equals(DOWN)) {
-            // do nothing 
-        }
+        if (openMenu != null) openMenu.hide();
+        focusedMenuIndex = 0;
     }
 
     static class MenuBarButton extends MenuButton {
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/NestedTableColumnHeader.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/NestedTableColumnHeader.java	Fri Mar 14 09:02:45 2014 -0700
@@ -194,8 +194,10 @@
             TableColumnBase column = (TableColumnBase) rect.getProperties().get(TABLE_COLUMN_KEY);
             NestedTableColumnHeader header = (NestedTableColumnHeader) rect.getProperties().get(TABLE_COLUMN_HEADER_KEY);
 
-            rect.setCursor(header.isColumnResizingEnabled() && rect.isHover() &&
-                    column.isResizable() ? Cursor.H_RESIZE : Cursor.DEFAULT);
+            if (header.getCursor() == null) { // If there's a cursor for the whole header, don't override it
+                rect.setCursor(header.isColumnResizingEnabled() && rect.isHover() &&
+                        column.isResizable() ? Cursor.H_RESIZE : null);
+            }
         }
     };
     
@@ -545,6 +547,7 @@
     }
 
     private void columnResizingStarted(double startX) {
+        setCursor(Cursor.H_RESIZE);
         columnReorderLine.setLayoutX(startX);
     }
 
@@ -561,7 +564,7 @@
     }
 
     private void columnResizingComplete(TableColumnBase col, MouseEvent me) {
-//        getTableHeaderRow().getColumnReorderLine().setVisible(true);
+        setCursor(null);
         columnReorderLine.setTranslateX(0.0F);
         columnReorderLine.setLayoutX(0.0F);
         lastX = 0.0F;
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ScrollPaneSkin.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ScrollPaneSkin.java	Fri Mar 14 09:02:45 2014 -0700
@@ -25,6 +25,9 @@
 
 package com.sun.javafx.scene.control.skin;
 
+import com.sun.javafx.scene.traversal.Direction;
+import com.sun.javafx.scene.traversal.ParentTraversalEngine;
+import com.sun.javafx.scene.traversal.TraversalEngine;
 import javafx.animation.Animation.Status;
 import javafx.animation.KeyFrame;
 import javafx.animation.KeyValue;
@@ -51,14 +54,11 @@
 import javafx.scene.input.MouseEvent;
 import javafx.scene.input.ScrollEvent;
 import javafx.scene.input.TouchEvent;
-import javafx.scene.layout.Region;
 import javafx.scene.layout.StackPane;
 import javafx.scene.shape.Rectangle;
 import javafx.util.Duration;
 import com.sun.javafx.Utils;
-import com.sun.javafx.application.PlatformImpl;
 import com.sun.javafx.scene.control.behavior.ScrollPaneBehavior;
-import com.sun.javafx.scene.traversal.TraversalEngine;
 import com.sun.javafx.scene.traversal.TraverseListener;
 import static com.sun.javafx.Utils.*;
 import static com.sun.javafx.scene.control.skin.Utils.*;
@@ -231,7 +231,6 @@
         }
    };
 
-
     private void initialize() {
         // requestLayout calls below should not trigger requestLayout above ScrollPane
 //        setManaged(false);
@@ -239,7 +238,7 @@
         ScrollPane control = getSkinnable();
         scrollNode = control.getContent();
 
-        TraversalEngine traversalEngine = new TraversalEngine(getSkinnable(), false);
+        ParentTraversalEngine traversalEngine = new ParentTraversalEngine(getSkinnable());
         traversalEngine.addTraverseListener(this);
         getSkinnable().setImpl_traversalEngine(traversalEngine);
 
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableRowSkinBase.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TableRowSkinBase.java	Fri Mar 14 09:02:45 2014 -0700
@@ -624,6 +624,7 @@
                 R cell = cellsIter.next();
                 cell.updateIndex(-1);
                 cell.getSkin().dispose();
+                cell.setSkin(null);
             }
             cellsMap.clear();
         }
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TextAreaSkin.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TextAreaSkin.java	Fri Mar 14 09:02:45 2014 -0700
@@ -807,9 +807,12 @@
 
         super.layoutChildren(x,y,w,h);
 
+        // Hide the scrollbars if the viewport is too small to show
+        // even the minimum amount of text (one character by default).
         Bounds bounds = scrollPane.getViewportBounds();
-        if (bounds != null && (bounds.getWidth() < contentView.minWidth(-1) ||
-                               bounds.getHeight() < contentView.minHeight(-1))) {
+        if (bounds != null && bounds.getWidth() > 0 && bounds.getHeight() > 0 &&
+            (bounds.getWidth() < contentView.minWidth(-1) ||
+             bounds.getHeight() < contentView.minHeight(-1))) {
             scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
             scrollPane.setVbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
         }
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TitledPaneSkin.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/TitledPaneSkin.java	Fri Mar 14 09:02:45 2014 -0700
@@ -240,7 +240,9 @@
     }
 
     @Override protected double computeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) {
-        return computePrefWidth(height, topInset, rightInset, bottomInset, leftInset);
+        double titleWidth = snapSize(titleRegion.prefWidth(height));
+        double contentWidth = snapSize(contentContainer.minWidth(height));
+        return Math.max(titleWidth, contentWidth) + leftInset + rightInset;
     }
 
     @Override protected double computeMinHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ToolBarSkin.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ToolBarSkin.java	Fri Mar 14 09:02:45 2014 -0700
@@ -29,6 +29,8 @@
 import java.util.Collections;
 import java.util.List;
 
+import com.sun.javafx.scene.traversal.Algorithm;
+import com.sun.javafx.scene.traversal.ParentTraversalEngine;
 import javafx.beans.property.ObjectProperty;
 import javafx.beans.property.DoubleProperty;
 import javafx.beans.value.ChangeListener;
@@ -45,6 +47,7 @@
 import javafx.geometry.Side;
 import javafx.geometry.VPos;
 import javafx.scene.Node;
+import javafx.scene.Parent;
 import javafx.scene.control.ContextMenu;
 import javafx.scene.control.MenuItem;
 import javafx.scene.control.CustomMenuItem;
@@ -72,7 +75,7 @@
 import com.sun.javafx.scene.traversal.TraverseListener;
 import javafx.css.Styleable;
 
-public class ToolBarSkin extends BehaviorSkinBase<ToolBar, ToolBarBehavior> implements TraverseListener {
+public class ToolBarSkin extends BehaviorSkinBase<ToolBar, ToolBarBehavior> {
 
     private Pane box;
     private ToolBarOverflowMenu overflowMenu;
@@ -83,8 +86,7 @@
     private double savedPrefHeight = 0;
     private ObservableList<MenuItem> overflowMenuItems;
     private boolean needsUpdate = false;
-    private TraversalEngine engine;
-    private Direction direction;
+    private final ParentTraversalEngine engine;
 
     public ToolBarSkin(ToolBar toolbar) {
         super(toolbar, new ToolBarBehavior(toolbar));
@@ -92,22 +94,74 @@
         initialize();
         registerChangeListener(toolbar.orientationProperty(), "ORIENTATION");
 
-        engine = new TraversalEngine(getSkinnable(), false) {
-            @Override public boolean trav(Node owner, Direction dir) {
-                // This allows the right arrow to select the overflow menu
-                // without it only the tab key can select the overflow menu.
+        engine = new ParentTraversalEngine(getSkinnable(), new Algorithm() {
+
+
+            @Override
+            public Node select(Node owner, Direction dir, TraversalEngine engine) {
+                final ObservableList<Node> boxChildren = box.getChildren();
+                if (owner == overflowMenu) {
+                    if (dir.isForward(overflowMenu.getEffectiveNodeOrientation())) {
+                        return null;
+                    } else {
+                        for (int i = boxChildren.size() - 1; i >= 0; --i) {
+                            Node n = box.getChildren().get(i);
+                            if (n.isFocusTraversable() && !n.isDisabled() && n.impl_isTreeVisible()) {
+                                return n;
+                            }
+                        }
+                    }
+                }
+                int idx = boxChildren.indexOf(owner);
+                if (dir.isForward(overflowMenu.getEffectiveNodeOrientation())) {
+                    for (int i = idx + 1; i < boxChildren.size(); ++i) {
+                        Node n = box.getChildren().get(i);
+                        if (n.isFocusTraversable() && !n.isDisabled() && n.impl_isTreeVisible()) {
+                            return n;
+                        }
+                    }
+                    if (overflow) {
+                        overflowMenu.requestFocus();
+                        return overflowMenu;
+                    }
+                } else {
+                    for (int i = idx - 1; i >= 0; --i) {
+                        Node n = box.getChildren().get(i);
+                        if (n.isFocusTraversable() && !n.isDisabled() && n.impl_isTreeVisible()) {
+                            return n;
+                        }
+                    }
+                }
+                return null;
+            }
+
+            @Override
+            public Node selectFirst(TraversalEngine engine) {
+                final ObservableList<Node> boxChildren = box.getChildren();
+                for (int i = 0; i < boxChildren.size(); ++i) {
+                    Node n = box.getChildren().get(i);
+                    if (n.isFocusTraversable() && !n.isDisabled() && n.impl_isTreeVisible()) {
+                        return n;
+                    }
+                }
+                return null;
+            }
+
+            @Override
+            public Node selectLast(TraversalEngine engine) {
                 if (overflow) {
-                    engine.reg(overflowMenu);
+                    return overflowMenu;
                 }
-                direction = dir;
-                boolean result = super.trav(owner, dir);
-                if (overflow) {
-                    engine.unreg(overflowMenu);
+                final ObservableList<Node> boxChildren = box.getChildren();
+                for (int i = boxChildren.size() - 1; i >= 0; --i) {
+                    Node n = box.getChildren().get(i);
+                    if (n.isFocusTraversable() && !n.isDisabled() && n.impl_isTreeVisible()) {
+                        return n;
+                    }
                 }
-                return result;
+                return null;
             }
-        };
-        engine.addTraverseListener(this);
+        });
         getSkinnable().setImpl_traversalEngine(engine);
 
         toolbar.focusedProperty().addListener(new ChangeListener<Boolean>() {
@@ -457,7 +511,10 @@
             } else {
                 if (node.isFocused()) {
                     if (!box.getChildren().isEmpty()) {
-                        engine.registeredNodes.get(engine.registeredNodes.size() - 1).requestFocus();
+                        Node last = engine.selectLast();
+                        if (last != null) {
+                            last.requestFocus();
+                        }
                     } else {
                         overflowMenu.requestFocus();                        
                     }
@@ -473,22 +530,15 @@
         // Check if we overflowed.
         overflow = overflowMenuItems.size() > 0;
         if (!overflow && overflowMenu.isFocused()) {
-            engine.registeredNodes.get(engine.registeredNodes.size() - 1).requestFocus();
+            Node last = engine.selectLast();
+            if (last != null) {
+                last.requestFocus();
+            }
         }
         overflowMenu.setVisible(overflow);
         overflowMenu.setManaged(overflow);
     }
 
-    @Override
-    public void onTraverse(Node node, Bounds bounds) {
-        int index = engine.registeredNodes.indexOf(node);
-        if (index == -1 && direction.equals(Direction.NEXT)) {
-            if (overflow) {
-                overflowMenu.requestFocus();
-            }
-        }
-    }
-
     class ToolBarOverflowMenu extends StackPane {
         private StackPane downArrow;
         private ContextMenu popup;
@@ -496,6 +546,7 @@
 
         public ToolBarOverflowMenu(ObservableList<MenuItem> items) {
             getStyleClass().setAll("tool-bar-overflow-button");
+            setFocusTraversable(true);
             this.menuItems = items;
             downArrow = new StackPane();
             downArrow.getStyleClass().setAll("arrow");
@@ -519,10 +570,12 @@
                             popup.getItems().addAll(menuItems);
                             popup.show(downArrow, Side.BOTTOM, 0, 0);
                         }
+                        ke.consume();
                     } else if (KeyCode.ESCAPE.equals(ke.getCode())) {
                         if (popup.isShowing()) {
                             popup.hide();
                         }
+                        ke.consume();
                     } else if (KeyCode.ENTER.equals(ke.getCode())) {
                         if (popup.isShowing()) {
                             popup.hide();
@@ -531,35 +584,8 @@
                             popup.getItems().addAll(menuItems);
                             popup.show(downArrow, Side.BOTTOM, 0, 0);
                         }
-                    } else {
-                        boolean isRTL = getEffectiveNodeOrientation() == NodeOrientation.RIGHT_TO_LEFT;
-                        boolean leftAction = KeyCode.LEFT.equals(ke.getCode());
-                        boolean rightAction = KeyCode.RIGHT.equals(ke.getCode()) || KeyCode.TAB.equals(ke.getCode());
-                        if (isRTL) {
-                            boolean swap = leftAction;
-                            leftAction = rightAction;
-                            rightAction = swap;
-                        }
-                        if (KeyCode.UP.equals(ke.getCode()) || leftAction ||
-                            (KeyCode.TAB.equals(ke.getCode()) && ke.isShiftDown())) {
-                            if (engine.registeredNodes.isEmpty()) {
-                                return;
-                            }
-                            int index = box.getChildren().indexOf(engine.registeredNodes.get(engine.registeredNodes.size() - 1));
-                            if (index != -1) {
-                                box.getChildren().get(index).requestFocus();                            
-                            } else {
-                                if (!box.getChildren().isEmpty()) {
-                                    box.getChildren().get(0).requestFocus();
-                                } else {
-                                    new TraversalEngine(getSkinnable(), false).trav(getSkinnable(), Direction.PREVIOUS);
-                                }
-                            }
-                        } else if (KeyCode.DOWN.equals(ke.getCode()) || rightAction) {                        
-                            new TraversalEngine(getSkinnable(), false).trav(getSkinnable(), Direction.NEXT);
-                        }
+                        ke.consume();
                     }
-                    ke.consume();
                 }
             });
 
--- a/modules/controls/src/main/java/javafx/scene/chart/AreaChart.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/chart/AreaChart.java	Fri Mar 14 09:02:45 2014 -0700
@@ -395,7 +395,6 @@
     }
     private void updateDefaultColorIndex(final Series<X,Y> series) {
         int clearIndex = seriesColorMap.get(series);
-        colorBits.clear(clearIndex);
         Path seriesLine = (Path)((Group)series.getNode()).getChildren().get(1);
         Path fillPath = (Path)((Group)series.getNode()).getChildren().get(0);
         if (seriesLine != null) {
@@ -404,14 +403,12 @@
         if (fillPath != null) {
             fillPath.getStyleClass().remove(DEFAULT_COLOR+clearIndex);
         }
-        colorBits.clear(clearIndex);
         for (int j=0; j < series.getData().size(); j++) {
             final Node node = series.getData().get(j).getNode();
             if(node!=null) {
                 node.getStyleClass().remove(DEFAULT_COLOR+clearIndex);
             }
         }
-        seriesColorMap.remove(series);
     }
     @Override protected  void seriesRemoved(final Series<X,Y> series) {
         updateDefaultColorIndex(series);
--- a/modules/controls/src/main/java/javafx/scene/chart/BarChart.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/chart/BarChart.java	Fri Mar 14 09:02:45 2014 -0700
@@ -543,15 +543,12 @@
      
     private void updateDefaultColorIndex(final Series<X,Y> series) {
         int clearIndex = seriesColorMap.get(series);
-        colorBits.clear(clearIndex);
         for (Data<X,Y> d : series.getData()) {
             final Node bar = d.getNode();
             if (bar != null) {
                 bar.getStyleClass().remove(DEFAULT_COLOR+clearIndex);
-                colorBits.clear(clearIndex);
             }
         }
-        seriesColorMap.remove(series);
     }
 
     private Node createBar(Series series, int seriesIndex, final Data item, int itemIndex) {
--- a/modules/controls/src/main/java/javafx/scene/chart/LineChart.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/chart/LineChart.java	Fri Mar 14 09:02:45 2014 -0700
@@ -396,7 +396,6 @@
     }
     private void updateDefaultColorIndex(final Series<X,Y> series) {
         int clearIndex = seriesColorMap.get(series);
-        colorBits.clear(clearIndex);
         series.getNode().getStyleClass().remove(DEFAULT_COLOR+clearIndex);
         for (int j=0; j < series.getData().size(); j++) {
             final Node node = series.getData().get(j).getNode();
@@ -404,7 +403,6 @@
                 node.getStyleClass().remove(DEFAULT_COLOR+clearIndex);
             }
         }
-        seriesColorMap.remove(series);
     }
 
     @Override protected  void seriesRemoved(final Series<X,Y> series) {
--- a/modules/controls/src/main/java/javafx/scene/chart/XYChart.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/chart/XYChart.java	Fri Mar 14 09:02:45 2014 -0700
@@ -88,9 +88,9 @@
     // -------------- PRIVATE FIELDS -----------------------------------------------------------------------------------
 
     // to indicate which colors are being used for the series
-    BitSet colorBits = new BitSet(8);
+    private final BitSet colorBits = new BitSet(8);
     static String DEFAULT_COLOR = "default-color";
-    Map<Series, Integer> seriesColorMap = new HashMap<Series, Integer>();
+    final Map<Series, Integer> seriesColorMap = new HashMap<Series, Integer>();
     private boolean rangeValid = false;
     private final Line verticalZeroLine = new Line();
     private final Line horizontalZeroLine = new Line();
@@ -115,6 +115,8 @@
                     series.setToRemove = true;
                     series.setChart(null);
                     seriesRemoved(series);
+                    int idx = seriesColorMap.remove(series);
+                    colorBits.clear(idx);
 //                    seriesDefaultColorIndex --;
                 }
                 for(int i=c.getFrom(); i<c.getTo() && !c.wasPermutated(); i++) {
@@ -1477,6 +1479,7 @@
 
         private final ListChangeListener<Data<X,Y>> dataChangeListener = new ListChangeListener<Data<X, Y>>() {
             @Override public void onChanged(Change<? extends Data<X, Y>> c) {
+                final XYChart<X, Y> chart = getChart();
                 while (c.next()) {
                     // RT-25187 Probably a sort happened, just reorder the pointers and return.
                     if (c.wasPermutated()) {
@@ -1504,7 +1507,7 @@
                     if (c.getAddedSize() > 0) {
                         for (Data<X,Y> itemPtr = begin; itemPtr != null; itemPtr = itemPtr.next) {
                             if (itemPtr.setToRemove) {
-                                getChart().dataBeingRemovedIsAdded(itemPtr, Series.this);
+                                if (chart != null) chart.dataBeingRemovedIsAdded(itemPtr, Series.this);
                                 itemPtr.setToRemove = false;
                             }
                         }
@@ -1542,7 +1545,6 @@
                         }
                     }
                     // inform chart
-                    XYChart<X,Y> chart = getChart();
                     if(chart!=null) chart.dataItemsChanged(Series.this,
                             (List<Data<X,Y>>)c.getRemoved(), c.getFrom(), c.getTo(), c.wasPermutated());
                 }
--- a/modules/controls/src/main/java/javafx/scene/control/ContextMenu.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/ContextMenu.java	Fri Mar 14 09:02:45 2014 -0700
@@ -243,7 +243,6 @@
     // TODO provide more detail
      public void show(Node anchor, Side side, double dx, double dy) {
         if (anchor == null) return;
-        Event.fireEvent(this, new Event(Menu.ON_SHOWING));
         if (getItems().size() == 0) return;
 
         getScene().setNodeOrientation(anchor.getEffectiveNodeOrientation());
@@ -269,14 +268,13 @@
      */
     public void show(Node anchor, double screenX, double screenY) {
         if (anchor == null) return;
-        Event.fireEvent(this, new Event(Menu.ON_SHOWING));
         if (getItems().size() == 0) return;
-
         getScene().setNodeOrientation(anchor.getEffectiveNodeOrientation());
         doShow(anchor, screenX, screenY);
     }
 
     private void doShow(Node anchor, double screenX, double screenY) {
+        Event.fireEvent(this, new Event(Menu.ON_SHOWING));
         if(isImpl_showRelativeToWindow()) {
             final Scene scene = (anchor == null) ? null : anchor.getScene();
             final Window win = (scene == null) ? null : scene.getWindow();
--- a/modules/controls/src/main/java/javafx/scene/control/MenuBar.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/MenuBar.java	Fri Mar 14 09:02:45 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2014, 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
@@ -104,6 +104,11 @@
 
     /**
      * Use the system menu bar if the current platform supports it.
+     *
+     * This should not be set on more than one MenuBar instance per
+     * Stage. If this property is set to true on more than one
+     * MenuBar in the same Stage, then the behavior is undefined.
+     *
      * @since JavaFX 2.1
      */
     public final BooleanProperty useSystemMenuBarProperty() {
--- a/modules/controls/src/main/java/javafx/scene/control/TitledPane.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/TitledPane.java	Fri Mar 14 09:02:45 2014 -0700
@@ -33,6 +33,7 @@
 import javafx.beans.property.BooleanPropertyBase;
 import javafx.beans.property.ObjectProperty;
 import javafx.beans.property.SimpleObjectProperty;
+import javafx.geometry.Orientation;
 import javafx.scene.Node;
 
 import javafx.css.PseudoClass;
@@ -335,4 +336,9 @@
         return getClassCssMetaData();
     }
 
+    @Override
+    public Orientation getContentBias() {
+        final Node c = getContent();
+        return c == null ? super.getContentBias() : c.getContentBias();
+    }
 }
--- a/modules/controls/src/test/java/javafx/scene/chart/XYChartTest.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/controls/src/test/java/javafx/scene/chart/XYChartTest.java	Fri Mar 14 09:02:45 2014 -0700
@@ -43,6 +43,7 @@
 import javafx.stage.Stage;
 import org.junit.Assert;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertSame;
 
 
 public class XYChartTest extends ChartTestBase {
@@ -134,4 +135,27 @@
         assertEquals(0, areachart.getLegend().prefHeight(-1), 0);            
         assertEquals(0, areachart.getLegend().prefWidth(-1), 0);            
     }
+
+
+    @Test public void canModifySeriesWithoutChart() {
+        XYChart.Series series = new XYChart.Series();
+
+        ObservableList<XYChart.Data> dataList1 = FXCollections.observableArrayList();
+        dataList1.add(new XYChart.Data(0, 1));
+        dataList1.add(new XYChart.Data(1, 2));
+        dataList1.add(new XYChart.Data(2, 3));
+
+        series.setData(dataList1);
+
+        assertSame(dataList1, series.getData());
+
+        ObservableList<XYChart.Data> dataList2 = FXCollections.observableArrayList();
+        dataList2.add(new XYChart.Data(0, 3));
+        dataList2.add(new XYChart.Data(1, 2));
+        dataList2.add(new XYChart.Data(2, 1));
+
+        series.setData(dataList2);
+
+        assertSame(dataList2, series.getData());
+    }
 }
--- a/modules/fxml/src/main/java/com/sun/javafx/fxml/annotation/FXMLAnnotationProcessor.java	Wed Mar 12 09:12:18 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 2010, 2014, 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.fxml.annotation;
-
-import java.util.Set;
-import javafx.fxml.FXML;
-import javax.annotation.processing.AbstractProcessor;
-import javax.annotation.processing.RoundEnvironment;
-import javax.annotation.processing.SupportedAnnotationTypes;
-import javax.annotation.processing.SupportedSourceVersion;
-import javax.lang.model.SourceVersion;
-import javax.lang.model.element.Element;
-import javax.lang.model.element.ExecutableElement;
-import javax.lang.model.element.Modifier;
-import javax.lang.model.element.TypeElement;
-import javax.lang.model.element.VariableElement;
-import javax.lang.model.util.SimpleElementVisitor8;
-import javax.tools.Diagnostic;
-
-@SupportedAnnotationTypes("javafx.fxml.FXML")
-@SupportedSourceVersion(SourceVersion.RELEASE_8)
-public class FXMLAnnotationProcessor extends AbstractProcessor{
-
-    @Override
-    public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
-        if (annotations.isEmpty()) {
-            return false;
-        }
-        Set<? extends Element> annotatedElements = roundEnv.getElementsAnnotatedWith(FXML.class);
-        for (Element e : annotatedElements) {
-            e.accept(new SimpleElementVisitor8<Void, Void>() {
-
-                @Override
-                public Void visitExecutable(ExecutableElement e, Void p) {
-                    checkModifiers(e, e.getModifiers());
-                    return null;
-                }
-
-                @Override
-                public Void visitVariable(VariableElement e, Void p) {
-                    checkModifiers(e, e.getModifiers());
-                    return null;
-                }
-
-                private void checkModifiers(Element e, Set<Modifier> modifiers) {
-                    for (Modifier m : modifiers) {
-                        final String mod = m.name().toLowerCase();
-                        final String type = e.getKind().name().toLowerCase();
-                        switch(m) {
-                            case NATIVE:
-                            case STATIC:
-                            case FINAL:
-                                processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR,
-                                        "@FXML annotation cannot be used with "
-                                        + mod + " " + type, e);
-                                break;
-                        }
-                    }
-
-                }
-
-            }, null);
-        }
-        return true;
-    }
-    
-}
--- a/modules/fxml/src/main/resources/META-INF/services/javax.annotation.processing.Processor	Wed Mar 12 09:12:18 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-com.sun.javafx.fxml.annotation.FXMLAnnotationProcessor
-
--- a/modules/graphics/src/main/java/com/sun/javafx/image/impl/ByteGray.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/graphics/src/main/java/com/sun/javafx/image/impl/ByteGray.java	Fri Mar 14 09:02:45 2014 -0700
@@ -38,13 +38,13 @@
     public static final BytePixelGetter getter = Getter.instance;
 
     public static final ByteToBytePixelConverter ToByteBgraConverter =
-        ByteRgb.ToByteBgrfConv.nonpremult;
+        ByteGray.ToByteBgrfConv.nonpremult;
     public static final ByteToBytePixelConverter ToByteBgraPreConverter =
-        ByteRgb.ToByteBgrfConv.premult;
+        ByteGray.ToByteBgrfConv.premult;
     public static final ByteToIntPixelConverter ToIntArgbConverter =
-        ByteRgb.ToIntFrgbConv.nonpremult;
+        ByteGray.ToIntFrgbConv.nonpremult;
     public static final ByteToIntPixelConverter ToIntArgbPreConverter =
-        ByteRgb.ToIntFrgbConv.premult;
+        ByteGray.ToIntFrgbConv.premult;
 
     static class Getter implements BytePixelGetter {
         static final BytePixelGetter instance = new Getter();
@@ -142,7 +142,7 @@
             new ToIntFrgbConv(IntArgbPre.setter);
 
         private ToIntFrgbConv(IntPixelSetter setter) {
-            super(ByteRgb.getter, setter);
+            super(ByteGray.getter, setter);
         }
 
         @Override
--- a/modules/graphics/src/main/java/com/sun/javafx/scene/traversal/Algorithm.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/graphics/src/main/java/com/sun/javafx/scene/traversal/Algorithm.java	Fri Mar 14 09:02:45 2014 -0700
@@ -34,6 +34,10 @@
      * Traverse from origin, in direction dir.
      * Return a the new target Node or null if no suitable target is found.
      */
-    public Node traverse(Node owner, Direction dir, TraversalEngine engine);
+    public Node select(Node owner, Direction dir, TraversalEngine engine);
+
+    public Node selectFirst(TraversalEngine engine);
+
+    public Node selectLast(TraversalEngine engine);
     
 }
--- a/modules/graphics/src/main/java/com/sun/javafx/scene/traversal/ContainerTabOrder.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/graphics/src/main/java/com/sun/javafx/scene/traversal/ContainerTabOrder.java	Fri Mar 14 09:02:45 2014 -0700
@@ -38,19 +38,11 @@
 
 public class ContainerTabOrder implements Algorithm {
 
-    PlatformLogger focusLogger;
-
     ContainerTabOrder() {
-        focusLogger = Logging.getFocusLogger();
     }
 
-    public Node traverse(Node node, Direction dir, TraversalEngine engine) {
+    public Node select(Node node, Direction dir, TraversalEngine engine) {
         Node newNode = null;
-
-        if (focusLogger.isLoggable(Level.FINER)) {
-            focusLogger.finer("old focus owner : "+node+", bounds : "+engine.getBounds(node));
-        }
-
         if (NEXT.equals(dir)) {
             newNode = TabOrderHelper.findNextFocusablePeer(node);
         }
@@ -59,37 +51,34 @@
         }
         else if (UP.equals(dir) || DOWN.equals(dir) || LEFT.equals(dir) || RIGHT.equals(dir) ) {
             List<Node> nodes = engine.getAllTargetNodes();
-            List<Bounds> bounds = engine.getTargetBounds(nodes);
 
-            int target = trav2D(engine.getBounds(node), dir, bounds);
+            int target = trav2D(engine.getSceneLayoutBounds(node), dir, nodes, engine);
             if (target != -1) {
                 newNode = nodes.get(target);
             }
-            nodes.clear();
-            bounds.clear();
-
-        }
-
-        if (focusLogger.isLoggable(Level.FINER)) {
-            if (newNode != null) {
-                focusLogger.finer("new focus owner : "+newNode+", bounds : "+engine.getBounds(newNode));
-            }
-            else {
-                focusLogger.finer("no focus transfer");
-            }
         }
 
         return newNode;
     }
 
-    private int trav2D(Bounds origin, Direction dir, List<Bounds> targets) {
+    @Override
+    public Node selectFirst(TraversalEngine engine) {
+        return TabOrderHelper.getFirstTargetNode(engine.getRoot());
+    }
+
+    @Override
+    public Node selectLast(TraversalEngine engine) {
+        return TabOrderHelper.getLastTargetNode(engine.getRoot());
+    }
+
+    private int trav2D(Bounds origin, Direction dir, List<Node> peers, TraversalEngine engine) {
 
         Bounds bestBounds = null;
         double bestMetric = 0.0;
         int bestIndex = -1;
 
-        for (int i = 0; i < targets.size(); i++) {
-            final Bounds targetBounds = targets.get(i);
+        for (int i = 0; i < peers.size(); i++) {
+            final Bounds targetBounds = engine.getSceneLayoutBounds(peers.get(i));
             final double outd = outDistance(dir, origin, targetBounds);
             final double metric;
 
--- a/modules/graphics/src/main/java/com/sun/javafx/scene/traversal/Direction.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/graphics/src/main/java/com/sun/javafx/scene/traversal/Direction.java	Fri Mar 14 09:02:45 2014 -0700
@@ -25,13 +25,36 @@
 
 package com.sun.javafx.scene.traversal;
 
+import javafx.geometry.NodeOrientation;
+
 public enum Direction {
     
-    UP,
-    DOWN,
-    LEFT,
-    RIGHT,
-    NEXT,
-    PREVIOUS
-    
+    UP(false),
+    DOWN(true),
+    LEFT(false),
+    RIGHT(true),
+    NEXT(true),
+    PREVIOUS(false);
+    private final boolean forward;
+
+    Direction(boolean forward) {
+        this.forward = forward;
+    }
+
+    public boolean isForward() {
+        return forward;
+    }
+
+    public boolean isForward(NodeOrientation orientation) {
+        switch(this) {
+            case LEFT:
+            case RIGHT:
+            case NEXT:
+            case PREVIOUS:
+                return forward ^ (orientation == NodeOrientation.RIGHT_TO_LEFT);
+            default:
+                return forward;
+        }
+
+    }
 }
--- a/modules/graphics/src/main/java/com/sun/javafx/scene/traversal/Hueristic2D.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/graphics/src/main/java/com/sun/javafx/scene/traversal/Hueristic2D.java	Fri Mar 14 09:02:45 2014 -0700
@@ -44,22 +44,15 @@
 
 public class Hueristic2D implements Algorithm {
 
-    PlatformLogger focusLogger;
-
     Hueristic2D() {
-        focusLogger = Logging.getFocusLogger();
     }
 
     @Override
-    public Node traverse(Node node, Direction dir, TraversalEngine engine) {
+    public Node select(Node node, Direction dir, TraversalEngine engine) {
         Node newNode = null;
 
         cacheTraversal(node, dir, engine);
 
-        if (focusLogger.isLoggable(Level.FINER)) {
-            focusLogger.finer("old focus owner : "+node+", bounds : "+engine.getBounds(node));
-        }
-
         if (NEXT.equals(dir)) {
             newNode = TabOrderHelper.findNextFocusablePeer(node);
         }
@@ -99,15 +92,6 @@
             }
         }
 
-        if (focusLogger.isLoggable(Level.FINER)) {
-            if (newNode != null) {
-                focusLogger.finer("new focus owner : "+newNode+", bounds : "+engine.getBounds(newNode));
-            }
-            else {
-                focusLogger.finer("no focus transfer");
-            }
-        }
-
         /*
         ** newNode will be null if there are no
         ** possible targets in the direction.
@@ -122,6 +106,16 @@
         return newNode;
     }
 
+    @Override
+    public Node selectFirst(TraversalEngine engine) {
+        return TabOrderHelper.getFirstTargetNode(engine.getRoot());
+    }
+
+    @Override
+    public Node selectLast(TraversalEngine engine) {
+        return TabOrderHelper.getLastTargetNode(engine.getRoot());
+    }
+
     private boolean isOnAxis(Direction dir, Bounds cur, Bounds tgt) {
 
         final double cmin, cmax, tmin, tmax;
@@ -474,30 +468,6 @@
             nearestNodeAverage.originLeftCornerDistance = originLeftCorner2D.distance(nearestNodeAverage.bounds.getMinX(), ySideInOpositeDirection.apply(nearestNodeAverage.bounds));
         }
 
-        if (focusLogger.isLoggable(Level.FINER)) {
-            if (nearestNodeOriginSimple2D != null) {
-                focusLogger.finer("nearestNodeOriginSimple2D.node : "+nearestNodeOriginSimple2D.node);
-            }
-            if (nearestNodeCurrentSimple2D != null) {
-                focusLogger.finer("nearestNodeCurrentSimple2D.node : "+nearestNodeCurrentSimple2D.node);
-            }
-            if (nearestNodeOnOriginX != null) {
-                focusLogger.finer("nearestNodeOnOriginX.node : "+nearestNodeOnOriginX.node);
-            }
-            if (nearestNodeOnCurrentX != null) {
-                focusLogger.finer("nearestNodeOnCurrentX.node : "+nearestNodeOnCurrentX.node);
-            }
-            if (nearestNodeAverage != null) {
-                focusLogger.finer("nearestNodeAverageUp.node : "+nearestNodeAverage.node);
-            }
-            if (nearestNodeLeft != null) {
-                focusLogger.finer("nearestNodeTopLeft.node : "+nearestNodeLeft.node);
-            }
-            if (nearestNodeAnythingAnywhere != null) {
-                focusLogger.finer("nearestNodeAnythingAnywhereUp.node : "+nearestNodeAnythingAnywhere.node);
-            }
-        }
-
         if (nearestNodeOnOriginX != null) {
             /*
             ** there's a preference, all else being equal, to return nearestNodeOnOriginX
@@ -805,30 +775,6 @@
             traversalNodeStack.clear();
         }
 
-        if (focusLogger.isLoggable(Level.FINER)) {
-            if (nearestNodeOriginSimple2D != null) {
-                focusLogger.finer("nearestNodeOriginSimple2D.node : "+nearestNodeOriginSimple2D.node);
-            }
-            if (nearestNodeCurrentSimple2D != null) {
-                focusLogger.finer("nearestNodeCurrentSimple2D.node : "+nearestNodeCurrentSimple2D.node);
-            }
-            if (nearestNodeOnOriginY != null) {
-                focusLogger.finer("nearestNodeOnOriginY.node : "+nearestNodeOnOriginY.node);
-            }
-            if (nearestNodeOnCurrentY != null) {
-                focusLogger.finer("nearestNodeOnCurrentY.node : "+nearestNodeOnCurrentY.node);
-            }
-            if (nearestNodeAverage != null) {
-                focusLogger.finer("nearestNodeAverageLeft.node : "+nearestNodeAverage.node);
-            }
-            if (nearestNodeTopLeft != null) {
-                focusLogger.finer("nearestNodeTopLeft.node : "+nearestNodeTopLeft.node);
-            }
-            if (nearestNodeAnythingAnywhereLeft != null) {
-                focusLogger.finer("nearestNodeAnythingAnywhereLeft.node : "+nearestNodeAnythingAnywhereLeft.node);
-            }
-        }
-
         if (nearestNodeOnOriginY != null) {
             /*
              ** there's a preference, all else being equal, to return nearestNodeOnOriginY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/graphics/src/main/java/com/sun/javafx/scene/traversal/ParentTraversalEngine.java	Fri Mar 14 09:02:45 2014 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2011, 2014, 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.scene.traversal;
+
+import javafx.scene.Parent;
+
+public final class ParentTraversalEngine extends TraversalEngine{
+
+    private final Parent root;
+
+    public ParentTraversalEngine(Parent root, Algorithm algorithm) {
+        super(algorithm);
+        this.root = root;
+    }
+
+    public ParentTraversalEngine(Parent root) {
+        super();
+        this.root = root;
+    }
+
+    @Override
+    protected Parent getRoot() {
+        return root;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/graphics/src/main/java/com/sun/javafx/scene/traversal/SceneTraversalEngine.java	Fri Mar 14 09:02:45 2014 -0700
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2011, 2014, 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.scene.traversal;
+
+import javafx.scene.Parent;
+import javafx.scene.Scene;
+
+public final class SceneTraversalEngine extends TopMostTraversalEngine{
+
+    private final Scene scene;
+
+    public SceneTraversalEngine(Scene scene) {
+        this.scene = scene;
+    }
+
+    protected Parent getRoot() {
+        return scene.getRoot();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/graphics/src/main/java/com/sun/javafx/scene/traversal/SubSceneTraversalEngine.java	Fri Mar 14 09:02:45 2014 -0700
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2011, 2014, 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.scene.traversal;
+
+import javafx.scene.Parent;
+import javafx.scene.SubScene;
+
+public final class SubSceneTraversalEngine extends TopMostTraversalEngine{
+
+    private final SubScene subScene;
+
+    public SubSceneTraversalEngine(SubScene scene) {
+        this.subScene = scene;
+    }
+
+    protected Parent getRoot() {
+        return subScene.getRoot();
+    }
+}
--- a/modules/graphics/src/main/java/com/sun/javafx/scene/traversal/TabOrderHelper.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/graphics/src/main/java/com/sun/javafx/scene/traversal/TabOrderHelper.java	Fri Mar 14 09:02:45 2014 -0700
@@ -33,35 +33,39 @@
 import java.util.List;
 
 final class TabOrderHelper {
-    static Node findPreviousFocusableInList(List<Node> nodeList, int startIndex) {
-        Node newNode = null;
-
+    private static Node findPreviousFocusableInList(List<Node> nodeList, int startIndex) {
         for (int i = startIndex ; i >= 0 ; i--) {
             Node prevNode = nodeList.get(i);
             if (isDisabledOrInvisible(prevNode)) continue;
-
             if (prevNode instanceof javafx.scene.Parent) {
-                List<Node> prevNodesList = ((Parent)prevNode).getChildrenUnmodifiable();
-                if (prevNodesList.size() > 0) {
-                    newNode = findPreviousFocusableInList(prevNodesList, prevNodesList.size()-1);
-                    if (newNode != null) {
-                        break;
+                final ParentTraversalEngine impl_traversalEngine = ((Parent)prevNode).getImpl_traversalEngine();
+                if (impl_traversalEngine!= null && impl_traversalEngine.canTraverse()) {
+                    Node selected = impl_traversalEngine.selectLast();
+                    if (selected != null) {
+                        return selected;
+                    }
+                } else {
+                    List<Node> prevNodesList = ((Parent)prevNode).getChildrenUnmodifiable();
+                    if (prevNodesList.size() > 0) {
+                        Node newNode = findPreviousFocusableInList(prevNodesList, prevNodesList.size()-1);
+                        if (newNode != null) {
+                            return newNode;
+                        }
                     }
                 }
             }
             if (prevNode.isFocusTraversable()) {
-                newNode = prevNode;
-                break;
+                return prevNode;
             }
         }
-        return newNode;
+        return null;
     }
 
     private static boolean isDisabledOrInvisible(Node prevNode) {
         return prevNode.isDisabled() || !prevNode.impl_isTreeVisible();
     }
 
-    static Node findPreviousFocusablePeer(Node node) {
+    public static Node findPreviousFocusablePeer(Node node) {
         Node startNode = node;
         Node newNode = null;
         List<Node> parentNodes = findPeers(startNode);
@@ -103,21 +107,17 @@
 
         // None of the ancestor siblings is traversable, so start from the last traversable item
         if (newNode == null) {
-            Parent parent = null;
             Parent p1 = node.getParent();
-            while (p1 != null) {
-                parent = p1;
+            while (p1 != null && p1.getParent() != null) {
                 p1 = p1.getParent();
             }
-
-            parentNodes = parent.getChildrenUnmodifiable();
-            newNode = findPreviousFocusableInList(parentNodes, parentNodes.size() - 1);
+            newNode =  getLastTargetNode(p1);
         }
 
         return newNode;
     }
 
-    static List<Node> findPeers(Node node) {
+    private static List<Node> findPeers(Node node) {
         List<Node> parentNodes = null;
         Parent parent = node.getParent();
         /*
@@ -129,31 +129,37 @@
         return parentNodes;
     }
 
-    static Node findNextFocusableInList(List<Node> nodeList, int startIndex) {
-        Node newNode = null;
-
+    private static Node findNextFocusableInList(List<Node> nodeList, int startIndex) {
         for (int i = startIndex ; i < nodeList.size() ; i++) {
-
             Node nextNode = nodeList.get(i);
             if (isDisabledOrInvisible(nextNode)) continue;
             if (nextNode.isFocusTraversable()) {
-                newNode = nextNode;
-                break;
+                return nextNode;
             }
             else if (nextNode instanceof Parent) {
+                final ParentTraversalEngine impl_traversalEngine = ((Parent)nextNode).getImpl_traversalEngine();
+                if (impl_traversalEngine!= null && impl_traversalEngine.canTraverse()) {
+                    Node selected = impl_traversalEngine.selectFirst();
+                    if (selected != null) {
+                        return selected;
+                    } else {
+                        // If the Parent has it's own engine, but no selection can be done, skip it
+                        continue;
+                    }
+                }
                 List<Node> nextNodesList = ((Parent)nextNode).getChildrenUnmodifiable();
                 if (nextNodesList.size() > 0) {
-                    newNode = findNextFocusableInList(nextNodesList, 0);
+                    Node newNode = findNextFocusableInList(nextNodesList, 0);
                     if (newNode != null) {
-                        break;
+                        return newNode;
                     }
                 }
             }
         }
-        return newNode;
+        return null;
     }
 
-    static Node findNextFocusablePeer(Node node) {
+    public static Node findNextFocusablePeer(Node node) {
         Node startNode = node;
         Node newNode = null;
 
@@ -162,7 +168,7 @@
             newNode = findNextFocusableInList(((Parent)node).getChildrenUnmodifiable(), 0);
         }
 
-        // Next step is to traverse the siblings "to the right"
+        // Next step is to select the siblings "to the right"
         if (newNode == null) {
             List<Node> parentNodes = findPeers(startNode);
             if (parentNodes == null) {
@@ -195,16 +201,60 @@
 
         // None of the ancestors siblings is traversable, so find the first traversable Node from the root
         if (newNode == null) {
-            Parent parent = null;
             Parent p1 = node.getParent();
-            while (p1 != null) {
-                parent = p1;
+            while (p1 != null && p1.getParent() != null) {
                 p1 = p1.getParent();
             }
-            List<Node> parentNodes = parent.getChildrenUnmodifiable();
-            newNode = findNextFocusableInList(parentNodes, 0);
+            newNode = getFirstTargetNode(p1);
         }
 
         return newNode;
     }
+
+    public static Node getFirstTargetNode(Parent p) {
+        if (p == null || isDisabledOrInvisible(p)) return null;
+        final ParentTraversalEngine impl_traversalEngine = p.getImpl_traversalEngine();
+        if (impl_traversalEngine!= null && impl_traversalEngine.canTraverse()) {
+            Node selected = impl_traversalEngine.selectFirst();
+            if (selected != null) {
+                return selected;
+            }
+        }
+        List<Node> parentsNodes = p.getChildrenUnmodifiable();
+        for (Node n : parentsNodes) {
+            if (isDisabledOrInvisible(n)) continue;;
+            if (n.isFocusTraversable()) {
+                return n;
+            }
+            if (n instanceof Parent) {
+                Node result = getFirstTargetNode((Parent)n);
+                if (result != null) return result;
+            }
+        }
+        return null;
+    }
+
+    public static Node getLastTargetNode(Parent p) {
+        if (p == null || isDisabledOrInvisible(p)) return null;
+        final ParentTraversalEngine impl_traversalEngine = p.getImpl_traversalEngine();
+        if (impl_traversalEngine!= null && impl_traversalEngine.canTraverse()) {
+            Node selected = impl_traversalEngine.selectLast();
+            if (selected != null) {
+                return selected;
+            }
+        }
+        List<Node> parentsNodes = p.getChildrenUnmodifiable();
+        for (int i = parentsNodes.size() - 1; i >= 0; --i) {
+            Node n = parentsNodes.get(i);
+            if (isDisabledOrInvisible(n)) continue;
+            if (n instanceof Parent) {
+                Node result = getLastTargetNode((Parent) n);
+                if (result != null) return result;
+            }
+            if (n.isFocusTraversable() && n.impl_isTreeVisible() && !n.isDisabled()) {
+                return n;
+            }
+        }
+        return null;
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/graphics/src/main/java/com/sun/javafx/scene/traversal/TopMostTraversalEngine.java	Fri Mar 14 09:02:45 2014 -0700
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2011, 2014, 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.scene.traversal;
+
+import com.sun.javafx.application.PlatformImpl;
+import javafx.scene.Node;
+import javafx.scene.Parent;
+import javafx.scene.Scene;
+
+public abstract class TopMostTraversalEngine extends TraversalEngine{
+
+    protected TopMostTraversalEngine() {
+        /*
+         * for 2d behaviour from TAB use :
+         *    algorithm = new WeightedClosestCorner();
+         * for Container sequence TAB behaviour and 2d arrow behaviour use :
+         *    algorithm = new ContainerTabOrder();
+         * for 2D arrow behaviour with a target bias and a stack use :
+         *    algorithm = new Biased2DWithStack();
+         */
+        super(PlatformImpl.isContextual2DNavigation() ? new Hueristic2D() : new ContainerTabOrder());
+    }
+
+    public final Node trav(Node node, Direction dir) {
+        Node newNode = null;
+        Parent p = node.getParent();
+        Node traverseNode = node;
+        while (p != null) {
+            ParentTraversalEngine engine = p.getImpl_traversalEngine();
+            if (engine != null && engine.canTraverse()) {
+                newNode = engine.select(node, dir);
+                if (newNode != null) {
+                    break;
+                } else {
+                    // The inner traversal engine wasn't able to select anything in the specified direction.
+                    // So now we try to traverse from the whole parent (associated with that traversal engine)
+                    // by a traversal engine that's higher in the hierarchy
+                    traverseNode = dir.isForward() ? engine.selectLast() : p;
+                }
+            }
+            p = p.getParent();
+        }
+        if (newNode == null) {
+            newNode = algorithm.select(traverseNode, dir, this);
+        }
+        if (newNode != null) {
+            focusAndNotify(newNode);
+        }
+        return newNode;
+    }
+
+    private void focusAndNotify(Node newNode) {
+        newNode.requestFocus();
+        notifyTreeTraversedTo(newNode);
+    }
+
+    private void notifyTreeTraversedTo(Node newNode) {
+        Parent p = newNode.getParent();
+        while (p != null) {
+            final ParentTraversalEngine impl_traversalEngine = p.getImpl_traversalEngine();
+            if (impl_traversalEngine != null) {
+                impl_traversalEngine.notifyTraversedTo(newNode);
+            }
+            p = p.getParent();
+        }
+        notifyTraversedTo(newNode);
+    }
+
+    public final Node traverseToFirst() {
+        Node n = algorithm.selectFirst(this);
+        if (n != null) focusAndNotify(n);
+        return n;
+    }
+
+
+    public final Node traverseToLast() {
+        Node n = algorithm.selectLast(this);
+        if (n != null) focusAndNotify(n);
+        return n;
+    }
+}
--- a/modules/graphics/src/main/java/com/sun/javafx/scene/traversal/TraversalEngine.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/graphics/src/main/java/com/sun/javafx/scene/traversal/TraversalEngine.java	Fri Mar 14 09:02:45 2014 -0700
@@ -25,162 +25,62 @@
 
 package com.sun.javafx.scene.traversal;
 
-import javafx.application.ConditionalFeature;
 import javafx.geometry.BoundingBox;
 import javafx.geometry.Bounds;
-import javafx.geometry.Point2D;
 import javafx.scene.Node;
 import javafx.scene.Parent;
-import javafx.scene.Scene;
+
 import java.util.ArrayList;
-import java.util.LinkedList;
 import java.util.List;
-import com.sun.javafx.Logging;
-import com.sun.javafx.application.PlatformImpl;
-import sun.util.logging.PlatformLogger;
-import sun.util.logging.PlatformLogger.Level;
 
-public class TraversalEngine {
+public abstract class TraversalEngine {
 
-    private final Algorithm algorithm;
+    protected final Algorithm algorithm;
 
-    private final Parent root;
+    private final Bounds initialBounds =  new BoundingBox(0, 0, 1, 1);
+    final ArrayList<TraverseListener> listeners = new ArrayList<>();
 
-    private final boolean isScene;
-
-    private final Bounds initialBounds;
-
-    public final List<Node> registeredNodes;
-
-    private final List<TraverseListener> listeners;
-
-    PlatformLogger focusLogger;
-
-    protected boolean isScene() {
-        return isScene;
-    }
-    protected Parent getRoot() {
-        return root;
+    protected TraversalEngine(Algorithm algorithm) {
+        this.algorithm = algorithm;
     }
 
-    public TraversalEngine(Parent root, boolean isScene) {
-        this.root = root;
-        this.isScene = isScene;
-        /*
-         * for 2d behaviour from TAB use :
-         *    algorithm = new WeightedClosestCorner();
-         * for Container sequence TAB behaviour and 2d arrow behaviour use :
-         *    algorithm = new ContainerTabOrder();
-         * for 2D arrow behaviour with a target bias and a stack use :
-         *    algorithm = new Biased2DWithStack();
-         */
-        if (PlatformImpl.isContextual2DNavigation()) {
-            algorithm = new Hueristic2D();
-        }
-        else {
-            algorithm = new ContainerTabOrder();
-        }
+    protected TraversalEngine() {
+        this.algorithm = null;
+    }
 
-        initialBounds = new BoundingBox(0, 0, 1, 1);
-        registeredNodes = new ArrayList<Node>();
-        listeners = new LinkedList<TraverseListener>();
-        focusLogger = Logging.getFocusLogger();
-        if (focusLogger.isLoggable(Level.FINER)) {
-            focusLogger.finer("TraversalEngine constructor");
+    public final void addTraverseListener(TraverseListener listener) {
+        listeners.add(listener);
+    }
+
+    void notifyTraversedTo(Node newNode) {
+        for (TraverseListener l : listeners) {
+            l.onTraverse(newNode, getLayoutBounds(newNode, getRoot()));
         }
     }
 
-    public void addTraverseListener(TraverseListener listener) {
-        listeners.add(listener);
+    public final Node select(Node from, Direction dir) {
+        return algorithm.select(from, dir, this);
     }
 
-    public void removeTraverseListener(TraverseListener listener) {
-        listeners.remove(listener);
+    public final Node selectFirst() {
+        return algorithm.selectFirst(this);
     }
 
-    public void reg(Node n) {
-        registeredNodes.add(n);
+    public final Node selectLast() {
+        return algorithm.selectLast(this);
     }
 
-    public void unreg(Node n) {
-        registeredNodes.remove(n);
+    // get all focusable nodes in tree...
+    public final List<Node> getAllTargetNodes() {
+        final List<Node> targetNodes = new ArrayList<>();
+        addFocusableChildrenToList(targetNodes, getRoot());
+        return targetNodes;
     }
 
-    public boolean trav(Node owner, Direction dir) {
-        Node newNode = algorithm.traverse(owner, dir, this);
-        if (newNode == null) {
-            if (focusLogger.isLoggable(Level.FINE)) {
-                focusLogger.fine("new node is null, focus not moved");
-            }
-            return false;
-        } else {
-            if (focusLogger.isLoggable(Level.FINER)) {
-                focusLogger.finer("new focus owner : "+newNode);
-            }
-            newNode.requestFocus();
-            for (TraverseListener listener : listeners) {
-                listener.onTraverse(newNode, getBounds(newNode));
-            }
-            return true;
-        }
-    }
-
-    public int getTopLeftFocusableNode() {
-        List<Node> nodes = getAllTargetNodes();
-        final int target = 0;
-        Point2D zeroZero = new Point2D(0,0);
-
-        if (nodes.size() > 0) {
-            int nodeIndex;
-            Node nearestNode = nodes.get(0);
-            double nearestDistance = zeroZero.distance(getBounds(nodes.get(0)).getMinX(), getBounds(nodes.get(0)).getMinY());
-            double distance;
-
-            for (nodeIndex = 1; nodeIndex < nodes.size(); nodeIndex++) {
-
-                if (focusLogger.isLoggable(Level.FINEST)) {
-                    focusLogger.finest("getTopLeftFocusableNode(), distance : "+zeroZero.distance(getBounds(nodes.get(nodeIndex)).getMinX(), getBounds(nodes.get(nodeIndex)).getMinY())+" to  : "+nodes.get(nodeIndex)+". @ : "+getBounds(nodes.get(nodeIndex)).getMinX()+":"+getBounds(nodes.get(nodeIndex)).getMinY());
-                }
-                distance = zeroZero.distance(getBounds(nodes.get(nodeIndex)).getMinX(), getBounds(nodes.get(nodeIndex)).getMinY());
-                if (nearestDistance > distance) {
-                    nearestDistance = distance;
-                    nearestNode = nodes.get(nodeIndex);
-                }
-
-            }
-            if (focusLogger.isLoggable(Level.FINER)) {
-                focusLogger.finer("getTopLeftFocusableNode(), nearest  : "+nearestNode+", at : "+nearestDistance);
-            }
-
-            nearestNode.requestFocus();
-            for (TraverseListener listener : listeners) {
-                listener.onTraverse(nearestNode, getBounds(nearestNode));
-            }
-
-        }
-        nodes.clear();
-
-        return target;
-    }
-
-
-    // get all focusable nodes in tree...
-    protected List<Node> getAllTargetNodes() {
-        final List<Node> targetNodes = new ArrayList<Node>();
-
-        /*
-        ** get top level container
-        */
-        Scene s = root.getScene();
-
-        addFocusableChildrenToList(targetNodes, s.getRoot());
-        return targetNodes;
-    }
     private void addFocusableChildrenToList(List<Node> list, Parent parent) {
         List<Node> parentsNodes = parent.getChildrenUnmodifiable();
         for (Node n : parentsNodes) {
             if (n.isFocusTraversable() && !n.isFocused() && n.impl_isTreeVisible() && !n.isDisabled()) {
-
                 list.add(n);
             }
             if (n instanceof Parent) {
@@ -189,41 +89,27 @@
         }
     }
 
-    /**
-     * Returns nodes to be processed.
-     */
-    protected List<Node> getContainerTargetNodes() {
-        final List<Node> targetNodes = new ArrayList<Node>();
-        for (Node n : registeredNodes) {
-            if (!n.isFocused() && n.impl_isTreeVisible() && !n.isDisabled()) {
-                targetNodes.add(n);
-            }
-        }
-        return targetNodes;
+    protected abstract Parent getRoot();
+
+    public final Bounds getSceneLayoutBounds(Node n) {
+        return getLayoutBounds(n, null);
     }
 
-    /**
-     * Gets a list of bounds for a list of nodes.
-     */
-    protected List<Bounds> getTargetBounds(List<Node> nodes) {
-        final List<Bounds> targetBounds = new ArrayList<Bounds>();
-        for (Node n : nodes) {
-            targetBounds.add(getBounds(n));
-        }
-        return targetBounds;
+    public final boolean canTraverse() {
+        return algorithm != null;
     }
 
     /**
      * Gets the appropriate bounds for the given node, transformed into
      * the scene's or the traversal root's coordinates.
      */
-    protected Bounds getBounds(Node n) {
+    private Bounds getLayoutBounds(Node n, Parent forParent) {
         final Bounds bounds;
         if (n != null) {
-            if (isScene) {
+            if (forParent == null) {
                 bounds = n.localToScene(n.getLayoutBounds());
             } else {
-                bounds = root.sceneToLocal(n.localToScene(n.getLayoutBounds()));
+                bounds = forParent.sceneToLocal(n.localToScene(n.getLayoutBounds()));
             }
         } else {
             bounds = initialBounds;
--- a/modules/graphics/src/main/java/com/sun/javafx/scene/traversal/WeightedClosestCorner.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/graphics/src/main/java/com/sun/javafx/scene/traversal/WeightedClosestCorner.java	Fri Mar 14 09:02:45 2014 -0700
@@ -27,6 +27,7 @@
 
 import java.util.List;
 import javafx.geometry.Bounds;
+import javafx.geometry.Point2D;
 import javafx.scene.Node;
 import com.sun.javafx.Logging;
 import sun.util.logging.PlatformLogger;
@@ -59,10 +60,8 @@
 
 public class WeightedClosestCorner implements Algorithm {
 
-    PlatformLogger focusLogger;
 
     WeightedClosestCorner() {
-        focusLogger = Logging.getFocusLogger();
     }
 
     private boolean isOnAxis(Direction dir, Bounds cur, Bounds tgt) {
@@ -164,55 +163,69 @@
         return distance;
     }
 
-    public Node traverse(Node node, Direction dir, TraversalEngine engine) {
+    public Node select(Node node, Direction dir, TraversalEngine engine) {
         Node newNode = null;
         List<Node> nodes = engine.getAllTargetNodes();
-        List<Bounds> bounds = engine.getTargetBounds(nodes);
 
-        if (focusLogger.isLoggable(Level.FINER)) {
-            focusLogger.finer("old focus owner : "+node+", bounds : "+engine.getBounds(node));
-        }
-
-        int target = traverse(engine.getBounds(node), dir, bounds);
+        int target = traverse(engine.getSceneLayoutBounds(node), dir, nodes, engine);
         if (target != -1) {
             newNode = nodes.get(target);
-            if (focusLogger.isLoggable(Level.FINER)) {
-                focusLogger.finer("new focus owner : "+newNode+", bounds : "+engine.getBounds(newNode));
-            }
         }
-        else {
-            if (focusLogger.isLoggable(Level.FINER)) {
-                focusLogger.finer("no focus transfer");
-            }
-        }
-
-        nodes.clear();
-        bounds.clear();
 
         return newNode;
     }
 
-    public int traverse(Bounds origin, Direction dir, List<Bounds> targets) {
+    @Override
+    public Node selectFirst(TraversalEngine engine) {
+        List<Node> nodes = engine.getAllTargetNodes();
+        Point2D zeroZero = new Point2D(0,0);
+
+        if (nodes.size() > 0) {
+            int nodeIndex;
+            Node nearestNode = nodes.get(0);
+            double nearestDistance = zeroZero.distance(engine.getSceneLayoutBounds(nodes.get(0)).getMinX(),
+                    engine.getSceneLayoutBounds(nodes.get(0)).getMinY());
+            double distance;
+
+            for (nodeIndex = 1; nodeIndex < nodes.size(); nodeIndex++) {
+                distance = zeroZero.distance(engine.getSceneLayoutBounds(nodes.get(nodeIndex)).getMinX(),
+                        engine.getSceneLayoutBounds(nodes.get(nodeIndex)).getMinY());
+                if (nearestDistance > distance) {
+                    nearestDistance = distance;
+                    nearestNode = nodes.get(nodeIndex);
+                }
+            }
+            return nearestNode;
+        }
+        return null;
+    }
+
+    @Override
+    public Node selectLast(TraversalEngine engine) {
+        return null;
+    }
+
+    public int traverse(Bounds origin, Direction dir, List<Node> targets, TraversalEngine engine) {
 
         final int target;
 
         if (dir == NEXT || dir == PREVIOUS) {
-            target = trav1D(origin, dir, targets);
+            target = trav1D(origin, dir, targets, engine);
         } else {
-            target = trav2D(origin, dir, targets);
+            target = trav2D(origin, dir, targets, engine);
         }
 
         return target;
     }
 
-    private int trav2D(Bounds origin, Direction dir, List<Bounds> targets) {
+    private int trav2D(Bounds origin, Direction dir, List<Node> targets, TraversalEngine engine) {
 
         Bounds bestBounds = null;
         double bestMetric = 0.0;
         int bestIndex = -1;
 
         for (int i = 0; i < targets.size(); i++) {
-            final Bounds targetBounds = targets.get(i);
+            final Bounds targetBounds = engine.getSceneLayoutBounds(targets.get(i));
             final double outd = outDistance(dir, origin, targetBounds);
             final double metric;
 
@@ -281,22 +294,23 @@
         return (dir == NEXT) ? compare1D(a, b) : -compare1D(a, b);
     }
 
-    private int trav1D(Bounds origin, Direction dir, List<Bounds> targets) {
+    private int trav1D(Bounds origin, Direction dir, List<Node> targets, TraversalEngine engine) {
         int bestSoFar = -1;
         int leastSoFar = -1;
 
         for (int i = 0; i < targets.size(); i++) {
             if (leastSoFar == -1 ||
-                    compare1D(targets.get(i), targets.get(leastSoFar), dir) < 0) {
+                    compare1D(engine.getSceneLayoutBounds(targets.get(i)),
+                            engine.getSceneLayoutBounds(targets.get(leastSoFar)), dir) < 0) {
                 leastSoFar = i;
             }
 
-            if (compare1D(targets.get(i), origin, dir) < 0) {
+            if (compare1D(engine.getSceneLayoutBounds(targets.get(i)), origin, dir) < 0) {
                 continue;
             }
 
             if (bestSoFar == -1 ||
-                    compare1D(targets.get(i), targets.get(bestSoFar), dir) < 0) {
+                    compare1D(engine.getSceneLayoutBounds(targets.get(i)), engine.getSceneLayoutBounds(targets.get(bestSoFar)), dir) < 0) {
                 bestSoFar = i;
             }
         }
--- a/modules/graphics/src/main/java/javafx/scene/CssStyleHelper.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/graphics/src/main/java/javafx/scene/CssStyleHelper.java	Fri Mar 14 09:02:45 2014 -0700
@@ -25,11 +25,9 @@
 package javafx.scene;
 
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
@@ -40,8 +38,6 @@
 import javafx.beans.property.ObjectProperty;
 import javafx.beans.property.SimpleObjectProperty;
 import javafx.beans.value.WritableValue;
-import javafx.collections.FXCollections;
-import javafx.collections.ObservableMap;
 import javafx.css.CssMetaData;
 import javafx.css.FontCssMetaData;
 import javafx.css.ParsedValue;
@@ -89,7 +85,7 @@
     /**
      * Creates a new StyleHelper.
      */
-    static CssStyleHelper createStyleHelper(final Node node, WritableValue<Boolean> clearCacheOnReuse, ObservableMap<StyleableProperty<?>, List<Style>> styleObserver) {
+    static CssStyleHelper createStyleHelper(final Node node, WritableValue<Boolean> clearCacheOnReuse) {
 
         // need to know how far we are to root in order to init arrays.
         // TODO: should we hang onto depth to avoid this nonsense later?
@@ -157,28 +153,16 @@
 
             if (mightInherit == false) {
 
+                // If this node had a style helper, then reset properties to their initial value
+                // since the node won't have a style helper after this call
+                if (node.styleHelper != null) {
+                    node.styleHelper.resetToInitialValues(node);
+                }
+
                 //
-                // If there is an observer listening for css style changes, then that listener needs to be
-                // preserved, even if there aren't any changes. At some point in the future, this node might
-                // have styles and the observer should start notifying of changes.
-                //
-                // So, if there isn't an observer listening for css style changes, we can just return null here.
-                // If there is, then we'll fall through and create a new StyleHelper which will be assigned
-                // the current StyleHelper's observer.
-                //
-                if ((styleObserver == null) || (FXCollections.emptyObservableMap() == (ObservableMap)styleObserver)) {
-
-                    // If this node had a style helper, then reset properties to their initial value
-                    // since the node won't have a style helper after this call
-                    if (node.styleHelper != null) {
-                        node.styleHelper.resetToInitialValues(node);
-                    }
-
-                    //
-                    // This node didn't have a StyleHelper before and it doesn't need one now since there are
-                    // no styles in the StyleMap and no inherited styles.
-                    return null;
-                }
+                // This node didn't have a StyleHelper before and it doesn't need one now since there are
+                // no styles in the StyleMap and no inherited styles.
+                return null;
             }
 
         }
@@ -223,9 +207,6 @@
             node.styleHelper.resetToInitialValues(node);
         }
 
-        // Don't lose track of the observer, if any.
-        helper.observableStyleMap = styleObserver;
-
         return helper;
     }
 
@@ -543,23 +524,6 @@
 
     }
 
-    ObservableMap<StyleableProperty<?>, List<Style>> observableStyleMap;
-     /**
-      * RT-17293
-      */
-     ObservableMap<StyleableProperty<?>, List<Style>> getObservableStyleMap() {
-         return (observableStyleMap != null)
-             ? observableStyleMap
-             : FXCollections.<StyleableProperty<?>, List<Style>>emptyObservableMap();
-     }
-
-     /**
-      * RT-17293
-      */
-     void setObservableStyleMap(ObservableMap<StyleableProperty<?>, List<Style>> observableStyleMap) {
-         this.observableStyleMap = observableStyleMap;
-     }
-
     /**
      * Called by the Node whenever it has transitioned from one set of
      * pseudo-class states to another. This function will then lookup the
@@ -648,13 +612,6 @@
             final CssMetaData<Styleable,Object> cssMetaData =
                     (CssMetaData<Styleable,Object>)styleables.get(n);
 
-            if (observableStyleMap != null) {
-                final StyleableProperty styleableProperty = cssMetaData.getStyleableProperty(node);
-                if (styleableProperty != null && observableStyleMap.containsKey(styleableProperty)) {
-                    observableStyleMap.remove(styleableProperty);
-                }
-            }
-
             // Don't bother looking up styles that don't inherit.
             if (inheritOnly && cssMetaData.isInherits() == false) {
                 continue;
@@ -794,12 +751,6 @@
 
                 }
 
-                if (observableStyleMap != null) {
-
-                    List<Style> styleList = getMatchingStyles(node, cssMetaData, true);
-                    observableStyleMap.put(styleableProperty, styleList);
-                }
-
             } catch (Exception e) {
 
                 // RT-27155: if setting value raises exception, reset value
@@ -1972,16 +1923,50 @@
 
 
     /**
-     * Called from CssMetaData getMatchingStyles
+     * Called from Node impl_getMatchingStyles
      * @param node
      * @param styleableProperty
      * @return
      */
-    List<Style> getMatchingStyles(final Styleable node, final CssMetaData styleableProperty) {
-        return getMatchingStyles(node, styleableProperty, false);
+    static List<Style> getMatchingStyles(final Styleable styleable, final CssMetaData styleableProperty) {
+
+        if (!(styleable instanceof Node)) return Collections.<Style>emptyList();
+
+        Node node = (Node)styleable;
+        final CssStyleHelper helper = (node.styleHelper != null) ? node.styleHelper : createStyleHelper(node, null);
+
+        if (helper != null) {
+            return helper.getMatchingStyles(node, styleableProperty, false);
+        }
+        else {
+            return Collections.<Style>emptyList();
+        }
     }
 
-    List<Style> getMatchingStyles(final Styleable node, final CssMetaData styleableProperty, boolean matchState) {
+    static Map<StyleableProperty<?>, List<Style>> getMatchingStyles(Map<StyleableProperty<?>, List<Style>> map, final Node node) {
+
+        final CssStyleHelper helper = (node.styleHelper != null) ? node.styleHelper : createStyleHelper(node, null);
+        if (helper != null) {
+            if (map == null) map = new HashMap<>();
+            for (CssMetaData metaData : node.getCssMetaData()) {
+                List<Style> styleList = helper.getMatchingStyles(node, metaData, true);
+                if (styleList != null && !styleList.isEmpty()) {
+                    StyleableProperty prop = metaData.getStyleableProperty(node);
+                    map.put(prop, styleList);
+                }
+            }
+        }
+
+        if (node instanceof Parent) {
+            for (Node child : ((Parent)node).getChildren()) {
+                map = getMatchingStyles(map, child);
+            }
+        }
+
+        return map;
+    }
+
+    private List<Style> getMatchingStyles(final Styleable node, final CssMetaData styleableProperty, boolean matchState) {
 
         final List<CascadingStyle> styleList = new ArrayList<CascadingStyle>();
 
--- a/modules/graphics/src/main/java/javafx/scene/Node.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/graphics/src/main/java/javafx/scene/Node.java	Fri Mar 14 09:02:45 2014 -0700
@@ -104,6 +104,7 @@
 import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
 import com.sun.javafx.Logging;
 import com.sun.javafx.TempState;
@@ -814,11 +815,8 @@
         if (sceneChanged) {
             updateCanReceiveFocus();
             if (isFocusTraversable()) {
-                if (oldScene != null) {
-                    oldScene.unregisterTraversable(Node.this);
-                }
                 if (newScene != null) {
-                    newScene.registerTraversable(Node.this);
+                    newScene.initializeInternalEventDispatcher();
                 }
             }
             focusSetDirty(oldScene);
@@ -7607,9 +7605,7 @@
                     Scene _scene = getScene();
                     if (_scene != null) {
                         if (get()) {
-                            _scene.registerTraversable(Node.this);
-                        } else {
-                            _scene.unregisterTraversable(Node.this);
+                            _scene.initializeInternalEventDispatcher();
                         }
                         focusSetDirty(_scene);
                     }
@@ -8545,16 +8541,7 @@
      */
      @Deprecated // SB-dependency: RT-21096 has been filed to track this
     public static List<Style> impl_getMatchingStyles(CssMetaData cssMetaData, Styleable styleable) {
-        if (styleable != null && cssMetaData != null && styleable instanceof Node) {
-
-            Node node = (Node)styleable;
-
-            if (node.styleHelper != null) {
-                return node.styleHelper.getMatchingStyles(node, cssMetaData);
-            }
-
-        }
-        return Collections.<Style>emptyList();
+         return CssStyleHelper.getMatchingStyles(styleable, cssMetaData);
     }
 
      /**
@@ -8564,9 +8551,14 @@
       */
      @Deprecated // SB-dependency: RT-21096 has been filed to track this
      public final ObservableMap<StyleableProperty<?>, List<Style>> impl_getStyleMap() {
-         return styleHelper != null
-             ? styleHelper.getObservableStyleMap()
-             : FXCollections.<StyleableProperty<?>, List<Style>>emptyObservableMap();
+         ObservableMap<StyleableProperty<?>, List<Style>> map =
+                 (ObservableMap<StyleableProperty<?>, List<Style>>)getProperties().get("STYLEMAP");
+         Map<StyleableProperty<?>, List<Style>> ret = CssStyleHelper.getMatchingStyles(map, this);
+         if (ret != null) {
+             if (ret instanceof ObservableMap) return (ObservableMap)ret;
+             return FXCollections.observableMap(ret);
+         }
+         return FXCollections.<StyleableProperty<?>, List<Style>>emptyObservableMap();
      }
 
      /**
@@ -8576,19 +8568,27 @@
       */
      @Deprecated // SB-dependency: RT-21096 has been filed to track this
      public final void impl_setStyleMap(ObservableMap<StyleableProperty<?>, List<Style>> styleMap) {
-         //
-         // Node doesn't have a field for this map. Rather, this is held by CssStyleHelper. If this node
-         // doesn't have a styleHelper, then there is nothing to attach the listener to. So a styleHelper has
-         // to be created.
-         //
-         if (styleHelper == null) {
-             styleHelper = CssStyleHelper.createStyleHelper(this, null, styleMap);
-         } else {
-             styleHelper.setObservableStyleMap(styleMap);
-         }
+         if (styleMap != null) getProperties().put("STYLEMAP", styleMap);
+         else getProperties().remove("STYLEMAP");
      }
 
     /**
+     * Find CSS styles that were used to style this Node in its current pseudo-class state. The map will contain the styles from this node and,
+     * if the node is a Parent, its children. The node corresponding to an entry in the Map can be obtained by casting a StyleableProperty key to a
+     * javafx.beans.property.Property and calling getBean(). The List<Style> contains only those styles used to style the property and will contain
+     * styles used to resolve lookup values.
+     *
+     * @param styleMap A Map to be populated with the styles. If null, a new Map will be allocated.
+     * @return The Map populated with matching styles.
+     */
+    @Deprecated // SB-dependency: RT-21096 has been filed to track this
+    public Map<StyleableProperty<?>,List<Style>> impl_findStyles(Map<StyleableProperty<?>,List<Style>> styleMap) {
+
+        Map<StyleableProperty<?>, List<Style>> ret = CssStyleHelper.getMatchingStyles(styleMap, this);
+        return (ret != null) ? ret : Collections.<StyleableProperty<?>, List<Style>>emptyMap();
+    }
+
+    /**
      * Flags used to indicate in which way this node is dirty (or whether it
      * is clean) and what must happen during the next CSS cycle on the
      * scenegraph.
@@ -8891,11 +8891,8 @@
                 return;
             }
 
-            ObservableMap<StyleableProperty<?>, List<Style>> styleObserver =
-                    styleHelper != null ? styleHelper.observableStyleMap : null;
-
             // Match new styles if my own indicates I need to reapply
-            styleHelper = CssStyleHelper.createStyleHelper(this, cacheHint, styleObserver);
+            styleHelper = CssStyleHelper.createStyleHelper(this, cacheHint);
 
         }
 
--- a/modules/graphics/src/main/java/javafx/scene/Parent.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/graphics/src/main/java/javafx/scene/Parent.java	Fri Mar 14 09:02:45 2014 -0700
@@ -25,6 +25,7 @@
 
 package javafx.scene;
 
+import com.sun.javafx.scene.traversal.ParentTraversalEngine;
 import javafx.beans.property.ObjectProperty;
 import javafx.beans.property.ReadOnlyBooleanProperty;
 import javafx.beans.property.ReadOnlyBooleanWrapper;
@@ -733,7 +734,7 @@
     }
 
     /** @treatAsPrivate implementation detail */
-    private javafx.beans.property.ObjectProperty<TraversalEngine> impl_traversalEngine;
+    private javafx.beans.property.ObjectProperty<ParentTraversalEngine> impl_traversalEngine;
 
     /**
      * @treatAsPrivate implementation detail
@@ -741,7 +742,7 @@
      */
     // SB-dependency: RT-21209 has been filed to track this
     @Deprecated
-    public final void setImpl_traversalEngine(TraversalEngine value) {
+    public final void setImpl_traversalEngine(ParentTraversalEngine value) {
         impl_traversalEngineProperty().set(value);
     }
 
@@ -750,7 +751,7 @@
      * @deprecated This is an internal API that is not intended for use and will be removed in the next version
      */
     @Deprecated
-    public final TraversalEngine getImpl_traversalEngine() {
+    public final ParentTraversalEngine getImpl_traversalEngine() {
         return impl_traversalEngine == null ? null : impl_traversalEngine.get();
     }
 
@@ -759,10 +760,10 @@
      * @deprecated This is an internal API that is not intended for use and will be removed in the next version
      */
     @Deprecated
-    public final ObjectProperty<TraversalEngine> impl_traversalEngineProperty() {
+    public final ObjectProperty<ParentTraversalEngine> impl_traversalEngineProperty() {
         if (impl_traversalEngine == null) {
             impl_traversalEngine =
-                    new SimpleObjectProperty<TraversalEngine>(
+                    new SimpleObjectProperty<>(
                             this, "impl_traversalEngine");
         }
         return impl_traversalEngine;
--- a/modules/graphics/src/main/java/javafx/scene/Scene.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/graphics/src/main/java/javafx/scene/Scene.java	Fri Mar 14 09:02:45 2014 -0700
@@ -47,7 +47,8 @@
 import com.sun.javafx.scene.input.InputEventUtils;
 import com.sun.javafx.scene.input.PickResultChooser;
 import com.sun.javafx.scene.traversal.Direction;
-import com.sun.javafx.scene.traversal.TraversalEngine;
+import com.sun.javafx.scene.traversal.SceneTraversalEngine;
+import com.sun.javafx.scene.traversal.TopMostTraversalEngine;
 import com.sun.javafx.sg.prism.NGCamera;
 import com.sun.javafx.sg.prism.NGLightBase;
 import com.sun.javafx.tk.*;
@@ -1055,12 +1056,8 @@
 
                     if (oldRoot != null) {
                         oldRoot.setScenes(null, null);
-                        oldRoot.setImpl_traversalEngine(null);
                     }
                     oldRoot = _value;
-                    if (_value.getImpl_traversalEngine() == null) {
-                        _value.setImpl_traversalEngine(new TraversalEngine(_value, true));
-                    }
                     _value.getStyleClass().add(0, "root");
                     _value.setScenes(Scene.this, null);
                     markDirty(DirtyBits.ROOT_DIRTY);
@@ -1894,80 +1891,16 @@
         return focusDirty;
     }
 
-    /**
-     * This is a map from focusTraversable nodes within this scene
-     * to instances of a traversal engine. The traversal engine is
-     * either the instance for the scene itself, or for a Parent
-     * nested somewhere within this scene.
-     *
-     * This has package access for testing purposes.
-     */
-    Map traversalRegistry; // Map<Node,TraversalEngine>
-
-    /**
-     * Searches up the scene graph for a Parent with a traversal engine.
-     */
-    private TraversalEngine lookupTraversalEngine(Node node) {
-        Parent p = node.getParent();
-
-        while (p != null) {
-            if (p.getImpl_traversalEngine() != null) {
-                return p.getImpl_traversalEngine();
-            }
-            p = p.getParent();
-        }
-
-        // This shouldn't ever occur, since walking up the tree
-        // should always find the Scene's root, which always has
-        // a traversal engine. But if for some reason we get here,
-        // just return the root's traversal engine.
-
-        return getRoot().getImpl_traversalEngine();
-    }
-
-    /**
-     * Registers a traversable node with a traversal engine
-     * on this scene.
-     */
-    void registerTraversable(Node n) {
-        initializeInternalEventDispatcher();
-
-        final TraversalEngine te = lookupTraversalEngine(n);
-        if (te != null) {
-            if (traversalRegistry == null) {
-                traversalRegistry = new HashMap();
-            }
-            traversalRegistry.put(n, te);
-            te.reg(n);
-        }
-    }
-
-    /**
-     * Unregisters a traversable node from this scene.
-     */
-    void unregisterTraversable(Node n) {
-        final TraversalEngine te = (TraversalEngine) traversalRegistry.remove(n);
-        if (te != null) {
-            te.unreg(n);
-        }
-    }
+    private TopMostTraversalEngine traversalEngine = new SceneTraversalEngine(this);
 
     /**
      * Traverses focus from the given node in the given direction.
      */
     boolean traverse(Node node, Direction dir) {
-        /*
-        ** if the registry is null then there are no
-        ** registered traversable nodes in this scene
-        */
-        if (traversalRegistry != null) {
-            TraversalEngine te = (TraversalEngine) traversalRegistry.get(node);
-            if (te == null) {
-                te = lookupTraversalEngine(node);
-            }
-            return te.trav(node, dir);
-        }
-        return false;
+        if (node.getSubScene() != null) {
+            return node.getSubScene().traverse(node, dir);
+        }
+        return traversalEngine.trav(node, dir) != null;
     }
 
     /**
@@ -1976,7 +1909,7 @@
      * removed from the scene.
      */
     private void focusInitial() {
-        getRoot().getImpl_traversalEngine().getTopLeftFocusableNode();
+        traversalEngine.traverseToFirst();
     }
 
     /**
@@ -4128,7 +4061,7 @@
         return internalEventDispatcher;
     }
 
-    private void initializeInternalEventDispatcher() {
+    final void initializeInternalEventDispatcher() {
         if (internalEventDispatcher == null) {
             internalEventDispatcher = createInternalEventDispatcher();
             eventDispatcher = new SimpleObjectProperty<EventDispatcher>(
--- a/modules/graphics/src/main/java/javafx/scene/SubScene.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/graphics/src/main/java/javafx/scene/SubScene.java	Fri Mar 14 09:02:45 2014 -0700
@@ -25,6 +25,9 @@
 
 package javafx.scene;
 
+import com.sun.javafx.scene.traversal.Direction;
+import com.sun.javafx.scene.traversal.SubSceneTraversalEngine;
+import com.sun.javafx.scene.traversal.TopMostTraversalEngine;
 import javafx.application.ConditionalFeature;
 import javafx.application.Platform;
 import javafx.beans.NamedArg;
@@ -50,7 +53,6 @@
 import com.sun.javafx.scene.DirtyBits;
 import com.sun.javafx.scene.SubSceneHelper;
 import com.sun.javafx.scene.input.PickResultChooser;
-import com.sun.javafx.scene.traversal.TraversalEngine;
 import com.sun.javafx.sg.prism.NGCamera;
 import com.sun.javafx.sg.prism.NGLightBase;
 import com.sun.javafx.sg.prism.NGNode;
@@ -241,12 +243,8 @@
 
                     if (oldRoot != null) {
                         oldRoot.setScenes(null, null);
-                        oldRoot.setImpl_traversalEngine(null);
                     }
                     oldRoot = _value;
-                    if (_value.getImpl_traversalEngine() == null) {
-                        _value.setImpl_traversalEngine(new TraversalEngine(_value, true));
-                    }
                     _value.getStyleClass().add(0, "root");
                     _value.setScenes(getScene(), SubScene.this);
                     markDirty(SubSceneDirtyBits.ROOT_SG_DIRTY);
@@ -644,6 +642,12 @@
         }
     }
 
+    private TopMostTraversalEngine traversalEngine = new SubSceneTraversalEngine(this);
+
+    boolean traverse(Node node, Direction dir) {
+        return traversalEngine.trav(node, dir) != null;
+    }
+
     private enum SubSceneDirtyBits {
         SIZE_DIRTY,
         FILL_DIRTY,
--- a/modules/graphics/src/main/native-glass/lens/LensCommon.h	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/graphics/src/main/native-glass/lens/LensCommon.h	Fri Mar 14 09:02:45 2014 -0700
@@ -995,6 +995,15 @@
 void glass_window_list_lock();
 
 /**
+ * Check that *window* exists in the windows list. Not 
+ * using locks. Use glass_window_list_lock() 
+ * and glass_window_list_unlock() before and after the 
+ * function call.
+ * @return true - if window exists, false otherwise.
+ */
+jboolean glass_window_isExist(NativeWindow window);
+
+/**
  * Unlock the windows list.
  */
 void glass_window_list_unlock();
--- a/modules/graphics/src/main/native-glass/lens/LensWindow.c	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/graphics/src/main/native-glass/lens/LensWindow.c	Fri Mar 14 09:02:45 2014 -0700
@@ -796,7 +796,7 @@
     return windowList_size;
 }
 
-static jboolean glass_window_isExist(NativeWindow window){
+jboolean glass_window_isExist(NativeWindow window){
 
     NativeWindow w = glass_window_list_getHead();
     while (w) {
--- a/modules/graphics/src/main/native-glass/lens/wm/LensWindowManager.c	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/graphics/src/main/native-glass/lens/wm/LensWindowManager.c	Fri Mar 14 09:02:45 2014 -0700
@@ -1198,15 +1198,20 @@
     }
     
     if (touchWindow != NULL) {
-        dx = -touchWindow->currentBounds.x;
-        dy = -touchWindow->currentBounds.y;
-        glass_application_notifyMultiTouchEvent(env, touchWindow, count,
-                                                states, ids, xabs, yabs,
-                                                dx, dy);
-        if (primaryPointIndex == -1) {
-            //all released
-            touchWindow = NULL;
+        //Check that touchWindow is still valid before using it. 
+        glass_window_list_lock();
+        if (glass_window_isExist(touchWindow)) {
+            dx = -touchWindow->currentBounds.x;
+            dy = -touchWindow->currentBounds.y;
+            glass_application_notifyMultiTouchEvent(env, touchWindow, count,
+                                                    states, ids, xabs, yabs,
+                                                    dx, dy);
+            if (primaryPointIndex == -1) {
+                //all released
+                touchWindow = NULL;
+            }
         }
+        glass_window_list_unlock();
     }
    
 }
--- a/modules/graphics/src/test/java/com/sun/javafx/css/Node_cssStyleMap_Test.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/graphics/src/test/java/com/sun/javafx/css/Node_cssStyleMap_Test.java	Fri Mar 14 09:02:45 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014, 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
@@ -33,11 +33,14 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+
+import javafx.beans.property.Property;
 import javafx.collections.FXCollections;
 import javafx.collections.MapChangeListener;
 import javafx.css.CssMetaData;
 import javafx.css.ParsedValue;
 import javafx.css.StyleOrigin;
+import javafx.css.Styleable;
 import javafx.css.StyleableProperty;
 import javafx.scene.Group;
 import javafx.scene.Node;
@@ -49,162 +52,153 @@
 import javafx.stage.Stage;
 import static org.junit.Assert.*;
 
+import javafx.util.Pair;
 import org.junit.Ignore;
 import org.junit.Test;
 
+@Ignore
 public class Node_cssStyleMap_Test {
     
     public Node_cssStyleMap_Test() {
     }
 
     boolean disabled = false;
-    int nadds = 0;
-    int nremoves = 0;
 
-    static List<CascadingStyle> createStyleList(List<Declaration> decls) {
-        
-        final List<CascadingStyle> styles = new ArrayList<CascadingStyle>();
-        
-        for (Declaration decl : decls) {
-            styles.add(
-                new CascadingStyle(
-                    new Style(decl.rule.getUnobservedSelectorList().get(0), decl),
-                    new PseudoClassState(),
-                    0, 
-                    0
-                )
-            );
+    private void checkFoundStyle(Property<?> property, Map<StyleableProperty<?>, List<Style>> map, List<Declaration> decls) {
+
+        List<Style> styles = map.get(property);
+        assert (styles != null && !styles.isEmpty());
+
+        String pname = ((StyleableProperty<?>)property).getCssMetaData().getProperty();
+        Declaration declaration = null;
+        for(Declaration decl : decls) {
+            if (pname.equals(decl.getProperty())) {
+                declaration = decl;
+                break;
+            }
         }
-        
-        return styles;
+        assertNotNull(pname, declaration);
+
+        Style style = null;
+        for(Style s : styles) {
+            if (pname.equals(s.getDeclaration().getProperty())) {
+                style = s;
+                break;
+            }
+        }
+        assertNotNull(pname, style);
+
+        assert(style.getDeclaration() == declaration);
+
     }
     
-    static Map<String, List<CascadingStyle>> createStyleMap(List<CascadingStyle> styles) {
-        
-        final Map<String, List<CascadingStyle>> smap = 
-            new HashMap<String, List<CascadingStyle>>();
-        
-        final int max = styles != null ? styles.size() : 0;
-        for (int i=0; i<max; i++) {
-            final CascadingStyle style = styles.get(i);
-            final String property = style.getProperty();
-            // This is carefully written to use the minimal amount of hashing.
-            List<CascadingStyle> list = smap.get(property);
-            if (list == null) {
-                list = new ArrayList<CascadingStyle>(5);
-                smap.put(property, list);
-            }
-            list.add(style);
-        }
-        return smap;
-    }
-    
-    @Test @Ignore ("Pending RT-34463")
-    public void testStyleMapTracksChanges() {
-                
+    @Test
+    public void testStyleMap() {
+
         final List<Declaration> declsNoState = new ArrayList<Declaration>();
-        Collections.addAll(declsNoState, 
+        Collections.addAll(declsNoState,
             new Declaration("-fx-fill", new ParsedValueImpl<Color,Color>(Color.RED, null), false),
             new Declaration("-fx-stroke", new ParsedValueImpl<Color,Color>(Color.YELLOW, null), false),
             new Declaration("-fx-stroke-width", new ParsedValueImpl<ParsedValue<?,Size>,Number>(
-                new ParsedValueImpl<Size,Size>(new Size(3d, SizeUnits.PX), null), 
+                new ParsedValueImpl<Size,Size>(new Size(3d, SizeUnits.PX), null),
                 SizeConverter.getInstance()), false)
         );
-        
-        
+
+
         final List<Selector> selsNoState = new ArrayList<Selector>();
-        Collections.addAll(selsNoState, 
+        Collections.addAll(selsNoState,
             Selector.createSelector(".rect")
         );
-        
-        Rule rule = new Rule(selsNoState, declsNoState);        
-        
-        Stylesheet stylesheet = new Stylesheet("testStyleMapTracksChanges");
+
+        Rule rule = new Rule(selsNoState, declsNoState);
+
+        Stylesheet stylesheet = new Stylesheet("testStyleMap");
         stylesheet.setOrigin(StyleOrigin.USER_AGENT);
         stylesheet.getRules().add(rule);
-        
+
         final List<Declaration> declsDisabledState = new ArrayList<Declaration>();
-        Collections.addAll(declsDisabledState, 
+        Collections.addAll(declsDisabledState,
             new Declaration("-fx-fill", new ParsedValueImpl<Color,Color>(Color.GRAY, null), false),
             new Declaration("-fx-stroke", new ParsedValueImpl<Color,Color>(Color.DARKGRAY, null), false)
         );
-        
+
         final List<Selector> selsDisabledState = new ArrayList<Selector>();
-        Collections.addAll(selsDisabledState, 
+        Collections.addAll(selsDisabledState,
             Selector.createSelector(".rect:disabled")
         );
-        
-        rule = new Rule(selsDisabledState, declsDisabledState);        
+
+        rule = new Rule(selsDisabledState, declsDisabledState);
         stylesheet.getRules().add(rule);
-        
-        final List<CascadingStyle> stylesNoState = createStyleList(declsNoState);
-        final List<CascadingStyle> stylesDisabledState = createStyleList(declsDisabledState);
-        
-        // add to this list on wasAdded, check bean on wasRemoved.
-        final List<StyleableProperty<?>> beans = new ArrayList<StyleableProperty<?>>();
+
         Rectangle rect = new Rectangle(50,50);
         rect.getStyleClass().add("rect");
-        rect.impl_setStyleMap(FXCollections.observableMap(new HashMap<StyleableProperty<?>, List<Style>>()));
-        rect.impl_getStyleMap().addListener(new MapChangeListener<StyleableProperty, List<Style>>() {
-
-            public void onChanged(MapChangeListener.Change<? extends StyleableProperty, ? extends List<Style>> change) {
-
-                if (change.wasAdded()) {
-                    
-                    List<Style> styles = change.getValueAdded();
-                    for (Style style : styles) {
-
-                        // stroke width comes from ".rect" even for disabled state.
-                        if (disabled == false || "-fx-stroke-width".equals(style.getDeclaration().getProperty())) {
-                            assertTrue(style.getDeclaration().toString(),declsNoState.contains(style.getDeclaration()));
-                            assertTrue(style.getSelector().toString(),selsNoState.contains(style.getSelector()));
-                        } else {
-                            assertTrue(style.getDeclaration().toString(),declsDisabledState.contains(style.getDeclaration()));
-                            assertTrue(style.getSelector().toString(),selsDisabledState.contains(style.getSelector()));                            
-                        }
-                        Object value = style.getDeclaration().parsedValue.convert(null);
-                        StyleableProperty styleableProperty = change.getKey();
-                        beans.add(styleableProperty);
-                        assertEquals(styleableProperty.getValue(), value);
-                        nadds += 1;                        
-                    }
-                    
-                } if (change.wasRemoved()) {
-                    StyleableProperty styleableProperty = change.getKey();
-                    assert(beans.contains(styleableProperty));
-                    nremoves += 1;
-                }
-            }
-        });
 
         Group root = new Group();
         root.getChildren().add(rect);
-        StyleManager.getInstance().setDefaultUserAgentStylesheet(stylesheet);        
+        StyleManager.getInstance().setDefaultUserAgentStylesheet(stylesheet);
         Scene scene = new Scene(root);
-        Stage stage = new Stage();
-        stage.setScene(scene);
-        stage.show();
 
-        // The three no state styles should be applied
-        assertEquals(3, nadds);
-        assertEquals(0, nremoves);
+        rect.applyCss();
+
+        Map<StyleableProperty<?>, List<Style>> map = rect.impl_findStyles(null);
+        assert (map != null && !map.isEmpty());
+
+        checkFoundStyle(rect.fillProperty(), map, declsNoState);
+        checkFoundStyle(rect.strokeProperty(), map, declsNoState);
+        checkFoundStyle(rect.strokeWidthProperty(), map, declsNoState);
 
         rect.setDisable(true);
-        disabled = true;
-        nadds = 0;
-        nremoves = 0;
-        
-        Toolkit.getToolkit().firePulse();
-        
-        // The three no state styles should be removed and the 
-        // two disabled state styles plus the stroke width style 
-        // should be applied. 
-        assertEquals(3, nadds);
-        assertEquals(3, nremoves);
-        
+        rect.applyCss();
+
+        map = rect.impl_findStyles(null);
+        assert (map != null && !map.isEmpty());
+
+        checkFoundStyle(rect.fillProperty(), map, declsDisabledState);
+        checkFoundStyle(rect.strokeProperty(), map, declsDisabledState);
+        checkFoundStyle(rect.strokeWidthProperty(), map, declsNoState);
+
     }
-    
-    @Test @Ignore ("Pending RT-34463")
+
+    @Test
+    public void testStyleMapChildren() {
+
+        final List<Declaration> declsNoState = new ArrayList<Declaration>();
+        Collections.addAll(declsNoState,
+                new Declaration("-fx-fill", new ParsedValueImpl<Color,Color>(Color.RED, null), false)
+        );
+
+        final List<Selector> selsNoState = new ArrayList<Selector>();
+        Collections.addAll(selsNoState,
+                Selector.createSelector(".rect")
+        );
+
+        Rule rule = new Rule(selsNoState, declsNoState);
+
+        Stylesheet stylesheet = new Stylesheet("testStyleMapChildren");
+        stylesheet.setOrigin(StyleOrigin.USER_AGENT);
+        stylesheet.getRules().add(rule);
+
+        Rectangle rect = new Rectangle(50,50);
+        rect.getStyleClass().add("rect");
+
+        Group root = new Group();
+        Group group = new Group();
+        root.getChildren().add(group);
+        group.getChildren().add(rect);
+        StyleManager.getInstance().setDefaultUserAgentStylesheet(stylesheet);
+        Scene scene = new Scene(root);
+
+        root.applyCss();
+
+        // Even though root and group have no styles, the styles for rect should still be found
+        Map<StyleableProperty<?>, List<Style>> map = root.impl_findStyles(null);
+        assert (map != null && !map.isEmpty());
+
+        checkFoundStyle(rect.fillProperty(), map, declsNoState);
+
+    }
+
+    @Test
     public void testRT_21212() {
 
         final List<Declaration> rootDecls = new ArrayList<Declaration>();
@@ -225,11 +219,6 @@
         stylesheet.setOrigin(StyleOrigin.USER_AGENT);
         stylesheet.getRules().add(rootRule);
 
-        final List<CascadingStyle> rootStyles = createStyleList(rootDecls);
-        final Map<String,List<CascadingStyle>> rootStyleMap = createStyleMap(rootStyles);
-        final Map<StyleCache.Key, StyleCache> styleCache = 
-            new HashMap<StyleCache.Key, StyleCache>();
-        
         Group group = new Group();
         group.getStyleClass().add("root");
         
@@ -257,42 +246,19 @@
         Rule textRule = new Rule(textSels, textDecls);        
         stylesheet.getRules().add(textRule);
                 
-        final List<CascadingStyle> styles = createStyleList(textDecls);
-        final Map<String,List<CascadingStyle>> styleMap = createStyleMap(styles);
-        final Map<String,List<CascadingStyle>> emptyMap = createStyleMap(null);
-
         Text text = new Text("HelloWorld");
+        text.getStyleClass().add("text");
         group.getChildren().add(text);
 
-        final List<Declaration> expecteds = new ArrayList<Declaration>();
-        expecteds.addAll(rootDecls);
-        expecteds.addAll(textDecls);
-        text.getStyleClass().add("text");
-        text.impl_setStyleMap(FXCollections.observableMap(new HashMap<StyleableProperty<?>, List<Style>>()));
-        text.impl_getStyleMap().addListener(new MapChangeListener<StyleableProperty, List<Style>>() {
+        StyleManager.getInstance().setDefaultUserAgentStylesheet(stylesheet);
+        Scene scene = new Scene(group);
 
-            // a little different than the other tests since we should end up 
-            // with font and font-size in the map and nothing else. After all 
-            // the changes have been handled, the expecteds list should be empty.
-            public void onChanged(MapChangeListener.Change<? extends StyleableProperty, ? extends List<Style>> change) {
-                if (change.wasAdded()) {
-                    List<Style> styles = change.getValueAdded();
-                    for (Style style : styles) {
-                        assertTrue(expecteds.contains(style.getDeclaration()));
-                        expecteds.remove(style.getDeclaration());
-                    }
-                }
-            }
-        });
-             
-        StyleManager.getInstance().setDefaultUserAgentStylesheet(stylesheet);        
-        Scene scene = new Scene(group);
-        Stage stage = new Stage();
-        stage.setScene(scene);
-        stage.show();
+        text.applyCss();
 
-        assertEquals(18, text.getFont().getSize(),0);
-        assertTrue(Integer.toString(expecteds.size()), expecteds.isEmpty());
+        Map<StyleableProperty<?>, List<Style>> map = text.impl_findStyles(null);
+        assert (map != null && !map.isEmpty());
+
+        checkFoundStyle(text.fontProperty(), map, textDecls);
 
     }
 
--- a/modules/graphics/src/test/java/com/sun/javafx/scene/traversal/TraversalTest.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/graphics/src/test/java/com/sun/javafx/scene/traversal/TraversalTest.java	Fri Mar 14 09:02:45 2014 -0700
@@ -78,7 +78,7 @@
      * </ul>
      */
     private Node[] keypadNodes;
-    private TraversalEngine traversalEngine;
+    private SceneTraversalEngine traversalEngine;
 
     /*
      * Parameters: [fromNumber], [direction], [toNumber], [toNumberTransformed]
@@ -154,7 +154,7 @@
         scene = new Scene(new Group(), 500, 500);
         stage.setScene(scene);
 
-        traversalEngine = new TraversalEngine(scene.getRoot(), true);
+        traversalEngine = new SceneTraversalEngine(scene);
 
         keypadNodes = createKeypadNodesInScene(scene, traversalEngine);
 
@@ -216,7 +216,6 @@
 
                 keypad[index++] = keyNode;
                 ((Group)scene.getRoot()).getChildren().add(keyNode);
-                traversalEngine.reg(keyNode);
             }
         }
 
--- a/modules/graphics/src/test/java/com/sun/javafx/scene/traversal/TraverseInvisibleTest.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/graphics/src/test/java/com/sun/javafx/scene/traversal/TraverseInvisibleTest.java	Fri Mar 14 09:02:45 2014 -0700
@@ -59,7 +59,7 @@
     private Stage stage;
     private Scene scene;
     private Node[] keypadNodes;
-    private TraversalEngine traversalEngine;
+    private SceneTraversalEngine traversalEngine;
 
     /*
     **
@@ -97,7 +97,7 @@
         scene = new Scene(new Group(), 500, 500);
         stage.setScene(scene);
 
-        traversalEngine = new TraversalEngine(scene.getRoot(), true);
+        traversalEngine = new SceneTraversalEngine(scene);
 
         keypadNodes = createKeypadNodesInScene(scene, traversalEngine);
         stage.show();
@@ -140,7 +140,6 @@
 
                 keypad[index++] = keyNode;
                 ((Group)scene.getRoot()).getChildren().add(keyNode);
-                traversalEngine.reg(keyNode);
             }
         }
 
--- a/modules/graphics/src/test/java/javafx/scene/RegistrationTest.java	Wed Mar 12 09:12:18 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 2011, 2013, 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 javafx.scene;
-
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-import com.sun.javafx.scene.traversal.TraversalEngine;
-
-public class RegistrationTest {
-    /**
-     * Asserts that this node is registered with this traversal engine.
-     */
-    void assertIsRegistered(Node n, TraversalEngine te) {
-        assertTrue(te.registeredNodes.contains(n));
-    }
-
-    /**
-     * Asserts that this node is not registered with this traversal engine.
-     */
-    void assertNotRegistered(Node n, TraversalEngine te) {
-        assertTrue(te.registeredNodes.contains(n) == false);
-    }
-
-    /**
-     * Helper function to return a node for testing.
-     * The boolean parameter determines whether it's traversable.
-     */
-    Node node(boolean traversable) {
-        Group g = new Group();
-        g.setFocusTraversable(traversable);
-        return g;
-    }
-
-    @Test
-    public void testAddRemoveTraversable() {
-        Node n = node(true);
-        Group root = new Group();
-        root.getChildren().addAll(n);
-        Scene s = new Scene(root);
-
-        System.out.println("n.scene="+n.getScene()+" s.traversalRegistry="+s.traversalRegistry);
-
-        assertTrue(s.traversalRegistry.containsKey(n));
-        TraversalEngine te = (TraversalEngine)s.traversalRegistry.get(n);
-        assertNotNull(te);
-        assertIsRegistered(n, te);
-
-        root.getChildren().remove(n);
-        assertFalse(s.traversalRegistry.containsKey(n));
-        assertNotRegistered(n, te);
-    }
-
-    @Test
-    public void testToggleTraversable() {
-        Node n = node(false);
-        Group root = new Group();
-        root.getChildren().addAll(n);
-        Scene s = new Scene(root);
-
-        assertTrue(s.traversalRegistry == null || !s.traversalRegistry.containsKey(n));
-
-        n.setFocusTraversable(true);
-        // note: reg is most likely null until we make a node traversable!
-        assertNotNull(s.traversalRegistry);
-        assertTrue(s.traversalRegistry.containsKey(n));
-        TraversalEngine te = (TraversalEngine)s.traversalRegistry.get(n);
-        assertNotNull(te);
-        assertIsRegistered(n, te);
-
-        n.setFocusTraversable(false);
-        assertFalse(s.traversalRegistry.containsKey(n));
-        assertNotRegistered(n, te);
-    }
-}
--- a/modules/swing/src/main/java/javafx/embed/swing/SwingCursors.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/swing/src/main/java/javafx/embed/swing/SwingCursors.java	Fri Mar 14 09:02:45 2014 -0700
@@ -77,10 +77,12 @@
             case NE_RESIZE:
                 return Cursor.getPredefinedCursor(Cursor.NE_RESIZE_CURSOR);
             case N_RESIZE:
+            case V_RESIZE:
                 return Cursor.getPredefinedCursor(Cursor.N_RESIZE_CURSOR);
             case S_RESIZE:
                 return Cursor.getPredefinedCursor(Cursor.S_RESIZE_CURSOR);
             case W_RESIZE:
+            case H_RESIZE:
                 return Cursor.getPredefinedCursor(Cursor.W_RESIZE_CURSOR);
             case E_RESIZE:
 	        return Cursor.getPredefinedCursor(Cursor.E_RESIZE_CURSOR);
@@ -92,8 +94,6 @@
                 return Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR);
             // Not implemented, use default cursor instead
             case DISAPPEAR:
-            case H_RESIZE:
-            case V_RESIZE:
                 return Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR);
             case NONE:
                 return null;
--- a/modules/web/src/main/java/com/sun/javafx/scene/web/behavior/HTMLEditorBehavior.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/main/java/com/sun/javafx/scene/web/behavior/HTMLEditorBehavior.java	Fri Mar 14 09:02:45 2014 -0700
@@ -65,7 +65,7 @@
             HTMLEditorSkin editorSkin = (HTMLEditorSkin)editor.getSkin();
             editorSkin.keyboardShortcuts(name);
         } else if ("F12".equals(name)) {
-            getControl().getImpl_traversalEngine().getTopLeftFocusableNode();
+            getControl().getImpl_traversalEngine().selectFirst().requestFocus();
         } else {
             super.callAction(name);
         }
--- a/modules/web/src/main/java/com/sun/javafx/scene/web/skin/HTMLEditorSkin.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/main/java/com/sun/javafx/scene/web/skin/HTMLEditorSkin.java	Fri Mar 14 09:02:45 2014 -0700
@@ -28,6 +28,9 @@
 import java.util.ResourceBundle;
 
 import com.sun.javafx.application.PlatformImpl;
+import com.sun.javafx.scene.traversal.Algorithm;
+import com.sun.javafx.scene.traversal.Direction;
+import com.sun.javafx.scene.traversal.ParentTraversalEngine;
 import org.w3c.dom.html.HTMLDocument;
 import org.w3c.dom.html.HTMLElement;
 
@@ -42,18 +45,13 @@
 import javafx.event.EventHandler;
 import javafx.geometry.Bounds;
 import javafx.geometry.NodeOrientation;
-import javafx.scene.Group;
 import javafx.scene.Node;
 import javafx.scene.control.Button;
 import javafx.scene.control.ComboBox;
 import javafx.scene.control.ListCell;
 import javafx.scene.control.ListView;
-import javafx.scene.control.MenuButton;
-import javafx.scene.control.MenuItem;
-import javafx.scene.control.RadioMenuItem;
 import javafx.scene.control.Separator;
 import javafx.scene.control.TextInputControl;
-import javafx.scene.control.Toggle;
 import javafx.scene.control.ToggleButton;
 import javafx.scene.control.ToggleGroup;
 import javafx.scene.control.ToolBar;
@@ -67,21 +65,17 @@
 import javafx.scene.layout.GridPane;
 import javafx.scene.layout.Priority;
 import javafx.scene.paint.Color;
-import javafx.scene.shape.Rectangle;
 import javafx.scene.text.Font;
 import javafx.scene.web.HTMLEditor;
 import javafx.scene.web.WebView;
 import javafx.util.Callback;
 
-import com.sun.javafx.PlatformUtil;
-import com.sun.javafx.scene.control.behavior.BehaviorBase;
 import com.sun.javafx.scene.control.skin.ColorPickerSkin;
 import com.sun.javafx.scene.control.skin.FXVK;
 import com.sun.javafx.scene.web.behavior.HTMLEditorBehavior;
 import com.sun.javafx.scene.traversal.TraversalEngine;
 import com.sun.javafx.scene.traversal.TraverseListener;
 import com.sun.webkit.WebPage;
-import com.sun.webkit.event.WCFocusEvent;
 import com.sun.javafx.webkit.Accessor;
 
 import java.security.AccessController;
@@ -102,7 +96,7 @@
 /**
  * HTML editor skin.
  */
-public class HTMLEditorSkin extends BehaviorSkinBase<HTMLEditor, HTMLEditorBehavior> implements TraverseListener {
+public class HTMLEditorSkin extends BehaviorSkinBase<HTMLEditor, HTMLEditorBehavior> {
     private GridPane gridPane;
 
     private ToolBar toolbar1;
@@ -240,19 +234,17 @@
         return DEFAULT_WINDOWS_7_MAPPINGS;
     }
 
-    private TraversalEngine engine;
+    private ParentTraversalEngine engine;
 
     private boolean resetToolbarState = false;
     private String cachedHTMLText = "<html><head></head><body contenteditable=\"true\"></body></html>";
-    private ListChangeListener<Node> itemsListener = new ListChangeListener<Node>() {
-        @Override public void onChanged(ListChangeListener.Change<? extends Node> c) {
-            while (c.next()) {
-                if (c.getRemovedSize() > 0) {
-                    for (Node n : c.getList()) {
-                        if (n instanceof WebView) {
-                            // RT-28611 webView removed - set associated webPage to null
-                            webPage.dispose();
-                        }
+    private ListChangeListener<Node> itemsListener = c -> {
+        while (c.next()) {
+            if (c.getRemovedSize() > 0) {
+                for (Node n : c.getList()) {
+                    if (n instanceof WebView) {
+                        // RT-28611 webView removed - set associated webPage to null
+                        webPage.dispose();
                     }
                 }
             }
@@ -286,145 +278,129 @@
 
         webPage = Accessor.getPageFor(webView.getEngine());
 
-        webView.addEventHandler(MouseEvent.ANY, new EventHandler<MouseEvent>() {
-            @Override public void handle(MouseEvent event) {
-                Platform.runLater(new Runnable() {
-                    @Override public void run() {
-                        updateToolbarState(true);
-                    }
-                });
-            }
+        webView.addEventHandler(MouseEvent.ANY, event2 -> {
+            Platform.runLater(new Runnable() {
+                @Override public void run() {
+                    updateToolbarState(true);
+                }
+            });
         });
 
 
-        webView.addEventHandler(KeyEvent.KEY_PRESSED, new EventHandler<KeyEvent>() {
-            @Override public void handle(final KeyEvent event) {
-                applyTextFormatting();
-                if (event.getCode() == KeyCode.CONTROL || event.getCode() == KeyCode.META) {
-                    return;
+        webView.addEventHandler(KeyEvent.KEY_PRESSED, event -> {
+            applyTextFormatting();
+            if (event.getCode() == KeyCode.CONTROL || event.getCode() == KeyCode.META) {
+                return;
+            }
+            if (event.getCode() == KeyCode.TAB && !event.isControlDown()) {
+                if (!event.isShiftDown()) {
+                    /*
+                    ** if we are in either Bullet or Numbers mode then the
+                    ** TAB key tells us to indent again.
+                    */
+                    if (getCommandState(BULLETS_COMMAND) || getCommandState(NUMBERS_COMMAND)) {
+                        executeCommand(INDENT_COMMAND, null);
+                    }
+                    else {
+                        executeCommand(INSERT_TAB_COMMAND, null);
+                    }
                 }
-                if (event.getCode() == KeyCode.TAB && !event.isControlDown()) {
-                    if (!event.isShiftDown()) {
-                        /*
-                        ** if we are in either Bullet or Numbers mode then the
-                        ** TAB key tells us to indent again.
-                        */
-                        if (getCommandState(BULLETS_COMMAND) || getCommandState(NUMBERS_COMMAND)) {
-                            executeCommand(INDENT_COMMAND, null);
+                else {
+                    /*
+                    ** if we are in either Bullet or Numbers mode then the
+                    ** Shift-TAB key tells us to outdent.
+                    */
+                    if (getCommandState(BULLETS_COMMAND) || getCommandState(NUMBERS_COMMAND)) {
+                        executeCommand(OUTDENT_COMMAND, null);
+                    }
+                }
+                return;
+            }
+            // Work around for bug that sends events from ColorPicker to this Scene
+            if ((fgColorButton != null && fgColorButton.isShowing()) ||
+                (bgColorButton != null && bgColorButton.isShowing())) {
+                return;
+            }
+            Platform.runLater(() -> {
+                if (webPage.getClientSelectedText().isEmpty()) {
+                    if (event.getCode() == KeyCode.UP || event.getCode() == KeyCode.DOWN ||
+                            event.getCode() == KeyCode.LEFT || event.getCode() == KeyCode.RIGHT ||
+                            event.getCode() == KeyCode.HOME || event.getCode() == KeyCode.END) {
+                        updateToolbarState(true);
+                    } else if (event.isControlDown() || event.isMetaDown()) {
+                        if (event.getCode() == KeyCode.B) {
+                            keyboardShortcuts(BOLD_COMMAND);
+                        } else if (event.getCode() == KeyCode.I) {
+                            keyboardShortcuts(ITALIC_COMMAND);
+                        } else if (event.getCode() == KeyCode.U) {
+                            keyboardShortcuts(UNDERLINE_COMMAND);
                         }
-                        else {
-                            executeCommand(INSERT_TAB_COMMAND, null);
+                        updateToolbarState(true);
+                    } else {
+                        resetToolbarState = event.getCode() == KeyCode.ENTER;
+                        if (resetToolbarState) {
+                            if (getCommandState(BOLD_COMMAND) != boldButton.selectedProperty().getValue()) {
+                                executeCommand(BOLD_COMMAND, boldButton.selectedProperty().getValue().toString());
+                            }
+                        }
+                        updateToolbarState(false);
+                    }
+                    resetToolbarState = false;
+                } else if (event.isShiftDown() &&
+                        (event.getCode() == KeyCode.UP || event.getCode() == KeyCode.DOWN ||
+                                event.getCode() == KeyCode.LEFT || event.getCode() == KeyCode.RIGHT)) {
+                    updateToolbarState(true);
+                }
+            });
+        });
+
+        webView.addEventHandler(KeyEvent.KEY_RELEASED, event -> {
+            if (event.getCode() == KeyCode.CONTROL || event.getCode() == KeyCode.META) {
+                return;
+            }
+            // Work around for bug that sends events from ColorPicker to this Scene
+            if ((fgColorButton != null && fgColorButton.isShowing()) ||
+                (bgColorButton != null && bgColorButton.isShowing())) {
+                return;
+            }
+            Platform.runLater(() -> {
+                if (webPage.getClientSelectedText().isEmpty()) {
+                    if (event.getCode() == KeyCode.UP || event.getCode() == KeyCode.DOWN ||
+                            event.getCode() == KeyCode.LEFT || event.getCode() == KeyCode.RIGHT ||
+                            event.getCode() == KeyCode.HOME || event.getCode() == KeyCode.END) {
+                        updateToolbarState(true);
+                    } else if (event.isControlDown() || event.isMetaDown()) {
+                        if (event.getCode() == KeyCode.B) {
+                            keyboardShortcuts(BOLD_COMMAND);
+                        } else if (event.getCode() == KeyCode.I) {
+                            keyboardShortcuts(ITALIC_COMMAND);
+                        } else if (event.getCode() == KeyCode.U) {
+                            keyboardShortcuts(UNDERLINE_COMMAND);
+                        }
+                        updateToolbarState(true);
+                    } else {
+                        resetToolbarState = event.getCode() == KeyCode.ENTER;
+                        if (!resetToolbarState) {
+                            updateToolbarState(false);
                         }
                     }
-                    else {
-                        /*
-                        ** if we are in either Bullet or Numbers mode then the
-                        ** Shift-TAB key tells us to outdent.
-                        */
-                        if (getCommandState(BULLETS_COMMAND) || getCommandState(NUMBERS_COMMAND)) {
-                            executeCommand(OUTDENT_COMMAND, null);
-                        }
-                    }
-                    return;
+                    resetToolbarState = false;
                 }
-                // Work around for bug that sends events from ColorPicker to this Scene
-                if ((fgColorButton != null && fgColorButton.isShowing()) ||
-                    (bgColorButton != null && bgColorButton.isShowing())) {
-                    return;
-                }
-                Platform.runLater(new Runnable() {
-                    @Override public void run() {
-                        if (webPage.getClientSelectedText().isEmpty()) {
-                            if (event.getCode() == KeyCode.UP || event.getCode() == KeyCode.DOWN ||
-                                event.getCode() == KeyCode.LEFT || event.getCode() == KeyCode.RIGHT ||
-                                event.getCode() == KeyCode.HOME || event.getCode() == KeyCode.END) {
-                                updateToolbarState(true);
-                            } else if (event.isControlDown() || event.isMetaDown()) {
-                                if (event.getCode() == KeyCode.B) {
-                                    keyboardShortcuts(BOLD_COMMAND);
-                                } else if(event.getCode() == KeyCode.I) {
-                                    keyboardShortcuts(ITALIC_COMMAND);
-                                } else if (event.getCode() == KeyCode.U) {
-                                    keyboardShortcuts(UNDERLINE_COMMAND);
-                                }
-                                updateToolbarState(true);
-                            } else {
-                                resetToolbarState = event.getCode() == KeyCode.ENTER;
-                                if (resetToolbarState) {
-                                    if (getCommandState(BOLD_COMMAND) !=  boldButton.selectedProperty().getValue()) {
-                                        executeCommand(BOLD_COMMAND, boldButton.selectedProperty().getValue().toString());
-                                    }
-                                }
-                                updateToolbarState(false);
-                            }
-                            resetToolbarState = false;
-                        }
-                        else if (event.isShiftDown() && 
-                                 (event.getCode() == KeyCode.UP || event.getCode() == KeyCode.DOWN ||
-                                  event.getCode() == KeyCode.LEFT || event.getCode() == KeyCode.RIGHT)) {
-                            updateToolbarState(true);
-                        }
-                    }
-                });
-            }
+            });
         });
 
-        webView.addEventHandler(KeyEvent.KEY_RELEASED, new EventHandler<KeyEvent>() {
-            @Override public void handle(final KeyEvent event) {
-                if (event.getCode() == KeyCode.CONTROL || event.getCode() == KeyCode.META) {
-                    return;
+        getSkinnable().focusedProperty().addListener((observable, oldValue, newValue) -> {
+            Platform.runLater(new Runnable() {
+                @Override public void run() {
+                    if (newValue) {
+                        webView.requestFocus();
+                    }
                 }
-                // Work around for bug that sends events from ColorPicker to this Scene
-                if ((fgColorButton != null && fgColorButton.isShowing()) ||
-                    (bgColorButton != null && bgColorButton.isShowing())) {
-                    return;
-                }
-                Platform.runLater(new Runnable() {
-                    @Override public void run() {
-                        if (webPage.getClientSelectedText().isEmpty()) {
-                            if (event.getCode() == KeyCode.UP || event.getCode() == KeyCode.DOWN ||
-                                event.getCode() == KeyCode.LEFT || event.getCode() == KeyCode.RIGHT ||
-                                event.getCode() == KeyCode.HOME || event.getCode() == KeyCode.END) {
-                                updateToolbarState(true);
-                            } else if (event.isControlDown() || event.isMetaDown()) {
-                                if (event.getCode() == KeyCode.B) {
-                                    keyboardShortcuts(BOLD_COMMAND);
-                                } else if(event.getCode() == KeyCode.I) {
-                                    keyboardShortcuts(ITALIC_COMMAND);
-                                } else if (event.getCode() == KeyCode.U) {
-                                    keyboardShortcuts(UNDERLINE_COMMAND);
-                                }
-                                updateToolbarState(true);
-                            } else {
-                                resetToolbarState = event.getCode() == KeyCode.ENTER;
-                                if (!resetToolbarState) {
-                                    updateToolbarState(false);
-                                }
-                            }
-                            resetToolbarState = false;
-                        }
-                    }
-                });
-            }
+            });
         });
 
-        getSkinnable().focusedProperty().addListener(new ChangeListener<Boolean>() {
-            @Override
-            public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, final Boolean newValue) {
-                Platform.runLater(new Runnable() {
-                    @Override public void run() {
-                        if (newValue) {
-                            webView.requestFocus();
-                        }
-                    }
-                });
-            }
-        });
-
-        webView.focusedProperty().addListener(new ChangeListener<Boolean>() {
-            @Override
-            public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, final Boolean newValue) {
-                // disabling as a fix for RT-30081
+        webView.focusedProperty().addListener((observable, oldValue, newValue) -> {
+            // disabling as a fix for RT-30081
 //                if (newValue) {
 //                    webPage.dispatchFocusEvent(new WCFocusEvent(WCFocusEvent.FOCUS_GAINED, WCFocusEvent.FORWARD));
 //                    enableToolbar(true);
@@ -432,57 +408,62 @@
 //                    webPage.dispatchFocusEvent(new WCFocusEvent(WCFocusEvent.FOCUS_LOST, WCFocusEvent.FORWARD));
 //                    enableToolbar(false);
 //                }
-                
-                Platform.runLater(new Runnable() {
-                    @Override public void run() {
-                        updateToolbarState(true);
-                        
-                        if (PlatformImpl.isSupported(ConditionalFeature.VIRTUAL_KEYBOARD)) {
-                            Scene scene = getSkinnable().getScene();
-                            if (newValue) {
-                                FXVK.attach(webView);
-                            } else if (scene == null ||
-                                       scene.getWindow() == null ||
-                                       !scene.getWindow().isFocused() ||
-                                       !(scene.getFocusOwner() instanceof TextInputControl /*||
-                                         getScene().getFocusOwner() instanceof WebView*/)) {
-                                FXVK.detach();
-                            }
+
+            Platform.runLater(new Runnable() {
+                @Override public void run() {
+                    updateToolbarState(true);
+
+                    if (PlatformImpl.isSupported(ConditionalFeature.VIRTUAL_KEYBOARD)) {
+                        Scene scene = getSkinnable().getScene();
+                        if (newValue) {
+                            FXVK.attach(webView);
+                        } else if (scene == null ||
+                                   scene.getWindow() == null ||
+                                   !scene.getWindow().isFocused() ||
+                                   !(scene.getFocusOwner() instanceof TextInputControl /*||
+                                     getScene().getFocusOwner() instanceof WebView*/)) {
+                            FXVK.detach();
                         }
                     }
-                });
-            }
+                }
+            });
         });
 
-        webView.getEngine().getLoadWorker().workDoneProperty().addListener(new ChangeListener<Number>() {
-            @Override
-            public void changed(ObservableValue<? extends Number> observable, final Number oldValue, final Number newValue) {
-                Platform.runLater(new Runnable() {
-                    @Override public void run() {
-                        webView.requestLayout();
-                    }
+        webView.getEngine().getLoadWorker().workDoneProperty().addListener((observable, oldValue, newValue) -> {
+            Platform.runLater(() -> {
+                webView.requestLayout();
+            });
+
+            double totalWork = webView.getEngine().getLoadWorker().getTotalWork();
+            if (newValue.doubleValue() == totalWork) {
+                cachedHTMLText = null;
+                Platform.runLater(() -> {
+                    setContentEditable(true);
+                    updateToolbarState(true);
+                    updateNodeOrientation();
                 });
-
-                double totalWork = webView.getEngine().getLoadWorker().getTotalWork();
-                if (newValue.doubleValue() == totalWork) {                    
-                    cachedHTMLText = null;
-                    Platform.runLater(new Runnable() {
-                        @Override public void run() {
-                            setContentEditable(true);
-                            updateToolbarState(true);
-                            updateNodeOrientation();
-                        }
-                    });
-                }
             }
         });
 
         enableToolbar(true);
         setHTMLText(cachedHTMLText);
 
-        engine = new TraversalEngine(getSkinnable(), false);
-        engine.addTraverseListener(this);
-        engine.reg(toolbar1);
+        engine = new ParentTraversalEngine(getSkinnable(), new Algorithm() {
+            @Override
+            public Node select(Node owner, Direction dir, TraversalEngine engine) {
+                return cutButton;
+            }
+
+            @Override
+            public Node selectFirst(TraversalEngine engine) {
+                return cutButton;
+            }
+
+            @Override
+            public Node selectLast(TraversalEngine engine) {
+                return cutButton;
+            }
+        });
         getSkinnable().setImpl_traversalEngine(engine);
         webView.setFocusTraversable(true);
         gridPane.getChildren().addListener(itemsListener);
@@ -498,10 +479,8 @@
         cachedHTMLText = htmlText;
         webPage.load(webPage.getMainFrame(), htmlText, "text/html");
 
-        Platform.runLater(new Runnable() {
-            @Override public void run() {
-                updateToolbarState(true);
-            }
+        Platform.runLater(() -> {
+            updateToolbarState(true);
         });
     }
 
@@ -562,11 +541,8 @@
         styleFormatMap = new HashMap<String, String>();
 
         createFormatMenuItem(FORMAT_PARAGRAPH, resources.getString("paragraph"));
-        Platform.runLater(new Runnable() {
-            @Override
-            public void run() {
-                formatComboBox.setValue(resources.getString("paragraph"));
-            }
+        Platform.runLater(() -> {
+            formatComboBox.setValue(resources.getString("paragraph"));
         });
         createFormatMenuItem(FORMAT_HEADING_1, resources.getString("heading1"));
         createFormatMenuItem(FORMAT_HEADING_2, resources.getString("heading2"));
@@ -591,24 +567,21 @@
 
         formatComboBox.setTooltip(new Tooltip(resources.getString("format")));
 
-        formatComboBox.valueProperty().addListener(new ChangeListener<String>() {
-            @Override
-            public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {
-                if (newValue == null) {
-                    formatComboBox.setValue(null);
-                } else {
-                    String formatValue = formatStyleMap.get(newValue);
-                    executeCommand(FORMAT_COMMAND, formatValue);
-                    updateToolbarState(false);
+        formatComboBox.valueProperty().addListener((observable, oldValue, newValue) -> {
+            if (newValue == null) {
+                formatComboBox.setValue(null);
+            } else {
+                String formatValue = formatStyleMap.get(newValue);
+                executeCommand(FORMAT_COMMAND, formatValue);
+                updateToolbarState(false);
 
-                    // RT-16330 match the new font format with the required weight and size
-                    for (int i = 0; i < DEFAULT_FORMAT_MAPPINGS.length; i++) {
-                        String[] mapping = DEFAULT_FORMAT_MAPPINGS[i];
-                        if (mapping[0].equalsIgnoreCase(formatValue)) {
-                            executeCommand(FONT_SIZE_COMMAND, mapping[2]);
-                            updateToolbarState(false);
-                            break;
-                        }
+                // RT-16330 match the new font format with the required weight and size
+                for (int i = 0; i < DEFAULT_FORMAT_MAPPINGS.length; i++) {
+                    String[] mapping = DEFAULT_FORMAT_MAPPINGS[i];
+                    if (mapping[0].equalsIgnoreCase(formatValue)) {
+                        executeCommand(FONT_SIZE_COMMAND, mapping[2]);
+                        updateToolbarState(false);
+                        break;
                     }
                 }
             }
@@ -647,23 +620,18 @@
             }
         });
 
-        Platform.runLater(new Runnable() {
-                @Override public void run() {
-                    final ObservableList<String> fonts = FXCollections.observableArrayList(Font.getFamilies());
-                    for (String fontFamily : fonts) {
-                        if (DEFAULT_OS_FONT.equals(fontFamily)) {
-                            fontFamilyComboBox.setValue(fontFamily);
-                        }
-                        fontFamilyComboBox.setItems(fonts);
-                    }
+        Platform.runLater(() -> {
+            final ObservableList<String> fonts = FXCollections.observableArrayList(Font.getFamilies());
+            for (String fontFamily : fonts) {
+                if (DEFAULT_OS_FONT.equals(fontFamily)) {
+                    fontFamilyComboBox.setValue(fontFamily);
                 }
-            });
+                fontFamilyComboBox.setItems(fonts);
+            }
+        });
 
-        fontFamilyComboBox.valueProperty().addListener(new ChangeListener<String>() {
-            @Override
-            public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {
-                executeCommand(FONT_FAMILY_COMMAND, newValue);
-            }
+        fontFamilyComboBox.valueProperty().addListener((observable, oldValue, newValue) -> {
+            executeCommand(FONT_FAMILY_COMMAND, newValue);
         });
 
         fontSizeComboBox = new ComboBox<String>();
@@ -677,11 +645,8 @@
         createFontSizeMenuItem(SIZE_XX_SMALL, resources.getString("extraExtraSmall"));
         createFontSizeMenuItem(SIZE_X_SMALL, resources.getString("extraSmall"));
         createFontSizeMenuItem(SIZE_SMALL, resources.getString("small"));
-        Platform.runLater(new Runnable() {
-            @Override
-            public void run() {
-                fontSizeComboBox.setValue(resources.getString("small"));
-            }
+        Platform.runLater(() -> {
+            fontSizeComboBox.setValue(resources.getString("small"));
         });
         createFontSizeMenuItem(SIZE_MEDIUM, resources.getString("medium"));
         createFontSizeMenuItem(SIZE_LARGE, resources.getString("large"));
@@ -707,13 +672,10 @@
         });
 
 
-        fontSizeComboBox.valueProperty().addListener(new ChangeListener<String>() {
-            @Override
-            public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {
-                Object fontSizeValue = getCommandValue(FONT_SIZE_COMMAND);
-                if (!newValue.equals(fontSizeValue)) {
-                    executeCommand(FONT_SIZE_COMMAND, fontSizeMap.get(newValue));
-                }
+        fontSizeComboBox.valueProperty().addListener((observable, oldValue, newValue) -> {
+            Object fontSizeValue = getCommandValue(FONT_SIZE_COMMAND);
+            if (!newValue.equals(fontSizeValue)) {
+                executeCommand(FONT_SIZE_COMMAND, fontSizeMap.get(newValue));
             }
         });
 
@@ -721,15 +683,12 @@
 
         boldButton = addToggleButton(toolbar2, null,
             resources.getString("boldIcon"), resources.getString("bold"), BOLD_COMMAND, "html-editor-bold");
-        boldButton.setOnAction(new EventHandler<ActionEvent>() {
-            @Override
-            public void handle(ActionEvent event) {
-                // Only use the bold button for paragraphs.  We don't
-                // want to turn bold off for headings.
+        boldButton.setOnAction(event1 -> {
+            // Only use the bold button for paragraphs.  We don't
+            // want to turn bold off for headings.
 
-                if ("<p>".equals(formatStyleMap.get(formatComboBox.getValue())))  {
-                    executeCommand(BOLD_COMMAND, boldButton.selectedProperty().getValue().toString());
-                }
+            if ("<p>".equals(formatStyleMap.get(formatComboBox.getValue())))  {
+                executeCommand(BOLD_COMMAND, boldButton.selectedProperty().getValue().toString());
             }
         });
         italicButton = addToggleButton(toolbar2, null,
@@ -744,13 +703,10 @@
         insertHorizontalRuleButton = addButton(toolbar2, resources.getString("insertHorizontalRuleIcon"),
             resources.getString("insertHorizontalRule"), INSERT_HORIZONTAL_RULE_COMMAND, "html-editor-hr");
         // We override setOnAction to insert a new line.  This fixes RT-16453
-        insertHorizontalRuleButton.setOnAction(new EventHandler<ActionEvent>() {
-            @Override
-            public void handle(ActionEvent event) {
-                executeCommand(INSERT_NEW_LINE_COMMAND, null);
-                executeCommand(INSERT_HORIZONTAL_RULE_COMMAND, null);
-                updateToolbarState(false);
-            }
+        insertHorizontalRuleButton.setOnAction(event -> {
+            executeCommand(INSERT_NEW_LINE_COMMAND, null);
+            executeCommand(INSERT_HORIZONTAL_RULE_COMMAND, null);
+            updateToolbarState(false);
         });
 
         fgColorButton = new ColorPicker();
@@ -760,22 +716,16 @@
 
         fgColorButton.impl_processCSS(true);
         ColorPickerSkin fgColorPickerSkin = (ColorPickerSkin) fgColorButton.getSkin();
-        String fgIcon = AccessController.doPrivileged(new PrivilegedAction<String>() {
-            @Override public String run() {
-                return HTMLEditorSkin.class.getResource(resources.getString("foregroundColorIcon")).toString();
-            }
-        });
+        String fgIcon = AccessController.doPrivileged((PrivilegedAction<String>) () -> HTMLEditorSkin.class.getResource(resources.getString("foregroundColorIcon")).toString());
         ((StyleableProperty)fgColorPickerSkin.imageUrlProperty()).applyStyle(null,fgIcon);
 
         fgColorButton.setValue(DEFAULT_FG_COLOR);
         fgColorButton.setTooltip(new Tooltip(resources.getString("foregroundColor")));
-        fgColorButton.setOnAction(new EventHandler<ActionEvent>() {
-            @Override public void handle(ActionEvent ev) {
-                Color newValue = fgColorButton.getValue();
-                if (newValue != null) {
-                    executeCommand(FOREGROUND_COLOR_COMMAND, colorValueToHex(newValue));
-                    fgColorButton.hide();
-                }
+        fgColorButton.setOnAction(ev1 -> {
+            Color newValue = fgColorButton.getValue();
+            if (newValue != null) {
+                executeCommand(FOREGROUND_COLOR_COMMAND, colorValueToHex(newValue));
+                fgColorButton.hide();
             }
         });
 
@@ -786,23 +736,17 @@
 
         bgColorButton.impl_processCSS(true);
         ColorPickerSkin  bgColorPickerSkin = (ColorPickerSkin) bgColorButton.getSkin();
-        String bgIcon = AccessController.doPrivileged(new PrivilegedAction<String>() {
-            @Override public String run() {
-                return HTMLEditorSkin.class.getResource(resources.getString("backgroundColorIcon")).toString();
-            }
-        });
+        String bgIcon = AccessController.doPrivileged((PrivilegedAction<String>) () -> HTMLEditorSkin.class.getResource(resources.getString("backgroundColorIcon")).toString());
         ((StyleableProperty)bgColorPickerSkin.imageUrlProperty()).applyStyle(null,bgIcon);
 
         bgColorButton.setValue(DEFAULT_BG_COLOR);
         bgColorButton.setTooltip(new Tooltip(resources.getString("backgroundColor")));
 
-        bgColorButton.setOnAction(new EventHandler<ActionEvent>() {
-            @Override public void handle(ActionEvent ev) {
-                Color newValue = bgColorButton.getValue();
-                if (newValue != null) {
-                    executeCommand(BACKGROUND_COLOR_COMMAND, colorValueToHex(newValue));
-                    bgColorButton.hide();
-                }
+        bgColorButton.setOnAction(ev -> {
+            Color newValue = bgColorButton.getValue();
+            if (newValue != null) {
+                executeCommand(BACKGROUND_COLOR_COMMAND, colorValueToHex(newValue));
+                bgColorButton.hide();
             }
         });
     }
@@ -821,21 +765,14 @@
         button.getStyleClass().add(styleClass);
         toolbar.getItems().add(button);
 
-        Image icon = AccessController.doPrivileged(new PrivilegedAction<Image>() {
-            @Override public Image run() {
-                return new Image(HTMLEditorSkin.class.getResource(iconName).toString());
-            }
-        });
+        Image icon = AccessController.doPrivileged((PrivilegedAction<Image>) () -> new Image(HTMLEditorSkin.class.getResource(iconName).toString()));
 //        button.setGraphic(new ImageView(icon));
         ((StyleableProperty)button.graphicProperty()).applyStyle(null,new ImageView(icon));
         button.setTooltip(new Tooltip(tooltipText));
 
-        button.setOnAction(new EventHandler<ActionEvent>() {
-            @Override
-            public void handle(ActionEvent event) {
-                executeCommand(command, null);
-                updateToolbarState(false);
-            }
+        button.setOnAction(event -> {
+            executeCommand(command, null);
+            updateToolbarState(false);
         });
 
         return button;
@@ -852,23 +789,16 @@
             toggleButton.setToggleGroup(toggleGroup);
         }
 
-        Image icon = AccessController.doPrivileged(new PrivilegedAction<Image>() {
-            @Override public Image run() {
-                return new Image(HTMLEditorSkin.class.getResource(iconName).toString());
-            }
-        });
+        Image icon = AccessController.doPrivileged((PrivilegedAction<Image>) () -> new Image(HTMLEditorSkin.class.getResource(iconName).toString()));
         ((StyleableProperty)toggleButton.graphicProperty()).applyStyle(null,new ImageView(icon));
 //        toggleButton.setGraphic(new ImageView(icon));
 
         toggleButton.setTooltip(new Tooltip(tooltipText));
 
         if (!BOLD_COMMAND.equals(command)) {
-            toggleButton.selectedProperty().addListener(new ChangeListener<Boolean>() {
-                @Override
-                public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {
-                    if (getCommandState(command) != newValue.booleanValue()) {
-                        executeCommand(command, null);
-                    }
+            toggleButton.selectedProperty().addListener((observable, oldValue, newValue) -> {
+                if (getCommandState(command) != newValue.booleanValue()) {
+                    executeCommand(command, null);
                 }
             });
         }
@@ -899,11 +829,7 @@
         if (orientation == RIGHT_TO_LEFT) {
             try {
                 final String iconName = resources.getString("numbersIcon-rtl");
-                Image icon = AccessController.doPrivileged(new PrivilegedAction<Image>() {
-                    @Override public Image run() {
-                        return new Image(HTMLEditorSkin.class.getResource(iconName).toString());
-                    }
-                });
+                Image icon = AccessController.doPrivileged((PrivilegedAction<Image>) () -> new Image(HTMLEditorSkin.class.getResource(iconName).toString()));
                 numbersButton.setGraphic(new ImageView(icon));
             } catch (java.util.MissingResourceException ex) {
                 // ignore
@@ -1066,48 +992,46 @@
     }
 
     private void enableToolbar(final boolean enable) {
-        Platform.runLater(new Runnable() {
-            @Override public void run() {
+        Platform.runLater(() -> {
 
-                // Make sure buttons have been created to avoid NPE
-                if (copyButton == null) return;
+            // Make sure buttons have been created to avoid NPE
+            if (copyButton == null) return;
 
-                /*
-                ** if we're to enable, we still only enable
-                ** the cut/copy/paste buttons that make sense
-                */
-                if (enable) {
-                    copyButton.setDisable(!isCommandEnabled(COPY_COMMAND));
-                    cutButton.setDisable(!isCommandEnabled(CUT_COMMAND));
-                    pasteButton.setDisable(!isCommandEnabled(PASTE_COMMAND));
-                }
-                else {
-                    copyButton.setDisable(true);
-                    cutButton.setDisable(true);
-                    pasteButton.setDisable(true);
-                }
+            /*
+            ** if we're to enable, we still only enable
+            ** the cut/copy/paste buttons that make sense
+            */
+            if (enable) {
+                copyButton.setDisable(!isCommandEnabled(COPY_COMMAND));
+                cutButton.setDisable(!isCommandEnabled(CUT_COMMAND));
+                pasteButton.setDisable(!isCommandEnabled(PASTE_COMMAND));
+            }
+            else {
+                copyButton.setDisable(true);
+                cutButton.setDisable(true);
+                pasteButton.setDisable(true);
+            }
 
 //                undoButton.setDisable(!enable);
 //                redoButton.setDisable(!enable);
-                insertHorizontalRuleButton.setDisable(!enable);
-                alignLeftButton.setDisable(!enable);
-                alignCenterButton.setDisable(!enable);
-                alignRightButton.setDisable(!enable);
-                alignJustifyButton.setDisable(!enable);
-                bulletsButton.setDisable(!enable);
-                numbersButton.setDisable(!enable);
-                indentButton.setDisable(!enable);
-                outdentButton.setDisable(!enable);
-                formatComboBox.setDisable(!enable);
-                fontFamilyComboBox.setDisable(!enable);
-                fontSizeComboBox.setDisable(!enable);
-                boldButton.setDisable(!enable);
-                italicButton.setDisable(!enable);
-                underlineButton.setDisable(!enable);
-                strikethroughButton.setDisable(!enable);
-                fgColorButton.setDisable(!enable);
-                bgColorButton.setDisable(!enable);
-            }
+            insertHorizontalRuleButton.setDisable(!enable);
+            alignLeftButton.setDisable(!enable);
+            alignCenterButton.setDisable(!enable);
+            alignRightButton.setDisable(!enable);
+            alignJustifyButton.setDisable(!enable);
+            bulletsButton.setDisable(!enable);
+            numbersButton.setDisable(!enable);
+            indentButton.setDisable(!enable);
+            outdentButton.setDisable(!enable);
+            formatComboBox.setDisable(!enable);
+            fontFamilyComboBox.setDisable(!enable);
+            fontSizeComboBox.setDisable(!enable);
+            boldButton.setDisable(!enable);
+            italicButton.setDisable(!enable);
+            underlineButton.setDisable(!enable);
+            strikethroughButton.setDisable(!enable);
+            fgColorButton.setDisable(!enable);
+            bgColorButton.setDisable(!enable);
         });
     }
 
@@ -1183,11 +1107,6 @@
         }
     }
 
-    @Override
-    public void onTraverse(Node node, Bounds bounds) {
-        cutButton.requestFocus();
-    }
-    
     private boolean isFirstRun = true;
 
     @Override
--- a/modules/web/src/main/java/com/sun/javafx/webkit/EventLoopImpl.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/main/java/com/sun/javafx/webkit/EventLoopImpl.java	Fri Mar 14 09:02:45 2014 -0700
@@ -26,16 +26,13 @@
         // a short delay so as to throttle the outer
         // ScriptDebugServer::pauseIfNeeded loop.
         final Object key = new Object();
-        executor.schedule(new Runnable() {
-            @Override
-            public void run() {
-                Platform.runLater(new Runnable() {
-                    @Override
-                    public void run() {
-                        Toolkit.getToolkit().exitNestedEventLoop(key, null);
-                    }
-                });
-            }
+        executor.schedule(() -> {
+            Platform.runLater(new Runnable() {
+                @Override
+                public void run() {
+                    Toolkit.getToolkit().exitNestedEventLoop(key, null);
+                }
+            });
         }, DELAY, TimeUnit.MILLISECONDS);
         Toolkit.getToolkit().enterNestedEventLoop(key);
     }
--- a/modules/web/src/main/java/com/sun/javafx/webkit/UIClientImpl.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/main/java/com/sun/javafx/webkit/UIClientImpl.java	Fri Mar 14 09:02:45 2014 -0700
@@ -66,22 +66,16 @@
             final PopupFeatures pf =
                     new PopupFeatures(menu, status, toolbar, resizable);
             WebEngine popup = AccessController.doPrivileged(
-                    new PrivilegedAction<WebEngine>() {
-                        @Override public WebEngine run() {
-                            return w.getCreatePopupHandler().call(pf);
-                        }
-                    }, getAccessContext());
+                    (PrivilegedAction<WebEngine>) () -> w.getCreatePopupHandler().call(pf), getAccessContext());
             return Accessor.getPageFor(popup);
         }
         return null;
     }
 
     private void dispatchWebEvent(final EventHandler handler, final WebEvent ev) {
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
-            @Override public Void run() {
-                handler.handle(ev);
-                return null;
-            }
+        AccessController.doPrivileged((PrivilegedAction<Void>) () -> {
+            handler.handle(ev);
+            return null;
         }, getAccessContext());
     }
 
@@ -148,11 +142,7 @@
         final WebEngine w = getWebEngine();
         if (w != null && w.getConfirmHandler() != null) {
             return AccessController.doPrivileged(
-                    new PrivilegedAction<Boolean>() {
-                        @Override public Boolean run() {
-                            return w.getConfirmHandler().call(text);
-                        }
-                    }, getAccessContext());
+                    (PrivilegedAction<Boolean>) () -> w.getConfirmHandler().call(text), getAccessContext());
         }
         return false;
     }
@@ -162,11 +152,7 @@
         if (w != null && w.getPromptHandler() != null) {
             final PromptData data = new PromptData(text, defaultValue);
             return AccessController.doPrivileged(
-                    new PrivilegedAction<String>() {
-                        @Override public String run() {
-                            return w.getPromptHandler().call(data);
-                        }
-                    }, getAccessContext());
+                    (PrivilegedAction<String>) () -> w.getPromptHandler().call(data), getAccessContext());
         }
         return "";
     }
--- a/modules/web/src/main/java/com/sun/javafx/webkit/WebPageClientImpl.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/main/java/com/sun/javafx/webkit/WebPageClientImpl.java	Fri Mar 14 09:02:45 2014 -0700
@@ -30,12 +30,8 @@
       
     static {
         backBufferSupported = Boolean.valueOf(
-                AccessController.doPrivileged(new PrivilegedAction<String>() {
-                    @Override public String run() {
-                        return System.getProperty(
-                                "com.sun.webkit.pagebackbuffer", "true");
-                    }
-                }));
+                AccessController.doPrivileged((PrivilegedAction<String>) () -> System.getProperty(
+                        "com.sun.webkit.pagebackbuffer", "true")));
     }
 
     public WebPageClientImpl(Accessor accessor) {
--- a/modules/web/src/main/java/com/sun/javafx/webkit/drt/DumpRenderTree.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/main/java/com/sun/javafx/webkit/drt/DumpRenderTree.java	Fri Mar 14 09:02:45 2014 -0700
@@ -118,13 +118,11 @@
     private static void initPlatform() throws Exception {
         // initialize default toolkit
         final CountDownLatch latch = new CountDownLatch(1);
-        PlatformImpl.startup(new Runnable() {
-            public void run() {
-                new WebEngine();    // initialize Webkit classes
-                System.loadLibrary("DumpRenderTreeJava");
-                PageCache.setCapacity(1);
-                latch.countDown();
-            }
+        PlatformImpl.startup(() -> {
+            new WebEngine();    // initialize Webkit classes
+            System.loadLibrary("DumpRenderTreeJava");
+            PageCache.setCapacity(1);
+            latch.countDown();
         });
         // wait for libraries to load
         latch.await();
@@ -132,18 +130,16 @@
 
     private static void runTest(final String testString) throws Exception {
         final CountDownLatch latch = new CountDownLatch(1);
-        Invoker.getInvoker().invokeOnEventThread(new Runnable() {
-            public void run() {
-                new DumpRenderTree(testString, latch).run();
-            }});
+        Invoker.getInvoker().invokeOnEventThread(() -> {
+            new DumpRenderTree(testString, latch).run();
+        });
         // wait until test is finished
         latch.await();
-        Invoker.getInvoker().invokeOnEventThread(new Runnable() {
-            public void run() {
-                mlog("dispose");
-                drt.uiClient.closePage();
-                dispose();
-            }});
+        Invoker.getInvoker().invokeOnEventThread(() -> {
+            mlog("dispose");
+            drt.uiClient.closePage();
+            dispose();
+        });
     }
 
     // called from native
--- a/modules/web/src/main/java/com/sun/javafx/webkit/prism/PrismInvoker.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/main/java/com/sun/javafx/webkit/prism/PrismInvoker.java	Fri Mar 14 09:02:45 2014 -0700
@@ -16,10 +16,8 @@
     private final AtomicBoolean isToolkitRunning = new AtomicBoolean(true);
 
     public PrismInvoker() {
-        Toolkit.getToolkit().addShutdownHook(new Runnable() {
-            public void run() {
-                isToolkitRunning.set(false);
-            }
+        Toolkit.getToolkit().addShutdownHook(() -> {
+            isToolkitRunning.set(false);
         });
     }
 
--- a/modules/web/src/main/java/com/sun/javafx/webkit/prism/RTImage.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/main/java/com/sun/javafx/webkit/prism/RTImage.java	Fri Mar 14 09:02:45 2014 -0700
@@ -79,10 +79,8 @@
             int h = srcy2 - srcy1;
             final IntBuffer pixels = IntBuffer.allocate(w * h);
 
-            PrismInvoker.runOnRenderThread(new Runnable() {
-                public void run() {
-                    getTexture().readPixels(pixels);
-                }
+            PrismInvoker.runOnRenderThread(() -> {
+                getTexture().readPixels(pixels);
             });
             Image img = Image.fromIntArgbPreData(pixels, w, h);
             Texture t = g.getResourceFactory().createTexture(
@@ -101,12 +99,10 @@
 
     @Override
     void dispose() {
-        PrismInvoker.invokeOnRenderThread(new Runnable() {
-            public void run() {
-                if (txt != null) {
-                    txt.dispose();
-                    txt = null;
-                }
+        PrismInvoker.invokeOnRenderThread(() -> {
+            if (txt != null) {
+                txt.dispose();
+                txt = null;
             }
         });
     }
@@ -132,38 +128,36 @@
             }
         }
         if (isNew || isDirty()) {
-            PrismInvoker.runOnRenderThread(new Runnable() {
-                public void run() {
-                    flushRQ();
-                    if (txt != null && pixelBuffer != null) {
-                        PixelFormat pf = txt.getPixelFormat();
-                        if (pf != PixelFormat.INT_ARGB_PRE &&
-                            pf != PixelFormat.BYTE_BGRA_PRE) {
+            PrismInvoker.runOnRenderThread(() -> {
+                flushRQ();
+                if (txt != null && pixelBuffer != null) {
+                    PixelFormat pf = txt.getPixelFormat();
+                    if (pf != PixelFormat.INT_ARGB_PRE &&
+                        pf != PixelFormat.BYTE_BGRA_PRE) {
 
-                            throw new AssertionError("Unexpected pixel format: " + pf);
-                        }
+                        throw new AssertionError("Unexpected pixel format: " + pf);
+                    }
 
-                        RTTexture t = txt;
-                        if (pixelScale != 1.0f) {
-                            // Convert [txt] to a texture the size of the image
-                            ResourceFactory f = GraphicsPipeline.getDefaultResourceFactory();
-                            t = f.createRTTexture(width, height, Texture.WrapMode.CLAMP_NOT_NEEDED);
-                            Graphics g = t.createGraphics();
-                            g.drawTexture(txt, 0, 0, width, height,
-                                    0, 0, width * pixelScale, height * pixelScale);
-                        }
-                        
-                        pixelBuffer.rewind();
-                        int[] pixels = t.getPixels();
-                        if (pixels != null) {
-                            pixelBuffer.asIntBuffer().put(pixels);
-                        } else {
-                            t.readPixels(pixelBuffer);
-                        }
+                    RTTexture t = txt;
+                    if (pixelScale != 1.0f) {
+                        // Convert [txt] to a texture the size of the image
+                        ResourceFactory f = GraphicsPipeline.getDefaultResourceFactory();
+                        t = f.createRTTexture(width, height, Texture.WrapMode.CLAMP_NOT_NEEDED);
+                        Graphics g = t.createGraphics();
+                        g.drawTexture(txt, 0, 0, width, height,
+                                0, 0, width * pixelScale, height * pixelScale);
+                    }
 
-                        if (t != txt) {
-                            t.dispose();
-                        }
+                    pixelBuffer.rewind();
+                    int[] pixels = t.getPixels();
+                    if (pixels != null) {
+                        pixelBuffer.asIntBuffer().put(pixels);
+                    } else {
+                        t.readPixels(pixelBuffer);
+                    }
+
+                    if (t != txt) {
+                        t.dispose();
                     }
                 }
             });
--- a/modules/web/src/main/java/com/sun/javafx/webkit/prism/WCImageDecoderImpl.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/main/java/com/sun/javafx/webkit/prism/WCImageDecoderImpl.java	Fri Mar 14 09:02:45 2014 -0700
@@ -89,11 +89,9 @@
                     };
                 }
             };
-            this.loader.valueProperty().addListener(new ChangeListener<ImageFrame[]>() {
-                public void changed(ObservableValue<? extends ImageFrame[]> ov, ImageFrame[] old, ImageFrame[] frames) {
-                    if ((frames != null) && (loader != null)) {
-                        setFrames(frames);
-                    }
+            this.loader.valueProperty().addListener((ov, old, frames1) -> {
+                if ((frames != null) && (loader != null)) {
+                    setFrames(frames);
                 }
             });
         }
--- a/modules/web/src/main/java/com/sun/javafx/webkit/prism/WCRadialGradient.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/main/java/com/sun/javafx/webkit/prism/WCRadialGradient.java	Fri Mar 14 09:02:45 2014 -0700
@@ -16,18 +16,16 @@
 
 final class WCRadialGradient extends WCGradient<RadialGradient> {
 
-    static final Comparator<Stop> COMPARATOR = new Comparator<Stop>() {
-        public int compare(Stop s1, Stop s2) {
-            float o1 = s1.getOffset();
-            float o2 = s2.getOffset();
-            if (o1 < o2) {
-                return -1;
-            }
-            if (o1 > o2) {
-                return 1;
-            }
-            return 0;
+    static final Comparator<Stop> COMPARATOR = (s1, s2) -> {
+        float o1 = s1.getOffset();
+        float o2 = s2.getOffset();
+        if (o1 < o2) {
+            return -1;
         }
+        if (o1 > o2) {
+            return 1;
+        }
+        return 0;
     };
 
     private final boolean reverse;
--- a/modules/web/src/main/java/com/sun/javafx/webkit/prism/WCRenderQueueImpl.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/main/java/com/sun/javafx/webkit/prism/WCRenderQueueImpl.java	Fri Mar 14 09:02:45 2014 -0700
@@ -19,10 +19,8 @@
 
     @Override protected void flush() {
         if (!isEmpty()) {
-            PrismInvoker.invokeOnRenderThread(new Runnable() {
-                @Override public void run() {
-                    decode();
-                }
+            PrismInvoker.invokeOnRenderThread(() -> {
+                decode();
             });
         }
     }
--- a/modules/web/src/main/java/com/sun/javafx/webkit/theme/ContextMenuImpl.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/main/java/com/sun/javafx/webkit/theme/ContextMenuImpl.java	Fri Mar 14 09:02:45 2014 -0700
@@ -33,12 +33,10 @@
         }
         final ContextMenu popupMenu = new ContextMenu();
 
-        popupMenu.setOnAction(new EventHandler<ActionEvent>() {
-            @Override public void handle(ActionEvent t) {
-                MenuItem item = (MenuItem) t.getTarget();
-                log.log(Level.FINE, "onAction: item={0}", item);
-                showContext.notifyItemSelected(((MenuItemPeer)item).getItemPeer().getAction());
-            }
+        popupMenu.setOnAction(t -> {
+            MenuItem item = (MenuItem) t.getTarget();
+            log.log(Level.FINE, "onAction: item={0}", item);
+            showContext.notifyItemSelected(((MenuItemPeer)item).getItemPeer().getAction());
         });
 
         popupMenu.getItems().addAll(fillMenu());
--- a/modules/web/src/main/java/com/sun/javafx/webkit/theme/PopupMenuImpl.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/main/java/com/sun/javafx/webkit/theme/PopupMenuImpl.java	Fri Mar 14 09:02:45 2014 -0700
@@ -28,28 +28,22 @@
     public PopupMenuImpl() {
         popupMenu = new ContextMenu();
 
-        popupMenu.setOnHidden(new EventHandler<WindowEvent>() {
-            @Override public void handle(WindowEvent t) {
-                log.finer("onHidden");
-                // Postpone notification. This is to let webkit
-                // to process a mouse event first (in case the
-                // event is the trigger of the closing). Otherwise,
-                // if this is a click in a drop down list, webkit
-                // will reopen the popup assuming it is hidden.
-                Invoker.getInvoker().postOnEventThread(new Runnable() {
-                    public void run() {
-                        log.finer("onHidden: notifying");
-                        notifyPopupClosed();
-                    }
-                });
-            }
+        popupMenu.setOnHidden(t1 -> {
+            log.finer("onHidden");
+            // Postpone notification. This is to let webkit
+            // to process a mouse event first (in case the
+            // event is the trigger of the closing). Otherwise,
+            // if this is a click in a drop down list, webkit
+            // will reopen the popup assuming it is hidden.
+            Invoker.getInvoker().postOnEventThread(() -> {
+                log.finer("onHidden: notifying");
+                notifyPopupClosed();
+            });
         });
-        popupMenu.setOnAction(new EventHandler<ActionEvent>() {
-            @Override public void handle(ActionEvent t) {
-                MenuItem item = (MenuItem) t.getTarget();
-                log.log(Level.FINE, "onAction: item={0}", item);
-                notifySelectionCommited(popupMenu.getItems().indexOf(item));
-            }
+        popupMenu.setOnAction(t -> {
+            MenuItem item = (MenuItem) t.getTarget();
+            log.log(Level.FINE, "onAction: item={0}", item);
+            notifySelectionCommited(popupMenu.getItems().indexOf(item));
         });
     }
 
--- a/modules/web/src/main/java/com/sun/javafx/webkit/theme/RenderThemeImpl.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/main/java/com/sun/javafx/webkit/theme/RenderThemeImpl.java	Fri Mar 14 09:02:45 2014 -0700
@@ -205,11 +205,9 @@
 
     public RenderThemeImpl(final Accessor accessor) {
         this.accessor = accessor;
-        pool = new Pool<FormControl>(new Pool.Notifier<FormControl>() {
-            @Override public void notifyRemoved(FormControl fc) {
-                // Remove the control from WebView when it's removed from the pool.
-                accessor.removeChild(fc.asControl());
-            }
+        pool = new Pool<FormControl>(fc -> {
+            // Remove the control from WebView when it's removed from the pool.
+            accessor.removeChild(fc.asControl());
         }, FormControl.class);
         accessor.addViewListener(new ViewListener(pool, accessor));
     }
--- a/modules/web/src/main/java/com/sun/javafx/webkit/theme/ScrollBarThemeImpl.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/main/java/com/sun/javafx/webkit/theme/ScrollBarThemeImpl.java	Fri Mar 14 09:02:45 2014 -0700
@@ -78,11 +78,9 @@
     public ScrollBarThemeImpl(final Accessor accessor) {
         this.accessor = accessor;
         pool = new Pool<ScrollBarWidget>(
-            new Pool.Notifier<ScrollBarWidget>() {
-                @Override public void notifyRemoved(ScrollBarWidget sb) {
+                sb -> {
                     accessor.removeChild(sb);
-                }
-            }, ScrollBarWidget.class);
+                }, ScrollBarWidget.class);
         accessor.addViewListener(new ViewListener(pool, accessor) {
             @Override public void invalidated(Observable ov) {
                 super.invalidated(ov);
--- a/modules/web/src/main/java/com/sun/webkit/MainThread.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/main/java/com/sun/webkit/MainThread.java	Fri Mar 14 09:02:45 2014 -0700
@@ -9,11 +9,8 @@
 final class MainThread {
 
     private static void fwkScheduleDispatchFunctions() {
-        Invoker.getInvoker().postOnEventThread(new Runnable() {
-            @Override
-            public void run() {
-                twkScheduleDispatchFunctions();
-            }
+        Invoker.getInvoker().postOnEventThread(() -> {
+            twkScheduleDispatchFunctions();
         });
     }
 
--- a/modules/web/src/main/java/com/sun/webkit/Timer.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/main/java/com/sun/webkit/Timer.java	Fri Mar 14 09:02:45 2014 -0700
@@ -23,13 +23,8 @@
     public synchronized static Mode getMode() {
         if (mode == null) {
             mode = Boolean.valueOf(AccessController.doPrivileged(
-                new PrivilegedAction<String>() {
-                    @Override
-                    public String run() {
-                        return System.getProperty(
-                                "com.sun.webkit.platformticks", "true");
-                    }
-                })) ? Mode.PLATFORM_TICKS : Mode.SEPARATE_THREAD;
+                    (PrivilegedAction<String>) () -> System.getProperty(
+                            "com.sun.webkit.platformticks", "true"))) ? Mode.PLATFORM_TICKS : Mode.SEPARATE_THREAD;
         }
         return mode;
     }
--- a/modules/web/src/main/java/com/sun/webkit/Utilities.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/main/java/com/sun/webkit/Utilities.java	Fri Mar 14 09:02:45 2014 -0700
@@ -69,12 +69,7 @@
                                                AccessControlContext acc)
     throws Throwable {
         try {
-            return AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
-                @Override
-                public Object run() throws Exception {
-                    return MethodUtil.invoke(method, instance, args);
-                }
-            }, acc);
+            return AccessController.doPrivileged((PrivilegedExceptionAction<Object>) () -> MethodUtil.invoke(method, instance, args), acc);
         } catch (PrivilegedActionException ex) {
             Throwable cause = ex.getCause();
             if (cause == null)
--- a/modules/web/src/main/java/com/sun/webkit/WatchdogTimer.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/main/java/com/sun/webkit/WatchdogTimer.java	Fri Mar 14 09:02:45 2014 -0700
@@ -35,14 +35,11 @@
         executor = new ScheduledThreadPoolExecutor(1, threadFactory);
         executor.setRemoveOnCancelPolicy(true);
 
-        runnable = new Runnable() {
-            @Override
-            public void run() {
-                try {
-                    twkFire(nativePointer);
-                } catch (Throwable th) {
-                    logger.log(WARNING, "Error firing watchdog timer", th);
-                }
+        runnable = () -> {
+            try {
+                twkFire(nativePointer);
+            } catch (Throwable th) {
+                logger.log(WARNING, "Error firing watchdog timer", th);
             }
         };
     }
--- a/modules/web/src/main/java/com/sun/webkit/WebPage.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/main/java/com/sun/webkit/WebPage.java	Fri Mar 14 09:02:45 2014 -0700
@@ -101,21 +101,19 @@
     private RenderFrame currentFrame = new RenderFrame();
 
     static {
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
-            public Void run() {
-                NativeLibLoader.loadLibrary("jfxwebkit");
-                log.finer("jfxwebkit loaded");
+        AccessController.doPrivileged((PrivilegedAction<Void>) () -> {
+            NativeLibLoader.loadLibrary("jfxwebkit");
+            log.finer("jfxwebkit loaded");
 
-                if (CookieHandler.getDefault() == null) {
-                    boolean setDefault = Boolean.valueOf(System.getProperty(
-                            "com.sun.webkit.setDefaultCookieHandler",
-                            "true"));
-                    if (setDefault) {
-                        CookieHandler.setDefault(new CookieManager());
-                    }
+            if (CookieHandler.getDefault() == null) {
+                boolean setDefault = Boolean.valueOf(System.getProperty(
+                        "com.sun.webkit.setDefaultCookieHandler",
+                        "true"));
+                if (setDefault) {
+                    CookieHandler.setDefault(new CookieManager());
                 }
-                return null;
             }
+            return null;
         });
     }
 
@@ -594,10 +592,9 @@
         try {
             final WCRenderQueue rq = WCGraphicsManager.getGraphicsManager().
                     createRenderQueue(new WCRectangle(x, y, w, h), true);
-            FutureTask<Void> f = new FutureTask<Void>(new Runnable() {
-                public void run() {
-                    twkUpdateContent(getPage(), rq, x, y, w, h);
-                }}, null);
+            FutureTask<Void> f = new FutureTask<Void>(() -> {
+                twkUpdateContent(getPage(), rq, x, y, w, h);
+            }, null);
             Invoker.getInvoker().invokeOnEventThread(f);
             
             try {
@@ -624,11 +621,8 @@
             if (pageClient != null && pageClient.isBackBufferSupported()) {
                 if (!backbuffer.validate(width, height)) {
                     // We need to repaint the whole page on the next turn
-                    Invoker.getInvoker().invokeOnEventThread(new Runnable() {
-                        @Override
-                        public void run() {
-                            repaintAll();
-                        }
+                    Invoker.getInvoker().invokeOnEventThread(() -> {
+                        repaintAll();
                     });
                     return;
                 }
@@ -1718,13 +1712,11 @@
             final WCRenderQueue rq = WCGraphicsManager.getGraphicsManager().
                     createRenderQueue(null, true);
             final CountDownLatch l = new CountDownLatch(1);
-            Invoker.getInvoker().invokeOnEventThread(new Runnable() {
-                public void run() {
-                    try {
-                        twkPrint(getPage(), rq, pageNumber, width);
-                    } finally {
-                        l.countDown();
-                    }
+            Invoker.getInvoker().invokeOnEventThread(() -> {
+                try {
+                    twkPrint(getPage(), rq, pageNumber, width);
+                } finally {
+                    l.countDown();
                 }
             });
 
--- a/modules/web/src/main/java/com/sun/webkit/graphics/WCMediaPlayer.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/main/java/com/sun/webkit/graphics/WCMediaPlayer.java	Fri Mar 14 09:02:45 2014 -0700
@@ -127,12 +127,9 @@
         if (this.networkState != networkState) {
             this.networkState = networkState;
             final int _networkState = networkState;
-            Invoker.getInvoker().invokeOnEventThread(new Runnable() {
-                @Override
-                public void run() {
-                    if (nPtr != 0) {
-                        notifyNetworkStateChanged(nPtr, _networkState);
-                    }
+            Invoker.getInvoker().invokeOnEventThread(() -> {
+                if (nPtr != 0) {
+                    notifyNetworkStateChanged(nPtr, _networkState);
                 }
             });
         }
@@ -142,12 +139,9 @@
         if (this.readyState != readyState) {
             this.readyState = readyState;
             final int _readyState = readyState;
-            Invoker.getInvoker().invokeOnEventThread(new Runnable() {
-                @Override
-                public void run() {
-                    if (nPtr != 0) {
-                        notifyReadyStateChanged(nPtr, _readyState);
-                    }
+            Invoker.getInvoker().invokeOnEventThread(() -> {
+                if (nPtr != 0) {
+                    notifyReadyStateChanged(nPtr, _readyState);
                 }
             });
         }
@@ -159,12 +153,9 @@
         if (this.paused != paused) {
             this.paused = paused;
             final boolean _paused = paused;
-            Invoker.getInvoker().invokeOnEventThread(new Runnable() {
-                @Override
-                public void run() {
-                    if (nPtr != 0) {
-                        notifyPaused(nPtr, _paused);
-                    }
+            Invoker.getInvoker().invokeOnEventThread(() -> {
+                if (nPtr != 0) {
+                    notifyPaused(nPtr, _paused);
                 }
             });
         }
@@ -179,24 +170,18 @@
             this.readyState = readyState;
             final boolean _seeking = seeking;
             final int _readyState = readyState;
-            Invoker.getInvoker().invokeOnEventThread(new Runnable() {
-                @Override
-                public void run() {
-                    if (nPtr != 0) {
-                        notifySeeking(nPtr, _seeking, _readyState);
-                    }
+            Invoker.getInvoker().invokeOnEventThread(() -> {
+                if (nPtr != 0) {
+                    notifySeeking(nPtr, _seeking, _readyState);
                 }
             });
         }
     }
 
     protected void notifyFinished() {
-        Invoker.getInvoker().invokeOnEventThread(new Runnable() {
-            @Override
-            public void run() {
-                if (nPtr != 0) {
-                    notifyFinished(nPtr);
-                }
+        Invoker.getInvoker().invokeOnEventThread(() -> {
+            if (nPtr != 0) {
+                notifyFinished(nPtr);
             }
         });
     }
@@ -206,24 +191,18 @@
         final boolean _hasVideo = hasVideo;
         final boolean _hasAudio = hasAudio;
         final float _duration = duration;
-        Invoker.getInvoker().invokeOnEventThread(new Runnable() {
-            @Override
-            public void run() {
-                if (nPtr != 0) {
-                    notifyReady(nPtr, _hasVideo, _hasAudio, _duration);
-                }
+        Invoker.getInvoker().invokeOnEventThread(() -> {
+            if (nPtr != 0) {
+                notifyReady(nPtr, _hasVideo, _hasAudio, _duration);
             }
         });
     }
 
     protected void notifyDurationChanged(float newDuration) {
         final float _newDuration = newDuration;
-        Invoker.getInvoker().invokeOnEventThread(new Runnable() {
-            @Override
-            public void run() {
-                if (nPtr != 0) {
-                    notifyDurationChanged(nPtr, _newDuration);
-                }
+        Invoker.getInvoker().invokeOnEventThread(() -> {
+            if (nPtr != 0) {
+                notifyDurationChanged(nPtr, _newDuration);
             }
         });
     }
@@ -232,22 +211,16 @@
         // notify on event thread to ensure native object is valid (nPtr != 0)
         final int _width = width;
         final int _height = height;
-        Invoker.getInvoker().invokeOnEventThread(new Runnable() {
-            @Override
-            public void run() {
-                if (nPtr != 0) {
-                    notifySizeChanged(nPtr, _width, _height);
-                }
+        Invoker.getInvoker().invokeOnEventThread(() -> {
+            if (nPtr != 0) {
+                notifySizeChanged(nPtr, _width, _height);
             }
         });
     }
 
-    private Runnable newFrameNotifier = new Runnable() {
-        @Override
-        public void run() {
-            if (nPtr != 0) {
-                notifyNewFrame(nPtr);
-            }
+    private Runnable newFrameNotifier = () -> {
+        if (nPtr != 0) {
+            notifyNewFrame(nPtr);
         }
     };
 
@@ -260,12 +233,9 @@
         // notify on event thread to ensure native object is valid (nPtr != 0)
         final float[] _ranges = ranges;
         final int _bytesLoaded = bytesLoaded;
-        Invoker.getInvoker().invokeOnEventThread(new Runnable() {
-            @Override
-            public void run() {
-                if (nPtr != 0) {
-                    notifyBufferChanged(nPtr, _ranges, _bytesLoaded);
-                }
+        Invoker.getInvoker().invokeOnEventThread(() -> {
+            if (nPtr != 0) {
+                notifyBufferChanged(nPtr, _ranges, _bytesLoaded);
             }
         });
     }
--- a/modules/web/src/main/java/com/sun/webkit/graphics/WCRenderQueue.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/main/java/com/sun/webkit/graphics/WCRenderQueue.java	Fri Mar 14 09:02:45 2014 -0700
@@ -109,10 +109,8 @@
                 arr[i++] = bdata.getBuffer();
             }
             buffers.clear();
-            Invoker.getInvoker().invokeOnEventThread(new Runnable() {
-                @Override public void run() {
-                    twkRelease(arr);
-                }
+            Invoker.getInvoker().invokeOnEventThread(() -> {
+                twkRelease(arr);
             });
             size = 0;
             if (log.isLoggable(Level.FINE)) {
--- a/modules/web/src/main/java/com/sun/webkit/network/NetworkContext.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/main/java/com/sun/webkit/network/NetworkContext.java	Fri Mar 14 09:02:45 2014 -0700
@@ -160,12 +160,7 @@
         // HTTP exchanges, so return the value of the "http.maxConnections"
         // system property.
         int propValue = AccessController.doPrivileged(
-                new PrivilegedAction<Integer>() {
-                    @Override
-                    public Integer run() {
-                        return Integer.getInteger("http.maxConnections", -1);
-                    }
-                });
+                (PrivilegedAction<Integer>) () -> Integer.getInteger("http.maxConnections", -1));
         return propValue >= 0 ? propValue : DEFAULT_HTTP_MAX_CONNECTIONS;
     }
     
--- a/modules/web/src/main/java/com/sun/webkit/network/SocketStreamHandle.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/main/java/com/sun/webkit/network/SocketStreamHandle.java	Fri Mar 14 09:02:45 2014 -0700
@@ -78,10 +78,8 @@
         final SocketStreamHandle ssh =
                 new SocketStreamHandle(host, port, ssl, webPage, data);
         logger.log(Level.FINEST, "Starting {0}", ssh);
-        threadPool.submit(new Runnable() {
-            @Override public void run() {
-                ssh.run();
-            }
+        threadPool.submit(() -> {
+            ssh.run();
         });
         return ssh;
     }
@@ -98,11 +96,9 @@
             didClose();
             return;
         }
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
-            @Override public Void run() {
-                doRun();
-                return null;
-            }
+        AccessController.doPrivileged((PrivilegedAction<Void>) () -> {
+            doRun();
+            return null;
         }, webPage.getAccessControlContext());
     }
 
@@ -197,11 +193,7 @@
         IOException lastException = null;
         boolean triedDirectConnection = false;
         ProxySelector proxySelector = AccessController.doPrivileged(
-                new PrivilegedAction<ProxySelector>() {
-                    public ProxySelector run() {
-                        return ProxySelector.getDefault();
-                    }
-                });
+                (PrivilegedAction<ProxySelector>) () -> ProxySelector.getDefault());
         if (proxySelector != null) {
             URI uri;
             try {
@@ -318,41 +310,33 @@
     }
 
     private void didOpen() {
-        Invoker.getInvoker().postOnEventThread(new Runnable() {
-            @Override public void run() {
-                if (state == State.ACTIVE) {
-                    notifyDidOpen();
-                }
+        Invoker.getInvoker().postOnEventThread(() -> {
+            if (state == State.ACTIVE) {
+                notifyDidOpen();
             }
         });
     }
 
     private void didReceiveData(final byte[] buffer, final int len) {
-        Invoker.getInvoker().postOnEventThread(new Runnable() {
-            @Override public void run() {
-                if (state == State.ACTIVE) {
-                    notifyDidReceiveData(buffer, len);
-                }
+        Invoker.getInvoker().postOnEventThread(() -> {
+            if (state == State.ACTIVE) {
+                notifyDidReceiveData(buffer, len);
             }
         });
     }
 
     private void didFail(final int errorCode, final String errorDescription) {
-        Invoker.getInvoker().postOnEventThread(new Runnable() {
-            @Override public void run() {
-                if (state == State.ACTIVE) {
-                    notifyDidFail(errorCode, errorDescription);
-                }
+        Invoker.getInvoker().postOnEventThread(() -> {
+            if (state == State.ACTIVE) {
+                notifyDidFail(errorCode, errorDescription);
             }
         });
     }
 
     private void didClose() {
-        Invoker.getInvoker().postOnEventThread(new Runnable() {
-            @Override public void run() {
-                if (state != State.DISPOSED) {
-                    notifyDidClose();
-                }
+        Invoker.getInvoker().postOnEventThread(() -> {
+            if (state != State.DISPOSED) {
+                notifyDidClose();
             }
         });
     }
--- a/modules/web/src/main/java/com/sun/webkit/network/URLLoader.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/main/java/com/sun/webkit/network/URLLoader.java	Fri Mar 14 09:02:45 2014 -0700
@@ -101,12 +101,9 @@
     @Override
     public void run() {
         // Run the loader in the page's access control context
-        AccessController.doPrivileged(new PrivilegedAction<Void>() {
-            @Override
-            public Void run() {
-                doRun();
-                return null;
-            }
+        AccessController.doPrivileged((PrivilegedAction<Void>) () -> {
+            doRun();
+            return null;
         }, webPage.getAccessControlContext());
     }
 
@@ -590,12 +587,9 @@
     private void didSendData(final long totalBytesSent,
                              final long totalBytesToBeSent)
     {
-        callBack(new Runnable() {
-            @Override
-            public void run() {
-                if (!canceled) {
-                    notifyDidSendData(totalBytesSent, totalBytesToBeSent);
-                }
+        callBack(() -> {
+            if (!canceled) {
+                notifyDidSendData(totalBytesSent, totalBytesToBeSent);
             }
         });
     }
@@ -628,28 +622,25 @@
         final String adjustedUrl = adjustUrlForWebKit(url);
         final CountDownLatch latch =
                 asynchronous ? new CountDownLatch(1) : null;
-        callBack(new Runnable() {
-            @Override
-            public void run() {
-                try {
-                    if (!canceled) {
-                        boolean keepGoing = notifyWillSendRequest(
-                                adjustedNewUrl,
-                                newMethod,
-                                status,
-                                contentType,
-                                contentEncoding,
-                                contentLength,
-                                responseHeaders,
-                                adjustedUrl);
-                        if (!keepGoing) {
-                            fwkCancel();
-                        }
+        callBack(() -> {
+            try {
+                if (!canceled) {
+                    boolean keepGoing = notifyWillSendRequest(
+                            adjustedNewUrl,
+                            newMethod,
+                            status,
+                            contentType,
+                            contentEncoding,
+                            contentLength,
+                            responseHeaders,
+                            adjustedUrl);
+                    if (!keepGoing) {
+                        fwkCancel();
                     }
-                } finally {
-                    if (latch != null) {
-                        latch.countDown();
-                    }
+                }
+            } finally {
+                if (latch != null) {
+                    latch.countDown();
                 }
             }
         });
@@ -711,18 +702,15 @@
         final long contentLength = extractContentLength(c);
         final String responseHeaders = extractHeaders(c);
         final String adjustedUrl = adjustUrlForWebKit(url);
-        callBack(new Runnable() {
-            @Override
-            public void run() {
-                if (!canceled) {
-                    notifyDidReceiveResponse(
-                            status,
-                            contentType,
-                            contentEncoding,
-                            contentLength,
-                            responseHeaders,
-                            adjustedUrl);
-                }
+        callBack(() -> {
+            if (!canceled) {
+                notifyDidReceiveResponse(
+                        status,
+                        contentType,
+                        contentEncoding,
+                        contentLength,
+                        responseHeaders,
+                        adjustedUrl);
             }
         });
     }
@@ -764,18 +752,15 @@
     private void didReceiveData(final ByteBuffer byteBuffer,
                                 final ByteBufferAllocator allocator)
     {
-        callBack(new Runnable() {
-            @Override
-            public void run() {
-                if (!canceled) {
-                    notifyDidReceiveData(
-                            byteBuffer,
-                            byteBuffer.position(),
-                            byteBuffer.remaining());
-                }
-                byteBuffer.clear();
-                allocator.release(byteBuffer);
+        callBack(() -> {
+            if (!canceled) {
+                notifyDidReceiveData(
+                        byteBuffer,
+                        byteBuffer.position(),
+                        byteBuffer.remaining());
             }
+            byteBuffer.clear();
+            allocator.release(byteBuffer);
         });
     }
 
@@ -798,12 +783,9 @@
     }
 
     private void didFinishLoading() {
-        callBack(new Runnable() {
-            @Override
-            public void run() {
-                if (!canceled) {
-                    notifyDidFinishLoading();
-                }
+        callBack(() -> {
+            if (!canceled) {
+                notifyDidFinishLoading();
             }
         });
     }
@@ -817,12 +799,9 @@
 
     private void didFail(final int errorCode, final String message) {
         final String adjustedUrl = adjustUrlForWebKit(url);
-        callBack(new Runnable() {
-            @Override
-            public void run() {
-                if (!canceled) {
-                    notifyDidFail(errorCode, adjustedUrl, message);
-                }
+        callBack(() -> {
+            if (!canceled) {
+                notifyDidFail(errorCode, adjustedUrl, message);
             }
         });
     }
--- a/modules/web/src/main/java/com/sun/webkit/perf/PerfLogger.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/main/java/com/sun/webkit/perf/PerfLogger.java	Fri Mar 14 09:02:45 2014 -0700
@@ -133,30 +133,26 @@
         return log.getName() + "." + probe;
     }
 
-    private final Comparator timeComparator = new Comparator() {
-        public int compare(Object arg0, Object arg1) {
-            long t0 = probes.get((String)arg0).totalTime;
-            long t1 = probes.get((String)arg1).totalTime;
-            if (t0 > t1) {
-                return 1;
-            } else if (t0 < t1) {
-                return -1;
-            }
-            return 0;
+    private final Comparator timeComparator = (arg0, arg1) -> {
+        long t0 = probes.get((String)arg0).totalTime;
+        long t1 = probes.get((String)arg1).totalTime;
+        if (t0 > t1) {
+            return 1;
+        } else if (t0 < t1) {
+            return -1;
         }
+        return 0;
     };
 
-    private final Comparator countComparator = new Comparator() {
-        public int compare(Object arg0, Object arg1) {
-            long c0 = probes.get((String)arg0).count;
-            long c1 = probes.get((String)arg1).count;
-            if (c0 > c1) {
-                return 1;
-            } else if (c0 < c1) {
-                return -1;
-            }
-            return 0;
+    private final Comparator countComparator = (arg0, arg1) -> {
+        long c0 = probes.get((String)arg0).count;
+        long c1 = probes.get((String)arg1).count;
+        if (c0 > c1) {
+            return 1;
+        } else if (c0 < c1) {
+            return -1;
         }
+        return 0;
     };
 
     /**
--- a/modules/web/src/main/java/javafx/scene/web/WebEngine.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/main/java/javafx/scene/web/WebEngine.java	Fri Mar 14 09:02:45 2014 -0700
@@ -261,11 +261,7 @@
  */
 final public class WebEngine {
     static {
-        Accessor.setPageAccessor(new Accessor.PageAccessor() {
-            @Override public WebPage getPage(WebEngine w) {
-                return w == null ? null : w.getPage();
-            }
-        });
+        Accessor.setPageAccessor(w -> w == null ? null : w.getPage());
 
         Invoker.setInvoker(new PrismInvoker());
         Renderer.setRenderer(new PrismRenderer());
@@ -677,11 +673,7 @@
     
     private final ObjectProperty<Callback<PopupFeatures, WebEngine>> createPopupHandler
             = new SimpleObjectProperty<Callback<PopupFeatures, WebEngine>>(this, "createPopupHandler",
-                new Callback<PopupFeatures, WebEngine>() {
-                    public WebEngine call(PopupFeatures p) {
-                        return WebEngine.this;
-                    }
-                });
+            p -> WebEngine.this);
     
     /**
      * Returns the JavaScript popup handler.
@@ -1145,15 +1137,13 @@
             };
 
         private static final TKPulseListener listener =
-            new TKPulseListener() {
-                public void pulse() {
+                () -> {
                     // Note, the timer event is executed right in the notifyTick(),
                     // that is during the pulse event. This makes the timer more
                     // repsonsive, though prolongs the pulse. So far it causes no
                     // problems but nevertheless it should be kept in mind.
                     Timer.getTimer().notifyTick();
-                }
-            };
+                };
 
         private static void start(){
             Toolkit.getToolkit().addSceneTkPulseListener(listener);
@@ -1528,11 +1518,9 @@
                 final Callback<String,Void> messageCallback =
                         webEngine.debugger.messageCallback;
                 if (messageCallback != null) {
-                    AccessController.doPrivileged(new PrivilegedAction<Void>() {
-                        @Override public Void run() {
-                            messageCallback.call(message);
-                            return null;
-                        }
+                    AccessController.doPrivileged((PrivilegedAction<Void>) () -> {
+                        messageCallback.call(message);
+                        return null;
                     }, webEngine.page.getAccessControlContext());
                     result = true;
                 }
--- a/modules/web/src/main/java/javafx/scene/web/WebHistory.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/main/java/javafx/scene/web/WebHistory.java	Fri Mar 14 09:02:45 2014 -0700
@@ -64,20 +64,17 @@
             this.lastVisitedDate.set(entry.getLastVisitedDate());
             this.peer = entry;
             
-            entry.addChangeListener(new WCChangeListener() {
-                @Override
-                public void stateChanged(WCChangeEvent e) {
-                    String _title = entry.getTitle();
-                    // null title is acceptable
-                    if (_title == null || !_title.equals(getTitle())) {
-                        title.set(_title);
-                    }
-                    
-                    Date _date = entry.getLastVisitedDate();
-                    // null date is not acceptable
-                    if (_date != null && !_date.equals(getLastVisitedDate())) {
-                        lastVisitedDate.set(_date);
-                    }
+            entry.addChangeListener(e -> {
+                String _title = entry.getTitle();
+                // null title is acceptable
+                if (_title == null || !_title.equals(getTitle())) {
+                    title.set(_title);
+                }
+
+                Date _date = entry.getLastVisitedDate();
+                // null date is not acceptable
+                if (_date != null && !_date.equals(getLastVisitedDate())) {
+                    lastVisitedDate.set(_date);
                 }
             });
         }
@@ -139,58 +136,55 @@
         
         setMaxSize(getMaxSize()); // init default
         
-        this.bfl.addChangeListener(new WCChangeListener() {
-            @Override
-            public void stateChanged(WCChangeEvent e) {
-                // 1. Size has increased
-                //    - one new entry is appended.
-                //    - currentIndex is set to the new entry.
-                if (bfl.size() > list.size()) {
-                    assert (bfl.size() == list.size() + 1);
-                    list.add(new Entry(bfl.getCurrentEntry()));
-                    
-                    WebHistory.this.setCurrentIndex(list.size() - 1);
+        this.bfl.addChangeListener(e -> {
+            // 1. Size has increased
+            //    - one new entry is appended.
+            //    - currentIndex is set to the new entry.
+            if (bfl.size() > list.size()) {
+                assert (bfl.size() == list.size() + 1);
+                list.add(new Entry(bfl.getCurrentEntry()));
+
+                WebHistory.this.setCurrentIndex(list.size() - 1);
+                return;
+            }
+
+            // 2. Size hasn't changed
+            if (bfl.size() == list.size()) {
+                if (list.size() == 0) {
+                    return; // no changes
+                }
+                assert (list.size() > 0);
+                BackForwardList.Entry last = bfl.get(list.size() - 1);
+                BackForwardList.Entry first = bfl.get(0);
+
+                // - currentIndex may change
+                if (list.get(list.size() - 1).isPeer(last)) {
+                    WebHistory.this.setCurrentIndex(bfl.getCurrentIndex());
+                    return;
+
+                // - first entry is removed.
+                // - one new entry is appended.
+                // - currentIndex is set to the new entry.
+                } else if (!list.get(0).isPeer(first)) {
+                    list.remove(0);
+                    list.add(new Entry(last));
+                    WebHistory.this.setCurrentIndex(bfl.getCurrentIndex());
                     return;
                 }
-                
-                // 2. Size hasn't changed
-                if (bfl.size() == list.size()) {
-                    if (list.size() == 0) {
-                        return; // no changes
-                    }                    
-                    assert (list.size() > 0);
-                    BackForwardList.Entry last = bfl.get(list.size() - 1);
-                    BackForwardList.Entry first = bfl.get(0);
-                    
-                    // - currentIndex may change
-                    if (list.get(list.size() - 1).isPeer(last)) {
-                        WebHistory.this.setCurrentIndex(bfl.getCurrentIndex());
-                        return;
-                    
-                    // - first entry is removed.
-                    // - one new entry is appended.
-                    // - currentIndex is set to the new entry.
-                    } else if (!list.get(0).isPeer(first)) {
-                        list.remove(0);
-                        list.add(new Entry(last));
-                        WebHistory.this.setCurrentIndex(bfl.getCurrentIndex());                        
-                        return;
-                    }
-                }
-                                
-                // 3. Size has decreased or hasn't changed (due to maxSize or navigation)
-                //    - one or more entries are popped.
-                //    - one new entry may be appended.
-                //    - currentIndex may be set to the new entry.
-                assert (bfl.size() <= list.size());                
-                list.remove(bfl.size(), list.size()); // no-op if equals
-                int lastIndex = list.size() - 1;
-                if (lastIndex >= 0 && !list.get(lastIndex).isPeer(bfl.get(lastIndex))) {
-                    list.remove(lastIndex);
-                    list.add(new Entry(bfl.get(lastIndex)));
-                }
-                WebHistory.this.setCurrentIndex(bfl.getCurrentIndex());
             }
+
+            // 3. Size has decreased or hasn't changed (due to maxSize or navigation)
+            //    - one or more entries are popped.
+            //    - one new entry may be appended.
+            //    - currentIndex may be set to the new entry.
+            assert (bfl.size() <= list.size());
+            list.remove(bfl.size(), list.size()); // no-op if equals
+            int lastIndex = list.size() - 1;
+            if (lastIndex >= 0 && !list.get(lastIndex).isPeer(bfl.get(lastIndex))) {
+                list.remove(lastIndex);
+                list.add(new Entry(bfl.get(lastIndex)));
+            }
+            WebHistory.this.setCurrentIndex(bfl.getCurrentIndex());
         });
     }
     
--- a/modules/web/src/main/java/javafx/scene/web/WebView.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/main/java/javafx/scene/web/WebView.java	Fri Mar 14 09:02:45 2014 -0700
@@ -252,22 +252,17 @@
         page.setFontSmoothingType(DEFAULT_FONT_SMOOTHING_TYPE.ordinal());
 
         registerEventHandlers();
-        stagePulseListener = new TKPulseListener() {
-            @Override public void pulse() {
-                handleStagePulse();
-            }
+        stagePulseListener = () -> {
+            handleStagePulse();
         };
-        focusedProperty().addListener(new ChangeListener<Boolean>() {
-
-            public void changed(ObservableValue<? extends Boolean> ov, Boolean t, Boolean t1) {
-                if (page != null) {
-                    // Traversal direction is not currently available in FX.
-                    WCFocusEvent focusEvent = new WCFocusEvent(
-                        isFocused() ? WCFocusEvent.FOCUS_GAINED
-                                : WCFocusEvent.FOCUS_LOST,
-                    WCFocusEvent.UNKNOWN);
-                    page.dispatchFocusEvent(focusEvent);
-                }
+        focusedProperty().addListener((ov, t, t1) -> {
+            if (page != null) {
+                // Traversal direction is not currently available in FX.
+                WCFocusEvent focusEvent = new WCFocusEvent(
+                    isFocused() ? WCFocusEvent.FOCUS_GAINED
+                            : WCFocusEvent.FOCUS_LOST,
+                WCFocusEvent.UNKNOWN);
+                page.dispatchFocusEvent(focusEvent);
             }
         });
         setFocusTraversable(true);
@@ -1119,14 +1114,11 @@
 
     private void registerEventHandlers() {
         addEventHandler(KeyEvent.ANY,
-            new EventHandler<KeyEvent>() {
-                @Override public void handle(final KeyEvent event) {
+                event -> {
                     processKeyEvent(event);
-                }
-            });
+                });
         addEventHandler(MouseEvent.ANY,
-            new EventHandler<MouseEvent>() {
-                @Override public void handle(final MouseEvent event) {
+                event -> {
                     processMouseEvent(event);
                     if (event.isDragDetect() && !page.isDragConfirmed()) {
                         //postpone drag recognition:
@@ -1134,52 +1126,45 @@
                         //or selection.
                         event.setDragDetect(false);
                     }
-                }
-            });
+                });
         addEventHandler(ScrollEvent.SCROLL,
-            new EventHandler<ScrollEvent>() {
-                @Override public void handle(final ScrollEvent event) {
+                event -> {
                     processScrollEvent(event);
-                }
-            });
+                });
         setOnInputMethodTextChanged(
-            new EventHandler<InputMethodEvent>() {
-                @Override public void handle(final InputMethodEvent event) {
+                event -> {
                     processInputMethodEvent(event);
-                }
-            });
+                });
 
         //Drop target implementation:
-        EventHandler<DragEvent> destHandler = new EventHandler <DragEvent>() {
-            @Override public void handle(DragEvent event) {
-                Dragboard db = event.getDragboard();
-                LinkedList<String> mimes = new LinkedList<String>();
-                LinkedList<String> values = new LinkedList<String>();
-                for (DataFormat df : db.getContentTypes()) {
-                    //TODO: extend to non-string serialized values.
-                    //Please, look at the native code.
-                    Object content = db.getContent(df);
-                    if (content != null) {
-                        for (String mime : df.getIdentifiers()) {
-                            mimes.add(mime);
-                            values.add(content.toString());
-                        }
+        EventHandler<DragEvent> destHandler = event -> {
+            Dragboard db = event.getDragboard();
+            LinkedList<String> mimes = new LinkedList<String>();
+            LinkedList<String> values = new LinkedList<String>();
+            for (DataFormat df : db.getContentTypes()) {
+                //TODO: extend to non-string serialized values.
+                //Please, look at the native code.
+                Object content = db.getContent(df);
+                if (content != null) {
+                    for (String mime : df.getIdentifiers()) {
+                        mimes.add(mime);
+                        values.add(content.toString());
                     }
                 }
-                if (!mimes.isEmpty()) {
-                    int wkDndEventType = getWKDndEventType(event.getEventType());
-                    int wkDndAction = page.dispatchDragOperation(
-                        wkDndEventType,
-                        mimes.toArray(new String[0]), values.toArray(new String[0]),
-                        (int)event.getX(), (int)event.getY(),
-                        (int)event.getScreenX(), (int)event.getScreenY(),
-                        getWKDndAction(db.getTransferModes().toArray(new TransferMode[0])));
+            }
+            if (!mimes.isEmpty()) {
+                int wkDndEventType = getWKDndEventType(event.getEventType());
+                int wkDndAction = page.dispatchDragOperation(
+                    wkDndEventType,
+                    mimes.toArray(new String[0]), values.toArray(new String[0]),
+                    (int)event.getX(), (int)event.getY(),
+                    (int)event.getScreenX(), (int)event.getScreenY(),
+                    getWKDndAction(db.getTransferModes().toArray(new TransferMode[0])));
 
-                    //we cannot accept nothing on drop (we skip FX exception)
-                    if ( !(wkDndEventType == WebPage.DND_DST_DROP && wkDndAction == WK_DND_ACTION_NONE) )
-                        event.acceptTransferModes(getFXDndAction(wkDndAction));
-                    event.consume();
-                }
+                //we cannot accept nothing on drop (we skip FX exception)
+                if ( !(wkDndEventType == WebPage.DND_DST_DROP && wkDndAction == WK_DND_ACTION_NONE) )
+                    event.acceptTransferModes(getFXDndAction(wkDndAction));
+                event.consume();
             }
         };
         setOnDragEntered(destHandler);
@@ -1188,24 +1173,20 @@
         setOnDragDropped(destHandler);
 
         //Drag source implementation:
-        setOnDragDetected( new EventHandler<MouseEvent>() {
-             @Override public void handle(MouseEvent event) {
-                    if (page.isDragConfirmed()) {
-                        page.confirmStartDrag();
-                        event.consume();
-                    }
-                }
-            });
-        setOnDragDone( new EventHandler<DragEvent>() {
-            @Override public void handle(DragEvent event) {
-                    page.dispatchDragOperation(
-                        WebPage.DND_SRC_DROP,
-                        null, null,
-                        (int)event.getX(), (int)event.getY(),
-                        (int)event.getScreenX(), (int)event.getScreenY(),
-                        getWKDndAction(event.getAcceptedTransferMode()));
-                    event.consume();
-                }
+        setOnDragDetected(event -> {
+               if (page.isDragConfirmed()) {
+                   page.confirmStartDrag();
+                   event.consume();
+               }
+           });
+        setOnDragDone(event -> {
+                page.dispatchDragOperation(
+                    WebPage.DND_SRC_DROP,
+                    null, null,
+                    (int)event.getX(), (int)event.getY(),
+                    (int)event.getScreenX(), (int)event.getScreenY(),
+                    getWKDndAction(event.getAcceptedTransferMode()));
+                event.consume();
             });
 
         setInputMethodRequests(getInputMethodClient());
--- a/modules/web/src/test/java/javafx/scene/web/BindingTest.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/test/java/javafx/scene/web/BindingTest.java	Fri Mar 14 09:02:45 2014 -0700
@@ -15,7 +15,7 @@
 public class BindingTest extends TestBase {
     
     @Test public void testWebView() throws InterruptedException {
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             WebView main = getView();
             WebView test = new WebView();
 
@@ -40,7 +40,7 @@
             main.setMaxWidth(99.9);
             main.setPrefWidth(88.8);
             main.setMinWidth(77.7);
-            
+
             assertEquals("WebView.contextMenuEnabled",
                     main.isContextMenuEnabled(), test.isContextMenuEnabled());
             assertEquals("WebView.fontScale",
@@ -68,22 +68,22 @@
                     main.getEngine().getPage().getZoomFactor(true),
                     test.getEngine().getPage().getZoomFactor(true),
                     0.0);
-        }});
+        });
     }
 
     @Test public void testWebEngineWritableProperties() {
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             WebEngine web = getEngine();
             WebEngine test = new WebEngine();
-            
+
             test.javaScriptEnabledProperty().bind(web.javaScriptEnabledProperty());
             test.userAgentProperty().bind(web.userAgentProperty());
             test.userStyleSheetLocationProperty().bind(web.userStyleSheetLocationProperty());
-            
+
             web.setJavaScriptEnabled(false);
             web.setUserAgent("JavaFX/WebView");
             web.setUserStyleSheetLocation("");
-            
+
             assertEquals("WebEngine.javaScriptEnabled",
                     web.isJavaScriptEnabled(), test.isJavaScriptEnabled());
             assertEquals("WebEngine.userAgent",
@@ -91,7 +91,7 @@
             assertEquals("WebEngine.userStyleSheetLocation",
                     web.getUserStyleSheetLocation(), test.getUserStyleSheetLocation());
 
-        }});
+        });
     }
     
     @Test public void testWebEngineReadonlyProperties() {
--- a/modules/web/src/test/java/javafx/scene/web/CSSTest.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/test/java/javafx/scene/web/CSSTest.java	Fri Mar 14 09:02:45 2014 -0700
@@ -13,10 +13,10 @@
 public class CSSTest extends TestBase {
 
     private void setStyle(final String style) {
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             getView().setStyle(style);
             new Scene(getView()).snapshot(null);
-        }});
+        });
     }
 
 
@@ -29,17 +29,17 @@
     }
 
     @Test public void testContextMenuEnabledManual() {
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             getView().setContextMenuEnabled(false);
             testContextMenuEnabled(false);
-        }});
+        });
     }
 
     @Test public void testContextMenuEnabledCSS() {
         setStyle("-fx-context-menu-enabled: false");
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             testContextMenuEnabled(false);
-        }});
+        });
     }
 
 
@@ -52,20 +52,16 @@
     }
 
     @Test public void testZoomManual() {
-        submit(new Runnable() {
-            public void run() {
-                getView().setZoom(3);
-                testZoom(3);
-            }
+        submit(() -> {
+            getView().setZoom(3);
+            testZoom(3);
         });
     }
 
     @Test public void testZoomCSS() {
         setStyle("-fx-zoom: .3");
-        submit(new Runnable() {
-            public void run() {
-                testZoom(0.3);
-            }
+        submit(() -> {
+            testZoom(0.3);
         });
     }
 
@@ -79,17 +75,17 @@
     }
 
     @Test public void testFontSmoothingTypeManual() {
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             getView().setFontSmoothingType(FontSmoothingType.GRAY);
             testFontSmoothingType(FontSmoothingType.GRAY);
-        }});
+        });
     }
 
     @Test public void testFontSmoothingTypeCSS() {
         setStyle("-fx-font-smoothing-type: gray");
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             testFontSmoothingType(FontSmoothingType.GRAY);
-        }});
+        });
     }
 
 
@@ -102,17 +98,17 @@
     }
 
     @Test public void testFontScaleManual() {
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             getView().setFontScale(2);
             testFontScale(2);
-        }});
+        });
     }
 
     @Test public void testFontScaleCSS() {
         setStyle("-fx-font-scale: .2");
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             testFontScale(0.2);
-        }});
+        });
     }
 
 
@@ -125,17 +121,17 @@
     }
 
     @Test public void testMinWidthManual() {
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             getView().setMinWidth(2);
             testMinWidth(2);
-        }});
+        });
     }
 
     @Test public void testMinWidthCSS() {
         setStyle("-fx-min-width: 3px");
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             testMinWidth(3);
-        }});
+        });
     }
 
 
@@ -148,17 +144,17 @@
     }
 
     @Test public void testMinHeightManual() {
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             getView().setMinHeight(2);
             testMinHeight(2);
-        }});
+        });
     }
 
     @Test public void testMinHeightCSS() {
         setStyle("-fx-min-height: 3px");
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             testMinHeight(3);
-        }});
+        });
     }
 
 
@@ -171,17 +167,17 @@
     }
 
     @Test public void testPrefWidthManual() {
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             getView().setPrefWidth(2);
             testPrefWidth(2);
-        }});
+        });
     }
 
     @Test public void testPrefWidthCSS() {
         setStyle("-fx-pref-width: 3px");
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             testPrefWidth(3);
-        }});
+        });
     }
 
 
@@ -194,17 +190,17 @@
     }
 
     @Test public void testPrefHeightManual() {
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             getView().setPrefHeight(2);
             testPrefHeight(2);
-        }});
+        });
     }
 
     @Test public void testPrefHeightCSS() {
         setStyle("-fx-pref-height: 3px");
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             testPrefHeight(3);
-        }});
+        });
     }
 
 
@@ -217,17 +213,17 @@
     }
 
     @Test public void testMaxWidthManual() {
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             getView().setMaxWidth(2);
             testMaxWidth(2);
-        }});
+        });
     }
 
     @Test public void testMaxWidthCSS() {
         setStyle("-fx-max-width: 3px");
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             testMaxWidth(3);
-        }});
+        });
     }
 
 
@@ -240,16 +236,16 @@
     }
 
     @Test public void testMaxHeightManual() {
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             getView().setMaxHeight(2);
             testMaxHeight(2);
-        }});
+        });
     }
 
     @Test public void testMaxHeightCSS() {
         setStyle("-fx-max-height: 3px");
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             testMaxHeight(3);
-        }});
+        });
     }
 }
--- a/modules/web/src/test/java/javafx/scene/web/CallbackTest.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/test/java/javafx/scene/web/CallbackTest.java	Fri Mar 14 09:02:45 2014 -0700
@@ -120,11 +120,7 @@
         ByteArrayOutputStream bytes = new ByteArrayOutputStream();
         System.setErr(new PrintStream(bytes));
         
-        getEngine().setCreatePopupHandler(new Callback<PopupFeatures, WebEngine>() {
-            public WebEngine call(PopupFeatures features) {
-                return null;
-            }
-        });
+        getEngine().setCreatePopupHandler(features -> null);
         executeScript(JS_OPEN_DEFAULT);
 
         System.setErr(err);
@@ -245,61 +241,47 @@
         }
 
         public final EventHandler<WebEvent<String>> onAlert =
-                new EventHandler<WebEvent<String>>() {
-                    @Override public void handle(WebEvent<String> ev) {
-                        called(ALERT, ev.getData());
-                    }
+                ev -> {
+                    called(ALERT, ev.getData());
                 };
 
         public final EventHandler<WebEvent<String>> onStatusChanged =
-                new EventHandler<WebEvent<String>>() {
-                    @Override public void handle(WebEvent<String> ev) {
-                        called(STATUS_CHANGED, ev.getData());
-                    }
+                ev -> {
+                    called(STATUS_CHANGED, ev.getData());
                 };
 
         public final EventHandler<WebEvent<Rectangle2D>> onResized =
-                new EventHandler<WebEvent<Rectangle2D>>() {
-                    @Override public void handle(WebEvent<Rectangle2D> ev) {
-                        Rectangle2D r = ev.getData();
-                        called(RESIZED, r.getMinX(), r.getMinY(),
-                                        r.getWidth(), r.getHeight());
-                    }
+                ev -> {
+                    Rectangle2D r = ev.getData();
+                    called(RESIZED, r.getMinX(), r.getMinY(),
+                                    r.getWidth(), r.getHeight());
                 };
 
         public final EventHandler<WebEvent<Boolean>> onVisibilityChanged =
-                new EventHandler<WebEvent<Boolean>>() {
-                    @Override public void handle(WebEvent<Boolean> ev) {
-                        called(VISIBILITY_CHANGED, ev.getData());
-                    }
+                ev -> {
+                    called(VISIBILITY_CHANGED, ev.getData());
                 };
 
         public final Callback<PopupFeatures, WebEngine> createPopup =
-                new Callback<PopupFeatures, WebEngine>() {
-                    @Override public WebEngine call(PopupFeatures f) {
-                        called(CREATE_POPUP, f.hasMenu(), f.hasStatus(),
-                                f.hasToolbar(), f.isResizable());
-                        WebEngine w2 = new WebEngine();
-                        w2.setOnResized(popupUi.onResized);
-                        w2.setOnVisibilityChanged(popupUi.onVisibilityChanged);
-                        return w2;
-                    }
+                f -> {
+                    called(CREATE_POPUP, f.hasMenu(), f.hasStatus(),
+                            f.hasToolbar(), f.isResizable());
+                    WebEngine w2 = new WebEngine();
+                    w2.setOnResized(popupUi.onResized);
+                    w2.setOnVisibilityChanged(popupUi.onVisibilityChanged);
+                    return w2;
                 };
 
         public final Callback<String, Boolean> confirm =
-                new Callback<String, Boolean>() {
-                    @Override public Boolean call(String message) {
-                        called(CONFIRM, message);
-                        return false;
-                    }
+                message -> {
+                    called(CONFIRM, message);
+                    return false;
                 };
 
         public final Callback<PromptData, String> prompt =
-                new Callback<PromptData, String>() {
-                    @Override public String call(PromptData data) {
-                        called(PROMPT, data.getMessage(), data.getDefaultValue());
-                        return data.getDefaultValue();
-                    }
+                data -> {
+                    called(PROMPT, data.getMessage(), data.getDefaultValue());
+                    return data.getDefaultValue();
                 };
     }
 }
--- a/modules/web/src/test/java/javafx/scene/web/DOMTest.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/test/java/javafx/scene/web/DOMTest.java	Fri Mar 14 09:02:45 2014 -0700
@@ -29,16 +29,16 @@
 
     @Test public void testEmptyTextContent() {
         final Document doc = getDocumentFor("src/test/resources/html/dom.html");
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             Element emptyP = doc.getElementById("empty-paragraph");
             String textContent = emptyP.getTextContent();
             assertEquals("Text content of an empty paragraph", "", textContent);
-        }});
+        });
     }
 
     @Test public void testAppendChild() {
         final Document doc = getDocumentFor("src/test/resources/html/dom.html");
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             Node p1 = doc.getElementById("p1");
             NodeList c1 = p1.getChildNodes();
             Node left1 = c1.item(2);
@@ -63,12 +63,12 @@
             verifyChildAdded(n, p1, count1);
             verifySiblings(n, left1, null);
             assertSame("Returned node", n, ret);
-        }});
+        });
     }
 
     @Test public void testInsertBeforeEnd() {
         final Document doc = getDocumentFor("src/test/resources/html/dom.html");
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             Node p1 = doc.getElementById("p1");
             NodeList c1 = p1.getChildNodes();
             Node left1 = c1.item(2);
@@ -102,12 +102,12 @@
             verifyChildAdded(n, p1, count1);
             verifySiblings(n, left1, null);
             assertSame("Returned node", n, ret);
-        }});
+        });
     }
 
     @Test public void testInsertBefore() {
         final Document doc = getDocumentFor("src/test/resources/html/dom.html");
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             Node p1 = doc.getElementById("p1");
             NodeList c1 = p1.getChildNodes();
             Node left1 = c1.item(0);
@@ -127,12 +127,12 @@
             verifyChildAdded(n, p1, count1);
             verifySiblings(n, left1, right1);
             assertEquals("Returned node", n, ret);
-        }});
+        });
     }
 
     @Test public void testReplaceChild() {
         final Document doc = getDocumentFor("src/test/resources/html/dom.html");
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             Node p1 = doc.getElementById("p1");
             NodeList c1 = p1.getChildNodes();
             Node left1 = c1.item(0);
@@ -154,12 +154,12 @@
             verifySiblings(n, left1, right1);
             verifyNodeRemoved(old);
             assertEquals("Returned node", old, ret);
-        }});
+        });
     }
 
     @Test public void testRemoveChild() {
         final Document doc = getDocumentFor("src/test/resources/html/dom.html");
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             Node p = doc.getElementById("p1");
             NodeList c = p.getChildNodes();
             Node left = c.item(0);
@@ -172,12 +172,12 @@
             verifyChildRemoved(p, count, left, right);
             verifyNodeRemoved(n);
             assertEquals("Returned node", n, ret);
-        }});
+        });
     }
 
     @Test public void testRemoveChildWithEventHandler() {
         final Document doc = getDocumentFor("src/test/resources/html/dom.html");
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             Node p = doc.getElementById("p1");
             NodeList c = p.getChildNodes();
             Node left = c.item(0);
@@ -199,12 +199,12 @@
             verifyChildRemoved(p, count, left, right);
             verifyNodeRemoved(n);
             assertEquals("Returned node", n, ret);
-        }});
+        });
     }
 
     @Test public void testNodeTypes() {
         final Document doc = getDocumentFor("src/test/resources/html/dom.html");
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             Element p = doc.getElementById("showcase-paragraph");
             assertEquals("P element's node type", Node.ELEMENT_NODE, p.getNodeType());
             assertEquals("P element's tag name", "P", p.getTagName());
@@ -230,12 +230,12 @@
             assertEquals("SPAN element child count", 1, children.getLength());
             text = children.item(0);
             assertEquals("SPAN text node type", Node.TEXT_NODE, text.getNodeType());
-        }});
+        });
     }
 
     @Test public void testNodeTypification() {
         final Document doc = getDocumentFor("src/test/resources/html/dom.html");
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             NodeList inputsp = doc.getElementsByTagName("p");
             HTMLParagraphElement elp = (HTMLParagraphElement) inputsp.item(0);
             assertEquals("P element typification", "left", elp.getAlign());
@@ -243,12 +243,12 @@
             NodeList inputsi = doc.getElementsByTagName("img");
             HTMLImageElement eli = (HTMLImageElement) inputsi.item(0);
             assertEquals("Image element typification", "file:///C:/test.png", eli.getSrc());
-        }});
+        });
     }
 
     @Test public void testEventListenerCascade() {
         final Document doc = getDocumentFor("src/test/resources/html/dom.html");
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             HTMLDocument htmlDoc = (HTMLDocument)doc;
             final HTMLBodyElement body = (HTMLBodyElement)htmlDoc.getBody();
 
@@ -292,31 +292,27 @@
             ((EventTarget)body).dispatchEvent(evClick);
             assertEquals("JS EventHandler does not work directly", "testClass", body.getClassName());
 
-            EventListener listener1 = new EventListener() {
-                @Override public void handleEvent(Event evt) {
-                    EventTarget src = ((MouseEvent)evt).getTarget();
-                    ((HTMLBodyElement)src).setClassName("newTestClass");
-                }
+            EventListener listener1 = evt -> {
+                EventTarget src = ((MouseEvent) evt).getTarget();
+                ((HTMLBodyElement) src).setClassName("newTestClass");
             };
             ((EventTarget)body).addEventListener("click", listener1, true);
             ((EventTarget)body).dispatchEvent(evClick);
             assertEquals("Java EventHandler does not work directly", "newTestClass", body.getClassName());
 
-            EventListener listener2 = new EventListener() {
-                @Override public void handleEvent(Event evt) {
-                    //OK: stacked ScriptExecutionContext
-                    listenerJS.handleEvent(evt);
-                }
+            EventListener listener2 = evt -> {
+                //OK: stacked ScriptExecutionContext
+                listenerJS.handleEvent(evt);
             };
             ((EventTarget)body).addEventListener("click", listener2, true);
             ((EventTarget)body).dispatchEvent(evClick);
             assertEquals("JS EventHandler does not work from Java call", "testClass", body.getClassName());
-        }});
+        });
     }
 
     @Test public void testDOMWindowAndStyleAccess() {
         final Document doc = getDocumentFor("src/test/resources/html/dom.html");
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             HTMLDocument htmlDoc = (HTMLDocument)doc;
             final HTMLBodyElement body = (HTMLBodyElement)htmlDoc.getBody();
 
@@ -328,12 +324,12 @@
             //Style access
             CSSStyleDeclaration style = ((HTMLBodyElementImpl)body).getStyle();
             assertEquals("Style extraction", "blue", style.getPropertyValue("background-color"));
-        }});
+        });
     }
 
     @Test public void testDOMCSS() {
         final Document doc = getDocumentFor("src/test/resources/html/dom.html");
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             StyleSheetList shl = ((HTMLDocumentImpl)doc).getStyleSheets();
             for (int i = 0; i < shl.getLength(); ++i ) {
                 StyleSheet sh = shl.item(i);
@@ -357,7 +353,7 @@
                     String cssText = r.getCssText();
                 }
             }
-        }});
+        });
     }
 
     // helper methods
--- a/modules/web/src/test/java/javafx/scene/web/DebuggerTest.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/test/java/javafx/scene/web/DebuggerTest.java	Fri Mar 14 09:02:45 2014 -0700
@@ -16,15 +16,13 @@
 
     @Test
     public void testSimpleMessageExchange() {
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             Debugger debugger = getEngine().impl_getDebugger();
 
             final List<String> callbackMessages = new ArrayList<String>();
-            debugger.setMessageCallback(new Callback<String,Void>() {
-                public Void call(String message) {
-                    callbackMessages.add(message);
-                    return null;
-                }
+            debugger.setMessageCallback(message -> {
+                callbackMessages.add(message);
+                return null;
             });
             debugger.setEnabled(true);
             debugger.sendMessage(q(
@@ -32,12 +30,12 @@
             assertEquals(
                     Arrays.asList(q("{'result':{'result':true},'id':16}")),
                     callbackMessages);
-        }});
+        });
     }
 
     @Test
     public void testEnabledProperty() {
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             Debugger debugger = getEngine().impl_getDebugger();
 
             assertEquals(false, debugger.isEnabled());
@@ -55,12 +53,12 @@
             debugger.setEnabled(false);
             debugger.setEnabled(false);
             assertEquals(false, debugger.isEnabled());
-        }});
+        });
     }
 
     @Test
     public void testMessageCallbackProperty() {
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             Debugger debugger = getEngine().impl_getDebugger();
             Callback<String,Void> callback = new Callback<String,Void>() {
                 public Void call(String message) {
@@ -75,30 +73,30 @@
 
             debugger.setMessageCallback(null);
             assertEquals(null, debugger.getMessageCallback());
-        }});
+        });
     }
 
     @Test
     public void testSendMessageIllegalStateException() {
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             Debugger debugger = getEngine().impl_getDebugger();
             try {
                 debugger.sendMessage("foo");
                 fail("IllegalStateException expected but not thrown");
             } catch (IllegalStateException expected) {}
-        }});
+        });
     }
 
     @Test
     public void testSendMessageNullPointerException() {
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             Debugger debugger = getEngine().impl_getDebugger();
             debugger.setEnabled(true);
             try {
                 debugger.sendMessage(null);
                 fail("NullPointerException expected but not thrown");
             } catch (NullPointerException expected) {}
-        }});
+        });
     }
 
     @Test
--- a/modules/web/src/test/java/javafx/scene/web/HistoryTest.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/test/java/javafx/scene/web/HistoryTest.java	Fri Mar 14 09:02:45 2014 -0700
@@ -34,21 +34,19 @@
         //
         // before history is populated
         //
-        submit(new Runnable() {
-            public void run() {
-                try {
-                    history.go(-1);
-                    fail("go: IndexOutOfBoundsException is not thrown");                    
-                } catch (IndexOutOfBoundsException ex) {}
-                try {
-                    history.go(1);
-                    fail("go: IndexOutOfBoundsException is not thrown");                    
-                } catch (IndexOutOfBoundsException ex) {}
+        submit(() -> {
+            try {
+                history.go(-1);
+                fail("go: IndexOutOfBoundsException is not thrown");
+            } catch (IndexOutOfBoundsException ex) {}
+            try {
+                history.go(1);
+                fail("go: IndexOutOfBoundsException is not thrown");
+            } catch (IndexOutOfBoundsException ex) {}
 
-                history.setMaxSize(99);
-                assertEquals("max size is wrong", history.getMaxSize(), 99);
-            }
-        });        
+            history.setMaxSize(99);
+            assertEquals("max size is wrong", history.getMaxSize(), 99);
+        });
         
         // [1*]
         checkLoad(new File("src/test/resources/html/h1.html"), 1, 0, "1");
@@ -105,11 +103,9 @@
             }
         });
 
-        submit(new Runnable() {
-            public void run() {
-                // [1, 2*, 3]
-                history.go(-1);
-            }
+        submit(() -> {
+            // [1, 2*, 3]
+            history.go(-1);
         });
         waitLoadFinished();
         check(new File("src/test/resources/html/h2.html"), 3, 1, "2");
@@ -121,89 +117,71 @@
         // more go() checks
         //        
         
-        submit(new Runnable() {
-            public void run() {
-                // [1, 2, 3*]
-                history.go(1);
-            }
+        submit(() -> {
+            // [1, 2, 3*]
+            history.go(1);
         });
         waitLoadFinished();
         check(new File("src/test/resources/html/h3.html"), 3, 2, "3");
         
-        submit(new Runnable() {
-            public void run() {
-                // [1*, 2, 3]
-                history.go(-2);
-            }
+        submit(() -> {
+            // [1*, 2, 3]
+            history.go(-2);
         });
         waitLoadFinished();
         check(new File("src/test/resources/html/h1.html"), 3, 0, "1");
         
-        submit(new Runnable() {
-            public void run() {
-                // [1*, 2, 3]
-                history.go(0); // no-op
-            }
+        submit(() -> {
+            // [1*, 2, 3]
+            history.go(0); // no-op
         });
         
-        submit(new Runnable() {
-            public void run() {
-                // [1*, 2, 3]
-                try {
-                    history.go(-1);
-                    fail("go: IndexOutOfBoundsException is not thrown");                    
-                } catch (IndexOutOfBoundsException ex) {}
-            }
+        submit(() -> {
+            // [1*, 2, 3]
+            try {
+                history.go(-1);
+                fail("go: IndexOutOfBoundsException is not thrown");
+            } catch (IndexOutOfBoundsException ex) {}
         });
         
-        submit(new Runnable() {
-            public void run() {
-                // [1, 2, 3*]
-                history.go(2);
-            }
+        submit(() -> {
+            // [1, 2, 3*]
+            history.go(2);
         });
         waitLoadFinished();
         check(new File("src/test/resources/html/h3.html"), 3, 2, "3");
         
-        submit(new Runnable() {
-            public void run() {
-                // [1, 2, 3*]
-                try {
-                    history.go(1);
-                    fail("go: IndexOutOfBoundsException is not thrown");
-                } catch (IndexOutOfBoundsException ex) {}
-            }
+        submit(() -> {
+            // [1, 2, 3*]
+            try {
+                history.go(1);
+                fail("go: IndexOutOfBoundsException is not thrown");
+            } catch (IndexOutOfBoundsException ex) {}
         });
         
         //
         // check the maxSize
         //
         
-        submit(new Runnable() {
-            public void run() {
-                // [1, 2, 3*]
-                history.setMaxSize(3);
-            }
+        submit(() -> {
+            // [1, 2, 3*]
+            history.setMaxSize(3);
         });
         // [2, 3, 1*]
         checkLoad(new File("src/test/resources/html/h1.html"), 3, 2, "1");
         
-        submit(new Runnable() {
-            public void run() {
-                // [2, 3*]
-                history.setMaxSize(2);
-                assertEquals("entries: size is wrong", 2, history.getEntries().size());
-                assertEquals("entries: title is wrong", "2", history.getEntries().get(0).getTitle());
-            }
+        submit(() -> {
+            // [2, 3*]
+            history.setMaxSize(2);
+            assertEquals("entries: size is wrong", 2, history.getEntries().size());
+            assertEquals("entries: title is wrong", "2", history.getEntries().get(0).getTitle());
         });
         
-        submit(new Runnable() {
-            public void run() {
-                // [2, 3*]
-                history.setMaxSize(3);
-                // [2*, 3]
-                history.go(-1);
-            }
+        submit(() -> {
+            // [2, 3*]
+            history.setMaxSize(3);
+            // [2*, 3]
+            history.go(-1);
         });
         waitLoadFinished();
         
@@ -212,11 +190,9 @@
         // [2, 1, 3*]
         checkLoad(new File("src/test/resources/html/h3.html"), 3, 2, "3");
         
-        submit(new Runnable() {
-            public void run() {
-                // [2*, 1, 3]
-                history.go(-2);
-            }
+        submit(() -> {
+            // [2*, 1, 3]
+            history.go(-2);
         });
         waitLoadFinished();
         
@@ -246,18 +222,16 @@
         // finally, check zero and invalid maxSize
         //
         
-        submit(new Runnable() {
-            public void run() {
-                // []
-                history.setMaxSize(0);
-                assertEquals("maxSizeProperty: wrong value", 0, history.getEntries().size());
-                
-                // []
-                try {
-                    history.maxSizeProperty().set(-1);
-                    fail("maxSizeProperty: IllegalArgumentException is not thrown");
-                } catch (IllegalArgumentException ex) {}
-            }
+        submit(() -> {
+            // []
+            history.setMaxSize(0);
+            assertEquals("maxSizeProperty: wrong value", 0, history.getEntries().size());
+
+            // []
+            try {
+                history.maxSizeProperty().set(-1);
+                fail("maxSizeProperty: IllegalArgumentException is not thrown");
+            } catch (IllegalArgumentException ex) {}
         });
     }
     
--- a/modules/web/src/test/java/javafx/scene/web/IrresponsiveScriptTest.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/test/java/javafx/scene/web/IrresponsiveScriptTest.java	Fri Mar 14 09:02:45 2014 -0700
@@ -50,16 +50,14 @@
         // amount of CPU time to run, and checks that the handler is not
         // interrupted.
         final long CPU_TIME_TO_RUN = 24L * 1000 * 1000 * 1000;
-        getEngine().setOnAlert(new EventHandler<WebEvent<String>>() {
-            public void handle(WebEvent<String> ev) {
-                ThreadMXBean bean = ManagementFactory.getThreadMXBean();
-                long startCpuTime = bean.getCurrentThreadCpuTime();
-                while (bean.getCurrentThreadCpuTime() - startCpuTime
-                        < CPU_TIME_TO_RUN)
-                {
-                    // Do something that consumes CPU time
-                    Math.sqrt(Math.random() * 21082013);
-                }
+        getEngine().setOnAlert(ev -> {
+            ThreadMXBean bean = ManagementFactory.getThreadMXBean();
+            long startCpuTime = bean.getCurrentThreadCpuTime();
+            while (bean.getCurrentThreadCpuTime() - startCpuTime
+                    < CPU_TIME_TO_RUN)
+            {
+                // Do something that consumes CPU time
+                Math.sqrt(Math.random() * 21082013);
             }
         });
         executeScript("alert('Jumbo!');");
--- a/modules/web/src/test/java/javafx/scene/web/JavaScriptBridgeTest.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/test/java/javafx/scene/web/JavaScriptBridgeTest.java	Fri Mar 14 09:02:45 2014 -0700
@@ -20,9 +20,9 @@
         final Document doc = getDocumentFor("src/test/resources/html/dom.html");
         final WebEngine web = getEngine();
         
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             Object wino = web.executeScript("parent.parent");
-            assertTrue(wino instanceof netscape.javascript.JSObject);
+            assertTrue(wino instanceof JSObject);
             JSObject win = (JSObject) wino;
             JSObject doc2 = (JSObject) win.getMember("document");
             assertSame(doc, doc2);
@@ -95,11 +95,11 @@
             // RT-14241
             ((JSObject) web.executeScript("new Array(1, 2, 3);"))
                 .setSlot(0, 155);
-        }});
+        });
     }
 
     public @Test void testJSBridge2() throws InterruptedException {
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             JSObject strO = (JSObject)
                     getEngine().executeScript("new String('test me')");
             String str = "I am new member, and I'm here";
@@ -109,16 +109,16 @@
             strO.removeMember("newmember");
             o = strO.getMember("newmember");
             assertEquals("undefined", o);
-        }});
+        });
     }
 
     public @Test void testJSBridge3() throws InterruptedException {
         //final Document doc = getDocumentFor("src/test/resources/html/dom.html");
         final WebEngine web = getEngine();
 
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             Object wino = web.executeScript("parent.parent");
-            assertTrue(wino instanceof netscape.javascript.JSObject);
+            assertTrue(wino instanceof JSObject);
             JSObject win = (JSObject) wino;
             java.util.Stack<Object> st = new java.util.Stack<Object>();
             bind("myStack", st);
@@ -131,13 +131,13 @@
             assertSame(st, web.executeScript("myStack2"));
             assertEquals("def", web.executeScript("myStack.get(1)").toString());
             assertEquals("[abc, def]", web.executeScript("myStack").toString());
-        }});
+        });
     }
 
     public @Test void testJSBridge4() throws InterruptedException {
         final WebEngine web = getEngine();
         
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             // Based on RT-19205 "JavaScript2Java Bridge: float and double
             // values can be lost when assigned to JS variables".
             float a = (float) 15.5;
@@ -168,7 +168,7 @@
             // object to a field of Java object produces garbage value"
             Carry carry = new Carry();
             bind("carry", carry);
-        
+
             Object o = web.executeScript("carry.o = window; carry.o == window");
             assertEquals(Boolean.TRUE, o);
             assertEquals("[object Window]", carry.o.toString());
@@ -181,14 +181,14 @@
             bind("carry", carry);
             web.executeScript("carry.c = c;");
             assertEquals('C', carry.c);
-        }});
+        });
     }
 
     @Test public void testJSBridge5() throws InterruptedException {
         final Document doc = getDocumentFor("src/test/resources/html/dom.html");
         final WebEngine web = getEngine();
 
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             JSObject doc2 = (JSObject) doc;
             try {
                 doc2.call("removeChild", new Object[] {doc2});
@@ -197,12 +197,12 @@
                 assertTrue(ex instanceof JSException);
                 assertTrue(ex.toString().indexOf("DOM Exception") > 0);
             }
-        }});
+        });
     }
 
     @Test public void testJSCall1() throws InterruptedException {
         final WebEngine web = getEngine();
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             assertEquals("123.7", web.executeScript("123.67.toFixed(1)"));
             try {
                 web.executeScript("123.67.toFixed(-1)");
@@ -211,13 +211,13 @@
                 String exp = "netscape.javascript.JSException: RangeError";
                 assertEquals(exp, ex.toString().substring(0, exp.length()));
             }
-         }});
+         });
     }
 
     @Test public void testNullMemberName() throws InterruptedException {
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             JSObject parent = (JSObject) getEngine().executeScript("parent");
-            
+
             // test getMember(null)
             try {
                 parent.getMember(null);
@@ -225,7 +225,7 @@
             } catch (NullPointerException e) {
                 // expected
             }
-            
+
             // test setMember(null, obj)
             try {
                 parent.setMember(null, "");
@@ -233,7 +233,7 @@
             } catch (NullPointerException e) {
                 // expected
             }
-            
+
             // test removeMember(null)
             try {
                 parent.removeMember(null);
@@ -241,7 +241,7 @@
             } catch (NullPointerException e) {
                 // expected
             }
-            
+
             // test call(null)
             try {
                 parent.call(null);
@@ -249,7 +249,7 @@
             } catch (NullPointerException e) {
                 // expected
             }
-            
+
             // test eval(null)
             try {
                 parent.eval(null);
@@ -257,7 +257,7 @@
             } catch (NullPointerException e) {
                 // expected
             }
-        }});
+        });
     }
 
     public static class Carry {
@@ -279,7 +279,7 @@
     public @Test void testCallStatic() throws InterruptedException {
         final WebEngine web = getEngine();
         
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             // Test RT-19099
             java.io.File x = new java.io.File("foo.txt1");
             bind("x", x);
@@ -290,13 +290,13 @@
                 if (ex.toString().indexOf("static") < 0)
                     fail("caught unexpected exception: "+ex);
             }
-        }});
+        });
     }
 
     public @Test void testBridgeExplicitOverloading() throws InterruptedException {
         final WebEngine web = getEngine();
         
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             StringBuilder sb = new StringBuilder();
             bind("sb", sb);
             web.executeScript("sb['append(int)'](123)");
@@ -335,7 +335,7 @@
             assertSame(iarr, r);
             assertEquals("98/87/76/null",
                          iarr[0]+"/"+iarr[1]+"/"+iarr[2]+"/"+iarr[3]);
-        }});
+        });
     }
 
     private void executeShouldFail(WebEngine web, String expression,
@@ -355,7 +355,7 @@
     public @Test void testThrowJava() throws InterruptedException {
         final WebEngine web = getEngine();
 
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             MyExceptionHelper test = new MyExceptionHelper();
             bind("test", test);
             try {
@@ -367,7 +367,7 @@
                 assertTrue(e.getCause() != null);
                 assertTrue(e.getCause() instanceof MyException);
             }
-        }});
+        });
     }
 
     public static class MyException extends Throwable {
@@ -383,20 +383,20 @@
     public @Test void testBridgeArray1() throws InterruptedException {
         final WebEngine web = getEngine();
         
-        submit(new Runnable() { public void run() {
-            int []array = new int[3]; 
-            array[0] = 42; 
-            bind("test", array); 
+        submit(() -> {
+            int []array = new int[3];
+            array[0] = 42;
+            bind("test", array);
             assertEquals(Integer.valueOf(42), web.executeScript("test[0]"));
             assertEquals(Integer.valueOf(3), web.executeScript("test.length"));
             assertSame(array, web.executeScript("test"));
-         }});
+         });
     }
 
     public @Test void testBridgeBadOverloading() throws InterruptedException {
         final WebEngine web = getEngine();
         
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             StringBuilder sb = new StringBuilder();
             bind("sb", sb);
             executeShouldFail(web, "sb['append)int)'](123)");
@@ -409,6 +409,6 @@
             executeShouldFail(web, "sb['append(BadClass)'](123)");
             executeShouldFail(web, "sb['append(bad-type)'](123)");
             executeShouldFail(web, "sb['append(char[],,int)'](1, 2)");
-        }});
+        });
     }
 }
--- a/modules/web/src/test/java/javafx/scene/web/LeakTest.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/test/java/javafx/scene/web/LeakTest.java	Fri Mar 14 09:02:45 2014 -0700
@@ -52,7 +52,7 @@
     @Test public void testGarbageCollectability() throws InterruptedException {
         final BlockingQueue<WeakReference<WebPage>> webPageRefQueue =
                 new LinkedBlockingQueue<WeakReference<WebPage>>();
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             WebView webView = new WebView();
             WeakReference<WebView> webViewRef =
                     new WeakReference<WebView>(webView);
@@ -65,7 +65,7 @@
             System.gc();
             assertNull("WebView has not been GCed", webViewRef.get());
             assertNull("WebEngine has not been GCed", webEngineRef.get());
-        }});
+        });
         
         WeakReference<WebPage> webPageRef = webPageRefQueue.take();
         long endTime = System.currentTimeMillis() + 5000;
--- a/modules/web/src/test/java/javafx/scene/web/LoadNotificationsTest.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/test/java/javafx/scene/web/LoadNotificationsTest.java	Fri Mar 14 09:02:45 2014 -0700
@@ -43,10 +43,8 @@
     private void testUrl(String url) {
         log.clear();
         assertion = null;
-        submit(new Runnable() {
-            @Override public void run() {
-                checkState(RUNNING, getEngine().getLoadWorker().getState());
-            }
+        submit(() -> {
+            checkState(RUNNING, getEngine().getLoadWorker().getState());
         });
         load(url);
         check();
--- a/modules/web/src/test/java/javafx/scene/web/LoadTest.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/test/java/javafx/scene/web/LoadTest.java	Fri Mar 14 09:02:45 2014 -0700
@@ -24,11 +24,7 @@
 public class LoadTest extends TestBase {
     
     private State getLoadState() {
-        return submit(new Callable<State>() {
-            public State call() {
-                return getEngine().getLoadWorker().getState();
-            }
-        });
+        return submit(() -> getEngine().getLoadWorker().getState());
     }
 
     @Test public void testLoadGoodUrl() {
@@ -75,7 +71,7 @@
         assertNull("Title should be null", web.getTitle());
 
         // DOM access should happen on FX thread
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             Document doc = web.getDocument();
             assertNotNull("Document should not be null", doc);
             Node el = // html -> body -> pre -> text
@@ -83,7 +79,7 @@
             String text = ((Text)el).getNodeValue();
             assertEquals("Plain text should not be interpreted as HTML",
                     TEXT, text);
-        }});
+        });
     }
 
     @Test public void testLoadEmpty() {
@@ -100,7 +96,7 @@
         assertEquals("Location", "about:blank", web.getLocation());
         assertNull("Title should be null", web.getTitle());
 
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             Document doc = web.getDocument();
             assertNotNull("Document should not be null", doc);
 
@@ -125,7 +121,7 @@
             assertEquals("BODY element should have tag BODY", "BODY", body.getTagName());
             assertTrue("BODY element should have no children",
                     bodyNodes == null || bodyNodes.getLength() == 0);
-        }});
+        });
     }
 
     @Test public void testLoadUrlWithEncodedSpaces() {
@@ -149,10 +145,8 @@
         WebEngine webEngine = getEngine();
         
         final StringBuilder result = new StringBuilder();
-        webEngine.setOnAlert(new EventHandler<WebEvent<String>>() {
-            @Override public void handle(WebEvent<String> event) {
-                result.append("ALERT: ").append(event.getData());
-            }
+        webEngine.setOnAlert(event -> {
+            result.append("ALERT: ").append(event.getData());
         });
         
         String scriptUrl =
--- a/modules/web/src/test/java/javafx/scene/web/MiscellaneousTest.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/test/java/javafx/scene/web/MiscellaneousTest.java	Fri Mar 14 09:02:45 2014 -0700
@@ -31,11 +31,9 @@
 
     @Test public void testRT22458() throws Exception {
         final WebEngine webEngine = createWebEngine();
-        Platform.runLater(new Runnable() {
-            @Override public void run() {
-                webEngine.load(format("file://%d.ajax.googleapis.com/ajax",
-                                      new Random().nextInt()));
-            }
+        Platform.runLater(() -> {
+            webEngine.load(format("file://%d.ajax.googleapis.com/ajax",
+                                  new Random().nextInt()));
         });
         Thread.sleep(200);
         long startTime = System.currentTimeMillis();
@@ -61,20 +59,16 @@
             }
         }
         final ArrayList<Record> records = new ArrayList<Record>();
-        ChangeListener<State> listener = new ChangeListener<State>() {
-            public void changed(ObservableValue<? extends State> ov,
-                                State oldValue, State newValue)
-            {
-                if (newValue == State.SUCCEEDED) {
-                    records.add(new Record(
-                            getEngine().getDocument(),
-                            getEngine().getLocation()));
-                }
+        ChangeListener<State> listener = (ov, oldValue, newValue) -> {
+            if (newValue == State.SUCCEEDED) {
+                records.add(new Record(
+                        getEngine().getDocument(),
+                        getEngine().getLocation()));
             }
         };
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             getEngine().getLoadWorker().stateProperty().addListener(listener);
-        }});
+        });
         String location = new File("src/test/resources/html/RT30835.html")
                 .toURI().toASCIIString().replaceAll("^file:/", "file:///");
         load(location);
@@ -95,10 +89,6 @@
     }
 
     private WebEngine createWebEngine() {
-        return submit(new Callable<WebEngine>() {
-            public WebEngine call() {
-                return new WebEngine();
-            }
-        });
+        return submit(() -> new WebEngine());
     }
 }
--- a/modules/web/src/test/java/javafx/scene/web/TestBase.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/test/java/javafx/scene/web/TestBase.java	Fri Mar 14 09:02:45 2014 -0700
@@ -32,10 +32,8 @@
     public static void setupOnce() {
         final CountDownLatch startupLatch = new CountDownLatch(1);
 
-        PlatformImpl.startup(new Runnable() {
-            @Override public void run() {
-                startupLatch.countDown();
-            }
+        PlatformImpl.startup(() -> {
+            startupLatch.countDown();
         });
 
         try {
@@ -44,42 +42,40 @@
     }
 
     public TestBase() {
-        Platform.runLater(new Runnable() {
-            @Override public void run() {
-                view = new WebView();
-                WebEngine web = view.getEngine();
+        Platform.runLater(() -> {
+            view = new WebView();
+            WebEngine web = view.getEngine();
 
-                web.documentProperty().addListener((ChangeListener)TestBase.this);
-                web.documentProperty().addListener((InvalidationListener)TestBase.this);
-                web.titleProperty().addListener((ChangeListener)TestBase.this);
-                web.titleProperty().addListener((InvalidationListener)TestBase.this);
-                web.locationProperty().addListener((ChangeListener)TestBase.this);
-                web.locationProperty().addListener((InvalidationListener)TestBase.this);
+            web.documentProperty().addListener((ChangeListener)TestBase.this);
+            web.documentProperty().addListener((InvalidationListener)TestBase.this);
+            web.titleProperty().addListener((ChangeListener)TestBase.this);
+            web.titleProperty().addListener((InvalidationListener)TestBase.this);
+            web.locationProperty().addListener((ChangeListener)TestBase.this);
+            web.locationProperty().addListener((InvalidationListener)TestBase.this);
 
-                Worker loadTask = web.getLoadWorker();
-                loadTask.exceptionProperty().addListener((ChangeListener)TestBase.this);
-                loadTask.exceptionProperty().addListener((InvalidationListener)TestBase.this);
-                loadTask.messageProperty().addListener((ChangeListener)TestBase.this);
-                loadTask.messageProperty().addListener((InvalidationListener)TestBase.this);
-                loadTask.progressProperty().addListener((ChangeListener)TestBase.this);
-                loadTask.progressProperty().addListener((InvalidationListener)TestBase.this);
-                loadTask.runningProperty().addListener((ChangeListener)TestBase.this);
-                loadTask.runningProperty().addListener((InvalidationListener)TestBase.this);
-                loadTask.stateProperty().addListener((ChangeListener)TestBase.this);
-                loadTask.stateProperty().addListener((InvalidationListener)TestBase.this);
-                loadTask.titleProperty().addListener((ChangeListener)TestBase.this);
-                loadTask.titleProperty().addListener((InvalidationListener)TestBase.this);
-                loadTask.totalWorkProperty().addListener((ChangeListener)TestBase.this);
-                loadTask.totalWorkProperty().addListener((InvalidationListener)TestBase.this);
-                loadTask.valueProperty().addListener((ChangeListener)TestBase.this);
-                loadTask.valueProperty().addListener((InvalidationListener)TestBase.this);
-                loadTask.workDoneProperty().addListener((ChangeListener)TestBase.this);
-                loadTask.workDoneProperty().addListener((InvalidationListener)TestBase.this);
-                
-                loadTask.runningProperty().addListener(new LoadFinishedListener());
+            Worker loadTask = web.getLoadWorker();
+            loadTask.exceptionProperty().addListener((ChangeListener)TestBase.this);
+            loadTask.exceptionProperty().addListener((InvalidationListener)TestBase.this);
+            loadTask.messageProperty().addListener((ChangeListener)TestBase.this);
+            loadTask.messageProperty().addListener((InvalidationListener)TestBase.this);
+            loadTask.progressProperty().addListener((ChangeListener)TestBase.this);
+            loadTask.progressProperty().addListener((InvalidationListener)TestBase.this);
+            loadTask.runningProperty().addListener((ChangeListener)TestBase.this);
+            loadTask.runningProperty().addListener((InvalidationListener)TestBase.this);
+            loadTask.stateProperty().addListener((ChangeListener)TestBase.this);
+            loadTask.stateProperty().addListener((InvalidationListener)TestBase.this);
+            loadTask.titleProperty().addListener((ChangeListener)TestBase.this);
+            loadTask.titleProperty().addListener((InvalidationListener)TestBase.this);
+            loadTask.totalWorkProperty().addListener((ChangeListener)TestBase.this);
+            loadTask.totalWorkProperty().addListener((InvalidationListener)TestBase.this);
+            loadTask.valueProperty().addListener((ChangeListener)TestBase.this);
+            loadTask.valueProperty().addListener((InvalidationListener)TestBase.this);
+            loadTask.workDoneProperty().addListener((ChangeListener)TestBase.this);
+            loadTask.workDoneProperty().addListener((InvalidationListener)TestBase.this);
 
-                TestBase.this.notify(LOCK);
-            }
+            loadTask.runningProperty().addListener(new LoadFinishedListener());
+
+            TestBase.this.notify(LOCK);
         });
 
         wait(LOCK, INIT_TIMEOUT);
@@ -90,10 +86,8 @@
      * This method blocks until loading is finished.
      */
     protected void load(final String url) {
-        Platform.runLater(new Runnable() {
-            @Override public void run() {
-                getEngine().load(url);
-            }
+        Platform.runLater(() -> {
+            getEngine().load(url);
         });
         waitLoadFinished();
     }
@@ -103,10 +97,8 @@
      * This method blocks until loading is finished.
      */
     protected void reload() {
-        Platform.runLater(new Runnable() {
-            @Override public void run() {
-                getEngine().reload();
-            }
+        Platform.runLater(() -> {
+            getEngine().reload();
         });
         waitLoadFinished();        
     }
@@ -133,10 +125,8 @@
      * This method does not return until loading is finished.
      */
     protected void loadContent(final String content, final String contentType) {
-        Platform.runLater(new Runnable() {
-            @Override public void run() {
-                getEngine().loadContent(content, contentType);
-            }
+        Platform.runLater(() -> {
+            getEngine().loadContent(content, contentType);
         });
         waitLoadFinished();
     }
@@ -199,11 +189,7 @@
      * This method does not return until execution is complete.
      */
     protected Object executeScript(final String script) {
-        return submit(new Callable<Object>() {
-            public Object call() {
-                return getEngine().executeScript(script);
-            }
-        });
+        return submit(() -> getEngine().executeScript(script));
     }
 
     private class LoadFinishedListener implements ChangeListener<Boolean> {
--- a/modules/web/src/test/java/javafx/scene/web/UserDataDirectoryTest.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/test/java/javafx/scene/web/UserDataDirectoryTest.java	Fri Mar 14 09:02:45 2014 -0700
@@ -270,9 +270,9 @@
         assertSame(FOO, webEngine.getUserDataDirectory());
         assertNotLocked(FOO);
         assertNotLocked(BAR);
-        submit(new Runnable() {@Override public void run() {
+        submit(() -> {
             webEngine.executeScript("alert()");
-        }});
+        });
         assertSame(FOO, webEngine.getUserDataDirectory());
         assertLocked(FOO);
         assertNotLocked(BAR);
@@ -312,10 +312,8 @@
     @Test
     public void testAlreadyInUseErrorWithRecoveringHandler() {
         webEngine.setUserDataDirectory(PRE_LOCKED);
-        EventHandler<WebErrorEvent> h = new EventHandler<WebErrorEvent>() {
-            @Override public void handle(WebErrorEvent event) {
-                webEngine.setUserDataDirectory(BAR);
-            }
+        EventHandler<WebErrorEvent> h = event -> {
+            webEngine.setUserDataDirectory(BAR);
         };
         webEngine.setOnError(h);
         assertSame(PRE_LOCKED, webEngine.getUserDataDirectory());
@@ -362,10 +360,8 @@
         f.createNewFile();
         try {
             webEngine.setUserDataDirectory(f);
-            EventHandler<WebErrorEvent> h = new EventHandler<WebErrorEvent>() {
-                @Override public void handle(WebErrorEvent event) {
-                    webEngine.setUserDataDirectory(BAR);
-                }
+            EventHandler<WebErrorEvent> h = event -> {
+                webEngine.setUserDataDirectory(BAR);
             };
             webEngine.setOnError(h);
             assertSame(f, webEngine.getUserDataDirectory());
@@ -423,10 +419,8 @@
         System.setSecurityManager(new CustomSecurityManager(FOO));
         try {
             webEngine.setUserDataDirectory(FOO);
-            EventHandler<WebErrorEvent> h = new EventHandler<WebErrorEvent>() {
-                @Override public void handle(WebErrorEvent event) {
-                    webEngine.setUserDataDirectory(BAR);
-                }
+            EventHandler<WebErrorEvent> h = event -> {
+                webEngine.setUserDataDirectory(BAR);
             };
             webEngine.setOnError(h);
             assertSame(FOO, webEngine.getUserDataDirectory());
@@ -479,11 +473,7 @@
         if (Platform.isFxApplicationThread()) {
             result = new WebEngine();
         } else {
-            result = submit(new Callable<WebEngine>() {
-                @Override public WebEngine call() {
-                    return new WebEngine();
-                }
-            });
+            result = submit(() -> new WebEngine());
         }
         createdWebEngines.add(result);
         return result;
@@ -494,28 +484,28 @@
     }
 
     private void load(final WebEngine webEngine, final String url) {
-        executeLoadJob(webEngine, new Runnable() {@Override public void run() {
+        executeLoadJob(webEngine, () -> {
             webEngine.load(url);
-        }});
+        });
     }
 
     private void loadContent(final WebEngine webEngine, final String content) {
-        executeLoadJob(webEngine, new Runnable() {@Override public void run() {
+        executeLoadJob(webEngine, () -> {
             webEngine.loadContent(content);
-        }});
+        });
     }
 
     private void loadContent(final WebEngine webEngine, final String content,
                              final String contentType)
     {
-        executeLoadJob(webEngine, new Runnable() {@Override public void run() {
+        executeLoadJob(webEngine, () -> {
             webEngine.loadContent(content, contentType);
-        }});
+        });
     }
 
     private void executeLoadJob(final WebEngine webEngine, final Runnable job) {
         final CountDownLatch latch = new CountDownLatch(1);
-        submit(new Runnable() {@Override public void run() {
+        submit(() -> {
             webEngine.getLoadWorker().runningProperty().addListener(
                     new ChangeListener<Boolean>() {
                         @Override public void changed(
@@ -528,7 +518,7 @@
                         }
                     });
             job.run();
-        }});
+        });
         try {
             latch.await();
         } catch (InterruptedException ex) {
@@ -537,9 +527,9 @@
     }
 
     private void dispose(final WebEngine webEngine) {
-        Runnable runnable = new Runnable() {@Override public void run() {
+        Runnable runnable = () -> {
             webEngine.dispose();
-        }};
+        };
         if (Platform.isFxApplicationThread()) {
             runnable.run();
         } else {
@@ -622,7 +612,7 @@
     private void assertHaveSharedLocalStorage(
             final Collection<WebEngine> webEngines)
     {
-        Runnable runnable = new Runnable() {@Override public void run() {
+        Runnable runnable = () -> {
             for (WebEngine webEngine : webEngines) {
                 assertNotNull(webEngine.executeScript("localStorage"));
             }
@@ -637,7 +627,7 @@
                     assertEquals(value1, value2);
                 }
             }
-        }};
+        };
         if (Platform.isFxApplicationThread()) {
             runnable.run();
         } else {
@@ -646,9 +636,9 @@
     }
 
     private void assertHasNoLocalStorage(final WebEngine webEngine) {
-        Runnable runnable = new Runnable() {@Override public void run() {
+        Runnable runnable = () -> {
             assertNull(webEngine.executeScript("localStorage"));
-        }};
+        };
         if (Platform.isFxApplicationThread()) {
             runnable.run();
         } else {
@@ -664,12 +654,8 @@
     }
 
     private File defaultDirectory() {
-        Callable<String> callable = new Callable<String>() {
-            @Override public String call() {
-                return com.sun.glass.ui.Application.GetApplication()
-                        .getDataDirectory();
-            }
-        };
+        Callable<String> callable = () -> com.sun.glass.ui.Application.GetApplication()
+                .getDataDirectory();
         String appDataDir;
         if (Platform.isFxApplicationThread()) {
             try {
--- a/modules/web/src/test/java/javafx/scene/web/WebPageTest.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/test/java/javafx/scene/web/WebPageTest.java	Fri Mar 14 09:02:45 2014 -0700
@@ -33,9 +33,7 @@
     }
     
     private String getHtml(final WebPage page) throws Exception {
-        return submit(new Callable<String>() { public String call() {
-            return page.getHtml(page.getMainFrame());
-        }});
+        return submit(() -> page.getHtml(page.getMainFrame()));
     }
 
     @Test public void testGetHtmlIllegalFrameId() {
--- a/modules/web/src/test/java/javafx/scene/web/WebViewTest.java	Wed Mar 12 09:12:18 2014 -0700
+++ b/modules/web/src/test/java/javafx/scene/web/WebViewTest.java	Fri Mar 14 09:02:45 2014 -0700
@@ -37,9 +37,9 @@
     }
     
     private void setFontScale(final WebView view, final float scale) throws Exception {
-        submit(new Runnable() { public void run() {
+        submit(() -> {
             view.setFontScale(scale);
-        }});
+        });
     }
 
     void checkZoom(WebView view, float zoom) {
@@ -47,10 +47,8 @@
     }
 
     private void setZoom(final WebView view, final float zoom) throws Exception {
-        submit(new Runnable() {
-            public void run() {
-                view.setZoom(zoom);
-            }
+        submit(() -> {
+            view.setZoom(zoom);
         });
     }
 }
--- a/netbeans/graphics/nbproject/build-impl.xml	Wed Mar 12 09:12:18 2014 -0700
+++ b/netbeans/graphics/nbproject/build-impl.xml	Fri Mar 14 09:02:45 2014 -0700
@@ -116,9 +116,15 @@
             </and>
         </condition>
         <condition property="do.archive">
-            <not>
-                <istrue value="${jar.archive.disabled}"/>
-            </not>
+            <or>
+                <not>
+                    <istrue value="${jar.archive.disabled}"/>
+                </not>
+                <and>
+                    <istrue value="${jar.archive.disabled}"/>
+                    <istrue value="${not.archive.disabled}"/>
+                </and>
+            </or>
         </condition>
         <condition property="do.mkdist">
             <and>
@@ -164,9 +170,9 @@
                 <available file="${src.dir}"/>
                 <available file="${src.resources.dir}"/>
                 <available file="${src.jsl-decora.dir}"/>
+                <available file="${src.jsl-decora3.dir}"/>
+                <available file="${src.jsl-prism3.dir}"/>
                 <available file="${src.jsl-prism.dir}"/>
-                <available file="${src.jsl-decora2.dir}"/>
-                <available file="${src.jsl-prism2.dir}"/>
             </or>
         </condition>
         <condition property="netbeans.home+have.tests">
@@ -256,9 +262,9 @@
         <fail unless="src.dir">Must set src.dir</fail>
         <fail unless="src.resources.dir">Must set src.resources.dir</fail>
         <fail unless="src.jsl-decora.dir">Must set src.jsl-decora.dir</fail>
+        <fail unless="src.jsl-decora3.dir">Must set src.jsl-decora3.dir</fail>
+        <fail unless="src.jsl-prism3.dir">Must set src.jsl-prism3.dir</fail>
         <fail unless="src.jsl-prism.dir">Must set src.jsl-prism.dir</fail>
-        <fail unless="src.jsl-decora2.dir">Must set src.jsl-decora2.dir</fail>
-        <fail unless="src.jsl-prism2.dir">Must set src.jsl-prism2.dir</fail>
         <fail unless="test.java.dir">Must set test.java.dir</fail>
         <fail unless="test.resources.dir">Must set test.resources.dir</fail>
         <fail unless="build.dir">Must set build.dir</fail>
@@ -281,7 +287,7 @@
     </target>
     <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
         <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${src.dir}:${src.resources.dir}:${src.jsl-decora.dir}:${src.jsl-prism.dir}:${src.jsl-decora2.dir}:${src.jsl-prism2.dir}" name="srcdir"/>
+            <attribute default="${src.dir}:${src.resources.dir}:${src.jsl-decora.dir}:${src.jsl-decora3.dir}:${src.jsl-prism3.dir}:${src.jsl-prism.dir}" name="srcdir"/>
             <attribute default="${build.classes.dir}" name="destdir"/>
             <attribute default="${javac.classpath}" name="classpath"/>
             <attribute default="${javac.processorpath}" name="processorpath"/>
@@ -322,7 +328,7 @@
     </target>
     <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
         <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${src.dir}:${src.resources.dir}:${src.jsl-decora.dir}:${src.jsl-prism.dir}:${src.jsl-decora2.dir}:${src.jsl-prism2.dir}" name="srcdir"/>
+            <attribute default="${src.dir}:${src.resources.dir}:${src.jsl-decora.dir}:${src.jsl-decora3.dir}:${src.jsl-prism3.dir}:${src.jsl-prism.dir}" name="srcdir"/>
             <attribute default="${build.classes.dir}" name="destdir"/>
             <attribute default="${javac.classpath}" name="classpath"/>
             <attribute default="${javac.processorpath}" name="processorpath"/>
@@ -355,7 +361,7 @@
     </target>
     <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
         <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${src.dir}:${src.resources.dir}:${src.jsl-decora.dir}:${src.jsl-prism.dir}:${src.jsl-decora2.dir}:${src.jsl-prism2.dir}" name="srcdir"/>
+            <attribute default="${src.dir}:${src.resources.dir}:${src.jsl-decora.dir}:${src.jsl-decora3.dir}:${src.jsl-prism3.dir}:${src.jsl-prism.dir}" name="srcdir"/>
             <attribute default="${build.classes.dir}" name="destdir"/>
             <attribute default="${javac.classpath}" name="classpath"/>
             <sequential>
@@ -981,7 +987,7 @@
                 <include name="*"/>
             </dirset>
         </pathconvert>
-        <j2seproject3:depend srcdir="${src.dir}:${src.resources.dir}:${src.jsl-decora.dir}:${src.jsl-prism.dir}:${src.jsl-decora2.dir}:${src.jsl-prism2.dir}:${build.generated.subdirs}"/>
+        <j2seproject3:depend srcdir="${src.dir}:${src.resources.dir}:${src.jsl-decora.dir}:${src.jsl-decora3.dir}:${src.jsl-prism3.dir}:${src.jsl-prism.dir}:${build.generated.subdirs}"/>
     </target>
     <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
         <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
@@ -989,9 +995,9 @@
             <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${src.resources.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${src.jsl-decora.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
+            <fileset dir="${src.jsl-decora3.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
+            <fileset dir="${src.jsl-prism3.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${src.jsl-prism.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
-            <fileset dir="${src.jsl-decora2.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
-            <fileset dir="${src.jsl-prism2.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
         </copy>
     </target>
     <target if="has.persistence.xml" name="-copy-persistence-xml">
@@ -1012,7 +1018,7 @@
     <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
         <j2seproject3:force-recompile/>
-        <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}:${src.resources.dir}:${src.jsl-decora.dir}:${src.jsl-prism.dir}:${src.jsl-decora2.dir}:${src.jsl-prism2.dir}"/>
+        <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}:${src.resources.dir}:${src.jsl-decora.dir}:${src.jsl-decora3.dir}:${src.jsl-prism3.dir}:${src.jsl-prism.dir}"/>
     </target>
     <target name="-post-compile-single">
         <!-- Empty placeholder for easier customization. -->
@@ -1284,13 +1290,13 @@
             <fileset dir="${src.jsl-decora.dir}" excludes="*.java,${excludes}" includes="${includes}">
                 <filename name="**/*.java"/>
             </fileset>
-            <fileset dir="${src.jsl-prism.dir}" excludes="*.java,${excludes}" includes="${includes}">
+            <fileset dir="${src.jsl-decora3.dir}" excludes="*.java,${excludes}" includes="${includes}">
                 <filename name="**/*.java"/>
             </fileset>
-            <fileset dir="${src.jsl-decora2.dir}" excludes="*.java,${excludes}" includes="${includes}">
+            <fileset dir="${src.jsl-prism3.dir}" excludes="*.java,${excludes}" includes="${includes}">
                 <filename name="**/*.java"/>
             </fileset>
-            <fileset dir="${src.jsl-prism2.dir}" excludes="*.java,${excludes}" includes="${includes}">
+            <fileset dir="${src.jsl-prism.dir}" excludes="*.java,${excludes}" includes="${includes}">
                 <filename name="**/*.java"/>
             </fileset>
             <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
@@ -1309,13 +1315,13 @@
             <fileset dir="${src.jsl-decora.dir}" excludes="${excludes}" includes="${includes}">
                 <filename name="**/doc-files/**"/>
             </fileset>
-            <fileset dir="${src.jsl-prism.dir}" excludes="${excludes}" includes="${includes}">
+            <fileset dir="${src.jsl-decora3.dir}" excludes="${excludes}" includes="${includes}">
                 <filename name="**/doc-files/**"/>
             </fileset>
-            <fileset dir="${src.jsl-decora2.dir}" excludes="${excludes}" includes="${includes}">
+            <fileset dir="${src.jsl-prism3.dir}" excludes="${excludes}" includes="${includes}">
                 <filename name="**/doc-files/**"/>
             </fileset>
-            <fileset dir="${src.jsl-prism2.dir}" excludes="${excludes}" includes="${includes}">
+            <fileset dir="${src.jsl-prism.dir}" excludes="${excludes}" includes="${includes}">
                 <filename name="**/doc-files/**"/>
             </fileset>
             <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
@@ -1381,7 +1387,7 @@
         <mkdir dir="${build.test.results.dir}"/>
     </target>
     <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
-        <j2seproject3:test testincludes="**/*Test.java"/>
+        <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/>
     </target>
     <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
         <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
--- a/netbeans/graphics/nbproject/genfiles.properties	Wed Mar 12 09:12:18 2014 -0700
+++ b/netbeans/graphics/nbproject/genfiles.properties	Fri Mar 14 09:02:45 2014 -0700
@@ -3,6 +3,6 @@
 build.xml.stylesheet.CRC32=28e38971@1.56.1.46
 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=35234d28
-nbproject/build-impl.xml.script.CRC32=d03b77b1
-nbproject/build-impl.xml.stylesheet.CRC32=5a01deb7@1.68.1.46
+nbproject/build-impl.xml.data.CRC32=674108c2
+nbproject/build-impl.xml.script.CRC32=14fe0755
+nbproject/build-impl.xml.stylesheet.CRC32=caae92e4@1.73.1.48
--- a/netbeans/graphics/nbproject/project.properties	Wed Mar 12 09:12:18 2014 -0700
+++ b/netbeans/graphics/nbproject/project.properties	Fri Mar 14 09:02:45 2014 -0700
@@ -27,7 +27,6 @@
 dist.javadoc.dir=${dist.dir}/javadoc
 endorsed.classpath=
 excludes=
-file.reference.builders.jar=../../modules/builders/build/libs/builders.jar
 file.reference.generated-src-jsl-decora=../../modules/graphics/build/generated-src/jsl-decora
 file.reference.generated-src-jsl-prism=../../modules/graphics/build/generated-src/jsl-prism
 file.reference.hlsl-Decora=../../modules/graphics/build/hlsl/Decora
@@ -50,7 +49,6 @@
 jar.compress=false
 jar.index=${jnlp.enabled}
 javac.classpath=\
-    ${file.reference.builders.jar}:\
     ${file.reference.stringtemplate-3.2.jar}:\
     ${file.reference.swt-debug.jar}:\
     ${reference.base.jar}:\
@@ -109,12 +107,12 @@
     ${build.test.classes.dir}
 source.encoding=UTF-8
 src.dir=${file.reference.main-java}
-src.jsl-decora-main.dir=${file.reference.main-jsl-decora}
 src.jsl-decora.dir=${file.reference.generated-src-jsl-decora}
 src.jsl-decora2.dir=${file.reference.resources-jsl-decora}
-src.jsl-prism-main.dir=${file.reference.main-jsl-prism}
+src.jsl-decora3.dir=${file.reference.resources-jsl-decora}
 src.jsl-prism.dir=${file.reference.generated-src-jsl-prism}
 src.jsl-prism2.dir=${file.reference.resources-jsl-prism}
+src.jsl-prism3.dir=${file.reference.resources-jsl-prism}
 src.resources.dir=${file.reference.main-resources}
 test.java.dir=${file.reference.test-java}
 test.resources.dir=${file.reference.test-resources}
--- a/netbeans/graphics/nbproject/project.xml	Wed Mar 12 09:12:18 2014 -0700
+++ b/netbeans/graphics/nbproject/project.xml	Fri Mar 14 09:02:45 2014 -0700
@@ -8,9 +8,9 @@
             <source-roots>
                 <root id="src.dir"/>
                 <root id="src.resources.dir" name="Resources"/>
-                <root id="src.jsl-decora-main.dir" name="JSL Decora Shader Sources"/>
-                <root id="src.jsl-prism-main.dir" name="JSL Prism Shader Sources"/>
                 <root id="src.jsl-decora.dir" name="JSL Decora Generated Sources"/>
+                <root id="src.jsl-decora3.dir"/>
+                <root id="src.jsl-prism3.dir"/>
                 <root id="src.jsl-prism.dir" name="JSL Prism Generated Sources"/>
             </source-roots>
             <test-roots>