This commit is contained in:
Ryan VanderMeulen 2013-08-22 15:33:42 -04:00
Родитель 17e03bc57e ad8ecdedcb
Коммит 554fb2747e
28 изменённых файлов: 209 добавлений и 129 удалений

Просмотреть файл

@ -56,6 +56,7 @@ var tests = {
doc.body.appendChild(div);
let swap = document.getAnonymousElementByAttribute(chats.selectedChat, "anonid", "swap");
swap.click();
port.close();
break;
case "got-chatbox-message":
ok(true, "got chatbox message");
@ -73,13 +74,16 @@ var tests = {
.getInterface(Components.interfaces.nsIDOMWindow);
Services.wm.removeListener(this);
// wait for load to ensure the window is ready for us to test
domwindow.addEventListener("load", function _load() {
domwindow.addEventListener("load", function _load(event) {
let doc = domwindow.document;
if (doc.location.href != "chrome://browser/content/chatWindow.xul")
return;
if (event.target != doc)
return;
domwindow.removeEventListener("load", _load, false);
domwindow.addEventListener("unload", function _close() {
domwindow.addEventListener("unload", function _close(event) {
if (event.target != doc)
return;
domwindow.removeEventListener("unload", _close, false);
info("window has been closed");
waitForCondition(function() {
@ -160,13 +164,15 @@ var tests = {
Services.wm.removeListener(this);
// wait for load to ensure the window is ready for us to test, make sure
// we're not getting called for about:blank
domwindow.addEventListener("load", function _load() {
domwindow.addEventListener("load", function _load(event) {
let doc = domwindow.document;
if (doc.location.href != "chrome://browser/content/chatWindow.xul")
return;
if (event.target != doc)
return;
domwindow.removeEventListener("load", _load, false);
domwindow.addEventListener("unload", function _close() {
domwindow.addEventListener("unload", function _close(event) {
if (event.target != doc)
return;
domwindow.removeEventListener("unload", _close, false);
ok(true, "window has been closed");
next();
@ -184,6 +190,7 @@ var tests = {
},function() {
// logout, we should get unload next
port.postMessage({topic: "test-logout"});
port.close();
}, domwindow);
}, false);

Просмотреть файл

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
pref("startup.homepage_override_url","https://www.mozilla.org/%LOCALE%/firefox/%VERSION%/whatsnew/?oldversion=%OLD_VERSION%");
pref("startup.homepage_override_url","");
pref("startup.homepage_welcome_url","https://www.mozilla.org/%LOCALE%/firefox/%VERSION%/firstrun/");
// Interval: Time between checks for a new version (in seconds)
pref("app.update.interval", 43200); // 12 hours

Просмотреть файл

@ -1175,7 +1175,7 @@ var Scratchpad = {
*/
openErrorConsole: function SP_openErrorConsole()
{
this.browserWindow.HUDConsoleUI.toggleBrowserConsole();
this.browserWindow.HUDService.toggleBrowserConsole();
},
/**

Просмотреть файл

@ -38,6 +38,7 @@ MOCHITEST_BROWSER_FILES = \
browser_scratchpad_bug_644413_modeline.js \
browser_scratchpad_bug807924_cannot_convert_to_string.js \
browser_scratchpad_long_string.js \
browser_scratchpad_open_error_console.js \
head.js \
# Disable test due to bug 807234 becoming basically permanent

Просмотреть файл

@ -0,0 +1,37 @@
/* vim: set ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
function test()
{
waitForExplicitFinish();
gBrowser.selectedTab = gBrowser.addTab();
gBrowser.selectedBrowser.addEventListener("load", function onLoad() {
gBrowser.selectedBrowser.removeEventListener("load", onLoad, true);
openScratchpad(runTests);
}, true);
content.location = "data:text/html;charset=utf8,test Scratchpad." +
"openErrorConsole()";
}
function runTests()
{
Services.obs.addObserver(function observer(aSubject) {
Services.obs.removeObserver(observer, "web-console-created");
aSubject.QueryInterface(Ci.nsISupportsString);
let hud = HUDService.getBrowserConsole();
ok(hud, "browser console is open");
is(aSubject.data, hud.hudId, "notification hudId is correct");
HUDService.toggleBrowserConsole().then(finish);
}, "web-console-created", false);
let hud = HUDService.getBrowserConsole();
ok(!hud, "browser console is not open");
info("wait for the browser console to open from Scratchpad");
gScratchpadWindow.Scratchpad.openErrorConsole();
}

Просмотреть файл

@ -463,21 +463,26 @@
// clear explicit width and columns before calculating from avail. height again
let gridStyle = this._grid.style;
gridStyle.removeProperty('min-width');
gridStyle.removeProperty('-moz-column-count');
gridStyle.removeProperty("min-width");
gridStyle.removeProperty("-moz-column-count");
// We favor overflowing horizontally, not vertically (rows then colums)
// rows attribute = max rows
let maxRowCount = Math.min(this.getAttribute("rows") || Infinity, Math.floor(containerDims.height / itemDims.height));
this._rowCount = Math.min(this.itemCount, maxRowCount);
if (this.hasAttribute("vertical")) {
this._columnCount = Math.floor(containerDims.width / itemDims.width) || 1;
this._rowCount = Math.floor(this.itemCount / this._columnCount);
} else {
// We favor overflowing horizontally, not vertically (rows then colums)
// rows attribute = max rows
let maxRowCount = Math.min(this.getAttribute("rows") || Infinity, Math.floor(containerDims.height / itemDims.height));
this._rowCount = Math.min(this.itemCount, maxRowCount);
// columns attribute = min cols
this._columnCount = this.itemCount ?
Math.max(
// at least 1 column when there are items
this.getAttribute("columns") || 1,
Math.ceil(this.itemCount / this._rowCount)
) : this.getAttribute("columns") || 0;
// columns attribute = min cols
this._columnCount = this.itemCount ?
Math.max(
// at least 1 column when there are items
this.getAttribute("columns") || 1,
Math.ceil(this.itemCount / this._rowCount)
) : this.getAttribute("columns") || 0;
}
// width is typically auto, cap max columns by truncating items collection
// or, setting max-width style property with overflow hidden

Просмотреть файл

@ -323,10 +323,6 @@ let BookmarksStartView = {
this._view.destruct();
}
},
show: function show() {
this._grid.arrangeItems();
}
};
/**

Просмотреть файл

@ -302,10 +302,6 @@ let HistoryStartView = {
_view: null,
get _grid() { return document.getElementById("start-history-grid"); },
show: function show() {
this._grid.arrangeItems();
},
init: function init() {
this._view = new HistoryView(this._grid, StartUI.maxResultsPerSection, true);
this._view.populateGrid();

Просмотреть файл

@ -98,6 +98,7 @@ RemoteTabsView.prototype = Util.extend(Object.create(View.prototype), {
}, this);
}
this.setUIAccessVisible(show);
this._set.arrangeItems();
},
destruct: function destruct() {
@ -127,8 +128,4 @@ let RemoteTabsStartView = {
this._view.destruct();
}
},
show: function show() {
this._grid.arrangeItems();
}
};

Просмотреть файл

@ -6,10 +6,6 @@
Cu.import("resource://gre/modules/Services.jsm");
// When setting the max-height of the start tab contents, this is the buffer we subtract
// for the nav bar plus white space above it.
const kBottomContentMargin = 50;
var StartUI = {
get startUI() { return document.getElementById("start-container"); },
@ -30,7 +26,6 @@ var StartUI = {
document.getElementById("bcast_preciseInput").setAttribute("input",
this.chromeWin.InputSourceHelper.isPrecise ? "precise" : "imprecise");
this._updateStartHeight();
this._adjustDOMforViewState();
TopSitesStartView.init();
@ -38,12 +33,6 @@ var StartUI = {
HistoryStartView.init();
RemoteTabsStartView.init();
TopSitesStartView.show();
BookmarksStartView.show();
HistoryStartView.show();
RemoteTabsStartView.show();
this.chromeWin.document.getElementById("browsers").addEventListener("SizeChanged", this, true);
this.chromeWin.addEventListener("MozPrecisePointer", this, true);
this.chromeWin.addEventListener("MozImprecisePointer", this, true);
Services.obs.addObserver(this, "metro_viewstate_changed", false);
@ -60,7 +49,6 @@ var StartUI = {
RemoteTabsStartView.uninit();
if (this.chromeWin) {
this.chromeWin.document.getElementById("browsers").removeEventListener("SizeChanged", this, true);
this.chromeWin.removeEventListener("MozPrecisePointer", this, true);
this.chromeWin.removeEventListener("MozImprecisePointer", this, true);
}
@ -108,7 +96,8 @@ var StartUI = {
this.onClick(aEvent);
break;
case "MozMousePixelScroll":
if (this.startUI.getAttribute("viewstate") == "snapped") {
let viewstate = this.startUI.getAttribute("viewstate");
if (viewstate === "snapped" || viewstate === "portrait") {
window.scrollBy(0, aEvent.detail);
} else {
window.scrollBy(aEvent.detail, 0);
@ -117,17 +106,9 @@ var StartUI = {
aEvent.preventDefault();
aEvent.stopPropagation();
break;
case "SizeChanged":
this._updateStartHeight();
break;
}
},
_updateStartHeight: function () {
document.getElementById("start-container").style.maxHeight =
(this.chromeWin.ContentAreaObserver.contentHeight - kBottomContentMargin) + "px";
},
_adjustDOMforViewState: function() {
if (this.chromeWin.MetroUtils.immersive) {
let currViewState = "";

Просмотреть файл

@ -311,8 +311,4 @@ let TopSitesStartView = {
this._view.destruct();
}
},
show: function show() {
this._grid.arrangeItems();
}
};

Просмотреть файл

@ -29,9 +29,18 @@ function View() {
View.prototype = {
_adjustDOMforViewState: function _adjustDOMforViewState(aState) {
if (this._set) {
if (undefined == aState)
aState = this._set.getAttribute("viewstate");
if (undefined == aState)
aState = this._set.getAttribute("viewstate");
this._set.setAttribute("suppressonselect", (aState == "snapped"));
if (aState == "portrait") {
this._set.setAttribute("vertical", true);
} else {
this._set.removeAttribute("vertical");
}
this._set.arrangeItems();
}
},

Просмотреть файл

@ -190,15 +190,19 @@ documenttab[selected] .documenttab-selection {
#startui-page {
overflow-x: scroll;
overflow-y: hidden;
height: 100%;
}
#startui-body {
height: 100%;
margin: 0;
}
#start-container {
display: -moz-box;
min-width: @grid_double_column_width@;
height: 100%;
width: 100%;
}
#start-topsites {
@ -210,7 +214,8 @@ documenttab[selected] .documenttab-selection {
padding-bottom: @toolbar_height@;
}
#start-container[viewstate="snapped"] {
#start-container[viewstate="snapped"],
#start-container[viewstate="portrait"] {
-moz-box-orient: vertical;
}

Просмотреть файл

@ -44,6 +44,7 @@
%define tile_border_color #dbdcde
%define tile_spacing 12px
%define tile_side_margin 6px
%define scroller_thickness 4px
%define scroller_minimum 8px

Просмотреть файл

@ -624,6 +624,7 @@ arrowbox {
}
.meta-section-title {
margin: @metro_spacing_normal@ @tile_side_margin@;
font-size: @metro_font_large@;
font-weight: 100;
cursor: default;

Просмотреть файл

@ -68,7 +68,7 @@ richgriditem {
background-origin: padding-box;
/* content positioning within the grid "cell"
gives us the gutters/spacing between tiles */
top: 2px; right: 6px; bottom: 10px; left: 6px;
top: 2px; right: @tile_side_margin@; bottom: 10px; left: @tile_side_margin@;
border: @metro_border_thin@ solid @tile_border_color@;
box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.1);
transition: 150ms transform ease-out;

Просмотреть файл

@ -1616,6 +1616,7 @@ window[tabsontop="false"] richlistitem[type~="action"][actiontype="switchtab"][s
#go-button,
#urlbar-go-button {
-moz-image-region: rect(0, 84px, 28px, 56px);
height: 14px;
}
#go-button:hover:active,

Просмотреть файл

@ -54,7 +54,7 @@ nsXBLContentSink::nsXBLContentSink()
mSecondaryState(eXBL_None),
mDocInfo(nullptr),
mIsChromeOrResource(false),
mFoundFirstBinding(false),
mFoundFirstBinding(false),
mBinding(nullptr),
mHandler(nullptr),
mImplementation(nullptr),
@ -453,8 +453,15 @@ nsXBLContentSink::OnOpenContainer(const PRUnichar **aAtts,
NS_ASSERTION(mBinding, "Must have binding here");
mSecondaryState = eXBL_InConstructor;
nsAutoString name;
if (!mCurrentBindingID.IsEmpty()) {
name.Assign(mCurrentBindingID);
name.AppendLiteral("_XBL_Constructor");
} else {
name.AppendLiteral("XBL_Constructor");
}
nsXBLProtoImplAnonymousMethod* newMethod =
new nsXBLProtoImplAnonymousMethod();
new nsXBLProtoImplAnonymousMethod(name.get());
if (newMethod) {
newMethod->SetLineNumber(aLineNumber);
mBinding->SetConstructor(newMethod);
@ -466,8 +473,15 @@ nsXBLContentSink::OnOpenContainer(const PRUnichar **aAtts,
mSecondaryState == eXBL_None);
NS_ASSERTION(mBinding, "Must have binding here");
mSecondaryState = eXBL_InDestructor;
nsAutoString name;
if (!mCurrentBindingID.IsEmpty()) {
name.Assign(mCurrentBindingID);
name.AppendLiteral("_XBL_Destructor");
} else {
name.AppendLiteral("XBL_Destructor");
}
nsXBLProtoImplAnonymousMethod* newMethod =
new nsXBLProtoImplAnonymousMethod();
new nsXBLProtoImplAnonymousMethod(name.get());
if (newMethod) {
newMethod->SetLineNumber(aLineNumber);
mBinding->SetDestructor(newMethod);
@ -529,9 +543,8 @@ nsresult
nsXBLContentSink::ConstructBinding(uint32_t aLineNumber)
{
nsCOMPtr<nsIContent> binding = GetCurrentContent();
nsAutoString id;
binding->GetAttr(kNameSpaceID_None, nsGkAtoms::id, id);
NS_ConvertUTF16toUTF8 cid(id);
binding->GetAttr(kNameSpaceID_None, nsGkAtoms::id, mCurrentBindingID);
NS_ConvertUTF16toUTF8 cid(mCurrentBindingID);
nsresult rv = NS_OK;

Просмотреть файл

@ -135,6 +135,8 @@ protected:
bool mIsChromeOrResource; // For bug #45989
bool mFoundFirstBinding;
nsString mCurrentBindingID;
nsXBLPrototypeBinding* mBinding;
nsXBLPrototypeHandler* mHandler; // current handler, owned by its PrototypeBinding
nsXBLProtoImpl* mImplementation;

Просмотреть файл

@ -397,7 +397,11 @@ nsXBLProtoImpl::Read(nsIObjectInputStream* aStream,
}
case XBLBinding_Serialize_Constructor:
{
mConstructor = new nsXBLProtoImplAnonymousMethod();
nsAutoString name;
rv = aStream->ReadString(name);
NS_ENSURE_SUCCESS(rv, rv);
mConstructor = new nsXBLProtoImplAnonymousMethod(name.get());
rv = mConstructor->Read(aStream);
if (NS_FAILED(rv)) {
delete mConstructor;
@ -410,7 +414,11 @@ nsXBLProtoImpl::Read(nsIObjectInputStream* aStream,
}
case XBLBinding_Serialize_Destructor:
{
mDestructor = new nsXBLProtoImplAnonymousMethod();
nsAutoString name;
rv = aStream->ReadString(name);
NS_ENSURE_SUCCESS(rv, rv);
mDestructor = new nsXBLProtoImplAnonymousMethod(name.get());
rv = mDestructor->Read(aStream);
if (NS_FAILED(rv)) {
delete mDestructor;

Просмотреть файл

@ -372,6 +372,9 @@ nsXBLProtoImplAnonymousMethod::Write(nsIObjectOutputStream* aStream,
nsresult rv = aStream->Write8(aType);
NS_ENSURE_SUCCESS(rv, rv);
rv = aStream->WriteWStringZ(mName);
NS_ENSURE_SUCCESS(rv, rv);
// Calling fromMarkedLocation() is safe because mMethod is traced by the
// Trace() method above, and because its value is never changed after it has
// been set to a compiled method.

Просмотреть файл

@ -131,8 +131,8 @@ protected:
class nsXBLProtoImplAnonymousMethod : public nsXBLProtoImplMethod {
public:
nsXBLProtoImplAnonymousMethod() :
nsXBLProtoImplMethod(EmptyString().get())
nsXBLProtoImplAnonymousMethod(const PRUnichar* aName) :
nsXBLProtoImplMethod(aName)
{}
nsresult Execute(nsIContent* aBoundElement);

Просмотреть файл

@ -16,7 +16,7 @@ typedef uint8_t XBLBindingSerializeDetails;
// A version number to ensure we don't load cached data in a different
// file format.
#define XBLBinding_Serialize_Version 0x00000001
#define XBLBinding_Serialize_Version 0x00000002
// Set for the first binding in a document
#define XBLBinding_Serialize_IsFirstBinding 1

Просмотреть файл

@ -9463,127 +9463,129 @@
> quinoa
40036a45854
> recency
40141a45960
40140a45959
> recurse/DGSV
40141a45961
> recuse/DGS
40208a46028
40208a46029
> refactor/SMDG
40244d46063
40244d46064
< reflexion/SM
40829c46648
40829c46649
< reverie/M
---
> reverie/MS
41415a47235
41415a47236
> sabre/MS
41914c47734
41914c47735
< schnaps's
---
> schnaps/M
41949c47769
41949c47770
< schrod's
---
> schrod/SM
41998a47819
41998a47820
> scot-free
42883,42885c48704
42883,42885c48705
< shit's
< shit/S!
< shite/S!
---
> shit/MS!
42887,42888c48706,48707
42887,42888c48707,48708
< shithead/S!
< shitload/!
---
> shithead/MS!
> shitload/MS!
42891c48710
42891c48711
< shitty/RT!
---
> shitty/TR!
42976a48796
42976a48797
> should've
43008c48828
43008c48829
< showtime
---
> showtime/MS
43724,43726c49544
43724,43726c49545
< smoulder's
< smouldered
< smoulders
---
> smoulder/GSMD
44062c49880
44062c49881
< sonofabitch
---
> sonofabitch/!
44346a50165
44346a50166
> spelled
44348a50168
44348a50169
> spelt
44371a50192
44371a50193
> spick/S!
44383c50204
44383c50205
< spik/S
---
> spik/S!
46106a51928
46106a51929
> syllabi
46160c51982
46160c51983
< synch/GMD
---
> synch/GMDS
46167d51988
46167d51989
< synchs
46203,46204c52024,52025
46203,46204c52025,52026
< sysadmin/S
< sysop/S
---
> sysadmin/MS
> sysop/MS
46752a52574
46752a52575
> terabit/MS
46753a52576,52577
46753a52577,52578
> terahertz/M
> terapixel/MS
46817a52642
46817a52643
> testcase/MS
46831a52657
46831a52658
> testsuite/MS
46925a52752
46925a52753
> theremin/MS
47755a53583
47755a53584
> transfect/DSMG
47774a53603,53604
47774a53604,53605
> transgenderism
> transgene/MS
47951c53781
47951c53782
< triage/M
---
> triage/MG
48869a54700
48869a54701
> unlikeable
49211c55042
49211c55043
< vagina/M
---
> vagina/MS
49368,49369c55199
49368,49369c55200
< velour's
< velours's
---
> velour/MS
49478a55309
49478a55310
> vertices
50148a55980
50148a55981
> weaponize/DSG
50260,50261d56091
50260,50261d56092
< werwolf/M
< werwolves
50728c56558
50728c56559
< women
---
> women/M
50794c56624
50794c56625
< wop/S!
---
> wop/MS!

Просмотреть файл

@ -1,4 +1,4 @@
57446
57447
0/nm
0th/pt
1/n1
@ -46282,6 +46282,7 @@ recur/S
recurred
recurrence/SM
recurring
recurse/DGSV
recursion/S
recuse/DGS
recyclable/MS

Просмотреть файл

@ -125,16 +125,22 @@ class GeckoInputConnection
}
}
public void runOnIcThread(final Handler uiHandler,
final GeckoEditableClient client,
final Runnable runnable) {
final Handler icHandler = client.getInputConnectionHandler();
if (icHandler.getLooper() == uiHandler.getLooper()) {
// IC thread is UI thread; safe to run directly
runnable.run();
return;
}
runOnIcThread(icHandler, runnable);
}
public void sendEventFromUiThread(final Handler uiHandler,
final GeckoEditableClient client,
final GeckoEvent event) {
final Handler icHandler = client.getInputConnectionHandler();
if (icHandler.getLooper() == uiHandler.getLooper()) {
// IC thread is UI thread; safe to send event directly
client.sendEvent(event);
return;
}
runOnIcThread(icHandler, new Runnable() {
runOnIcThread(uiHandler, client, new Runnable() {
@Override public void run() {
client.sendEvent(event);
}
@ -849,10 +855,22 @@ class GeckoInputConnection
}
@Override
public boolean onKeyMultiple(int keyCode, int repeatCount, KeyEvent event) {
public boolean onKeyMultiple(int keyCode, int repeatCount, final KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_UNKNOWN) {
// KEYCODE_UNKNOWN means the characters are in KeyEvent.getCharacters()
return commitText(event.getCharacters(), 1);
View view = getView();
if (view != null) {
InputThreadUtils.sInstance.runOnIcThread(
view.getRootView().getHandler(), mEditableClient,
new Runnable() {
@Override public void run() {
// Don't call GeckoInputConnection.commitText because it can
// post a key event back to onKeyMultiple, causing a loop
GeckoInputConnection.super.commitText(event.getCharacters(), 1);
}
});
}
return true;
}
while ((repeatCount--) != 0) {
if (!processKey(keyCode, event, true) ||

Просмотреть файл

@ -1,7 +1,7 @@
#filter substitution
package @ANDROID_PACKAGE_NAME@.tests;
public class testTabHistory extends PixelTest {
public class testTabHistory extends BaseTest {
@Override
protected int getTestType() {
@ -21,11 +21,11 @@ public class testTabHistory extends PixelTest {
String url3 = getAbsoluteUrl("/robocop/robocop_blank_03.html");
// Create tab history
loadAndPaint(url);
inputAndLoadUrl(url);
verifyPageTitle("Browser Blank Page 01");
loadAndPaint(url2);
inputAndLoadUrl(url2);
verifyPageTitle("Browser Blank Page 02");
loadAndPaint(url3);
inputAndLoadUrl(url3);
verifyPageTitle("Browser Blank Page 03");
// Get the device information and create the navigation for it

Просмотреть файл

@ -8,7 +8,7 @@ var timer;
function handleRequest(req, resp) {
resp.processAsync();
resp.setHeader("Cache-Control", "no-cache", false);
resp.setHeader("Cache-Control", "no-cache, no-store", false);
resp.setHeader("Content-Type", "text/html;charset=utf-8", false);
let opts = {};