changeset 6473:b873fbebaf0d

RT-35197: Use Lambda in FX runtime and samples [web] Summary: This component was lambdified (unlambdified file names recorded in the JIRA)
author snorthov
date Thu, 13 Mar 2014 07:40:35 -0400
parents 4b447b1a4130
children c42d31058266
files modules/web/src/main/java/com/sun/javafx/scene/web/skin/HTMLEditorSkin.java modules/web/src/main/java/com/sun/javafx/webkit/EventLoopImpl.java modules/web/src/main/java/com/sun/javafx/webkit/UIClientImpl.java modules/web/src/main/java/com/sun/javafx/webkit/WebPageClientImpl.java modules/web/src/main/java/com/sun/javafx/webkit/drt/DumpRenderTree.java modules/web/src/main/java/com/sun/javafx/webkit/prism/PrismInvoker.java modules/web/src/main/java/com/sun/javafx/webkit/prism/RTImage.java modules/web/src/main/java/com/sun/javafx/webkit/prism/WCImageDecoderImpl.java modules/web/src/main/java/com/sun/javafx/webkit/prism/WCRadialGradient.java modules/web/src/main/java/com/sun/javafx/webkit/prism/WCRenderQueueImpl.java modules/web/src/main/java/com/sun/javafx/webkit/theme/ContextMenuImpl.java modules/web/src/main/java/com/sun/javafx/webkit/theme/PopupMenuImpl.java modules/web/src/main/java/com/sun/javafx/webkit/theme/RenderThemeImpl.java modules/web/src/main/java/com/sun/javafx/webkit/theme/ScrollBarThemeImpl.java modules/web/src/main/java/com/sun/webkit/MainThread.java modules/web/src/main/java/com/sun/webkit/Timer.java modules/web/src/main/java/com/sun/webkit/Utilities.java modules/web/src/main/java/com/sun/webkit/WatchdogTimer.java modules/web/src/main/java/com/sun/webkit/WebPage.java modules/web/src/main/java/com/sun/webkit/graphics/WCMediaPlayer.java modules/web/src/main/java/com/sun/webkit/graphics/WCRenderQueue.java modules/web/src/main/java/com/sun/webkit/network/NetworkContext.java modules/web/src/main/java/com/sun/webkit/network/SocketStreamHandle.java modules/web/src/main/java/com/sun/webkit/network/URLLoader.java modules/web/src/main/java/com/sun/webkit/perf/PerfLogger.java modules/web/src/main/java/javafx/scene/web/WebEngine.java modules/web/src/main/java/javafx/scene/web/WebHistory.java modules/web/src/main/java/javafx/scene/web/WebView.java modules/web/src/test/java/javafx/scene/web/BindingTest.java modules/web/src/test/java/javafx/scene/web/CSSTest.java modules/web/src/test/java/javafx/scene/web/CallbackTest.java modules/web/src/test/java/javafx/scene/web/DOMTest.java modules/web/src/test/java/javafx/scene/web/DebuggerTest.java modules/web/src/test/java/javafx/scene/web/HistoryTest.java modules/web/src/test/java/javafx/scene/web/IrresponsiveScriptTest.java modules/web/src/test/java/javafx/scene/web/JavaScriptBridgeTest.java modules/web/src/test/java/javafx/scene/web/LeakTest.java modules/web/src/test/java/javafx/scene/web/LoadNotificationsTest.java modules/web/src/test/java/javafx/scene/web/LoadTest.java modules/web/src/test/java/javafx/scene/web/MiscellaneousTest.java modules/web/src/test/java/javafx/scene/web/TestBase.java modules/web/src/test/java/javafx/scene/web/UserDataDirectoryTest.java modules/web/src/test/java/javafx/scene/web/WebPageTest.java modules/web/src/test/java/javafx/scene/web/WebViewTest.java
diffstat 44 files changed, 929 insertions(+), 1308 deletions(-) [+]
line wrap: on
line diff
--- a/modules/web/src/main/java/com/sun/javafx/scene/web/skin/HTMLEditorSkin.java	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/main/java/com/sun/javafx/scene/web/skin/HTMLEditorSkin.java	Thu Mar 13 07:40:35 2014 -0400
@@ -238,15 +238,13 @@
 
     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();
                     }
                 }
             }
