Merge backout.
authorJosh Matthews <josh@joshmatthews.net>
Thu, 11 Oct 2012 21:58:41 -0400
changeset 110170 ea7bf4553d66eb343c0f6e9a7cc071d1eb54c40c
parent 110169 2adc0ce03dba4ba6548c1a0673a4c9e4d18b473a (current diff)
parent 110167 5c4301b89fcfa6c048213f86058d75791875fd81 (diff)
child 110171 cb6023c5b636ec5ef7b4db280a49be6f73dbd762
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
milestone19.0a1
Merge backout.
layout/reftests/flexbox/flexbox-align-self-horiz-1.xhtml
--- a/browser/base/content/browser-social.js
+++ b/browser/base/content/browser-social.js
@@ -584,22 +584,22 @@ let SocialShareButton = {
     shareButton.style.backgroundImage = 'url("' + encodeURI(imageURL) + '")';
   }
 };
 
 var SocialMenu = {
   populate: function SocialMenu_populate() {
     // This menu is only accessible through keyboard navigation.
     let submenu = document.getElementById("menu_socialAmbientMenuPopup");
-    while(submenu.hasChildNodes())
-          submenu.removeChild(submenu.firstChild);
+    while (submenu.hasChildNodes())
+      submenu.removeChild(submenu.firstChild);
     let provider = Social.provider;
     if (Social.active && provider) {
       let iconNames = Object.keys(provider.ambientNotificationIcons);
-      for each(let name in iconNames) {
+      for (let name of iconNames) {
         let icon = provider.ambientNotificationIcons[name];
         if (!icon.label || !icon.menuURL)
           continue;
         let menuitem = document.createElement("menuitem");
         menuitem.setAttribute("label", icon.label);
         menuitem.addEventListener("command", function() {
           openUILinkIn(icon.menuURL, "tab");
         }, false);
--- a/browser/components/search/content/search.xml
+++ b/browser/components/search/content/search.xml
@@ -431,17 +431,17 @@
           }
           else {
             var newTabPref = textBox._prefBranch.getBoolPref("browser.search.openintab");
             if ((aEvent && aEvent.altKey) ^ newTabPref)
               where = "tab";
           }
 
           // Save the current value in the form history
-          if (textValue && !gPrivateBrowsingUI.privateWindow) {
+          if (textValue && !PrivateBrowsingUtils.isWindowPrivate(window)) {
             try {
               textBox._formHistSvc.addEntry(textBox.getAttribute("autocompletesearchparam"),
                                             textValue);
             } catch (ex) {
               Components.utils.reportError("Saving search to form history failed: " + ex);
             }
           }
 
--- a/layout/generic/nsFlexContainerFrame.cpp
+++ b/layout/generic/nsFlexContainerFrame.cpp
@@ -693,17 +693,18 @@ FlexItem::FlexItem(nsIFrame* aChildFrame
                    "Someone else tried to resolve our auto margin");
       }
     }
   }
 #endif // DEBUG
 
   // Resolve "align-self: auto" to parent's "align-items" value.
   if (mAlignSelf == NS_STYLE_ALIGN_SELF_AUTO) {
-    mAlignSelf = mFrame->GetParent()->GetStylePosition()->mAlignItems;
+    mAlignSelf =
+      mFrame->GetStyleContext()->GetParent()->GetStylePosition()->mAlignItems;
   }
 
   // If the flex item's inline axis is the same as the cross axis, then
   // 'align-self:baseline' is identical to 'flex-start'. If that's the case, we
   // just directly convert our align-self value here, so that we don't have to
   // handle this with special cases elsewhere.
   // Moreover: for the time being (until we support writing-modes),
   // all inline axes are horizontal -- so we can just check if the cross axis
--- a/layout/reftests/flexbox/flexbox-align-self-baseline-horiz-1-ref.xhtml
+++ b/layout/reftests/flexbox/flexbox-align-self-baseline-horiz-1-ref.xhtml
@@ -38,30 +38,26 @@
         font-size: 12px;
       }
 
       .lime   { background: lime;   }
       .yellow { background: yellow; }
       .orange { background: orange; }
       .pink   { background: pink;   }
       .aqua   { background: aqua;   }
-      .violet { background: violet; }
       .tan    { background: tan;    }
    </style>
   </head>
   <body>
     <div class="flexbox">
       <div class="lime">blk_1line</div
       ><table cellspacing="0" cellpadding="0"
               class="yellow">blk<br/>2lines</table
       ><div class="orange"><span class="super">super</span></div
       ><div class="pink"><span class="sub">sub</span></div
       ><table cellspacing="0" cellpadding="0"
               class="aqua big">big<br/>text<br/>3lines</table
-      ><table class="violet" border="1">
-        <tr><td>tr1</td></tr>
-        <tr><td>tr2</td></tr></table
       ><table class="tan" cellspacing="0" cellpadding="0">
         <i>ital<br/>ic</i>
       </table>
     </div>
   </body>
 </html>
--- a/layout/reftests/flexbox/flexbox-align-self-baseline-horiz-1.xhtml
+++ b/layout/reftests/flexbox/flexbox-align-self-baseline-horiz-1.xhtml
@@ -38,26 +38,22 @@
         font-size: 12px;
       }
 
       .lime   { background: lime;   }
       .yellow { background: yellow; }
       .orange { background: orange; }
       .pink   { background: pink;   }
       .aqua   { background: aqua;   }
