]> source.dussan.org Git - vaadin-framework.git/commitdiff
Only prevent margin collapse if embedded
authorLeif Åstrand <leif@vaadin.com>
Fri, 16 Mar 2012 14:41:17 +0000 (16:41 +0200)
committerLeif Åstrand <leif@vaadin.com>
Fri, 16 Mar 2012 14:42:18 +0000 (16:42 +0200)
WebContent/VAADIN/themes/base/common/common.css
src/com/vaadin/terminal/gwt/client/ui/RootConnector.java
tests/testbench/com/vaadin/tests/components/embedded/EmbeddedClickListenerRelativeCoordinates.html

index 41184f579c402beea40e6e145b315a00b6cb37ee..a95f33afcd518368d85777b59914eb5181c20dc0 100644 (file)
@@ -32,11 +32,12 @@ div.v-app-loading {
        overflow: auto;
        /* avoid scrollbars with margins in root layout */
        outline: none;
+       position: relative;
+}
+/* Prevent margin collapse */
+.v-view.v-view-embedded {
        margin-top: -1px;
        border-top: 1px solid transparent;
-       position: relative;
-       box-sizing: border-box;
-       -moz-box-sizing: border-box;
 }
 /**
  * Try to handle printing somehow. Reasonable printing support 
index 45a010a0f1d3f9d22289ab59f6eb54fb0661116f..086ded17432374f4e5787a82b1e69b971a388b15 100644 (file)
@@ -64,6 +64,9 @@ public class RootConnector extends AbstractComponentContainerConnector
                 styles += style + " ";
             }
         }
+        if (!client.getConfiguration().isStandalone()) {
+            styles += getWidget().getStylePrimaryName() + "-embedded";
+        }
         getWidget().setStyleName(styles.trim());
 
         clickEventHandler.handleEventHandlerRegistration(client);
index 3afb322a22aea274a7fbb86566bee8aec0181246..2dcd1b50715ad7f325cee0bfa86d19cb42a54ba5 100644 (file)
        <td>/run/com.vaadin.tests.components.embedded.EmbeddedClickListenerRelativeCoordinates?restartApplication</td>
        <td></td>
 </tr>
-<tr>
-       <td>waitForVaadin</td>
-       <td></td>
-       <td></td>
-</tr>
 <tr>
        <td>mouseClick</td>
        <td>vaadin=runcomvaadintestscomponentsembeddedEmbeddedClickListenerRelativeCoordinates::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VEmbedded[0]/domChild[0]</td>
        <td>41,22</td>
 </tr>
 <tr>
-       <td>waitForVaadin</td>
-       <td></td>
-       <td></td>
-</tr>
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>click-41-22</td>
-</tr>
-<!-- Should really be 41,22 but due to v-view border-top it is not always... <tr>
        <td>assertText</td>
        <td>vaadin=runcomvaadintestscomponentsembeddedEmbeddedClickListenerRelativeCoordinates::Root/VNotification[0]/HTML[0]/domChild[0]</td>
        <td>41, 22</td>
-</tr>-->
+</tr>
 <tr>
        <td>mouseClick</td>
        <td>vaadin=runcomvaadintestscomponentsembeddedEmbeddedClickListenerRelativeCoordinates::Root/VNotification[0]</td>
        <td>0,0</td>
 </tr>
 <tr>
-       <td>waitForVaadin</td>
-       <td></td>
+       <td>waitForElementNotPresent</td>
+       <td>vaadin=runcomvaadintestscomponentsembeddedEmbeddedClickListenerRelativeCoordinates::Root/VNotification[0]/HTML[0]/domChild[0]</td>
        <td></td>
 </tr>
 <tr>
        <td>0,0</td>
 </tr>
 <tr>
-       <td>waitForVaadin</td>
-       <td></td>
-       <td></td>
-</tr>
-<!-- Should really be 0,0 but due to v-view border-top it is not always... <tr>
        <td>assertText</td>
        <td>vaadin=runcomvaadintestscomponentsembeddedEmbeddedClickListenerRelativeCoordinates::Root/VNotification[0]/HTML[0]/domChild[0]</td>
        <td>0, 0</td>
-</tr>-->
-<tr>
-       <td>screenCapture</td>
-       <td></td>
-       <td>click-0-0</td>
 </tr>
 </tbody></table>
 </body>