Merge backout.

This commit is contained in:
Josh Matthews 2012-10-11 21:58:41 -04:00
commit 37f97f9704
10 changed files with 187 additions and 14 deletions

View File

@ -589,12 +589,12 @@ 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;

View File

@ -436,7 +436,7 @@
}
// 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);

View File

@ -698,7 +698,8 @@ FlexItem::FlexItem(nsIFrame* aChildFrame,
// 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

View File

@ -43,7 +43,6 @@
.orange { background: orange; }
.pink { background: pink; }
.aqua { background: aqua; }
.violet { background: violet; }
.tan { background: tan; }
</style>
</head>
@ -56,9 +55,6 @@
><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>

View File

@ -43,7 +43,6 @@
.orange { background: orange; }
.pink { background: pink; }
.aqua { background: aqua; }
.violet { background: violet; }
.tan { background: tan; }
</style>
</head>
@ -54,9 +53,6 @@
<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>

View File

@ -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>

View File

@ -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>

View File

@ -0,0 +1,96 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!-- Testcase for align-items / align-self behavior, with all the possible
values included on different items within a flex container. -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style>
.flexbox {
border: 1px dashed blue;
height: 200px;
width: -moz-fit-content;
display: -moz-flex;
font-size: 10px;
line-height: 10px;
/* Any children whose align-self is 'auto' (or unspecified, or
-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 > * {
display: table;
width: 40px;
}
.big {
height: 100px;
font-size: 20px;
line-height: 20px;
}
/* Classes for each of the various align-self values */
.flex-start {
background: lime;
-moz-align-self: flex-start;
}
.flex-end {
background: orange;
-moz-align-self: flex-end;
}
.center {
background: lightblue;
-moz-align-self: center;
}
.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;
}
.initial {
background: aqua;
-moz-align-self: -moz-initial;
}
.inherit {
background: violet;
-moz-align-self: inherit;
}
</style>
</head>
<body>
<div class="flexbox">
<div class="flex-start">start</div>
<div class="flex-start big">a b c d e f</div>
<div class="flex-end">end</div>
<div class="flex-end big">a b c d e f</div>
<div class="center">center</div>
<div class="center big">a b c d e f</div>
<div class="baseline">base</div>
<div class="baseline big">abc</div>
<div class="stretch">stretch</div>
<div class="stretch big">a b c d e f</div>
<div class="auto">auto</div>
<div class="unspecified">unspec</div>
<div class="initial">initial</div>
<div class="inherit">inherit</div>
</div>
</body>
</html>

View File

@ -10,7 +10,16 @@ fails test-pref(layout.css.flexbox.enabled,true) == flexbox-align-self-baseline-
# 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