-      .violet { background: violet; }
       .tan    { background: tan;    }
    </style>
   </head>
   <body>
     <div class="flexbox">
       <div class="lime">blk_1line</div>
       <div class="yellow">blk<br/>2lines</div>
       <div class="orange"><span class="super">super</span></div>
       <div class="pink"><span class="sub">sub</span></div>
       <div class="aqua big">big<br/>text<br/>3lines</div>
-      <table class="violet" border="1">
-        <tr><td>tr1</td></tr>
-        <tr><td>tr2</td></tr></table>
       <i class="tan">ital<br/>ic</i>
     </div>
   </body>
 </html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/flexbox/flexbox-align-self-baseline-horiz-4-ref.xhtml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!-- Reference case for behavior of the 'baseline' value for align-items and
+     align-self.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <style>
+      div.flexbox {
+        display: block;
+        border: 1px dashed blue;
+        font: 14px sans-serif;
+      }
+
+      div   { display: inline-block; }
+      table {
+        display: inline-table;
+        margin: 1px; /* to fix fuzziness from text overlapping table border */
+      }
+
+      .lime { background: lime; }
+      .pink { background: pink; }
+      .aqua { background: aqua; }
+   </style>
+  </head>
+  <body>
+    <div class="flexbox">
+      <div class="lime">text</div
+      ><table class="pink" border="1">
+        <tr><td>tr1</td></tr>
+        <tr><td>tr2</td></tr>
+      </table>
+    </div>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/flexbox/flexbox-align-self-baseline-horiz-4.xhtml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!-- Testcase for behavior of the 'baseline' value for align-items (and
+     align-self, implicitly). This test baseline-aligns a <table>.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <style>
+      div.flexbox {
+        display: -moz-flex;
+        -moz-align-items: baseline;
+        border: 1px dashed blue;
+        font: 14px sans-serif;
+      }
+
+      table {
+        margin: 1px; /* to fix fuzziness from text overlapping table border */
+      }
+
+      .lime { background: lime; }
+      .pink { background: pink; }
+      .aqua { background: aqua; }
+   </style>
+  </head>
+  <body>
+    <div class="flexbox">
+      <div class="lime">text</div>
+      <table class="pink" border="1">
+        <tr><td>tr1</td></tr>
+        <tr><td>tr2</td></tr>
+      </table>
+    </div>
+  </body>
+</html>
rename from layout/reftests/flexbox/flexbox-align-self-horiz-1.xhtml
rename to layout/reftests/flexbox/flexbox-align-self-horiz-1-block.xhtml
copy from layout/reftests/flexbox/flexbox-align-self-horiz-1.xhtml
copy to layout/reftests/flexbox/flexbox-align-self-horiz-1-table.xhtml
--- a/layout/reftests/flexbox/flexbox-align-self-horiz-1.xhtml
+++ b/layout/reftests/flexbox/flexbox-align-self-horiz-1-table.xhtml
@@ -20,17 +20,18 @@
            -moz-initial) will end up taking this value from us: */
         -moz-align-items: center;
 
         /* Any children whose align-self is 'inherit' will end up
            inheriting this value from us: */
         -moz-align-self: flex-end;
       }
 
