Merge
diff --git a/.hgtags-top-repo b/.hgtags-top-repo
index 1bd2e13..111b066 100644
--- a/.hgtags-top-repo
+++ b/.hgtags-top-repo
@@ -630,3 +630,4 @@
 04471bfd1cc2e8f4d8d198e79b21e64dd4499db8 jdk8u102-b13
 daafd7d3a76a0c448e4982afd7c4e9471ab1c916 jdk8u102-b14
 3a3064f9363c79f70a0d9b2201342acc880e1e76 jdk8u102-b31
+fb4fc26136253424c0a4f4f5a10dc54f612b64fd jdk8u102-b32
diff --git a/corba/.hgtags b/corba/.hgtags
index 4d6a140..235a7ad5 100644
--- a/corba/.hgtags
+++ b/corba/.hgtags
@@ -665,3 +665,4 @@
 a7c292080d5ed76ea5e3b123c0dee4c340aa174f jdk8u102-b13
 56b133772ec1aa4f44f2eee2c4103c645f764935 jdk8u102-b14
 8ba5a41487af9fe72aeb92e790327d12dce0de8c jdk8u102-b31
+8f015ee0842df021532a4b88c436ea9daed785b6 jdk8u102-b32
diff --git a/hotspot/.hgtags b/hotspot/.hgtags
index 044d9fe..81982a5 100644
--- a/hotspot/.hgtags
+++ b/hotspot/.hgtags
@@ -895,3 +895,4 @@
 f6daf04c0f48dab5420ad63d21da82a7fa4e3ad7 jdk8u102-b13
 ac29c9c1193aef5d480b200ed94c5d579243c17b jdk8u102-b14
 96e1c72fc617d3c6c125bcfc9182f77fc6aa38e6 jdk8u102-b31
+c8988d2e4212583ec0f04591c8e241ad3cf95674 jdk8u102-b32
diff --git a/jaxp/.hgtags b/jaxp/.hgtags
index a0d93e5..d2a5162 100644
--- a/jaxp/.hgtags
+++ b/jaxp/.hgtags
@@ -635,3 +635,4 @@
 e9de037c3b4c7691662d996c49b42f3e639e65ee jdk8u102-b13
 1f032000ff4b70c3adc02669b6324880199f8db8 jdk8u102-b14
 ff603463199f8a2140cb97fd3ff98046dfeecb3f jdk8u102-b31
+58dea534c1d49731a40de645cfa3450949f31d26 jdk8u102-b32
diff --git a/jaxws/.hgtags b/jaxws/.hgtags
index e332d1e..8ba4ea1 100644
--- a/jaxws/.hgtags
+++ b/jaxws/.hgtags
@@ -624,3 +624,4 @@
 d84434eb3e4e991812a7b0c3c9e6bfdabae910d0 jdk8u102-b13
 81f2d81a48d74d2d4882c11330366517b73ee064 jdk8u102-b14
 de23881ca76c9c69f4e47e9b15d09a91fbb17176 jdk8u102-b31
+f638db3f652d3ec698aad0193c118c8afdaa001b jdk8u102-b32
diff --git a/jdk/.hgtags b/jdk/.hgtags
index 485fa81..8726ff4 100644
--- a/jdk/.hgtags
+++ b/jdk/.hgtags
@@ -628,3 +628,4 @@
 901ecf04370c7c03c61e22ab87a266c355baff54 jdk8u102-b13
 48c99b42383912886c005891c04b5f599adf6722 jdk8u102-b14
 222d3ac3aa1f99f16e31c1c4a10f916ce83ff759 jdk8u102-b31
+e3839fe291add6e0ea199457fb31c9312cc5dd77 jdk8u102-b32
diff --git a/jdk/src/macosx/native/sun/awt/AWTWindow.m b/jdk/src/macosx/native/sun/awt/AWTWindow.m
index 1194ad8..a20a3ed 100644
--- a/jdk/src/macosx/native/sun/awt/AWTWindow.m
+++ b/jdk/src/macosx/native/sun/awt/AWTWindow.m
@@ -800,6 +800,18 @@
 
 - (void)sendEvent:(NSEvent *)event {
         if ([event type] == NSLeftMouseDown || [event type] == NSRightMouseDown || [event type] == NSOtherMouseDown) {
+            // Move parent windows to front and make sure that a child window is displayed
+            // in front of its nearest parent.
+            if (self.ownerWindow != nil) {
+                JNIEnv *env = [ThreadUtilities getJNIEnvUncached];
+                jobject platformWindow = [self.javaPlatformWindow jObjectWithEnv:env];
+                if (platformWindow != NULL) {
+                    static JNF_MEMBER_CACHE(jm_orderAboveSiblings, jc_CPlatformWindow, "orderAboveSiblings", "()V");
+                    JNFCallVoidMethod(env,platformWindow, jm_orderAboveSiblings);
+                    (*env)->DeleteLocalRef(env, platformWindow);
+                }
+            }
+            [self orderChildWindows:YES];
 
             NSPoint p = [NSEvent mouseLocation];
             NSRect frame = [self.nsWindow frame];
@@ -1100,6 +1112,16 @@
     NSWindow *nsWindow = OBJC(windowPtr);
     [ThreadUtilities performOnMainThreadWaiting:NO block:^(){
         [nsWindow orderBack:nil];
+        // Order parent windows
+        AWTWindow *awtWindow = (AWTWindow*)[nsWindow delegate];
+        while (awtWindow.ownerWindow != nil) {
+            awtWindow = awtWindow.ownerWindow;
+            if ([AWTWindow isJavaPlatformWindowVisible:awtWindow.nsWindow]) {
+                [awtWindow.nsWindow orderBack:nil];
+            }
+        }
+        // Order child windows
+        [(AWTWindow*)[nsWindow delegate] orderChildWindows:NO];
     }];
 
 JNF_COCOA_EXIT(env);
diff --git a/langtools/.hgtags b/langtools/.hgtags
index d511da4..f058d39 100644
--- a/langtools/.hgtags
+++ b/langtools/.hgtags
@@ -632,3 +632,4 @@
 56b0df415b570e31dc0b97d4a1c8f28b85240089 jdk8u102-b13
 0549bf2f507dae59bfcd7d11e038cdc62376fee7 jdk8u102-b14
 d86027f25a9aa960d69cf3a524588a873ae888f5 jdk8u102-b31
+1b511d4e93e7128ccb7100110ab6604eb2838afa jdk8u102-b32
diff --git a/nashorn/.hgtags b/nashorn/.hgtags
index 0879e13..fa5a096 100644
--- a/nashorn/.hgtags
+++ b/nashorn/.hgtags
@@ -611,3 +611,4 @@
 a010893ca6ee93c1a4832d1c484be6a119ca7ae4 jdk8u102-b13
 0948e61a3722ea7519323dffcce4f26430fe2881 jdk8u102-b14
 908d77c3a01687e99fb426cff41cf000f3f28e68 jdk8u102-b31
+4510fa72a613e8bd8b02f7519362de60907ca652 jdk8u102-b32