author | Tiberius Oros <toros@mozilla.com> |
Mon, 23 Apr 2018 01:11:42 +0300 | |
changeset 468533 | 378a8a64401f765bfd0706ff678a4f5db7c05385 |
parent 468521 | 3709d682bb55a88747275fff818a033f8de558c1 (current diff) |
parent 468532 | 91694a86688d7a2d7ecc0c00bda3286527d0c365 (diff) |
child 468537 | a548602cd86f7f2bfedbb8ccbefd1bcadc18393d |
child 468555 | 368eefa9989f1f9de901b22419a4524bc47a4745 |
push id | 9165 |
push user | asasaki@mozilla.com |
push date | Thu, 26 Apr 2018 21:04:54 +0000 |
treeherder | mozilla-beta@064c3804de2e [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | merge |
milestone | 61.0a1 |
first release with | nightly linux32
378a8a64401f
/
61.0a1
/
20180422223305
/
files
nightly linux64
378a8a64401f
/
61.0a1
/
20180422223305
/
files
nightly mac
378a8a64401f
/
61.0a1
/
20180422223305
/
files
nightly win32
378a8a64401f
/
61.0a1
/
20180422223305
/
files
nightly win64
378a8a64401f
/
61.0a1
/
20180422223305
/
files
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
releases | nightly linux32
61.0a1
/
20180422223305
/
pushlog to previous
nightly linux64
61.0a1
/
20180422223305
/
pushlog to previous
nightly mac
61.0a1
/
20180422223305
/
pushlog to previous
nightly win32
61.0a1
/
20180422223305
/
pushlog to previous
nightly win64
61.0a1
/
20180422223305
/
pushlog to previous
|
browser/themes/linux/places/bookmarks-menu-arrow.png | file | annotate | diff | comparison | revisions | |
browser/themes/windows/customizableui/menu-arrow.svg | file | annotate | diff | comparison | revisions | |
devtools/client/debugger/new/test/mochitest/browser_dbg-breakpoints-toggle.js | file | annotate | diff | comparison | revisions | |
toolkit/content/widgets/filefield.xml | file | annotate | diff | comparison | revisions | |
toolkit/locales/en-US/chrome/global/filefield.properties | file | annotate | diff | comparison | revisions | |
toolkit/themes/osx/global/filefield.css | file | annotate | diff | comparison | revisions | |
toolkit/themes/windows/global/filefield.css | file | annotate | diff | comparison | revisions |
--- a/browser/base/content/test/sanitize/browser_sanitize-timespans.js +++ b/browser/base/content/test/sanitize/browser_sanitize-timespans.js @@ -1,10 +1,13 @@ requestLongerTimeout(2); +const {PlacesTestUtils} = + ChromeUtils.import("resource://testing-common/PlacesTestUtils.jsm", {}); + // Bug 453440 - Test the timespan-based logic of the sanitizer code var now_mSec = Date.now(); var now_uSec = now_mSec * 1000; const kMsecPerMin = 60 * 1000; const kUsecPerMin = 60 * 1000000; function promiseFormHistoryRemoved() { @@ -421,56 +424,47 @@ async function onHistoryReady() { ok(!(await PlacesUtils.history.hasVisits("http://before-today.com")), "Pretend visit to before-today.com should now be deleted"); await countEntries("b4today", "b4today form entry should be deleted", checkZero); ok(!(await downloadExists(publicList, "fakefile-old")), "Year old download should now be deleted"); } -function setupHistory() { - return new Promise(resolve => { +async function setupHistory() { - let places = []; + let places = []; - function addPlace(aURI, aTitle, aVisitDate) { - places.push({ - uri: aURI, - title: aTitle, - visits: [{ - visitDate: aVisitDate, - transitionType: Ci.nsINavHistoryService.TRANSITION_LINK - }] - }); - } + function addPlace(aURI, aTitle, aVisitDate) { + places.push({ + uri: aURI, + title: aTitle, + visitDate: aVisitDate, + transition: Ci.nsINavHistoryService.TRANSITION_LINK + }); + } - addPlace(makeURI("http://10minutes.com/"), "10 minutes ago", now_uSec - 10 * kUsecPerMin); - addPlace(makeURI("http://1hour.com/"), "Less than 1 hour ago", now_uSec - 45 * kUsecPerMin); - addPlace(makeURI("http://1hour10minutes.com/"), "1 hour 10 minutes ago", now_uSec - 70 * kUsecPerMin); - addPlace(makeURI("http://2hour.com/"), "Less than 2 hours ago", now_uSec - 90 * kUsecPerMin); - addPlace(makeURI("http://2hour10minutes.com/"), "2 hours 10 minutes ago", now_uSec - 130 * kUsecPerMin); - addPlace(makeURI("http://4hour.com/"), "Less than 4 hours ago", now_uSec - 180 * kUsecPerMin); - addPlace(makeURI("http://4hour10minutes.com/"), "4 hours 10 minutesago", now_uSec - 250 * kUsecPerMin); + addPlace("http://10minutes.com/", "10 minutes ago", now_uSec - 10 * kUsecPerMin); + addPlace("http://1hour.com/", "Less than 1 hour ago", now_uSec - 45 * kUsecPerMin); + addPlace("http://1hour10minutes.com/", "1 hour 10 minutes ago", now_uSec - 70 * kUsecPerMin); + addPlace("http://2hour.com/", "Less than 2 hours ago", now_uSec - 90 * kUsecPerMin); + addPlace("http://2hour10minutes.com/", "2 hours 10 minutes ago", now_uSec - 130 * kUsecPerMin); + addPlace("http://4hour.com/", "Less than 4 hours ago", now_uSec - 180 * kUsecPerMin); + addPlace("http://4hour10minutes.com/", "4 hours 10 minutesago", now_uSec - 250 * kUsecPerMin); - let today = new Date(); - today.setHours(0); - today.setMinutes(0); - today.setSeconds(1); - addPlace(makeURI("http://today.com/"), "Today", today.getTime() * 1000); + let today = new Date(); + today.setHours(0); + today.setMinutes(0); + today.setSeconds(1); + addPlace("http://today.com/", "Today", today.getTime() * 1000); - let lastYear = new Date(); - lastYear.setFullYear(lastYear.getFullYear() - 1); - addPlace(makeURI("http://before-today.com/"), "Before Today", lastYear.getTime() * 1000); - PlacesUtils.asyncHistory.updatePlaces(places, { - handleError: () => ok(false, "Unexpected error in adding visit."), - handleResult: () => { }, - handleCompletion: () => resolve() - }); - - }); + let lastYear = new Date(); + lastYear.setFullYear(lastYear.getFullYear() - 1); + addPlace("http://before-today.com/", "Before Today", lastYear.getTime() * 1000); + await PlacesTestUtils.addVisits(places); } async function setupFormHistory() { function searchEntries(terms, params) { return new Promise((resolve, reject) => { let results = [];
--- a/browser/components/places/tests/browser/browser_library_downloads.js +++ b/browser/components/places/tests/browser/browser_library_downloads.js @@ -5,64 +5,47 @@ /* * Tests bug 564900: Add folder specifically for downloads to Library left pane. * https://bugzilla.mozilla.org/show_bug.cgi?id=564900 * This test visits various pages then opens the Library and ensures * that both the Downloads folder shows up and that the correct visits * are shown in it. */ -var now = Date.now(); +add_task(async function test() { + // Add visits. + await PlacesTestUtils.addVisits([{ + uri: "http://mozilla.org", + transition: PlacesUtils.history.TRANSITION_TYPED + }, { + uri: "http://google.com", + transition: PlacesUtils.history.TRANSITION_DOWNLOAD + }, { + uri: "http://en.wikipedia.org", + transition: PlacesUtils.history.TRANSITION_TYPED + }, { + uri: "http://ubuntu.org", + transition: PlacesUtils.history.TRANSITION_DOWNLOAD + }]); -function test() { - waitForExplicitFinish(); + let library = await promiseLibrary("Downloads"); - let onLibraryReady = function(win) { - // Add visits to compare contents with. - let places = [ - { uri: NetUtil.newURI("http://mozilla.com"), - visits: [ new VisitInfo(PlacesUtils.history.TRANSITION_TYPED) ] - }, - { uri: NetUtil.newURI("http://google.com"), - visits: [ new VisitInfo(PlacesUtils.history.TRANSITION_DOWNLOAD) ] - }, - { uri: NetUtil.newURI("http://en.wikipedia.org"), - visits: [ new VisitInfo(PlacesUtils.history.TRANSITION_TYPED) ] - }, - { uri: NetUtil.newURI("http://ubuntu.org"), - visits: [ new VisitInfo(PlacesUtils.history.TRANSITION_DOWNLOAD) ] - }, - ]; - PlacesUtils.asyncHistory.updatePlaces(places, { - handleResult() {}, - handleError() { - ok(false, "gHistory.updatePlaces() failed"); - }, - handleCompletion() { - // Make sure Downloads is present. - isnot(win.PlacesOrganizer._places.selectedNode, null, - "Downloads is present and selected"); + registerCleanupFunction(async () => { + await library.close(); + await PlacesUtils.history.clear(); + }); + + // Make sure Downloads is present. + Assert.notEqual(library.PlacesOrganizer._places.selectedNode, null, + "Downloads is present and selected"); + // Check results. + let testURIs = ["http://ubuntu.org/", "http://google.com/"]; - // Check results. - let testURIs = ["http://ubuntu.org/", "http://google.com/"]; - for (let element of win.ContentArea.currentView - .associatedElement.children) { - is(element._shell.download.source.url, testURIs.shift(), - "URI matches"); - } + await BrowserTestUtils.waitForCondition(() => + library.ContentArea.currentView.associatedElement.children.length == testURIs.length); - win.close(); - PlacesUtils.history.clear().then(finish); - } - }); - }; - - openLibrary(onLibraryReady, "Downloads"); -} - -function VisitInfo(aTransitionType) { - this.transitionType = - aTransitionType === undefined ? - PlacesUtils.history.TRANSITION_LINK : aTransitionType; - this.visitDate = now++ * 1000; -} -VisitInfo.prototype = {}; + for (let element of library.ContentArea.currentView + .associatedElement.children) { + Assert.equal(element._shell.download.source.url, testURIs.shift(), + "URI matches"); + } +});
--- a/browser/components/preferences/in-content/main.js +++ b/browser/components/preferences/in-content/main.js @@ -532,18 +532,21 @@ var gMainPane = { setEventListener("filter", "command", gMainPane.filter); setEventListener("handlersView", "select", gMainPane.onSelectionChanged); setEventListener("typeColumn", "click", gMainPane.sort); setEventListener("actionColumn", "click", gMainPane.sort); setEventListener("chooseFolder", "command", gMainPane.chooseFolder); setEventListener("saveWhere", "command", gMainPane.handleSaveToCommand); + Preferences.get("browser.download.folderList").on("change", + gMainPane.displayDownloadDirPref.bind(gMainPane)); Preferences.get("browser.download.dir").on("change", gMainPane.displayDownloadDirPref.bind(gMainPane)); + gMainPane.displayDownloadDirPref(); // Listen for window unload so we can remove our preference observers. window.addEventListener("unload", this); // Figure out how we should be sorting the list. We persist sort settings // across sessions, so we can't assume the default sort column/direction. // XXX should we be using the XUL sort service instead? if (document.getElementById("actionColumn").hasAttribute("sortDirection")) { @@ -2468,37 +2471,28 @@ var gMainPane = { // displaying blank downloadFolder label and icon on load of preferences UI // Set folderIndex to 1 if currentDirPref is unspecified folderIndex = currentDirPref.value ? await this._folderToIndex(currentDirPref.value) : 1; } // Display a 'pretty' label or the path in the UI. if (folderIndex == 2) { // Custom path selected and is configured - downloadFolder.label = this._getDisplayNameOfFile(currentDirPref.value); + downloadFolder.value = currentDirPref.value ? currentDirPref.value.path : ""; iconUrlSpec = fph.getURLSpecFromFile(currentDirPref.value); } else if (folderIndex == 1) { // 'Downloads' - downloadFolder.label = bundlePreferences.getString("downloadsFolderName"); + downloadFolder.value = bundlePreferences.getString("downloadsFolderName"); iconUrlSpec = fph.getURLSpecFromFile(await this._indexToFolder(1)); } else { // 'Desktop' - downloadFolder.label = bundlePreferences.getString("desktopFolderName"); + downloadFolder.value = bundlePreferences.getString("desktopFolderName"); iconUrlSpec = fph.getURLSpecFromFile(await this._getDownloadsFolder("Desktop")); } - downloadFolder.image = "moz-icon://" + iconUrlSpec + "?size=16"; - }, - - /** - * Returns the textual path of a folder in readable form. - */ - _getDisplayNameOfFile(aFolder) { - // TODO: would like to add support for 'Downloads on Macintosh HD' - // for OS X users. - return aFolder ? aFolder.path : ""; + downloadFolder.style.backgroundImage = "url(moz-icon://" + iconUrlSpec + "?size=16)"; }, /** * Returns the Downloads folder. If aFolder is "Desktop", then the Downloads * folder returned is the desktop folder; otherwise, it is a folder whose name * indicates that it is a download folder and whose path is as determined by * the XPCOM directory service via the download manager's attribute * defaultDownloadsDirectory.
--- a/browser/components/preferences/in-content/main.xul +++ b/browser/components/preferences/in-content/main.xul @@ -348,38 +348,34 @@ <!--Downloads--> <groupbox id="downloadsGroup" data-category="paneGeneral" hidden="true"> <caption><label data-l10n-id="download-header"/></caption> <radiogroup id="saveWhere" preference="browser.download.useDownloadDir" onsyncfrompreference="return gMainPane.readUseDownloadDir();"> - <hbox id="saveToRow"> + <hbox> <radio id="saveTo" - value="true" - data-l10n-id="download-save-to" - aria-labelledby="saveTo downloadFolder"/> - <filefield id="downloadFolder" - flex="1" - preference="browser.download.folderList" - preference-editable="true" - aria-labelledby="saveTo" - onsyncfrompreference="return gMainPane.displayDownloadDirPref();"/> + value="true" + data-l10n-id="download-save-to"/> + <textbox id="downloadFolder" flex="1" + readonly="true" + aria-labelledby="saveTo"/> <button id="chooseFolder" - data-l10n-id="download-choose-folder" - /> + class="accessory-button" + data-l10n-id="download-choose-folder"/> </hbox> <!-- Additional radio button added to support CloudStorage - Bug 1357171 --> <radio id="saveToCloud" - value="true" - hidden="true"/> + value="true" + hidden="true"/> <radio id="alwaysAsk" - value="false" - data-l10n-id="download-always-ask-where"/> + value="false" + data-l10n-id="download-always-ask-where"/> </radiogroup> </groupbox> <groupbox id="applicationsGroup" data-category="paneGeneral" hidden="true"> <caption><label data-l10n-id="applications-header"/></caption> <description data-l10n-id="applications-description"/> <textbox id="filter" flex="1" type="search"
--- a/browser/themes/linux/customizableui/panelUI.css +++ b/browser/themes/linux/customizableui/panelUI.css @@ -17,32 +17,16 @@ #BMB_bookmarksPopup menupopup > hbox > .popup-internal-box > .arrowscrollbox-scrollbox > .scrollbox-innerbox { padding-top: 4px; } menuitem.subviewbutton { -moz-appearance: none !important; } -menu.subviewbutton > .menu-right { - -moz-appearance: none; - list-style-image: url(chrome://browser/skin/places/bookmarks-menu-arrow.png); - -moz-image-region: rect(0, 16px, 16px, 0); - width: 16px; - height: 16px; -} - -menu[disabled="true"].subviewbutton > .menu-right { - -moz-image-region: rect(0, 32px, 16px, 16px); -} - -menu.subviewbutton > .menu-right:-moz-locale-dir(rtl) { - transform: scaleX(-1); -} - .subviewradio > .radio-label-box { -moz-appearance: none; } /* * #pageActionFeedbackAnimatableImage is wider than the panel, and due to a * bug in panels on Linux, a box-shadow appears where the image would be if * overflow:hidden wasn't applied. Disabling the box-shadow for this panel on
--- a/browser/themes/linux/jar.mn +++ b/browser/themes/linux/jar.mn @@ -27,17 +27,16 @@ browser.jar: skin/classic/browser/feeds/feedIcon16.png (feeds/feedIcon16.png) skin/classic/browser/feeds/subscribe.css (feeds/subscribe.css) skin/classic/browser/notification-icons/geo-blocked.svg (notification-icons/geo-blocked.svg) skin/classic/browser/notification-icons/geo-detailed.svg (notification-icons/geo-detailed.svg) skin/classic/browser/notification-icons/geo.svg (notification-icons/geo.svg) skin/classic/browser/places/allBookmarks.png (places/allBookmarks.png) skin/classic/browser/places/bookmarksMenu.png (places/bookmarksMenu.png) skin/classic/browser/places/bookmarksToolbar.png (places/bookmarksToolbar.png) - skin/classic/browser/places/bookmarks-menu-arrow.png (places/bookmarks-menu-arrow.png) * skin/classic/browser/places/editBookmark.css (places/editBookmark.css) skin/classic/browser/places/livemark-item.png (places/livemark-item.png) * skin/classic/browser/places/places.css (places/places.css) skin/classic/browser/places/organizer.css (places/organizer.css) skin/classic/browser/places/organizer.xml (places/organizer.xml) skin/classic/browser/places/tag.png (places/tag.png) skin/classic/browser/places/toolbarDropMarker.png (places/toolbarDropMarker.png) skin/classic/browser/places/unsortedBookmarks.png (places/unsortedBookmarks.png)
deleted file mode 100644 index 9418d100e52342fb6792169e70a038ad6372b443..0000000000000000000000000000000000000000 GIT binary patch literal 0 Hc$@<O00001
--- a/browser/themes/linux/preferences/in-content/preferences.css +++ b/browser/themes/linux/preferences/in-content/preferences.css @@ -12,12 +12,8 @@ /* override the Linux only toolkit rule */ -moz-appearance: none; } .actionsMenu > .menulist-label-box > .menulist-icon { margin-inline-start: 1px; margin-inline-end: 8px; } - -filefield + button { - margin-inline-start: -4px; -}
--- a/browser/themes/osx/customizableui/panelUI.css +++ b/browser/themes/osx/customizableui/panelUI.css @@ -34,28 +34,34 @@ panelmultiview .toolbaritem-combined-but #appMenu-fxa-container[fxastatus="signedin"] > #appMenu-fxa-status > #appMenu-fxa-avatar { margin-inline-start: 18px; } .subviewbutton:not(:-moz-any([image],[targetURI],.cui-withicon, .bookmark-item)) > .menu-iconic-left { display: none; } -/* Override OSX-specific toolkit styles for the bookmarks panel */ -menu.subviewbutton > .menu-right { - margin-inline-end: 0; +#BMB_bookmarksPopup menupopup[placespopup=true]:-moz-lwtheme { -moz-appearance: none; + background: transparent; } -menu.subviewbutton > .menu-right > image { - /* We don't want the arrow to highlight when the .subviewbutton is hovered, - * so we set the -moz-appearance rule on the image - * (which doesn't inherit the _moz-menuactive attribute) instead. - */ - -moz-appearance: menuarrow; +#BMB_bookmarksPopup menupopup[placespopup=true] > hbox:-moz-lwtheme { + background: var(--arrowpanel-background); + border-radius: var(--arrowpanel-border-radius); + box-shadow: 0 0 0 1px var(--arrowpanel-border-color); + color: var(--arrowpanel-color); + border: none; + margin: 1px; +} + +/* Override OSX-specific toolkit styles for the bookmarks panel */ +menu.subviewbutton > .menu-right { + margin-inline-end: -4px; + -moz-appearance: none; } .PanelUI-subView menuseparator, .cui-widget-panelview menuseparator { padding: 0 !important; } #PanelUI-remotetabs-tabslist > label[itemtype="client"] {
--- a/browser/themes/osx/preferences/in-content/preferences.css +++ b/browser/themes/osx/preferences/in-content/preferences.css @@ -9,25 +9,15 @@ } .actionsMenu > .menulist-label-box > .menulist-icon { margin-top: 2px; margin-inline-start: 2px; margin-inline-end: 8px !important; } -#downloadFolder > .fileFieldContentBox { - padding-inline-start: 3px; -} - -filefield + button { - margin-inline-start: -8px; - margin-top: 4px; - margin-bottom: 4px; -} - #popupPolicyRow { /* Override styles from browser/themes/osx/preferences/preferences.css */ margin-bottom: 0 !important; padding-bottom: 0 !important; border-bottom: none; }
rename from browser/themes/windows/customizableui/menu-arrow.svg rename to browser/themes/shared/customizableui/menu-arrow.svg
--- a/browser/themes/shared/customizableui/panelUI.inc.css +++ b/browser/themes/shared/customizableui/panelUI.inc.css @@ -798,16 +798,33 @@ panelview .toolbarbutton-1, outline: 0; } .subviewbutton > .toolbarbutton-text { padding: 0; padding-inline-start: 24px; /* This is 16px for the icon + 8px for the padding as defined below. */ } +.subviewbutton > .menu-right { + -moz-appearance: none; + list-style-image: url(chrome://browser/skin/customizableui/menu-arrow.svg); + -moz-context-properties: fill, fill-opacity; + fill: currentColor; + /* Reset the rect we inherit from the button */ + -moz-image-region: auto; +} + +.subviewbutton[disabled="true"] > .menu-right { + fill-opacity: 0.6; +} + +.subviewbutton > .menu-right:-moz-locale-dir(rtl) { + transform: scaleX(-1); +} + .subviewbutton > .menu-right, .subviewbutton > .menu-accel-container > .menu-iconic-accel, .subviewbutton > .menu-iconic-left, .subviewbutton > .menu-iconic-text { padding-bottom: 0; padding-top: 0; }
--- a/browser/themes/shared/incontentprefs/preferences.inc.css +++ b/browser/themes/shared/incontentprefs/preferences.inc.css @@ -210,16 +210,22 @@ button > hbox > label { } #getStarted { font-size: 90%; } #downloadFolder { margin-inline-start: 0; + padding-inline-start: 30px; + background: center left 8px / 16px no-repeat; +} + +#downloadFolder:-moz-locale-dir(rtl) { + background-position-x: right 8px; } #updateApp > .groupbox-body > label { margin: 0 0 4px; } #updateApp > .groupbox-body > description { margin: 0;
--- a/browser/themes/shared/jar.inc.mn +++ b/browser/themes/shared/jar.inc.mn @@ -28,16 +28,17 @@ skin/classic/browser/controlcenter/tracking-protection.svg (../shared/controlcenter/tracking-protection.svg) skin/classic/browser/controlcenter/warning-gray.svg (../shared/controlcenter/warning-gray.svg) skin/classic/browser/controlcenter/warning-yellow.svg (../shared/controlcenter/warning-yellow.svg) skin/classic/browser/customizableui/empty-overflow-panel.png (../shared/customizableui/empty-overflow-panel.png) skin/classic/browser/customizableui/empty-overflow-panel@2x.png (../shared/customizableui/empty-overflow-panel@2x.png) skin/classic/browser/customizableui/density-compact.svg (../shared/customizableui/density-compact.svg) skin/classic/browser/customizableui/density-normal.svg (../shared/customizableui/density-normal.svg) skin/classic/browser/customizableui/density-touch.svg (../shared/customizableui/density-touch.svg) + skin/classic/browser/customizableui/menu-arrow.svg (../shared/customizableui/menu-arrow.svg) skin/classic/browser/customizableui/whimsy.png (../shared/customizableui/whimsy.png) skin/classic/browser/downloads/contentAreaDownloadsView.css (../shared/downloads/contentAreaDownloadsView.css) skin/classic/browser/downloads/download-blocked.svg (../shared/downloads/download-blocked.svg) skin/classic/browser/downloads/download-summary.svg (../shared/downloads/download-summary.svg) skin/classic/browser/downloads/download-icons.svg (../shared/downloads/download-icons.svg) skin/classic/browser/downloads/notification-start-animation.svg (../shared/downloads/notification-start-animation.svg) skin/classic/browser/drm-icon.svg (../shared/drm-icon.svg) skin/classic/browser/fullscreen/insecure.svg (../shared/fullscreen/insecure.svg)
--- a/browser/themes/windows/customizableui/panelUI.css +++ b/browser/themes/windows/customizableui/panelUI.css @@ -38,33 +38,16 @@ /* Disabled empty item looks too small otherwise, because it has no icon. */ menuitem.subviewbutton[disabled]:not(.menuitem-iconic) { /* This is 16px for an icon + 3px for its margins + 1px for its padding + * 2px for its border, see above */ min-height: 22px; } -menu.subviewbutton > .menu-right { - -moz-appearance: none; - list-style-image: url(chrome://browser/skin/customizableui/menu-arrow.svg); - -moz-context-properties: fill, fill-opacity; - fill: currentColor; - /* Reset the rect we inherit from the button: */ - -moz-image-region: auto; -} - -menu[disabled="true"].subviewbutton > .menu-right { - fill-opacity: 0.6; -} - -menu.subviewbutton > .menu-right:-moz-locale-dir(rtl) { - transform: scaleX(-1); -} - /* Win8 and beyond. */ @media not all and (-moz-os-version: windows-win7) { #BMB_bookmarksPopup menupopup[placespopup=true] > hbox, #edit-controls@inAnyPanel@, #zoom-controls@inAnyPanel@, #edit-controls@inAnyPanel@ > toolbarbutton, #zoom-controls@inAnyPanel@ > toolbarbutton { border-radius: 0;
--- a/browser/themes/windows/jar.mn +++ b/browser/themes/windows/jar.mn @@ -13,17 +13,16 @@ browser.jar: skin/classic/browser/monitor_16-10.png skin/classic/browser/pageInfo.css skin/classic/browser/pageInfo.png * skin/classic/browser/searchbar.css skin/classic/browser/setDesktopBackground.css skin/classic/browser/slowStartup-16.png skin/classic/browser/webRTC-indicator.css (../shared/webRTC-indicator.css) * skin/classic/browser/controlcenter/panel.css (controlcenter/panel.css) - skin/classic/browser/customizableui/menu-arrow.svg (customizableui/menu-arrow.svg) * skin/classic/browser/customizableui/panelUI.css (customizableui/panelUI.css) * skin/classic/browser/downloads/allDownloadsView.css (downloads/allDownloadsView.css) * skin/classic/browser/downloads/downloads.css (downloads/downloads.css) skin/classic/browser/feeds/feedIcon.png (feeds/feedIcon.png) skin/classic/browser/feeds/feedIcon16.png (feeds/feedIcon16.png) skin/classic/browser/feeds/subscribe.css (feeds/subscribe.css) skin/classic/browser/notification-icons/geo-blocked.svg (notification-icons/geo-blocked.svg) skin/classic/browser/notification-icons/geo-detailed.svg (notification-icons/geo-detailed.svg)
--- a/browser/themes/windows/preferences/in-content-new/preferences.css +++ b/browser/themes/windows/preferences/in-content-new/preferences.css @@ -3,14 +3,13 @@ - You can obtain one at http://mozilla.org/MPL/2.0/. */ %include ../../../shared/incontentprefs/preferences.inc.css .actionsMenu > .menulist-label-box > .menulist-icon { margin-inline-end: 9px; } -textbox + button, -filefield + button { +textbox + button { margin-inline-start: -4px; margin-top: 4px; margin-bottom: 4px; }
--- a/browser/themes/windows/preferences/in-content/preferences.css +++ b/browser/themes/windows/preferences/in-content/preferences.css @@ -6,14 +6,8 @@ :root > * { font-size: 1.25em; } .actionsMenu > .menulist-label-box > .menulist-icon { margin-inline-end: 9px; } - -filefield + button { - margin-inline-start: -4px; - margin-top: 4px; - margin-bottom: 4px; -}
--- a/devtools/client/debugger/new/README.mozilla +++ b/devtools/client/debugger/new/README.mozilla @@ -1,13 +1,13 @@ This is the debugger.html project output. See https://github.com/devtools-html/debugger.html -Version 42.0 +Version 43.0 -Comparison: https://github.com/devtools-html/debugger.html/compare/release-41...release-42 +Comparison: https://github.com/devtools-html/debugger.html/compare/release-42...release-43 Packages: - babel-plugin-transform-es2015-modules-commonjs @6.26.0 - babel-preset-react @6.24.1 - react @16.2.0 - react-dom @16.2.0 - webpack @3.11.0
--- a/devtools/client/debugger/new/debugger.css +++ b/devtools/client/debugger/new/debugger.css @@ -913,16 +913,20 @@ html[dir="rtl"] .tree-node img.arrow { border-radius: 2px; display: flex; flex-direction: row; justify-content: center; align-items: center; padding: 0; } +.close-btn:focus { + outline: none; +} + .close-btn .close { mask: url("chrome://devtools/skin/images/debugger/close.svg") no-repeat; mask-size: 100%; background-color: var(--theme-comment); width: 8px; height: 8px; transition: all 0.15s ease-in-out; padding: 0; @@ -2866,29 +2870,32 @@ debug-expression-error { } .breakpoints-list .breakpoint-heading, .breakpoints-list .breakpoint { font-size: 12px; color: var(--theme-content-color1); position: relative; transition: all 0.25s ease; - padding: 0.5em 1em 0.5em 0.5em; } .breakpoints-list .breakpoint-heading, .breakpoints-list .breakpoint, .breakpoints-exceptions { padding: 0.5em 1em 0.5em 0.5em; } .breakpoints-exceptions-caught { padding: 0 1em 0.5em 2em; } +html[dir="rtl"] .breakpoints-exceptions-caught { + padding: 0 2em 0.5em 1em; +} + .breakpoints-exceptions-options:not(.empty) { border-bottom: 1px solid var(--theme-splitter-color); } .breakpoints-exceptions input, .breakpoints-exceptions-caught input { padding-inline-start: 2px; margin-inline-start: 0; @@ -3431,28 +3438,33 @@ html[dir="rtl"] .breakpoints-list .break :root.theme-dark { --accordion-header-background: #222225; --disclosure-arrow: #7f7f81; } .accordion { background-color: var(--theme-sidebar-background); width: 100%; + list-style-type: none; + padding: 0px; + margin-top: 0px; } .accordion ._header { background-color: var(--accordion-header-background); border-bottom: 1px solid var(--theme-splitter-color); display: flex; font-size: 12px; padding: 4px; transition: all 0.25s ease; width: 100%; height: 24px; align-items: center; + margin: 0px; + font-weight: normal; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none; cursor: default; } @@ -3533,17 +3545,18 @@ img.stepOut, img.resume, img.rewind, img.reverseStepOver, img.reverseStepIn, img.reverseStepOut, img.replay-previous, img.replay-next, img.resume, -img.shortcuts { +img.shortcuts, +img.skipPausing { background-color: var(--theme-body-color); } .command-bar img.pause { mask: url("chrome://devtools/skin/images/debugger/pause.svg") no-repeat; } .command-bar img.stepOver { @@ -3615,16 +3628,25 @@ img.shortcuts { .command-bar .replay-active { color: var(--theme-highlight-blue); } .command-bar .subSettings { float: right; } +.command-bar .skipPausing { + mask: url("chrome://devtools/skin/images/debugger/disable-pausing.svg") no-repeat; + mask-size: 100%; +} + +.command-bar .active .skipPausing { + background-color: var(--theme-highlight-blue); +} + .bottom { border-bottom: none; background-color: var(--theme-body-background); border-top: 1px solid var(--theme-splitter-color); flex: 0 0 25px; } .command-bar.bottom {
--- a/devtools/client/debugger/new/debugger.js +++ b/devtools/client/debugger/new/debugger.js @@ -3225,27 +3225,27 @@ function createPendingBreakpoint(bp) { /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.replaceOriginalVariableName = exports.getPausePoints = exports.getFramework = exports.mapOriginalExpression = exports.hasSyntaxError = exports.clearSources = exports.setSource = exports.hasSource = exports.getNextStep = exports.clearASTs = exports.clearScopes = exports.clearSymbols = exports.findOutOfScopeLocations = exports.getScopes = exports.getSymbols = exports.getClosestExpression = exports.stopParserWorker = exports.startParserWorker = undefined; +exports.replaceOriginalVariableName = exports.getPausePoints = exports.getFramework = exports.mapOriginalExpression = exports.hasSyntaxError = exports.clearSources = exports.setSource = exports.hasSource = exports.getNextStep = exports.clearASTs = exports.clearScopes = exports.clearSymbols = exports.findOutOfScopeLocations = exports.getScopes = exports.getSymbols = exports.getClosestExpression = exports.stop = exports.start = undefined; var _devtoolsUtils = __webpack_require__(1363); const { WorkerDispatcher } = _devtoolsUtils.workerUtils; /* 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/>. */ const dispatcher = new WorkerDispatcher(); -const startParserWorker = exports.startParserWorker = dispatcher.start.bind(dispatcher); -const stopParserWorker = exports.stopParserWorker = dispatcher.stop.bind(dispatcher); +const start = exports.start = dispatcher.start.bind(dispatcher); +const stop = exports.stop = dispatcher.stop.bind(dispatcher); const getClosestExpression = exports.getClosestExpression = dispatcher.task("getClosestExpression"); const getSymbols = exports.getSymbols = dispatcher.task("getSymbols"); const getScopes = exports.getScopes = dispatcher.task("getScopes"); const findOutOfScopeLocations = exports.findOutOfScopeLocations = dispatcher.task("findOutOfScopeLocations"); const clearSymbols = exports.clearSymbols = dispatcher.task("clearSymbols"); const clearScopes = exports.clearScopes = dispatcher.task("clearScopes"); const clearASTs = exports.clearASTs = dispatcher.task("clearASTs"); @@ -5547,16 +5547,17 @@ exports.getGeneratedFrameScope = getGene exports.getOriginalFrameScope = getOriginalFrameScope; exports.getFrameScopes = getFrameScopes; exports.getFrameScope = getFrameScope; exports.getSelectedScope = getSelectedScope; exports.getSelectedScopeMappings = getSelectedScopeMappings; exports.getSelectedFrameId = getSelectedFrameId; exports.getTopFrame = getTopFrame; exports.getDebuggeeUrl = getDebuggeeUrl; +exports.getSkipPausing = getSkipPausing; exports.getChromeScopes = getChromeScopes; var _reselect = __webpack_require__(993); var _devtoolsSourceMap = __webpack_require__(1360); var _prefs = __webpack_require__(226); @@ -5574,17 +5575,18 @@ const createPauseState = exports.createP mappings: {} }, loadedObjects: {}, shouldPauseOnExceptions: _prefs.prefs.pauseOnExceptions, shouldIgnoreCaughtExceptions: _prefs.prefs.ignoreCaughtExceptions, canRewind: false, debuggeeUrl: "", command: null, - previousLocation: null + previousLocation: null, + skipPausing: _prefs.prefs.skipPausing }); const emptyPauseState = { frames: null, frameScopes: { generated: {}, original: {}, mappings: {} @@ -5719,16 +5721,24 @@ function update(state = createPauseState case "EVALUATE_EXPRESSION": return _extends({}, state, { command: action.status === "start" ? "expression" : null }); case "NAVIGATE": return _extends({}, state, emptyPauseState, { debuggeeUrl: action.url }); + + case "TOGGLE_SKIP_PAUSING": + { + const { skipPausing } = action; + _prefs.prefs.skipPausing = skipPausing; + + return _extends({}, state, { skipPausing }); + } } return state; } function buildPreviousLocation(state, action) { const { frames, previousLocation } = state; @@ -5876,16 +5886,20 @@ const getSelectedFrame = exports.getSele } return frames.find(frame => frame.id == selectedFrameId); }); function getDebuggeeUrl(state) { return state.pause.debuggeeUrl; } +function getSkipPausing(state) { + return state.pause.skipPausing; +} + // NOTE: currently only used for chrome function getChromeScopes(state) { const frame = getSelectedFrame(state); return frame ? frame.scopeChain : undefined; } exports.default = update; @@ -5895,30 +5909,29 @@ exports.default = update; /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.findSourceMatches = exports.searchSources = exports.getMatches = exports.stopSearchWorker = exports.startSearchWorker = undefined; +exports.findSourceMatches = exports.getMatches = exports.stop = exports.start = undefined; var _devtoolsUtils = __webpack_require__(1363); const { WorkerDispatcher } = _devtoolsUtils.workerUtils; /* 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/>. */ const dispatcher = new WorkerDispatcher(); -const startSearchWorker = exports.startSearchWorker = dispatcher.start.bind(dispatcher); -const stopSearchWorker = exports.stopSearchWorker = dispatcher.stop.bind(dispatcher); +const start = exports.start = dispatcher.start.bind(dispatcher); +const stop = exports.stop = dispatcher.stop.bind(dispatcher); const getMatches = exports.getMatches = dispatcher.task("getMatches"); -const searchSources = exports.searchSources = dispatcher.task("searchSources"); const findSourceMatches = exports.findSourceMatches = dispatcher.task("findSourceMatches"); /***/ }), /***/ 1396: /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6339,22 +6352,25 @@ var _selectors = __webpack_require__(359 async function getGeneratedLocation(state, source, location, sourceMaps) { if (!sourceMaps.isOriginalId(location.sourceId)) { return location; } const { line, sourceId, column } = await sourceMaps.getGeneratedLocation(location, source); const generatedSource = (0, _selectors.getSource)(state, sourceId); - const sourceUrl = generatedSource.get("url"); + if (!generatedSource) { + return location; + } + return { line, sourceId, column: column === 0 ? undefined : column, - sourceUrl + sourceUrl: generatedSource.url }; } /* 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/>. */ /***/ }), /***/ 1398: @@ -9050,20 +9066,26 @@ var _reactDom = __webpack_require__(4); var _reactDom2 = _interopRequireDefault(_reactDom); var _devtoolsConfig = __webpack_require__(1355); var _devtoolsSourceMap = __webpack_require__(1360); var _search = __webpack_require__(1395); +var search = _interopRequireWildcard(_search); + var _prettyPrint = __webpack_require__(1431); +var prettyPrint = _interopRequireWildcard(_prettyPrint); + var _parser = __webpack_require__(1365); +var parser = _interopRequireWildcard(_parser); + var _createStore = __webpack_require__(1658); var _createStore2 = _interopRequireDefault(_createStore); var _reducers = __webpack_require__(1516); var _reducers2 = _interopRequireDefault(_reducers); @@ -9113,29 +9135,30 @@ function bootstrapStore(client, { servic return { store, actions, selectors }; } function bootstrapWorkers() { if (!(0, _devtoolsConfig.isFirefoxPanel)()) { // When used in Firefox, the toolbox manages the source map worker. (0, _devtoolsSourceMap.startSourceMapWorker)((0, _devtoolsConfig.getValue)("workers.sourceMapURL")); } - (0, _prettyPrint.startPrettyPrintWorker)((0, _devtoolsConfig.getValue)("workers.prettyPrintURL")); - (0, _parser.startParserWorker)((0, _devtoolsConfig.getValue)("workers.parserURL")); - (0, _search.startSearchWorker)((0, _devtoolsConfig.getValue)("workers.searchURL")); + prettyPrint.start((0, _devtoolsConfig.getValue)("workers.prettyPrintURL")); + parser.start((0, _devtoolsConfig.getValue)("workers.parserURL")); + search.start((0, _devtoolsConfig.getValue)("workers.searchURL")); + return { prettyPrint, parser, search }; } function teardownWorkers() { if (!(0, _devtoolsConfig.isFirefoxPanel)()) { // When used in Firefox, the toolbox manages the source map worker. (0, _devtoolsSourceMap.stopSourceMapWorker)(); } - (0, _prettyPrint.stopPrettyPrintWorker)(); - (0, _parser.stopParserWorker)(); - (0, _search.stopSearchWorker)(); + prettyPrint.stop(); + parser.stop(); + search.stop(); } function bootstrapApp(store) { if ((0, _devtoolsConfig.isFirefoxPanel)()) { renderPanel(_App2.default, store); } else { const { renderRoot } = __webpack_require__(52); renderRoot(_react2.default, _reactDom2.default, _App2.default, store); @@ -9156,17 +9179,17 @@ function updatePrefs(state) { /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.stopPrettyPrintWorker = exports.startPrettyPrintWorker = undefined; +exports.stop = exports.start = undefined; exports.prettyPrint = prettyPrint; var _devtoolsUtils = __webpack_require__(1363); var _source = __webpack_require__(1356); var _assert = __webpack_require__(1384); @@ -9174,18 +9197,18 @@ var _assert2 = _interopRequireDefault(_a function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } const { WorkerDispatcher } = _devtoolsUtils.workerUtils; /* 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/>. */ const dispatcher = new WorkerDispatcher(); -const startPrettyPrintWorker = exports.startPrettyPrintWorker = dispatcher.start.bind(dispatcher); -const stopPrettyPrintWorker = exports.stopPrettyPrintWorker = dispatcher.stop.bind(dispatcher); +const start = exports.start = dispatcher.start.bind(dispatcher); +const stop = exports.stop = dispatcher.stop.bind(dispatcher); const _prettyPrint = dispatcher.task("prettyPrint"); async function prettyPrint({ source, url }) { const indent = 2; (0, _assert2.default)((0, _source.isJavaScript)(source), "Can't prettify non-javascript files."); return await _prettyPrint({ @@ -12303,32 +12326,32 @@ exports.register = function (window) {}; "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.onConnect = undefined; +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; /* 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/>. */ + var _firefox = __webpack_require__(1500); var firefox = _interopRequireWildcard(_firefox); var _prefs = __webpack_require__(226); var _dbg = __webpack_require__(2246); var _bootstrap = __webpack_require__(1430); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } -/* 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/>. */ - function loadFromPrefs(actions) { const { pauseOnExceptions, ignoreCaughtExceptions } = _prefs.prefs; if (pauseOnExceptions || ignoreCaughtExceptions) { return actions.pauseOnExceptions(pauseOnExceptions, ignoreCaughtExceptions); } } async function onConnect(connection, { services, toolboxActions }) { @@ -12338,24 +12361,25 @@ async function onConnect(connection, { s } const commands = firefox.clientCommands; const { store, actions, selectors } = (0, _bootstrap.bootstrapStore)(commands, { services, toolboxActions }); - (0, _bootstrap.bootstrapWorkers)(); + const workers = (0, _bootstrap.bootstrapWorkers)(); await firefox.onConnect(connection, actions); await loadFromPrefs(actions); (0, _dbg.setupHelper)({ store, actions, selectors, + workers: _extends({}, workers, services), connection, client: firefox.clientCommands }); (0, _bootstrap.bootstrapApp)(store); return { store, actions, selectors, client: commands }; } @@ -12699,16 +12723,24 @@ function disablePrettyPrint(sourceId) { const sourceClient = threadClient.source({ actor: sourceId }); return sourceClient.disablePrettyPrint(); } async function setPausePoints(sourceId, pausePoints) { return sendPacket({ to: sourceId, type: "setPausePoints", pausePoints }); } +async function setSkipPausing(shouldSkip) { + return threadClient.request({ + skip: shouldSkip, + to: threadClient.actor, + type: "skipPausing" + }); +} + function interrupt() { return threadClient.interrupt(); } function eventListeners() { return threadClient.eventListeners(); } @@ -12797,17 +12829,18 @@ const clientCommands = { getProperties, getFrameScopes, pauseOnExceptions, prettyPrint, disablePrettyPrint, fetchSources, fetchWorkers, sendPacket, - setPausePoints + setPausePoints, + setSkipPausing }; exports.setupCommands = setupCommands; exports.clientCommands = clientCommands; /***/ }), /***/ 1502: @@ -17520,31 +17553,26 @@ class Editor extends _react.PureComponen } this.setState({ editor }); (0, _editor.setEditor)(editor); return editor; } componentDidMount() { - const editor = this.setupEditor(); - - const { selectedSource } = this.props; const { shortcuts } = this.context; const searchAgainKey = L10N.getStr("sourceSearch.search.again.key2"); const searchAgainPrevKey = L10N.getStr("sourceSearch.search.againPrev.key2"); shortcuts.on(L10N.getStr("toggleBreakpoint.key"), this.onToggleBreakpoint); shortcuts.on(L10N.getStr("toggleCondPanel.key"), this.onToggleConditionalPanel); shortcuts.on("Esc", this.onEscape); shortcuts.on(searchAgainPrevKey, this.onSearchAgain); shortcuts.on(searchAgainKey, this.onSearchAgain); - - (0, _editor.updateDocument)(editor, selectedSource); } componentWillUnmount() { if (this.state.editor) { this.state.editor.destroy(); this.setState({ editor: null }); } @@ -17553,22 +17581,28 @@ class Editor extends _react.PureComponen const shortcuts = this.context.shortcuts; shortcuts.off(L10N.getStr("toggleBreakpoint.key")); shortcuts.off(L10N.getStr("toggleCondPanel.key")); shortcuts.off(searchAgainPrevKey); shortcuts.off(searchAgainKey); } componentDidUpdate(prevProps, prevState) { + const { selectedSource } = this.props; // NOTE: when devtools are opened, the editor is not set when // the source loads so we need to wait until the editor is // set to update the text and size. - if (!prevState.editor && this.state.editor) { - this.setText(this.props); - this.setSize(this.props); + if (!prevState.editor && selectedSource) { + if (!this.state.editor) { + const editor = this.setupEditor(); + (0, _editor.updateDocument)(editor, selectedSource); + } else { + this.setText(this.props); + this.setSize(this.props); + } } } getCurrentLine() { const { codeMirror } = this.state.editor; const { selectedSource } = this.props; const line = (0, _editor.getCursorLine)(codeMirror); @@ -17670,16 +17704,17 @@ class Editor extends _react.PureComponen setText(props) { const { selectedSource, symbols } = props; if (!this.state.editor) { return; } + // check if we previously had a selected source if (!selectedSource) { return this.clearEditor(); } if (!(0, _source.isLoaded)(selectedSource)) { return (0, _editor.showLoading)(this.state.editor); } @@ -22900,17 +22935,17 @@ class SecondaryPanes extends _react.Comp const { toggleAllBreakpoints, breakpoints, breakpointsDisabled, breakpointsLoading } = this.props; const isIndeterminate = !breakpointsDisabled && breakpoints.some(x => x.disabled); - if (breakpoints.size == 0) { + if (_prefs.features.skipPausing || breakpoints.size == 0) { return null; } const inputProps = { type: "checkbox", "aria-label": breakpointsDisabled ? L10N.getStr("breakpoints.enable") : L10N.getStr("breakpoints.disable"), className: "breakpoints-toggle", disabled: breakpointsLoading, @@ -23618,17 +23653,17 @@ class Expressions extends _react.Compone render() { const { expressions, showInput } = this.props; return _react2.default.createElement( "ul", { className: "pane expressions-list" }, expressions.map(this.renderExpression), - showInput && this.renderNewExpressionInput() + (showInput || !expressions.size) && this.renderNewExpressionInput() ); } } exports.default = (0, _reactRedux.connect)(state => ({ expressions: (0, _selectors.getExpressions)(state), expressionError: (0, _selectors.getExpressionError)(state) }), _actions2.default)(Expressions); @@ -24289,20 +24324,20 @@ function _interopRequireDefault(obj) { r class Accordion extends _react.Component { constructor(props) { super(props); this.renderContainer = (item, i) => { const { opened } = item; return _react2.default.createElement( - "div", - { className: item.className, key: i }, + "li", + { role: "listitem", className: item.className, key: i }, _react2.default.createElement( - "div", + "h2", { className: "_header", tabIndex: "0", onClick: () => this.handleHeaderClick(i) }, _react2.default.createElement(_Svg2.default, { name: "arrow", className: opened ? "expanded" : "" }), item.header, item.buttons ? _react2.default.createElement( @@ -24336,18 +24371,18 @@ class Accordion extends _react.Component // We force an update because otherwise the accordion // would not re-render this.forceUpdate(); } render() { return _react2.default.createElement( - "div", - { className: "accordion" }, + "ul", + { role: "list", className: "accordion" }, this.props.items.map(this.renderContainer) ); } } /* 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/>. */ exports.default = Accordion; @@ -24590,46 +24625,68 @@ class CommandBar extends _react.Componen _react2.default.createElement( "span", { className: activeNext }, total ) ); } + renderSkipPausingButton() { + const { skipPausing, toggleSkipPausing } = this.props; + + if (!_prefs.features.skipPausing) { + return null; + } + + return _react2.default.createElement( + "button", + { + className: (0, _classnames2.default)("command-bar-button", { + active: skipPausing + }), + title: L10N.getStr("skipPausingTooltip"), + onClick: toggleSkipPausing + }, + _react2.default.createElement("img", { className: "skipPausing" }) + ); + } + render() { return _react2.default.createElement( "div", { className: (0, _classnames2.default)("command-bar", { vertical: !this.props.horizontal }) }, this.renderPauseButton(), this.renderStepButtons(), this.renderTimeTravelButtons(), _react2.default.createElement("div", { className: "filler" }), this.replayPreviousButton(), this.renderStepPosition(), - this.replayNextButton() + this.replayNextButton(), + this.renderSkipPausingButton() ); } } CommandBar.contextTypes = { shortcuts: _propTypes2.default.object }; exports.default = (0, _reactRedux.connect)(state => { return { isPaused: (0, _selectors.isPaused)(state), history: (0, _selectors.getHistory)(state), historyPosition: (0, _selectors.getHistoryPosition)(state), isWaitingOnBreak: (0, _selectors.getIsWaitingOnBreak)(state), - canRewind: (0, _selectors.getCanRewind)(state) + canRewind: (0, _selectors.getCanRewind)(state), + skipPausing: (0, _selectors.getSkipPausing)(state) }; }, dispatch => (0, _redux.bindActionCreators)(_actions2.default, dispatch))(CommandBar); /***/ }), /***/ 1609: /***/ (function(module, exports, __webpack_require__) { @@ -25130,16 +25187,31 @@ function _interopRequireDefault(obj) { r * 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/>. */ class Tabs extends _react.PureComponent { constructor(props) { super(props); + this.updateHiddenTabs = () => { + if (!this.refs.sourceTabs) { + return; + } + const { selectedSource, tabSources, moveTab } = this.props; + const sourceTabEls = this.refs.sourceTabs.children; + const hiddenTabs = (0, _tabs.getHiddenTabs)(tabSources, sourceTabEls); + + if ((0, _ui.isVisible)() && hiddenTabs.indexOf(selectedSource) !== -1) { + return moveTab(selectedSource.url, 0); + } + + this.setState({ hiddenTabs }); + }; + this.renderDropdownSource = source => { const { selectSpecificSource } = this.props; const filename = (0, _source.getFilename)(source.toJS()); const onClick = () => selectSpecificSource(source.id); return _react2.default.createElement( "li", { key: source.id, onClick: onClick }, @@ -25160,42 +25232,29 @@ class Tabs extends _react.PureComponent componentDidUpdate(prevProps) { if (!(prevProps === this.props)) { this.updateHiddenTabs(); } } componentDidMount() { - this.updateHiddenTabs(); + window.requestIdleCallback(this.updateHiddenTabs); window.addEventListener("resize", this.onResize); } componentWillUnmount() { window.removeEventListener("resize", this.onResize); } /* * Updates the hiddenSourceTabs state, by * finding the source tabs which are wrapped and are not on the top row. */ - updateHiddenTabs() { - if (!this.refs.sourceTabs) { - return; - } - const { selectedSource, tabSources, moveTab } = this.props; - const sourceTabEls = this.refs.sourceTabs.children; - const hiddenTabs = (0, _tabs.getHiddenTabs)(tabSources, sourceTabEls); - - if ((0, _ui.isVisible)() && hiddenTabs.indexOf(selectedSource) !== -1) { - return moveTab(selectedSource.url, 0); - } - - this.setState({ hiddenTabs }); - } + toggleSourcesDropdown(e) { this.setState(prevState => ({ dropdownShown: !prevState.dropdownShown })); } getIconClass(source) { @@ -26844,16 +26903,25 @@ var _selectFrame = __webpack_require__(1 Object.defineProperty(exports, "selectFrame", { enumerable: true, get: function () { return _selectFrame.selectFrame; } }); +var _skipPausing = __webpack_require__(3640); + +Object.defineProperty(exports, "toggleSkipPausing", { + enumerable: true, + get: function () { + return _skipPausing.toggleSkipPausing; + } +}); + /***/ }), /***/ 164: /***/ (function(module, exports, __webpack_require__) { (function() { var computeScore, countDir, file_coeff, getExtension, getExtensionScore, isMatch, scorePath, scoreSize, tau_depth, _ref; @@ -34309,32 +34377,34 @@ if (isDevelopment()) { pref("devtools.debugger.pending-selected-location", "{}"); pref("devtools.debugger.pending-breakpoints", "{}"); pref("devtools.debugger.expressions", "[]"); pref("devtools.debugger.file-search-case-sensitive", false); pref("devtools.debugger.file-search-whole-word", false); pref("devtools.debugger.file-search-regex-match", false); pref("devtools.debugger.project-directory-root", ""); pref("devtools.debugger.prefs-schema-version", "1.0.1"); + pref("devtools.debugger.skip-pausing", false); pref("devtools.debugger.features.workers", true); pref("devtools.debugger.features.async-stepping", true); pref("devtools.debugger.features.wasm", true); pref("devtools.debugger.features.shortcuts", true); pref("devtools.debugger.features.root", true); pref("devtools.debugger.features.column-breakpoints", false); pref("devtools.debugger.features.map-scopes", true); pref("devtools.debugger.features.remove-command-bar-options", true); pref("devtools.debugger.features.code-coverage", false); pref("devtools.debugger.features.event-listeners", false); pref("devtools.debugger.features.code-folding", false); pref("devtools.debugger.features.outline", true); pref("devtools.debugger.features.column-breakpoints", true); pref("devtools.debugger.features.replay", true); pref("devtools.debugger.features.pause-points", true); pref("devtools.debugger.features.component-stack", true); + pref("devtools.debugger.features.skip-pausing", false); } const prefs = new PrefsHelper("devtools", { alphabetizeOutline: ["Bool", "debugger.alphabetize-outline"], autoPrettyPrint: ["Bool", "debugger.auto-pretty-print"], clientSourceMapsEnabled: ["Bool", "source-map.client-service.enabled"], pauseOnExceptions: ["Bool", "debugger.pause-on-exceptions"], ignoreCaughtExceptions: ["Bool", "debugger.ignore-caught-exceptions"], @@ -34352,17 +34422,18 @@ const prefs = new PrefsHelper("devtools" tabsBlackBoxed: ["Json", "debugger.tabsBlackBoxed", []], pendingSelectedLocation: ["Json", "debugger.pending-selected-location", {}], pendingBreakpoints: ["Json", "debugger.pending-breakpoints", {}], expressions: ["Json", "debugger.expressions", []], fileSearchCaseSensitive: ["Bool", "debugger.file-search-case-sensitive"], fileSearchWholeWord: ["Bool", "debugger.file-search-whole-word"], fileSearchRegexMatch: ["Bool", "debugger.file-search-regex-match"], debuggerPrefsSchemaVersion: ["Char", "debugger.prefs-schema-version"], - projectDirectoryRoot: ["Char", "debugger.project-directory-root", ""] + projectDirectoryRoot: ["Char", "debugger.project-directory-root", ""], + skipPausing: ["Bool", "debugger.skip-pausing"] }); /* harmony export (immutable) */ __webpack_exports__["prefs"] = prefs; const features = new PrefsHelper("devtools.debugger.features", { asyncStepping: ["Bool", "async-stepping"], wasm: ["Bool", "wasm"], shortcuts: ["Bool", "shortcuts"], @@ -34372,17 +34443,18 @@ const features = new PrefsHelper("devtoo removeCommandBarOptions: ["Bool", "remove-command-bar-options"], workers: ["Bool", "workers"], codeCoverage: ["Bool", "code-coverage"], eventListeners: ["Bool", "event-listeners"], outline: ["Bool", "outline"], codeFolding: ["Bool", "code-folding"], replay: ["Bool", "replay"], pausePoints: ["Bool", "pause-points"], - componentStack: ["Bool", "component-stack"] + componentStack: ["Bool", "component-stack"], + skipPausing: ["Bool", "skip-pausing"] }); /* harmony export (immutable) */ __webpack_exports__["features"] = features; if (prefs.debuggerPrefsSchemaVersion !== prefsSchemaVersion) { // clear pending Breakpoints prefs.pendingBreakpoints = {}; prefs.debuggerPrefsSchemaVersion = prefsSchemaVersion; @@ -34656,155 +34728,163 @@ function locColumn(loc) { /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; /* 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/>. */ - -// eslint-disable-next-line max-len - - exports.findGeneratedBindingFromPosition = findGeneratedBindingFromPosition; var _locColumn = __webpack_require__(2349); var _filtering = __webpack_require__(3635); var _firefox = __webpack_require__(1500); -async function findGeneratedBindingFromPosition(sourceMaps, client, source, pos, name, type, generatedAstBindings) { - const range = await getGeneratedLocationRange(pos, source, type, sourceMaps); - - if (range) { - let result; - if (type === "import") { - result = await findGeneratedImportReference(type, generatedAstBindings, _extends({ - type: pos.type - }, range)); - } else { - result = await findGeneratedReference(type, generatedAstBindings, _extends({ - type: pos.type - }, range)); - } - - if (result) { - return result; - } - } - - if (type === "import" && pos.type === "decl") { - let importRange = range; - if (!importRange) { - // If the imported name itself does not map to a useful range, fall back - // to resolving the bindinding using the location of the overall - // import declaration. - importRange = await getGeneratedLocationRange({ - type: pos.type, - start: pos.declaration.start, - end: pos.declaration.end - }, source, type, sourceMaps); - - if (!importRange) { - return null; - } - } - +/* 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/>. */ + +async function findGeneratedBindingFromPosition(sourceMaps, client, source, pos, name, bindingType, generatedAstBindings) { + const locationType = pos.type; + + const generatedRanges = await getGeneratedLocationRanges(source, pos, bindingType, locationType, sourceMaps); + const applicableBindings = filterApplicableBindings(generatedAstBindings, generatedRanges); + + let result; + if (bindingType === "import") { + result = await findGeneratedImportReference(applicableBindings); + } else { + result = await findGeneratedReference(applicableBindings); + } + + if (result) { + return result; + } + + if (bindingType === "import" && pos.type === "decl") { const importName = pos.importName; if (typeof importName !== "string") { // Should never happen, just keeping Flow happy. return null; } - return await findGeneratedImportDeclaration(generatedAstBindings, _extends({ - importName - }, importRange)); + let applicableImportBindings = applicableBindings; + if (generatedRanges.length === 0) { + // If the imported name itself does not map to a useful range, fall back + // to resolving the bindinding using the location of the overall + // import declaration. + const importRanges = await getGeneratedLocationRanges(source, pos.declaration, bindingType, locationType, sourceMaps); + applicableImportBindings = filterApplicableBindings(generatedAstBindings, importRanges); + + if (applicableImportBindings.length === 0) { + return null; + } + } + + return await findGeneratedImportDeclaration(applicableImportBindings, importName); } return null; } - -function filterApplicableBindings(bindings, mapped) { - // Any binding overlapping a part of the mapping range. - return (0, _filtering.filterSortedArray)(bindings, binding => { - if (positionCmp(binding.loc.end, mapped.start) <= 0) { - return -1; - } - if (positionCmp(binding.loc.start, mapped.end) >= 0) { - return 1; - } - - return 0; - }); +// eslint-disable-next-line max-len + + +function filterApplicableBindings(bindings, ranges) { + const result = []; + for (const range of ranges) { + // Any binding overlapping a part of the mapping range. + const filteredBindings = (0, _filtering.filterSortedArray)(bindings, binding => { + if (positionCmp(binding.loc.end, range.start) <= 0) { + return -1; + } + if (positionCmp(binding.loc.start, range.end) >= 0) { + return 1; + } + + return 0; + }); + + let firstInRange = true; + let firstOnLine = true; + let line = -1; + + for (const binding of filteredBindings) { + if (binding.loc.start.line === line) { + firstOnLine = false; + } else { + line = binding.loc.start.line; + firstOnLine = true; + } + + result.push({ + binding, + range, + firstOnLine, + firstInRange + }); + + firstInRange = false; + } + } + + return result; } /** * Given a mapped range over the generated source, attempt to resolve a real * binding descriptor that can be used to access the value. */ -async function findGeneratedReference(type, generatedAstBindings, mapped) { - const bindings = filterApplicableBindings(generatedAstBindings, mapped); - - let lineStart = true; - let line = -1; - - return bindings.reduce(async (acc, val, i) => { - const accVal = await acc; - if (accVal) { - return accVal; - } - - if (val.loc.start.line === line) { - lineStart = false; - } else { - line = val.loc.start.line; - lineStart = true; - } - - return mapBindingReferenceToDescriptor(val, mapped, lineStart); - }, null); -} - -async function findGeneratedImportReference(type, generatedAstBindings, mapped) { - let bindings = filterApplicableBindings(generatedAstBindings, mapped); - +async function findGeneratedReference(applicableBindings) { + for (const applicable of applicableBindings) { + const result = await mapBindingReferenceToDescriptor(applicable); + if (result) { + return result; + } + } + return null; +} + +async function findGeneratedImportReference(applicableBindings) { // When wrapped, for instance as `Object(ns.default)`, the `Object` binding // will be the first in the list. To avoid resolving `Object` as the // value of the import itself, we potentially skip the first binding. - if (bindings.length > 1 && !bindings[0].loc.meta && bindings[1].loc.meta) { - bindings = bindings.slice(1); - } - - return bindings.reduce(async (acc, val) => { - const accVal = await acc; - if (accVal) { - return accVal; - } - - return mapImportReferenceToDescriptor(val, mapped); - }, null); + applicableBindings = applicableBindings.filter((applicable, i) => { + if (!applicable.firstInRange || applicable.binding.loc.type !== "ref" || applicable.binding.loc.meta) { + return true; + } + + const next = i + 1 < applicableBindings.length ? applicableBindings[i + 1] : null; + + return !next || next.binding.loc.type !== "ref" || !next.binding.loc.meta; + }); + + for (const applicable of applicableBindings) { + const result = await mapImportReferenceToDescriptor(applicable); + if (result) { + return result; + } + } + + return null; } /** * Given a mapped range over the generated source and the name of the imported * value that is referenced, attempt to resolve a binding descriptor for * the import's value. */ -async function findGeneratedImportDeclaration(generatedAstBindings, mapped) { - const bindings = filterApplicableBindings(generatedAstBindings, mapped); - +async function findGeneratedImportDeclaration(applicableBindings, importName) { let result = null; - for (const binding of bindings) { + for (const _ref of applicableBindings) { + const { binding } = _ref; + if (binding.loc.type !== "decl") { continue; } const namespaceDesc = await binding.desc(); if (isPrimitiveValue(namespaceDesc)) { continue; } @@ -34820,18 +34900,18 @@ async function findGeneratedImportDeclar result = { name: binding.name, desc: namespaceDesc, expression: binding.name }; continue; } - const desc = await readDescriptorProperty(namespaceDesc, mapped.importName); - const expression = `${binding.name}.${mapped.importName}`; + const desc = await readDescriptorProperty(namespaceDesc, importName); + const expression = `${binding.name}.${importName}`; if (desc) { result = { name: binding.name, desc, expression }; break; @@ -34840,44 +34920,52 @@ async function findGeneratedImportDeclar return result; } /** * Given a generated binding, and a range over the generated code, statically * check if the given binding matches the range. */ -async function mapBindingReferenceToDescriptor(binding, mapped, isFirst) { +async function mapBindingReferenceToDescriptor({ + binding, + range, + firstInRange, + firstOnLine +}) { // Allow the mapping to point anywhere within the generated binding // location to allow for less than perfect sourcemaps. Since you also // need at least one character between identifiers, we also give one // characters of space at the front the generated binding in order // to increase the probability of finding the right mapping. - if (mapped.start.line === binding.loc.start.line && ( + if (range.start.line === binding.loc.start.line && ( // If a binding is the first on a line, Babel will extend the mapping to // include the whitespace between the newline and the binding. To handle // that, we skip the range requirement for starting location. - isFirst || (0, _locColumn.locColumn)(mapped.start) >= (0, _locColumn.locColumn)(binding.loc.start)) && (0, _locColumn.locColumn)(mapped.start) <= (0, _locColumn.locColumn)(binding.loc.end)) { + firstInRange || firstOnLine || (0, _locColumn.locColumn)(range.start) >= (0, _locColumn.locColumn)(binding.loc.start)) && (0, _locColumn.locColumn)(range.start) <= (0, _locColumn.locColumn)(binding.loc.end)) { return { name: binding.name, desc: await binding.desc(), expression: binding.name }; } return null; } /** * Given an generated binding, and a range over the generated code, statically * evaluate accessed properties within the mapped range to resolve the actual * imported value. */ -async function mapImportReferenceToDescriptor(binding, mapped) { - if (mapped.type !== "ref") { +async function mapImportReferenceToDescriptor({ + binding, + range +}) { + if (binding.loc.type !== "ref") { return null; } // Expression matches require broader searching because sourcemaps usage // varies in how they map certain things. For instance given // // import { bar } from "mod"; // bar(); @@ -34898,31 +34986,31 @@ async function mapImportReferenceToDescr // Unfortunately, Webpack also has a tendancy to over-map past the call // expression to the start of the next line, at least when there isn't // anything else on that line that is mapped, e.g. // // Object(foo.bar)() // ^^^^^^^^^^^^^^^^^ // ^ // wrapped to column 0 of next line - if (!mappingContains(mapped, binding.loc)) { + if (!mappingContains(range, binding.loc)) { return null; } let expression = binding.name; let desc = await binding.desc(); if (binding.loc.type === "ref") { const { meta } = binding.loc; // Limit to 2 simple property or inherits operartions, since it would // just be more work to search more and it is very unlikely that // bindings would be mapped to more than a single member + inherits // wrapper. - for (let op = meta, index = 0; op && mappingContains(mapped, op) && desc && index < 2; index++, op = op && op.parent) { + for (let op = meta, index = 0; op && mappingContains(range, op) && desc && index < 2; index++, op = op && op.parent) { // Calling could potentially trigger side-effects, which would not // be ideal for this case. if (op.type === "call") { return null; } if (op.type === "inherit") { continue; @@ -34993,66 +35081,77 @@ function positionCmp(p1, p2) { return 0; } return l1 < l2 ? -1 : 1; } return p1.line < p2.line ? -1 : 1; } -async function getGeneratedLocationRange(pos, source, type, sourceMaps) { - const endPosition = await sourceMaps.getGeneratedLocation(pos.end, source); - const startPosition = await sourceMaps.getGeneratedLocation(pos.start, source); - const ranges = await sourceMaps.getGeneratedRanges(pos.start, source); - if (ranges.length === 0) { - return null; - } +async function getGeneratedLocationRanges(source, { + start, + end +}, bindingType, locationType, sourceMaps) { + const endPosition = await sourceMaps.getGeneratedLocation(end, source); + const startPosition = await sourceMaps.getGeneratedLocation(start, source); // If the start and end positions collapse into eachother, it means that // the range in the original content didn't _start_ at the start position. // Since this likely means that the range doesn't logically apply to this // binding location, we skip it. if (positionCmp(startPosition, endPosition) === 0) { - return null; - } - - const start = { - line: ranges[0].line, - column: ranges[0].columnStart - }; - const end = { - line: ranges[0].line, - // SourceMapConsumer's 'lastColumn' is inclusive, so we add 1 to make - // it exclusive like all other locations. - column: ranges[0].columnEnd + 1 - }; - - // Expand the range over any following ranges if they are contiguous. - for (let i = 1; i < ranges.length; i++) { - const range = ranges[i]; - if (end.column !== Infinity || range.line !== end.line + 1 || range.columnStart !== 0) { - break; - } - end.line = range.line; - end.column = range.columnEnd + 1; - } + return []; + } + + const ranges = await sourceMaps.getGeneratedRanges(start, source); + + const resultRanges = ranges.reduce((acc, mapRange) => { + const range = { + start: { + line: mapRange.line, + column: mapRange.columnStart + }, + end: { + line: mapRange.line, + // SourceMapConsumer's 'lastColumn' is inclusive, so we add 1 to make + // it exclusive like all other locations. + column: mapRange.columnEnd + 1 + } + }; + + const previous = acc[acc.length - 1]; + + if (previous && (previous.end.line === range.start.line && previous.end.column === range.start.column || previous.end.line + 1 === range.start.line && previous.end.column === Infinity && range.start.column === 0)) { + previous.end.line = range.end.line; + previous.end.column = range.end.column; + } else { + acc.push(range); + } + + return acc; + }, []); // When searching for imports, we expand the range to up to the next available // mapping to allow for import declarations that are composed of multiple // variable statements, where the later ones are entirely unmapped. // Babel 6 produces imports in this style, e.g. // // var _mod = require("mod"); // mapped from import statement // var _mod2 = interop(_mod); // entirely unmapped - if (type === "import" && pos.type === "decl" && endPosition.line > end.line) { - end.line = endPosition.line; - end.column = endPosition.column; - } - - return { start, end }; + if (bindingType === "import" && locationType === "decl") { + for (const range of resultRanges) { + if (mappingContains(range, { start: startPosition, end: startPosition }) && positionCmp(range.end, endPosition) < 0) { + range.end.line = endPosition.line; + range.end.column = endPosition.column; + break; + } + } + } + + return resultRanges; } /***/ }), /***/ 2359: /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -38843,17 +38942,17 @@ class FrameworkComponent extends _react. dimTopLevelWindow: true, createObjectClient: grip => (0, _firefox.createObjectClient)(grip) }) ); } render() { const { selectedFrame } = this.props; - if ((0, _preview.isReactComponent)(selectedFrame.this)) { + if (selectedFrame && (0, _preview.isReactComponent)(selectedFrame.this)) { return this.renderReactComponent(); } return null; } } exports.default = (0, _reactRedux.connect)(state => { @@ -39177,20 +39276,24 @@ function findInsertionLocation(array, ca right = mid; } else { left = mid + 1; } } // Ensure the value is the start of any set of matches. let i = left; - while (i > 0 && callback(array[i]) >= 0) { - i--; - } - return i + 1; + if (i < array.length) { + while (i > 0 && callback(array[i]) >= 0) { + i--; + } + return i + 1; + } + + return i; } function filterSortedArray(array, callback) { const start = findInsertionLocation(array, callback); const results = []; for (let i = start; i < array.length && callback(array[i]) === 0; i++) { results.push(array[i]); @@ -39807,16 +39910,50 @@ exports.default = (0, _reactRedux.connec /***/ 364: /***/ (function(module, exports) { module.exports = "<!-- 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/. --><svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 33 12\"><path id=\"base-path\" d=\"M27.1,0H1C0.4,0,0,0.4,0,1v10c0,0.6,0.4,1,1,1h26.1 c0.6,0,1.2-0.3,1.5-0.7L33,6l-4.4-5.3C28.2,0.3,27.7,0,27.1,0z\"></path></svg>" /***/ }), +/***/ 3640: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.toggleSkipPausing = toggleSkipPausing; + +var _selectors = __webpack_require__(3590); + +/** + * @memberof actions/pause + * @static + */ +/* 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/>. */ + +function toggleSkipPausing() { + return async ({ dispatch, client, getState, sourceMaps }) => { + const skipPausing = !(0, _selectors.getSkipPausing)(getState()); + + // NOTE: enable this when we land the endpoint in m-c + // await client.setSkipPausing(skipPausing); + + dispatch({ type: "TOGGLE_SKIP_PAUSING", skipPausing }); + }; +} + +/***/ }), + /***/ 365: /***/ (function(module, exports) { module.exports = "<!-- 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/. --><svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><g fill-rule=\"evenodd\"><path d=\"M1.5 14.042h4.095a.5.5 0 0 0 0-1H1.5a.5.5 0 1 0 0 1zM7.983 2a.5.5 0 0 1 .517.5v7.483l3.136-3.326a.5.5 0 1 1 .728.686l-4 4.243a.499.499 0 0 1-.73-.004L3.635 7.343a.5.5 0 0 1 .728-.686L7.5 9.983V3H1.536C1.24 3 1 2.776 1 2.5s.24-.5.536-.5h6.447zM10.5 14.042h4.095a.5.5 0 0 0 0-1H10.5a.5.5 0 1 0 0 1z\"></path></g></svg>" /***/ }), /***/ 366:
--- a/devtools/client/debugger/new/parser-worker.js +++ b/devtools/client/debugger/new/parser-worker.js @@ -1317,17 +1317,17 @@ function isAwaitExpression(path) { } function isYieldExpression(path) { const { node, parent } = path; return t.isYieldExpression(node) || t.isYieldExpression(parent.init) || t.isYieldExpression(parent); } function isObjectShorthand(parent) { - return t.isProperty(parent) && parent.key.start == parent.value.start && parent.key.loc.identifierName === parent.value.loc.identifierName; + return t.isObjectProperty(parent) && parent.key.start == parent.value.start && parent.key.loc.identifierName === parent.value.loc.identifierName; } function getObjectExpressionValue(node) { const { value } = node; if (t.isIdentifier(value)) { return value.name; } @@ -19623,16 +19623,29 @@ const scopeCollectionVisitor = { } freeVariables.push({ type: "ref", start: fromBabelLocation(node.loc.start, state.sourceId), end: fromBabelLocation(node.loc.end, state.sourceId), meta: buildMetaBindings(state.sourceId, node, ancestors) }); + } else if (isOpeningJSXIdentifier(node, ancestors)) { + let freeVariables = state.freeVariables.get(node.name); + if (!freeVariables) { + freeVariables = []; + state.freeVariables.set(node.name, freeVariables); + } + + freeVariables.push({ + type: "ref", + start: fromBabelLocation(node.loc.start, state.sourceId), + end: fromBabelLocation(node.loc.end, state.sourceId), + meta: buildMetaBindings(state.sourceId, node, ancestors) + }); } else if (t.isThisExpression(node)) { let freeVariables = state.freeVariables.get("this"); if (!freeVariables) { freeVariables = []; state.freeVariables.set("this", freeVariables); } freeVariables.push({ @@ -19699,16 +19712,34 @@ const scopeCollectionVisitor = { } refs.push(...value); } } } }; +function isOpeningJSXIdentifier(node, ancestors) { + if (!t.isJSXIdentifier(node)) { + return false; + } + + for (let i = ancestors.length - 1; i >= 0; i--) { + const { node: parent, key } = ancestors[i]; + + if (t.isJSXOpeningElement(parent) && key === "name") { + return true; + } else if (!t.isJSXMemberExpression(parent) || key !== "object") { + break; + } + } + + return false; +} + function buildMetaBindings(sourceId, node, ancestors, parentIndex = ancestors.length - 1) { if (parentIndex <= 1) { return null; } const parent = ancestors[parentIndex].node; const grandparent = ancestors[parentIndex - 1].node; // Consider "0, foo" to be equivalent to "foo". @@ -21226,19 +21257,18 @@ function onEnter(node, ancestors, state) } if (isAssignment(node)) { // We only want to pause at literal assignments `var a = foo()` const value = node.right || node.init; if (isCall(value) || t.isFunction(parentNode)) { return addEmptyPoint(state, startLocation); - } else { - return addStopPoint(state, startLocation); - } + } + return addStopPoint(state, startLocation); } if (isCall(node)) { let location = startLocation; // When functions are chained, we want to use the property location // e.g `foo().bar()` if (t.isMemberExpression(node.callee)) {
--- a/devtools/client/debugger/new/test/mochitest/browser.ini +++ b/devtools/client/debugger/new/test/mochitest/browser.ini @@ -149,17 +149,16 @@ skip-if = (os == "win" && ccov) # Bug 14 [browser_dbg-babel-scopes.js] skip-if = ccov # Bug 1441545 [browser_dbg-babel-stepping.js] [browser_dbg-babel-preview.js] skip-if = (os == "win" && ccov) # Bug 1448523 [browser_dbg-breaking.js] [browser_dbg-breaking-from-console.js] [browser_dbg-breakpoints.js] -[browser_dbg-breakpoints-toggle.js] [browser_dbg-breakpoints-reloading.js] [browser_dbg-breakpoints-cond.js] [browser_dbg-browser-content-toolbox.js] skip-if = !e10s # This test is only valid in e10s [browser_dbg-call-stack.js] [browser_dbg-scopes.js] [browser_dbg-chrome-create.js] [browser_dbg-chrome-debugging.js]
--- a/devtools/client/debugger/new/test/mochitest/browser_dbg-babel-scopes.js +++ b/devtools/client/debugger/new/test/mochitest/browser_dbg-babel-scopes.js @@ -98,17 +98,17 @@ add_task(async function() { // No '<this>' binding here because Babel does not currently general // the current mappings for 'this' bindings. await breakpointScopes( dbg, "this-arguments-bindings", { line: 8, column: 6 }, [ "arrow", - ["argArrow", "(unmapped)"], + ["argArrow", '"arrow-arg"'], "Block", "arrow()", "fn", ["arg", '"arg-value"'], ["arguments", "Arguments"], "root", "fn()", "Module", @@ -127,16 +127,17 @@ add_task(async function() { ["anAliased2", '"an-original2"'], ["anAliased3", '"an-original3"'], ["aNamed", '"a-named"'], ["aNamed2", '"a-named2"'], ["aNamed3", '"a-named3"'], ["aNamespace", "{\u2026}"], ["aNamespace2", "{\u2026}"], ["aNamespace3", "{\u2026}"], + ["example", "(optimized away)"], ["optimizedOut", "(optimized away)"], "root()" ]); await breakpointScopes(dbg, "classes", { line: 12, column: 6 }, [ "Block", ["three", "3"], ["two", "2"], @@ -279,16 +280,17 @@ add_task(async function() { ["anAliased2", "Getter"], ["anAliased3", "Getter"], ["aNamed", "Getter"], ["aNamed2", "Getter"], ["aNamed3", "Getter"], ["aNamespace", "{\u2026}"], ["aNamespace2", "{\u2026}"], ["aNamespace3", "{\u2026}"], + ["example", "(optimized away)"], ["optimizedOut", "(optimized away)"], "root()" ]); await breakpointScopes(dbg, "webpack-modules-es6", { line: 20, column: 2 }, [ "Module", ["aDefault", '"a-default"'], ["aDefault2", '"a-default2"'], @@ -297,16 +299,17 @@ add_task(async function() { ["anAliased2", '"an-original2"'], ["anAliased3", '"an-original3"'], ["aNamed", '"a-named"'], ["aNamed2", '"a-named2"'], ["aNamed3", '"a-named3"'], ["aNamespace", "{\u2026}"], ["aNamespace2", "{\u2026}"], ["aNamespace3", "{\u2026}"], + ["example", "(optimized away)"], ["optimizedOut", "(optimized away)"], "root()" ]); await breakpointScopes(dbg, "webpack-standalone", { line: 11, column: 0 }, [ "Block", ["<this>", '"this-value"'], ["arg", '"arg-value"'],
deleted file mode 100644 --- a/devtools/client/debugger/new/test/mochitest/browser_dbg-breakpoints-toggle.js +++ /dev/null @@ -1,89 +0,0 @@ -function toggleBreakpoint(dbg, index) { - const bp = findAllElements(dbg, "breakpointItems")[index]; - const input = bp.querySelector("input"); - input.click(); -} - -async function removeBreakpoint(dbg, index) { - const removed = waitForDispatch(dbg, "REMOVE_BREAKPOINT"); - const bp = findAllElements(dbg, "breakpointItems")[index]; - bp.querySelector(".close-btn").click(); - await removed; -} - -async function disableBreakpoint(dbg, index) { - const disabled = waitForDispatch(dbg, "DISABLE_BREAKPOINT"); - toggleBreakpoint(dbg, index); - await disabled; -} - -async function enableBreakpoint(dbg, index) { - const enabled = waitForDispatch(dbg, "ENABLE_BREAKPOINT"); - toggleBreakpoint(dbg, index); - await enabled; -} - -function toggleBreakpoints(dbg, count) { - clickElement(dbg, "toggleBreakpoints"); -} - -function disableBreakpoints(dbg, count) { - const toggled = waitForDispatch(dbg, "DISABLE_ALL_BREAKPOINTS", count); - toggleBreakpoints(dbg); - return toggled; -} - -function enableBreakpoints(dbg, count) { - const enabled = waitForDispatch(dbg, "ENABLE_ALL_BREAKPOINTS", count); - toggleBreakpoints(dbg); - return enabled; -} - -function findBreakpoint(dbg, url, line) { - const { selectors: { getBreakpoint }, getState } = dbg; - const source = findSource(dbg, url); - return getBreakpoint(getState(), { sourceId: source.id, line }); -} - -function findBreakpoints(dbg) { - const { selectors: { getBreakpoints }, getState } = dbg; - return getBreakpoints(getState()); -} - -// toggle all breakpoints -add_task(async function() { - const dbg = await initDebugger("doc-scripts.html", "simple2"); - - // Create two breakpoints - await selectSource(dbg, "simple2"); - await addBreakpoint(dbg, "simple2", 3); - await addBreakpoint(dbg, "simple2", 5); - - // Disable all of the breakpoints - await disableBreakpoints(dbg, 1); - let bp1 = findBreakpoint(dbg, "simple2", 3); - let bp2 = findBreakpoint(dbg, "simple2", 5); - - if (!bp2) { - debugger; - } - - is(bp1.disabled, true, "first breakpoint is disabled"); - is(bp2.disabled, true, "second breakpoint is disabled"); - - // Enable all of the breakpoints - await enableBreakpoints(dbg, 1); - bp1 = findBreakpoint(dbg, "simple2", 3); - bp2 = findBreakpoint(dbg, "simple2", 5); - - is(bp1.disabled, false, "first breakpoint is enabled"); - is(bp2.disabled, false, "second breakpoint is enabled"); - - // Remove the breakpoints - await removeBreakpoint(dbg, 0); - await removeBreakpoint(dbg, 0); - - const bps = findBreakpoints(dbg); - - is(bps.size, 0, "breakpoints are removed"); -});
--- a/devtools/client/debugger/new/test/mochitest/examples/babel/fixtures/imported-bindings/input.js +++ b/devtools/client/debugger/new/test/mochitest/examples/babel/fixtures/imported-bindings/input.js @@ -36,8 +36,15 @@ export default function root() { console.log(new aDefault3()); console.log(new anAliased3()); console.log(new aNamed3()); console.log(new anAliased3()); console.log(new aNamespace3()); } catch (e) {} } + +export function example(){} + +// The build harness sets the wrong global, so just override it. +Promise.resolve().then(() => { + window.importedBindings = root; +});
--- a/devtools/client/debugger/new/test/mochitest/examples/babel/fixtures/imported-bindings/output.js +++ b/devtools/client/debugger/new/test/mochitest/examples/babel/fixtures/imported-bindings/output.js @@ -70,16 +70,17 @@ var importedBindings = "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = root; +exports.example = example; var _mod = __webpack_require__(1); var _mod2 = _interopRequireDefault(_mod); var _mod3 = __webpack_require__(2); var _mod4 = __webpack_require__(3); @@ -142,17 +143,23 @@ function root() { console.log(new _mod12.default()); console.log(new _mod14.original()); console.log(new _mod13.aNamed3()); console.log(new _mod14.original()); console.log(new aNamespace3()); } catch (e) {} } -module.exports = exports["default"]; + +function example() {} + +// The build harness sets the wrong global, so just override it. +Promise.resolve().then(function () { + window.importedBindings = root; +}); /***/ }), /* 1 */ /***/ (function(module, exports, __webpack_require__) { "use strict";
--- a/devtools/client/debugger/new/test/mochitest/examples/babel/fixtures/imported-bindings/output.js.map +++ b/devtools/client/debugger/new/test/mochitest/examples/babel/fixtures/imported-bindings/output.js.map @@ -1,1 +1,1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap e0180c76a41bdd7a8eae","webpack:///./fixtures/imported-bindings/input.js","webpack:///./fixtures/imported-bindings/src/mod1.js","webpack:///./fixtures/imported-bindings/src/mod2.js","webpack:///./fixtures/imported-bindings/src/mod3.js","webpack:///./fixtures/imported-bindings/src/mod4.js","webpack:///./fixtures/imported-bindings/src/mod5.js","webpack:///./fixtures/imported-bindings/src/mod6.js","webpack:///./fixtures/imported-bindings/src/mod7.js","webpack:///./fixtures/imported-bindings/src/mod8.js","webpack:///./fixtures/imported-bindings/src/mod9.js","webpack:///./fixtures/imported-bindings/src/mod10.js","webpack:///./fixtures/imported-bindings/src/mod11.js","webpack:///./fixtures/imported-bindings/src/mod12.js","webpack:///./fixtures/imported-bindings/src/optimized-out.js"],"names":["root","aNamespace","aNamespace2","aNamespace3","console","log","e","aNamed","original","aNamed2","aNamed3","optimizedOut"],"mappings":";;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;;;;;;kBC3CwBA,I;;AAlBxB;;;;AACA;;AACA;;AACA;;IAAYC,U;;AAEZ;;;;AACA;;AACA;;AACA;;IAAYC,W;;AAEZ;;;;AACA;;AACA;;AACA;;IAAYC,W;;AAEZ;;;;;;;;AACA;;AAEe,SAASH,IAAT,GAAgB;AAC7BI,UAAQC,GAAR,CAAY,YAAZ,EAA0BL,IAA1B;;AAEAI,UAAQC,GAAR;AACAD,UAAQC,GAAR;AACAD,UAAQC,GAAR;AACAD,UAAQC,GAAR;AACAD,UAAQC,GAAR,CAAYJ,UAAZ;;AAEA,MAAI;AACF;AACA;AACAG,YAAQC,GAAR,CAAY,oBAAZ;AACAD,YAAQC,GAAR,CAAY,qBAAZ;AACAD,YAAQC,GAAR,CAAY,oBAAZ;AACAD,YAAQC,GAAR,CAAY,qBAAZ;AACAD,YAAQC,GAAR,CAAYH,aAAZ;;AAEAE,YAAQC,GAAR,CAAY,oBAAZ;AACAD,YAAQC,GAAR,CAAY,qBAAZ;AACAD,YAAQC,GAAR,CAAY,oBAAZ;AACAD,YAAQC,GAAR,CAAY,qBAAZ;AACAD,YAAQC,GAAR,CAAY,IAAIF,WAAJ,EAAZ;AACD,GAdD,CAcE,OAAOG,CAAP,EAAU,CAAE;AACf;;;;;;;;;;;;;kBC1Cc,W;;;;;;;;;;;;;ACAR,IAAMC,0BAAS,SAAf,C;;;;;;;;;;;;ACAA,IAAMC,8BAAW,aAAjB,C;;;;;;;;;;;;kBCAQ,W;AACR,IAAMD,0BAAS,SAAf,C;;;;;;;;;;;;kBCDQ,Y;;;;;;;;;;;;;ACAR,IAAME,4BAAU,UAAhB,C;;;;;;;;;;;;ACAA,IAAMD,8BAAW,cAAjB,C;;;;;;;;;;;;kBCAQ,Y;AACR,IAAMD,0BAAS,UAAf,C;;;;;;;;;;;;kBCDQ,Y;;;;;;;;;;;;;ACAR,IAAMG,4BAAU,UAAhB,C;;;;;;;;;;;;ACAA,IAAMF,8BAAW,cAAjB,C;;;;;;;;;;;;kBCAQ,Y;AACR,IAAMD,0BAAS,UAAf,C;;;;;;;;;;;;kBCDiBI,Y;AAAT,SAASA,YAAT,GAAwB,CAAE","file":"fixtures/imported-bindings/output.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap e0180c76a41bdd7a8eae","import aDefault from \"./src/mod1\";\nimport { aNamed } from \"./src/mod2\";\nimport { original as anAliased } from \"./src/mod3\";\nimport * as aNamespace from \"./src/mod4\";\n\nimport aDefault2 from \"./src/mod5\";\nimport { aNamed2 } from \"./src/mod6\";\nimport { original as anAliased2 } from \"./src/mod7\";\nimport * as aNamespace2 from \"./src/mod8\";\n\nimport aDefault3 from \"./src/mod9\";\nimport { aNamed3 } from \"./src/mod10\";\nimport { original as anAliased3 } from \"./src/mod11\";\nimport * as aNamespace3 from \"./src/mod12\";\n\nimport optimizedOut from \"./src/optimized-out\";\noptimizedOut();\n\nexport default function root() {\n console.log(\"pause here\", root);\n\n console.log(aDefault);\n console.log(anAliased);\n console.log(aNamed);\n console.log(anAliased);\n console.log(aNamespace);\n\n try {\n // None of these are callable in this code, but we still want to make sure\n // they map properly even if the only reference is in a call expressions.\n console.log(aDefault2());\n console.log(anAliased2());\n console.log(aNamed2());\n console.log(anAliased2());\n console.log(aNamespace2());\n\n console.log(new aDefault3());\n console.log(new anAliased3());\n console.log(new aNamed3());\n console.log(new anAliased3());\n console.log(new aNamespace3());\n } catch (e) {}\n}\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/imported-bindings/input.js","export default \"a-default\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/imported-bindings/src/mod1.js","export const aNamed = \"a-named\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/imported-bindings/src/mod2.js","export const original = \"an-original\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/imported-bindings/src/mod3.js","export default \"a-default\";\nexport const aNamed = \"a-named\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/imported-bindings/src/mod4.js","export default \"a-default2\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/imported-bindings/src/mod5.js","export const aNamed2 = \"a-named2\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/imported-bindings/src/mod6.js","export const original = \"an-original2\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/imported-bindings/src/mod7.js","export default \"a-default2\";\nexport const aNamed = \"a-named2\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/imported-bindings/src/mod8.js","export default \"a-default3\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/imported-bindings/src/mod9.js","export const aNamed3 = \"a-named3\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/imported-bindings/src/mod10.js","export const original = \"an-original3\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/imported-bindings/src/mod11.js","export default \"a-default3\";\nexport const aNamed = \"a-named3\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/imported-bindings/src/mod12.js","export default function optimizedOut() {}\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/imported-bindings/src/optimized-out.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap 10c0c41335992ab33745","webpack:///./fixtures/imported-bindings/input.js","webpack:///./fixtures/imported-bindings/src/mod1.js","webpack:///./fixtures/imported-bindings/src/mod2.js","webpack:///./fixtures/imported-bindings/src/mod3.js","webpack:///./fixtures/imported-bindings/src/mod4.js","webpack:///./fixtures/imported-bindings/src/mod5.js","webpack:///./fixtures/imported-bindings/src/mod6.js","webpack:///./fixtures/imported-bindings/src/mod7.js","webpack:///./fixtures/imported-bindings/src/mod8.js","webpack:///./fixtures/imported-bindings/src/mod9.js","webpack:///./fixtures/imported-bindings/src/mod10.js","webpack:///./fixtures/imported-bindings/src/mod11.js","webpack:///./fixtures/imported-bindings/src/mod12.js","webpack:///./fixtures/imported-bindings/src/optimized-out.js"],"names":["root","example","aNamespace","aNamespace2","aNamespace3","console","log","e","Promise","resolve","then","window","importedBindings","aNamed","original","aNamed2","aNamed3","optimizedOut"],"mappings":";;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;;;;;;kBC3CwBA,I;QA0BRC,O,GAAAA,O;;AA5ChB;;;;AACA;;AACA;;AACA;;IAAYC,U;;AAEZ;;;;AACA;;AACA;;AACA;;IAAYC,W;;AAEZ;;;;AACA;;AACA;;AACA;;IAAYC,W;;AAEZ;;;;;;;;AACA;;AAEe,SAASJ,IAAT,GAAgB;AAC7BK,UAAQC,GAAR,CAAY,YAAZ,EAA0BN,IAA1B;;AAEAK,UAAQC,GAAR;AACAD,UAAQC,GAAR;AACAD,UAAQC,GAAR;AACAD,UAAQC,GAAR;AACAD,UAAQC,GAAR,CAAYJ,UAAZ;;AAEA,MAAI;AACF;AACA;AACAG,YAAQC,GAAR,CAAY,oBAAZ;AACAD,YAAQC,GAAR,CAAY,qBAAZ;AACAD,YAAQC,GAAR,CAAY,oBAAZ;AACAD,YAAQC,GAAR,CAAY,qBAAZ;AACAD,YAAQC,GAAR,CAAYH,aAAZ;;AAEAE,YAAQC,GAAR,CAAY,oBAAZ;AACAD,YAAQC,GAAR,CAAY,qBAAZ;AACAD,YAAQC,GAAR,CAAY,oBAAZ;AACAD,YAAQC,GAAR,CAAY,qBAAZ;AACAD,YAAQC,GAAR,CAAY,IAAIF,WAAJ,EAAZ;AACD,GAdD,CAcE,OAAOG,CAAP,EAAU,CAAE;AACf;;AAEM,SAASN,OAAT,GAAkB,CAAE;;AAE3B;AACAO,QAAQC,OAAR,GAAkBC,IAAlB,CAAuB,YAAM;AAC3BC,SAAOC,gBAAP,GAA0BZ,IAA1B;AACD,CAFD,E;;;;;;;;;;;;kBC/Ce,W;;;;;;;;;;;;;ACAR,IAAMa,0BAAS,SAAf,C;;;;;;;;;;;;ACAA,IAAMC,8BAAW,aAAjB,C;;;;;;;;;;;;kBCAQ,W;AACR,IAAMD,0BAAS,SAAf,C;;;;;;;;;;;;kBCDQ,Y;;;;;;;;;;;;;ACAR,IAAME,4BAAU,UAAhB,C;;;;;;;;;;;;ACAA,IAAMD,8BAAW,cAAjB,C;;;;;;;;;;;;kBCAQ,Y;AACR,IAAMD,0BAAS,UAAf,C;;;;;;;;;;;;kBCDQ,Y;;;;;;;;;;;;;ACAR,IAAMG,4BAAU,UAAhB,C;;;;;;;;;;;;ACAA,IAAMF,8BAAW,cAAjB,C;;;;;;;;;;;;kBCAQ,Y;AACR,IAAMD,0BAAS,UAAf,C;;;;;;;;;;;;kBCDiBI,Y;AAAT,SAASA,YAAT,GAAwB,CAAE","file":"fixtures/imported-bindings/output.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 10c0c41335992ab33745","import aDefault from \"./src/mod1\";\nimport { aNamed } from \"./src/mod2\";\nimport { original as anAliased } from \"./src/mod3\";\nimport * as aNamespace from \"./src/mod4\";\n\nimport aDefault2 from \"./src/mod5\";\nimport { aNamed2 } from \"./src/mod6\";\nimport { original as anAliased2 } from \"./src/mod7\";\nimport * as aNamespace2 from \"./src/mod8\";\n\nimport aDefault3 from \"./src/mod9\";\nimport { aNamed3 } from \"./src/mod10\";\nimport { original as anAliased3 } from \"./src/mod11\";\nimport * as aNamespace3 from \"./src/mod12\";\n\nimport optimizedOut from \"./src/optimized-out\";\noptimizedOut();\n\nexport default function root() {\n console.log(\"pause here\", root);\n\n console.log(aDefault);\n console.log(anAliased);\n console.log(aNamed);\n console.log(anAliased);\n console.log(aNamespace);\n\n try {\n // None of these are callable in this code, but we still want to make sure\n // they map properly even if the only reference is in a call expressions.\n console.log(aDefault2());\n console.log(anAliased2());\n console.log(aNamed2());\n console.log(anAliased2());\n console.log(aNamespace2());\n\n console.log(new aDefault3());\n console.log(new anAliased3());\n console.log(new aNamed3());\n console.log(new anAliased3());\n console.log(new aNamespace3());\n } catch (e) {}\n}\n\nexport function example(){}\n\n// The build harness sets the wrong global, so just override it.\nPromise.resolve().then(() => {\n window.importedBindings = root;\n});\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/imported-bindings/input.js","export default \"a-default\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/imported-bindings/src/mod1.js","export const aNamed = \"a-named\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/imported-bindings/src/mod2.js","export const original = \"an-original\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/imported-bindings/src/mod3.js","export default \"a-default\";\nexport const aNamed = \"a-named\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/imported-bindings/src/mod4.js","export default \"a-default2\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/imported-bindings/src/mod5.js","export const aNamed2 = \"a-named2\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/imported-bindings/src/mod6.js","export const original = \"an-original2\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/imported-bindings/src/mod7.js","export default \"a-default2\";\nexport const aNamed = \"a-named2\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/imported-bindings/src/mod8.js","export default \"a-default3\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/imported-bindings/src/mod9.js","export const aNamed3 = \"a-named3\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/imported-bindings/src/mod10.js","export const original = \"an-original3\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/imported-bindings/src/mod11.js","export default \"a-default3\";\nexport const aNamed = \"a-named3\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/imported-bindings/src/mod12.js","export default function optimizedOut() {}\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/imported-bindings/src/optimized-out.js"],"sourceRoot":""} \ No newline at end of file
--- a/devtools/client/debugger/new/test/mochitest/examples/babel/fixtures/webpack-modules-es6/input.js +++ b/devtools/client/debugger/new/test/mochitest/examples/babel/fixtures/webpack-modules-es6/input.js @@ -37,12 +37,14 @@ export default function root() { console.log(new aDefault3()); console.log(new anAliased3()); console.log(new aNamed3()); console.log(new anAliased3()); console.log(new aNamespace3()); } catch (e) {} } +export function example(){} + // The build harness sets the wrong global, so just override it. Promise.resolve().then(() => { window.webpackModulesEs6 = root; });
--- a/devtools/client/debugger/new/test/mochitest/examples/babel/fixtures/webpack-modules-es6/output.js +++ b/devtools/client/debugger/new/test/mochitest/examples/babel/fixtures/webpack-modules-es6/output.js @@ -66,16 +66,17 @@ var webpackModulesEs6 = /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony export (immutable) */ __webpack_exports__["default"] = root; +/* harmony export (immutable) */ __webpack_exports__["example"] = example; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_mod1__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__src_mod2__ = __webpack_require__(2); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__src_mod3__ = __webpack_require__(3); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__src_mod4__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__src_mod5__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__src_mod6__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__src_mod7__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__src_mod8__ = __webpack_require__(8); @@ -123,16 +124,18 @@ function root() { console.log(new __WEBPACK_IMPORTED_MODULE_8__src_mod9__["a" /* default */]()); console.log(new __WEBPACK_IMPORTED_MODULE_10__src_mod11__["a" /* original */]()); console.log(new __WEBPACK_IMPORTED_MODULE_9__src_mod10__["a" /* aNamed3 */]()); console.log(new __WEBPACK_IMPORTED_MODULE_10__src_mod11__["a" /* original */]()); console.log(new __WEBPACK_IMPORTED_MODULE_11__src_mod12__()); } catch (e) {} } +function example() {} + // The build harness sets the wrong global, so just override it. Promise.resolve().then(() => { window.webpackModulesEs6 = root; }); /***/ }), /* 1 */ /***/ (function(module, __webpack_exports__, __webpack_require__) {
--- a/devtools/client/debugger/new/test/mochitest/examples/babel/fixtures/webpack-modules-es6/output.js.map +++ b/devtools/client/debugger/new/test/mochitest/examples/babel/fixtures/webpack-modules-es6/output.js.map @@ -1,1 +1,1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap 40e34282a100f811763e","webpack:///./fixtures/webpack-modules-es6/input.js","webpack:///./fixtures/webpack-modules-es6/src/mod1.js","webpack:///./fixtures/webpack-modules-es6/src/mod2.js","webpack:///./fixtures/webpack-modules-es6/src/mod3.js","webpack:///./fixtures/webpack-modules-es6/src/mod4.js","webpack:///./fixtures/webpack-modules-es6/src/mod5.js","webpack:///./fixtures/webpack-modules-es6/src/mod6.js","webpack:///./fixtures/webpack-modules-es6/src/mod7.js","webpack:///./fixtures/webpack-modules-es6/src/mod8.js","webpack:///./fixtures/webpack-modules-es6/src/mod9.js","webpack:///./fixtures/webpack-modules-es6/src/mod10.js","webpack:///./fixtures/webpack-modules-es6/src/mod11.js","webpack:///./fixtures/webpack-modules-es6/src/mod12.js","webpack:///./fixtures/webpack-modules-es6/src/optimized-out.js"],"names":["optimizedOut","root","console","log","aDefault2","anAliased2","aNamed2","aNamespace2","e","Promise","resolve","then","window","webpackModulesEs6","aNamed","original","aNamed3"],"mappings":";;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;AC7DA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,4EAAAA;;AAEe,SAASC,IAAT,GAAgB;AAC7BC,UAAQC,GAAR,CAAY,YAAZ,EAA0BF,IAA1B;;AAEAC,UAAQC,GAAR,CAAY,0DAAZ;AACAD,UAAQC,GAAR,CAAY,2DAAZ;AACAD,UAAQC,GAAR,CAAY,yDAAZ;AACAD,UAAQC,GAAR,CAAY,2DAAZ;AACAD,UAAQC,GAAR,CAAY,uCAAZ;;AAEA,MAAI;AACF;AACA;AACAD,YAAQC,GAAR,CAAY,kEAAAC,EAAZ;AACAF,YAAQC,GAAR,CAAY,mEAAAE,EAAZ;AACAH,YAAQC,GAAR,CAAY,kEAAAG,EAAZ;AACAJ,YAAQC,GAAR,CAAY,mEAAAE,EAAZ;AACAH,YAAQC,GAAR,CAAY,uCAAAI,EAAZ;;AAEAL,YAAQC,GAAR,CAAY,IAAI,0DAAJ,EAAZ;AACAD,YAAQC,GAAR,CAAY,IAAI,6DAAJ,EAAZ;AACAD,YAAQC,GAAR,CAAY,IAAI,2DAAJ,EAAZ;AACAD,YAAQC,GAAR,CAAY,IAAI,6DAAJ,EAAZ;AACAD,YAAQC,GAAR,CAAY,IAAI,yCAAJ,EAAZ;AACD,GAdD,CAcE,OAAOK,CAAP,EAAU,CAAE;AACf;;AAED;AACAC,QAAQC,OAAR,GAAkBC,IAAlB,CAAuB,MAAM;AAC3BC,SAAOC,iBAAP,GAA2BZ,IAA3B;AACD,CAFD,E;;;;;;;AC7CA,yDAAe,WAAf,E;;;;;;;ACAO,MAAMa,SAAS,SAAf,C;;;;;;;;;ACAA,MAAMC,WAAW,aAAjB,C;;;;;;;;;;ACAP,+DAAe,WAAf;AACO,MAAMD,SAAS,SAAf,C;;;;;;;;;ACDP,yDAAe,YAAf,E;;;;;;;ACAO,MAAMR,UAAU,UAAhB,C;;;;;;;;;ACAA,MAAMS,WAAW,cAAjB,C;;;;;;;;;;ACAP,+DAAe,YAAf;AACO,MAAMD,SAAS,UAAf,C;;;;;;;;;ACDP,yDAAe,YAAf,E;;;;;;;ACAO,MAAME,UAAU,UAAhB,C;;;;;;;;;ACAA,MAAMD,WAAW,cAAjB,C;;;;;;;;;;ACAP,+DAAe,YAAf;AACO,MAAMD,SAAS,UAAf,C;;;;;;;;;;ACDQ,SAASd,YAAT,GAAwB,CAAE,C","file":"fixtures/webpack-modules-es6/output.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 40e34282a100f811763e","import aDefault from \"./src/mod1\";\nimport { aNamed } from \"./src/mod2\";\nimport { original as anAliased } from \"./src/mod3\";\nimport * as aNamespace from \"./src/mod4\";\n\nimport aDefault2 from \"./src/mod5\";\nimport { aNamed2 } from \"./src/mod6\";\nimport { original as anAliased2 } from \"./src/mod7\";\nimport * as aNamespace2 from \"./src/mod8\";\n\nimport aDefault3 from \"./src/mod9\";\nimport { aNamed3 } from \"./src/mod10\";\nimport { original as anAliased3 } from \"./src/mod11\";\nimport * as aNamespace3 from \"./src/mod12\";\n\nimport optimizedOut from \"./src/optimized-out\";\noptimizedOut();\n\nexport default function root() {\n console.log(\"pause here\", root);\n\n console.log(aDefault);\n console.log(anAliased);\n console.log(aNamed);\n console.log(anAliased);\n console.log(aNamespace);\n\n try {\n // None of these are callable in this code, but we still want to make sure\n // they map properly even if the only reference is in a call expressions.\n console.log(aDefault2());\n console.log(anAliased2());\n console.log(aNamed2());\n console.log(anAliased2());\n console.log(aNamespace2());\n\n console.log(new aDefault3());\n console.log(new anAliased3());\n console.log(new aNamed3());\n console.log(new anAliased3());\n console.log(new aNamespace3());\n } catch (e) {}\n}\n\n// The build harness sets the wrong global, so just override it.\nPromise.resolve().then(() => {\n window.webpackModulesEs6 = root;\n});\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules-es6/input.js","export default \"a-default\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules-es6/src/mod1.js","export const aNamed = \"a-named\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules-es6/src/mod2.js","export const original = \"an-original\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules-es6/src/mod3.js","export default \"a-default\";\nexport const aNamed = \"a-named\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules-es6/src/mod4.js","export default \"a-default2\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules-es6/src/mod5.js","export const aNamed2 = \"a-named2\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules-es6/src/mod6.js","export const original = \"an-original2\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules-es6/src/mod7.js","export default \"a-default2\";\nexport const aNamed = \"a-named2\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules-es6/src/mod8.js","export default \"a-default3\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules-es6/src/mod9.js","export const aNamed3 = \"a-named3\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules-es6/src/mod10.js","export const original = \"an-original3\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules-es6/src/mod11.js","export default \"a-default3\";\nexport const aNamed = \"a-named3\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules-es6/src/mod12.js","export default function optimizedOut() {}\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules-es6/src/optimized-out.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap ce5a3febd2184465bc3b","webpack:///./fixtures/webpack-modules-es6/input.js","webpack:///./fixtures/webpack-modules-es6/src/mod1.js","webpack:///./fixtures/webpack-modules-es6/src/mod2.js","webpack:///./fixtures/webpack-modules-es6/src/mod3.js","webpack:///./fixtures/webpack-modules-es6/src/mod4.js","webpack:///./fixtures/webpack-modules-es6/src/mod5.js","webpack:///./fixtures/webpack-modules-es6/src/mod6.js","webpack:///./fixtures/webpack-modules-es6/src/mod7.js","webpack:///./fixtures/webpack-modules-es6/src/mod8.js","webpack:///./fixtures/webpack-modules-es6/src/mod9.js","webpack:///./fixtures/webpack-modules-es6/src/mod10.js","webpack:///./fixtures/webpack-modules-es6/src/mod11.js","webpack:///./fixtures/webpack-modules-es6/src/mod12.js","webpack:///./fixtures/webpack-modules-es6/src/optimized-out.js"],"names":["optimizedOut","root","console","log","aDefault2","anAliased2","aNamed2","aNamespace2","e","example","Promise","resolve","then","window","webpackModulesEs6","aNamed","original","aNamed3"],"mappings":";;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;;AC7DA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,4EAAAA;;AAEe,SAASC,IAAT,GAAgB;AAC7BC,UAAQC,GAAR,CAAY,YAAZ,EAA0BF,IAA1B;;AAEAC,UAAQC,GAAR,CAAY,0DAAZ;AACAD,UAAQC,GAAR,CAAY,2DAAZ;AACAD,UAAQC,GAAR,CAAY,yDAAZ;AACAD,UAAQC,GAAR,CAAY,2DAAZ;AACAD,UAAQC,GAAR,CAAY,uCAAZ;;AAEA,MAAI;AACF;AACA;AACAD,YAAQC,GAAR,CAAY,kEAAAC,EAAZ;AACAF,YAAQC,GAAR,CAAY,mEAAAE,EAAZ;AACAH,YAAQC,GAAR,CAAY,kEAAAG,EAAZ;AACAJ,YAAQC,GAAR,CAAY,mEAAAE,EAAZ;AACAH,YAAQC,GAAR,CAAY,uCAAAI,EAAZ;;AAEAL,YAAQC,GAAR,CAAY,IAAI,0DAAJ,EAAZ;AACAD,YAAQC,GAAR,CAAY,IAAI,6DAAJ,EAAZ;AACAD,YAAQC,GAAR,CAAY,IAAI,2DAAJ,EAAZ;AACAD,YAAQC,GAAR,CAAY,IAAI,6DAAJ,EAAZ;AACAD,YAAQC,GAAR,CAAY,IAAI,yCAAJ,EAAZ;AACD,GAdD,CAcE,OAAOK,CAAP,EAAU,CAAE;AACf;;AAEM,SAASC,OAAT,GAAkB,CAAE;;AAE3B;AACAC,QAAQC,OAAR,GAAkBC,IAAlB,CAAuB,MAAM;AAC3BC,SAAOC,iBAAP,GAA2Bb,IAA3B;AACD,CAFD,E;;;;;;;AC/CA,yDAAe,WAAf,E;;;;;;;ACAO,MAAMc,SAAS,SAAf,C;;;;;;;;;ACAA,MAAMC,WAAW,aAAjB,C;;;;;;;;;;ACAP,+DAAe,WAAf;AACO,MAAMD,SAAS,SAAf,C;;;;;;;;;ACDP,yDAAe,YAAf,E;;;;;;;ACAO,MAAMT,UAAU,UAAhB,C;;;;;;;;;ACAA,MAAMU,WAAW,cAAjB,C;;;;;;;;;;ACAP,+DAAe,YAAf;AACO,MAAMD,SAAS,UAAf,C;;;;;;;;;ACDP,yDAAe,YAAf,E;;;;;;;ACAO,MAAME,UAAU,UAAhB,C;;;;;;;;;ACAA,MAAMD,WAAW,cAAjB,C;;;;;;;;;;ACAP,+DAAe,YAAf;AACO,MAAMD,SAAS,UAAf,C;;;;;;;;;;ACDQ,SAASf,YAAT,GAAwB,CAAE,C","file":"fixtures/webpack-modules-es6/output.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap ce5a3febd2184465bc3b","import aDefault from \"./src/mod1\";\nimport { aNamed } from \"./src/mod2\";\nimport { original as anAliased } from \"./src/mod3\";\nimport * as aNamespace from \"./src/mod4\";\n\nimport aDefault2 from \"./src/mod5\";\nimport { aNamed2 } from \"./src/mod6\";\nimport { original as anAliased2 } from \"./src/mod7\";\nimport * as aNamespace2 from \"./src/mod8\";\n\nimport aDefault3 from \"./src/mod9\";\nimport { aNamed3 } from \"./src/mod10\";\nimport { original as anAliased3 } from \"./src/mod11\";\nimport * as aNamespace3 from \"./src/mod12\";\n\nimport optimizedOut from \"./src/optimized-out\";\noptimizedOut();\n\nexport default function root() {\n console.log(\"pause here\", root);\n\n console.log(aDefault);\n console.log(anAliased);\n console.log(aNamed);\n console.log(anAliased);\n console.log(aNamespace);\n\n try {\n // None of these are callable in this code, but we still want to make sure\n // they map properly even if the only reference is in a call expressions.\n console.log(aDefault2());\n console.log(anAliased2());\n console.log(aNamed2());\n console.log(anAliased2());\n console.log(aNamespace2());\n\n console.log(new aDefault3());\n console.log(new anAliased3());\n console.log(new aNamed3());\n console.log(new anAliased3());\n console.log(new aNamespace3());\n } catch (e) {}\n}\n\nexport function example(){}\n\n// The build harness sets the wrong global, so just override it.\nPromise.resolve().then(() => {\n window.webpackModulesEs6 = root;\n});\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules-es6/input.js","export default \"a-default\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules-es6/src/mod1.js","export const aNamed = \"a-named\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules-es6/src/mod2.js","export const original = \"an-original\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules-es6/src/mod3.js","export default \"a-default\";\nexport const aNamed = \"a-named\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules-es6/src/mod4.js","export default \"a-default2\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules-es6/src/mod5.js","export const aNamed2 = \"a-named2\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules-es6/src/mod6.js","export const original = \"an-original2\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules-es6/src/mod7.js","export default \"a-default2\";\nexport const aNamed = \"a-named2\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules-es6/src/mod8.js","export default \"a-default3\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules-es6/src/mod9.js","export const aNamed3 = \"a-named3\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules-es6/src/mod10.js","export const original = \"an-original3\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules-es6/src/mod11.js","export default \"a-default3\";\nexport const aNamed = \"a-named3\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules-es6/src/mod12.js","export default function optimizedOut() {}\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules-es6/src/optimized-out.js"],"sourceRoot":""} \ No newline at end of file
--- a/devtools/client/debugger/new/test/mochitest/examples/babel/fixtures/webpack-modules/input.js +++ b/devtools/client/debugger/new/test/mochitest/examples/babel/fixtures/webpack-modules/input.js @@ -37,12 +37,14 @@ export default function root() { console.log(new aDefault3()); console.log(new anAliased3()); console.log(new aNamed3()); console.log(new anAliased3()); console.log(new aNamespace3()); } catch (e) {} } +export function example(){} + // The build harness sets the wrong global, so just override it. Promise.resolve().then(() => { window.webpackModules = root; });
--- a/devtools/client/debugger/new/test/mochitest/examples/babel/fixtures/webpack-modules/output.js +++ b/devtools/client/debugger/new/test/mochitest/examples/babel/fixtures/webpack-modules/output.js @@ -66,16 +66,17 @@ var webpackModules = /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony export (immutable) */ __webpack_exports__["default"] = root; +/* harmony export (immutable) */ __webpack_exports__["example"] = example; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_mod1__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__src_mod2__ = __webpack_require__(2); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__src_mod3__ = __webpack_require__(3); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__src_mod4__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__src_mod5__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__src_mod6__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__src_mod7__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__src_mod8__ = __webpack_require__(8); @@ -123,16 +124,18 @@ function root() { console.log(new __WEBPACK_IMPORTED_MODULE_8__src_mod9__["a" /* default */]()); console.log(new __WEBPACK_IMPORTED_MODULE_10__src_mod11__["a" /* original */]()); console.log(new __WEBPACK_IMPORTED_MODULE_9__src_mod10__["a" /* aNamed3 */]()); console.log(new __WEBPACK_IMPORTED_MODULE_10__src_mod11__["a" /* original */]()); console.log(new __WEBPACK_IMPORTED_MODULE_11__src_mod12__()); } catch (e) {} } +function example() {} + // The build harness sets the wrong global, so just override it. Promise.resolve().then(function () { window.webpackModules = root; }); /***/ }), /* 1 */ /***/ (function(module, __webpack_exports__, __webpack_require__) {
--- a/devtools/client/debugger/new/test/mochitest/examples/babel/fixtures/webpack-modules/output.js.map +++ b/devtools/client/debugger/new/test/mochitest/examples/babel/fixtures/webpack-modules/output.js.map @@ -1,1 +1,1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap 597c2efe7e8569674750","webpack:///./fixtures/webpack-modules/input.js","webpack:///./fixtures/webpack-modules/src/mod1.js","webpack:///./fixtures/webpack-modules/src/mod2.js","webpack:///./fixtures/webpack-modules/src/mod3.js","webpack:///./fixtures/webpack-modules/src/mod4.js","webpack:///./fixtures/webpack-modules/src/mod5.js","webpack:///./fixtures/webpack-modules/src/mod6.js","webpack:///./fixtures/webpack-modules/src/mod7.js","webpack:///./fixtures/webpack-modules/src/mod8.js","webpack:///./fixtures/webpack-modules/src/mod9.js","webpack:///./fixtures/webpack-modules/src/mod10.js","webpack:///./fixtures/webpack-modules/src/mod11.js","webpack:///./fixtures/webpack-modules/src/mod12.js","webpack:///./fixtures/webpack-modules/src/optimized-out.js"],"names":["optimizedOut","root","console","log","aDefault2","anAliased2","aNamed2","aNamespace2","e","Promise","resolve","then","window","webpackModules","aNamed","original","aNamed3"],"mappings":";;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;AC7DA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,4EAAAA;;AAEe,SAASC,IAAT,GAAgB;AAC7BC,UAAQC,GAAR,CAAY,YAAZ,EAA0BF,IAA1B;;AAEAC,UAAQC,GAAR,CAAY,0DAAZ;AACAD,UAAQC,GAAR,CAAY,2DAAZ;AACAD,UAAQC,GAAR,CAAY,yDAAZ;AACAD,UAAQC,GAAR,CAAY,2DAAZ;AACAD,UAAQC,GAAR,CAAY,uCAAZ;;AAEA,MAAI;AACF;AACA;AACAD,YAAQC,GAAR,CAAY,kEAAAC,EAAZ;AACAF,YAAQC,GAAR,CAAY,mEAAAE,EAAZ;AACAH,YAAQC,GAAR,CAAY,kEAAAG,EAAZ;AACAJ,YAAQC,GAAR,CAAY,mEAAAE,EAAZ;AACAH,YAAQC,GAAR,CAAY,uCAAAI,EAAZ;;AAEAL,YAAQC,GAAR,CAAY,IAAI,0DAAJ,EAAZ;AACAD,YAAQC,GAAR,CAAY,IAAI,6DAAJ,EAAZ;AACAD,YAAQC,GAAR,CAAY,IAAI,2DAAJ,EAAZ;AACAD,YAAQC,GAAR,CAAY,IAAI,6DAAJ,EAAZ;AACAD,YAAQC,GAAR,CAAY,IAAI,yCAAJ,EAAZ;AACD,GAdD,CAcE,OAAOK,CAAP,EAAU,CAAE;AACf;;AAED;AACAC,QAAQC,OAAR,GAAkBC,IAAlB,CAAuB,YAAM;AAC3BC,SAAOC,cAAP,GAAwBZ,IAAxB;AACD,CAFD,E;;;;;;;AC7CA,yDAAe,WAAf,E;;;;;;;;ACAO,IAAMa,SAAS,SAAf,C;;;;;;;;ACAA,IAAMC,WAAW,aAAjB,C;;;;;;;;;ACAP,+DAAe,WAAf;AACO,IAAMD,SAAS,SAAf,C;;;;;;;ACDP,yDAAe,YAAf,E;;;;;;;;ACAO,IAAMR,UAAU,UAAhB,C;;;;;;;;ACAA,IAAMS,WAAW,cAAjB,C;;;;;;;;;ACAP,+DAAe,YAAf;AACO,IAAMD,SAAS,UAAf,C;;;;;;;ACDP,yDAAe,YAAf,E;;;;;;;;ACAO,IAAME,UAAU,UAAhB,C;;;;;;;;ACAA,IAAMD,WAAW,cAAjB,C;;;;;;;;;ACAP,+DAAe,YAAf;AACO,IAAMD,SAAS,UAAf,C;;;;;;;;ACDQ,SAASd,YAAT,GAAwB,CAAE,C","file":"fixtures/webpack-modules/output.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 597c2efe7e8569674750","import aDefault from \"./src/mod1\";\nimport { aNamed } from \"./src/mod2\";\nimport { original as anAliased } from \"./src/mod3\";\nimport * as aNamespace from \"./src/mod4\";\n\nimport aDefault2 from \"./src/mod5\";\nimport { aNamed2 } from \"./src/mod6\";\nimport { original as anAliased2 } from \"./src/mod7\";\nimport * as aNamespace2 from \"./src/mod8\";\n\nimport aDefault3 from \"./src/mod9\";\nimport { aNamed3 } from \"./src/mod10\";\nimport { original as anAliased3 } from \"./src/mod11\";\nimport * as aNamespace3 from \"./src/mod12\";\n\nimport optimizedOut from \"./src/optimized-out\";\noptimizedOut();\n\nexport default function root() {\n console.log(\"pause here\", root);\n\n console.log(aDefault);\n console.log(anAliased);\n console.log(aNamed);\n console.log(anAliased);\n console.log(aNamespace);\n\n try {\n // None of these are callable in this code, but we still want to make sure\n // they map properly even if the only reference is in a call expressions.\n console.log(aDefault2());\n console.log(anAliased2());\n console.log(aNamed2());\n console.log(anAliased2());\n console.log(aNamespace2());\n\n console.log(new aDefault3());\n console.log(new anAliased3());\n console.log(new aNamed3());\n console.log(new anAliased3());\n console.log(new aNamespace3());\n } catch (e) {}\n}\n\n// The build harness sets the wrong global, so just override it.\nPromise.resolve().then(() => {\n window.webpackModules = root;\n});\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules/input.js","export default \"a-default\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules/src/mod1.js","export const aNamed = \"a-named\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules/src/mod2.js","export const original = \"an-original\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules/src/mod3.js","export default \"a-default\";\nexport const aNamed = \"a-named\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules/src/mod4.js","export default \"a-default2\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules/src/mod5.js","export const aNamed2 = \"a-named2\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules/src/mod6.js","export const original = \"an-original2\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules/src/mod7.js","export default \"a-default2\";\nexport const aNamed = \"a-named2\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules/src/mod8.js","export default \"a-default3\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules/src/mod9.js","export const aNamed3 = \"a-named3\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules/src/mod10.js","export const original = \"an-original3\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules/src/mod11.js","export default \"a-default3\";\nexport const aNamed = \"a-named3\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules/src/mod12.js","export default function optimizedOut() {}\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules/src/optimized-out.js"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap bc0f05c10dc0e0831af0","webpack:///./fixtures/webpack-modules/input.js","webpack:///./fixtures/webpack-modules/src/mod1.js","webpack:///./fixtures/webpack-modules/src/mod2.js","webpack:///./fixtures/webpack-modules/src/mod3.js","webpack:///./fixtures/webpack-modules/src/mod4.js","webpack:///./fixtures/webpack-modules/src/mod5.js","webpack:///./fixtures/webpack-modules/src/mod6.js","webpack:///./fixtures/webpack-modules/src/mod7.js","webpack:///./fixtures/webpack-modules/src/mod8.js","webpack:///./fixtures/webpack-modules/src/mod9.js","webpack:///./fixtures/webpack-modules/src/mod10.js","webpack:///./fixtures/webpack-modules/src/mod11.js","webpack:///./fixtures/webpack-modules/src/mod12.js","webpack:///./fixtures/webpack-modules/src/optimized-out.js"],"names":["optimizedOut","root","console","log","aDefault2","anAliased2","aNamed2","aNamespace2","e","example","Promise","resolve","then","window","webpackModules","aNamed","original","aNamed3"],"mappings":";;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;;AC7DA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,4EAAAA;;AAEe,SAASC,IAAT,GAAgB;AAC7BC,UAAQC,GAAR,CAAY,YAAZ,EAA0BF,IAA1B;;AAEAC,UAAQC,GAAR,CAAY,0DAAZ;AACAD,UAAQC,GAAR,CAAY,2DAAZ;AACAD,UAAQC,GAAR,CAAY,yDAAZ;AACAD,UAAQC,GAAR,CAAY,2DAAZ;AACAD,UAAQC,GAAR,CAAY,uCAAZ;;AAEA,MAAI;AACF;AACA;AACAD,YAAQC,GAAR,CAAY,kEAAAC,EAAZ;AACAF,YAAQC,GAAR,CAAY,mEAAAE,EAAZ;AACAH,YAAQC,GAAR,CAAY,kEAAAG,EAAZ;AACAJ,YAAQC,GAAR,CAAY,mEAAAE,EAAZ;AACAH,YAAQC,GAAR,CAAY,uCAAAI,EAAZ;;AAEAL,YAAQC,GAAR,CAAY,IAAI,0DAAJ,EAAZ;AACAD,YAAQC,GAAR,CAAY,IAAI,6DAAJ,EAAZ;AACAD,YAAQC,GAAR,CAAY,IAAI,2DAAJ,EAAZ;AACAD,YAAQC,GAAR,CAAY,IAAI,6DAAJ,EAAZ;AACAD,YAAQC,GAAR,CAAY,IAAI,yCAAJ,EAAZ;AACD,GAdD,CAcE,OAAOK,CAAP,EAAU,CAAE;AACf;;AAEM,SAASC,OAAT,GAAkB,CAAE;;AAE3B;AACAC,QAAQC,OAAR,GAAkBC,IAAlB,CAAuB,YAAM;AAC3BC,SAAOC,cAAP,GAAwBb,IAAxB;AACD,CAFD,E;;;;;;;AC/CA,yDAAe,WAAf,E;;;;;;;;ACAO,IAAMc,SAAS,SAAf,C;;;;;;;;ACAA,IAAMC,WAAW,aAAjB,C;;;;;;;;;ACAP,+DAAe,WAAf;AACO,IAAMD,SAAS,SAAf,C;;;;;;;ACDP,yDAAe,YAAf,E;;;;;;;;ACAO,IAAMT,UAAU,UAAhB,C;;;;;;;;ACAA,IAAMU,WAAW,cAAjB,C;;;;;;;;;ACAP,+DAAe,YAAf;AACO,IAAMD,SAAS,UAAf,C;;;;;;;ACDP,yDAAe,YAAf,E;;;;;;;;ACAO,IAAME,UAAU,UAAhB,C;;;;;;;;ACAA,IAAMD,WAAW,cAAjB,C;;;;;;;;;ACAP,+DAAe,YAAf;AACO,IAAMD,SAAS,UAAf,C;;;;;;;;ACDQ,SAASf,YAAT,GAAwB,CAAE,C","file":"fixtures/webpack-modules/output.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap bc0f05c10dc0e0831af0","import aDefault from \"./src/mod1\";\nimport { aNamed } from \"./src/mod2\";\nimport { original as anAliased } from \"./src/mod3\";\nimport * as aNamespace from \"./src/mod4\";\n\nimport aDefault2 from \"./src/mod5\";\nimport { aNamed2 } from \"./src/mod6\";\nimport { original as anAliased2 } from \"./src/mod7\";\nimport * as aNamespace2 from \"./src/mod8\";\n\nimport aDefault3 from \"./src/mod9\";\nimport { aNamed3 } from \"./src/mod10\";\nimport { original as anAliased3 } from \"./src/mod11\";\nimport * as aNamespace3 from \"./src/mod12\";\n\nimport optimizedOut from \"./src/optimized-out\";\noptimizedOut();\n\nexport default function root() {\n console.log(\"pause here\", root);\n\n console.log(aDefault);\n console.log(anAliased);\n console.log(aNamed);\n console.log(anAliased);\n console.log(aNamespace);\n\n try {\n // None of these are callable in this code, but we still want to make sure\n // they map properly even if the only reference is in a call expressions.\n console.log(aDefault2());\n console.log(anAliased2());\n console.log(aNamed2());\n console.log(anAliased2());\n console.log(aNamespace2());\n\n console.log(new aDefault3());\n console.log(new anAliased3());\n console.log(new aNamed3());\n console.log(new anAliased3());\n console.log(new aNamespace3());\n } catch (e) {}\n}\n\nexport function example(){}\n\n// The build harness sets the wrong global, so just override it.\nPromise.resolve().then(() => {\n window.webpackModules = root;\n});\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules/input.js","export default \"a-default\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules/src/mod1.js","export const aNamed = \"a-named\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules/src/mod2.js","export const original = \"an-original\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules/src/mod3.js","export default \"a-default\";\nexport const aNamed = \"a-named\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules/src/mod4.js","export default \"a-default2\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules/src/mod5.js","export const aNamed2 = \"a-named2\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules/src/mod6.js","export const original = \"an-original2\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules/src/mod7.js","export default \"a-default2\";\nexport const aNamed = \"a-named2\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules/src/mod8.js","export default \"a-default3\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules/src/mod9.js","export const aNamed3 = \"a-named3\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules/src/mod10.js","export const original = \"an-original3\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules/src/mod11.js","export default \"a-default3\";\nexport const aNamed = \"a-named3\";\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules/src/mod12.js","export default function optimizedOut() {}\n\n\n\n// WEBPACK FOOTER //\n// ./fixtures/webpack-modules/src/optimized-out.js"],"sourceRoot":""} \ No newline at end of file
--- a/devtools/client/debugger/new/test/mochitest/examples/babel/webpack.config.js +++ b/devtools/client/debugger/new/test/mochitest/examples/babel/webpack.config.js @@ -1,24 +1,26 @@ const fs = require("fs"); const path = require("path"); const _ = require("lodash"); const fixtures = path.join(__dirname, "fixtures"); const tests = fs.readdirSync(fixtures).map(name => { + if (name[0] === ".") return; + const dirname = path.relative(__dirname, path.join(fixtures, name)); return { name: _.camelCase(name), dirname, input: `./${path.join(dirname, "input.js")}`, output: path.join(dirname, "output.js") }; -}); +}).filter(Boolean); const html = path.join(__dirname, "..", "doc-babel.html"); fs.writeFileSync( html, fs.readFileSync(html, "utf8").replace( /\n\s*<!-- INJECTED-START[\s\S]*INJECTED-END -->\n/, `
--- a/devtools/client/jar.mn +++ b/devtools/client/jar.mn @@ -267,16 +267,17 @@ devtools.jar: # Debugger skin/images/debugger/arrow.svg (themes/images/debugger/arrow.svg) skin/images/debugger/back.svg (themes/images/debugger/back.svg) skin/images/debugger/blackBox.svg (themes/images/debugger/blackBox.svg) skin/images/debugger/breakpoint.svg (themes/images/debugger/breakpoint.svg) skin/images/debugger/close.svg (themes/images/debugger/close.svg) skin/images/debugger/coffeescript.svg (themes/images/debugger/coffeescript.svg) + skin/images/debugger/disable-pausing.svg (themes/images/debugger/disable-pausing.svg) skin/images/debugger/domain.svg (themes/images/debugger/domain.svg) skin/images/debugger/extension.svg (themes/images/debugger/extension.svg) skin/images/debugger/file.svg (themes/images/debugger/file.svg) skin/images/debugger/folder.svg (themes/images/debugger/folder.svg) skin/images/debugger/forward.svg (themes/images/debugger/forward.svg) skin/images/debugger/javascript.svg (themes/images/debugger/javascript.svg) skin/images/debugger/pause.svg (themes/images/debugger/pause.svg) skin/images/debugger/prettyPrint.svg (themes/images/debugger/prettyPrint.svg)
--- a/devtools/client/locales/en-US/debugger.properties +++ b/devtools/client/locales/en-US/debugger.properties @@ -76,16 +76,20 @@ stepOverTooltip=Step over %S # LOCALIZATION NOTE (stepInTooltip): The label that is displayed on the # button that steps into a function call. stepInTooltip=Step in %S # LOCALIZATION NOTE (stepOutTooltip): The label that is displayed on the # button that steps out of a function call. stepOutTooltip=Step out %S +# LOCALIZATION NOTE (skipPausingTooltip): The tooltip text for disabling all +# breakpoints and pausing triggers +skipPausingTooltip=Skip all pausing + # LOCALIZATION NOTE (pauseButtonItem): The label that is displayed for the dropdown pause # list item when the debugger is in a running state. pauseButtonItem=Pause on Next Statement # LOCALIZATION NOTE (ignoreExceptionsItem): The pause on exceptions button description # when the debugger will not pause on exceptions. ignoreExceptionsItem=Ignore exceptions
--- a/devtools/client/preferences/debugger.js +++ b/devtools/client/preferences/debugger.js @@ -39,26 +39,28 @@ pref("devtools.debugger.end-panel-collap pref("devtools.debugger.tabs", "[]"); pref("devtools.debugger.tabsBlackBoxed", "[]"); pref("devtools.debugger.pending-selected-location", "{}"); pref("devtools.debugger.pending-breakpoints", "{}"); pref("devtools.debugger.expressions", "[]"); pref("devtools.debugger.file-search-case-sensitive", false); pref("devtools.debugger.file-search-whole-word", false); pref("devtools.debugger.file-search-regex-match", false); -pref("devtools.debugger.features.async-stepping", true); pref("devtools.debugger.project-directory-root", ""); +pref("devtools.debugger.skip-pausing", false); pref("devtools.debugger.features.wasm", true); pref("devtools.debugger.features.shortcuts", true); pref("devtools.debugger.features.root", true); pref("devtools.debugger.features.column-breakpoints", false); pref("devtools.debugger.features.chrome-scopes", false); pref("devtools.debugger.features.map-scopes", true); pref("devtools.debugger.features.remove-command-bar-options", false); pref("devtools.debugger.features.workers", true); pref("devtools.debugger.features.code-coverage", false); pref("devtools.debugger.features.event-listeners", false); pref("devtools.debugger.features.code-folding", false); pref("devtools.debugger.features.outline", true); pref("devtools.debugger.features.replay", false); pref("devtools.debugger.features.pause-points", true); pref("devtools.debugger.features.component-stack", false); +pref("devtools.debugger.features.async-stepping", true); +pref("devtools.debugger.features.skip-pausing", false);
new file mode 100644 --- /dev/null +++ b/devtools/client/themes/images/debugger/disable-pausing.svg @@ -0,0 +1,1 @@ +<svg height="16" viewBox="0 0 15 16" width="15" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd" transform="translate(0 1)"><path d="m1.5 13.5 10-13" stroke="#000" stroke-linecap="square"/><path d="m7.58013626 3-.75408823 1h-4.82604803c-.53612439 0-.77556634.12770238-.9020017.32999894-.07178403.11485445-.0979983.24068295-.0979983.27000106v4.8c0 .02931811.02621427.15514661.0979983.27000106.12643536.20229656.36587731.32999894.9020017.32999894h.30151865l-.73328118.9724077c-1.56823747-.2118785-1.56823747-1.5724077-1.56823747-1.5724077v-4.8s0-1.6 2-1.6zm3.94638894.52652517 3.4734748 3.47347483-4 4h-5.10913424l.75408823-1h3.94083241l3-3-2.6672362-2.66723627z" fill="#000" fill-rule="nonzero"/></g></svg> \ No newline at end of file
--- a/dom/base/nsFocusManager.cpp +++ b/dom/base/nsFocusManager.cpp @@ -3214,16 +3214,34 @@ nsFocusManager::FindOwner(nsIContent* aC bool nsFocusManager::IsHostOrSlot(nsIContent* aContent) { return aContent->GetShadowRoot() || // shadow host aContent->IsHTMLElement(nsGkAtoms::slot); // slot } +int32_t +nsFocusManager::HostOrSlotTabIndexValue(nsIContent* aContent) +{ + MOZ_ASSERT(IsHostOrSlot(aContent)); + + const nsAttrValue* attrVal = + aContent->AsElement()->GetParsedAttr(nsGkAtoms::tabindex); + if (!attrVal) { + return 0; + } + + if (attrVal->Type() == nsAttrValue::eInteger) { + return attrVal->GetIntegerValue(); + } + + return -1; +} + nsIContent* nsFocusManager::GetNextTabbableContentInScope(nsIContent* aOwner, nsIContent* aStartContent, bool aForward, int32_t aCurrentTabIndex, bool aIgnoreTabIndex, bool aSkipOwner) { @@ -3325,17 +3343,17 @@ nsFocusManager::GetNextTabbableContentIn return contentToFocus; } // If not found in shadow DOM, search from the shadow host in light DOM if (!owner->IsInShadowTree()) { MOZ_ASSERT(owner->GetShadowRoot()); *aStartContent = owner; - owner->IsFocusable(aCurrentTabIndex); + *aCurrentTabIndex = HostOrSlotTabIndexValue(owner); break; } startContent = owner; } return nullptr; } @@ -3495,16 +3513,39 @@ nsFocusManager::GetNextTabbableContent(n aResultContent); if (NS_SUCCEEDED(rv) && *aResultContent) { return rv; } } } } + // As of now, 2018/04/12, sequential focus navigation is still + // in the obsolete Shadow DOM specification. + // http://w3c.github.io/webcomponents/spec/shadow/#sequential-focus-navigation + // "if ELEMENT is focusable, a shadow host, or a slot element, + // append ELEMENT to NAVIGATION-ORDER." + // and later in "For each element ELEMENT in NAVIGATION-ORDER: " + // hosts and slots are handled before other elements. + if (currentContent && nsDocument::IsShadowDOMEnabled(currentContent) && + IsHostOrSlot(currentContent)) { + int32_t tabIndex = HostOrSlotTabIndexValue(currentContent); + if (tabIndex >= 0 && + (aIgnoreTabIndex || aCurrentTabIndex == tabIndex)) { + nsIContent* contentToFocus = + GetNextTabbableContentInScope(currentContent, currentContent, aForward, + aForward ? 1 : 0, aIgnoreTabIndex, + true /* aSkipOwner */); + if (contentToFocus) { + NS_ADDREF(*aResultContent = contentToFocus); + return NS_OK; + } + } + } + // TabIndex not set defaults to 0 for form elements, anchors and other // elements that are normally focusable. Tabindex defaults to -1 // for elements that are not normally focusable. // The returned computed tabindex from IsFocusable() is as follows: // < 0 not tabbable at all // == 0 in normal tab order (last after positive tabindexed items) // > 0 can be tabbed to in the order specified by this value int32_t tabIndex;
--- a/dom/base/nsFocusManager.h +++ b/dom/base/nsFocusManager.h @@ -439,16 +439,23 @@ protected: nsIContent* FindOwner(nsIContent* aContent); /** * Returns true if aContent is a shadow host or slot */ bool IsHostOrSlot(nsIContent* aContent); /** + * Host and Slot elements need to be handled as if they had tabindex 0 even + * when they don't have the attribute. This is a helper method to get the right + * value for focus navigation. + */ + int32_t HostOrSlotTabIndexValue(nsIContent* aContent); + + /** * Retrieve the next tabbable element in scope owned by aOwner, using * focusability and tabindex to determine the tab order. * * aOwner is the owner of scope to search in. * * aStartContent is the starting point for this call of this method. * * aForward should be true for forward navigation or false for backward
new file mode 100644 --- /dev/null +++ b/dom/base/test/file_bug1453693.html @@ -0,0 +1,137 @@ +<html> + <head> + <title>Test for Bug 1453693</title> + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> + <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script> + <script> + + var lastFocusTarget; + function focusLogger(event) { + lastFocusTarget = event.target; + console.log(event.target + " under " + event.target.parentNode); + } + + function testTabbingThroughShadowDOMWithTabIndexes() { + var anchor = document.createElement("a"); + anchor.onfocus = focusLogger; + anchor.href = "#"; + anchor.textContent = "in light DOM"; + document.body.appendChild(anchor); + + var host = document.createElement("div"); + document.body.appendChild(host); + + var sr = host.attachShadow({mode: "open"}); + var shadowAnchor = anchor.cloneNode(false); + shadowAnchor.onfocus = focusLogger; + shadowAnchor.textContent = "in shadow DOM"; + sr.appendChild(shadowAnchor); + var shadowInput = document.createElement("input"); + shadowInput.onfocus = focusLogger; + shadowInput.tabIndex = 1; + sr.appendChild(shadowInput); + + var input = document.createElement("input"); + input.onfocus = focusLogger; + input.tabIndex = 1; + document.body.appendChild(input); + + var input2 = document.createElement("input"); + input2.onfocus = focusLogger; + document.body.appendChild(input2); + + document.body.offsetLeft; + + synthesizeKey("KEY_Tab"); + opener.is(lastFocusTarget, input, "Should have focused input element. (3)"); + synthesizeKey("KEY_Tab"); + opener.is(lastFocusTarget, anchor, "Should have focused anchor element. (3)"); + synthesizeKey("KEY_Tab"); + opener.is(lastFocusTarget, shadowInput, "Should have focused input element in shadow DOM. (3)"); + synthesizeKey("KEY_Tab"); + opener.is(lastFocusTarget, shadowAnchor, "Should have focused anchor element in shadow DOM. (3)"); + synthesizeKey("KEY_Tab"); + opener.is(lastFocusTarget, input2, "Should have focused input[2] element. (3)"); + + // Backwards + synthesizeKey("KEY_Tab", {shiftKey: true}); + opener.is(lastFocusTarget, shadowAnchor, "Should have focused anchor element in shadow DOM. (4)"); + synthesizeKey("KEY_Tab", {shiftKey: true}); + opener.is(lastFocusTarget, shadowInput, "Should have focused input element in shadow DOM. (4)"); + synthesizeKey("KEY_Tab", {shiftKey: true}); + opener.is(lastFocusTarget, anchor, "Should have focused anchor element. (4)"); + synthesizeKey("KEY_Tab", {shiftKey: true}); + opener.is(lastFocusTarget, input, "Should have focused input element. (4)"); + + document.body.innerHTML = null; + } + + function testTabbingThroughSimpleShadowDOM() { + var anchor = document.createElement("a"); + anchor.onfocus = focusLogger; + anchor.href = "#"; + anchor.textContent = "in light DOM"; + document.body.appendChild(anchor); + anchor.focus(); + + var host = document.createElement("div"); + document.body.appendChild(host); + + var sr = host.attachShadow({mode: "open"}); + var shadowAnchor = anchor.cloneNode(false); + shadowAnchor.onfocus = focusLogger; + shadowAnchor.textContent = "in shadow DOM"; + sr.appendChild(shadowAnchor); + var shadowInput = document.createElement("input"); + shadowInput.onfocus = focusLogger; + sr.appendChild(shadowInput); + + var input = document.createElement("input"); + input.onfocus = focusLogger; + document.body.appendChild(input); + + var input2 = document.createElement("input"); + input2.onfocus = focusLogger; + document.body.appendChild(input2); + + document.body.offsetLeft; + + synthesizeKey("KEY_Tab"); + opener.is(lastFocusTarget, shadowAnchor, "Should have focused anchor element in shadow DOM."); + synthesizeKey("KEY_Tab"); + opener.is(lastFocusTarget, shadowInput, "Should have focused input element in shadow DOM."); + synthesizeKey("KEY_Tab"); + opener.is(lastFocusTarget, input, "Should have focused input element."); + synthesizeKey("KEY_Tab"); + opener.is(lastFocusTarget, input2, "Should have focused input[2] element."); + + // Backwards + synthesizeKey("KEY_Tab", {shiftKey: true}); + opener.is(lastFocusTarget, input, "Should have focused input element. (2)"); + synthesizeKey("KEY_Tab", {shiftKey: true}); + opener.is(lastFocusTarget, shadowInput, "Should have focused input element in shadow DOM. (2)"); + synthesizeKey("KEY_Tab", {shiftKey: true}); + opener.is(lastFocusTarget, shadowAnchor, "Should have focused anchor element in shadow DOM. (2)"); + synthesizeKey("KEY_Tab", {shiftKey: true}); + opener.is(lastFocusTarget, anchor, "Should have focused anchor element. (2)"); + } + + function runTest() { + + testTabbingThroughShadowDOMWithTabIndexes(); + testTabbingThroughSimpleShadowDOM(); + + opener.didRunTests(); + window.close(); + } + + function init() { + SimpleTest.waitForFocus(runTest); + } + </script> + <style> + </style> + </head> + <body onload="init()"> + </body> +</html>
--- a/dom/base/test/mochitest.ini +++ b/dom/base/test/mochitest.ini @@ -121,16 +121,17 @@ support-files = file_bug769117.html file_bug782342.txt file_bug787778.sjs file_bug869432.eventsource file_bug869432.eventsource^headers^ file_bug907892.html file_bug945152.jar file_bug1274806.html + file_bug1453693.html file_domwindowutils_animation.html file_general_document.html file_history_document_open.html file_htmlserializer_1.html file_htmlserializer_1_bodyonly.html file_htmlserializer_1_format.html file_htmlserializer_1_linebreak.html file_htmlserializer_1_links.html @@ -607,16 +608,18 @@ skip-if = toolkit == 'android' [test_bug1318303.html] [test_bug1375050.html] [test_bug1381710.html] [test_bug1384661.html] [test_bug1399605.html] [test_bug1404385.html] [test_bug1406102.html] [test_bug1421568.html] +[test_bug1453693.html] +skip-if = os == "mac" [test_caretPositionFromPoint.html] [test_change_policy.html] [test_clearTimeoutIntervalNoArg.html] [test_constructor-assignment.html] [test_constructor.html] [test_copyimage.html] subsuite = clipboard skip-if = toolkit == 'android' #bug 904183
new file mode 100644 --- /dev/null +++ b/dom/base/test/test_bug1453693.html @@ -0,0 +1,40 @@ +<!DOCTYPE HTML> +<html> +<!-- +https://bugzilla.mozilla.org/show_bug.cgi?id=1453693 +--> +<head> + <meta charset="utf-8"> + <title>Test for Bug 1453693</title> + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> + <script type="application/javascript"> + + /** Test for Bug 1453693 **/ + + SimpleTest.waitForExplicitFinish(); + + function init() { + SpecialPowers.pushPrefEnv( + { + "set": [["dom.webcomponents.shadowdom.enabled", true]] + }, + runTests); + } + + function runTests() { + win = window.open("file_bug1453693.html", "", "width=300, height=300"); + } + + function didRunTests() { + setTimeout("SimpleTest.finish()"); + } + + SimpleTest.waitForFocus(init); + + </script> +</head> +<body> +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1453693">Mozilla Bug 1453693</a> +</body> +</html>
--- a/js/src/vm/UnboxedObject-inl.h +++ b/js/src/vm/UnboxedObject-inl.h @@ -10,113 +10,16 @@ #include "vm/UnboxedObject.h" #include "gc/StoreBuffer-inl.h" #include "vm/ArrayObject-inl.h" #include "vm/NativeObject-inl.h" namespace js { -static inline Value -GetUnboxedValue(uint8_t* p, JSValueType type, bool maybeUninitialized) -{ - switch (type) { - case JSVAL_TYPE_BOOLEAN: - return BooleanValue(*p != 0); - - case JSVAL_TYPE_INT32: - return Int32Value(*reinterpret_cast<int32_t*>(p)); - - case JSVAL_TYPE_DOUBLE: { - // During unboxed plain object creation, non-GC thing properties are - // left uninitialized. This is normally fine, since the properties will - // be filled in shortly, but if they are read before that happens we - // need to make sure that doubles are canonical. - double d = *reinterpret_cast<double*>(p); - if (maybeUninitialized) - return DoubleValue(JS::CanonicalizeNaN(d)); - return DoubleValue(d); - } - - case JSVAL_TYPE_STRING: - return StringValue(*reinterpret_cast<JSString**>(p)); - - case JSVAL_TYPE_OBJECT: - return ObjectOrNullValue(*reinterpret_cast<JSObject**>(p)); - - default: - MOZ_CRASH("Invalid type for unboxed value"); - } -} - -static inline bool -SetUnboxedValue(JSContext* cx, JSObject* unboxedObject, jsid id, - uint8_t* p, JSValueType type, const Value& v, bool preBarrier) -{ - switch (type) { - case JSVAL_TYPE_BOOLEAN: - if (v.isBoolean()) { - *p = v.toBoolean(); - return true; - } - return false; - - case JSVAL_TYPE_INT32: - if (v.isInt32()) { - *reinterpret_cast<int32_t*>(p) = v.toInt32(); - return true; - } - return false; - - case JSVAL_TYPE_DOUBLE: - if (v.isNumber()) { - *reinterpret_cast<double*>(p) = v.toNumber(); - return true; - } - return false; - - case JSVAL_TYPE_STRING: - if (v.isString()) { - JSString** np = reinterpret_cast<JSString**>(p); - if (IsInsideNursery(v.toString()) && !IsInsideNursery(unboxedObject)) - v.toString()->storeBuffer()->putWholeCell(unboxedObject); - - if (preBarrier) - JSString::writeBarrierPre(*np); - *np = v.toString(); - return true; - } - return false; - - case JSVAL_TYPE_OBJECT: - if (v.isObjectOrNull()) { - JSObject** np = reinterpret_cast<JSObject**>(p); - - // Update property types when writing object properties. Types for - // other properties were captured when the unboxed layout was - // created. - AddTypePropertyId(cx, unboxedObject, id, v); - - // As above, trigger post barriers on the whole object. - JSObject* obj = v.toObjectOrNull(); - if (IsInsideNursery(obj) && !IsInsideNursery(unboxedObject)) - obj->storeBuffer()->putWholeCell(unboxedObject); - - if (preBarrier) - JSObject::writeBarrierPre(*np); - *np = obj; - return true; - } - return false; - - default: - MOZ_CRASH("Invalid type for unboxed value"); - } -} - ///////////////////////////////////////////////////////////////////// // UnboxedPlainObject ///////////////////////////////////////////////////////////////////// inline const UnboxedLayout& UnboxedPlainObject::layout() const { return group()->unboxedLayout();
--- a/js/src/vm/UnboxedObject.cpp +++ b/js/src/vm/UnboxedObject.cpp @@ -1,16 +1,18 @@ /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- * vim: set ts=8 sts=4 et sw=4 tw=99: * 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/. */ #include "vm/UnboxedObject-inl.h" +#include "mozilla/MemoryChecking.h" + #include "jit/BaselineIC.h" #include "jit/ExecutableAllocator.h" #include "jit/JitCommon.h" #include "jit/Linker.h" #include "gc/Nursery-inl.h" #include "jit/MacroAssembler-inl.h" #include "vm/JSObject-inl.h" @@ -301,16 +303,121 @@ UnboxedLayout::makeConstructorCode(JSCon void UnboxedLayout::detachFromCompartment() { if (isInList()) remove(); } +static Value +GetUnboxedValue(uint8_t* p, JSValueType type, bool maybeUninitialized) +{ + switch (type) { + case JSVAL_TYPE_BOOLEAN: + if (maybeUninitialized) { + // Squelch Valgrind/MSan errors. + MOZ_MAKE_MEM_DEFINED(p, 1); + } + return BooleanValue(*p != 0); + + case JSVAL_TYPE_INT32: + if (maybeUninitialized) + MOZ_MAKE_MEM_DEFINED(p, sizeof(int32_t)); + return Int32Value(*reinterpret_cast<int32_t*>(p)); + + case JSVAL_TYPE_DOUBLE: { + // During unboxed plain object creation, non-GC thing properties are + // left uninitialized. This is normally fine, since the properties will + // be filled in shortly, but if they are read before that happens we + // need to make sure that doubles are canonical. + if (maybeUninitialized) + MOZ_MAKE_MEM_DEFINED(p, sizeof(double)); + double d = *reinterpret_cast<double*>(p); + if (maybeUninitialized) + return DoubleValue(JS::CanonicalizeNaN(d)); + return DoubleValue(d); + } + + case JSVAL_TYPE_STRING: + return StringValue(*reinterpret_cast<JSString**>(p)); + + case JSVAL_TYPE_OBJECT: + return ObjectOrNullValue(*reinterpret_cast<JSObject**>(p)); + + default: + MOZ_CRASH("Invalid type for unboxed value"); + } +} + +static bool +SetUnboxedValue(JSContext* cx, JSObject* unboxedObject, jsid id, + uint8_t* p, JSValueType type, const Value& v, bool preBarrier) +{ + switch (type) { + case JSVAL_TYPE_BOOLEAN: + if (v.isBoolean()) { + *p = v.toBoolean(); + return true; + } + return false; + + case JSVAL_TYPE_INT32: + if (v.isInt32()) { + *reinterpret_cast<int32_t*>(p) = v.toInt32(); + return true; + } + return false; + + case JSVAL_TYPE_DOUBLE: + if (v.isNumber()) { + *reinterpret_cast<double*>(p) = v.toNumber(); + return true; + } + return false; + + case JSVAL_TYPE_STRING: + if (v.isString()) { + JSString** np = reinterpret_cast<JSString**>(p); + if (IsInsideNursery(v.toString()) && !IsInsideNursery(unboxedObject)) + v.toString()->storeBuffer()->putWholeCell(unboxedObject); + + if (preBarrier) + JSString::writeBarrierPre(*np); + *np = v.toString(); + return true; + } + return false; + + case JSVAL_TYPE_OBJECT: + if (v.isObjectOrNull()) { + JSObject** np = reinterpret_cast<JSObject**>(p); + + // Update property types when writing object properties. Types for + // other properties were captured when the unboxed layout was + // created. + AddTypePropertyId(cx, unboxedObject, id, v); + + // As above, trigger post barriers on the whole object. + JSObject* obj = v.toObjectOrNull(); + if (IsInsideNursery(obj) && !IsInsideNursery(unboxedObject)) + obj->storeBuffer()->putWholeCell(unboxedObject); + + if (preBarrier) + JSObject::writeBarrierPre(*np); + *np = obj; + return true; + } + return false; + + default: + MOZ_CRASH("Invalid type for unboxed value"); + } +} + ///////////////////////////////////////////////////////////////////// // UnboxedPlainObject ///////////////////////////////////////////////////////////////////// bool UnboxedPlainObject::setValue(JSContext* cx, const UnboxedLayout::Property& property, const Value& v) {
--- a/netwerk/base/nsStandardURL.cpp +++ b/netwerk/base/nsStandardURL.cpp @@ -1800,16 +1800,17 @@ nsStandardURL::SetPassword(const nsACStr const nsPromiseFlatCString &password = PromiseFlatCString(input); auto clearedPassword = MakeScopeExit([&password, this]() { // Check that if this method is called with the empty string then the // password is definitely cleared when exiting this method. if (password.IsEmpty()) { MOZ_DIAGNOSTIC_ASSERT(this->Password().IsEmpty()); } + Unused << this; // silence compiler -Wunused-lambda-capture }); LOG(("nsStandardURL::SetPassword [password=%s]\n", password.get())); if (mURLType == URLTYPE_NO_AUTHORITY) { if (password.IsEmpty()) return NS_OK; NS_WARNING("cannot set password on no-auth url");
--- a/toolkit/components/downloads/DownloadHistory.jsm +++ b/toolkit/components/downloads/DownloadHistory.jsm @@ -416,18 +416,26 @@ var DownloadHistoryList = function(publi this._slots = []; this._slotsForUrl = new Map(); this._slotForDownload = new WeakMap(); // Start the asynchronous queries to retrieve history and session downloads. publicList.addView(this).catch(Cu.reportError); let query = {}, options = {}; PlacesUtils.history.queryStringToQuery(place, query, options); + + // NB: The addObserver call sets our nsINavHistoryResultObserver.result. let result = PlacesUtils.history.executeQuery(query.value, options.value); result.addObserver(this); + + // Our history result observer is long lived for fast shared views, so free + // the reference on shutdown to prevent leaks. + Services.obs.addObserver(() => { + this.result = null; + }, "quit-application-granted"); }; this.DownloadHistoryList.prototype = { __proto__: DownloadList.prototype, /** * This is set when executing the Places query. */ @@ -450,27 +458,16 @@ this.DownloadHistoryList.prototype = { if (this._result) { this._result.root.containerOpen = true; PlacesUtils.annotations.addObserver(this); } }, _result: null, /** - * Remove the view that belongs to this list via DownloadList's removeView. In - * addition, delete the result object to ensure there are no memory leaks. - */ - removeView(aView) { - DownloadList.prototype.removeView.call(this, aView); - - // Clean up any active results that might still be observing. See bug 1455737 - this.result = null; - }, - - /** * Index of the first slot that contains a session download. This is equal to * the length of the list when there are no session downloads. */ _firstSessionSlotIndex: 0, _insertSlot({ slot, index, slotsForUrl }) { // Add the slot to the ordered array. this._slots.splice(index, 0, slot);
--- a/toolkit/components/downloads/test/unit/test_DownloadHistory.js +++ b/toolkit/components/downloads/test/unit/test_DownloadHistory.js @@ -253,17 +253,29 @@ add_task(async function test_DownloadHis let allHistoryList2 = await DownloadHistory.getList({ type: Downloads.ALL, maxHistoryResults: 3 }); // Prepare the set of downloads to contain fewer history downloads by removing // the oldest ones. let allView2 = new TestView(allView.expected.slice(3)); await allHistoryList2.addView(allView2); await allView2.waitForExpected(); + // Create a dummy list and view like the previous limited one to just add and + // remove its view to make sure it doesn't break other lists' updates. + let dummyList = await DownloadHistory.getList({ type: Downloads.ALL, + maxHistoryResults: 3 }); + let dummyView = new TestView([]); + await dummyList.addView(dummyView); + await dummyList.removeView(dummyView); + // Clear history and check that session downloads with partial data remain. // Private downloads are also not cleared when clearing history. view.expected = view.expected.filter(d => d.hasPartialData); allView.expected = allView.expected.filter(d => d.hasPartialData || d.isPrivate); await PlacesUtils.history.clear(); await view.waitForExpected(); await allView.waitForExpected(); + + // Check that the dummy view above did not prevent the limited from updating. + allView2.expected = allView.expected; + await allView2.waitForExpected(); });
--- a/toolkit/components/places/tests/unit/test_454977.js +++ b/toolkit/components/places/tests/unit/test_454977.js @@ -4,35 +4,33 @@ * 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/. */ // Cache actual visit_count value, filled by add_visit, used by check_results var visit_count = 0; // Returns the Place ID corresponding to an added visit. async function task_add_visit(aURI, aVisitType) { - // Add the visit asynchronously, and save its visit ID. - let deferUpdatePlaces = new Promise((resolve, reject) => { - PlacesUtils.asyncHistory.updatePlaces({ - uri: aURI, - visits: [{ transitionType: aVisitType, visitDate: Date.now() * 1000 }] - }, { - handleError: function TAV_handleError() { - reject(new Error("Unexpected error in adding visit.")); - }, - handleResult(aPlaceInfo) { - this.visitId = aPlaceInfo.visits[0].visitId; - }, - handleCompletion: function TAV_handleCompletion() { - resolve(this.visitId); - } - }); - }); + // Wait for a visits notification and get the visitId. + let visitId; + let visitsPromise = PlacesTestUtils.waitForNotification("onVisits", visits => { + visitId = visits[0].visitId; + let {uri} = visits[0]; + return uri.equals(aURI); + }, "history"); - let visitId = await deferUpdatePlaces; + // Add visits. + await PlacesTestUtils.addVisits([{ + uri: aURI, + transition: aVisitType + }]); + + if (aVisitType != TRANSITION_EMBED) { + await visitsPromise; + } // Increase visit_count if applicable if (aVisitType != 0 && aVisitType != TRANSITION_EMBED && aVisitType != TRANSITION_FRAMED_LINK && aVisitType != TRANSITION_DOWNLOAD && aVisitType != TRANSITION_RELOAD) { visit_count++;
--- a/toolkit/components/places/tests/unit/test_download_history.js +++ b/toolkit/components/places/tests/unit/test_download_history.js @@ -149,44 +149,51 @@ add_task(async function test_dh_addBookm }); gDownloadHistory.removeAllDownloads(); }); gDownloadHistory.addDownload(DOWNLOAD_URI, null, Date.now() * 1000); }); }); -add_test(function test_dh_addDownload_referrer() { - waitForOnVisit(function DHAD_prepareReferrer(aURI, aVisitID) { - Assert.ok(aURI.equals(REFERRER_URI)); - let referrerVisitId = aVisitID; +add_task(async function test_dh_addDownload_referrer() { + // Wait for visits notification and get the visit id. + let visitId; + let referrerPromise = PlacesTestUtils.waitForNotification("onVisits", visits => { + visitId = visits[0].visitId; + let {uri} = visits[0]; + return uri.equals(REFERRER_URI); + }, "history"); - waitForOnVisit(function DHAD_onVisit(aVisitedURI, unused, unused2, unused3, - aReferringID) { - Assert.ok(aVisitedURI.equals(DOWNLOAD_URI)); - Assert.equal(aReferringID, referrerVisitId); - - // Verify that the URI is already available in results at this time. - Assert.ok(!!page_in_database(DOWNLOAD_URI)); + await PlacesTestUtils.addVisits([{ + uri: REFERRER_URI, + transition: Ci.nsINavHistoryService.TRANSITION_TYPED + }]); + await referrerPromise; - PlacesUtils.history.clear().then(run_next_test); - }); - - gDownloadHistory.addDownload(DOWNLOAD_URI, REFERRER_URI, Date.now() * 1000); - }); + // Verify results for referrer uri. + Assert.ok(!!PlacesTestUtils.isPageInDB(REFERRER_URI)); + Assert.equal(visitId, 1); - // Note that we don't pass the optional callback argument here because we must - // ensure that we receive the onVisits notification before we call addDownload. - PlacesUtils.asyncHistory.updatePlaces({ - uri: REFERRER_URI, - visits: [{ - transitionType: Ci.nsINavHistoryService.TRANSITION_TYPED, - visitDate: Date.now() * 1000 - }] - }); + // Wait for visits notification and get the referrer Id. + let referrerId; + let downloadPromise = PlacesTestUtils.waitForNotification("onVisits", visits => { + referrerId = visits[0].referrerId; + let {uri} = visits[0]; + return uri.equals(DOWNLOAD_URI); + }, "history"); + + gDownloadHistory.addDownload(DOWNLOAD_URI, REFERRER_URI, Date.now() * 1000); + await downloadPromise; + + // Verify results for download uri. + Assert.ok(!!PlacesTestUtils.isPageInDB(DOWNLOAD_URI)); + Assert.equal(visitId, referrerId); + + await PlacesUtils.history.clear(); }); add_test(function test_dh_addDownload_disabledHistory() { waitForOnVisit(function DHAD_onVisit(aURI) { // We should only receive the notification for the non-private URI. This // test is based on the assumption that visit notifications are received in // the same order of the addDownload calls, which is currently true because // database access is serialized on the same worker thread.
--- a/toolkit/components/places/tests/unit/test_isURIVisited.js +++ b/toolkit/components/places/tests/unit/test_isURIVisited.js @@ -18,64 +18,51 @@ const SCHEMES = { "view-source:http://": false, "chrome://browser/content/browser.xul?": false, "resource://": false, "data:,": false, "wyciwyg:/0/http://": false, "javascript:": false, }; -var gRunner; -function run_test() { - do_test_pending(); - gRunner = step(); - gRunner.next(); -} - -function* step() { +add_task(async function test_isURIVisited() { let history = Cc["@mozilla.org/browser/history;1"] .getService(Ci.mozIAsyncHistory); + function visitsPromise(uri) { + return new Promise(resolve => { + history.isURIVisited(uri, (receivedURI, visited) => { + resolve([receivedURI, visited]); + }); + }); + } + for (let scheme in SCHEMES) { info("Testing scheme " + scheme); for (let t in PlacesUtils.history.TRANSITIONS) { info("With transition " + t); - let transition = PlacesUtils.history.TRANSITIONS[t]; - - let uri = NetUtil.newURI(scheme + "mozilla.org/"); + let aTransition = PlacesUtils.history.TRANSITIONS[t]; - history.isURIVisited(uri, function(aURI, aIsVisited) { - Assert.ok(uri.equals(aURI)); - Assert.ok(!aIsVisited); + let aURI = Services.io.newURI(scheme + "mozilla.org/"); - let callback = { - handleError() {}, - handleResult() {}, - handleCompletion() { - info("Added visit to " + uri.spec); - - history.isURIVisited(uri, function(aURI2, aIsVisited2) { - Assert.ok(uri.equals(aURI2)); - Assert.ok(SCHEMES[scheme] ? aIsVisited2 : !aIsVisited2); + let [receivedURI1, visited1] = await visitsPromise(aURI); + Assert.ok(aURI.equals(receivedURI1)); + Assert.ok(!visited1); - PlacesUtils.history.clear().then(function() { - history.isURIVisited(uri, function(aURI3, aIsVisited3) { - Assert.ok(uri.equals(aURI3)); - Assert.ok(!aIsVisited3); - gRunner.next(); - }); - }); - }); - }, - }; + if (PlacesUtils.history.canAddURI(aURI)) { + await PlacesTestUtils.addVisits([{ + uri: aURI, + transition: aTransition + }]); + info("Added visit for " + aURI.spec); + } - history.updatePlaces({ uri, - visits: [ { transitionType: transition, - visitDate: Date.now() * 1000 - } ] - }, callback); - }); - yield undefined; + let [receivedURI2, visited2] = await visitsPromise(aURI); + Assert.ok(aURI.equals(receivedURI2)); + Assert.equal(SCHEMES[scheme], visited2); + + await PlacesUtils.history.clear(); + let [receivedURI3, visited3] = await visitsPromise(aURI); + Assert.ok(aURI.equals(receivedURI3)); + Assert.ok(!visited3); } } - - do_test_finished(); -} +});
--- a/toolkit/content/jar.mn +++ b/toolkit/content/jar.mn @@ -69,17 +69,16 @@ toolkit.jar: content/global/bindings/colorpicker.xml (widgets/colorpicker.xml) content/global/bindings/datekeeper.js (widgets/datekeeper.js) content/global/bindings/datepicker.js (widgets/datepicker.js) content/global/bindings/datetimepopup.xml (widgets/datetimepopup.xml) content/global/bindings/datetimebox.xml (widgets/datetimebox.xml) content/global/bindings/datetimebox.css (widgets/datetimebox.css) * content/global/bindings/dialog.xml (widgets/dialog.xml) content/global/bindings/editor.xml (widgets/editor.xml) - content/global/bindings/filefield.xml (widgets/filefield.xml) * content/global/bindings/findbar.xml (widgets/findbar.xml) content/global/bindings/general.xml (widgets/general.xml) content/global/bindings/groupbox.xml (widgets/groupbox.xml) content/global/bindings/listbox.xml (widgets/listbox.xml) content/global/bindings/menu.xml (widgets/menu.xml) content/global/bindings/menulist.xml (widgets/menulist.xml) content/global/bindings/notification.xml (widgets/notification.xml) content/global/bindings/numberbox.xml (widgets/numberbox.xml)
--- a/toolkit/content/preferencesBindings.js +++ b/toolkit/content/preferencesBindings.js @@ -441,17 +441,17 @@ const Preferences = window.Preferences = case "colorpicker": case "radiogroup": case "textbox": case "listitem": case "listbox": case "menulist": return true; } - return aElement.getAttribute("preference-editable") == "true"; + return false; } updateElements() { if (!this.id) return; // This "change" event handler tracks changes made to preferences by // sources other than the user in this window.
deleted file mode 100644 --- a/toolkit/content/widgets/filefield.xml +++ /dev/null @@ -1,93 +0,0 @@ -<?xml version="1.0"?> -<!-- 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/. --> - - -<bindings id="filefieldBindings" - xmlns="http://www.mozilla.org/xbl" - xmlns:xbl="http://www.mozilla.org/xbl" - xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> - - <binding id="filefield" extends="chrome://global/content/bindings/general.xml#basetext"> - <resources> - <stylesheet src="chrome://global/skin/filefield.css"/> - </resources> - <content> - <xul:stringbundle anonid="bundle" src="chrome://global/locale/filefield.properties"/> - <xul:hbox class="fileFieldContentBox" align="center" flex="1" xbl:inherits="disabled"> - <xul:image class="fileFieldIcon" xbl:inherits="src=image,disabled"/> - <xul:textbox class="fileFieldLabel" xbl:inherits="value=label,disabled,accesskey,tabindex,aria-labelledby" flex="1" readonly="true"/> - </xul:hbox> - </content> - <implementation implements="nsIDOMXULLabeledControlElement"> - <property name="label" onget="return this.getAttribute('label');"> - <setter> - this.setAttribute("label", val); - var elt = document.getAnonymousElementByAttribute(this, "class", "fileFieldLabel"); - return (elt.value = val); - </setter> - </property> - - <field name="_file">null</field> - <property name="file" onget="return this._file"> - <setter> - <![CDATA[ - this._file = val; - if (val) { - this.image = this._getIconURLForFile(val); - this.label = this._getDisplayNameForFile(val); - } else { - this.removeAttribute("image"); - var bundle = document.getAnonymousElementByAttribute(this, "anonid", "bundle"); - this.label = bundle.getString("downloadHelperNoneSelected"); - } - return val; - ]]> - </setter> - </property> - <method name="_getDisplayNameForFile"> - <parameter name="aFile"/> - <body> - <![CDATA[ - if (/Win/.test(navigator.platform)) { - var lfw = aFile.QueryInterface(Ci.nsILocalFileWin); - try { - return lfw.getVersionInfoField("FileDescription"); - } catch (e) { - // fall through to the filename - } - } else if (/Mac/.test(navigator.platform)) { - var lfm = aFile.QueryInterface(Ci.nsILocalFileMac); - try { - return lfm.bundleDisplayName; - } catch (e) { - // fall through to the file name - } - } - var ios = Cc["@mozilla.org/network/io-service;1"] - .getService(Ci.nsIIOService); - var url = ios.newFileURI(aFile).QueryInterface(Ci.nsIURL); - return url.fileName; - ]]> - </body> - </method> - - <method name="_getIconURLForFile"> - <parameter name="aFile"/> - <body> - <![CDATA[ - if (!aFile) - return ""; - var ios = Cc["@mozilla.org/network/io-service;1"] - .getService(Ci.nsIIOService); - var fph = ios.getProtocolHandler("file") - .QueryInterface(Ci.nsIFileProtocolHandler); - var urlspec = fph.getURLSpecFromFile(aFile); - return "moz-icon://" + urlspec + "?size=16"; - ]]> - </body> - </method> - </implementation> - </binding> -</bindings>
--- a/toolkit/content/xul.css +++ b/toolkit/content/xul.css @@ -957,22 +957,16 @@ findbar { -moz-binding: url('chrome://global/content/bindings/findbar.xml#findbar'); overflow-x: hidden; } .findbar-textbox { -moz-binding: url("chrome://global/content/bindings/findbar.xml#findbar-textbox"); } - -/*********** filefield ************/ -filefield { - -moz-binding: url("chrome://global/content/bindings/filefield.xml#filefield"); -} - /*********** tabmodalprompt ************/ tabmodalprompt { -moz-binding: url("chrome://global/content/tabprompts.xml#tabmodalprompt"); overflow: hidden; text-shadow: none; } .button-highlightable-text:not([highlightable="true"]),
deleted file mode 100644 --- a/toolkit/locales/en-US/chrome/global/filefield.properties +++ /dev/null @@ -1,7 +0,0 @@ -# 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/. - -#### Change Action - -downloadHelperNoneSelected=None Selected
--- a/toolkit/locales/jar.mn +++ b/toolkit/locales/jar.mn @@ -35,17 +35,16 @@ locale/@AB_CD@/global/contentAreaCommands.properties (%chrome/global/contentAreaCommands.properties) locale/@AB_CD@/global/datetimebox.dtd (%chrome/global/datetimebox.dtd) locale/@AB_CD@/global/dialogOverlay.dtd (%chrome/global/dialogOverlay.dtd) #ifndef MOZ_FENNEC locale/@AB_CD@/global/editMenuOverlay.dtd (%chrome/global/editMenuOverlay.dtd) #endif locale/@AB_CD@/global/extensions.properties (%chrome/global/extensions.properties) locale/@AB_CD@/global/fallbackMenubar.properties (%chrome/global/fallbackMenubar.properties) - locale/@AB_CD@/global/filefield.properties (%chrome/global/filefield.properties) locale/@AB_CD@/global/filepicker.properties (%chrome/global/filepicker.properties) #ifndef MOZ_FENNEC locale/@AB_CD@/global/findbar.dtd (%chrome/global/findbar.dtd) locale/@AB_CD@/global/findbar.properties (%chrome/global/findbar.properties) #endif locale/@AB_CD@/global/globalKeys.dtd (%chrome/global/globalKeys.dtd) locale/@AB_CD@/global/intl.css (%chrome/global/intl.css) locale/@AB_CD@/global/intl.properties (%chrome/global/intl.properties)
deleted file mode 100644 --- a/toolkit/themes/osx/global/filefield.css +++ /dev/null @@ -1,38 +0,0 @@ -/* -# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- -# 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/. -*/ - -.fileFieldIcon { - width: 16px; - height: 16px; -} - -.fileFieldIcon[disabled="true"] { - opacity: 0.5; -} - -filefield { - margin: 4px; - margin-inline-start: 27px; - -moz-appearance: textfield; -} - -.fileFieldContentBox { - margin: -3px; - background-color: rgba(230, 230, 230, 0.6); - color: -moz-DialogText; - padding-top: 2px; - padding-bottom: 2px; - padding-inline-start: 5px; - padding-inline-end: 3px; -} - -.fileFieldLabel { - -moz-appearance: none; - background-color: transparent; - border: none; - margin: 0 4px; -}
--- a/toolkit/themes/osx/global/jar.mn +++ b/toolkit/themes/osx/global/jar.mn @@ -7,17 +7,16 @@ toolkit.jar: skin/classic/global/autocomplete.css skin/classic/global/button.css skin/classic/global/checkbox.css skin/classic/global/colorpicker.css skin/classic/global/commonDialog.css skin/classic/global/dialog.css skin/classic/global/dropmarker.css - skin/classic/global/filefield.css * skin/classic/global/findBar.css * skin/classic/global/global.css skin/classic/global/groupbox.css skin/classic/global/listbox.css skin/classic/global/menu.css skin/classic/global/menulist.css * skin/classic/global/notification.css skin/classic/global/netError.css
--- a/toolkit/themes/osx/reftests/baseline.xul +++ b/toolkit/themes/osx/reftests/baseline.xul @@ -6,18 +6,18 @@ * XUL authors like to place several different widgets on the same line by * putting them in a <hbox align="center">. In order for this to look good, * the baselines of the text contained in the widgets should line up. * This is what this test is testing. * The test passes if it's completely white. * * It works like this: * For every combination of two different widgets (where widget is one of - * label, radio, checkbox, button, textbox, menulist, menulist[editable="true"] or - * filefield), there's a stack with two layers. The back layer in the stack is + * label, radio, checkbox, button, textbox, menulist, menulist[editable="true"]), + * there's a stack with two layers. The back layer in the stack is * just a vertically centered label with a bunch of underscores. This is the * baseline that the text on the widgets should hit. * On the foreground layer in the stack we've placed the pair of widgets we're * testing. They also have underscores in their labels. * * Now we want to test whether the underscores in the foreground layer are directly * on top of those in the back layer. For that we use color-keying and a tricky * SVG color transformation. @@ -125,28 +125,23 @@ function createMenulist(v) { list.appendChild(popup); return list; } function createEditableMenulist(v) { let list = createMenulist(v); list.setAttribute("editable", "true"); return list; } -function createFileField(v) { - let field = elWithValue("filefield", v); - field.setAttribute("image", "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAAXNSR0IArs4c6QAAAChJREFUSMftzUEBAAAEBLCjf2dK8NsKrCaTT51nAoFAIBAIBAKB4MoCtVsCPjrGuiwAAAAASUVORK5CYII="); - return field; -} function loaded() { let template = document.getElementById("template"); ["regular", "small"].forEach(function(size) { let wrapper = document.querySelectorAll("#wrapper > ." + size)[0]; allPairs([ createLabel, createRadio, createCheckbox, createButton, createMenulist, createTextField, - /* createEditableMenulist, createFileField, */ /* These don't inherit "color" properly */ + /* createEditableMenulist, */ /* These don't inherit "color" properly */ ]).forEach(function(elemList) { let newBox = template.cloneNode(true); newBox.className = "spacer"; let foregroundRow = newBox.firstChild.lastChild; elemList.forEach(function(creator) { foregroundRow.appendChild(creator("______")); }); wrapper.appendChild(newBox);
--- a/toolkit/themes/shared/in-content/common.inc.css +++ b/toolkit/themes/shared/in-content/common.inc.css @@ -741,55 +741,16 @@ xul|*.radio-label-box { *|*.header-name { font-size: 1.46em; font-weight: 300; line-height: 1.3em; margin: 0; -moz-user-select: none; } -/* File fields */ - -xul|filefield { - -moz-appearance: none; - background-color: transparent; - border: none; - padding: 0; -} - -xul|*.fileFieldContentBox { - background-color: transparent; -} - -xul|*.fileFieldIcon { - margin-inline-start: 10px; - margin-inline-end: 0; -} - -xul|*.fileFieldLabel { - margin-inline-start: -26px; - padding-inline-start: 36px; -} - -xul|*.fileFieldLabel:-moz-locale-dir(rtl), -xul|filefield + xul|button:-moz-locale-dir(ltr) { - border-top-left-radius: 0; - border-bottom-left-radius: 0; -} - -xul|*.fileFieldLabel:-moz-locale-dir(ltr), -xul|filefield + xul|button:-moz-locale-dir(rtl) { - border-top-right-radius: 0; - border-bottom-right-radius: 0; -} - -xul|filefield + xul|button { - border-inline-start: none; -} - /* List boxes */ html|select[size][multiple], xul|richlistbox, xul|listbox { -moz-appearance: none; margin-inline-start: 0; background-color: var(--in-content-box-background);
--- a/toolkit/themes/shared/non-mac.jar.inc.mn +++ b/toolkit/themes/shared/non-mac.jar.inc.mn @@ -6,17 +6,16 @@ # by the shared jar manifest, which in turn is included by the os-specific # manifests. # As a result, the source file paths are relative to the location of the # actual manifests. #include jar.inc.mn skin/classic/global/dialog.css (../../windows/global/dialog.css) - skin/classic/global/filefield.css (../../windows/global/filefield.css) skin/classic/global/progressmeter.css (../../windows/global/progressmeter.css) skin/classic/global/resizer.css (../../windows/global/resizer.css) skin/classic/global/richlistbox.css (../../windows/global/richlistbox.css) skin/classic/global/scrollbars.css (../../windows/global/xulscrollbars.css) skin/classic/global/tabprompts.css (../../windows/global/tabprompts.css) skin/classic/global/wizard.css (../../windows/global/wizard.css) skin/classic/global/arrow/arrow-dn.gif (../../windows/global/arrow/arrow-dn.gif)
deleted file mode 100644 --- a/toolkit/themes/windows/global/filefield.css +++ /dev/null @@ -1,36 +0,0 @@ -/* -# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- -# 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/. -*/ - -/* File Field Widget */ -filefield { - margin: 2px 4px; - -moz-appearance: textfield; -} - -.fileFieldContentBox { - background-color: -moz-Dialog; -} - -.fileFieldIcon[disabled="true"] { - opacity: 0.4; -} - -.fileFieldIcon { - width: 16px; - height: 16px; - margin-top: 1px; - margin-bottom: 1px; - margin-inline-start: 1px; - margin-inline-end: 4px; -} - -.fileFieldLabel { - -moz-appearance: none; - background-color: transparent; - border: none; - margin: 0px; -}