mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge branch 'mozilla-central'
This commit is contained in:
commit
92700462f0
12
Makefile.in
12
Makefile.in
@ -15,9 +15,11 @@ export TOPLEVEL_BUILD := 1
|
||||
|
||||
default::
|
||||
|
||||
ifndef TEST_MOZBUILD
|
||||
ifdef MOZ_BUILD_APP
|
||||
include $(topsrcdir)/$(MOZ_BUILD_APP)/build.mk
|
||||
endif
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
@ -28,6 +30,10 @@ DIST_GARBAGE = config.cache config.log config.status* config-defs.h \
|
||||
netwerk/necko-config.h xpcom/xpcom-config.h xpcom/xpcom-private.h \
|
||||
.mozconfig.mk
|
||||
|
||||
ifndef MOZ_PROFILE_USE
|
||||
buildid.h source-repo.h: FORCE
|
||||
endif
|
||||
|
||||
ifdef JS_STANDALONE
|
||||
configure_dir = $(topsrcdir)/js/src
|
||||
else
|
||||
@ -309,12 +315,6 @@ ifdef SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE
|
||||
else
|
||||
$(SHELL) $(topsrcdir)/toolkit/crashreporter/tools/upload_symbols.sh $(SYMBOL_INDEX_NAME) '$(DIST)/$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip'
|
||||
endif
|
||||
|
||||
# MOZ_SOURCE_STAMP is defined in package-name.mk with a deferred assignment.
|
||||
# exporting it makes make run its $(shell) command for each invoked submake,
|
||||
# so transform it to an immediate assignment.
|
||||
MOZ_SOURCE_STAMP := $(MOZ_SOURCE_STAMP)
|
||||
export MOZ_SOURCE_STAMP
|
||||
endif
|
||||
|
||||
.PHONY: update-packaging
|
||||
|
@ -80,11 +80,9 @@ TreeWalker::NextChild()
|
||||
|
||||
nsIContent* parent = parentNode->AsElement();
|
||||
top = PushState(parent);
|
||||
while (nsIContent* childNode = Next(top)) {
|
||||
if (childNode == mAnchorNode) {
|
||||
mAnchorNode = parent;
|
||||
return NextChild();
|
||||
}
|
||||
if (top->mDOMIter.Seek(mAnchorNode)) {
|
||||
mAnchorNode = parent;
|
||||
return NextChild();
|
||||
}
|
||||
|
||||
// XXX We really should never get here, it means we're trying to find an
|
||||
|
@ -2,9 +2,6 @@
|
||||
# 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/.
|
||||
|
||||
USE_RCS_MK := 1
|
||||
include $(topsrcdir)/config/makefiles/rcs.mk
|
||||
|
||||
# Make sure the standalone glue doesn't try to get libxpcom.so from b2g/app.
|
||||
NSDISTMODE = copy
|
||||
|
||||
@ -61,7 +58,6 @@ libs::
|
||||
# Copy the app icon for b2g-desktop
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
cp $(DIST)/branding/$(APP_ICON).ico $(DIST)/bin/chrome/icons/default/$(APP_ICON).ico
|
||||
$(DIST)/bin/redit$(HOST_BIN_SUFFIX) $(DIST)/bin/$(APP_BINARY) $(DIST)/branding/$(APP_ICON).ico
|
||||
cp $(DIST)/branding/$(APP_ICON).ico $(DIST)/bin/chrome/icons/default/default.ico
|
||||
else ifneq (gonk,$(MOZ_WIDGET_TOOLKIT))
|
||||
cp $(DIST)/branding/default.png $(DIST)/bin/chrome/icons/default/default.png
|
||||
|
@ -1015,7 +1015,6 @@ pref("security.exthelperapp.disable_background_handling", true);
|
||||
// Inactivity time in milliseconds after which we shut down the OS.File worker.
|
||||
pref("osfile.reset_worker_delay", 5000);
|
||||
|
||||
pref("apz.displayport_expiry_ms", 0);
|
||||
// APZ physics settings, tuned by UX designers
|
||||
pref("apz.axis_lock.mode", 2); // Use "sticky" axis locking
|
||||
pref("apz.fling_curve_function_x1", "0.41");
|
||||
|
@ -8,9 +8,6 @@ CONFIGURE_SUBST_FILES += ['installer/Makefile']
|
||||
|
||||
DIRS += ['chrome', 'components', 'locales']
|
||||
|
||||
if CONFIG['OS_ARCH'] == 'WINNT':
|
||||
DIRS += ['../xulrunner/tools/redit']
|
||||
|
||||
if CONFIG['GAIADIR']:
|
||||
DIRS += ['gaia']
|
||||
|
||||
|
@ -79,7 +79,7 @@ LPROJ := Contents/Resources/$(LPROJ_ROOT).lproj
|
||||
clean clobber repackage::
|
||||
$(RM) -r $(dist_dest)
|
||||
|
||||
MAC_BUNDLE_VERSION = $(shell $(PYTHON) $(srcdir)/macversion.py --version=$(MOZ_APP_VERSION) --buildid=$(DEPTH)/config/buildid)
|
||||
MAC_BUNDLE_VERSION = $(shell $(PYTHON) $(srcdir)/macversion.py --version=$(MOZ_APP_VERSION) --buildid=$(DEPTH)/buildid.h)
|
||||
|
||||
.PHONY: repackage
|
||||
tools repackage:: $(DIST)/bin/$(MOZ_APP_NAME)
|
||||
|
@ -28,7 +28,7 @@ if not options.version:
|
||||
# builds), but also so that newly-built older versions (e.g. beta build) aren't
|
||||
# considered "newer" than previously-built newer versions (e.g. a trunk nightly)
|
||||
|
||||
buildid = open(options.buildid, 'r').read()
|
||||
define, MOZ_BUILDID, buildid = open(options.buildid, 'r').read().split()
|
||||
|
||||
# extract only the major version (i.e. "14" from "14.0b1")
|
||||
majorVersion = re.match(r'^(\d+)[^\d].*', options.version).group(1)
|
||||
|
@ -1102,6 +1102,12 @@ var gBrowserInit = {
|
||||
// the original tab in the other window.
|
||||
let tabToOpen = uriToLoad;
|
||||
|
||||
// If this tab was passed as a window argument, clear the
|
||||
// reference to it from the arguments array.
|
||||
if (window.arguments[0] == tabToOpen) {
|
||||
window.arguments[0] = null;
|
||||
}
|
||||
|
||||
// Stop the about:blank load
|
||||
gBrowser.stop();
|
||||
// make sure it has a docshell
|
||||
|
@ -694,20 +694,21 @@ Sanitizer.sanitize = function(aParentWindow)
|
||||
Sanitizer.onStartup = Task.async(function*() {
|
||||
// Make sure that we are triggered during shutdown, at the right time,
|
||||
// and only once.
|
||||
let placesClient = Cc["@mozilla.org/browser/nav-history-service;1"] .getService(Ci.nsPIPlacesDatabase)
|
||||
.shutdownClient
|
||||
.jsclient;
|
||||
let placesClient = Cc["@mozilla.org/browser/nav-history-service;1"]
|
||||
.getService(Ci.nsPIPlacesDatabase)
|
||||
.shutdownClient
|
||||
.jsclient;
|
||||
|
||||
let deferredSanitization = PromiseUtils.defer();
|
||||
let sanitizationInProgress = false;
|
||||
let doSanitize = function() {
|
||||
if (sanitizationInProgress) {
|
||||
return deferredSanitization.promise;
|
||||
if (!sanitizationInProgress) {
|
||||
sanitizationInProgress = true;
|
||||
Sanitizer.onShutdown().catch(er => {Promise.reject(er) /* Do not return rejected promise */;}).then(() =>
|
||||
deferredSanitization.resolve()
|
||||
);
|
||||
}
|
||||
sanitizationInProgress = true;
|
||||
Sanitizer.onShutdown().catch(er => {Promise.reject(er) /* Do not return rejected promise */;}).then(() =>
|
||||
deferredSanitization.resolve()
|
||||
);
|
||||
return deferredSanitization.promise;
|
||||
}
|
||||
placesClient.addBlocker("sanitize.js: Sanitize on shutdown", doSanitize);
|
||||
|
||||
|
@ -747,6 +747,8 @@
|
||||
let topLevel = aWebProgress.isTopLevel;
|
||||
|
||||
if (topLevel) {
|
||||
let isSameDocument =
|
||||
!!(aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_SAME_DOCUMENT);
|
||||
// If userTypedClear > 0, the document loaded correctly and we should be
|
||||
// clearing the user typed value. We also need to clear the typed value
|
||||
// if the document failed to load, to make sure the urlbar reflects the
|
||||
@ -758,14 +760,12 @@
|
||||
if (this.mBrowser.userTypedClear > 0 ||
|
||||
((aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_ERROR_PAGE) &&
|
||||
aLocation.spec != "about:blank") ||
|
||||
aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_SAME_DOCUMENT) {
|
||||
isSameDocument) {
|
||||
this.mBrowser.userTypedValue = null;
|
||||
}
|
||||
|
||||
// If the browser was playing audio, we should remove the playing state.
|
||||
if (this.mTab.hasAttribute("soundplaying") &&
|
||||
(!this.mBrowser.lastURI ||
|
||||
this.mBrowser.lastURI.spec != aLocation.spec)) {
|
||||
if (this.mTab.hasAttribute("soundplaying") && !isSameDocument) {
|
||||
this.mTab.removeAttribute("soundplaying");
|
||||
this.mTabBrowser._tabAttrModified(this.mTab, ["soundplaying"]);
|
||||
}
|
||||
@ -788,9 +788,9 @@
|
||||
}
|
||||
|
||||
// Don't clear the favicon if this onLocationChange was
|
||||
// triggered by a pushState or a replaceState. See bug 550565.
|
||||
if (aWebProgress.isLoadingDocument &&
|
||||
!(aWebProgress.loadType & Ci.nsIDocShell.LOAD_CMD_PUSHSTATE)) {
|
||||
// triggered by a pushState or a replaceState (bug 550565) or
|
||||
// a hash change (bug 408415).
|
||||
if (aWebProgress.isLoadingDocument && !isSameDocument) {
|
||||
this.mBrowser.mIconURL = null;
|
||||
}
|
||||
|
||||
@ -1106,6 +1106,8 @@
|
||||
}
|
||||
|
||||
if (!this._previewMode) {
|
||||
this._recordTabAccess(this.mCurrentTab);
|
||||
|
||||
this.mCurrentTab.lastAccessed = Infinity;
|
||||
this.mCurrentTab.removeAttribute("unread");
|
||||
oldTab.lastAccessed = Date.now();
|
||||
@ -1298,6 +1300,45 @@
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<!--
|
||||
This function assumes we have an LRU cache of tabs (either
|
||||
images of tab content or their layers). The goal is to find
|
||||
out how far into the cache we need to look in order to find
|
||||
aTab. We record this number in telemetry and also move aTab to
|
||||
the front of the cache.
|
||||
|
||||
A newly created tab has position Infinity in the cache.
|
||||
If a tab is closed, it has no effect on the position of other
|
||||
tabs in the cache since we assume that closing a tab doesn't
|
||||
cause us to load in any other tabs.
|
||||
|
||||
We ignore the effect of dragging tabs between windows.
|
||||
-->
|
||||
<method name="_recordTabAccess">
|
||||
<parameter name="aTab"/>
|
||||
<body><![CDATA[
|
||||
if (!Services.telemetry.canRecordExtended) {
|
||||
return;
|
||||
}
|
||||
|
||||
let tabs = Array.from(this.visibleTabs);
|
||||
|
||||
let pos = aTab.cachePosition;
|
||||
for (let i = 0; i < tabs.length; i++) {
|
||||
// If aTab is moving to the front, everything that was
|
||||
// previously in front of it is bumped up one position.
|
||||
if (tabs[i].cachePosition < pos) {
|
||||
tabs[i].cachePosition++;
|
||||
}
|
||||
}
|
||||
aTab.cachePosition = 0;
|
||||
|
||||
if (isFinite(pos)) {
|
||||
Services.telemetry.getHistogramById("TAB_SWITCH_CACHE_POSITION").add(pos);
|
||||
}
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="_tabAttrModified">
|
||||
<parameter name="aTab"/>
|
||||
<parameter name="aChanged"/>
|
||||
@ -1758,6 +1799,7 @@
|
||||
var aForceNotRemote;
|
||||
var aNoReferrer;
|
||||
var aUserContextId;
|
||||
var aEventDetail;
|
||||
if (arguments.length == 2 &&
|
||||
typeof arguments[1] == "object" &&
|
||||
!(arguments[1] instanceof Ci.nsIURI)) {
|
||||
@ -1775,6 +1817,7 @@
|
||||
aForceNotRemote = params.forceNotRemote;
|
||||
aNoReferrer = params.noReferrer;
|
||||
aUserContextId = params.userContextId;
|
||||
aEventDetail = params.eventDetail;
|
||||
}
|
||||
|
||||
// if we're adding tabs, we're past interrupt mode, ditch the owner
|
||||
@ -1893,8 +1936,8 @@
|
||||
// Dispatch a new tab notification. We do this once we're
|
||||
// entirely done, so that things are in a consistent state
|
||||
// even if the event listener opens or closes tabs.
|
||||
var evt = document.createEvent("Events");
|
||||
evt.initEvent("TabOpen", true, false);
|
||||
var detail = aEventDetail || {};
|
||||
var evt = new CustomEvent("TabOpen", { bubbles: true, detail });
|
||||
t.dispatchEvent(evt);
|
||||
|
||||
// If we didn't swap docShells with a preloaded browser
|
||||
@ -2128,7 +2171,7 @@
|
||||
|
||||
var isLastTab = (this.tabs.length - this._removingTabs.length == 1);
|
||||
|
||||
if (!this._beginRemoveTab(aTab, false, null, true, skipPermitUnload))
|
||||
if (!this._beginRemoveTab(aTab, null, null, true, skipPermitUnload))
|
||||
return;
|
||||
|
||||
if (!aTab.pinned && !aTab.hidden && aTab._fullyOpen && byMouse)
|
||||
@ -2173,7 +2216,7 @@
|
||||
|
||||
<method name="_beginRemoveTab">
|
||||
<parameter name="aTab"/>
|
||||
<parameter name="aTabWillBeMoved"/>
|
||||
<parameter name="aAdoptedByTab"/>
|
||||
<parameter name="aCloseWindowWithLastTab"/>
|
||||
<parameter name="aCloseWindowFastpath"/>
|
||||
<parameter name="aSkipPermitUnload"/>
|
||||
@ -2207,7 +2250,7 @@
|
||||
newTab = true;
|
||||
}
|
||||
|
||||
if (!aTab._pendingPermitUnload && !aTabWillBeMoved && !aSkipPermitUnload) {
|
||||
if (!aTab._pendingPermitUnload && !aAdoptedByTab && !aSkipPermitUnload) {
|
||||
// We need to block while calling permitUnload() because it
|
||||
// processes the event queue and may lead to another removeTab()
|
||||
// call before permitUnload() returns.
|
||||
@ -2241,11 +2284,10 @@
|
||||
// Dispatch a notification.
|
||||
// We dispatch it before any teardown so that event listeners can
|
||||
// inspect the tab that's about to close.
|
||||
var evt = document.createEvent("UIEvent");
|
||||
evt.initUIEvent("TabClose", true, false, window, aTabWillBeMoved ? 1 : 0);
|
||||
var evt = new CustomEvent("TabClose", { bubbles: true, detail: { adoptedBy: aAdoptedByTab } });
|
||||
aTab.dispatchEvent(evt);
|
||||
|
||||
if (!aTabWillBeMoved && !gMultiProcessBrowser) {
|
||||
if (!aAdoptedByTab && !gMultiProcessBrowser) {
|
||||
// Prevent this tab from showing further dialogs, since we're closing it
|
||||
var windowUtils = browser.contentWindow.QueryInterface(Ci.nsIInterfaceRequestor).
|
||||
getInterface(Ci.nsIDOMWindowUtils);
|
||||
@ -2261,7 +2303,7 @@
|
||||
filter.removeProgressListener(listener);
|
||||
listener.destroy();
|
||||
|
||||
if (browser.registeredOpenURI && !aTabWillBeMoved) {
|
||||
if (browser.registeredOpenURI && !aAdoptedByTab) {
|
||||
this._placesAutocomplete.unregisterOpenPage(browser.registeredOpenURI);
|
||||
this._unifiedComplete.unregisterOpenPage(browser.registeredOpenURI);
|
||||
delete browser.registeredOpenURI;
|
||||
@ -2495,7 +2537,7 @@
|
||||
// First, start teardown of the other browser. Make sure to not
|
||||
// fire the beforeunload event in the process. Close the other
|
||||
// window if this was its last tab.
|
||||
if (!remoteBrowser._beginRemoveTab(aOtherTab, true, true))
|
||||
if (!remoteBrowser._beginRemoveTab(aOtherTab, aOurTab, true))
|
||||
return;
|
||||
|
||||
let modifiedAttrs = [];
|
||||
@ -2946,7 +2988,7 @@
|
||||
// Swap the dropped tab with a new one we create and then close
|
||||
// it in the other window (making it seem to have moved between
|
||||
// windows).
|
||||
let newTab = this.addTab("about:blank");
|
||||
let newTab = this.addTab("about:blank", { eventDetail: { adoptedTab: aTab } });
|
||||
let newBrowser = this.getBrowserForTab(newTab);
|
||||
let newURL = aTab.linkedBrowser.currentURI.spec;
|
||||
|
||||
@ -4266,6 +4308,7 @@
|
||||
this.mCurrentTab._tPos = 0;
|
||||
this.mCurrentTab._fullyOpen = true;
|
||||
this.mCurrentTab.lastAccessed = Infinity;
|
||||
this.mCurrentTab.cachePosition = 0;
|
||||
this.mCurrentTab.linkedBrowser = this.mCurrentBrowser;
|
||||
this._tabForBrowser.set(this.mCurrentBrowser, this.mCurrentTab);
|
||||
|
||||
@ -6162,6 +6205,8 @@
|
||||
</setter>
|
||||
</property>
|
||||
|
||||
<field name="cachePosition">Infinity</field>
|
||||
|
||||
<field name="mOverCloseButton">false</field>
|
||||
<property name="_overPlayingIcon" readonly="true">
|
||||
<getter><![CDATA[
|
||||
|
@ -29,8 +29,8 @@ support-files =
|
||||
download_page.html
|
||||
dummy_page.html
|
||||
feed_tab.html
|
||||
file_bug550565_favicon.ico
|
||||
file_bug550565_popup.html
|
||||
file_generic_favicon.ico
|
||||
file_with_favicon.html
|
||||
file_bug822367_1.html
|
||||
file_bug822367_1.js
|
||||
file_bug822367_2.html
|
||||
@ -165,6 +165,7 @@ skip-if = e10s # Bug 1236991 - Update or remove tests that use fillInPageTooltip
|
||||
[browser_bug380960.js]
|
||||
[browser_bug386835.js]
|
||||
[browser_bug406216.js]
|
||||
[browser_bug408415.js]
|
||||
[browser_bug409481.js]
|
||||
[browser_bug409624.js]
|
||||
[browser_bug413915.js]
|
||||
|
21
browser/base/content/test/general/browser_bug408415.js
Normal file
21
browser/base/content/test/general/browser_bug408415.js
Normal file
@ -0,0 +1,21 @@
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
|
||||
let testPath = getRootDirectory(gTestPath);
|
||||
|
||||
let tab = gBrowser.addTab(testPath + "file_with_favicon.html");
|
||||
|
||||
tab.linkedBrowser.addEventListener("DOMContentLoaded", function() {
|
||||
tab.linkedBrowser.removeEventListener("DOMContentLoaded", arguments.callee, true);
|
||||
|
||||
let expectedIcon = testPath + "file_generic_favicon.ico";
|
||||
|
||||
is(gBrowser.getIcon(tab), expectedIcon, "Correct icon before hash change.");
|
||||
tab.linkedBrowser.contentWindow.location.href += "#foo";
|
||||
is(gBrowser.getIcon(tab), expectedIcon, "Correct icon after hash change.");
|
||||
|
||||
gBrowser.removeTab(tab);
|
||||
|
||||
finish();
|
||||
}, true);
|
||||
}
|
@ -13,14 +13,14 @@ function test() {
|
||||
tabA = gBrowser.addTab(testPage);
|
||||
gBrowser.tabContainer.addEventListener("TabClose", function(aEvent) {
|
||||
gBrowser.tabContainer.removeEventListener("TabClose", arguments.callee, true);
|
||||
ok(!aEvent.detail, "This was a normal tab close");
|
||||
ok(!aEvent.detail.adoptedBy, "This was a normal tab close");
|
||||
|
||||
// test tab close by moving
|
||||
tabB = gBrowser.addTab(testPage);
|
||||
gBrowser.tabContainer.addEventListener("TabClose", function(aEvent) {
|
||||
gBrowser.tabContainer.removeEventListener("TabClose", arguments.callee, true);
|
||||
executeSoon(function() {
|
||||
ok(aEvent.detail, "This was a tab closed by moving");
|
||||
ok(aEvent.detail.adoptedBy, "This was a tab closed by moving");
|
||||
|
||||
// cleanup
|
||||
newWin.close();
|
||||
|
@ -3,12 +3,12 @@ function test() {
|
||||
|
||||
let testPath = getRootDirectory(gTestPath);
|
||||
|
||||
let tab = gBrowser.addTab(testPath + "file_bug550565_popup.html");
|
||||
let tab = gBrowser.addTab(testPath + "file_with_favicon.html");
|
||||
|
||||
tab.linkedBrowser.addEventListener("DOMContentLoaded", function() {
|
||||
tab.linkedBrowser.removeEventListener("DOMContentLoaded", arguments.callee, true);
|
||||
|
||||
let expectedIcon = testPath + "file_bug550565_favicon.ico";
|
||||
let expectedIcon = testPath + "file_generic_favicon.ico";
|
||||
|
||||
is(gBrowser.getIcon(tab), expectedIcon, "Correct icon before pushState.");
|
||||
tab.linkedBrowser.contentWindow.history.pushState("page2", "page2", "page2");
|
||||
|
@ -147,3 +147,33 @@ add_task(function* test_dragging_blacklisted() {
|
||||
yield BrowserTestUtils.closeWindow(remoteWin1);
|
||||
yield BrowserTestUtils.closeWindow(remoteWin2);
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* Tests that tabs dragged between windows dispatch TabOpen and TabClose
|
||||
* events with the appropriate adoption details.
|
||||
*/
|
||||
add_task(function* test_dragging_adoption_events() {
|
||||
let win1 = yield BrowserTestUtils.openNewBrowserWindow();
|
||||
let win2 = yield BrowserTestUtils.openNewBrowserWindow();
|
||||
|
||||
let tab1 = yield BrowserTestUtils.openNewForegroundTab(win1.gBrowser);
|
||||
let tab2 = yield BrowserTestUtils.openNewForegroundTab(win2.gBrowser);
|
||||
|
||||
let awaitCloseEvent = BrowserTestUtils.waitForEvent(tab1, "TabClose");
|
||||
let awaitOpenEvent = BrowserTestUtils.waitForEvent(win2, "TabOpen");
|
||||
|
||||
let effect = ChromeUtils.synthesizeDrop(tab1, tab2,
|
||||
[[{type: TAB_DROP_TYPE, data: tab1}]],
|
||||
null, win1, win2);
|
||||
is(effect, "move", "Tab should be moved from win1 to win2.");
|
||||
|
||||
let closeEvent = yield awaitCloseEvent;
|
||||
let openEvent = yield awaitOpenEvent;
|
||||
|
||||
is(openEvent.detail.adoptedTab, tab1, "New tab adopted old tab");
|
||||
is(closeEvent.detail.adoptedBy, openEvent.target, "Old tab adopted by new tab");
|
||||
|
||||
yield BrowserTestUtils.closeWindow(win1);
|
||||
yield BrowserTestUtils.closeWindow(win2);
|
||||
});
|
||||
|
@ -1,12 +0,0 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test file for bug 550565.</title>
|
||||
|
||||
<!--Set a favicon; that's the whole point of this file.-->
|
||||
<link rel="icon" href="file_bug550565_favicon.ico">
|
||||
</head>
|
||||
<body>
|
||||
Test file for bug 550565.
|
||||
</body>
|
||||
</html>
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
12
browser/base/content/test/general/file_with_favicon.html
Normal file
12
browser/base/content/test/general/file_with_favicon.html
Normal file
@ -0,0 +1,12 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test file for bugs with favicons</title>
|
||||
|
||||
<!--Set a favicon; that's the whole point of this file.-->
|
||||
<link rel="icon" href="file_generic_favicon.ico">
|
||||
</head>
|
||||
<body>
|
||||
Test file for bugs with favicons
|
||||
</body>
|
||||
</html>
|
@ -891,8 +891,9 @@ var SessionStoreInternal = {
|
||||
this.onTabAdd(win, target);
|
||||
break;
|
||||
case "TabClose":
|
||||
// aEvent.detail determines if the tab was closed by moving to a different window
|
||||
if (!aEvent.detail)
|
||||
// `adoptedBy` will be set if the tab was closed because it is being
|
||||
// moved to a new window.
|
||||
if (!aEvent.detail.adoptedBy)
|
||||
this.onTabClose(win, target);
|
||||
this.onTabRemove(win, target);
|
||||
break;
|
||||
|
@ -9,25 +9,7 @@ include $(topsrcdir)/config/makefiles/makeutils.mk
|
||||
ifdef MOZ_APP_BASENAME
|
||||
APP_INI_DEPS = $(topsrcdir)/config/milestone.txt
|
||||
|
||||
MOZ_BUILDID := $(shell cat $(DEPTH)/config/buildid)
|
||||
APP_INI_DEPS += $(DEPTH)/config/buildid
|
||||
|
||||
DEFINES += -DMOZ_BUILDID=$(MOZ_BUILDID)
|
||||
|
||||
APP_INI_DEPS += $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MOZ_SOURCE_STAMP := $(firstword $(shell cd $(topsrcdir)/$(MOZ_BUILD_APP)/.. && hg parent --template='{node}\n' 2>/dev/null))
|
||||
ifdef MOZ_SOURCE_STAMP
|
||||
DEFINES += -DMOZ_SOURCE_STAMP='$(MOZ_SOURCE_STAMP)'
|
||||
endif
|
||||
|
||||
ifdef MOZ_INCLUDE_SOURCE_INFO
|
||||
source_repo ?= $(call getSourceRepo,$(topsrcdir)/$(MOZ_BUILD_APP)/..)
|
||||
ifneq (,$(source_repo))
|
||||
DEFINES += -DMOZ_SOURCE_REPO='$(source_repo)'
|
||||
endif
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
# NOTE: Keep .gdbinit in the topsrcdir for people who run gdb from the topsrcdir.
|
||||
|
@ -15,6 +15,8 @@
|
||||
; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#endif
|
||||
#filter substitution
|
||||
#include @TOPOBJDIR@/buildid.h
|
||||
#include @TOPOBJDIR@/source-repo.h
|
||||
[App]
|
||||
Vendor=@MOZ_APP_VENDOR@
|
||||
Name=@MOZ_APP_BASENAME@
|
||||
|
@ -7,6 +7,7 @@ import glob
|
||||
import time
|
||||
import re
|
||||
import os
|
||||
import posixpath
|
||||
import tempfile
|
||||
import shutil
|
||||
import subprocess
|
||||
@ -214,7 +215,7 @@ class RemoteAutomation(Automation):
|
||||
|
||||
try:
|
||||
dumpDir = tempfile.mkdtemp()
|
||||
remoteCrashDir = self._remoteProfile + '/minidumps/'
|
||||
remoteCrashDir = posixpath.join(self._remoteProfile, 'minidumps')
|
||||
if not self._devicemanager.dirExists(remoteCrashDir):
|
||||
# If crash reporting is enabled (MOZ_CRASHREPORTER=1), the
|
||||
# minidumps directory is automatically created when Fennec
|
||||
|
@ -75,3 +75,5 @@ if CONFIG['MOZ_APP_BASENAME']:
|
||||
FINAL_TARGET_PP_FILES += ['application.ini']
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android' and CONFIG['MOZ_UPDATER']:
|
||||
FINAL_TARGET_PP_FILES += ['update-settings.ini']
|
||||
|
||||
DEFINES['TOPOBJDIR'] = TOPOBJDIR
|
||||
|
@ -38,7 +38,12 @@ import errno
|
||||
import hashlib
|
||||
import shutil
|
||||
from optparse import OptionParser
|
||||
from subprocess import check_call, check_output, STDOUT
|
||||
from subprocess import (
|
||||
check_call,
|
||||
check_output,
|
||||
STDOUT,
|
||||
CalledProcessError,
|
||||
)
|
||||
import redo
|
||||
|
||||
def OptionalEnvironmentVariable(v):
|
||||
@ -93,7 +98,14 @@ def DoSSHCommand(command, user, host, port=None, ssh_key=None):
|
||||
cmdline.extend(["%s@%s" % (user, host), command])
|
||||
|
||||
with redo.retrying(check_output, sleeptime=10) as f:
|
||||
output = f(cmdline, stderr=STDOUT).strip()
|
||||
try:
|
||||
output = f(cmdline, stderr=STDOUT).strip()
|
||||
except CalledProcessError as e:
|
||||
print "failed ssh command output:"
|
||||
print '=' * 20
|
||||
print e.output
|
||||
print '=' * 20
|
||||
raise
|
||||
return output
|
||||
|
||||
raise Exception("Command %s returned non-zero exit code" % cmdline)
|
||||
|
78
build/variables.py
Normal file
78
build/variables.py
Normal file
@ -0,0 +1,78 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# 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/.
|
||||
|
||||
from __future__ import print_function, unicode_literals
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
def buildid_header(output):
|
||||
buildid = os.environ.get('MOZ_BUILD_DATE')
|
||||
if buildid and len(buildid) != 14:
|
||||
print('Ignoring invalid MOZ_BUILD_DATE: %s' % buildid, file=sys.stderr)
|
||||
buildid = None
|
||||
if not buildid:
|
||||
buildid = datetime.now().strftime('%Y%m%d%H%M%S')
|
||||
output.write("#define MOZ_BUILDID %s\n" % buildid)
|
||||
|
||||
|
||||
def get_program_output(*command):
|
||||
try:
|
||||
with open(os.devnull) as stderr:
|
||||
return subprocess.check_output(command, stderr=stderr)
|
||||
except:
|
||||
return ''
|
||||
|
||||
|
||||
def get_hg_info(workdir):
|
||||
repo = get_program_output('hg', '-R', workdir, 'path', 'default')
|
||||
if repo:
|
||||
repo = repo.strip()
|
||||
if repo.startswith('ssh://'):
|
||||
repo = 'https://' + repo[6:]
|
||||
repo = repo.rstrip('/')
|
||||
|
||||
changeset = get_program_output(
|
||||
'hg', '-R', workdir, 'parent', '--template={node}')
|
||||
|
||||
return repo, changeset
|
||||
|
||||
|
||||
def source_repo_header(output):
|
||||
# We allow the source repo and changeset to be specified via the
|
||||
# environment (see configure)
|
||||
import buildconfig
|
||||
repo = buildconfig.substs.get('MOZ_SOURCE_REPO')
|
||||
changeset = buildconfig.substs.get('MOZ_SOURCE_CHANGESET')
|
||||
source = ''
|
||||
|
||||
if bool(repo) != bool(changeset):
|
||||
raise Exception('MOZ_SOURCE_REPO and MOZ_SOURCE_CHANGESET both must '
|
||||
'be set (or not set).')
|
||||
|
||||
if not repo:
|
||||
if os.path.exists(os.path.join(buildconfig.topsrcdir, '.hg')):
|
||||
repo, changeset = get_hg_info(buildconfig.topsrcdir)
|
||||
|
||||
if changeset:
|
||||
output.write('#define MOZ_SOURCE_STAMP %s\n' % changeset)
|
||||
|
||||
if repo and buildconfig.substs.get('MOZ_INCLUDE_SOURCE_INFO'):
|
||||
source = '%s/rev/%s' % (repo, changeset)
|
||||
output.write('#define MOZ_SOURCE_REPO %s\n' % repo)
|
||||
output.write('#define MOZ_SOURCE_URL %s\n' % source)
|
||||
|
||||
|
||||
def main(args):
|
||||
if (len(args)):
|
||||
func = globals().get(args[0])
|
||||
if func:
|
||||
return func(sys.stdout, *args[1:])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main(sys.argv[1:]))
|
@ -238,7 +238,7 @@ profiledbuild::
|
||||
ifdef MOZ_UNIFY_BDATE
|
||||
ifndef MOZ_BUILD_DATE
|
||||
ifdef MOZ_BUILD_PROJECTS
|
||||
MOZ_BUILD_DATE = $(shell $(PYTHON) $(TOPSRCDIR)/toolkit/xre/make-platformini.py --print-buildid)
|
||||
MOZ_BUILD_DATE = $(shell $(PYTHON) $(TOPSRCDIR)/build/variables.py buildid_header | awk '{print $$3}')
|
||||
export MOZ_BUILD_DATE
|
||||
endif
|
||||
endif
|
||||
|
@ -32,21 +32,6 @@ endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
ifndef JS_STANDALONE
|
||||
ifndef MOZ_PROFILE_USE
|
||||
# Generate a new buildid every time we "export" in config... that's only
|
||||
# supposed to be once per-build!
|
||||
export:: buildid
|
||||
|
||||
buildid: FORCE
|
||||
ifdef MOZ_BUILD_DATE
|
||||
printf '%s' $(MOZ_BUILD_DATE) > buildid
|
||||
else
|
||||
$(PYTHON) $(topsrcdir)/toolkit/xre/make-platformini.py --print-buildid > buildid
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef WRAP_SYSTEM_INCLUDES
|
||||
export-preqs = \
|
||||
$(call mkdir_deps,system_wrappers) \
|
||||
|
@ -80,7 +80,7 @@ $(TOPOBJDIR)/%: FORCE
|
||||
# corresponding install manifests are named correspondingly, with forward
|
||||
# slashes replaced with underscores, and prefixed with `install_`. That is,
|
||||
# the install manifest for `dist/bin` would be `install_dist_bin`.
|
||||
$(addprefix install-,$(INSTALL_MANIFESTS)): install-%: $(TOPOBJDIR)/config/buildid
|
||||
$(addprefix install-,$(INSTALL_MANIFESTS)): install-%: $(addprefix $(TOPOBJDIR)/,buildid.h source-repo.h)
|
||||
@# For now, force preprocessed files to be reprocessed every time.
|
||||
@# The overhead is not that big, and this avoids waiting for proper
|
||||
@# support for defines tracking in process_install_manifest.
|
||||
@ -91,7 +91,6 @@ $(addprefix install-,$(INSTALL_MANIFESTS)): install-%: $(TOPOBJDIR)/config/build
|
||||
$(TOPOBJDIR)/$* \
|
||||
-DAB_CD=en-US \
|
||||
-DBOOKMARKS_INCLUDE_DIR=$(TOPSRCDIR)/browser/locales/en-US/profile \
|
||||
-DMOZ_BUILDID=$(shell cat $(TOPOBJDIR)/config/buildid) \
|
||||
$(ACDEFINES) \
|
||||
install_$(subst /,_,$*)
|
||||
|
||||
|
@ -58,6 +58,7 @@ endif
|
||||
$(LOOP_OVER_DIRS)
|
||||
|
||||
showbuild showhost: _DEPEND_CFLAGS=
|
||||
showbuild showhost: COMPILE_PDB_FLAG=
|
||||
showbuild:
|
||||
$(call print_vars,\
|
||||
MOZ_BUILD_ROOT \
|
||||
|
@ -117,9 +117,5 @@ ifdef USE_AUTOTARGETS_MK # mkdir_deps
|
||||
include $(topORerr)/config/makefiles/autotargets.mk
|
||||
endif
|
||||
|
||||
ifdef USE_RCS_MK
|
||||
include $(topORerr)/config/makefiles/rcs.mk
|
||||
endif
|
||||
|
||||
## copy(src, dst): recursive copy
|
||||
copy_dir = (cd $(1)/. && $(TAR) $(TAR_CREATE_FLAGS) - .) | (cd $(2)/. && tar -xf -)
|
||||
|
@ -1,54 +0,0 @@
|
||||
# -*- makefile -*-
|
||||
# vim:set ts=8 sw=8 sts=8 noet:
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# 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/.
|
||||
#
|
||||
|
||||
ifdef USE_RCS_MK #{
|
||||
|
||||
ifndef INCLUDED_RCS_MK #{
|
||||
|
||||
MOZ_RCS_TYPE_HG ?= $(notdir $(wildcard $(topsrcdir)/.hg))
|
||||
MOZ_RCS_TYPE_GIT ?= $(notdir $(wildcard $(topsrcdir)/.git))
|
||||
|
||||
|
||||
###########################################################################
|
||||
# HAVE_MERCURIAL_RCS
|
||||
###########################################################################
|
||||
ifeq (.hg,$(MOZ_RCS_TYPE_HG)) #{
|
||||
|
||||
# Intent: Retrieve the http:// repository path for a directory.
|
||||
# Usage: $(call getSourceRepo[,repo_dir|args])
|
||||
# Args:
|
||||
# path (optional): repository to query. Defaults to $(topsrcdir)
|
||||
getSourceRepo = \
|
||||
$(call FUNC_getSourceRepo,$(if $(1),cd $(1) && hg,hg --repository $(topsrcdir)))
|
||||
|
||||
# return: http://hg.mozilla.org/mozilla-central
|
||||
FUNC_getSourceRepo = \
|
||||
$(strip \
|
||||
$(patsubst %/,%,\
|
||||
$(patsubst ssh://%,http://%,\
|
||||
$(firstword $(shell $(getargv) showconfig paths.default))\
|
||||
)))
|
||||
|
||||
#} HAVE_MERCURIAL_RCS
|
||||
|
||||
###########################################################################
|
||||
# HAVE_GIT_RCS
|
||||
###########################################################################
|
||||
else ifeq (.git,$(MOZ_RCS_TYPE_GIT)) #{
|
||||
|
||||
GIT ?= git
|
||||
getSourceRepo = \
|
||||
$(shell cd $(topsrcdir) && $(GIT) rev-parse --verify HEAD)
|
||||
|
||||
endif #} HAVE_GIT_RCS
|
||||
|
||||
|
||||
INCLUDED_RCS_MK := 1
|
||||
endif #}
|
||||
|
||||
endif #}
|
@ -114,7 +114,7 @@ if (!defined($module))
|
||||
my $bufferstr=" ";
|
||||
|
||||
my $MILESTONE_FILE = "$topsrcdir/config/milestone.txt";
|
||||
my $BUILDID_FILE = "$depth/config/buildid";
|
||||
my $BUILDID_FILE = "$depth/buildid.h";
|
||||
|
||||
#Read module.ver file
|
||||
#Version file overrides for WIN32:
|
||||
@ -183,7 +183,7 @@ $displayname =~ s/^\s*(.*)\s*$/$1/;
|
||||
|
||||
open(BUILDID, "<", $BUILDID_FILE) || die("Couldn't open buildid file: $BUILDID_FILE");
|
||||
$buildid = <BUILDID>;
|
||||
$buildid =~ s/\s*$//;
|
||||
$buildid =~ s/^#define MOZ_BUILDID\s+(\S+)\s*$/$1/;
|
||||
close BUILDID;
|
||||
|
||||
my $daycount = daysFromBuildID($buildid);
|
||||
|
11
configure.in
11
configure.in
@ -8724,15 +8724,8 @@ fi
|
||||
|
||||
# External builds (specifically Ubuntu) may drop the hg repo information, so we allow to
|
||||
# explicitly set the repository and changeset information in.
|
||||
if test "$MOZILLA_OFFICIAL"; then
|
||||
if test -z "$MOZ_SOURCE_REPO" && test -z "$MOZ_SOURCE_CHANGESET" && test -d ${_topsrcdir}/.hg; then
|
||||
MOZ_SOURCE_CHANGESET=`cd $_topsrcdir && hg parent --template='{node}'`
|
||||
MOZ_SOURCE_REPO=`cd $_topsrcdir && hg showconfig paths.default | sed -e 's|^ssh://|http://|' -e 's|/$||'`
|
||||
fi
|
||||
SOURCE_REV_URL=$MOZ_SOURCE_REPO/rev/$MOZ_SOURCE_CHANGESET
|
||||
fi
|
||||
AC_SUBST(SOURCE_REV_URL)
|
||||
|
||||
AC_SUBST(MOZ_SOURCE_REPO)
|
||||
AC_SUBST(MOZ_SOURCE_CHANGESET)
|
||||
AC_SUBST(MOZ_INCLUDE_SOURCE_INFO)
|
||||
|
||||
if test "$MOZ_TELEMETRY_REPORTING"; then
|
||||
|
2
devtools/bootstrap.js
vendored
2
devtools/bootstrap.js
vendored
@ -82,7 +82,7 @@ function reload(event) {
|
||||
devtools.reload(reloadToolbox);
|
||||
|
||||
// Also tells gDevTools to reload its dependencies
|
||||
const {gDevTools} = Cu.import("resource://devtools/client/framework/gDevTools.jsm", {});
|
||||
const {gDevTools} = devtools.require("devtools/client/framework/devtools");
|
||||
gDevTools.reload();
|
||||
}
|
||||
|
||||
|
@ -17,8 +17,8 @@ loader.lazyRequireGetter(this, "Services");
|
||||
|
||||
loader.lazyImporter(this, "BrowserToolboxProcess",
|
||||
"resource://devtools/client/framework/ToolboxProcess.jsm");
|
||||
loader.lazyImporter(this, "gDevTools",
|
||||
"resource://devtools/client/framework/gDevTools.jsm");
|
||||
loader.lazyRequireGetter(this, "gDevTools",
|
||||
"devtools/client/framework/devtools", true);
|
||||
|
||||
const Strings = Services.strings.createBundle(
|
||||
"chrome://devtools/locale/aboutdebugging.properties");
|
||||
|
@ -148,13 +148,24 @@ AnimationTimeBlock.prototype = {
|
||||
|
||||
/**
|
||||
* Get a formatted title for this animation. This will be either:
|
||||
* "some-name", "some-name : CSS Transition", or "some-name : CSS Animation",
|
||||
* depending if the server provides the type, and what type it is.
|
||||
* "some-name", "some-name : CSS Transition", "some-name : CSS Animation",
|
||||
* "some-name : Script Animation", or "Script Animation", depending
|
||||
* if the server provides the type, what type it is and if the animation
|
||||
* has a name
|
||||
* @param {AnimationPlayerFront} animation
|
||||
*/
|
||||
function getFormattedAnimationTitle({state}) {
|
||||
// Older servers don't send the type.
|
||||
return state.type
|
||||
? L10N.getFormatStr("timeline." + state.type + ".nameLabel", state.name)
|
||||
: state.name;
|
||||
// Older servers don't send a type, and only know about
|
||||
// CSSAnimations and CSSTransitions, so it's safe to use
|
||||
// just the name.
|
||||
if (!state.type) {
|
||||
return state.name;
|
||||
}
|
||||
|
||||
// Script-generated animations may not have a name.
|
||||
if (state.type === "scriptanimation" && !state.name) {
|
||||
return L10N.getStr("timeline.scriptanimation.unnamedLabel");
|
||||
}
|
||||
|
||||
return L10N.getFormatStr(`timeline.${state.type}.nameLabel`, state.name);
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ support-files =
|
||||
doc_modify_playbackRate.html
|
||||
doc_negative_animation.html
|
||||
doc_simple_animation.html
|
||||
doc_multiple_animation_types.html
|
||||
head.js
|
||||
|
||||
[browser_animation_animated_properties_displayed.js]
|
||||
|
@ -7,11 +7,41 @@
|
||||
// Test that player widgets are displayed right when the animation panel is
|
||||
// initialized, if the selected node (<body> by default) is animated.
|
||||
|
||||
const { ANIMATION_TYPES } = require("devtools/server/actors/animation");
|
||||
|
||||
add_task(function*() {
|
||||
yield addTab(TEST_URL_ROOT + "doc_body_animation.html");
|
||||
yield new Promise(resolve => {
|
||||
SpecialPowers.pushPrefEnv({"set": [
|
||||
["dom.animations-api.core.enabled", true]
|
||||
]}, resolve);
|
||||
});
|
||||
|
||||
yield addTab(TEST_URL_ROOT + "doc_multiple_animation_types.html");
|
||||
|
||||
let {panel} = yield openAnimationInspector();
|
||||
is(panel.animationsTimelineComponent.animations.length, 1,
|
||||
"One animation is handled by the timeline after init");
|
||||
assertAnimationsDisplayed(panel, 1, "One animation is displayed after init");
|
||||
is(panel.animationsTimelineComponent.animations.length, 3,
|
||||
"Three animations are handled by the timeline after init");
|
||||
assertAnimationsDisplayed(panel, 3,
|
||||
"Three animations are displayed after init");
|
||||
is(
|
||||
panel.animationsTimelineComponent
|
||||
.animationsEl
|
||||
.querySelectorAll(`.animation.${ANIMATION_TYPES.SCRIPT_ANIMATION}`)
|
||||
.length,
|
||||
1,
|
||||
"One script-generated animation is displayed");
|
||||
is(
|
||||
panel.animationsTimelineComponent
|
||||
.animationsEl
|
||||
.querySelectorAll(`.animation.${ANIMATION_TYPES.CSS_ANIMATION}`)
|
||||
.length,
|
||||
1,
|
||||
"One CSS animation is displayed");
|
||||
is(
|
||||
panel.animationsTimelineComponent
|
||||
.animationsEl
|
||||
.querySelectorAll(`.animation.${ANIMATION_TYPES.CSS_TRANSITION}`)
|
||||
.length,
|
||||
1,
|
||||
"One CSS transition is displayed");
|
||||
});
|
||||
|
@ -0,0 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<style>
|
||||
.ball {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.script-animation {
|
||||
background: #f06;
|
||||
}
|
||||
|
||||
.css-transition {
|
||||
background: #006;
|
||||
transition: background-color 20s;
|
||||
}
|
||||
|
||||
.css-animation {
|
||||
background: #a06;
|
||||
animation: flash 10s forwards;
|
||||
}
|
||||
|
||||
@keyframes flash {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
50% {
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="ball script-animation"></div>
|
||||
<div class="ball css-animation"></div>
|
||||
<div class="ball css-transition"></div>
|
||||
|
||||
<script>
|
||||
setTimeout(function(){
|
||||
document.querySelector(".css-transition").style.backgroundColor = "yellow";
|
||||
}, 0);
|
||||
|
||||
document.querySelector(".script-animation").animate([
|
||||
{ opacity: 1, offset: 0 },
|
||||
{ opacity: .1, offset: 1 }
|
||||
], {
|
||||
duration: 10000,
|
||||
fill: "forwards"
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -5,8 +5,8 @@
|
||||
"use strict";
|
||||
|
||||
var Cu = Components.utils;
|
||||
const {gDevTools} = Cu.import("resource://devtools/client/framework/gDevTools.jsm", {});
|
||||
const {require} = Cu.import("resource://devtools/shared/Loader.jsm", {});
|
||||
const {gDevTools} = require("devtools/client/framework/devtools");
|
||||
const promise = require("promise");
|
||||
const {TargetFactory} = require("devtools/client/framework/target");
|
||||
const {console} = Cu.import("resource://gre/modules/Console.jsm", {});
|
||||
|
@ -13,10 +13,10 @@ Services.prefs.setBoolPref("devtools.debugger.log", false);
|
||||
|
||||
var { generateUUID } = Cc['@mozilla.org/uuid-generator;1'].getService(Ci.nsIUUIDGenerator);
|
||||
var { Task } = Cu.import("resource://gre/modules/Task.jsm", {});
|
||||
var { gDevTools } = Cu.import("resource://devtools/client/framework/gDevTools.jsm", {});
|
||||
var { require } = Cu.import("resource://devtools/shared/Loader.jsm", {});
|
||||
|
||||
var promise = require("promise");
|
||||
var { gDevTools } = require("devtools/client/framework/devtools");
|
||||
var { DebuggerClient } = require("devtools/shared/client/main");
|
||||
var { DebuggerServer } = require("devtools/server/main");
|
||||
var { CallWatcherFront } = require("devtools/server/actors/call-watcher");
|
||||
|
@ -8,8 +8,7 @@
|
||||
|
||||
const { Cc, Ci, Cu } = require("chrome");
|
||||
const l10n = require("gcli/l10n");
|
||||
|
||||
loader.lazyImporter(this, "gDevTools", "resource://devtools/client/framework/gDevTools.jsm");
|
||||
const { gDevTools } = require("devtools/client/framework/devtools");
|
||||
|
||||
/**
|
||||
* The commands and converters that are exported to GCLI
|
||||
|
@ -101,7 +101,7 @@ function removeTabA() {
|
||||
let deferred = promise.defer();
|
||||
|
||||
once(gBrowser.tabContainer, "TabClose").then(aEvent => {
|
||||
ok(!aEvent.detail, "This was a normal tab close");
|
||||
ok(!aEvent.detail.adoptedBy, "This was a normal tab close");
|
||||
|
||||
// Let the actor's TabClose handler finish first.
|
||||
executeSoon(deferred.resolve);
|
||||
@ -145,7 +145,7 @@ function removeTabC() {
|
||||
let deferred = promise.defer();
|
||||
|
||||
once(gBrowser.tabContainer, "TabClose").then(aEvent => {
|
||||
ok(aEvent.detail, "This was a tab closed by moving");
|
||||
ok(aEvent.detail.adoptedBy, "This was a tab closed by moving");
|
||||
|
||||
// Let the actor's TabClose handler finish first.
|
||||
executeSoon(deferred.resolve);
|
||||
@ -203,7 +203,7 @@ function removeTabB() {
|
||||
let deferred = promise.defer();
|
||||
|
||||
once(gBrowser.tabContainer, "TabClose").then(aEvent => {
|
||||
ok(!aEvent.detail, "This was a normal tab close");
|
||||
ok(!aEvent.detail.adoptedBy, "This was a normal tab close");
|
||||
|
||||
// Let the actor's TabClose handler finish first.
|
||||
executeSoon(deferred.resolve);
|
||||
|
@ -51,8 +51,13 @@ devtoolsCommandlineHandler.prototype = {
|
||||
let window = Services.wm.getMostRecentWindow("devtools:webconsole");
|
||||
if (!window) {
|
||||
let { require } = Cu.import("resource://devtools/shared/Loader.jsm", {});
|
||||
// Load the browser devtools main module as the loader's main module.
|
||||
Cu.import("resource://devtools/client/framework/gDevTools.jsm");
|
||||
// Ensure loading main devtools module that hooks up into browser UI
|
||||
// and initialize all devtools machinery.
|
||||
// browser.xul or main top-level document used to load this module,
|
||||
// but this code may be called without/before it.
|
||||
// Bug 1247203 should ease handling this.
|
||||
require("devtools/client/framework/devtools-browser");
|
||||
|
||||
let hudservice = require("devtools/client/webconsole/hudservice");
|
||||
let { console } = Cu.import("resource://gre/modules/Console.jsm", {});
|
||||
hudservice.toggleBrowserConsole().then(null, console.error);
|
||||
@ -71,9 +76,10 @@ devtoolsCommandlineHandler.prototype = {
|
||||
Services.obs.addObserver(function onStartup(window) {
|
||||
Services.obs.removeObserver(onStartup,
|
||||
"browser-delayed-startup-finished");
|
||||
const {gDevTools} = Cu.import("resource://devtools/client/framework/gDevTools.jsm", {});
|
||||
const {devtools} = Cu.import("resource://devtools/shared/Loader.jsm", {});
|
||||
let target = devtools.TargetFactory.forTab(window.gBrowser.selectedTab);
|
||||
const {require} = Cu.import("resource://devtools/shared/Loader.jsm", {});
|
||||
const {gDevTools} = require("devtools/client/framework/devtools");
|
||||
const {TargetFactory} = require("devtools/client/framework/target");
|
||||
let target = TargetFactory.forTab(window.gBrowser.selectedTab);
|
||||
gDevTools.showToolbox(target);
|
||||
}, "browser-delayed-startup-finished", false);
|
||||
},
|
||||
|
@ -10,8 +10,8 @@ var Cu = Components.utils;
|
||||
Cu.import('resource://gre/modules/XPCOMUtils.jsm');
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://gre/modules/Task.jsm");
|
||||
var {gDevTools} = Cu.import("resource://devtools/client/framework/gDevTools.jsm", {});
|
||||
var {require} = Cu.import("resource://devtools/shared/Loader.jsm", {});
|
||||
var {gDevTools} = require("devtools/client/framework/devtools");
|
||||
var {TargetFactory} = require("devtools/client/framework/target");
|
||||
var {Toolbox} = require("devtools/client/framework/toolbox")
|
||||
var promise = require("promise");
|
||||
|
@ -9,18 +9,12 @@
|
||||
* Please now use the modules:
|
||||
* - devtools/client/framework/devtools for gDevTools
|
||||
* - devtools/client/framework/devtools-browser for gDevToolsBrowser
|
||||
*
|
||||
* We still do use gDevTools.jsm in our codebase,
|
||||
* bug 1245462 is going to ensure we no longer do that.
|
||||
*/
|
||||
|
||||
this.EXPORTED_SYMBOLS = [ "gDevTools", "gDevToolsBrowser" ];
|
||||
|
||||
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
|
||||
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
const { loader } = Cu.import("resource://devtools/shared/Loader.jsm", {});
|
||||
|
||||
/**
|
||||
|
@ -17,11 +17,11 @@ function scopedCuImport(path) {
|
||||
}
|
||||
|
||||
const {Services} = scopedCuImport("resource://gre/modules/Services.jsm");
|
||||
const {gDevTools} = scopedCuImport("resource://devtools/client/framework/gDevTools.jsm");
|
||||
const {console} = scopedCuImport("resource://gre/modules/Console.jsm");
|
||||
const {ScratchpadManager} = scopedCuImport("resource://devtools/client/scratchpad/scratchpad-manager.jsm");
|
||||
const {require} = scopedCuImport("resource://devtools/shared/Loader.jsm");
|
||||
|
||||
const {gDevTools} = require("devtools/client/framework/devtools");
|
||||
const {TargetFactory} = require("devtools/client/framework/target");
|
||||
const DevToolsUtils = require("devtools/shared/DevToolsUtils");
|
||||
let promise = require("promise");
|
||||
|
@ -9,7 +9,7 @@ const Services = require("Services");
|
||||
const promise = require("promise");
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Cu.import("resource://gre/modules/Task.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "gDevTools", "resource://devtools/client/framework/gDevTools.jsm");
|
||||
const {gDevTools} = require("devtools/client/framework/devtools");
|
||||
|
||||
exports.OptionsPanel = OptionsPanel;
|
||||
|
||||
|
@ -16,6 +16,7 @@ const SCREENSIZE_HISTOGRAM = "DEVTOOLS_SCREEN_RESOLUTION_ENUMERATED_PER_USER";
|
||||
|
||||
var {Cc, Ci, Cu} = require("chrome");
|
||||
var promise = require("promise");
|
||||
var {gDevTools} = require("devtools/client/framework/devtools");
|
||||
var EventEmitter = require("devtools/shared/event-emitter");
|
||||
var Telemetry = require("devtools/client/shared/telemetry");
|
||||
var HUDService = require("devtools/client/webconsole/hudservice");
|
||||
@ -23,7 +24,6 @@ var viewSource = require("devtools/client/shared/view-source");
|
||||
var { attachThread, detachThread } = require("./attach-thread");
|
||||
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://devtools/client/framework/gDevTools.jsm");
|
||||
Cu.import("resource://devtools/client/scratchpad/scratchpad-manager.jsm");
|
||||
Cu.import("resource://devtools/client/shared/DOMHelpers.jsm");
|
||||
Cu.import("resource://gre/modules/Task.jsm");
|
||||
|
@ -18,7 +18,7 @@ const {setTimeout, clearTimeout} = Cu.import("resource://gre/modules/Timer.jsm",
|
||||
const {OutputParser} = require("devtools/client/shared/output-parser");
|
||||
const {PrefObserver, PREF_ORIG_SOURCES} = require("devtools/client/styleeditor/utils");
|
||||
const {createChild} = require("devtools/client/inspector/shared/utils");
|
||||
const {gDevTools} = Cu.import("resource://devtools/client/framework/gDevTools.jsm", {});
|
||||
const {gDevTools} = require("devtools/client/framework/devtools");
|
||||
|
||||
loader.lazyRequireGetter(this, "overlays",
|
||||
"devtools/client/inspector/shared/style-inspector-overlays");
|
||||
|
@ -9,6 +9,7 @@
|
||||
const {Cu} = require("chrome");
|
||||
const {setTimeout, clearTimeout} =
|
||||
Cu.import("resource://gre/modules/Timer.jsm", {});
|
||||
const {gDevTools} = require("devtools/client/framework/devtools");
|
||||
|
||||
const DEFAULT_PREVIEW_TEXT = "Abc";
|
||||
const PREVIEW_UPDATE_DELAY = 150;
|
||||
|
@ -22,7 +22,7 @@ exports.items = [{
|
||||
],
|
||||
exec: function(args, context) {
|
||||
let target = context.environment.target;
|
||||
let gDevTools = require("resource://devtools/client/framework/gDevTools.jsm").gDevTools;
|
||||
let {gDevTools} = require("devtools/client/framework/devtools");
|
||||
|
||||
return gDevTools.showToolbox(target, "inspector").then(toolbox => {
|
||||
toolbox.getCurrentPanel().selection.setNode(args.selector, "gcli");
|
||||
|
@ -24,11 +24,10 @@ const {RuleEditor} =
|
||||
require("devtools/client/inspector/rules/views/rule-editor");
|
||||
const {createChild, promiseWarn} =
|
||||
require("devtools/client/inspector/shared/utils");
|
||||
const {gDevTools} = require("devtools/client/framework/devtools");
|
||||
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
loader.lazyGetter(this, "gDevTools", () =>
|
||||
Cu.import("resource://devtools/client/framework/gDevTools.jsm", {}).gDevTools);
|
||||
loader.lazyRequireGetter(this, "overlays",
|
||||
"devtools/client/inspector/shared/style-inspector-overlays");
|
||||
loader.lazyRequireGetter(this, "EventEmitter",
|
||||
|
@ -5,8 +5,8 @@
|
||||
"use strict";
|
||||
|
||||
var Cu = Components.utils;
|
||||
var {gDevTools} = Cu.import("resource://devtools/client/framework/gDevTools.jsm", {});
|
||||
var {require} = Cu.import("resource://devtools/shared/Loader.jsm", {});
|
||||
var {gDevTools} = require("devtools/client/framework/devtools");
|
||||
var {TargetFactory} = require("devtools/client/framework/target");
|
||||
var {CssRuleView, _ElementStyle} = require("devtools/client/inspector/rules/rules");
|
||||
var {CssLogic, CssSelector} = require("devtools/shared/inspector/css-logic");
|
||||
@ -14,8 +14,7 @@ var DevToolsUtils = require("devtools/shared/DevToolsUtils");
|
||||
var promise = require("promise");
|
||||
var {editableField, getInplaceEditorForSpan: inplaceEditor} =
|
||||
require("devtools/client/shared/inplace-editor");
|
||||
var {console} =
|
||||
Components.utils.import("resource://gre/modules/Console.jsm", {});
|
||||
var {console} = Cu.import("resource://gre/modules/Console.jsm", {});
|
||||
|
||||
// All tests are asynchronous
|
||||
waitForExplicitFinish();
|
||||
|
@ -18,7 +18,7 @@ XPCOMUtils.defineLazyGetter(this, "JsonViewService", function() {
|
||||
/**
|
||||
* Singleton object that represents the JSON View in-content tool.
|
||||
* It has the same lifetime as the browser. Initialization done by
|
||||
* DevTools() object from gDevTools.jsm
|
||||
* DevTools() object from devtools/client/framework/devtools.js
|
||||
*/
|
||||
var JsonView = {
|
||||
initialize: function() {
|
||||
|
@ -108,6 +108,17 @@ timeline.cssanimation.nameLabel=%S - CSS Animation
|
||||
# %S will be replaced by the name of the transition at run-time.
|
||||
timeline.csstransition.nameLabel=%S - CSS Transition
|
||||
|
||||
# LOCALIZATION NOTE (timeline.scriptanimation.nameLabel):
|
||||
# This string is displayed in a tooltip of the animation panel that is shown
|
||||
# when hovering over the name of a script-generated animation in the timeline UI.
|
||||
# %S will be replaced by the name of the animation at run-time.
|
||||
timeline.scriptanimation.nameLabel=%S - Script Animation
|
||||
|
||||
# LOCALIZATION NOTE (timeline.scriptanimation.unnamedLabel):
|
||||
# This string is displayed in a tooltip of the animation panel that is shown
|
||||
# when hovering over an unnamed script-generated animation in the timeline UI.
|
||||
timeline.scriptanimation.unnamedLabel=Script Animation
|
||||
|
||||
# LOCALIZATION NOTE (timeline.unknown.nameLabel):
|
||||
# This string is displayed in a tooltip of the animation panel that is shown
|
||||
# when hovering over the name of an unknown animation type in the timeline UI.
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
const { Cu } = require("chrome");
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
const { gDevTools } = require("resource://devtools/client/framework/gDevTools.jsm");
|
||||
const { gDevTools } = require("devtools/client/framework/devtools");
|
||||
|
||||
const { defaultTools, defaultThemes } = require("devtools/client/definitions");
|
||||
|
||||
|
@ -14,6 +14,7 @@ support-files =
|
||||
[browser_memory_dominator_trees_01.js]
|
||||
[browser_memory_dominator_trees_02.js]
|
||||
[browser_memory_filter_01.js]
|
||||
[browser_memory_keyboard.js]
|
||||
[browser_memory_no_allocation_stacks.js]
|
||||
[browser_memory_no_auto_expand.js]
|
||||
skip-if = debug # bug 1219554
|
||||
|
101
devtools/client/memory/test/browser/browser_memory_keyboard.js
Normal file
101
devtools/client/memory/test/browser/browser_memory_keyboard.js
Normal file
@ -0,0 +1,101 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
// Bug 1246570 - Check that when pressing on LEFT arrow, the parent tree node
|
||||
// gets focused.
|
||||
|
||||
"use strict";
|
||||
|
||||
const {
|
||||
snapshotState
|
||||
} = require("devtools/client/memory/constants");
|
||||
const {
|
||||
takeSnapshotAndCensus
|
||||
} = require("devtools/client/memory/actions/snapshot");
|
||||
|
||||
const TEST_URL = "http://example.com/browser/devtools/client/memory/test/browser/doc_steady_allocation.html";
|
||||
|
||||
function waitUntilFocused(store, node) {
|
||||
return waitUntilState(store, state =>
|
||||
state.snapshots.length === 1 &&
|
||||
state.snapshots[0].state === snapshotState.SAVED_CENSUS &&
|
||||
state.snapshots[0].census &&
|
||||
state.snapshots[0].census.focused &&
|
||||
state.snapshots[0].census.focused === node
|
||||
);
|
||||
}
|
||||
|
||||
function waitUntilExpanded(store, node) {
|
||||
return waitUntilState(store, state =>
|
||||
state.snapshots[0] &&
|
||||
state.snapshots[0].census &&
|
||||
state.snapshots[0].census.expanded.has(node.id));
|
||||
}
|
||||
|
||||
this.test = makeMemoryTest(TEST_URL, function* ({ tab, panel }) {
|
||||
const heapWorker = panel.panelWin.gHeapAnalysesClient;
|
||||
const front = panel.panelWin.gFront;
|
||||
const store = panel.panelWin.gStore;
|
||||
const { getState, dispatch } = store;
|
||||
const doc = panel.panelWin.document;
|
||||
|
||||
is(getState().breakdown.by, "coarseType");
|
||||
yield dispatch(takeSnapshotAndCensus(front, heapWorker));
|
||||
let census = getState().snapshots[0].census;
|
||||
let root1 = census.report.children[0];
|
||||
let root2 = census.report.children[0];
|
||||
let root3 = census.report.children[0];
|
||||
let root4 = census.report.children[0];
|
||||
let child1 = root1.children[0];
|
||||
|
||||
info("Click on first node.");
|
||||
let firstNode = doc.querySelector(".tree .heap-tree-item-name");
|
||||
EventUtils.synthesizeMouseAtCenter(firstNode, {}, panel.panelWin);
|
||||
yield waitUntilFocused(store, root1);
|
||||
ok(true, "First root is selected after click.");
|
||||
|
||||
info("Press DOWN key, expect second root focused.");
|
||||
EventUtils.synthesizeKey("VK_DOWN", {}, panel.panelWin);
|
||||
yield waitUntilFocused(store, root2);
|
||||
ok(true, "Second root is selected after pressing DOWN arrow.");
|
||||
|
||||
info("Press DOWN key, expect third root focused.");
|
||||
EventUtils.synthesizeKey("VK_DOWN", {}, panel.panelWin);
|
||||
yield waitUntilFocused(store, root3);
|
||||
ok(true, "Third root is selected after pressing DOWN arrow.");
|
||||
|
||||
info("Press DOWN key, expect fourth root focused.");
|
||||
EventUtils.synthesizeKey("VK_DOWN", {}, panel.panelWin);
|
||||
yield waitUntilFocused(store, root4);
|
||||
ok(true, "Fourth root is selected after pressing DOWN arrow.");
|
||||
|
||||
info("Press UP key, expect third root focused.");
|
||||
EventUtils.synthesizeKey("VK_UP", {}, panel.panelWin);
|
||||
yield waitUntilFocused(store, root3);
|
||||
ok(true, "Third root is selected after pressing UP arrow.");
|
||||
|
||||
info("Press UP key, expect second root focused.");
|
||||
EventUtils.synthesizeKey("VK_UP", {}, panel.panelWin);
|
||||
yield waitUntilFocused(store, root2);
|
||||
ok(true, "Second root is selected after pressing UP arrow.");
|
||||
|
||||
info("Press UP key, expect first root focused.");
|
||||
EventUtils.synthesizeKey("VK_UP", {}, panel.panelWin);
|
||||
yield waitUntilFocused(store, root1);
|
||||
ok(true, "First root is selected after pressing UP arrow.");
|
||||
|
||||
info("Press RIGHT key");
|
||||
EventUtils.synthesizeKey("VK_RIGHT", {}, panel.panelWin);
|
||||
yield waitUntilExpanded(store, root1);
|
||||
ok(true, "Root node is expanded.");
|
||||
|
||||
info("Press RIGHT key, expect first child focused.");
|
||||
EventUtils.synthesizeKey("VK_RIGHT", {}, panel.panelWin);
|
||||
yield waitUntilFocused(store, child1);
|
||||
ok(true, "First child is selected after pressing RIGHT arrow.");
|
||||
|
||||
info("Press LEFT key, expect first root focused.");
|
||||
EventUtils.synthesizeKey("VK_LEFT", {}, panel.panelWin);
|
||||
yield waitUntilFocused(store, root1);
|
||||
ok(true, "First root is selected after pressing LEFT arrow.");
|
||||
});
|
@ -5,14 +5,13 @@
|
||||
|
||||
var { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
|
||||
var { Services } = Cu.import("resource://gre/modules/Services.jsm", {});
|
||||
var { gDevTools } = Cu.import("resource://devtools/client/framework/gDevTools.jsm", {});
|
||||
var { console } = Cu.import("resource://gre/modules/Console.jsm", {});
|
||||
var { require } = Cu.import("resource://devtools/shared/Loader.jsm", {});
|
||||
|
||||
var DevToolsUtils = require("devtools/shared/DevToolsUtils");
|
||||
DevToolsUtils.testing = true;
|
||||
DevToolsUtils.dumpn.wantLogging = true;
|
||||
DevToolsUtils.dumpv.wantLogging = true;
|
||||
DevToolsUtils.dumpv.wantVerbose = false;
|
||||
|
||||
var { OS } = require("resource://gre/modules/osfile.jsm");
|
||||
var { FileUtils } = require("resource://gre/modules/FileUtils.jsm");
|
||||
|
@ -6,8 +6,8 @@ var { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
|
||||
|
||||
var { Services } = Cu.import("resource://gre/modules/Services.jsm", {});
|
||||
var { Task } = Cu.import("resource://gre/modules/Task.jsm", {});
|
||||
var { gDevTools } = Cu.import("resource://devtools/client/framework/gDevTools.jsm", {});
|
||||
var { require } = Cu.import("resource://devtools/shared/Loader.jsm", {});
|
||||
var { gDevTools } = require("devtools/client/framework/devtools");
|
||||
var { CurlUtils } = Cu.import("resource://devtools/client/shared/Curl.jsm", {});
|
||||
var promise = require("promise");
|
||||
var NetworkHelper = require("devtools/shared/webconsole/network-helper");
|
||||
|
@ -9,6 +9,7 @@ Cu.import("resource://devtools/client/shared/browser-loader.js", BrowserLoaderMo
|
||||
var { loader, require } = BrowserLoaderModule.BrowserLoader("resource://devtools/client/performance/", this);
|
||||
var { Task } = require("resource://gre/modules/Task.jsm");
|
||||
var { Heritage, ViewHelpers, WidgetMethods } = require("resource://devtools/client/shared/widgets/ViewHelpers.jsm");
|
||||
var {gDevTools} = require("devtools/client/framework/devtools");
|
||||
|
||||
// Events emitted by various objects in the panel.
|
||||
var EVENTS = require("devtools/client/performance/events");
|
||||
|
@ -8,7 +8,7 @@ var { Services } = Cu.import("resource://gre/modules/Services.jsm", {});
|
||||
var { Preferences } = Cu.import("resource://gre/modules/Preferences.jsm", {});
|
||||
var { Task } = Cu.import("resource://gre/modules/Task.jsm", {});
|
||||
var { require } = Cu.import("resource://devtools/shared/Loader.jsm", {});
|
||||
var { gDevTools } = Cu.import("resource://devtools/client/framework/gDevTools.jsm", {});
|
||||
var { gDevTools } = require("devtools/client/framework/devtools");
|
||||
var { console } = require("resource://gre/modules/Console.jsm");
|
||||
var { TargetFactory } = require("devtools/client/framework/target");
|
||||
var Promise = require("promise");
|
||||
|
@ -17,6 +17,9 @@ createEnum([
|
||||
// Add an additional viewport to display the document.
|
||||
"ADD_VIEWPORT",
|
||||
|
||||
// Resize the viewport.
|
||||
"RESIZE_VIEWPORT",
|
||||
|
||||
// Rotate the viewport.
|
||||
"ROTATE_VIEWPORT",
|
||||
|
||||
|
@ -4,7 +4,11 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
const { ADD_VIEWPORT, ROTATE_VIEWPORT } = require("./index");
|
||||
const {
|
||||
ADD_VIEWPORT,
|
||||
RESIZE_VIEWPORT,
|
||||
ROTATE_VIEWPORT
|
||||
} = require("./index");
|
||||
|
||||
module.exports = {
|
||||
|
||||
@ -17,6 +21,18 @@ module.exports = {
|
||||
};
|
||||
},
|
||||
|
||||
/**
|
||||
* Resize the viewport.
|
||||
*/
|
||||
resizeViewport(id, width, height) {
|
||||
return {
|
||||
type: RESIZE_VIEWPORT,
|
||||
id,
|
||||
width,
|
||||
height,
|
||||
};
|
||||
},
|
||||
|
||||
/**
|
||||
* Rotate the viewport.
|
||||
*/
|
||||
|
@ -8,7 +8,7 @@ const { createClass, createFactory, PropTypes } =
|
||||
require("devtools/client/shared/vendor/react");
|
||||
const { connect } = require("devtools/client/shared/vendor/react-redux");
|
||||
|
||||
const { rotateViewport } = require("./actions/viewports");
|
||||
const { resizeViewport, rotateViewport } = require("./actions/viewports");
|
||||
const Types = require("./types");
|
||||
const Viewports = createFactory(require("./components/viewports"));
|
||||
|
||||
@ -34,6 +34,8 @@ let App = createClass({
|
||||
location,
|
||||
viewports,
|
||||
onRotateViewport: id => dispatch(rotateViewport(id)),
|
||||
onResizeViewport: (id, width, height) =>
|
||||
dispatch(resizeViewport(id, width, height)),
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
const { DOM: dom, createClass } =
|
||||
const { DOM: dom, createClass, PropTypes } =
|
||||
require("devtools/client/shared/vendor/react");
|
||||
|
||||
const Types = require("../types");
|
||||
@ -17,6 +17,7 @@ module.exports = createClass({
|
||||
location: Types.location.isRequired,
|
||||
width: Types.viewport.width.isRequired,
|
||||
height: Types.viewport.height.isRequired,
|
||||
isResizing: PropTypes.bool.isRequired,
|
||||
},
|
||||
|
||||
render() {
|
||||
@ -24,11 +25,17 @@ module.exports = createClass({
|
||||
location,
|
||||
width,
|
||||
height,
|
||||
isResizing,
|
||||
} = this.props;
|
||||
|
||||
let className = "browser";
|
||||
if (isResizing) {
|
||||
className += " resizing";
|
||||
}
|
||||
|
||||
return dom.iframe(
|
||||
{
|
||||
className: "browser",
|
||||
className,
|
||||
src: location,
|
||||
width,
|
||||
height,
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
DevToolsModules(
|
||||
'browser.js',
|
||||
'resizable-viewport.js',
|
||||
'viewport-toolbar.js',
|
||||
'viewport.js',
|
||||
'viewports.js',
|
||||
|
143
devtools/client/responsive.html/components/resizable-viewport.js
Normal file
143
devtools/client/responsive.html/components/resizable-viewport.js
Normal file
@ -0,0 +1,143 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* 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/. */
|
||||
|
||||
/* global window */
|
||||
|
||||
"use strict";
|
||||
|
||||
const { DOM: dom, createClass, createFactory, PropTypes } =
|
||||
require("devtools/client/shared/vendor/react");
|
||||
|
||||
const Types = require("../types");
|
||||
const Browser = createFactory(require("./browser"));
|
||||
const ViewportToolbar = createFactory(require("./viewport-toolbar"));
|
||||
|
||||
const VIEWPORT_MIN_WIDTH = 280;
|
||||
const VIEWPORT_MIN_HEIGHT = 280;
|
||||
|
||||
module.exports = createClass({
|
||||
|
||||
displayName: "ResizableViewport",
|
||||
|
||||
propTypes: {
|
||||
location: Types.location.isRequired,
|
||||
viewport: PropTypes.shape(Types.viewport).isRequired,
|
||||
onResizeViewport: PropTypes.func.isRequired,
|
||||
onRotateViewport: PropTypes.func.isRequired,
|
||||
},
|
||||
|
||||
getInitialState() {
|
||||
return {
|
||||
isResizing: false,
|
||||
lastClientX: 0,
|
||||
lastClientY: 0,
|
||||
ignoreX: false,
|
||||
ignoreY: false,
|
||||
};
|
||||
},
|
||||
|
||||
onResizeStart({ target, clientX, clientY }) {
|
||||
window.addEventListener("mousemove", this.onResizeDrag, true);
|
||||
window.addEventListener("mouseup", this.onResizeStop, true);
|
||||
|
||||
this.setState({
|
||||
isResizing: true,
|
||||
lastClientX: clientX,
|
||||
lastClientY: clientY,
|
||||
ignoreX: target === this.refs.resizeBarY,
|
||||
ignoreY: target === this.refs.resizeBarX,
|
||||
});
|
||||
},
|
||||
|
||||
onResizeStop() {
|
||||
window.removeEventListener("mousemove", this.onResizeDrag, true);
|
||||
window.removeEventListener("mouseup", this.onResizeStop, true);
|
||||
|
||||
this.setState({
|
||||
isResizing: false,
|
||||
lastClientX: 0,
|
||||
lastClientY: 0,
|
||||
ignoreX: false,
|
||||
ignoreY: false,
|
||||
});
|
||||
},
|
||||
|
||||
onResizeDrag({ clientX, clientY }) {
|
||||
if (!this.state.isResizing) {
|
||||
return;
|
||||
}
|
||||
|
||||
let { lastClientX, lastClientY, ignoreX, ignoreY } = this.state;
|
||||
let deltaX = clientX - lastClientX;
|
||||
let deltaY = clientY - lastClientY;
|
||||
|
||||
if (ignoreX) {
|
||||
deltaX = 0;
|
||||
}
|
||||
if (ignoreY) {
|
||||
deltaY = 0;
|
||||
}
|
||||
|
||||
let width = this.props.viewport.width + deltaX;
|
||||
let height = this.props.viewport.height + deltaY;
|
||||
|
||||
if (width < VIEWPORT_MIN_WIDTH) {
|
||||
width = VIEWPORT_MIN_WIDTH;
|
||||
} else {
|
||||
lastClientX = clientX;
|
||||
}
|
||||
|
||||
if (height < VIEWPORT_MIN_HEIGHT) {
|
||||
height = VIEWPORT_MIN_HEIGHT;
|
||||
} else {
|
||||
lastClientY = clientY;
|
||||
}
|
||||
|
||||
// Update the viewport store with the new width and height.
|
||||
this.props.onResizeViewport(width, height);
|
||||
|
||||
this.setState({
|
||||
lastClientX,
|
||||
lastClientY
|
||||
});
|
||||
},
|
||||
|
||||
render() {
|
||||
let {
|
||||
location,
|
||||
viewport,
|
||||
onRotateViewport,
|
||||
} = this.props;
|
||||
|
||||
return dom.div(
|
||||
{
|
||||
className: "resizable-viewport",
|
||||
},
|
||||
ViewportToolbar({
|
||||
onRotateViewport,
|
||||
}),
|
||||
Browser({
|
||||
location,
|
||||
width: viewport.width,
|
||||
height: viewport.height,
|
||||
isResizing: this.state.isResizing
|
||||
}),
|
||||
dom.div({
|
||||
className: "viewport-resize-handle",
|
||||
onMouseDown: this.onResizeStart,
|
||||
}),
|
||||
dom.div({
|
||||
ref: "resizeBarX",
|
||||
className: "viewport-horizontal-resize-handle",
|
||||
onMouseDown: this.onResizeStart,
|
||||
}),
|
||||
dom.div({
|
||||
ref: "resizeBarY",
|
||||
className: "viewport-vertical-resize-handle",
|
||||
onMouseDown: this.onResizeStart,
|
||||
})
|
||||
);
|
||||
},
|
||||
|
||||
});
|
@ -8,8 +8,7 @@ const { DOM: dom, createClass, createFactory, PropTypes } =
|
||||
require("devtools/client/shared/vendor/react");
|
||||
|
||||
const Types = require("../types");
|
||||
const Browser = createFactory(require("./browser"));
|
||||
const ViewportToolbar = createFactory(require("./viewport-toolbar"));
|
||||
const ResizableViewport = createFactory(require("./resizable-viewport"));
|
||||
|
||||
module.exports = createClass({
|
||||
|
||||
@ -18,6 +17,7 @@ module.exports = createClass({
|
||||
propTypes: {
|
||||
location: Types.location.isRequired,
|
||||
viewport: PropTypes.shape(Types.viewport).isRequired,
|
||||
onResizeViewport: PropTypes.func.isRequired,
|
||||
onRotateViewport: PropTypes.func.isRequired,
|
||||
},
|
||||
|
||||
@ -25,20 +25,19 @@ module.exports = createClass({
|
||||
let {
|
||||
location,
|
||||
viewport,
|
||||
onResizeViewport,
|
||||
onRotateViewport,
|
||||
} = this.props;
|
||||
|
||||
return dom.div(
|
||||
{
|
||||
className: "viewport"
|
||||
className: "viewport",
|
||||
},
|
||||
ViewportToolbar({
|
||||
onRotateViewport,
|
||||
}),
|
||||
Browser({
|
||||
ResizableViewport({
|
||||
location,
|
||||
width: viewport.width,
|
||||
height: viewport.height,
|
||||
viewport,
|
||||
onResizeViewport,
|
||||
onRotateViewport,
|
||||
})
|
||||
);
|
||||
},
|
||||
|
@ -17,6 +17,7 @@ module.exports = createClass({
|
||||
propTypes: {
|
||||
location: Types.location.isRequired,
|
||||
viewports: PropTypes.arrayOf(PropTypes.shape(Types.viewport)).isRequired,
|
||||
onResizeViewport: PropTypes.func.isRequired,
|
||||
onRotateViewport: PropTypes.func.isRequired,
|
||||
},
|
||||
|
||||
@ -24,6 +25,7 @@ module.exports = createClass({
|
||||
let {
|
||||
location,
|
||||
viewports,
|
||||
onResizeViewport,
|
||||
onRotateViewport,
|
||||
} = this.props;
|
||||
|
||||
@ -36,6 +38,8 @@ module.exports = createClass({
|
||||
key: viewport.id,
|
||||
location,
|
||||
viewport,
|
||||
onResizeViewport: (width, height) =>
|
||||
onResizeViewport(viewport.id, width, height),
|
||||
onRotateViewport: () => onRotateViewport(viewport.id),
|
||||
});
|
||||
})
|
||||
|
@ -1,7 +1,6 @@
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- 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/. -->
|
||||
|
||||
<!ENTITY simple.title "Simple App">
|
||||
<!ENTITY simple.textValue "0">
|
||||
<!ENTITY simple.buttonLabel "Increment">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="#A5A5A5">
|
||||
<path d="M16 3.2L3.1 16h1.7L16 4.9zM16 7.2L7.1 16h1.8L16 8.9zM16 11.1L11.1 16h1.8l3.1-3.1z" />
|
||||
</svg>
|
Before Width: | Height: | Size: 329 B After Width: | Height: | Size: 392 B |
@ -5,5 +5,6 @@
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
DevToolsModules(
|
||||
'grippers.svg',
|
||||
'rotate-viewport.svg',
|
||||
)
|
||||
|
@ -13,6 +13,10 @@
|
||||
--viewport-box-shadow: 0 4px 4px 0 rgba(105, 105, 105, 0.26);
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html, body {
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
@ -57,6 +61,10 @@ body {
|
||||
box-shadow: var(--viewport-box-shadow);
|
||||
}
|
||||
|
||||
.resizable-viewport {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/**
|
||||
* Viewport Toolbar
|
||||
*/
|
||||
@ -96,7 +104,51 @@ body {
|
||||
mask-image: url("./images/rotate-viewport.svg");
|
||||
}
|
||||
|
||||
/**
|
||||
* Viewport Browser
|
||||
*/
|
||||
|
||||
.browser {
|
||||
display: block;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.browser.resizing {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Viewport Resize Handles
|
||||
*/
|
||||
|
||||
.viewport-resize-handle {
|
||||
position: absolute;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
background-image: url("./images/grippers.svg");
|
||||
background-position: bottom right;
|
||||
padding: 0 1px 1px 0;
|
||||
background-repeat: no-repeat;
|
||||
background-origin: content-box;
|
||||
cursor: se-resize;
|
||||
}
|
||||
|
||||
.viewport-horizontal-resize-handle {
|
||||
position: absolute;
|
||||
width: 5px;
|
||||
height: calc(100% - 16px);
|
||||
right: -4px;
|
||||
top: 0;
|
||||
cursor: e-resize;
|
||||
}
|
||||
|
||||
.viewport-vertical-resize-handle {
|
||||
position: absolute;
|
||||
width: calc(100% - 16px);
|
||||
height: 5px;
|
||||
left: 0;
|
||||
bottom: -4px;
|
||||
cursor: s-resize;
|
||||
}
|
||||
|
@ -4,7 +4,11 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
const { ADD_VIEWPORT, ROTATE_VIEWPORT } = require("../actions/index");
|
||||
const {
|
||||
ADD_VIEWPORT,
|
||||
RESIZE_VIEWPORT,
|
||||
ROTATE_VIEWPORT,
|
||||
} = require("../actions/index");
|
||||
|
||||
let nextViewportId = 0;
|
||||
|
||||
@ -25,6 +29,19 @@ let reducers = {
|
||||
return [...viewports, Object.assign({}, INITIAL_VIEWPORT)];
|
||||
},
|
||||
|
||||
[RESIZE_VIEWPORT](viewports, { id, width, height }) {
|
||||
return viewports.map(viewport => {
|
||||
if (viewport.id !== id) {
|
||||
return viewport;
|
||||
}
|
||||
|
||||
return Object.assign({}, viewport, {
|
||||
width,
|
||||
height,
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
[ROTATE_VIEWPORT](viewports, { id }) {
|
||||
return viewports.map(viewport => {
|
||||
if (viewport.id !== id) {
|
||||
|
@ -0,0 +1,21 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
"use strict";
|
||||
|
||||
// Test resizing the viewport.
|
||||
|
||||
const { addViewport, resizeViewport } =
|
||||
require("devtools/client/responsive.html/actions/viewports");
|
||||
|
||||
add_task(function*() {
|
||||
let store = Store();
|
||||
const { getState, dispatch } = store;
|
||||
|
||||
dispatch(addViewport());
|
||||
dispatch(resizeViewport(0, 500, 500));
|
||||
|
||||
let viewport = getState().viewports[0];
|
||||
equal(viewport.width, 500, "Resized width of 500");
|
||||
equal(viewport.height, 500, "Resized height of 500");
|
||||
});
|
@ -6,4 +6,5 @@ firefox-appdir = browser
|
||||
|
||||
[test_add_viewport.js]
|
||||
[test_change_location.js]
|
||||
[test_resize_viewport.js]
|
||||
[test_rotate_viewport.js]
|
||||
|
@ -7,21 +7,18 @@
|
||||
const Ci = Components.interfaces;
|
||||
const Cu = Components.utils;
|
||||
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Cu.import("resource://devtools/client/framework/gDevTools.jsm");
|
||||
Cu.import("resource://devtools/shared/event-emitter.js");
|
||||
Cu.import("resource://devtools/client/shared/widgets/ViewHelpers.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "SystemAppProxy",
|
||||
"resource://gre/modules/SystemAppProxy.jsm");
|
||||
|
||||
var { require } = Cu.import("resource://devtools/shared/Loader.jsm", {});
|
||||
var { loader, require } = Cu.import("resource://devtools/shared/Loader.jsm", {});
|
||||
var Telemetry = require("devtools/client/shared/telemetry");
|
||||
var { showDoorhanger } = require("devtools/client/shared/doorhanger");
|
||||
var { TouchEventSimulator } = require("devtools/shared/touch/simulator");
|
||||
var { Task } = require("resource://gre/modules/Task.jsm");
|
||||
var promise = require("promise");
|
||||
var DevToolsUtils = require("devtools/shared/DevToolsUtils");
|
||||
var Services = require("Services");
|
||||
var EventEmitter = require("devtools/shared/event-emitter");
|
||||
var { ViewHelpers } = require("devtools/client/shared/widgets/ViewHelpers.jsm");
|
||||
loader.lazyImporter(this, "SystemAppProxy",
|
||||
"resource://gre/modules/SystemAppProxy.jsm");
|
||||
|
||||
this.EXPORTED_SYMBOLS = ["ResponsiveUIManager"];
|
||||
|
||||
@ -1092,6 +1089,6 @@ ResponsiveUI.prototype = {
|
||||
},
|
||||
}
|
||||
|
||||
XPCOMUtils.defineLazyGetter(ResponsiveUI.prototype, "strings", function () {
|
||||
loader.lazyGetter(ResponsiveUI.prototype, "strings", function () {
|
||||
return Services.strings.createBundle("chrome://devtools/locale/responsiveUI.properties");
|
||||
});
|
||||
|
@ -52,13 +52,13 @@ const EventEmitter = require("devtools/shared/event-emitter");
|
||||
const {DevToolsWorker} = require("devtools/shared/worker/worker");
|
||||
const DevToolsUtils = require("devtools/shared/DevToolsUtils");
|
||||
const promise = require("promise");
|
||||
const {gDevTools} = require("devtools/client/framework/devtools");
|
||||
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://gre/modules/NetUtil.jsm");
|
||||
Cu.import("resource://devtools/client/scratchpad/scratchpad-manager.jsm");
|
||||
Cu.import("resource://gre/modules/jsdebugger.jsm");
|
||||
Cu.import("resource://devtools/client/framework/gDevTools.jsm");
|
||||
Cu.import("resource://gre/modules/osfile.jsm");
|
||||
Cu.import("resource://devtools/client/shared/widgets/ViewHelpers.jsm");
|
||||
Cu.import("resource://gre/modules/reflect.jsm");
|
||||
|
@ -11,10 +11,10 @@ var gEnableLogging = Services.prefs.getBoolPref("devtools.debugger.log");
|
||||
Services.prefs.setBoolPref("devtools.debugger.log", false);
|
||||
|
||||
var { Task } = Cu.import("resource://gre/modules/Task.jsm", {});
|
||||
var { gDevTools } = Cu.import("resource://devtools/client/framework/gDevTools.jsm", {});
|
||||
var { require } = Cu.import("resource://devtools/shared/Loader.jsm", {});
|
||||
|
||||
var promise = require("promise");
|
||||
var { gDevTools } = require("devtools/client/framework/devtools");
|
||||
var { DebuggerClient } = require("devtools/shared/client/main");
|
||||
var { DebuggerServer } = require("devtools/server/main");
|
||||
var { WebGLFront } = require("devtools/server/actors/webgl");
|
||||
|
@ -9,7 +9,7 @@ const {Cc, Ci, Cu} = require("chrome");
|
||||
const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
||||
|
||||
loader.lazyImporter(this, "Services", "resource://gre/modules/Services.jsm");
|
||||
loader.lazyImporter(this, "gDevTools", "resource://devtools/client/framework/gDevTools.jsm");
|
||||
const {gDevTools} = require("devtools/client/framework/devtools");
|
||||
const events = require("devtools/shared/event-emitter");
|
||||
|
||||
/**
|
||||
|
@ -8,10 +8,10 @@ Cu.import("resource://testing-common/Assert.jsm");
|
||||
Cu.import("resource://gre/modules/Task.jsm");
|
||||
var { Services } = Cu.import("resource://gre/modules/Services.jsm", {});
|
||||
|
||||
var { Promise: promise } = Cu.import("resource://gre/modules/Promise.jsm", {});
|
||||
var { require } = Cu.import("resource://devtools/shared/Loader.jsm", {});
|
||||
var { gDevTools } = Cu.import("resource://devtools/client/framework/gDevTools.jsm", {});
|
||||
var { gDevTools } = require("devtools/client/framework/devtools");
|
||||
var { BrowserLoader } = Cu.import("resource://devtools/client/shared/browser-loader.js", {});
|
||||
var promise = require("promise");
|
||||
var { DebuggerServer } = require("devtools/server/main");
|
||||
var { DebuggerClient } = require("devtools/shared/client/main");
|
||||
var DevToolsUtils = require("devtools/shared/DevToolsUtils");
|
||||
|
@ -6,9 +6,6 @@
|
||||
function test() {
|
||||
const TEST_URI = TEST_URI_ROOT + "browser_toolbar_webconsole_errors_count.html";
|
||||
|
||||
let gDevTools = Cu.import("resource://devtools/client/framework/gDevTools.jsm",
|
||||
{}).gDevTools;
|
||||
|
||||
let webconsole = document.getElementById("developer-toolbar-toolbox-button");
|
||||
let tab1, tab2;
|
||||
|
||||
|
@ -159,8 +159,8 @@
|
||||
|
||||
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://devtools/client/framework/gDevTools.jsm");
|
||||
const {require} = Components.utils.import("resource://devtools/shared/Loader.jsm", {});
|
||||
const {gDevTools} = require("devtools/client/framework/devtools");
|
||||
const StylesheetUtils = require("sdk/stylesheet/utils");
|
||||
|
||||
if (documentElement.hasAttribute("force-theme")) {
|
||||
|
@ -12,7 +12,7 @@
|
||||
const { Ci, Cu } = require("chrome");
|
||||
const { NetUtil } = Cu.import("resource://gre/modules/NetUtil.jsm", {});
|
||||
loader.lazyRequireGetter(this, "Services");
|
||||
loader.lazyImporter(this, "gDevTools", "resource://devtools/client/framework/gDevTools.jsm");
|
||||
const { gDevTools } = require("devtools/client/framework/devtools");
|
||||
|
||||
const VARIABLES_URI = "chrome://devtools/skin/variables.css";
|
||||
const THEME_SELECTOR_STRINGS = {
|
||||
|
@ -5,9 +5,9 @@
|
||||
"use strict";
|
||||
|
||||
loader.lazyRequireGetter(this, "Services");
|
||||
loader.lazyImporter(this, "gDevTools", "resource://devtools/client/framework/gDevTools.jsm");
|
||||
loader.lazyImporter(this, "Task", "resource://gre/modules/Task.jsm");
|
||||
|
||||
var {gDevTools} = require("devtools/client/framework/devtools");
|
||||
var DevToolsUtils = require("devtools/shared/DevToolsUtils");
|
||||
|
||||
/**
|
||||
|
@ -24,7 +24,6 @@ if (Services.prefs.getBoolPref(WARNING_PREF)) {
|
||||
|
||||
this.EXPORTED_SYMBOLS = [
|
||||
"gDevTools",
|
||||
"DevTools",
|
||||
"gDevToolsBrowser"
|
||||
];
|
||||
|
||||
|
@ -16,7 +16,7 @@ const {NetUtil} = Cu.import("resource://gre/modules/NetUtil.jsm", {});
|
||||
const {OS} = Cu.import("resource://gre/modules/osfile.jsm", {});
|
||||
const {Task} = Cu.import("resource://gre/modules/Task.jsm", {});
|
||||
const EventEmitter = require("devtools/shared/event-emitter");
|
||||
const {gDevTools} = require("resource://devtools/client/framework/gDevTools.jsm");
|
||||
const {gDevTools} = require("devtools/client/framework/devtools");
|
||||
/* import-globals-from StyleEditorUtil.jsm */
|
||||
Cu.import("resource://devtools/client/styleeditor/StyleEditorUtil.jsm");
|
||||
const {SplitView} = Cu.import("resource://devtools/client/shared/SplitView.jsm", {});
|
||||
|
@ -58,7 +58,7 @@ exports.items = [{
|
||||
to: "dom",
|
||||
exec: function(args, context) {
|
||||
let target = context.environment.target;
|
||||
let gDevTools = require("resource://devtools/client/framework/gDevTools.jsm").gDevTools;
|
||||
let {gDevTools} = require("devtools/client/framework/devtools");
|
||||
return gDevTools.showToolbox(target, "styleeditor").then(function(toolbox) {
|
||||
let styleEditor = toolbox.getCurrentPanel();
|
||||
styleEditor.selectStyleSheet(args.href, args.line);
|
||||
|
@ -42,6 +42,11 @@
|
||||
--timeline-background-color: var(--theme-highlight-blue);
|
||||
}
|
||||
|
||||
.animation.scriptanimation {
|
||||
--timeline-border-color: var(--theme-highlight-green);
|
||||
--timeline-background-color: var(--theme-graphs-green);
|
||||
}
|
||||
|
||||
html {
|
||||
height: 100%;
|
||||
}
|
||||
@ -529,6 +534,10 @@ body {
|
||||
background-color: var(--theme-highlight-blue);
|
||||
}
|
||||
|
||||
.keyframes.scriptanimation {
|
||||
background-color: var(--theme-graphs-green);
|
||||
}
|
||||
|
||||
.keyframes .frame {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
@ -2,6 +2,6 @@
|
||||
- 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/. -->
|
||||
<svg height="16" width="16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="#babec3">
|
||||
<path d="M10.2 4.1c-.6 0-1.2.2-1.8.4-.6-.4-1.4-.6-2.2-.6-2.5 0-4.6 2.1-4.6 4.6s2.1 4.6 4.6 4.6c.9 0 1.6-.2 2.3-.7.5.2 1.1.4 1.7.4 2.4 0 4.3-1.9 4.3-4.3.1-2.4-1.9-4.4-4.3-4.4zm-4 7.9c-1.9 0-3.5-1.6-3.5-3.5S4.2 5 6.2 5c.3 0 .7 0 1 .1-.8.9-1.4 2.1-1.4 3.4 0 1.3.6 2.5 1.5 3.3-.4.1-.8.2-1.1.2zm2.1-.7c-.9-.6-1.4-1.6-1.4-2.8 0-1.1.6-2.1 1.4-2.8.8.6 1.4 1.6 1.4 2.8 0 1.1-.6 2.1-1.4 2.8z"/>
|
||||
<path d="M7.6 8c-.2 0-.3-.1-.4-.2-.1-.2 0-.4.2-.5l1.1-.6c.2-.1.4 0 .5.2.1.2 0 .4-.2.5l-1.1.5c0 .1-.1.1-.1.1zM7.6 9.1c-.1 0-.3-.1-.4-.2-.1-.2 0-.4.2-.5l1.1-.6c.3-.1.5 0 .6.2.1.2 0 .4-.2.5l-1.1.6h-.2zM7.8 10.3c-.1 0-.3-.1-.4-.2-.1-.2 0-.4.2-.5L8.8 9c.2-.1.4 0 .5.2.1.2 0 .4-.2.5l-1.1.6h-.2z"/>
|
||||
<path d="M10.2 4.1c-.6 0-1.2.2-1.8.4-.6-.4-1.4-.6-2.2-.6-2.5 0-4.6 2.1-4.6 4.6s2.1 4.6 4.6 4.6c.9 0 1.6-.2 2.3-.7.5.2 1.1.4 1.7.4 2.4 0 4.3-1.9 4.3-4.3.1-2.4-1.9-4.4-4.3-4.4zm-4 7.9c-1.9 0-3.5-1.6-3.5-3.5S4.2 5 6.2 5c.3 0 .7 0 1 .1-.8.9-1.4 2.1-1.4 3.4 0 1.3.6 2.5 1.5 3.3-.4.1-.8.2-1.1.2zm2.1-.7c-.9-.6-1.4-1.6-1.4-2.8 0-1.1.6-2.1 1.4-2.8.8.6 1.4 1.6 1.4 2.8 0 1.1-.6 2.1-1.4 2.8z"/>
|
||||
<path d="M7.6 8c-.2 0-.3-.1-.4-.2-.1-.2 0-.4.2-.5l1.1-.6c.2-.1.4 0 .5.2.1.2 0 .4-.2.5l-1.1.5c0 .1-.1.1-.1.1zM7.6 9.1c-.1 0-.3-.1-.4-.2-.1-.2 0-.4.2-.5l1.1-.6c.3-.1.5 0 .6.2.1.2 0 .4-.2.5l-1.1.6h-.2zM7.8 10.3c-.1 0-.3-.1-.4-.2-.1-.2 0-.4.2-.5L8.8 9c.2-.1.4 0 .5.2.1.2 0 .4-.2.5l-1.1.6h-.2z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1003 B After Width: | Height: | Size: 999 B |
@ -14,7 +14,7 @@ var {EPSILON, TiltMath, vec3, mat4, quat4} = require("devtools/client/tilt/tilt-
|
||||
var {TargetFactory} = require("devtools/client/framework/target");
|
||||
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://devtools/client/framework/gDevTools.jsm");
|
||||
var {gDevTools} = require("devtools/client/framework/devtools");
|
||||
|
||||
const ELEMENT_MIN_SIZE = 4;
|
||||
const INVISIBLE_ELEMENTS = {
|
||||
|
@ -8,7 +8,6 @@ var { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Cu.import("resource://devtools/client/shared/widgets/ViewHelpers.jsm");
|
||||
Cu.import("resource://devtools/client/framework/gDevTools.jsm");
|
||||
|
||||
const { loader, require } = Cu.import("resource://devtools/shared/Loader.jsm", {});
|
||||
|
||||
@ -23,6 +22,7 @@ const L10N = new ViewHelpers.L10N(STRINGS_URI);
|
||||
const Telemetry = require("devtools/client/shared/telemetry");
|
||||
const telemetry = new Telemetry();
|
||||
const DevToolsUtils = require("devtools/shared/DevToolsUtils");
|
||||
const { gDevTools } = require("devtools/client/framework/devtools");
|
||||
|
||||
loader.lazyRequireGetter(this, "LineGraphWidget",
|
||||
"devtools/client/shared/widgets/LineGraphWidget");
|
||||
|
@ -12,8 +12,8 @@ var gEnableLogging = Services.prefs.getBoolPref("devtools.debugger.log");
|
||||
Services.prefs.setBoolPref("devtools.debugger.log", false);
|
||||
|
||||
var { Task } = Cu.import("resource://gre/modules/Task.jsm", {});
|
||||
var { gDevTools } = Cu.import("resource://devtools/client/framework/gDevTools.jsm", {});
|
||||
var { require } = Cu.import("resource://devtools/shared/Loader.jsm", {});
|
||||
var { gDevTools } = require("devtools/client/framework/devtools");
|
||||
var { TargetFactory } = require("devtools/client/framework/target");
|
||||
var { DebuggerServer } = require("devtools/server/main");
|
||||
var { generateUUID } = Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator);
|
||||
|
@ -7,7 +7,7 @@
|
||||
"use strict";
|
||||
|
||||
const l10n = require("gcli/l10n");
|
||||
loader.lazyGetter(this, "gDevTools", () => require("resource://devtools/client/framework/gDevTools.jsm").gDevTools);
|
||||
loader.lazyRequireGetter(this, "gDevTools", "devtools/client/framework/devtools", true);
|
||||
|
||||
exports.items = [
|
||||
{
|
||||
|
@ -12,11 +12,11 @@ const { Services } = require("resource://gre/modules/Services.jsm");
|
||||
|
||||
loader.lazyImporter(this, "VariablesView", "resource://devtools/client/shared/widgets/VariablesView.jsm");
|
||||
loader.lazyImporter(this, "escapeHTML", "resource://devtools/client/shared/widgets/VariablesView.jsm");
|
||||
loader.lazyImporter(this, "gDevTools", "resource://devtools/client/framework/gDevTools.jsm");
|
||||
loader.lazyImporter(this, "Task", "resource://gre/modules/Task.jsm");
|
||||
loader.lazyImporter(this, "PluralForm", "resource://gre/modules/PluralForm.jsm");
|
||||
|
||||
loader.lazyRequireGetter(this, "promise");
|
||||
loader.lazyRequireGetter(this, "gDevTools", "devtools/client/framework/devtools", true);
|
||||
loader.lazyRequireGetter(this, "TableWidget", "devtools/client/shared/widgets/TableWidget", true);
|
||||
loader.lazyRequireGetter(this, "ObjectClient", "devtools/shared/client/main", true);
|
||||
|
||||
|
@ -14,13 +14,13 @@ var {TargetFactory} = require("devtools/client/framework/target");
|
||||
var {Tools} = require("devtools/client/definitions");
|
||||
var promise = require("promise");
|
||||
|
||||
loader.lazyGetter(this, "Telemetry", () => require("devtools/client/shared/telemetry"));
|
||||
loader.lazyGetter(this, "WebConsoleFrame", () => require("devtools/client/webconsole/webconsole").WebConsoleFrame);
|
||||
loader.lazyImporter(this, "gDevTools", "resource://devtools/client/framework/gDevTools.jsm");
|
||||
loader.lazyImporter(this, "Services", "resource://gre/modules/Services.jsm");
|
||||
loader.lazyRequireGetter(this, "Telemetry", "devtools/client/shared/telemetry");
|
||||
loader.lazyRequireGetter(this, "WebConsoleFrame", "devtools/client/webconsole/webconsole", true);
|
||||
loader.lazyRequireGetter(this, "gDevTools", "devtools/client/framework/devtools", true);
|
||||
loader.lazyRequireGetter(this, "DebuggerServer", "devtools/server/main", true);
|
||||
loader.lazyRequireGetter(this, "DebuggerClient", "devtools/shared/client/main", true);
|
||||
loader.lazyGetter(this, "showDoorhanger", () => require("devtools/client/shared/doorhanger").showDoorhanger);
|
||||
loader.lazyRequireGetter(this, "showDoorhanger", "devtools/client/shared/doorhanger", true);
|
||||
loader.lazyRequireGetter(this, "viewSource", "devtools/client/shared/view-source");
|
||||
|
||||
const STRINGS_URI = "chrome://devtools/locale/webconsole.properties";
|
||||
|
@ -29,8 +29,8 @@ loader.lazyRequireGetter(this, "system", "devtools/shared/system");
|
||||
loader.lazyRequireGetter(this, "Timers", "sdk/timers");
|
||||
loader.lazyImporter(this, "VariablesView", "resource://devtools/client/shared/widgets/VariablesView.jsm");
|
||||
loader.lazyImporter(this, "VariablesViewController", "resource://devtools/client/shared/widgets/VariablesViewController.jsm");
|
||||
loader.lazyRequireGetter(this, "gDevTools", "devtools/client/framework/devtools", true);
|
||||
loader.lazyImporter(this, "PluralForm", "resource://gre/modules/PluralForm.jsm");
|
||||
loader.lazyImporter(this, "gDevTools", "resource://devtools/client/framework/gDevTools.jsm");
|
||||
|
||||
const STRINGS_URI = "chrome://devtools/locale/webconsole.properties";
|
||||
var l10n = new WebConsoleUtils.l10n(STRINGS_URI);
|
||||
|
@ -3,7 +3,6 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
var Cu = Components.utils;
|
||||
Cu.import("resource://devtools/client/framework/gDevTools.jsm");
|
||||
const {Services} = Cu.import("resource://gre/modules/Services.jsm");
|
||||
const {require} = Cu.import("resource://devtools/shared/Loader.jsm", {});
|
||||
const {AppManager} = require("devtools/client/webide/modules/app-manager");
|
||||
|
@ -3,7 +3,6 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
var Cu = Components.utils;
|
||||
Cu.import("resource://devtools/client/framework/gDevTools.jsm");
|
||||
const {require} = Cu.import("resource://devtools/shared/Loader.jsm", {});
|
||||
const {AppManager} = require("devtools/client/webide/modules/app-manager");
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user