@@ -280,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);
@@ -426,48 +408,40 @@
 //                    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();
-                        }
-                    });
-                }
             }
         });
 
@@ -505,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);
         });
     }
 
@@ -569,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"));
@@ -598,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;
                     }
                 }
             }
@@ -654,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>();
@@ -684,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"));
@@ -714,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));
             }
         });
 
@@ -728,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,
@@ -751,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();
@@ -767,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();
             }
         });
 
@@ -793,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();
             }
         });
     }
@@ -828,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;
@@ -859,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);
                 }
             });
         }
@@ -906,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
@@ -1073,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);
         });
     }
 
--- a/modules/web/src/main/java/com/sun/javafx/webkit/EventLoopImpl.java	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/main/java/com/sun/javafx/webkit/EventLoopImpl.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/main/java/com/sun/javafx/webkit/UIClientImpl.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/main/java/com/sun/javafx/webkit/WebPageClientImpl.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/main/java/com/sun/javafx/webkit/drt/DumpRenderTree.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/main/java/com/sun/javafx/webkit/prism/PrismInvoker.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/main/java/com/sun/javafx/webkit/prism/RTImage.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/main/java/com/sun/javafx/webkit/prism/WCImageDecoderImpl.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/main/java/com/sun/javafx/webkit/prism/WCRadialGradient.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/main/java/com/sun/javafx/webkit/prism/WCRenderQueueImpl.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/main/java/com/sun/javafx/webkit/theme/ContextMenuImpl.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/main/java/com/sun/javafx/webkit/theme/PopupMenuImpl.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/main/java/com/sun/javafx/webkit/theme/RenderThemeImpl.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/main/java/com/sun/javafx/webkit/theme/ScrollBarThemeImpl.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/main/java/com/sun/webkit/MainThread.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/main/java/com/sun/webkit/Timer.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/main/java/com/sun/webkit/Utilities.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/main/java/com/sun/webkit/WatchdogTimer.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/main/java/com/sun/webkit/WebPage.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/main/java/com/sun/webkit/graphics/WCMediaPlayer.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/main/java/com/sun/webkit/graphics/WCRenderQueue.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/main/java/com/sun/webkit/network/NetworkContext.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/main/java/com/sun/webkit/network/SocketStreamHandle.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/main/java/com/sun/webkit/network/URLLoader.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/main/java/com/sun/webkit/perf/PerfLogger.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/main/java/javafx/scene/web/WebEngine.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/main/java/javafx/scene/web/WebHistory.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/main/java/javafx/scene/web/WebView.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/test/java/javafx/scene/web/BindingTest.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/test/java/javafx/scene/web/CSSTest.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/test/java/javafx/scene/web/CallbackTest.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/test/java/javafx/scene/web/DOMTest.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/test/java/javafx/scene/web/DebuggerTest.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/test/java/javafx/scene/web/HistoryTest.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/test/java/javafx/scene/web/IrresponsiveScriptTest.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/test/java/javafx/scene/web/JavaScriptBridgeTest.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/test/java/javafx/scene/web/LeakTest.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/test/java/javafx/scene/web/LoadNotificationsTest.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/test/java/javafx/scene/web/LoadTest.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/test/java/javafx/scene/web/MiscellaneousTest.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/test/java/javafx/scene/web/TestBase.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/test/java/javafx/scene/web/UserDataDirectoryTest.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/test/java/javafx/scene/web/WebPageTest.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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	Thu Mar 13 08:43:52 2014 +0100
+++ b/modules/web/src/test/java/javafx/scene/web/WebViewTest.java	Thu Mar 13 07:40:35 2014 -0400
@@ -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);
         });
     }
 }