-      .flexbox > div {
+      .flexbox > * {
+        display: table;
         width: 40px;
       }
 
       .big {
         height: 100px;
         font-size: 20px;
         line-height: 20px;
       }
@@ -50,16 +51,17 @@
       }
       .baseline {
         background: teal;
         -moz-align-self: baseline;
       }
       .stretch {
         background: pink;
         -moz-align-self: stretch;
+        display: block; /* XXXdholbert Hackaround for bug 799725 */
       }
       .auto {
         background: yellow;
         -moz-align-self: auto;
       }
       .unspecified {
         background: lightgreen;
       }
--- a/layout/reftests/flexbox/reftest.list
+++ b/layout/reftests/flexbox/reftest.list
@@ -5,17 +5,26 @@ test-pref(layout.css.flexbox.enabled,fal
 test-pref(layout.css.flexbox.enabled,true) == flexbox-pref-1.xhtml flexbox-pref-1-enabled-ref.xhtml
 
 # Tests for cross-axis alignment (align-self / align-items properties)
 test-pref(layout.css.flexbox.enabled,true) == flexbox-align-self-baseline-horiz-1.xhtml  flexbox-align-self-baseline-horiz-1-ref.xhtml
 fails test-pref(layout.css.flexbox.enabled,true) == flexbox-align-self-baseline-horiz-2.xhtml  flexbox-align-self-baseline-horiz-2-ref.xhtml # bug 793456, and possibly others
 # This one fails on windows R (but not Ru, strangely). On Windows R, the
 # single-line <label> flex item has a different background size in test vs. ref
 random-if(winWidget) test-pref(layout.css.flexbox.enabled,true) == flexbox-align-self-baseline-horiz-3.xhtml  flexbox-align-self-baseline-horiz-3-ref.xhtml # XXXdholbert investigate
-test-pref(layout.css.flexbox.enabled,true) == flexbox-align-self-horiz-1.xhtml  flexbox-align-self-horiz-1-ref.xhtml
+# XXXdholbert This test needs the flexbox pref to be enabled _at startup time_
+# (when we parse ua.css) in order to pass -- so it'll fail until we enable the
+# flexbox pref by default (bug 783409):
+fails == flexbox-align-self-baseline-horiz-4.xhtml flexbox-align-self-baseline-horiz-4-ref.xhtml
+
+test-pref(layout.css.flexbox.enabled,true) == flexbox-align-self-horiz-1-block.xhtml  flexbox-align-self-horiz-1-ref.xhtml
+# XXXdholbert This test needs the flexbox pref to be enabled _at startup time_
+# (when we parse ua.css) in order to pass -- so it'll fail until we enable the
+# flexbox pref by default (bug 783409):
+fails == flexbox-align-self-horiz-1-table.xhtml  flexbox-align-self-horiz-1-ref.xhtml
 test-pref(layout.css.flexbox.enabled,true) == flexbox-align-self-horiz-2.xhtml  flexbox-align-self-horiz-2-ref.xhtml
 test-pref(layout.css.flexbox.enabled,true) == flexbox-align-self-horiz-3.xhtml  flexbox-align-self-horiz-3-ref.xhtml
 test-pref(layout.css.flexbox.enabled,true) == flexbox-align-self-horiz-4.xhtml  flexbox-align-self-horiz-4-ref.xhtml
 pref(layout.css.flexbox.enabled,true) == flexbox-align-self-horiz-5.xhtml  flexbox-align-self-horiz-5-ref.xhtml
 test-pref(layout.css.flexbox.enabled,true) == flexbox-align-self-vert-1.xhtml  flexbox-align-self-vert-1-ref.xhtml
 test-pref(layout.css.flexbox.enabled,true) == flexbox-align-self-vert-2.xhtml  flexbox-align-self-vert-2-ref.xhtml
 test-pref(layout.css.flexbox.enabled,true) == flexbox-align-self-vert-3.xhtml  flexbox-align-self-vert-3-ref.xhtml
 test-pref(layout.css.flexbox.enabled,true) == flexbox-align-self-vert-4.xhtml  flexbox-align-self-vert-4-ref.xhtml